SVG <g> containing <foreignObject /> gives wrong bounding rectangle
Reported by
m...@mail.ru,
Sep 2 2016
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 Steps to reproduce the problem: 1. Visit https://codepen.io/djFD/pen/ALAZzk 2. On a first load there is SVG group <g> with included <foreignObject />, right after page load, bounding client rectangle of that group is taken and shown 3. Later on you can programmatically remove/insert <foreignObject /> element into the same group using provided checkbox What is the expected behavior? It is expected that bounding rectangle returned is the same in all cases What went wrong? On a first invocation bounding rectangle is calculated incorrect, later on inserting/removal of foreignObject programmatically gives correct bounding rectangle of containing group Did this work before? N/A Chrome version: 51.0.2704.79 (Developer Build) Ubuntu 16.04 (64-bit) Channel: stable OS Version: Ubuntu 16.04 LTS Flash Version: Shockwave Flash 11.2 r202
,
Oct 30 2016
,
Oct 30 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 30 2017
,
Oct 30
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 30
,
Oct 31
,
Oct 31
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e47e6e98afe2de2d737ac7827e9309430e68b60b commit e47e6e98afe2de2d737ac7827e9309430e68b60b Author: Fredrik Söderquist <fs@opera.com> Date: Wed Oct 31 16:10:51 2018 Fix ancestor bounding box for "disabled" <foreignObject> and <image> Per: "A value of zero for either width or height disables rendering of the element and its embedded content." (https://svgwg.org/svg2-draft/embedded.html#Placement) and: "For each descendant graphics element child of parent: * If child is not rendered then continue to the next descendant graphics element." (https://svgwg.org/svg2-draft/coords.html#BoundingBoxes) <foreignObject> / <image> with 'width' or 'height' zero should not contribute to an ancestor container's bounding box. Bug: 643493 Change-Id: I097d9d28faaa52fc793dab251f22bc7b2610d6ad Reviewed-on: https://chromium-review.googlesource.com/c/1309773 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#604276} [modify] https://crrev.com/e47e6e98afe2de2d737ac7827e9309430e68b60b/third_party/WebKit/LayoutTests/svg/dom/getbbox.html [modify] https://crrev.com/e47e6e98afe2de2d737ac7827e9309430e68b60b/third_party/blink/renderer/core/layout/svg/layout_svg_foreign_object.h [modify] https://crrev.com/e47e6e98afe2de2d737ac7827e9309430e68b60b/third_party/blink/renderer/core/layout/svg/layout_svg_image.h [modify] https://crrev.com/e47e6e98afe2de2d737ac7827e9309430e68b60b/third_party/blink/renderer/core/layout/svg/svg_layout_support.cc
,
Oct 31
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by f...@opera.com
, Sep 2 2016Labels: -OS-Linux
Status: Available (was: Unconfirmed)