Changeset 201332 in webkit


Ignore:
Timestamp:
May 24, 2016 9:46:44 AM (8 years ago)
Author:
Antti Koivisto
Message:

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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r201331 r201332  
     12016-05-24  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r196629): Safari can get into a state where switching Reader theme doesn't apply to the webpage
     4        https://bugs.webkit.org/show_bug.cgi?id=158018
     5        <rdar://problem/24732776>
     6
     7        Reviewed by Darin Adler.
     8
     9        When a tab goes to background we clear the style resolver. It is recreated lazily when the tab is again active.
     10        However style invalidation code tests if the style resolver exists and skips the invalidation if it doesn't.
     11        With sufficiently simple document (like in Reader) we may never create one for other reasons and so style
     12        invalidation doesn't work.
     13
     14        No test, don't know how to make one.
     15
     16        * dom/Element.cpp:
     17        (WebCore::Element::needsStyleInvalidation):
     18
     19            Remove styleResolverIfExists() check and do the invalidation normally.
     20            Instead check for forced style recalc. If there is one pending we don't need to bother with invalidation.
     21
    1222016-05-24  Yusuke Suzuki  <utatane.tea@gmail.com>
    223
  • trunk/Source/WebCore/dom/Element.cpp

    r201205 r201332  
    25282528    if (styleChangeType() >= FullStyleChange)
    25292529        return false;
    2530     if (!document().styleResolverIfExists())
     2530    if (document().hasPendingForcedStyleRecalc())
    25312531        return false;
    25322532
Note: See TracChangeset for help on using the changeset viewer.