Remove addSubresourceStyleURLs functions
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 19:36:39 +0000 (19:36 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 19:36:39 +0000 (19:36 +0000)
commit265c6ea712418022885e152669b1b6b74800faa6
treee2c9edfa2e46bcab561f098d66ff9f26467c8560
parent0b77d0242c2691a59b3ea4601fe63448d46e03b5
Remove addSubresourceStyleURLs functions
https://bugs.webkit.org/show_bug.cgi?id=162731

Reviewed by Ryosuke Niwa.

Use the generic std::function taking traverseSubresources instead. This prevents bugs caused by the code paths
not being in sync.

These functions are only used by the legacy webarchive code to gather URLs to locate CachedResources from the memory cache.
This can be improved further by returning the cached resources themselves instead of the URLs.

* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Deleted.
* css/CSSFontFaceSrcValue.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Deleted.
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::addSubresourceStyleURLs): Deleted.
* css/CSSReflectValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::addSubresourceStyleURLs): Deleted.
* css/CSSValue.h:
* css/CSSValueList.cpp:
(WebCore::CSSValueList::addSubresourceStyleURLs): Deleted.
* css/CSSValueList.h:
* css/StyleProperties.cpp:
(WebCore::StyleProperties::addSubresourceStyleURLs): Deleted.
* css/StyleProperties.h:
* css/StyleRuleImport.h:
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::traverseSubresources):

    Fix a bug where this would miss @import rules in @imported stylesheets.
    Include the CachedResource for the imported stylesheet itself.

    Tested by the test cases under LayoutTests/webarchive

(WebCore::StyleSheetContents::addSubresourceStyleURLs): Deleted.
* css/StyleSheetContents.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::addSubresourceAttributeURLs):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::addSubresourceAttributeURLs):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSFontFaceSrcValue.cpp
Source/WebCore/css/CSSFontFaceSrcValue.h
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/CSSReflectValue.cpp
Source/WebCore/css/CSSReflectValue.h
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h
Source/WebCore/css/CSSValueList.cpp
Source/WebCore/css/CSSValueList.h
Source/WebCore/css/StyleProperties.cpp
Source/WebCore/css/StyleProperties.h
Source/WebCore/css/StyleRuleImport.h
Source/WebCore/css/StyleSheetContents.cpp
Source/WebCore/css/StyleSheetContents.h
Source/WebCore/dom/StyledElement.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLStyleElement.cpp