WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
82089
Match DOM4 spec with respect to DocumentFragment insertion
https://bugs.webkit.org/show_bug.cgi?id=82089
Summary
Match DOM4 spec with respect to DocumentFragment insertion
Adam Klein
Reported
2012-03-23 14:06:52 PDT
Match DOM4 spec with respect to DocumentFragment insertion
Attachments
Patch
(18.69 KB, patch)
2012-03-23 14:15 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch
(19.01 KB, patch)
2012-03-23 14:17 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch
(19.01 KB, patch)
2012-03-23 14:31 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch minus replaceChild ordering change
(15.80 KB, patch)
2012-03-23 15:19 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Adam Klein
Comment 1
2012-03-23 14:15:10 PDT
Created
attachment 133557
[details]
Patch
Adam Klein
Comment 2
2012-03-23 14:17:36 PDT
Created
attachment 133558
[details]
Patch
Philippe Normand
Comment 3
2012-03-23 14:23:03 PDT
Comment on
attachment 133558
[details]
Patch
Attachment 133558
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/12122801
Early Warning System Bot
Comment 4
2012-03-23 14:28:06 PDT
Comment on
attachment 133558
[details]
Patch
Attachment 133558
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/12123773
Adam Klein
Comment 5
2012-03-23 14:31:20 PDT
Created
attachment 133564
[details]
Patch
Ryosuke Niwa
Comment 6
2012-03-23 15:04:21 PDT
Comment on
attachment 133558
[details]
Patch Talked with aklein in person. There appears to be some errors in the spec with respect to the order of mutations. I've asked aklein to separate the atomic-removal from a document fragment for now since that's a pretty safe change to make.
Adam Klein
Comment 7
2012-03-23 15:19:02 PDT
Created
attachment 133570
[details]
Patch minus replaceChild ordering change
Ryosuke Niwa
Comment 8
2012-03-23 15:31:40 PDT
Comment on
attachment 133570
[details]
Patch minus replaceChild ordering change View in context:
https://bugs.webkit.org/attachment.cgi?id=133570&action=review
> Source/WebCore/dom/ContainerNode.cpp:287 > + if (next && (next->previousSibling() == newChild || next == newChild)) // nothing to do
What if next had been removed from this during the mutation event? r- because of this. In general, it's better to define a boolean or a helper function that documents this than adding a comment like "nothing to do",
Ryosuke Niwa
Comment 9
2012-03-23 15:38:28 PDT
Comment on
attachment 133570
[details]
Patch minus replaceChild ordering change View in context:
https://bugs.webkit.org/attachment.cgi?id=133570&action=review
>> Source/WebCore/dom/ContainerNode.cpp:287 >> + if (next && (next->previousSibling() == newChild || next == newChild)) // nothing to do > > What if next had been removed from this during the mutation event? r- because of this. > > In general, it's better to define a boolean or a helper function that documents this than adding a comment like "nothing to do",
On my second thought, this condition was present in the old code and it'll only match one-node case so this is probably okay.
> Source/WebCore/dom/ContainerNode.cpp:-289 > - // If the new child is already in the right place, we're done. > - if (next && (next == child || next == child->previousSibling())) > - break;
I don't think this old code was correct to begin with for the document fragment case since there are more nodes next in the targets. It's probably a left over from the days we still used to iterate through nextSibling instead of collecting nodes upfront.
WebKit Review Bot
Comment 10
2012-03-23 15:51:43 PDT
Comment on
attachment 133570
[details]
Patch minus replaceChild ordering change Clearing flags on attachment: 133570 Committed
r111925
: <
http://trac.webkit.org/changeset/111925
>
WebKit Review Bot
Comment 11
2012-03-23 15:51:49 PDT
All reviewed patches have been landed. Closing bug.
Ryosuke Niwa
Comment 12
2012-03-29 00:35:21 PDT
Note a regression fix was landed in
http://trac.webkit.org/changeset/112323
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug