Closed
Bug 329600
Opened 20 years ago
Closed 20 years ago
Eliminate SVG observer usage in nsSVGStopFrame
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: jwatt, Assigned: scootermorris)
Details
Attachments
(1 file, 3 obsolete files)
|
7.86 KB,
patch
|
Details | Diff | Splinter Review |
Eliminate SVG observer usage in nsSVGStopFrame.
| Assignee | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
Comment on attachment 214453 [details] [diff] [review]
Remove observers
Might as well loose the protected: declaration from the class declaration, but there should be a public: declaration in there for many of those functions.
> /**
> * Get the "type" of the frame
> *
> * @see nsLayoutAtoms::svgStopFrame
> */
This should say nsGkAtoms now.
> NS_INTERFACE_MAP_BEGIN(nsSVGStopFrame)
>- NS_INTERFACE_MAP_ENTRY(nsISVGValueObserver)
>- NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
> NS_INTERFACE_MAP_END_INHERITING(nsSVGStopFrameBase)
I wonder if there's a prefered macro for when there are no interface map entries.
>+nsSVGStopFrame::AttributeChanged(PRInt32 aNameSpaceID,
>+ nsIAtom* aAttribute,
>+ PRInt32 aModType)
>+{
>+ if (aNameSpaceID == kNameSpaceID_None &&
>+ aAttribute == nsGkAtoms::offset) {
Uh, what about the Begin/EndBatchUpdate thing?
| Assignee | ||
Comment 3•20 years ago
|
||
Attachment #214453 -
Attachment is obsolete: true
Attachment #214474 -
Flags: review?(jwatt)
Attachment #214453 -
Flags: review?(jwatt)
| Reporter | ||
Comment 4•20 years ago
|
||
Can you put AttributeChanged above GetType, and DidSetStyleContext plus the nsIFrame comment above that? (That's the order they appear in in nsIFrame.h, and it puts the nsIFrame comment in the right place.) Also can you put an:
// nsIFrameDebug interface:
comment above the definition of GetFrameName (after the ifdef).
You can also loose the "protected:" above the friend declaration.
Can you replace |mParent->QueryInterface| with |CallQueryInterface|, and can you change |value| to |svgParent| to give it a more helpful name.
| Assignee | ||
Comment 5•20 years ago
|
||
Attachment #214474 -
Attachment is obsolete: true
Attachment #214566 -
Flags: review?(jwatt)
Attachment #214474 -
Flags: review?(jwatt)
| Reporter | ||
Comment 6•20 years ago
|
||
Comment on attachment 214566 [details] [diff] [review]
Address second round of comments
r=me. It is now a thing of beauty. :-)
Attachment #214566 -
Flags: review?(jwatt) → review+
| Reporter | ||
Comment 7•20 years ago
|
||
Although when I suggested using CallQueryInterface I actually meant like this:
if (NS_SUCCEEDED(CallQueryInterface(mParent, &svgParent))) {
| Assignee | ||
Updated•20 years ago
|
Attachment #214566 -
Flags: superreview?(roc)
Comment on attachment 214566 [details] [diff] [review]
Address second round of comments
This is OK, but the usage of Begin/EndBatchUpdate is hackish. nsSVGGradientFrame really needs a method to notify it that the stop has changed. We could make nsSVGGradientFrame public in its own .h file, and give it an IID so you can QI to it and call the method. Please file a followup bug on this.
Attachment #214566 -
Flags: superreview?(roc) → superreview+
Comment on attachment 214566 [details] [diff] [review]
Address second round of comments
This is OK, but the usage of Begin/EndBatchUpdate is hackish. nsSVGGradientFrame really needs a method to notify it that the stop has changed. We could make nsSVGGradientFrame public in its own .h file, and give it an IID so you can QI to it and call the method. Please file a followup bug on this.
| Assignee | ||
Comment 10•20 years ago
|
||
Checking in layout/svg/base/src/nsSVGStopFrame.cpp;
/cvsroot/mozilla/layout/svg/base/src/nsSVGStopFrame.cpp,v <-- nsSVGStopFrame.cpp
new revision: 1.9; previous revision: 1.8
done
checked in on trunk
r=jwatt/sr=roc
| Assignee | ||
Comment 11•20 years ago
|
||
Attachment #214566 -
Attachment is obsolete: true
| Assignee | ||
Updated•20 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•