Blank page except for inner iframes because pending stylesheets cause style.isNotFina...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jan 2018 19:27:34 +0000 (19:27 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jan 2018 19:27:34 +0000 (19:27 +0000)
commit13023c0b7a2cd3c4bc8f87c3d486379dff38ab78
tree44fd003dcee65301e9cb24262ba311448dc9d813
parent00c018935a7f3a015fa89be841395f9db1d459c5
Blank page except for inner iframes because pending stylesheets cause style.isNotFinal() to be true
https://bugs.webkit.org/show_bug.cgi?id=180940
<rdar://problem/36116507>

Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/local/loading-stylesheet-import-remove.html

If a <link> referencing a stylesheet containing an @import that was still loading was removed
from the document, the loading state was never cleared. For head stylesheets this blocked
rendering permanently.

Test reduction by Justin Ridgewell.

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::removedFromAncestor):

Test if the stylesheet it loading before clearing the pointer.

LayoutTests:

* http/tests/local/loading-stylesheet-import-remove.html: Added.
* http/tests/local/loading-stylesheet-import-remove-expected.html: Added.
* http/tests/local/resources/slow-import.css: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/local/loading-stylesheet-import-remove-expected.html [new file with mode: 0644]
LayoutTests/http/tests/local/loading-stylesheet-import-remove.html [new file with mode: 0644]
LayoutTests/http/tests/local/resources/slow-import.css [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLLinkElement.cpp