WebCore:
2008-04-02 Brady Eidson <beidson@apple.com>
Reviewed by Mitz Pettel
<rdar://problem/5838347> and http://bugs.webkit.org/show_bug.cgi?id=11839
Webarchive fails to save CSS files in @import statements
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::addSubresourceURLStrings): Recursively add the URL each @import rule under the current style sheet.
* css/CSSStyleSheet.h:
* css/StyleSheet.h:
(WebCore::StyleSheet::addSubresourceURLStrings):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::getSubresourceAttributeStrings): Add the linked URL as well as all @import
rules rooted at the linked stylesheet.
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::getSubresourceAttributeStrings): Walk all @import rules rooted at this
stylesheet to add to the list.
* html/HTMLStyleElement.h:
LayoutTests:
2008-04-02 Brady Eidson <beidson@apple.com>
Written by David Kilzer, tweaked by Brady, Reviewed by Mitz Pettel
- test for http://bugs.webkit.org/show_bug.cgi?id=11839
Webarchive fails to save CSS files in @import statements
The idea is to <link> to a CSS file which @imports another CSS file,
and also @import a CSS file inside a <style> element, which also @imports another CSS file
Then make sure all 4 of the css files are in the resulting webarchive
* webarchive/resources/test-css-import-recurse.css: Added.
* webarchive/resources/test-css-import.css: Added.
* webarchive/resources/test-css-link-recurse.css: Added.
* webarchive/resources/test-css-link.css: Added.
* webarchive/test-css-import-expected.txt: Added.
* webarchive/test-css-import.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed