Closed
Bug 137382
Opened 24 years ago
Closed 22 years ago
Redundant check for SVG namespace
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: hwaara, Assigned: hwaara)
References
Details
Attachments
(1 file, 2 obsolete files)
5.15 KB,
patch
|
Details | Diff | Splinter Review |
There are two checks for the correct namespace in ConstructSVGFrame(), one can
be removed.
![]() |
Assignee | |
Comment 1•24 years ago
|
||
bbaetz, can you r=?
![]() |
Assignee | |
Comment 2•24 years ago
|
||
Actually, since the only caller to ConstructSVGFrame has the namespace check as
well as a requirement, we can skip the other one in ConstructSVGFrame() too.
See
http://lxr.mozilla.org/seamonkey/source/layout/html/style/src/nsCSSFrameConstructor.cpp#7302
![]() |
Assignee | |
Comment 3•24 years ago
|
||
Removes two redundant namespace checks.
Attachment #79148 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 4•24 years ago
|
||
Since this is a general (and trivial) CSSFrameConstructor patch, CC dbaron for r=.
BTW, I don't think sr= is required, since SVG is NPOB.
You should get SVG module owner review. Note that this re-enables
nsSVGAtoms::nameSpaceDeprecatedID.
![]() |
Assignee | |
Comment 6•24 years ago
|
||
Yes, I figured it was a bug that we didn't allow that namespace.
![]() |
||
Comment 7•24 years ago
|
||
r=afri.
Can you remove the test for the deprecated namespace as well please? We should
only allow the official namespace.
At some stage we should go through the source with a fine comb and get rid of
all references to nsSVGAtoms::nameSpaceDeprecatedID.
![]() |
Assignee | |
Comment 8•24 years ago
|
||
Changes:
* Eliminate deprecated namespace.
* Fix some minor typos in nsIFrameManager.h
* Remove redundant namespace checks when constructing a SVG frame.
Afri, could you re-r= this?
Attachment #79176 -
Attachment is obsolete: true
![]() |
||
Comment 9•24 years ago
|
||
Looks good.
r=afri
IMO, ConstructSVGFrame should at least have an assertion, since that code may be
restructured at some point in the near future.
![]() |
Assignee | |
Comment 11•24 years ago
|
||
Assert for what?
![]() |
Assignee | |
Comment 12•24 years ago
|
||
Oh, for being in the proper namespace? I'll include that in the patch and then
checkin.
![]() |
Assignee | |
Comment 14•24 years ago
|
||
Checked in on the trunk today.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
![]() |
||
Comment 15•23 years ago
|
||
This patch introduces bogus assertions for xbl-wrapped svg elements - e.g. try
http://www.croczilla.com/svg/xbl-shapes.xml.
The NS_ASSERTION in ConstructSVGFrame uses nsIContent::GetNameSpaceID(), which
is incorrect for xbl-wrapped content. The namespace needs to be resolved using
ResolveTag(). Also aNameSpaceID is already passed in as a parameter to
ConstructSVGFrame(), so there is no need to actually re-resolve it.
Here's what the assertion should look like:
Index: nsCSSFrameConstructor.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp,v
retrieving revision 1.745
diff -u -r1.745 nsCSSFrameConstructor.cpp
--- nsCSSFrameConstructor.cpp 26 May 2002 17:07:07 -0000 1.745
+++ nsCSSFrameConstructor.cpp 14 Jun 2002 14:13:06 -0000
@@ -6986,8 +6988,7 @@
nsIStyleContext*
aStyleContext,
nsFrameItems& aFrameItems)
{
- NS_ASSERTION(NS_SUCCEEDED(aContent->GetNameSpaceID(aNameSpaceID)) &&
- (aNameSpaceID == nsSVGAtoms::nameSpaceID), "SVG frame constructed
in wrong namespace");
+ NS_ASSERTION(aNameSpaceID == nsSVGAtoms::nameSpaceID, "SVG frame constructed
in wrong namespace");
nsresult rv = NS_OK;
PRBool isAbsolutelyPositioned = PR_FALSE;
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
![]() |
Assignee | |
Comment 16•23 years ago
|
||
r=hwaara; go ahead and check-in the change.
![]() |
||
Comment 17•22 years ago
|
||
Checked in as part of bug 182533.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•