Changeset 166525 in webkit


Ignore:
Timestamp:
Mar 31, 2014 2:06:48 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Blending] showLayerTree should dump layer's blend mode and isolation properties
https://bugs.webkit.org/show_bug.cgi?id=130922

Patch by Ion Rosca <Ion Rosca> on 2014-03-31
Reviewed by Simon Fraser.

Source/WebCore:

This change only updates existing tests involving blending. No new test required,
as there is no new or changed functionality.

  • rendering/RenderLayer.h: adding blendMode() getter.
  • rendering/RenderTreeAsText.cpp:

(WebCore::write):
adding blendMode property and layer's isolation status (does layer isolate blending descendants or not?).

LayoutTests:

Tests are adapted after adding blending information to RenderTreeAsText.

  • platform/mac/css3/compositing/blend-mode-background-expected.txt:
  • platform/mac/css3/compositing/blend-mode-isolated-group-1-expected.txt:
  • platform/mac/css3/compositing/blend-mode-isolated-group-2-expected.txt:
  • platform/mac/css3/compositing/blend-mode-isolated-group-3-expected.txt:
  • platform/mac/css3/compositing/blend-mode-layers-expected.txt:
  • platform/mac/css3/compositing/blend-mode-reflection-expected.txt:
  • platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt:
  • platform/mac/css3/compositing/blend-mode-simple-expected.txt:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166513 r166525  
     12014-03-31  Ion Rosca  <rosca@adobe.com>
     2
     3        [CSS Blending] showLayerTree should dump layer's blend mode and isolation properties
     4        https://bugs.webkit.org/show_bug.cgi?id=130922
     5
     6        Reviewed by Simon Fraser.
     7
     8        Tests are adapted after adding blending information to RenderTreeAsText.
     9
     10        * platform/mac/css3/compositing/blend-mode-background-expected.txt:
     11        * platform/mac/css3/compositing/blend-mode-isolated-group-1-expected.txt:
     12        * platform/mac/css3/compositing/blend-mode-isolated-group-2-expected.txt:
     13        * platform/mac/css3/compositing/blend-mode-isolated-group-3-expected.txt:
     14        * platform/mac/css3/compositing/blend-mode-layers-expected.txt:
     15        * platform/mac/css3/compositing/blend-mode-reflection-expected.txt:
     16        * platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt:
     17        * platform/mac/css3/compositing/blend-mode-simple-expected.txt:
     18
    1192014-03-31  Samuel White  <samuel_white@apple.com>
    220
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-background-expected.txt

    r165970 r166525  
    44  RenderBlock {HTML} at (0,0) size 800x100
    55    RenderBody {BODY} at (8,20) size 784x60 [bgcolor=#0000FF]
    6 layer at (28,20) size 60x60
     6layer at (28,20) size 60x60 blendMode: difference
    77  RenderBlock {DIV} at (20,0) size 60x60 [bgcolor=#FF0000]
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-isolated-group-1-expected.txt

    r164579 r166525  
    44  RenderBlock {HTML} at (0,0) size 800x108
    55    RenderBody {BODY} at (8,8) size 784x0 [bgcolor=#0000FF]
    6 layer at (28,28) size 60x60
     6layer at (28,28) size 60x60 isolatesBlending
    77  RenderBlock (floating) {DIV} at (20,20) size 60x60 [bgcolor=#EE82EE]
    8 layer at (48,48) size 60x60
     8layer at (48,48) size 60x60 blendMode: multiply
    99  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    1010layer at (128,28) size 60x60
    1111  RenderBlock (floating) {DIV} at (120,20) size 60x60 [bgcolor=#EE82EE]
    12 layer at (148,48) size 60x60
     12layer at (148,48) size 60x60 blendMode: multiply
    1313  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    1414layer at (228,28) size 60x60
    1515  RenderBlock (floating) {DIV} at (220,20) size 60x60 [bgcolor=#EE82EE]
    16 layer at (248,48) size 60x60
     16layer at (248,48) size 60x60 blendMode: multiply
    1717  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    1818layer at (328,28) size 60x60
    1919  RenderBlock (floating) {DIV} at (320,20) size 60x60 [bgcolor=#EE82EE]
    20 layer at (348,48) size 60x60
     20layer at (348,48) size 60x60 blendMode: multiply
    2121  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-isolated-group-2-expected.txt

    r164579 r166525  
    44  RenderBlock {HTML} at (0,0) size 800x108
    55    RenderBody {BODY} at (8,8) size 784x0 [bgcolor=#0000FF]
    6 layer at (28,28) size 60x60
     6layer at (28,28) size 60x60 isolatesBlending
    77  RenderBlock (floating) {DIV} at (20,20) size 60x60 [bgcolor=#EE82EE]
    8 layer at (48,48) size 60x60
     8layer at (48,48) size 60x60 blendMode: multiply
    99  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    1010layer at (128,28) size 60x60
    1111  RenderBlock (floating) {DIV} at (120,20) size 60x60 [bgcolor=#EE82EE]
    12 layer at (148,48) size 60x60
     12layer at (148,48) size 60x60 blendMode: multiply
    1313  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    1414layer at (228,28) size 60x60
    1515  RenderBlock (floating) {DIV} at (220,20) size 60x60 [bgcolor=#EE82EE]
    16 layer at (248,48) size 60x60
     16layer at (248,48) size 60x60 blendMode: multiply
    1717  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    1818layer at (328,28) size 60x60
    1919  RenderBlock (floating) {DIV} at (320,20) size 60x60 [bgcolor=#EE82EE]
    20 layer at (348,48) size 60x60
     20layer at (348,48) size 60x60 blendMode: multiply
    2121  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-isolated-group-3-expected.txt

    r164579 r166525  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x208 layerType: background only
    4 layer at (28,28) size 60x60
     4layer at (28,28) size 60x60 isolatesBlending
    55  RenderBlock (floating) zI: -1 {DIV} at (20,20) size 60x60 [bgcolor=#EE82EE]
    6 layer at (48,48) size 60x60
     6layer at (48,48) size 60x60 blendMode: multiply
    77  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    88layer at (68,68) size 60x60
     
    1010layer at (128,28) size 60x60
    1111  RenderBlock (floating) zI: -1 {DIV} at (120,20) size 60x60 [bgcolor=#EE82EE]
    12 layer at (148,48) size 60x60
     12layer at (148,48) size 60x60 blendMode: multiply
    1313  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    1414layer at (168,68) size 60x60
     
    1616layer at (228,28) size 60x60
    1717  RenderBlock (floating) zI: -1 {DIV} at (220,20) size 60x60 [bgcolor=#EE82EE]
    18 layer at (248,48) size 60x60
     18layer at (248,48) size 60x60 blendMode: multiply
    1919  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    2020layer at (268,68) size 60x60
     
    2222layer at (328,28) size 60x60
    2323  RenderBlock (floating) zI: -1 {DIV} at (320,20) size 60x60 [bgcolor=#EE82EE]
    24 layer at (348,48) size 60x60
     24layer at (348,48) size 60x60 blendMode: multiply
    2525  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    2626layer at (368,68) size 60x60
    2727  RenderBlock (positioned) {DIV} at (20,20) size 60x60 [bgcolor=#FFA500]
    28 layer at (428,28) size 60x60
     28layer at (428,28) size 60x60 isolatesBlending
    2929  RenderBlock (floating) zI: -1 {DIV} at (420,20) size 60x60 [bgcolor=#EE82EE]
    30 layer at (448,48) size 60x60
     30layer at (448,48) size 60x60 blendMode: multiply
    3131  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    3232layer at (468,68) size 60x60
     
    3434layer at (528,28) size 60x60
    3535  RenderBlock (floating) zI: -1 {DIV} at (520,20) size 60x60 [bgcolor=#EE82EE]
    36 layer at (548,48) size 60x60
     36layer at (548,48) size 60x60 blendMode: multiply
    3737  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    3838layer at (568,68) size 60x60
     
    4040layer at (628,28) size 60x60
    4141  RenderBlock (floating) zI: -1 {DIV} at (620,20) size 60x60 [bgcolor=#EE82EE]
    42 layer at (648,48) size 60x60
     42layer at (648,48) size 60x60 blendMode: multiply
    4343  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    4444layer at (668,68) size 60x60
     
    4646layer at (28,128) size 60x60
    4747  RenderBlock (floating) zI: -1 {DIV} at (20,120) size 60x60 [bgcolor=#EE82EE]
    48 layer at (48,148) size 60x60
     48layer at (48,148) size 60x60 blendMode: multiply
    4949  RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000]
    5050layer at (68,168) size 60x60
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-layers-expected.txt

    r163955 r166525  
    1818layer at (53,41) size 80x150
    1919  RenderBlock (relative positioned) {DIV} at (0,0) size 80x150 [bgcolor=#FFFF00]
    20 layer at (243,31) size 160x160
     20layer at (243,31) size 160x160 blendMode: multiply
    2121  RenderBlock (relative positioned) {DIV} at (0,0) size 160x160
    2222layer at (223,41) size 80x150
    2323  RenderBlock (relative positioned) {DIV} at (0,0) size 80x150 [bgcolor=#FFFF00]
    24 layer at (413,31) size 160x160
     24layer at (413,31) size 160x160 blendMode: multiply
    2525  RenderBlock (relative positioned) {DIV} at (0,0) size 160x160
    2626layer at (393,41) size 80x150
     
    3232layer at (563,41) size 80x150
    3333  RenderBlock (relative positioned) {DIV} at (0,0) size 80x150 [bgcolor=#FFFF00]
    34 layer at (53,246) size 160x75
     34layer at (53,246) size 160x75 isolatesBlending
    3535  RenderBlock {DIV} at (0,50) size 160x75 [bgcolor=#00FFFF]
    36 layer at (73,206) size 160x160
     36layer at (73,206) size 160x160 blendMode: multiply
    3737  RenderBlock (relative positioned) {DIV} at (0,0) size 160x160
    3838layer at (53,216) size 80x150
     
    4040layer at (223,246) size 160x75
    4141  RenderBlock {DIV} at (0,50) size 160x75 [bgcolor=#00FFFF]
    42 layer at (243,206) size 160x160
     42layer at (243,206) size 160x160 blendMode: multiply
    4343  RenderBlock (relative positioned) {DIV} at (0,0) size 160x160
    4444layer at (223,216) size 80x150
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-reflection-expected.txt

    r163955 r166525  
    88      RenderBlock {UL} at (0,0) size 784x0
    99        RenderBlock (floating) {LI} at (185,5) size 130x260
    10 layer at (53,21) size 130x130
     10layer at (53,21) size 130x130 blendMode: multiply
    1111  RenderImage {IMG} at (0,0) size 130x130
    12 layer at (193,21) size 130x130
     12layer at (193,21) size 130x130 blendMode: multiply
    1313  RenderImage {IMG} at (0,0) size 130x130
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt

    r163955 r166525  
    2323layer at (53,21) size 130x130
    2424  RenderImage {IMG} at (0,0) size 130x130
    25 layer at (193,21) size 130x130
     25layer at (193,21) size 130x130 blendMode: overlay
    2626  RenderImage {IMG} at (0,0) size 130x130
    27 layer at (333,21) size 130x130
     27layer at (333,21) size 130x130 blendMode: screen
    2828  RenderImage {IMG} at (0,0) size 130x130
    29 layer at (473,21) size 130x130
     29layer at (473,21) size 130x130 blendMode: overlay
    3030  RenderImage {IMG} at (0,0) size 130x130
    31 layer at (613,21) size 130x130
     31layer at (613,21) size 130x130 blendMode: darken
    3232  RenderImage {IMG} at (0,0) size 130x130
    33 layer at (53,161) size 130x130
     33layer at (53,161) size 130x130 blendMode: lighten
    3434  RenderImage {IMG} at (0,0) size 130x130
    35 layer at (193,161) size 130x130
     35layer at (193,161) size 130x130 blendMode: color-dodge
    3636  RenderImage {IMG} at (0,0) size 130x130
    37 layer at (333,161) size 130x130
     37layer at (333,161) size 130x130 blendMode: color-burn
    3838  RenderImage {IMG} at (0,0) size 130x130
    39 layer at (473,161) size 130x130
     39layer at (473,161) size 130x130 blendMode: hard-light
    4040  RenderImage {IMG} at (0,0) size 130x130
    41 layer at (613,161) size 130x130
     41layer at (613,161) size 130x130 blendMode: soft-light
    4242  RenderImage {IMG} at (0,0) size 130x130
    43 layer at (53,301) size 130x130
     43layer at (53,301) size 130x130 blendMode: difference
    4444  RenderImage {IMG} at (0,0) size 130x130
    45 layer at (193,301) size 130x130
     45layer at (193,301) size 130x130 blendMode: exclusion
    4646  RenderImage {IMG} at (0,0) size 130x130
    47 layer at (333,301) size 130x130
     47layer at (333,301) size 130x130 blendMode: hue
    4848  RenderImage {IMG} at (0,0) size 130x130
    49 layer at (473,301) size 130x130
     49layer at (473,301) size 130x130 blendMode: saturation
    5050  RenderImage {IMG} at (0,0) size 130x130
    51 layer at (613,301) size 130x130
     51layer at (613,301) size 130x130 blendMode: color
    5252  RenderImage {IMG} at (0,0) size 130x130
    53 layer at (53,441) size 130x130
     53layer at (53,441) size 130x130 blendMode: luminosity
    5454  RenderImage {IMG} at (0,0) size 130x130
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-simple-expected.txt

    r161628 r166525  
    2222        RenderBlock (floating) {LI} at (605,285) size 130x130
    2323        RenderBlock (floating) {LI} at (45,425) size 130x130
    24 layer at (193,21) size 130x130
     24layer at (193,21) size 130x130 blendMode: overlay
    2525  RenderImage {IMG} at (0,0) size 130x130
    26 layer at (333,21) size 130x130
     26layer at (333,21) size 130x130 blendMode: screen
    2727  RenderImage {IMG} at (0,0) size 130x130
    28 layer at (473,21) size 130x130
     28layer at (473,21) size 130x130 blendMode: overlay
    2929  RenderImage {IMG} at (0,0) size 130x130
    30 layer at (613,21) size 130x130
     30layer at (613,21) size 130x130 blendMode: darken
    3131  RenderImage {IMG} at (0,0) size 130x130
    32 layer at (53,161) size 130x130
     32layer at (53,161) size 130x130 blendMode: lighten
    3333  RenderImage {IMG} at (0,0) size 130x130
    34 layer at (193,161) size 130x130
     34layer at (193,161) size 130x130 blendMode: color-dodge
    3535  RenderImage {IMG} at (0,0) size 130x130
    36 layer at (333,161) size 130x130
     36layer at (333,161) size 130x130 blendMode: color-burn
    3737  RenderImage {IMG} at (0,0) size 130x130
    38 layer at (473,161) size 130x130
     38layer at (473,161) size 130x130 blendMode: hard-light
    3939  RenderImage {IMG} at (0,0) size 130x130
    40 layer at (613,161) size 130x130
     40layer at (613,161) size 130x130 blendMode: soft-light
    4141  RenderImage {IMG} at (0,0) size 130x130
    42 layer at (53,301) size 130x130
     42layer at (53,301) size 130x130 blendMode: difference
    4343  RenderImage {IMG} at (0,0) size 130x130
    44 layer at (193,301) size 130x130
     44layer at (193,301) size 130x130 blendMode: exclusion
    4545  RenderImage {IMG} at (0,0) size 130x130
    46 layer at (333,301) size 130x130
     46layer at (333,301) size 130x130 blendMode: hue
    4747  RenderImage {IMG} at (0,0) size 130x130
    48 layer at (473,301) size 130x130
     48layer at (473,301) size 130x130 blendMode: saturation
    4949  RenderImage {IMG} at (0,0) size 130x130
    50 layer at (613,301) size 130x130
     50layer at (613,301) size 130x130 blendMode: color
    5151  RenderImage {IMG} at (0,0) size 130x130
    52 layer at (53,441) size 130x130
     52layer at (53,441) size 130x130 blendMode: luminosity
    5353  RenderImage {IMG} at (0,0) size 130x130
  • trunk/Source/WebCore/ChangeLog

    r166524 r166525  
     12014-03-31  Ion Rosca  <rosca@adobe.com>
     2
     3        [CSS Blending] showLayerTree should dump layer's blend mode and isolation properties
     4        https://bugs.webkit.org/show_bug.cgi?id=130922
     5
     6        Reviewed by Simon Fraser.
     7
     8        This change only updates existing tests involving blending. No new test required,
     9        as there is no new or changed functionality.
     10
     11        * rendering/RenderLayer.h: adding blendMode() getter.
     12        * rendering/RenderTreeAsText.cpp:
     13        (WebCore::write):
     14        adding blendMode property and layer's isolation status (does layer isolate blending descendants or not?).
     15
    1162014-03-31  Benjamin Poulain  <benjamin@webkit.org>
    217
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r166489 r166525  
    787787    }
    788788
     789#if ENABLE(CSS_COMPOSITING)
     790    BlendMode blendMode() const { return m_blendMode; }
     791#endif
     792
    789793    bool isolatesBlending() const
    790794    {
  • trunk/Source/WebCore/rendering/RenderTreeAsText.cpp

    r165676 r166525  
    638638            ts << " (composited, bounds=" << l.backing()->compositedBounds() << ", drawsContent=" << l.backing()->graphicsLayer()->drawsContent() << ", paints into ancestor=" << l.backing()->paintsIntoCompositedAncestor() << ")";
    639639    }
     640
     641#if ENABLE(CSS_COMPOSITING)
     642    if (l.isolatesBlending())
     643        ts << " isolatesBlending";
     644    if (l.hasBlendMode())
     645        ts << " blendMode: " << compositeOperatorName(CompositeSourceOver, l.blendMode());
     646#endif
    640647   
    641648    ts << "\n";
Note: See TracChangeset for help on using the changeset viewer.