Changeset 158184 in webkit


Ignore:
Timestamp:
Oct 29, 2013 1:23:57 AM (10 years ago)
Author:
mihnea@adobe.com
Message:

[CSSRegions] Display anonymous regions in DRT
https://bugs.webkit.org/show_bug.cgi?id=122963

Reviewed by Alexandru Chiculita.

After https://bugs.webkit.org/show_bug.cgi?id=119135, css regions are modelled using an anonymous
RenderNamedFlowFragment object inside the block having a valid -webkit-flow-from.
This patch changes the way elements | pseudo-elements with -webkit-flow-from are displayed
in test dumps.

Source/WebCore:

Before:

RenderRegion {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]

After:

RenderBlock (positioned) {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]

RenderNamedFlowFragment at (1,1) size 50x50

Before:

Flow Threads

Thread with flow-name 'article'
Regions for flow 'article'

RenderRegion {DIV} #region_1
RenderRegion {DIV} #region_2

After:

Named flows

Named flow 'article'
Regions for named flow 'article'

RenderNamedFlowFragment (anonymous child of {DIV::before} #region_1)
RenderNamedFlowFragment (anonymous child of {DIV} #region_2)

Changed existing tests based on the new dumps.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::renderName):

  • rendering/RenderNamedFlowFragment.h: Add a comment explaining the purpose of the class.
  • rendering/RenderRegion.h:
  • rendering/RenderTreeAsText.cpp:

(WebCore::write):
(WebCore::writeRenderRegionList): Adjust function to display info for anonymous regions too.
(WebCore::writeRenderNamedFlowThreads): Separate dump of valid and invalid regions for a named flow.

LayoutTests:

Changed expected files for mac port, removed expectations for gtk | efl and added [Missing]
in TestExpectations for these platforms. Results need to be generated again for the [Missing] lines.

  • fast/regions/auto-size/autoheight-regions-mark-expected.txt: Removed.
  • fast/regions/flows-dependency-dynamic-remove-expected.txt: Removed.
  • fast/regions/flows-dependency-same-flow-expected.txt: Removed.
  • platform/efl/TestExpectations:
  • platform/efl/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Removed.
  • platform/efl/fast/regions/region-dynamic-after-before-expected.txt: Removed.
  • platform/efl/fast/regions/region-generated-content-before-after-expected.txt: Removed.
  • platform/efl/fast/regions/text-region-split-small-pagination-expected.txt: Removed.
  • platform/efl/fast/regions/top-overflow-out-of-second-region-expected.txt: Removed.
  • platform/efl/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Removed.
  • platform/efl/fast/repaint/line-flow-with-floats-in-regions-expected.png: Removed.
  • platform/efl/fast/repaint/line-flow-with-floats-in-regions-expected.txt: Removed.
  • platform/efl/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.png: Removed.
  • platform/efl/fast/repaint/region-painting-invalidation-expected.txt: Removed.
  • platform/gtk/TestExpectations:
  • platform/gtk/fast/regions/flows-dependency-same-flow-expected.png: Removed.
  • platform/gtk/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Removed.
  • platform/gtk/fast/regions/region-dynamic-after-before-expected.txt: Removed.
  • platform/gtk/fast/regions/region-generated-content-before-after-expected.txt: Removed.
  • platform/gtk/fast/regions/text-region-split-small-pagination-expected.txt: Removed.
  • platform/gtk/fast/regions/top-overflow-out-of-second-region-expected.txt: Removed.
  • platform/gtk/fast/repaint/line-flow-with-floats-in-regions-expected.png: Removed.
  • platform/gtk/fast/repaint/line-flow-with-floats-in-regions-expected.txt: Removed.
  • platform/gtk/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.png: Removed.
  • platform/mac/fast/regions/auto-size/autoheight-regions-mark-expected.png: Copied from LayoutTests/fast/regions/flows-dependency-same-flow-expected.png.
  • platform/mac/fast/regions/auto-size/autoheight-regions-mark-expected.txt: Added.
  • platform/mac/fast/regions/autoheight-regions-mark-expected.png: Removed.
  • platform/mac/fast/regions/flows-dependency-dynamic-remove-expected.txt: Added.
  • platform/mac/fast/regions/flows-dependency-same-flow-expected.png: Copied from LayoutTests/fast/regions/flows-dependency-same-flow-expected.png.
  • platform/mac/fast/regions/flows-dependency-same-flow-expected.txt: Added.
  • platform/mac/fast/regions/iframe-html-collected-expected.png: Renamed from LayoutTests/fast/regions/flows-dependency-same-flow-expected.png.
  • platform/mac/fast/regions/iframe-html-collected-expected.txt: Renamed from LayoutTests/fast/regions/iframe-html-collected-expected.txt.
  • platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt:
  • platform/mac/fast/regions/region-dynamic-after-before-expected.txt:
  • platform/mac/fast/regions/region-generated-content-before-after-expected.txt:
  • platform/mac/fast/regions/text-region-split-small-pagination-expected.txt:
  • platform/mac/fast/regions/top-overflow-out-of-second-region-expected.txt:
  • platform/mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.png: Added.
  • platform/mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt:
  • platform/mac/fast/repaint/line-flow-with-floats-in-regions-expected.txt:
  • platform/mac/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.txt: Renamed from LayoutTests/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.txt.
  • platform/mac/fast/repaint/region-painting-invalidation-expected.txt:
  • platform/mac/fast/repaint/region-painting-via-layout-expected.txt: Renamed from LayoutTests/fast/repaint/region-painting-via-layout-expected.txt.
Location:
trunk
Files:
5 added
23 deleted
16 edited
2 copied
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r158177 r158184  
     12013-10-29  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Display anonymous regions in DRT
     4        https://bugs.webkit.org/show_bug.cgi?id=122963
     5
     6        Reviewed by Alexandru Chiculita.
     7
     8        After https://bugs.webkit.org/show_bug.cgi?id=119135, css regions are modelled using an anonymous
     9        RenderNamedFlowFragment object inside the block having a valid -webkit-flow-from.
     10        This patch changes the way elements | pseudo-elements with -webkit-flow-from are displayed
     11        in test dumps.
     12
     13        Changed expected files for mac port, removed expectations for gtk | efl and added [Missing]
     14        in TestExpectations for these platforms. Results need to be generated again for the [Missing] lines.
     15 
     16        * fast/regions/auto-size/autoheight-regions-mark-expected.txt: Removed.
     17        * fast/regions/flows-dependency-dynamic-remove-expected.txt: Removed.
     18        * fast/regions/flows-dependency-same-flow-expected.txt: Removed.
     19        * platform/efl/TestExpectations:
     20        * platform/efl/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Removed.
     21        * platform/efl/fast/regions/region-dynamic-after-before-expected.txt: Removed.
     22        * platform/efl/fast/regions/region-generated-content-before-after-expected.txt: Removed.
     23        * platform/efl/fast/regions/text-region-split-small-pagination-expected.txt: Removed.
     24        * platform/efl/fast/regions/top-overflow-out-of-second-region-expected.txt: Removed.
     25        * platform/efl/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Removed.
     26        * platform/efl/fast/repaint/line-flow-with-floats-in-regions-expected.png: Removed.
     27        * platform/efl/fast/repaint/line-flow-with-floats-in-regions-expected.txt: Removed.
     28        * platform/efl/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.png: Removed.
     29        * platform/efl/fast/repaint/region-painting-invalidation-expected.txt: Removed.
     30        * platform/gtk/TestExpectations:
     31        * platform/gtk/fast/regions/flows-dependency-same-flow-expected.png: Removed.
     32        * platform/gtk/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Removed.
     33        * platform/gtk/fast/regions/region-dynamic-after-before-expected.txt: Removed.
     34        * platform/gtk/fast/regions/region-generated-content-before-after-expected.txt: Removed.
     35        * platform/gtk/fast/regions/text-region-split-small-pagination-expected.txt: Removed.
     36        * platform/gtk/fast/regions/top-overflow-out-of-second-region-expected.txt: Removed.
     37        * platform/gtk/fast/repaint/line-flow-with-floats-in-regions-expected.png: Removed.
     38        * platform/gtk/fast/repaint/line-flow-with-floats-in-regions-expected.txt: Removed.
     39        * platform/gtk/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.png: Removed.
     40        * platform/mac/fast/regions/auto-size/autoheight-regions-mark-expected.png: Copied from LayoutTests/fast/regions/flows-dependency-same-flow-expected.png.
     41        * platform/mac/fast/regions/auto-size/autoheight-regions-mark-expected.txt: Added.
     42        * platform/mac/fast/regions/autoheight-regions-mark-expected.png: Removed.
     43        * platform/mac/fast/regions/flows-dependency-dynamic-remove-expected.txt: Added.
     44        * platform/mac/fast/regions/flows-dependency-same-flow-expected.png: Copied from LayoutTests/fast/regions/flows-dependency-same-flow-expected.png.
     45        * platform/mac/fast/regions/flows-dependency-same-flow-expected.txt: Added.
     46        * platform/mac/fast/regions/iframe-html-collected-expected.png: Renamed from LayoutTests/fast/regions/flows-dependency-same-flow-expected.png.
     47        * platform/mac/fast/regions/iframe-html-collected-expected.txt: Renamed from LayoutTests/fast/regions/iframe-html-collected-expected.txt.
     48        * platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt:
     49        * platform/mac/fast/regions/region-dynamic-after-before-expected.txt:
     50        * platform/mac/fast/regions/region-generated-content-before-after-expected.txt:
     51        * platform/mac/fast/regions/text-region-split-small-pagination-expected.txt:
     52        * platform/mac/fast/regions/top-overflow-out-of-second-region-expected.txt:
     53        * platform/mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.png: Added.
     54        * platform/mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt:
     55        * platform/mac/fast/repaint/line-flow-with-floats-in-regions-expected.txt:
     56        * platform/mac/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.txt: Renamed from LayoutTests/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.txt.
     57        * platform/mac/fast/repaint/region-painting-invalidation-expected.txt:
     58        * platform/mac/fast/repaint/region-painting-via-layout-expected.txt: Renamed from LayoutTests/fast/repaint/region-painting-via-layout-expected.txt.
     59
    1602013-10-28  Simon Fraser  <simon.fraser@apple.com>
    261
  • trunk/LayoutTests/platform/efl/TestExpectations

    r158106 r158184  
    15671567webkit.org/b/106405 http/tests/xmlhttprequest/failed-auth.html [ Failure ]
    15681568webkit.org/b/106405 http/tests/xmlhttprequest/remember-bad-password.html [ Failure ]
     1569
     1570webkit.org/b/122963 fast/regions/auto-size/autoheight-regions-mark.html [ Missing ]
     1571webkit.org/b/122963 fast/regions/flows-dependency-dynamic-remove.html [ Missing ]
     1572webkit.org/b/122963 fast/regions/flows-dependency-same-flow.html [ Missing ]
     1573webkit.org/b/122963 fast/regions/multiple-directionality-changes-in-variable-width-regions.html [ Missing ]
     1574webkit.org/b/122963 fast/regions/region-dynamic-after-before.html [ Missing ]
     1575webkit.org/b/122963 fast/regions/region-generated-content-before-after.html [ Missing ]
     1576webkit.org/b/122963 fast/regions/text-region-split-small-pagination.html [ Missing ]
     1577webkit.org/b/122963 fast/regions/top-overflow-out-of-second-region.html [ Missing ]
     1578
     1579webkit.org/b/122963 fast/repaint/japanese-rl-selection-repaint-in-regions.html [ Missing ]
     1580webkit.org/b/122963 fast/repaint/line-flow-with-floats-in-regions.html [ Missing ]
     1581webkit.org/b/122963 fast/repaint/overflow-flipped-writing-mode-block-in-regions.html [ Missing ]
     1582webkit.org/b/122963 fast/repaint/region-painting-invalidation.html [ Missing ]
     1583webkit.org/b/122963 fast/repaint/region-painting-via-layout.html [ Missing ]
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r158104 r158184  
    4343
    4444# Tests need new generated expected results
    45 webkit.org/b/121828 fast/repaint/japanese-rl-selection-repaint-in-regions.html [ Missing ]
    46 webkit.org/b/121828 fast/repaint/region-painting-invalidation.html [ Missing ]
    47 webkit.org/b/121828 fast/repaint/region-painting-via-layout.html [ Missing ]
     45webkit.org/b/122963 fast/regions/auto-size/autoheight-regions-mark.html [ Missing ]
     46webkit.org/b/122963 fast/regions/flows-dependency-dynamic-remove.html [ Missing ]
     47webkit.org/b/122963 fast/regions/flows-dependency-same-flow.html [ Missing ]
     48webkit.org/b/122963 fast/regions/multiple-directionality-changes-in-variable-width-regions.html [ Missing ]
     49webkit.org/b/122963 fast/regions/region-dynamic-after-before.html [ Missing ]
     50webkit.org/b/122963 fast/regions/region-generated-content-before-after.html [ Missing ]
     51webkit.org/b/122963 fast/regions/text-region-split-small-pagination.html [ Missing ]
     52webkit.org/b/122963 fast/regions/top-overflow-out-of-second-region.html [ Missing ]
     53
     54webkit.org/b/122963 fast/repaint/japanese-rl-selection-repaint-in-regions.html [ Missing ]
     55webkit.org/b/122963 fast/repaint/line-flow-with-floats-in-regions.html [ Missing ]
     56webkit.org/b/122963 fast/repaint/overflow-flipped-writing-mode-block-in-regions.html [ Missing ]
     57webkit.org/b/122963 fast/repaint/region-painting-invalidation.html [ Missing ]
     58webkit.org/b/122963 fast/repaint/region-painting-via-layout.html [ Missing ]
    4859
    4960#////////////////////////////////////////////////////////////////////////////////////////
  • trunk/LayoutTests/platform/mac/fast/regions/iframe-html-collected-expected.png

    • Property svn:mime-type set to image/png
  • trunk/LayoutTests/platform/mac/fast/regions/iframe-html-collected-expected.txt

    r158183 r158184  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 Flow Threads
    4   Thread with flow-name 'flow'
     3Named flows
     4  Named flow 'flow'
    55    layer at (0,0) size 0x600
    66      RenderBlock {HTML} at (0,0) size 0x600
  • trunk/LayoutTests/platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt

    r156767 r158184  
    66      RenderBlock {DIV} at (0,0) size 784x406
    77layer at (8,8) size 402x102
    8   RenderRegion {DIV} at (0,0) size 402x102 [border: (1px solid #000000)]
     8  RenderBlock {DIV} at (0,0) size 402x102 [border: (1px solid #000000)]
     9    RenderNamedFlowFragment at (1,1) size 400x100
    910layer at (8,110) size 502x182
    10   RenderRegion {DIV} at (0,102) size 502x182 [border: (1px solid #000000)]
     11  RenderBlock {DIV} at (0,102) size 502x182 [border: (1px solid #000000)]
     12    RenderNamedFlowFragment at (1,1) size 500x180
    1113layer at (8,292) size 202x122
    12   RenderRegion {DIV} at (0,284) size 202x122 [border: (1px solid #000000)]
    13 Flow Threads
    14   Thread with flow-name 'flow1'
     14  RenderBlock {DIV} at (0,284) size 202x122 [border: (1px solid #000000)]
     15    RenderNamedFlowFragment at (1,1) size 200x120
     16Named flows
     17  Named flow 'flow1'
    1518    layer at (0,0) size 500x400
    1619      RenderNamedFlowThread at (0,0) size 500x400
     
    3437                RenderText {#text} at (0,0) size 304x18
    3538                  text run at (0,0) width 304: "This line of text should not get out of the region."
    36   Regions for flow 'flow1'
    37     RenderRegion {DIV} #region1
    38     RenderRegion {DIV} #region2
    39     RenderRegion {DIV} #region3
     39    Regions for named flow 'flow1'
     40      RenderNamedFlowFragment (anonymous child of {DIV} #region1)
     41      RenderNamedFlowFragment (anonymous child of {DIV} #region2)
     42      RenderNamedFlowFragment (anonymous child of {DIV} #region3)
  • trunk/LayoutTests/platform/mac/fast/regions/region-dynamic-after-before-expected.txt

    r156767 r158184  
    55    RenderBody {BODY} at (8,8) size 784x112
    66layer at (8,8) size 80x112
    7   RenderRegion {DIV} at (0,0) size 80x112 [bgcolor=#D3D3D3]
     7  RenderBlock (relative positioned) {DIV} at (0,0) size 80x112 [bgcolor=#D3D3D3]
     8    RenderNamedFlowFragment at (0,16) size 80x96
    89layer at (8,8) size 67x18
    910  RenderBlock (positioned) at (0,0) size 67x18
     
    1415    RenderText at (0,0) size 56x18
    1516      text run at (0,0) width 56: "AFTER"
    16 Flow Threads
    17   Thread with flow-name 'namedFlow'
     17Named flows
     18  Named flow 'namedFlow'
    1819    layer at (0,0) size 80x96
    1920      RenderNamedFlowThread at (0,0) size 80x96
     
    2223            text run at (0,0) width 76: "some text to"
    2324            text run at (0,18) width 29: "flow"
    24   Regions for flow 'namedFlow'
    25     RenderRegion {DIV} #region
     25    Regions for named flow 'namedFlow'
     26      RenderNamedFlowFragment (anonymous child of {DIV} #region)
  • trunk/LayoutTests/platform/mac/fast/regions/region-generated-content-before-after-expected.txt

    r156767 r158184  
    55    RenderBody {BODY} at (8,8) size 784x112
    66layer at (8,8) size 80x112
    7   RenderRegion {DIV} at (0,0) size 80x112 [bgcolor=#D3D3D3]
     7  RenderBlock (relative positioned) {DIV} at (0,0) size 80x112 [bgcolor=#D3D3D3]
     8    RenderNamedFlowFragment at (0,16) size 80x96
    89layer at (8,8) size 67x18
    910  RenderBlock (positioned) at (0,0) size 67x18
     
    1415    RenderText at (0,0) size 56x18
    1516      text run at (0,0) width 56: "AFTER"
    16 Flow Threads
    17   Thread with flow-name 'namedFlow'
     17Named flows
     18  Named flow 'namedFlow'
    1819    layer at (0,0) size 80x96
    1920      RenderNamedFlowThread at (0,0) size 80x96
     
    2223            text run at (0,0) width 76: "some text to"
    2324            text run at (0,18) width 29: "flow"
    24   Regions for flow 'namedFlow'
    25     RenderRegion {DIV} #region
     25    Regions for named flow 'namedFlow'
     26      RenderNamedFlowFragment (anonymous child of {DIV} #region)
  • trunk/LayoutTests/platform/mac/fast/regions/text-region-split-small-pagination-expected.txt

    r156767 r158184  
    55    RenderBody {BODY} at (8,16) size 784x244
    66layer at (8,16) size 204x34
    7   RenderRegion {DIV} at (0,0) size 204x34 [border: (2px solid #000000)]
     7  RenderBlock {DIV} at (0,0) size 204x34 [border: (2px solid #000000)]
     8    RenderNamedFlowFragment at (2,2) size 200x30
    89layer at (8,66) size 204x54
    9   RenderRegion {DIV} at (0,50) size 204x54 [border: (2px solid #000000)]
     10  RenderBlock {DIV} at (0,50) size 204x54 [border: (2px solid #000000)]
     11    RenderNamedFlowFragment at (2,2) size 200x50
    1012layer at (8,136) size 204x54
    11   RenderRegion {DIV} at (0,120) size 204x54 [border: (2px solid #000000)]
     13  RenderBlock {DIV} at (0,120) size 204x54 [border: (2px solid #000000)]
     14    RenderNamedFlowFragment at (2,2) size 200x50
    1215layer at (8,206) size 204x54
    13   RenderRegion {DIV} at (0,190) size 204x54 [border: (2px solid #000000)]
    14 Flow Threads
    15   Thread with flow-name 'flow'
     16  RenderBlock {DIV} at (0,190) size 204x54 [border: (2px solid #000000)]
     17    RenderNamedFlowFragment at (2,2) size 200x50
     18Named flows
     19  Named flow 'flow'
    1620    layer at (0,0) size 200x180
    1721      RenderNamedFlowThread at (0,0) size 200x180
     
    3539                text run at (0,68) width 166: "should be nothing in this"
    3640                text run at (0,100) width 139: "region after this line."
    37   Regions for flow 'flow'
    38     RenderRegion {DIV} #region1
    39     RenderRegion {DIV} #region2
    40     RenderRegion {DIV} #region3
    41     RenderRegion {DIV} #region4
     41    Regions for named flow 'flow'
     42      RenderNamedFlowFragment (anonymous child of {DIV} #region1)
     43      RenderNamedFlowFragment (anonymous child of {DIV} #region2)
     44      RenderNamedFlowFragment (anonymous child of {DIV} #region3)
     45      RenderNamedFlowFragment (anonymous child of {DIV} #region4)
  • trunk/LayoutTests/platform/mac/fast/regions/top-overflow-out-of-second-region-expected.txt

    r156767 r158184  
    1212      RenderBlock {DIV} at (0,88) size 784x306
    1313layer at (8,104) size 302x102
    14   RenderRegion {DIV} at (0,0) size 302x102 [border: (1px solid #000000)]
     14  RenderBlock {DIV} at (0,0) size 302x102 [border: (1px solid #000000)]
     15    RenderNamedFlowFragment at (1,1) size 300x100
    1516layer at (8,206) size 402x202
    16   RenderRegion {DIV} at (0,102) size 402x202 [border: (1px solid #000000)]
     17  RenderBlock {DIV} at (0,102) size 402x202 [border: (1px solid #000000)]
     18    RenderNamedFlowFragment at (1,1) size 400x200
    1719layer at (8,408) size 2x2
    18   RenderRegion {DIV} at (0,304) size 2x2 [border: (1px solid #000000)]
    19 Flow Threads
    20   Thread with flow-name 'flow1'
     20  RenderBlock {DIV} at (0,304) size 2x2 [border: (1px solid #000000)]
     21    RenderNamedFlowFragment at (1,1) size 0x0
     22Named flows
     23  Named flow 'flow1'
    2124    layer at (0,0) size 400x300
    2225      RenderNamedFlowThread at (0,0) size 400x300
     
    3639                  text run at (0,36) width 112: "top of the second "
    3740                  text run at (112,36) width 44: "region."
    38   Regions for flow 'flow1'
    39     RenderRegion {DIV} #region1
    40     RenderRegion {DIV} #region2
    41     RenderRegion {DIV} #region3
     41    Regions for named flow 'flow1'
     42      RenderNamedFlowFragment (anonymous child of {DIV} #region1)
     43      RenderNamedFlowFragment (anonymous child of {DIV} #region2)
     44      RenderNamedFlowFragment (anonymous child of {DIV} #region3)
  • trunk/LayoutTests/platform/mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt

    r156767 r158184  
    55    RenderBody {BODY} at (18,18) size 10x564 [border: (5px solid #000000)]
    66layer at (296,100) size 404x404
    7   RenderRegion {DIV} at (100,100) size 404x404 [border: (2px solid #000000)]
    8 Flow Threads
    9   Thread with flow-name 'thread'
     7  RenderBlock (positioned) {DIV} at (100,100) size 404x404 [border: (2px solid #000000)]
     8    RenderNamedFlowFragment at (2,2) size 400x400
     9Named flows
     10  Named flow 'thread'
    1011    layer at (400,0) size 400x400
    1112      RenderNamedFlowThread at (0,0) size 400x400
     
    2627            text run at (302,0) width 367: "\x{307E}\x{3059}\x{304B} \x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}\x{3051}\x{3067}\x{306A}"
    2728            text run at (327,0) width 80: "\x{304F}\x{3001}\x{8A2A}\x{554F}"
    28   Regions for flow 'thread'
    29     RenderRegion {DIV}
     29    Regions for named flow 'thread'
     30      RenderNamedFlowFragment (anonymous child of {DIV})
    3031selection start: position 70 of child 0 {#text} of child 1 {DIV} of body
    3132selection end:   position 230 of child 0 {#text} of child 1 {DIV} of body
  • trunk/LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-in-regions-expected.txt

    r156767 r158184  
    55    RenderBody {BODY} at (0,0) size 800x600
    66layer at (100,0) size 500x600
    7   RenderRegion {DIV} at (100,0) size 500x600
    8 Flow Threads
    9   Thread with flow-name 'thread'
     7  RenderBlock (positioned) {DIV} at (100,0) size 500x600
     8    RenderNamedFlowFragment at (0,0) size 500x600
     9Named flows
     10  Named flow 'thread'
    1011    layer at (0,0) size 500x600
    1112      RenderNamedFlowThread at (0,0) size 500x600
     
    8586                    text run at (6,474) width 93: "here; the great "
    8687                    text run at (99,474) width 261: "wonder is, that there\x{2018}s any one left alive!\x{2019}"
    87   Regions for flow 'thread'
    88     RenderRegion {DIV}
     88    Regions for named flow 'thread'
     89      RenderNamedFlowFragment (anonymous child of {DIV})
  • trunk/LayoutTests/platform/mac/fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.txt

    r158183 r158184  
    55    RenderBody {BODY} at (8,8) size 784x584
    66layer at (100,100) size 104x404
    7   RenderRegion {DIV} at (100,100) size 104x404 [border: (2px solid #000000)]
    8 Flow Threads
    9   Thread with flow-name 'thread'
     7  RenderBlock (positioned) {DIV} at (100,100) size 104x404 [border: (2px solid #000000)]
     8    RenderNamedFlowFragment at (2,2) size 100x400
     9Named flows
     10  Named flow 'thread'
    1011    layer at (0,0) size 100x400
    1112      RenderNamedFlowThread at (0,0) size 100x400
     
    1415            RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#008000]
    1516        RenderBlock {DIV} at (0,0) size 100x50 [bgcolor=#FF0000]
    16   Regions for flow 'thread'
    17     RenderRegion {DIV}
     17    Regions for named flow 'thread'
     18      RenderNamedFlowFragment (anonymous child of {DIV})
  • trunk/LayoutTests/platform/mac/fast/repaint/region-painting-invalidation-expected.txt

    r156767 r158184  
    77        RenderBR {BR} at (0,0) size 0x18
    88layer at (8,8) size 302x152
    9   RenderRegion {DIV} at (0,0) size 302x152 [bgcolor=#FF0000] [border: (1px solid #000000)]
     9  RenderBlock {DIV} at (0,0) size 302x152 [bgcolor=#FF0000] [border: (1px solid #000000)]
     10    RenderNamedFlowFragment at (1,1) size 300x150
    1011layer at (8,178) size 302x202
    11   RenderRegion {DIV} at (0,170) size 302x202 [bgcolor=#FF0000] [border: (1px solid #000000)]
    12 Flow Threads
    13   Thread with flow-name 'flow1'
     12  RenderBlock {DIV} at (0,170) size 302x202 [bgcolor=#FF0000] [border: (1px solid #000000)]
     13    RenderNamedFlowFragment at (1,1) size 300x200
     14Named flows
     15  Named flow 'flow1'
    1416    layer at (0,0) size 300x350
    1517      RenderNamedFlowThread at (0,0) size 300x350
    1618        RenderBlock {DIV} at (0,0) size 300x350
    1719          RenderBlock {DIV} at (0,0) size 300x350 [bgcolor=#008000]
    18   Regions for flow 'flow1'
    19     RenderRegion {DIV} #region1
    20     RenderRegion {DIV} #region2
     20    Regions for named flow 'flow1'
     21      RenderNamedFlowFragment (anonymous child of {DIV} #region1)
     22      RenderNamedFlowFragment (anonymous child of {DIV} #region2)
  • trunk/LayoutTests/platform/mac/fast/repaint/region-painting-via-layout-expected.txt

    r158183 r158184  
    55    RenderBody {BODY} at (8,8) size 784x584
    66layer at (8,8) size 786x182
    7   RenderRegion {DIV} at (0,0) size 786x182 [bgcolor=#FF0000] [border: (1px solid #000000)]
    8 Flow Threads
    9   Thread with flow-name 'flow1'
     7  RenderBlock {DIV} at (0,0) size 786x182 [bgcolor=#FF0000] [border: (1px solid #000000)]
     8    RenderNamedFlowFragment at (1,1) size 784x180
     9Named flows
     10  Named flow 'flow1'
    1011    layer at (0,0) size 784x1180 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
    1112      RenderNamedFlowThread at (0,0) size 784x1180
     
    1415        RenderBlock {DIV} at (0,1000) size 784x200
    1516          RenderBlock {DIV} at (0,0) size 784x200 [bgcolor=#008000]
    16   Regions for flow 'flow1'
    17     RenderRegion {DIV} #region1
    18     RenderRegion {DIV} #region2
     17    Regions for named flow 'flow1'
     18      RenderNamedFlowFragment (anonymous child of {DIV} #region1)
     19      RenderNamedFlowFragment (anonymous child of {DIV} #region2)
  • trunk/Source/WebCore/ChangeLog

    r158183 r158184  
     12013-10-29  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Display anonymous regions in DRT
     4        https://bugs.webkit.org/show_bug.cgi?id=122963
     5
     6        Reviewed by Alexandru Chiculita.
     7
     8        After https://bugs.webkit.org/show_bug.cgi?id=119135, css regions are modelled using an anonymous
     9        RenderNamedFlowFragment object inside the block having a valid -webkit-flow-from.
     10        This patch changes the way elements | pseudo-elements with -webkit-flow-from are displayed
     11        in test dumps.
     12
     13        Before:
     14            RenderRegion {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]
     15        After:
     16            RenderBlock (positioned) {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]
     17                RenderNamedFlowFragment at (1,1) size 50x50
     18
     19        Before:
     20            Flow Threads
     21                Thread with flow-name 'article'
     22                Regions for flow 'article'
     23                    RenderRegion {DIV} #region_1
     24                    RenderRegion {DIV} #region_2
     25        After:
     26            Named flows
     27                Named flow 'article'
     28                Regions for named flow 'article'
     29                    RenderNamedFlowFragment (anonymous child of {DIV::before} #region_1)
     30                    RenderNamedFlowFragment (anonymous child of {DIV} #region_2)
     31
     32        Changed existing tests based on the new dumps.
     33
     34        * rendering/RenderBlock.cpp:
     35        (WebCore::RenderBlock::renderName):
     36        * rendering/RenderNamedFlowFragment.h: Add a comment explaining the purpose of the class.
     37        * rendering/RenderRegion.h:
     38        * rendering/RenderTreeAsText.cpp:
     39        (WebCore::write):
     40        (WebCore::writeRenderRegionList): Adjust function to display info for anonymous regions too.
     41        (WebCore::writeRenderNamedFlowThreads): Separate dump of valid and invalid regions for a named flow.
     42
    1432013-10-29  Zan Dobersek  <zdobersek@igalia.com>
    244
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r158163 r158184  
    52565256        return "RenderBody"; // FIXME: Temporary hack until we know that the regression tests pass.
    52575257
    5258     if (isRenderNamedFlowFragmentContainer())
    5259         return "RenderRegion";
    52605258    if (isFloating())
    52615259        return "RenderBlock (floating)";
  • trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h

    r158097 r158184  
    3838class RenderStyle;
    3939
     40// RenderNamedFlowFragment represents a region that is responsible for the fragmentation of
     41// the RenderNamedFlowThread content.
     42//
     43// A RenderNamedFlowFragment object is created as an anonymous child for a RenderBlockFlow object
     44// that has a valid -webkit-flow-from property.
     45//
     46// This allows a non-replaced block to behave like a region if needed, following the CSSRegions specification:
     47// http://dev.w3.org/csswg/css-regions/#the-flow-from-property.
     48// list-item, table-caption, table-cell can become regions in addition to block | inline-block.
     49
    4050class RenderNamedFlowFragment FINAL : public RenderRegion {
    4151public:
  • trunk/Source/WebCore/rendering/RenderRegion.h

    r158097 r158184  
    3636namespace WebCore {
    3737
    38 class Element;
    3938struct LayerFragment;
    4039typedef Vector<LayerFragment, 1> LayerFragments;
     40
     41class Element;
    4142class RenderBox;
    4243class RenderBoxRegionInfo;
  • trunk/Source/WebCore/rendering/RenderTreeAsText.cpp

    r158183 r158184  
    567567
    568568    } else {
    569         if (!toRenderElement(o).isRenderNamedFlowFragmentContainer()) {
    570             for (RenderObject* child = toRenderElement(o).firstChild(); child; child = child->nextSibling()) {
    571                 if (child->hasLayer())
    572                     continue;
    573                 write(ts, *child, indent + 1, behavior);
    574             }
     569        for (RenderObject* child = toRenderElement(o).firstChild(); child; child = child->nextSibling()) {
     570            if (child->hasLayer())
     571                continue;
     572            write(ts, *child, indent + 1, behavior);
    575573        }
    576574    }
     
    658656{
    659657    for (RenderRegionList::const_iterator itRR = flowThreadRegionList.begin(); itRR != flowThreadRegionList.end(); ++itRR) {
    660         RenderRegion* renderRegion = *itRR;
    661         writeIndent(ts, indent + 2);
    662         ts << "RenderRegion";
    663         if (renderRegion->generatingElement()) {
    664             String tagName = getTagName(renderRegion->generatingElement());
    665             if (!tagName.isEmpty())
    666                 ts << " {" << tagName << "}";
    667             if (renderRegion->generatingElement()->hasID())
    668                 ts << " #" << renderRegion->generatingElement()->idForStyleResolution();
     658        RenderRegion* renderRegion = (*itRR);
     659
     660        writeIndent(ts, indent);
     661        ts << static_cast<const RenderObject*>(renderRegion)->renderName();
     662
     663        Element* generatingElement = renderRegion->generatingElement();
     664        if (generatingElement) {
    669665            if (renderRegion->hasCustomRegionStyle())
    670666                ts << " region style: 1";
    671667            if (renderRegion->hasAutoLogicalHeight())
    672668                ts << " hasAutoLogicalHeight";
    673         }
    674         if (!renderRegion->isValid())
    675             ts << " invalid";
     669
     670            bool isRenderNamedFlowFragment = renderRegion->isRenderNamedFlowFragment();
     671            if (isRenderNamedFlowFragment)
     672                ts << " (anonymous child of";
     673
     674            StringBuilder tagName;
     675            tagName.append(generatingElement->nodeName());
     676
     677            RenderElement* renderElementForRegion = isRenderNamedFlowFragment ? renderRegion->parent() : renderRegion;
     678            if (renderElementForRegion->isPseudoElement()) {
     679                if (renderElementForRegion->element()->isBeforePseudoElement())
     680                    tagName.append("::before");
     681                else if (renderElementForRegion->element()->isAfterPseudoElement())
     682                    tagName.append("::after");
     683            }
     684
     685            ts << " {" << tagName.toString() << "}";
     686
     687            if (generatingElement->hasID())
     688                ts << " #" << generatingElement->idForStyleResolution();
     689
     690            if (isRenderNamedFlowFragment)
     691                ts << ")";
     692        }
     693
    676694        ts << "\n";
    677695    }
     
    679697
    680698static void writeRenderNamedFlowThreads(TextStream& ts, RenderView& renderView, const RenderLayer* rootLayer,
    681                         const LayoutRect& paintRect, int indent, RenderAsTextBehavior behavior)
     699    const LayoutRect& paintRect, int indent, RenderAsTextBehavior behavior)
    682700{
    683701    if (!renderView.hasRenderNamedFlowThreads())
     
    687705
    688706    writeIndent(ts, indent);
    689     ts << "Flow Threads\n";
     707    ts << "Named flows\n";
    690708
    691709    for (RenderNamedFlowThreadList::const_iterator iter = list->begin(); iter != list->end(); ++iter) {
     
    693711
    694712        writeIndent(ts, indent + 1);
    695         ts << "Thread with flow-name '" << renderFlowThread->flowThreadName() << "'\n";
     713        ts << "Named flow '" << renderFlowThread->flowThreadName() << "'\n";
    696714
    697715        RenderLayer* layer = renderFlowThread->layer();
     
    701719        const RenderRegionList& validRegionsList = renderFlowThread->renderRegionList();
    702720        const RenderRegionList& invalidRegionsList = renderFlowThread->invalidRenderRegionList();
    703         if (!validRegionsList.isEmpty() || !invalidRegionsList.isEmpty()) {
    704             writeIndent(ts, indent + 1);
    705             ts << "Regions for flow '"<< renderFlowThread->flowThreadName() << "'\n";
    706             writeRenderRegionList(validRegionsList, ts, indent);
    707             writeRenderRegionList(invalidRegionsList, ts, indent);
     721        if (!validRegionsList.isEmpty()) {
     722            writeIndent(ts, indent + 2);
     723            ts << "Regions for named flow '" << renderFlowThread->flowThreadName() << "'\n";
     724            writeRenderRegionList(validRegionsList, ts, indent + 3);
     725        }
     726        if (!invalidRegionsList.isEmpty()) {
     727            writeIndent(ts, indent + 2);
     728            ts << "Invalid regions for named flow '" << renderFlowThread->flowThreadName() << "'\n";
     729            writeRenderRegionList(invalidRegionsList, ts, indent + 3);
    708730        }
    709731    }
Note: See TracChangeset for help on using the changeset viewer.