Closed
Bug 984220
Opened 11 years ago
Closed 11 years ago
Document rules applying to cloned content imported from a different SVG document with <use>
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
DUPLICATE
of bug 265894
People
(Reporter: wandererm, Unassigned)
Details
Attachments
(1 file)
294 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140224132736
Steps to reproduce:
img, svg {
opacity: .3;
}
<img src="image.svg">
<svg>
…
</svg>
Actual results:
compared to img, the inline svg looks paler.
Expected results:
They should be rendered in the same appearance.
Could you add a simple testcase?
Flags: needinfo?(wandererm)
Keywords: testcase-wanted
See this page.
http://osdc.tw/2014/news.html
The feed icon beside news block title looks paler in Firefox than in Chrome.
Flags: needinfo?(wandererm)
Keywords: testcase-wanted
Comment 3•11 years ago
|
||
Confirm with a screenshot.
The focused windows it's chromium 34, the big window it's firefox 30a2
http://imgur.com/HwEk2OB
Comment 4•11 years ago
|
||
The style on the page styles every "svg" element with opacity 0.3.
The icon is an <svg> which has a <use> which references _another_ <svg>. Both are styled with opacity 0.3, which means the overall opacity of the content inside the inner <svg> ends up being 0.09, no?
Comment 5•11 years ago
|
||
That said, it's not clear to me whether in this case (cross-document <use>) the selector "#news h2 svg" should be applying to the cloned <svg>. The SVG spec has flip-flopped several times on exactly how styling and <use> interact, and I'm no longer sure what the behavior it specifies for this case is.
Component: Layout: View Rendering → SVG
Summary: Inline SVG opacity rendered different with embeded in img tag → Document rules applying to cloned content imported from a different SVG document with <use>
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
https://svgwg.org/svg2-draft/struct.html#UseElement says "CSS2 selectors cannot be applied to the (conceptually) cloned DOM tree because its contents are not part of the formal document structure."
We definitely don't seem to be doing that?
Flags: needinfo?(jwatt)
Comment 8•11 years ago
|
||
This is probably a version of bug 265894. (See bug 265894 comment 5 in particular, where that bug's current testcase was attached.)
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(jwatt)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•