Crash in StyleResolver::invalidateMatchedPropertiesCache() when using content extensions.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Apr 2015 17:14:33 +0000 (17:14 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Apr 2015 17:14:33 +0000 (17:14 +0000)
commit6d0bd1b74f9a99bf88b911a2fcc8713d6ec415a0
tree9cc077bf97a38891efbfe38a2f1c59a3308e1d34
parentc31d73be8564d110ab10e70c12cc5d2539308bd7
Crash in StyleResolver::invalidateMatchedPropertiesCache() when using content extensions.
<rdar://problem/20554405> and https://bugs.webkit.org/show_bug.cgi?id=143892

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/contentextensions/style-resolver-changed-reentrancy.html

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::addContentExtensionUserSheet): Call styleResolverChanged on a delay.
(WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet): Ditto.
(WebCore::DocumentStyleSheetCollection::styleResolverChangedTimerFired):
* dom/DocumentStyleSheetCollection.h:

LayoutTests:

* http/tests/contentextensions/resources/woff-stylesheet.css: Added.
(@font-face):
* http/tests/contentextensions/style-resolver-changed-reentrancy-expected.txt: Added.
* http/tests/contentextensions/style-resolver-changed-reentrancy.html: Added.
* http/tests/contentextensions/style-resolver-changed-reentrancy.html.json: Added.
* http/tests/resources/Ahem.woff: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/contentextensions/resources/woff-stylesheet.css [new file with mode: 0644]
LayoutTests/http/tests/contentextensions/style-resolver-changed-reentrancy-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/contentextensions/style-resolver-changed-reentrancy.html [new file with mode: 0644]
LayoutTests/http/tests/contentextensions/style-resolver-changed-reentrancy.html.json [new file with mode: 0644]
LayoutTests/http/tests/resources/Ahem.woff [new file with mode: 0644]
LayoutTests/platform/mac/http/tests/contentextensions/css-display-none-expected.png [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
Source/WebCore/dom/DocumentStyleSheetCollection.cpp
Source/WebCore/dom/DocumentStyleSheetCollection.h