New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 819814 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Mac
Pri: 2
Type: Bug

Blocking:
issue 896242



Sign in to add a comment

CSS rules do not apply to <foreignObject> in svg.css

Project Member Reported by chrishtr@chromium.org, Mar 7 2018

Issue description

The 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?
 
Cc: f...@opera.com
Related bug:  695949 .
Maybe this because SVG child elements are parsed in "foreign" mode?

Comment 5 by f...@opera.com, Mar 8 2018

Thanks, I think I see where this goes awry now.

Comment 6 by f...@opera.com, Mar 8 2018

Labels: OS-Android OS-Linux OS-Windows
Are you going to take the bug then?

Comment 8 by f...@opera.com, Mar 8 2018

Owner: f...@opera.com
Status: Assigned (was: Untriaged)
I haven't really figured how to fix it yet, but sure I can assign it to me for now.
Also, this is only a problem in HTML documents, not SVG documents.
Any update on this bug? Is it harder than it seems?

Comment 11 by f...@opera.com, 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.
Labels: -Pri-3 Pri-2
I think this is actually a P2. foreignObject features are being fixed in batch
as part of SPv175.
Blocking: 896242
This is what's causing external/wpt/svg/extensibility/foreignObject/foreign-object-size.html to fail as well.

Cc: -futhark@chromium.org
Owner: futhark@chromium.org
I'll do this ...
Thanks!
Status: Started (was: Assigned)
Status: Fixed (was: Started)
Project Member

Comment 19 by bugdroid1@chromium.org, 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

Comment 20 by f...@opera.com, Jan 21 (2 days ago)

Cc: pdr@chromium.org jinho.b...@samsung.com hyunjune...@samsung.com brajkumar@chromium.org
 Issue 587108  has been merged into this issue.

Sign in to add a comment