Closed
Bug 734656
Opened 13 years ago
Closed 13 years ago
Make the NS_STATE_SVG_NONDISPLAY_CHILD classes easier to find
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Attachments
(2 files, 2 obsolete files)
(deleted),
patch
|
longsonr
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
longsonr
:
review+
|
Details | Diff | Splinter Review |
The way we have nsSVGContainerFrame set NS_STATE_SVG_NONDISPLAY_CHILD, and then have nsSVGDisplayContainerFrame inherit nsSVGContainerFrame is not great design. Worse, nsSVGDisplayContainerFrame and its sub-classes do not clear that bit which makes the code confusing when you're trying to understand how NS_STATE_SVG_NONDISPLAY_CHILD works. The (very easy to miss) trick is that nsSVGDisplayContainerFrame::Init calls nsSVGContainerFrameBase::Init, and _not_ nsSVGDisplayContainerFrameBase::Init, thereby skipping over the nsSVGContainerFrame::Init method which sets the NS_STATE_SVG_NONDISPLAY_CHILD bit.
I assume the reason for this ugly way of doing things was to avoid adding extra virtual Init methods to the frames that need NS_STATE_SVG_NONDISPLAY_CHILD set. However, we can set the bit in their ctors instead, which is what we should do I think. Setting the bit on the frames than need it helps clarify which frames have this bit set rather than obfuscating it, and in fact it allows us to _remove_ the virtual Init method on nsSVGContainerFrame.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #604654 -
Flags: review?
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #604654 -
Attachment is obsolete: true
Attachment #604655 -
Flags: review?(longsonr)
Attachment #604654 -
Flags: review?
Assignee | ||
Comment 3•13 years ago
|
||
This adds handling for the <defs> and unknown SVG element case, which I forgot.
Attachment #604655 -
Attachment is obsolete: true
Attachment #604656 -
Flags: review?(longsonr)
Attachment #604655 -
Flags: review?(longsonr)
Assignee | ||
Comment 4•13 years ago
|
||
Attachment #604657 -
Flags: review?(longsonr)
Updated•13 years ago
|
Attachment #604656 -
Flags: review?(longsonr) → review+
Updated•13 years ago
|
Attachment #604657 -
Attachment is patch: true
Attachment #604657 -
Flags: review?(longsonr) → review+
Comment 5•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2a4ff84e15cd
https://hg.mozilla.org/mozilla-central/rev/eff92312950a
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•