http://sports.hankooki.com/lpage/soccer/201304/sp2013042317313793750.htm
[Title] Fix for different layout of mhtml saved page
in http://sports.hankooki.com/lpage/soccer/201304/sp2013042317313793750.htm
[Issue#] TD-9513
[Problem] The Style of saved page was completely different
from original page.
[Cause] The final path url of sheet specified under @import
are not relative to parent stylesheet but relative to document
[Solution] Modified the code to calulate final URL path of Stylesheet
relative to parent stylesheet.
[Developer] Santosh Mahto[santosh.ma@samsung.com)
Change-Id: Ic9624339de4d39be205119c15e529f22f6067064
#define ENABLE_TIZEN_CSP 1 /* Seonae Kim(sunaeluv.kim@samsung.com) : Support CSP to provide EWK API to web applicatoin */
#define ENABLE_TIZEN_SUPPORT_MHTML 1 /* KwangYong Choi(ky0.choi@samsung.com) : Add support for exporting MHTML data */
+#define ENABLE_TIZEN_MHTML_CSS_IMPORT_URL_RELATIVE_TO_PARENT 1 /*Santosh Mahto(santosh.ma@samsung.com) : URL of stylesheet specified in @import should be relative to parent Stylesheet in page Serializing */
+
#define ENABLE_TIZEN_OFFLINE_PAGE_SAVE 1 /* Nikhil Bansal (n.bansal@samsung.com) : Tizen feature for offline page save */
#define ENABLE_TIZEN_SIGNAL_APP_BACK_FORWARD_LIST_CHANGED 1 /* Praveen(praveen.ks@samsung.com) : Add API to signal application for change in back forward list */
// Some rules have resources associated with them that we need to retrieve.
if (rule->isImportRule()) {
CSSImportRule* importRule = static_cast<CSSImportRule*>(rule);
+#if ENABLE(TIZEN_MHTML_CSS_IMPORT_URL_RELATIVE_TO_PARENT)
+ KURL importURL = document->completeURL(KURL(styleSheet->baseURL(), importRule->href()));
+#else
KURL importURL = document->completeURL(importRule->href());
+#endif
if (m_resourceURLs.contains(importURL))
continue;
serializeCSSStyleSheet(importRule->styleSheet(), importURL);