Skip to content
Permalink
Browse files
[LBSE] Enable size negotiation logic for <object> + RenderSVGRoot in …
…LBSE

https://bugs.webkit.org/show_bug.cgi?id=245907

Reviewed by Adrian Perez de Castro.

The <object> size negotiation logic is only activated for the legacy engine.
Fix that --> mark 17 more tests as passing in LBSE.

* LayoutTests/platform/mac-monterey-wk2-lbse-text/TestExpectations:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/as-image/img-preserveAspectRatio-support-2-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/as-object/embedded-svg-size-changes-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/hixie/intrinsic/003-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/hixie/text/003-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/wicd/sizing-flakiness-expected.txt:
* LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/wicd/test-rightsizing-b-expected.txt:
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
(WebCore::FrameView::embeddedContentBox const):

Canonical link: https://commits.webkit.org/255291@main
  • Loading branch information
nikolaszimmermann committed Oct 7, 2022
1 parent b850119 commit f02cb2246d5b4b081cc8d127fb1aadfdfa2bedac
Show file tree
Hide file tree
Showing 13 changed files with 180 additions and 192 deletions.
@@ -586,7 +586,6 @@ svg/foreignObject/text-tref-02-b.svg [ ImageOnlyFailure ]
svg/hittest/text-multiple-dx-values.svg [ ImageOnlyFailure ]
svg/hittest/text-with-multiple-tspans.svg [ ImageOnlyFailure ]
svg/hittest/text-with-text-path.svg [ ImageOnlyFailure ]
svg/hixie/text/003.html [ ImageOnlyFailure ]
svg/text/font-size-below-point-five-2.svg [ ImageOnlyFailure ]
svg/text/monospace-text-size-in-img.html [ ImageOnlyFailure ]
svg/text/text-repaint-rects.xhtml [ ImageOnlyFailure ]
@@ -602,29 +601,11 @@ svg/in-html/overflow-svg-root-style.html [ ImageOnlyFailure ]
# General transform issues
svg/custom/small-rect-scale.svg [ Failure ]

# SVG sizing/repainting broken for SVGs embedded via HTML <img>
svg/as-image/img-preserveAspectRatio-support-2.html [ ImageOnlyFailure ]
svg/as-image/svg-object-intrinsic-size.html [ ImageOnlyFailure ]

# SVG sizing/repainting broken for SVGs embedded via HTML <object>
svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html [ ImageOnlyFailure ]
svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html [ ImageOnlyFailure ]
svg/as-object/embedded-svg-immediate-offsetWidth-query.html [ ImageOnlyFailure ]
svg/as-object/embedded-svg-size-changes-no-layout-triggers.html [ ImageOnlyFailure ]
svg/as-object/embedded-svg-size-changes.html [ ImageOnlyFailure ]
svg/as-object/mutate-on-load.html [ ImageOnlyFailure ]
svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html [ ImageOnlyFailure ]
svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html [ ImageOnlyFailure ]
svg/as-object/nested-embedded-svg-size-changes.html [ ImageOnlyFailure ]
svg/as-object/sizing/svg-in-object-placeholder-height-auto.html [ Failure ]
svg/as-object/sizing/svg-in-object-placeholder-height-fixed.html [ Failure ]
svg/as-object/sizing/svg-in-object-placeholder-height-percentage.html [ Failure ]
svg/custom/object-no-size-attributes.xhtml [ Failure ]
svg/custom/object-sizing-no-width-height.xhtml [ Failure ]
svg/custom/object-sizing.xhtml [ Failure ]
svg/hixie/intrinsic/003.html [ ImageOnlyFailure ]
svg/wicd/sizing-flakiness.html [ ImageOnlyFailure ]
svg/wicd/test-rightsizing-b.xhtml [ ImageOnlyFailure ]
svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]

# CSS 'mix-blend-mode' broken
@@ -10,13 +10,13 @@ layer at (0,0) size 800x322
RenderImage {IMG} at (0,0) size 230x230 [border: (2px dashed #800000)]
RenderText {#text} at (230,216) size 4x18
text run at (230,216) width 4: " "
RenderEmbeddedObject {OBJECT} at (234,72) size 308x158 [border: (1px dashed #008000)]
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (0,0) size 220x220 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderEmbeddedObject {OBJECT} at (234,2) size 228x228 [border: (1px dashed #008000)]
layer at (0,0) size 220x220
RenderView at (0,0) size 220x220
layer at (0,0) size 220x220
RenderSVGRoot {svg} at (0,0) size 220x220
layer at (0,0) size 220x220
RenderSVGViewportContainer at (0,0) size 220x220
layer at (0,0) size 220x220
RenderSVGEllipse {circle} at (0,0) size 220x220 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#D9BB7A] [fill rule=EVEN-ODD]}] [cx=110.00] [cy=110.00] [r=110.00]
RenderText {#text} at (0,0) size 0x0
@@ -15,16 +15,16 @@ layer at (0,0) size 800x600
layer at (0,0) size 400x200
RenderBlock {HTML} at (0,0) size 400x200
RenderBody {BODY} at (0,0) size 400x200
RenderEmbeddedObject {OBJECT} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderEmbeddedObject {OBJECT} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderView at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGRoot {svg} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGViewportContainer at (0,0) size 400x200
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
@@ -15,16 +15,16 @@ layer at (0,0) size 800x600
layer at (0,0) size 400x200
RenderBlock {HTML} at (0,0) size 400x200
RenderBody {BODY} at (0,0) size 400x200
RenderEmbeddedObject {OBJECT} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderEmbeddedObject {OBJECT} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderView at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGRoot {svg} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGViewportContainer at (0,0) size 400x200
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
@@ -9,12 +9,12 @@ PASS document.defaultView.getComputedStyle(object1).width is "300px"
PASS document.defaultView.getComputedStyle(object1).height is "150px"

Check initial <object> size, after external resource loaded
FAIL document.defaultView.getComputedStyle(object1).width should be 200px. Was 300px.
FAIL document.defaultView.getComputedStyle(object1).height should be 200px. Was 150px.
PASS document.defaultView.getComputedStyle(object1).width is "200px"
PASS document.defaultView.getComputedStyle(object1).height is "200px"

Check final <object> size, after resizing finished
FAIL document.defaultView.getComputedStyle(object1).width should be 400px. Was 300px.
FAIL document.defaultView.getComputedStyle(object1).height should be 200px. Was 150px.
PASS document.defaultView.getComputedStyle(object1).width is "400px"
PASS document.defaultView.getComputedStyle(object1).height is "200px"

Test passed if you see two green rectangles
PASS successfullyParsed is true
@@ -3,15 +3,15 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (0,0) size 800x600
RenderEmbeddedObject {OBJECT} at (0,0) size 302x152 [border: (1px solid #FF0000)]
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderEmbeddedObject {OBJECT} at (0,0) size 402x202 [border: (1px solid #FF0000)]
layer at (0,0) size 400x200
RenderView at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGRoot {svg} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGViewportContainer at (0,0) size 400x200
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
RenderText {#text} at (0,0) size 0x0
@@ -9,16 +9,16 @@ layer at (0,0) size 800x600
layer at (0,0) size 400x200
RenderBlock {HTML} at (0,0) size 400x200
RenderBody {BODY} at (0,0) size 400x200
RenderEmbeddedObject {OBJECT} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderEmbeddedObject {OBJECT} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderView at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGRoot {svg} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGViewportContainer at (0,0) size 400x200
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
@@ -9,16 +9,16 @@ layer at (0,0) size 800x600
layer at (0,0) size 400x200
RenderBlock {HTML} at (0,0) size 400x200
RenderBody {BODY} at (0,0) size 400x200
RenderEmbeddedObject {OBJECT} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderEmbeddedObject {OBJECT} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderView at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGRoot {svg} at (0,0) size 400x200
layer at (0,0) size 400x200
RenderSVGViewportContainer at (0,0) size 400x200
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
layer at (10,10) size 180x180 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
layer at (10,10) size 180x180
RenderSVGRect {rect} at (10,10) size 180x180 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=10.00] [width=180.00] [height=180.00]
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
@@ -1,15 +1,15 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x217
RenderBlock {HTML} at (0,0) size 800x217 [color=#000080] [bgcolor=#FFFFFF]
RenderBody {BODY} at (8,16) size 784x185
RenderBlock {DIV} at (0,0) size 100x150
RenderBlock {P} at (0,0) size 100x150
RenderEmbeddedObject {OBJECT} at (0,0) size 400x150
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
RenderBlock {P} at (0,166) size 784x19
layer at (0,0) size 800x267
RenderBlock {HTML} at (0,0) size 800x267 [color=#000080] [bgcolor=#FFFFFF]
RenderBody {BODY} at (8,16) size 784x235
RenderBlock {DIV} at (0,0) size 100x200
RenderBlock {P} at (0,0) size 100x200
RenderEmbeddedObject {OBJECT} at (0,0) size 200x200
layer at (0,0) size 100x200
RenderView at (0,0) size 100x200
layer at (0,0) size 100x200
RenderSVGRoot {svg} at (0,0) size 100x200
RenderBlock {P} at (0,216) size 784x19
RenderText {#text} at (0,0) size 431x18
text run at (0,0) width 431: "There should be a complete unbroken yin-yang symbol (\x{262F}) above."
@@ -1,32 +1,32 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x402
RenderBlock {HTML} at (0,0) size 800x402
RenderBody {BODY} at (8,16) size 784x370
layer at (0,0) size 800x414
RenderBlock {HTML} at (0,0) size 800x414
RenderBody {BODY} at (8,16) size 784x382
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 616x18
text run at (0,0) width 616: "The following two blocks should look identical (to the pixel), and they should both say \"PASS\":"
RenderBlock {P} at (0,34) size 784x160
RenderEmbeddedObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)]
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (0,0) size 2x1 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderBlock {P} at (0,34) size 784x166
RenderEmbeddedObject {OBJECT} at (0,0) size 784x162 [border: (3px inset #000080)]
layer at (0,0) size 778x156
RenderView at (0,0) size 778x156
layer at (0,0) size 778x156
RenderSVGRoot {svg} at (0,0) size 778x156
layer at (0,0) size 778x156
RenderSVGViewportContainer at (0,0) size 778x156
layer at (0,0) size 2x1 backgroundClip at (0,0) size 778x156 clip at (0,0) size 778x156
RenderSVGText {text} at (0,-1) size 3x3 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 3x2
chunk 1 text run 1 at (0.00,0.80) startOffset 0 endOffset 4 width 2.39: "PASS"
RenderBlock {P} at (0,210) size 784x160
RenderEmbeddedObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)]
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGRoot {svg} at (0,0) size 300x150
layer at (0,0) size 300x150
RenderSVGViewportContainer at (0,0) size 300x150
layer at (0,-100) size 2391x1150 backgroundClip at (0,0) size 300x150 clip at (0,0) size 300x150
RenderSVGText {text} at (0,-100) size 2391x1150 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 2391x1150
chunk 1 text run 1 at (0.00,800.00) startOffset 0 endOffset 4 width 2390.63: "PASS"
chunk 1 text run 1 at (0.00,0.80) startOffset 0 endOffset 4 width 2.40: "PASS"
RenderBlock {P} at (0,216) size 784x166
RenderEmbeddedObject {OBJECT} at (0,0) size 784x162 [border: (3px inset #000080)]
layer at (0,0) size 778x156
RenderView at (0,0) size 778x156
layer at (0,0) size 778x156
RenderSVGRoot {svg} at (0,0) size 778x156
layer at (0,0) size 778x156
RenderSVGViewportContainer at (0,0) size 778x156
layer at (0,-100) size 2397x1151 backgroundClip at (0,0) size 778x156 clip at (0,0) size 778x156
RenderSVGText {text} at (0,-100) size 2397x1151 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 2397x1151
chunk 1 text run 1 at (0.00,800.00) startOffset 0 endOffset 4 width 2396.77: "PASS"
@@ -4,13 +4,13 @@ layer at (0,0) size 800x410
RenderBlock {HTML} at (0,0) size 800x410
RenderBody {BODY} at (8,8) size 784x0
RenderBlock (floating) {DIV} at (0,0) size 402x402 [border: (1px solid #FF0000)]
RenderEmbeddedObject {OBJECT} at (1,1) size 200x150
layer at (0,0) size 200x150
RenderView at (0,0) size 200x150
layer at (0,0) size 200x150
RenderSVGRoot {svg} at (0,0) size 200x150
layer at (0,0) size 200x150
RenderSVGViewportContainer at (0,0) size 200x150
RenderEmbeddedObject {OBJECT} at (1,1) size 200x67
layer at (0,0) size 200x67
RenderView at (0,0) size 200x67
layer at (0,0) size 200x67
RenderSVGRoot {svg} at (0,0) size 200x67
layer at (0,0) size 200x67
RenderSVGViewportContainer at (0,0) size 200x67
layer at (1,1) size 118x38
RenderSVGRect {rect} at (1,1) size 118x38 [stroke={[type=SOLID] [color=#FFCC33] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=118.00] [height=38.00]
layer at (54,9) size 12x23

0 comments on commit f02cb22

Please sign in to comment.