Closed
Bug 346373
Opened 19 years ago
Closed 19 years ago
Changing spellcheck attribute on parent element doesn't resync children
Categories
(Core :: Spelling checker, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8.1
People
(Reporter: zerodpx, Assigned: zerodpx)
References
Details
(Keywords: fixed1.8.1)
Attachments
(2 files, 1 obsolete file)
510 bytes,
text/html
|
Details | |
3.06 KB,
patch
|
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
From bug 339127 comment 55, when the spellcheck attribute on a node changes, all the node's children should resync, not just the node itself. Otherwise dynamic changes to attributes won't affect inheriting editors "on the fly".
Assignee | ||
Comment 1•19 years ago
|
||
This testcase demonstrates the issue.
Assignee | ||
Comment 2•19 years ago
|
||
This patch fixes my testcase.
The only tricky bit here is that we should traverse past non-HTML elements to their children during the subtree notification. This patch should get that right, but I don't have a testcase demonstrating it.
Attachment #234856 -
Flags: superreview?(bugmail)
Attachment #234856 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 3•19 years ago
|
||
Requesting blocking since we need to actually implement the spellcheck attribute spec correctly in Fx2.
![]() |
||
Comment 4•19 years ago
|
||
Comment on attachment 234856 [details] [diff] [review]
patch v1
>Index: content/html/content/src/nsGenericHTMLElement.cpp
>+ nsIContent* childContent = content->GetChildAt(i);
>+ if (childContent) {
No need for that check if we're sure the child list cannot mutate.
r=bzbarsky with that
Attachment #234856 -
Flags: review?(bzbarsky) → review+
Updated•19 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Comment on attachment 234856 [details] [diff] [review]
patch v1
sr=me with bz's comment. But if you're not 100% sure that the DOM can't mutate just keep the extra check. Better safe then sorry...
Attachment #234856 -
Flags: superreview?(bugmail) → superreview+
Assignee | ||
Comment 6•19 years ago
|
||
Checked in on trunk:
/mozilla/content/html/content/src/nsGenericHTMLElement.cpp 1.668
/mozilla/content/html/content/src/nsGenericHTMLElement.h 1.246
I don't think the DOM can mutate, but I'd rather be defensive. So I left the check in, but added an assertion that the childContent pointer is non-NULL right before it.
Leaving open until this makes it onto branch.
Whiteboard: [baking]
Assignee | ||
Comment 7•19 years ago
|
||
Here's what I actually committed.
Attachment #234856 -
Attachment is obsolete: true
Attachment #235333 -
Flags: approval1.8.1?
Comment 8•19 years ago
|
||
Comment on attachment 235333 [details] [diff] [review]
patch (as committed)
a=schrep for drivers
Attachment #235333 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Comment 9•19 years ago
|
||
Checked in on branch.
/mozilla/content/html/content/src/nsGenericHTMLElement.cpp 1.596.2.14
/mozilla/content/html/content/src/nsGenericHTMLElement.h 1.221.6.4
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [baking]
You need to log in
before you can comment on or make changes to this bug.
Description
•