Changeset 205970 in webkit


Ignore:
Timestamp:
Sep 15, 2016 8:42:47 AM (8 years ago)
Author:
Alan Bujtas
Message:

Cleanup RenderLayer::shouldBeNormalFlowOnly
https://bugs.webkit.org/show_bug.cgi?id=161981

Reviewed by Simon Fraser.

Source/WebCore:

This patch changes the logic of figuring about if a particular layer is normal flow only by simply checking
if the layer creates a stacking context. If it does, we assume that it can't be a normal flow layer anymore.
This patch slightly changes behaviour by making layers with isolation and reflection to be non normal flow layers anymore.

Covered by existing testcases.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

Rebaselining.

  • fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205967 r205970  
     12016-09-15  Zalan Bujtas  <zalan@apple.com>
     2
     3        Cleanup RenderLayer::shouldBeNormalFlowOnly
     4        https://bugs.webkit.org/show_bug.cgi?id=161981
     5
     6        Reviewed by Simon Fraser.
     7
     8        Rebaselining.
     9
     10        * fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting-expected.txt:
     11
    1122016-09-15  Csaba Osztrogonác  <ossy@webkit.org>
    213
  • trunk/LayoutTests/fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting-expected.txt

    r196244 r205970  
    66layer at (8,8) size 70x60 clip at (18,18) size 50x40 scrollWidth 80
    77  RenderTable {DIV} at (0,0) size 70x60 [color=#008000] [border: (10px solid #000000)]
     8layer at (8,68) size 70x60 clip at (18,78) size 50x40 scrollWidth 80
     9  RenderTable {DIV} at (0,60) size 70x60 [color=#008000] [border: (10px solid #000000)]
     10layer at (8,128) size 70x60 clip at (18,138) size 50x40 scrollWidth 80
     11  RenderTable {DIV} at (0,120) size 70x60 [color=#008000] [border: (10px solid #000000)]
     12layer at (8,188) size 70x60 clip at (18,198) size 50x40 scrollWidth 80
     13  RenderTable {DIV} at (0,180) size 70x60 [color=#008000] [border: (10px solid #000000)]
     14layer at (8,248) size 70x60 clip at (18,258) size 50x40 scrollWidth 80
     15  RenderTable {DIV} at (0,240) size 70x60 [color=#008000] [border: (10px solid #000000)]
     16layer at (8,308) size 70x60 clip at (18,318) size 50x40 scrollWidth 80
     17  RenderTable {DIV} at (0,300) size 70x60 [color=#008000] [border: (10px solid #000000)]
     18layer at (8,368) size 70x60 clip at (18,378) size 50x40 scrollWidth 80
     19  RenderTable {DIV} at (0,360) size 70x60 [color=#008000] [border: (10px solid #000000)]
     20layer at (8,428) size 70x60 clip at (18,438) size 50x40 scrollWidth 80
     21  RenderTable {DIV} at (0,420) size 70x60 [color=#008000] [border: (10px solid #000000)]
     22layer at (8,488) size 70x60 clip at (18,498) size 50x40 scrollWidth 80
     23  RenderTable {DIV} at (0,480) size 70x60 [color=#008000] [border: (10px solid #000000)]
    824layer at (18,18) size 50x40
    925  RenderTableSection {DIV} at (10,10) size 50x40
     
    1329          RenderText {#text} at (10,10) size 70x10
    1430            text run at (10,10) width 70: "XXXXXXX"
    15 layer at (8,68) size 70x60 clip at (18,78) size 50x40 scrollWidth 80
    16   RenderTable {DIV} at (0,60) size 70x60 [color=#008000] [border: (10px solid #000000)]
    1731layer at (18,78) size 50x40
    1832  RenderTableSection {DIV} at (10,10) size 50x40
     
    2337      RenderText {#text} at (10,10) size 70x10
    2438        text run at (10,10) width 70: "XXXXXXX"
    25 layer at (8,128) size 70x60 clip at (18,138) size 50x40 scrollWidth 80
    26   RenderTable {DIV} at (0,120) size 70x60 [color=#008000] [border: (10px solid #000000)]
    2739layer at (18,138) size 50x40
    2840  RenderTableSection {DIV} at (10,10) size 50x40
     
    3345      RenderText {#text} at (10,10) size 70x10
    3446        text run at (10,10) width 70: "XXXXXXX"
    35 layer at (8,188) size 70x60 clip at (18,198) size 50x40 scrollWidth 80
    36   RenderTable {DIV} at (0,180) size 70x60 [color=#008000] [border: (10px solid #000000)]
    3747layer at (18,198) size 50x40
    3848  RenderTableSection {DIV} at (10,10) size 50x40
     
    4252          RenderText {#text} at (10,10) size 70x10
    4353            text run at (10,10) width 70: "XXXXXXX"
    44 layer at (8,248) size 70x60 clip at (18,258) size 50x40 scrollWidth 80
    45   RenderTable {DIV} at (0,240) size 70x60 [color=#008000] [border: (10px solid #000000)]
    4654layer at (18,258) size 50x40
    4755  RenderTableSection {DIV} at (10,10) size 50x40
     
    5260    RenderText {#text} at (10,10) size 70x10
    5361      text run at (10,10) width 70: "XXXXXXX"
    54 layer at (8,308) size 70x60 clip at (18,318) size 50x40 scrollWidth 80
    55   RenderTable {DIV} at (0,300) size 70x60 [color=#008000] [border: (10px solid #000000)]
    5662layer at (18,318) size 50x40
    5763  RenderTableSection {DIV} at (10,10) size 50x40
     
    6369    RenderText {#text} at (10,10) size 70x10
    6470      text run at (10,10) width 70: "XXXXXXX"
    65 layer at (8,368) size 70x60 clip at (18,378) size 50x40 scrollWidth 80
    66   RenderTable {DIV} at (0,360) size 70x60 [color=#008000] [border: (10px solid #000000)]
    6771layer at (18,378) size 50x40
    6872  RenderTableSection {DIV} at (10,10) size 50x40
     
    7377      RenderText {#text} at (10,10) size 70x10
    7478        text run at (10,10) width 70: "XXXXXXX"
    75 layer at (8,428) size 70x60 clip at (18,438) size 50x40 scrollWidth 80
    76   RenderTable {DIV} at (0,420) size 70x60 [color=#008000] [border: (10px solid #000000)]
    7779layer at (18,438) size 50x40
    7880  RenderTableSection {DIV} at (10,10) size 50x40
     
    8385      RenderText {#text} at (10,10) size 70x10
    8486        text run at (10,10) width 70: "XXXXXXX"
    85 layer at (8,488) size 70x60 clip at (18,498) size 50x40 scrollWidth 80
    86   RenderTable {DIV} at (0,480) size 70x60 [color=#008000] [border: (10px solid #000000)]
    8787layer at (18,498) size 50x40
    8888  RenderTableSection {DIV} at (10,10) size 50x40
  • trunk/LayoutTests/platform/ios-simulator/media/audio-repaint-expected.txt

    r203927 r205970  
    1313        RenderBR {BR} at (260,103) size 0x0
    1414        RenderBR {BR} at (260,196) size 0x0
     15layer at (8,44) size 260x39 scrollHeight 89
     16  RenderFlexibleBox {DIV} at (0,0) size 260x39
     17layer at (8,44) size 260x39
     18  RenderBlock (positioned) {DIV} at (0,0) size 260x39
     19layer at (8,44) size 260x39
     20  RenderFlexibleBox {DIV} at (0,0) size 260x39 [bgcolor=#D4D4D4]
     21layer at (12,44) size 42x39 blendMode: plus-darker
     22  RenderButton {BUTTON} at (4,0) size 42x39 [bgcolor=#000000]
    1523layer at (8,83) size 260x39 isolatesBlending
    1624  RenderMedia {AUDIO} at (0,39) size 260x39
     
    2230  RenderFlexibleBox {DIV} at (0,0) size 260x39 [bgcolor=#D4D4D4]
    2331layer at (12,83) size 42x39 blendMode: plus-darker
    24   RenderButton {BUTTON} at (4,0) size 42x39 [bgcolor=#000000]
    25 layer at (8,44) size 260x39 scrollHeight 89
    26   RenderFlexibleBox {DIV} at (0,0) size 260x39
    27 layer at (8,44) size 260x39
    28   RenderBlock (positioned) {DIV} at (0,0) size 260x39
    29 layer at (8,44) size 260x39
    30   RenderFlexibleBox {DIV} at (0,0) size 260x39 [bgcolor=#D4D4D4]
    31 layer at (12,44) size 42x39 blendMode: plus-darker
    3232  RenderButton {BUTTON} at (4,0) size 42x39 [bgcolor=#000000]
    3333layer at (8,174) size 260x39 isolatesBlending
  • trunk/Source/WebCore/ChangeLog

    r205966 r205970  
     12016-09-15  Zalan Bujtas  <zalan@apple.com>
     2
     3        Cleanup RenderLayer::shouldBeNormalFlowOnly
     4        https://bugs.webkit.org/show_bug.cgi?id=161981
     5
     6        Reviewed by Simon Fraser.
     7
     8        This patch changes the logic of figuring about if a particular layer is normal flow only by simply checking
     9        if the layer creates a stacking context. If it does, we assume that it can't be a normal flow layer anymore.
     10        This patch slightly changes behaviour by making layers with isolation and reflection to be non normal flow layers anymore.   
     11
     12        Covered by existing testcases.
     13
     14        * rendering/RenderLayer.cpp:
     15        (WebCore::RenderLayer::calculateClipRects):
     16
    1172016-09-07  Sergio Villar Senin  <svillar@igalia.com>
    218
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r205551 r205970  
    64786478}
    64796479
     6480static bool createsStackingContext(const RenderLayer& layer)
     6481{
     6482    auto& renderer = layer.renderer();
     6483    return renderer.hasTransformRelatedProperty()
     6484        || renderer.isPositioned()
     6485        || layer.needsCompositedScrolling()
     6486        || renderer.style().hasFlowFrom()
     6487        || renderer.hasReflection()
     6488        || renderer.style().hasIsolation()
     6489#if PLATFORM(IOS)
     6490        || layer.hasAcceleratedTouchScrolling()
     6491#endif
     6492        // FIXME: Check if willChange()->canCreateStackingContext() is more accurate here.
     6493        || mayCreateGraphicalGroup(renderer);
     6494}
     6495
    64806496bool RenderLayer::shouldBeNormalFlowOnly() const
    64816497{
    6482     return (renderer().hasOverflowClip()
    6483         || renderer().hasReflection()
    6484         || renderer().hasMask()
     6498    if (createsStackingContext(*this))
     6499        return false;
     6500
     6501    return renderer().hasOverflowClip()
    64856502        || renderer().isCanvas()
    64866503        || renderer().isVideo()
     
    64886505        || renderer().isRenderIFrame()
    64896506        || (renderer().style().specifiesColumns() && !isRootLayer())
    6490         || renderer().isInFlowRenderFlowThread())
    6491         && !renderer().hasTransformRelatedProperty()
    6492         && !renderer().isPositioned()
    6493         && !needsCompositedScrolling()
    6494         && !renderer().style().hasFlowFrom()
    6495 #if PLATFORM(IOS)
    6496         && !hasAcceleratedTouchScrolling()
    6497 #endif
    6498         && !mayCreateGraphicalGroup(renderer());
     6507        || renderer().isInFlowRenderFlowThread();
    64996508}
    65006509
    65016510bool RenderLayer::shouldBeSelfPaintingLayer() const
    65026511{
    6503     return !isNormalFlowOnly()
    6504         || hasOverlayScrollbars()
     6512    if (!isNormalFlowOnly())
     6513        return true;
     6514
     6515    return hasOverlayScrollbars()
    65056516        || needsCompositedScrolling()
    6506         || isolatesBlending()
    6507         || renderer().hasReflection()
    6508         || renderer().hasMask()
    65096517        || renderer().isTableRow()
    65106518        || renderer().isCanvas()
Note: See TracChangeset for help on using the changeset viewer.