CSS rules do not apply to <foreignObject> in svg.css |
|||||||||
Issue descriptionThe UA stylesheet in svg.css does not apply rules for foreignObject. A user stylesheet does seem to apply it. If I hack svg.css to lower-case foreignObject, it works. It seems there is a case canonicalization error for foreignObject.] Rune, any idea what is wrong or where to look?
,
Mar 7 2018
Maybe this because SVG child elements are parsed in "foreign" mode?
,
Mar 8 2018
This CL might give some pointers: https://chromium.googlesource.com/chromium/src/+/bab4aa7b93135dff88e7afb14b93ec7786768c1c
,
Mar 8 2018
Thanks, I think I see where this goes awry now.
,
Mar 8 2018
,
Mar 8 2018
Are you going to take the bug then?
,
Mar 8 2018
I haven't really figured how to fix it yet, but sure I can assign it to me for now.
,
Mar 19 2018
Also, this is only a problem in HTML documents, not SVG documents.
,
Mar 26 2018
Any update on this bug? Is it harder than it seems?
,
Mar 26 2018
I haven't looked into it any deeper yet (it's a P3.) I don't expect it to be trivial to make a non-hacky fix though.
,
Mar 26 2018
I think this is actually a P2. foreignObject features are being fixed in batch as part of SPv175.
,
Oct 18
This is what's causing external/wpt/svg/extensibility/foreignObject/foreign-object-size.html to fail as well.
,
Oct 19
I'll do this ...
,
Oct 19
Thanks!
,
Oct 19
,
Oct 19
,
Oct 19
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ac2d95815375fcd6e70c6c491c4bdbda25b181b8 commit ac2d95815375fcd6e70c6c491c4bdbda25b181b8 Author: Rune Lillesveen <futhark@chromium.org> Date: Fri Oct 19 11:56:09 2018 Collect type selector rules case-sensitively in UA sheets. Selectors in UA sheets are added case-sensitively to RuleSet buckets as if they were sheets in non-HTML documents in order to match correctly for xhtml and svg documents. That means we should not use the lower-case element name to lookup element rules as the lower-case of foreignObject would not find the foreignObject rules from the element bucket in the svg.css UA stylesheet. Bug: 819814 Change-Id: I2064f6669f6b7021feab2c93dd6b4d8a5c749b77 Reviewed-on: https://chromium-review.googlesource.com/c/1290849 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#601116} [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/WebKit/LayoutTests/fast/multicol/span/sole-svg-spanner-with-foreignObject-crash.html [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/WebKit/LayoutTests/paint/invalidation/svg/transform-foreign-object.html [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/WebKit/LayoutTests/svg/foreign-object-under-shadow-root-under-hidden-expected.txt [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/WebKit/LayoutTests/svg/foreignObject/clip.html [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/blink/renderer/core/css/element_rule_collector.cc [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/blink/renderer/core/layout/svg/layout_svg_foreign_object_test.cc [modify] https://crrev.com/ac2d95815375fcd6e70c6c491c4bdbda25b181b8/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
,
Jan 21
(2 days ago)
Issue 587108 has been merged into this issue. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by chrishtr@chromium.org
, Mar 7 2018