Closed
Bug 562698
Opened 15 years ago
Closed 14 years ago
Pass Elements to AttributeChanged
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla2.0b5
People
(Reporter: bzbarsky, Assigned: Ms2ger)
References
Details
Attachments
(3 files, 9 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
AttributeChanged can only happen for Elements, so we should pass those to it.
Reporter | ||
Updated•14 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #462854 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•14 years ago
|
OS: Mac OS X → All
Priority: P2 → P3
Hardware: x86 → All
Reporter | ||
Comment 3•14 years ago
|
||
Comment on attachment 462852 [details] [diff] [review]
Patch a: nsIMutationObserver::AttributeChanged v1
General comment: I'd prefer that we rename the argument to aElement in consumers... Calling it aContent when it's an Element is a little silly.
If some of these would be nontrivial patches, then followup patches is good instead of rolling it into this one, though.
>+++ b/content/base/public/nsIMutationObserver.h
>-#ifndef nsIMutationObserver_h___
>-#define nsIMutationObserver_h___
Why this change?
>-{ 0x85eea794, 0xed8e, 0x4e1b, \
>- { 0xa1, 0x28, 0xd0, 0x93, 0x00, 0xae, 0x51, 0xaa } }
>+{ 0xe49a4a59, 0xb302, 0x4ca3, \
>+ { 0xac, 0x2c, 0xd7, 0xd0, 0xef, 0x6f, 0x25, 0x39 } }
No need for that; this is a binary-compatible change at the moment.
>+++ b/content/base/src/nsContentList.cpp
>+nsContentList::AttributeChanged(nsIDocument *aDocument, Element* aContent,
Again, aElement; this applies to all the consumers.
> NS_PRECONDITION(aContent->IsElement(), "Should be an element");
This assertion can obviously go away.
Was there a reason to not also patch AttributeWillChange? If no, please fix it too.
Attachment #462852 -
Flags: review?(bzbarsky) → review-
Reporter | ||
Comment 4•14 years ago
|
||
And nsCSSFrameConstructor::AttributeChanged/WillChange need fixing too, no?
Reporter | ||
Comment 5•14 years ago
|
||
Comment on attachment 462854 [details] [diff] [review]
Part b: nsNodeUtils::AttributeChanged v1
r=bzbarsky
Attachment #462854 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 6•14 years ago
|
||
(In reply to comment #3)
> Comment on attachment 462852 [details] [diff] [review]
> Patch a: nsIMutationObserver::AttributeChanged v1
>
> General comment: I'd prefer that we rename the argument to aElement in
> consumers... Calling it aContent when it's an Element is a little silly.
>
> If some of these would be nontrivial patches, then followup patches is good
> instead of rolling it into this one, though.
OK. I wasn't sure about taking blame for those lines, but you're right.
> >+++ b/content/base/public/nsIMutationObserver.h
> >-#ifndef nsIMutationObserver_h___
> >-#define nsIMutationObserver_h___
>
> Why this change?
As David Baron said in bug 514661 comment 25, all names with two consecutive underscores are reserved to the implementation. (Though he suggests a single trailing underscore, I'm not sure why.) I'll leave it for another bug, if you prefer.
> >-{ 0x85eea794, 0xed8e, 0x4e1b, \
> >- { 0xa1, 0x28, 0xd0, 0x93, 0x00, 0xae, 0x51, 0xaa } }
> >+{ 0xe49a4a59, 0xb302, 0x4ca3, \
> >+ { 0xac, 0x2c, 0xd7, 0xd0, 0xef, 0x6f, 0x25, 0x39 } }
>
> No need for that; this is a binary-compatible change at the moment.
OK.
> >+++ b/content/base/src/nsContentList.cpp
> >+nsContentList::AttributeChanged(nsIDocument *aDocument, Element* aContent,
>
> Again, aElement; this applies to all the consumers.
>
> > NS_PRECONDITION(aContent->IsElement(), "Should be an element");
>
> This assertion can obviously go away.
Done.
> Was there a reason to not also patch AttributeWillChange? If no, please fix it
> too.
No, I'll write a patch, probably tomorrow.
(In reply to comment #4)
> And nsCSSFrameConstructor::AttributeChanged/WillChange need fixing too, no?
Fixed.
Attachment #462852 -
Attachment is obsolete: true
Attachment #462890 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•14 years ago
|
Attachment #462854 -
Attachment description: Part b: nsNodeUtils::AttributeChanged v2 → Part b: nsNodeUtils::AttributeChanged v1
Reporter | ||
Comment 7•14 years ago
|
||
Comment on attachment 462890 [details] [diff] [review]
Part a: nsIMutationObserver::AttributeChanged v2
> +++ b/layout/base/nsCSSFrameConstructor.h
>+ void AttributeChanged(mozilla::dom::Element* aElement,
That can just be |Element*|, without the prefix (see the typedef in this class).
r=me with that.
Attachment #462890 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 8•14 years ago
|
||
Attachment #463479 -
Flags: review?(bzbarsky)
Reporter | ||
Comment 9•14 years ago
|
||
Comment on attachment 463479 [details] [diff] [review]
Part c: AttributeWillChange v1
r=bzbarsky. Followup on the css declaration thing?
Attachment #463479 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•14 years ago
|
Attachment #462854 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #462890 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #463479 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #462854 -
Flags: approval2.0? → approval2.0+
Updated•14 years ago
|
Attachment #462890 -
Flags: approval2.0? → approval2.0+
Updated•14 years ago
|
Attachment #463479 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 10•14 years ago
|
||
Attachment #462890 -
Attachment is obsolete: true
Assignee | ||
Comment 11•14 years ago
|
||
Attachment #462854 -
Attachment is obsolete: true
Assignee | ||
Comment 12•14 years ago
|
||
Attachment #463479 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 13•14 years ago
|
||
part a doesn't seem to apply cleanly anymore.
patching file layout/xul/base/src/tree/src/nsTreeContentView.cpp
Hunk #1 FAILED at 41
Keywords: checkin-needed
Assignee | ||
Comment 14•14 years ago
|
||
Let's try this again.
Attachment #463608 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 15•14 years ago
|
||
next failure in part b:
patching file parser/html/nsHtml5TreeOperation.cpp
Hunk #1 FAILED at 54
1 out of 2 hunks FAILED -- saving rejects to file parser/html/nsHtml5TreeOperation.cpp.rej
Keywords: checkin-needed
Assignee | ||
Comment 16•14 years ago
|
||
Attachment #463610 -
Attachment is obsolete: true
Assignee | ||
Comment 17•14 years ago
|
||
These really should apply.
Attachment #463611 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 19•14 years ago
|
||
This one includes the bustage fix.
Attachment #464343 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 20•14 years ago
|
||
patching file layout/svg/base/src/nsSVGEffects.cpp
Hunk #1 FAILED at 166
1 out of 1 hunks FAILED -- saving rejects to file layout/svg/base/src/nsSVGEffects.cpp.rej
Keywords: checkin-needed
Assignee | ||
Comment 21•14 years ago
|
||
Parts b and c still apply fine. Thanks a lot for your patience with me, Dão.
Attachment #463781 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 22•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9933c41be195
http://hg.mozilla.org/mozilla-central/rev/715fc9643c0c
http://hg.mozilla.org/mozilla-central/rev/f203095c85de
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b5
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•