Changeset 222168 in webkit


Ignore:
Timestamp:
Sep 18, 2017 11:26:57 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Always update display: contents styles in RenderTreeUpdater.
https://bugs.webkit.org/show_bug.cgi?id=177065

Patch by Emilio Cobos Álvarez <emilio> on 2017-09-18
Reviewed by Antti Koivisto.

Source/WebCore:

Otherwise we keep an old style around, making following style updates wrong.

Test: fast/css/display-contents-style-update.html

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateElementRenderer):

LayoutTests:

  • fast/css/display-contents-style-update-expected.html: Added.
  • fast/css/display-contents-style-update.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r222167 r222168  
     12017-09-18  Emilio Cobos Álvarez  <emilio@crisal.io>
     2
     3        Always update display: contents styles in RenderTreeUpdater.
     4        https://bugs.webkit.org/show_bug.cgi?id=177065
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/css/display-contents-style-update-expected.html: Added.
     9        * fast/css/display-contents-style-update.html: Added.
     10
    1112017-09-18  Antti Koivisto  <antti@apple.com>
    212
  • trunk/LayoutTests/editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt

    r217599 r222168  
    11Pass.
    22WebKit didn't Crash.
    3 
  • trunk/Source/WebCore/ChangeLog

    r222167 r222168  
     12017-09-18  Emilio Cobos Álvarez  <emilio@crisal.io>
     2
     3        Always update display: contents styles in RenderTreeUpdater.
     4        https://bugs.webkit.org/show_bug.cgi?id=177065
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Otherwise we keep an old style around, making following style updates wrong.
     9
     10        Test: fast/css/display-contents-style-update.html
     11
     12        * style/RenderTreeUpdater.cpp:
     13        (WebCore::RenderTreeUpdater::updateElementRenderer):
     14
    1152017-09-18  Antti Koivisto  <antti@apple.com>
    216
  • trunk/Source/WebCore/style/RenderTreeUpdater.cpp

    r222129 r222168  
    315315
    316316    bool hasDisplayContents = update.style->display() == CONTENTS;
    317     if (hasDisplayContents != element.hasDisplayContents()) {
    318         if (!hasDisplayContents)
    319             element.resetComputedStyle();
    320         else
    321             element.storeDisplayContentsStyle(RenderStyle::clonePtr(*update.style));
    322     }
     317    if (hasDisplayContents)
     318        element.storeDisplayContentsStyle(RenderStyle::clonePtr(*update.style));
     319    else
     320        element.resetComputedStyle();
    323321
    324322    bool shouldCreateNewRenderer = !element.renderer() && !hasDisplayContents;
Note: See TracChangeset for help on using the changeset viewer.