Commit c432775b authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[LayoutNG] Initialize bleed_avoidance for paintng

Many existing rebaselined tests had to be rebaselined again
because borders looked different.

Bug: 714962
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia4114b66e322550b1a8dc5fc96568071d50a951e
Reviewed-on: https://chromium-review.googlesource.com/1027073
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553746}
parent 1e87fd07
...@@ -143,7 +143,6 @@ crbug.com/591099 css2.1/t1202-counter-04-b.html [ Failure ] ...@@ -143,7 +143,6 @@ crbug.com/591099 css2.1/t1202-counter-04-b.html [ Failure ]
crbug.com/591099 css2.1/t1202-counter-09-b.html [ Failure ] crbug.com/591099 css2.1/t1202-counter-09-b.html [ Failure ]
crbug.com/591099 css2.1/t1202-counters-04-b.html [ Failure ] crbug.com/591099 css2.1/t1202-counters-04-b.html [ Failure ]
crbug.com/591099 css2.1/t1205-c564-list-img-00-b-g.html [ Failure ] crbug.com/591099 css2.1/t1205-c564-list-img-00-b-g.html [ Failure ]
crbug.com/591099 css3/blending/background-blend-mode-overlapping-accelerated-elements.html [ Failure ]
crbug.com/591099 css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html [ Failure ] crbug.com/591099 css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html [ Failure ]
crbug.com/591099 css3/filters/effect-brightness-clamping.html [ Failure ] crbug.com/591099 css3/filters/effect-brightness-clamping.html [ Failure ]
crbug.com/591099 css3/filters/effect-brightness.html [ Failure ] crbug.com/591099 css3/filters/effect-brightness.html [ Failure ]
...@@ -1032,39 +1031,19 @@ crbug.com/591099 fast/borders/bidi-012.html [ Failure ] ...@@ -1032,39 +1031,19 @@ crbug.com/591099 fast/borders/bidi-012.html [ Failure ]
crbug.com/591099 fast/borders/border-image-border-radius.html [ Failure ] crbug.com/591099 fast/borders/border-image-border-radius.html [ Failure ]
crbug.com/714962 fast/borders/border-image-outset-split-inline.html [ Failure ] crbug.com/714962 fast/borders/border-image-outset-split-inline.html [ Failure ]
crbug.com/714962 fast/borders/border-inner-bleed.html [ Failure ] crbug.com/714962 fast/borders/border-inner-bleed.html [ Failure ]
crbug.com/714962 fast/borders/border-radius-inline-flow.html [ Failure ]
crbug.com/591099 fast/borders/border-radius-mask-canvas-all.html [ Failure ] crbug.com/591099 fast/borders/border-radius-mask-canvas-all.html [ Failure ]
crbug.com/591099 fast/borders/border-radius-mask-canvas-with-mask.html [ Failure ] crbug.com/591099 fast/borders/border-radius-mask-canvas-with-mask.html [ Failure ]
crbug.com/591099 fast/borders/border-radius-mask-canvas-with-shadow.html [ Failure ] crbug.com/591099 fast/borders/border-radius-mask-canvas-with-shadow.html [ Failure ]
crbug.com/714962 fast/borders/border-radius-percent.html [ Failure ]
crbug.com/714962 fast/borders/border-radius-split-inline.html [ Failure ]
crbug.com/714962 fast/borders/border-styles-split.html [ Failure ] crbug.com/714962 fast/borders/border-styles-split.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusArcs01.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusDouble01.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusDouble02.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusDouble03.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusGroove01.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusGroove02.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusInset01.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusInvalidColor.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusOutset01.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusRidge01.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusSolid01.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusSolid02.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusSolid03.html [ Failure ]
crbug.com/714962 fast/borders/borderRadiusSolid04.html [ Failure ]
crbug.com/714962 fast/borders/dashed-1px-with-border-radius.html [ Failure ]
crbug.com/591099 fast/borders/inline-mask-overlay-image-outset-vertical-rl.html [ Failure ] crbug.com/591099 fast/borders/inline-mask-overlay-image-outset-vertical-rl.html [ Failure ]
crbug.com/591099 fast/borders/inline-mask-overlay-image-outset.html [ Failure ] crbug.com/591099 fast/borders/inline-mask-overlay-image-outset.html [ Failure ]
crbug.com/591099 fast/borders/inline-mask-overlay-image.html [ Failure ] crbug.com/591099 fast/borders/inline-mask-overlay-image.html [ Failure ]
crbug.com/714962 fast/borders/table-borders.html [ Failure ]
crbug.com/591099 fast/box-decoration-break/box-decoration-break-rendering.html [ Failure ] crbug.com/591099 fast/box-decoration-break/box-decoration-break-rendering.html [ Failure ]
crbug.com/591099 fast/box-shadow/basic-shadows.html [ Failure ] crbug.com/591099 fast/box-shadow/basic-shadows.html [ Failure ]
crbug.com/591099 fast/box-shadow/box-shadow.html [ Failure ] crbug.com/591099 fast/box-shadow/box-shadow.html [ Failure ]
crbug.com/591099 fast/box-shadow/inset-subpixel.html [ Failure ] crbug.com/591099 fast/box-shadow/inset-subpixel.html [ Failure ]
crbug.com/591099 fast/box-shadow/inset.html [ Failure ] crbug.com/591099 fast/box-shadow/inset.html [ Failure ]
crbug.com/591099 fast/box-sizing/replaced.html [ Failure ] crbug.com/591099 fast/box-sizing/replaced.html [ Failure ]
crbug.com/591099 fast/clip/overflow-border-radius-transformed.html [ Failure ]
crbug.com/591099 fast/css-generated-content/015.html [ Failure ] crbug.com/591099 fast/css-generated-content/015.html [ Failure ]
crbug.com/805301 fast/css-generated-content/crash-selection-editing-removes-pseudo.html [ Failure ] crbug.com/805301 fast/css-generated-content/crash-selection-editing-removes-pseudo.html [ Failure ]
crbug.com/591099 fast/css-generated-content/first-letter-next-sibling-crash.html [ Crash ] crbug.com/591099 fast/css-generated-content/first-letter-next-sibling-crash.html [ Crash ]
...@@ -1647,7 +1626,6 @@ crbug.com/714962 fast/writing-mode/border-image-vertical-rl.html [ Failure ] ...@@ -1647,7 +1626,6 @@ crbug.com/714962 fast/writing-mode/border-image-vertical-rl.html [ Failure ]
crbug.com/591099 fast/writing-mode/border-radius-clipping-vertical-lr.html [ Failure ] crbug.com/591099 fast/writing-mode/border-radius-clipping-vertical-lr.html [ Failure ]
crbug.com/714962 fast/writing-mode/border-styles-vertical-lr.html [ Failure ] crbug.com/714962 fast/writing-mode/border-styles-vertical-lr.html [ Failure ]
crbug.com/714962 fast/writing-mode/border-styles-vertical-rl.html [ Failure ] crbug.com/714962 fast/writing-mode/border-styles-vertical-rl.html [ Failure ]
crbug.com/714962 fast/writing-mode/border-vertical-lr.html [ Failure ]
crbug.com/591099 fast/writing-mode/borders.html [ Failure ] crbug.com/591099 fast/writing-mode/borders.html [ Failure ]
crbug.com/591099 fast/writing-mode/english-rl-text.html [ Failure ] crbug.com/591099 fast/writing-mode/english-rl-text.html [ Failure ]
crbug.com/591099 fast/writing-mode/fieldsets.html [ Failure ] crbug.com/591099 fast/writing-mode/fieldsets.html [ Failure ]
...@@ -2023,7 +2001,6 @@ crbug.com/591099 paint/markers/first-letter.html [ Failure ] ...@@ -2023,7 +2001,6 @@ crbug.com/591099 paint/markers/first-letter.html [ Failure ]
crbug.com/591099 paint/markers/marker-early-break-bug.html [ Failure ] crbug.com/591099 paint/markers/marker-early-break-bug.html [ Failure ]
crbug.com/591099 paint/overflow/background-mask-should-be-recorded-full.html [ Failure ] crbug.com/591099 paint/overflow/background-mask-should-be-recorded-full.html [ Failure ]
crbug.com/591099 paint/overflow/composited-scroll-vertical-rl.html [ Failure ] crbug.com/591099 paint/overflow/composited-scroll-vertical-rl.html [ Failure ]
crbug.com/591099 paint/overflow/transformed-iframe-clipping.html [ Failure ]
crbug.com/591099 paint/pagination/pagination-change-clip-crash.html [ Failure ] crbug.com/591099 paint/pagination/pagination-change-clip-crash.html [ Failure ]
crbug.com/591099 paint/selection/text-selection-drag-in-frame-scrolled.html [ Failure ] crbug.com/591099 paint/selection/text-selection-drag-in-frame-scrolled.html [ Failure ]
crbug.com/591099 paint/selection/text-selection-drag-in-frame.html [ Failure ] crbug.com/591099 paint/selection/text-selection-drag-in-frame.html [ Failure ]
...@@ -2097,7 +2074,6 @@ crbug.com/591099 svg/parser/whitespace-number.html [ Timeout ] ...@@ -2097,7 +2074,6 @@ crbug.com/591099 svg/parser/whitespace-number.html [ Timeout ]
crbug.com/591099 svg/text/foreignObject-text-clipping-bug.xml [ Failure ] crbug.com/591099 svg/text/foreignObject-text-clipping-bug.xml [ Failure ]
crbug.com/714962 svg/text/tspan-multiple-outline.svg [ Failure ] crbug.com/714962 svg/text/tspan-multiple-outline.svg [ Failure ]
crbug.com/591099 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Failure ] crbug.com/591099 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Failure ]
crbug.com/591099 svg/wicd/test-scalable-background-image1.xhtml [ Failure ]
crbug.com/591099 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ] crbug.com/591099 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
crbug.com/591099 svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml [ Failure ] crbug.com/591099 svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml [ Failure ]
crbug.com/591099 svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml [ Failure ] crbug.com/591099 svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml [ Failure ]
...@@ -2145,14 +2121,12 @@ crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_ ...@@ -2145,14 +2121,12 @@ crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_
crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_left.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_left.html [ Failure ]
crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_right.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_right.html [ Failure ]
crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_top.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_top.html [ Failure ]
crbug.com/591099 transforms/2d/compound-transforms-vs-containers.html [ Failure ]
crbug.com/591099 transforms/2d/hindi-rotated.html [ Failure ] crbug.com/591099 transforms/2d/hindi-rotated.html [ Failure ]
crbug.com/591099 transforms/2d/transform-2d.html [ Timeout ] crbug.com/591099 transforms/2d/transform-2d.html [ Timeout ]
crbug.com/591099 transforms/3d/general/perspective-non-layer.html [ Failure ] crbug.com/591099 transforms/3d/general/perspective-non-layer.html [ Failure ]
crbug.com/591099 transforms/3d/hit-testing/backface-hit-test.html [ Failure ] crbug.com/591099 transforms/3d/hit-testing/backface-hit-test.html [ Failure ]
crbug.com/591099 transforms/3d/hit-testing/backface-no-transform-hit-test.html [ Failure ] crbug.com/591099 transforms/3d/hit-testing/backface-no-transform-hit-test.html [ Failure ]
crbug.com/714962 transforms/selection-bounds-in-transformed-view.html [ Failure ] crbug.com/714962 transforms/selection-bounds-in-transformed-view.html [ Failure ]
crbug.com/591099 transforms/shadows.html [ Failure ]
crbug.com/591099 virtual/android/ [ Skip ] crbug.com/591099 virtual/android/ [ Skip ]
crbug.com/591099 virtual/disable-rls/compositing/squashing/add-remove-squashed-layers.html [ Failure ] crbug.com/591099 virtual/disable-rls/compositing/squashing/add-remove-squashed-layers.html [ Failure ]
crbug.com/591099 virtual/disable-rls/compositing/squashing/selection-repaint-with-gaps.html [ Failure ] crbug.com/591099 virtual/disable-rls/compositing/squashing/selection-repaint-with-gaps.html [ Failure ]
......
layer at (0,0) size 800x600 layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600 LayoutView at (0,0) size 800x600
layer at (0,0) size 800x433 layer at (0,0) size 800x600
LayoutNGBlockFlow {HTML} at (0,0) size 800x433 LayoutNGBlockFlow {HTML} at (0,0) size 800x600
LayoutNGBlockFlow {BODY} at (8,8) size 784x401 LayoutNGBlockFlow {BODY} at (8,8) size 784x568
LayoutNGBlockFlow {P} at (0,0) size 784x20 LayoutNGBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 564x19 LayoutText {#text} at (0,0) size 564x19
text run at (0,0) width 564: "Three different sizes. The large size in particular should appear detailed and not pixelated." text run at (0,0) width 564: "Three different sizes. The large size in particular should appear detailed and not pixelated."
...@@ -32,7 +32,7 @@ layer at (0,0) size 800x433 ...@@ -32,7 +32,7 @@ layer at (0,0) size 800x433
LayoutNGBlockFlow {P} at (0,308) size 784x40 LayoutNGBlockFlow {P} at (0,308) size 784x40
LayoutText {#text} at (0,0) size 425x19 LayoutText {#text} at (0,0) size 425x19
text run at (0,0) width 425: "For the following, each emoji should appear in two different colors." text run at (0,0) width 425: "For the following, each emoji should appear in two different colors."
LayoutBR {BR} at (424,0) size 0x0 LayoutBR {BR} at (425,0) size 0x0
LayoutText {#text} at (0,20) size 235x19 LayoutText {#text} at (0,20) size 235x19
text run at (0,20) width 235: "Color swatches should not be visible." text run at (0,20) width 235: "Color swatches should not be visible."
LayoutNGBlockFlow {P} at (0,372) size 784x29 LayoutNGBlockFlow {P} at (0,372) size 784x29
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x228
LayoutNGBlockFlow {HTML} at (0,0) size 800x228
LayoutNGBlockFlow {BODY} at (8,16) size 784x204
LayoutNGBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 766x19
text run at (0,0) width 766: "The word 'PASS' should be seen below on the right hand side, inside a rounded box with black border and yellow background."
layer at (8,52) size 784x168
LayoutNGBlockFlow {DIV} at (0,36) size 784x168
LayoutMultiColumnSet (anonymous) at (0,0) size 784x168
layer at (8,52) size 392x264 backgroundClip at (0,0) size 400x220 clip at (0,0) size 400x220
LayoutMultiColumnFlowThread (anonymous) at (0,0) size 392x264
LayoutNGBlockFlow (anonymous) at (0,0) size 392x200
LayoutBR {BR} at (0,6) size 0x0
LayoutBR {BR} at (0,38) size 0x0
LayoutBR {BR} at (0,70) size 0x0
LayoutBR {BR} at (0,102) size 0x0
LayoutBR {BR} at (0,134) size 0x0
LayoutBR {BR} at (0,0) size 0x0
layer at (400,84) size 392x64 clip at (416,100) size 360x32
LayoutNGBlockFlow (relative positioned) {DIV} at (0,200) size 392x64 [bgcolor=#FFFF00] [border: (16px solid #000000)]
LayoutText {#text} at (177,22) size 38x19
text run at (177,22) width 38: "PASS"
...@@ -15,19 +15,12 @@ namespace blink { ...@@ -15,19 +15,12 @@ namespace blink {
BoxDecorationData::BoxDecorationData(const LayoutBox& layout_box) BoxDecorationData::BoxDecorationData(const LayoutBox& layout_box)
: BoxDecorationData(layout_box.StyleRef()) { : BoxDecorationData(layout_box.StyleRef()) {
if (layout_box.IsDocumentElement()) { bleed_avoidance = ComputeBleedAvoidance(&layout_box);
bleed_avoidance = kBackgroundBleedNone;
} else {
bleed_avoidance = DetermineBackgroundBleedAvoidance(
layout_box.GetDocument(), layout_box.StyleRef(),
layout_box.BackgroundShouldAlwaysBeClipped());
}
} }
BoxDecorationData::BoxDecorationData(const NGPhysicalFragment& fragment) BoxDecorationData::BoxDecorationData(const NGPhysicalFragment& fragment)
: BoxDecorationData(fragment.Style()) { : BoxDecorationData(fragment.Style()) {
// TODO(layout-dev): Implement bleed_avoidance = ComputeBleedAvoidance(fragment.GetLayoutObject());
bleed_avoidance = kBackgroundBleedClipLayer;
} }
BoxDecorationData::BoxDecorationData(const ComputedStyle& style) { BoxDecorationData::BoxDecorationData(const ComputedStyle& style) {
...@@ -39,6 +32,21 @@ BoxDecorationData::BoxDecorationData(const ComputedStyle& style) { ...@@ -39,6 +32,21 @@ BoxDecorationData::BoxDecorationData(const ComputedStyle& style) {
has_appearance = style.HasAppearance(); has_appearance = style.HasAppearance();
} }
BackgroundBleedAvoidance BoxDecorationData::ComputeBleedAvoidance(
const LayoutObject* layout_object) {
DCHECK(layout_object);
if (layout_object->IsDocumentElement())
return kBackgroundBleedNone;
bool background_should_always_be_clipped =
layout_object->IsBox()
? ToLayoutBox(layout_object)->BackgroundShouldAlwaysBeClipped()
: false;
return DetermineBackgroundBleedAvoidance(layout_object->GetDocument(),
layout_object->StyleRef(),
background_should_always_be_clipped);
}
namespace { namespace {
bool BorderObscuresBackgroundEdge(const ComputedStyle& style) { bool BorderObscuresBackgroundEdge(const ComputedStyle& style) {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
namespace blink { namespace blink {
class LayoutBox; class LayoutBox;
class LayoutObject;
class Document; class Document;
class NGPhysicalFragment; class NGPhysicalFragment;
class ComputedStyle; class ComputedStyle;
...@@ -34,6 +35,8 @@ struct BoxDecorationData { ...@@ -34,6 +35,8 @@ struct BoxDecorationData {
const Document&, const Document&,
const ComputedStyle&, const ComputedStyle&,
bool background_should_always_be_clipped); bool background_should_always_be_clipped);
BackgroundBleedAvoidance ComputeBleedAvoidance(const LayoutObject*);
BoxDecorationData(const ComputedStyle&); BoxDecorationData(const ComputedStyle&);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment