Closed
Bug 1370116
Opened 7 years ago
Closed 7 years ago
SVGTextFrame::ShouldRenderAsPath using the wrong ancestor frame?
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
Attachments
(2 files)
1.16 KB,
text/plain
|
Details | |
912 bytes,
patch
|
longsonr
:
review+
|
Details | Diff | Splinter Review |
I was shuffling around some private nsBlockFrame frame state bits
and discovered that this broke some SVG tests. The error appears
to be this line in SVGTextFrame::ShouldRenderAsPath:
http://searchfox.org/mozilla-central/rev/507743376d1ba753d14ab6b9305b7c6358570be8/layout/svg/SVGTextFrame.cpp#5201
In the test layout/reftests/svg/text/ignore-float-first-letter.svg
the ancestor frame there is a nsBlockFrame, so when I made this change:
+FRAME_STATE_BIT(Block, 21, NS_BLOCK_HAS_FIRST_LETTER_CHILD)
it made the above line think it was this bit:
FRAME_STATE_BIT(SVG, 21, NS_STATE_SVG_CLIPPATH_CHILD)
This line comes from bug 1078031. The odd thing is that what actually
landed is different from the reviewed patch in the bug, which looks
like this instead:
+ if (GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) {
https://bugzilla.mozilla.org/attachment.cgi?id=8500171&action=diff#a/layout/svg/SVGTextFrame.cpp_sec8
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Attachment #8874485 -
Flags: review?(longsonr)
Comment 4•7 years ago
|
||
I don't think this is right. The logic should look like that in currently in SVGTextDrawPathCallbacks::IsClipPathChild i.e. https://dxr.mozilla.org/mozilla-central/source/layout/svg/SVGTextFrame.cpp#2772
Using some common code for identifying whether we're a clipPath child would be even better.
Updated•7 years ago
|
Attachment #8874485 -
Flags: review?(longsonr) → review-
Assignee | ||
Comment 5•7 years ago
|
||
I saw that solution before filing this patch, but I just don't see how the nearest
SVGText can be something other than |this| here. Can you explain why you think
that can happen?
There's only one caller of SVGTextFrame::ShouldRenderAsPath:
http://searchfox.org/mozilla-central/rev/507743376d1ba753d14ab6b9305b7c6358570be8/layout/svg/SVGTextFrame.cpp#3693
Comment 6•7 years ago
|
||
Ahh yes you're right.
Updated•7 years ago
|
Attachment #8874485 -
Flags: review- → review+
Comment 7•7 years ago
|
||
getting the nearest ancestor svgTextFrame to the aFrame will just give you the this pointer you already have.
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4af93deae530
Use the correct ancestor frame (i.e. |this|) of aFrame for checking NS_STATE_SVG_CLIPPATH_CHILD. r=longsonr
Comment 9•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•