Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: afa718b1cfd97ca212d7b139751feb9ce1afcf5b https://github.com/WebKit/WebKit/commit/afa718b1cfd97ca212d7b139751feb9ce1afcf5b Author: Cathie Chen <cathiec...@igalia.com> Date: 2023-03-27 (Mon, 27 Mar 2023)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-007-expected.txt M LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-with-css-box-001-expected.txt M LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-with-css-box-002-expected.txt M Source/WebCore/dom/Element.cpp M Source/WebCore/page/ResizeObservation.cpp M Source/WebCore/svg/SVGElement.cpp M Source/WebCore/svg/SVGElement.h Log Message: ----------- [Resize-observer] The `getBoundingBox` of a non-empty SVG element is 0x0 https://bugs.webkit.org/show_bug.cgi?id=252903 Reviewed by Oriol Brufau and Nikolas Zimmermann. Per [1], the specification updates that for SVG elements that do not have associated CSS layout boxes define bounding box instead of a content box. Previously, all svg elements are using the bounding box. This patch adds Element::getBoundingBoxForSVGElement() and reuses shouldObtainBoundsFromSVGModel to get the bounding box only for svg elements without associated CSS layout boxes. * LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-007-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-with-css-box-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-with-css-box-002-expected.txt: * Source/WebCore/dom/Element.cpp: (WebCore::shouldObtainBoundsFromSVGModel): * Source/WebCore/page/ResizeObservation.cpp: (WebCore::ResizeObservation::computeObservedSizes const): * Source/WebCore/svg/SVGElement.cpp: (WebCore::SVGElement::hasAssociatedSVGLayoutBox const): * Source/WebCore/svg/SVGElement.h: Canonical link: https://commits.webkit.org/262145@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes