WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
87223
[Shadow DOM] Node distribution should be orthogonal from node attachment
https://bugs.webkit.org/show_bug.cgi?id=87223
Summary
[Shadow DOM] Node distribution should be orthogonal from node attachment
Hajime Morrita
Reported
2012-05-23 00:23:26 PDT
We are computing node distribution during node attachment, which is horrible. It should be orthogonal concept and should be able to happen independently.
Attachments
WIP: passes tests
(31.85 KB, patch)
2012-05-25 01:23 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Patch
(34.08 KB, patch)
2012-05-28 04:15 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Patch
(34.21 KB, patch)
2012-05-28 17:50 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Fixing win build
(34.19 KB, patch)
2012-05-28 20:42 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Patch for landing
(34.20 KB, patch)
2012-05-29 17:31 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Hajime Morrita
Comment 1
2012-05-25 01:23:36 PDT
Created
attachment 144000
[details]
WIP: passes tests
Hajime Morrita
Comment 2
2012-05-25 01:24:54 PDT
I'm not ultra confident whether this lazy approach is better. Maybe it's better to keep the structure fresh.
Early Warning System Bot
Comment 3
2012-05-25 01:30:26 PDT
Comment on
attachment 144000
[details]
WIP: passes tests
Attachment 144000
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/12801394
Early Warning System Bot
Comment 4
2012-05-25 01:33:02 PDT
Comment on
attachment 144000
[details]
WIP: passes tests
Attachment 144000
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/12808301
Gyuyoung Kim
Comment 5
2012-05-25 01:33:48 PDT
Comment on
attachment 144000
[details]
WIP: passes tests
Attachment 144000
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/12807374
WebKit Review Bot
Comment 6
2012-05-25 01:37:57 PDT
Comment on
attachment 144000
[details]
WIP: passes tests
Attachment 144000
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/12803404
Build Bot
Comment 7
2012-05-25 01:38:55 PDT
Comment on
attachment 144000
[details]
WIP: passes tests
Attachment 144000
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/12793407
Build Bot
Comment 8
2012-05-25 01:45:33 PDT
Comment on
attachment 144000
[details]
WIP: passes tests
Attachment 144000
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/12791459
Dimitri Glazkov (Google)
Comment 9
2012-05-25 08:44:15 PDT
Comment on
attachment 144000
[details]
WIP: passes tests View in context:
https://bugs.webkit.org/attachment.cgi?id=144000&action=review
I will need to re-read this patch several times to really understand all the stuff that's happening. I like the direction and encourage you to continue your work.
> Source/WebCore/dom/Element.cpp:136 > + elementShadow->removeAllShadowRoots();
Curious why you decided to split this off from destructor.
> Source/WebCore/html/HTMLFormControlElement.cpp:-75 > - m_validationMessage = nullptr;
Can this change be split off into a separate patch?
> Source/WebCore/html/shadow/ContentDistributor.h:54 > + Dated = 1, > + Spoiling = 2,
What do these two mean?
Hajime Morrita
Comment 10
2012-05-27 17:29:56 PDT
Hi Dimitri, Thanks for taking a look! I'll update the patch with more detailed explanation on its ChangeLog entry. (In reply to
comment #9
)
> (From update of
attachment 144000
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=144000&action=review
> > I will need to re-read this patch several times to really understand all the stuff that's happening. I like the direction and encourage you to continue your work. > > > Source/WebCore/dom/Element.cpp:136 > > + elementShadow->removeAllShadowRoots(); > > Curious why you decided to split this off from destructor.
That's because InsertionPoint::detach(), which is called during this, now touches its ascendants. But the shadow root is already disconnected from the host at the point of the destructor. We need to give a change to insertion point to notify its removal to the host, to invalidate the distribution.
> > > Source/WebCore/html/HTMLFormControlElement.cpp:-75 > > - m_validationMessage = nullptr; > > Can this change be split off into a separate patch?
Sure. I have no intention to land this patch at once.
> > > Source/WebCore/html/shadow/ContentDistributor.h:54 > > + Dated = 1, > > + Spoiling = 2, > > What do these two mean?
Wel... Dated should be Invalid, and Spoiling could be Invalidating.... We need to distinguish these two because a tree-detach after invalidation can trigger ensureDistribution(). which we need to prevent. "Spoiling" (should be Invalidating) state lets the caller know the distribution is under invalidation and it shouldn't re-distribute there.
Hajime Morrita
Comment 11
2012-05-28 04:15:56 PDT
Created
attachment 144327
[details]
Patch
Build Bot
Comment 12
2012-05-28 04:41:58 PDT
Comment on
attachment 144327
[details]
Patch
Attachment 144327
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/12844198
Build Bot
Comment 13
2012-05-28 04:42:07 PDT
Comment on
attachment 144327
[details]
Patch
Attachment 144327
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/12851143
WebKit Review Bot
Comment 14
2012-05-28 04:42:26 PDT
Comment on
attachment 144327
[details]
Patch
Attachment 144327
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/12842180
Early Warning System Bot
Comment 15
2012-05-28 04:45:26 PDT
Comment on
attachment 144327
[details]
Patch
Attachment 144327
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/12843191
Early Warning System Bot
Comment 16
2012-05-28 04:47:44 PDT
Comment on
attachment 144327
[details]
Patch
Attachment 144327
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/12841231
Gyuyoung Kim
Comment 17
2012-05-28 04:55:55 PDT
Comment on
attachment 144327
[details]
Patch
Attachment 144327
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/12845213
Hajime Morrita
Comment 18
2012-05-28 17:50:46 PDT
Created
attachment 144415
[details]
Patch
Build Bot
Comment 19
2012-05-28 18:14:06 PDT
Comment on
attachment 144415
[details]
Patch
Attachment 144415
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/12852270
Hajime Morrita
Comment 20
2012-05-28 20:42:29 PDT
Created
attachment 144436
[details]
Fixing win build
Dimitri Glazkov (Google)
Comment 21
2012-05-29 10:01:57 PDT
Comment on
attachment 144436
[details]
Fixing win build View in context:
https://bugs.webkit.org/attachment.cgi?id=144436&action=review
This is a much cleaner design! I looked over the code a few times, and it seems to be workable. Let's give it a spin.
> Source/WebCore/ChangeLog:14 > + This change extracts these code to a set of ContentDistributor methods, which are
"these code" is awkward. Maybe "these bits of code"?
> Source/WebCore/ChangeLog:30 > + Here is such DOM mutations:
"Here are"
Hajime Morrita
Comment 22
2012-05-29 17:31:28 PDT
Thanks for reviewing this big chunk! I'll land this after recovering from the syntax error ;-)
Hajime Morrita
Comment 23
2012-05-29 17:31:49 PDT
Created
attachment 144655
[details]
Patch for landing
WebKit Review Bot
Comment 24
2012-05-29 20:33:37 PDT
Comment on
attachment 144655
[details]
Patch for landing Clearing flags on attachment: 144655 Committed
r118886
: <
http://trac.webkit.org/changeset/118886
>
WebKit Review Bot
Comment 25
2012-05-29 20:33:43 PDT
All reviewed patches have been landed. Closing bug.
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