WebCore:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2008 05:56:21 +0000 (05:56 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2008 05:56:21 +0000 (05:56 +0000)
commita4264efa86c7f002e8be602c531100842380f825
tree0c7865af506ecc5f05222de579e92982e23a9187
parente8d3606678d8650e9f6df4ae2d2828ff5a6c91fd
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: https://svn.webkit.org/repository/webkit/trunk@31578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/webarchive/resources/test-css-import-recurse.css [new file with mode: 0644]
LayoutTests/webarchive/resources/test-css-import.css [new file with mode: 0644]
LayoutTests/webarchive/resources/test-css-link-recurse.css [new file with mode: 0644]
LayoutTests/webarchive/resources/test-css-link.css [new file with mode: 0644]
LayoutTests/webarchive/test-css-import-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-css-import.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSStyleSheet.cpp
WebCore/css/CSSStyleSheet.h
WebCore/css/StyleSheet.h
WebCore/html/HTMLLinkElement.cpp
WebCore/html/HTMLStyleElement.cpp
WebCore/html/HTMLStyleElement.h