Changeset 243444 in webkit


Ignore:
Timestamp:
Mar 25, 2019 11:27:55 AM (5 years ago)
Author:
Antti Koivisto
Message:

Toggling "display: contents" to "display: none" fails to hide the element
https://bugs.webkit.org/show_bug.cgi?id=188259
<rdar://problem/42886896>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/css/display-contents-to-none.html

  • style/StyleTreeResolver.cpp:

(WebCore::Style::affectsRenderedSubtree):

An element with 'display:contents' has a rendered subtree.

LayoutTests:

  • fast/css/display-contents-to-none-expected.html: Added.
  • fast/css/display-contents-to-none.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243440 r243444  
     12019-03-25  Antti Koivisto  <antti@apple.com>
     2
     3        Toggling "display: contents" to "display: none" fails to hide the element
     4        https://bugs.webkit.org/show_bug.cgi?id=188259
     5        <rdar://problem/42886896>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * fast/css/display-contents-to-none-expected.html: Added.
     10        * fast/css/display-contents-to-none.html: Added.
     11
    1122019-03-25  Diego Pino Garcia  <dpino@igalia.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r243438 r243444  
     12019-03-25  Antti Koivisto  <antti@apple.com>
     2
     3        Toggling "display: contents" to "display: none" fails to hide the element
     4        https://bugs.webkit.org/show_bug.cgi?id=188259
     5        <rdar://problem/42886896>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Test: fast/css/display-contents-to-none.html
     10
     11        * style/StyleTreeResolver.cpp:
     12        (WebCore::Style::affectsRenderedSubtree):
     13
     14        An element with 'display:contents' has a rendered subtree.
     15
    1162019-03-25  Justin Fan  <justin_fan@apple.com>
    217
  • trunk/Source/WebCore/style/StyleTreeResolver.cpp

    r242137 r243444  
    159159static bool affectsRenderedSubtree(Element& element, const RenderStyle& newStyle)
    160160{
    161     if (element.renderer())
    162         return true;
    163161    if (newStyle.display() != DisplayType::None)
     162        return true;
     163    if (element.renderOrDisplayContentsStyle())
    164164        return true;
    165165    if (element.rendererIsNeeded(newStyle))
Note: See TracChangeset for help on using the changeset viewer.