#define ENABLE_TIZEN_FIND_STRING 1 /* Jinwoo Song(jinwoo7.song@samsung.com) : Fix the bug to enable searching the web page which has the 'webkit-user-select: none' CSS property and value. */
#define ENABLE_TIZEN_GET_EXTERNAL_RESOURCES_IN_MHTML_FROM_NETWORK 1 /* Praveen(praveen.ks@samsung.com) : Allow external resources in MHTML file to be fetched from network rather than failing them */
+#define ENABLE_TIZEN_MHTML_CSS_MEDIA_RULE_RESOURCE 1 /* Santosh Mahto(santosh.ma@samsung.com) : Collect the subresource specified in css media rule in mhtml PageSerializing */
#define ENABLE_TIZEN_MAIN_THREAD_SCHEDULE_DISCARD_DUPLICATE_REQUEST 1 /* Jihye Kang(jye.kang@samsung.com) : Fix lockup while doing stress test for filewriter */
#include "CSSImageValue.h"
#include "CSSImportRule.h"
+#if ENABLE(TIZEN_MHTML_CSS_MEDIA_RULE_RESOURCE)
+#include "CSSMediaRule.h"
+#endif
#include "CSSStyleRule.h"
#include "CachedImage.h"
#include "Document.h"
} else if (rule->isFontFaceRule()) {
// FIXME: Add support for font face rule. It is not clear to me at this point if the actual otf/eot file can
// be retrieved from the CSSFontFaceRule object.
+#if ENABLE(TIZEN_MHTML_CSS_MEDIA_RULE_RESOURCE)
+ } else if (rule->isMediaRule()) {
+ CSSMediaRule* mediaRule = static_cast<CSSMediaRule*>(rule);
+ for (int i = 0; i < mediaRule->length(); ++i) {
+ if (mediaRule->item(i)->isStyleRule())
+ retrieveResourcesForRule(static_cast<CSSStyleRule*>(mediaRule->item(i))->styleRule(), document);
+ }
+#endif
} else if (rule->isStyleRule())
retrieveResourcesForRule(static_cast<CSSStyleRule*>(rule)->styleRule(), document);
}