REGRESSION (r196629): Safari can get into a state where switching Reader theme doesn...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2016 16:46:44 +0000 (16:46 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2016 16:46:44 +0000 (16:46 +0000)
commit998bdeb030568966f43d44139d644ce7476daba3
tree23192906a0aef2aa67c0e03a13a9e7d697191d2d
parent9a21c6b141d3de7f26b6e2a4d29a4ee16a8196ab
REGRESSION (r196629): Safari can get into a state where switching Reader theme doesn't apply to the webpage
https://bugs.webkit.org/show_bug.cgi?id=158018
<rdar://problem/24732776>

Reviewed by Darin Adler.

When a tab goes to background we clear the style resolver. It is recreated lazily when the tab is again active.
However style invalidation code tests if the style resolver exists and skips the invalidation if it doesn't.
With sufficiently simple document (like in Reader) we may never create one for other reasons and so style
invalidation doesn't work.

No test, don't know how to make one.

* dom/Element.cpp:
(WebCore::Element::needsStyleInvalidation):

    Remove styleResolverIfExists() check and do the invalidation normally.
    Instead check for forced style recalc. If there is one pending we don't need to bother with invalidation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@201332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp