Commit 109ba2e5 authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

[LayoutNG] Fix call to: ContainingBlock()->AvailableLogicalWidth();

During computing the size of an SVG we may end up calling:
ContainingBlock()->AvailableLogicalWidth()

This is invalid inside LayoutNG as we should always use the override
set by the LayoutNG algorithm.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ia9f32ac921726cf3f3f0d76dcccd2a0497cb25cf
Bug: 	635619
Reviewed-on: https://chromium-review.googlesource.com/1255598
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595778}
parent a35a7fe2
......@@ -249,9 +249,6 @@ crbug.com/591099 external/wpt/html/interaction/focus/sequential-focus-navigation
crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html [ Failure ]
crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/color.html [ Failure ]
crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-page/body-margin-2j.html [ Failure ]
crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-auto.html [ Failure ]
crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-percentage.html [ Failure ]
crbug.com/591099 external/wpt/html/rendering/replaced-elements/svg-inline-sizing/svg-inline.html [ Failure ]
crbug.com/591099 external/wpt/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html [ Pass ]
crbug.com/591099 external/wpt/html/semantics/embedded-content/media-elements/interfaces/TextTrack/removeCue.html [ Pass ]
crbug.com/591099 external/wpt/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime.html [ Pass ]
......@@ -455,7 +452,6 @@ crbug.com/714962 paint/invalidation/position/relative-positioned-movement-repain
crbug.com/591099 paint/invalidation/position/relayout-fixed-position-after-scale.html [ Failure ]
crbug.com/591099 paint/invalidation/scroll/repaint-composited-child-in-scrolled-container.html [ Failure ]
crbug.com/591099 paint/invalidation/svg/animated-path-inside-transformed-html.xhtml [ Failure Pass ]
crbug.com/591099 paint/invalidation/svg/resize-svg-invalidate-children.html [ Failure ]
crbug.com/591099 paint/invalidation/svg/svg-background-partial-redraw.html [ Failure ]
crbug.com/591099 paint/invalidation/table/table-extra-bottom-grow.html [ Failure ]
crbug.com/591099 paint/invalidation/table/table-two-pass-layout-overpaint.html [ Failure ]
......@@ -464,10 +460,7 @@ crbug.com/591099 printing/iframe-svg-in-object-print.html [ Failure ]
crbug.com/591099 scrollbars/auto-scrollbar-fit-content.html [ Failure ]
crbug.com/591099 storage/indexeddb/mozilla/test_objectStore_openKeyCursor.html [ Pass ]
crbug.com/591099 storage/indexeddb/objectstore-cursor.html [ Pass ]
crbug.com/591099 svg/custom/object-sizing-no-width-height.xhtml [ Failure ]
crbug.com/591099 svg/filters/feTurbulence-bad-seeds.html [ Failure ]
crbug.com/591099 svg/hixie/error/013.xml [ Failure ]
crbug.com/591099 svg/in-html/sizing/svg-inline.html [ Failure ]
crbug.com/591099 svg/transforms/svg-css-transforms.xhtml [ Failure ]
crbug.com/591099 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Failure ]
crbug.com/591099 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
......
layer at (0,0) size 800x600 scrollHeight 634
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x536
LayoutNGBlockFlow {html} at (0,0) size 800x536
LayoutNGBlockFlow {body} at (8,16) size 784x470
LayoutNGBlockFlow {p} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 548x19
text run at (0,0) width 548: "CSS Transformed HTML div with SVG inside it. objectBoundingBox patterns on text."
layer at (58,86) size 400x400
LayoutNGBlockFlow {div} at (50,70) size 400x400
LayoutSVGRoot {svg} at (0,0) size 400x300
LayoutSVGResourcePattern {pattern} [id="pat1"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
LayoutSVGRect {rect} at (5,5) size 10x10 [fill={[type=SOLID] [color=#FF0000]}] [x=5.00] [y=5.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (10,10) size 10x10 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (25,10) size 430x60 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=PATTERN] [id="pat1"]}] [x=25.00] [y=10.00] [width=430.00] [height=60.00]
LayoutSVGText {text} at (25,73) size 406.80x15.59 contains 1 chunk(s)
LayoutSVGInlineText {#text} at (25,73) size 406.80x15.59
chunk 1 text run 1 at (25.00,85.00) startOffset 0 endOffset 75 width 406.80: "Pattern created using red and green rectangles applied to fill of rectangle"
LayoutSVGResourcePattern {pattern} [id="pat2"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
LayoutSVGRect {rect} at (0,0) size 10x10 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (10,0) size 10x10 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=0.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (0,10) size 10x10 [fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=10.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (10,10) size 10x10 [fill={[type=SOLID] [color=#FFFF00]}] [x=10.00] [y=10.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (35,110) size 410x40 [stroke={[type=PATTERN] [id="pat2"] [stroke width=20.00]}] [x=35.00] [y=110.00] [width=410.00] [height=40.00]
LayoutSVGText {text} at (25,163) size 318x15.59 contains 1 chunk(s)
LayoutSVGInlineText {#text} at (25,163) size 318x15.59
chunk 1 text run 1 at (25.00,175.00) startOffset 0 endOffset 59 width 318.00: "Pattern of 4 rectangles applied to a stroke of a rectangle."
LayoutSVGResourcePattern {pattern} [id="pat3"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
LayoutSVGRect {rect} at (0,0) size 10x10 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (0,10) size 10x10 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=10.00] [width=10.00] [height=10.00]
LayoutSVGText {text} at (25,174.39) size 292.80x56.39 contains 1 chunk(s)
LayoutSVGInlineText {#text} at (25,174.39) size 292.80x56.39
chunk 1 text run 1 at (25.00,220.00) startOffset 0 endOffset 15 width 292.80: "Pattern on fill"
LayoutSVGText {text} at (25,223) size 214.80x15.59 contains 1 chunk(s)
LayoutSVGInlineText {#text} at (25,223) size 214.80x15.59
chunk 1 text run 1 at (25.00,235.00) startOffset 0 endOffset 38 width 214.80: "Pattern consists of red and green rows"
LayoutSVGResourcePattern {pattern} [id="pat4"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
LayoutSVGRect {rect} at (0,0) size 10x10 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=10.00] [height=10.00]
LayoutSVGRect {rect} at (10,0) size 10x10 [fill={[type=SOLID] [color=#0000FF]}] [x=10.00] [y=0.00] [width=10.00] [height=10.00]
LayoutSVGText {text} at (25,237.80) size 298.80x45.59 contains 1 chunk(s)
LayoutSVGInlineText {#text} at (25,237.80) size 298.80x45.59
chunk 1 text run 1 at (25.00,275.00) startOffset 0 endOffset 17 width 298.80: "Pattern on stroke"
LayoutSVGText {text} at (25,278) size 226.80x15.59 contains 1 chunk(s)
LayoutSVGInlineText {#text} at (25,278) size 226.80x15.59
chunk 1 text run 1 at (25.00,290.00) startOffset 0 endOffset 40 width 226.80: "Pattern consists of red and blue columns"
LayoutSVGText {text} at (10,305.19) size 264x44.39 contains 1 chunk(s)
LayoutSVGInlineText {#text} at (10,305.19) size 264x44.39
chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.00: "$Revision: 1.6 $"
LayoutSVGRect {rect} at (1,1) size 478x358 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
LayoutText {#text} at (0,0) size 0x0
......@@ -683,7 +683,7 @@ LayoutUnit LayoutReplaced::ComputeConstrainedLogicalWidth(
// 'margin-left' + 'border-left-width' + 'padding-left' + 'width' +
// 'padding-right' + 'border-right-width' + 'margin-right' = width of
// containing block
LayoutUnit logical_width = ContainingBlock()->AvailableLogicalWidth();
LayoutUnit logical_width = ContainingBlockLogicalWidthForContent();
// This solves above equation for 'width' (== logicalWidth).
LayoutUnit margin_start =
......
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