RESOLVED WONTFIX 106643
[Shadow DOM] Put node reprojection code behind ENABLE(SHADOW_DOM)
https://bugs.webkit.org/show_bug.cgi?id=106643
Summary [Shadow DOM] Put node reprojection code behind ENABLE(SHADOW_DOM)
Hajime Morrita
Reported 2013-01-11 01:55:16 PST
This is a main dish of Bug 103339. Although we need some cleanup work after this, this should hide most of complicated part of shadow dom. This should also include Bug 103208. I'd close it once this has landed.
Attachments
Patch (33.16 KB, patch)
2013-01-11 01:55 PST, Hajime Morrita
no flags
Patch (37.91 KB, patch)
2013-01-16 02:43 PST, Hajime Morrita
no flags
Patch (37.93 KB, patch)
2013-01-16 02:45 PST, Hajime Morrita
no flags
Patch (45.96 KB, patch)
2013-01-22 04:02 PST, Hajime Morrita
no flags
Patch (46.26 KB, patch)
2013-01-22 18:26 PST, Hajime Morrita
no flags
Fixing Mac and Win build (59.91 KB, patch)
2013-01-22 20:29 PST, Hajime Morrita
no flags
Patch (68.15 KB, patch)
2013-01-22 21:16 PST, Hajime Morrita
no flags
Patch (69.79 KB, patch)
2013-01-24 01:37 PST, Hajime Morrita
no flags
Patch (74.64 KB, patch)
2013-01-24 03:02 PST, Hajime Morrita
no flags
Patch (74.12 KB, patch)
2013-01-24 17:23 PST, Hajime Morrita
no flags
Patch (79.29 KB, patch)
2013-01-24 22:23 PST, Hajime Morrita
no flags
Patch (85.69 KB, patch)
2013-01-24 23:21 PST, Hajime Morrita
no flags
WIP (64.19 KB, patch)
2013-01-25 01:32 PST, Hajime Morrita
andersca: review-
eflews.bot: commit-queue-
Hajime Morrita
Comment 1 2013-01-11 01:55:46 PST
Build Bot
Comment 2 2013-01-11 02:01:39 PST
EFL EWS Bot
Comment 3 2013-01-11 02:03:19 PST
Build Bot
Comment 4 2013-01-11 02:18:21 PST
WebKit Review Bot
Comment 5 2013-01-11 05:16:31 PST
Comment on attachment 182298 [details] Patch Attachment 182298 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15805365 New failing tests: accessibility/aria-checkbox-checked.html animations/3d/matrix-transform-type-animation.html http/tests/appcache/cyrillic-uri.html accessibility/anchor-linked-anonymous-block-crash.html animations/animation-add-events-in-handler.html http/tests/appcache/deferred-events-delete-while-raising.html animations/additive-transform-animations.html animations/3d/replace-filling-transform.html http/tests/appcache/deferred-events-delete-while-raising-timer.html accessibility/aria-describedby-on-input.html http/tests/appcache/crash-when-navigating-away-then-back.html animations/animation-border-overflow.html animations/animation-direction-alternate-reverse.html accessibility/accessibility-object-detached.html http/tests/appcache/abort-cache-ondownloading-manifest-404.html http/tests/appcache/credential-url.html http/tests/appcache/access-via-redirect.php animations/3d/change-transform-in-end-event.html accessibility/aria-controls-with-tabs.html http/tests/appcache/destroyed-frame.html animations/animation-controller-drt-api.html animations/3d/transform-perspective.html accessibility/accessibility-node-reparent.html http/tests/appcache/deferred-events.html animations/3d/state-at-end-event-transform.html animations/animation-direction-normal.html animations/3d/transform-origin-vs-functions.html accessibility/accessibility-node-memory-management.html animations/animation-css-rule-types.html accessibility/adjacent-continuations-cause-assertion-failure.html
Dimitri Glazkov (Google)
Comment 6 2013-01-11 09:32:58 PST
Comment on attachment 182298 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182298&action=review > Source/WebCore/css/StyleScopeResolver.cpp:219 > +#if ENABLE(SHADOW_DOM) > if (!ScopeContentDistribution::hasShadowElement(shadowRoot)) > break; > +#else > + break; > +#endif Factor into an inline function to reduce the number of ifdefs in this file?
Hajime Morrita
Comment 7 2013-01-16 02:43:22 PST
Hajime Morrita
Comment 8 2013-01-16 02:45:09 PST
Build Bot
Comment 9 2013-01-16 02:54:52 PST
Build Bot
Comment 10 2013-01-16 03:17:59 PST
WebKit Review Bot
Comment 11 2013-01-16 04:12:43 PST
Comment on attachment 182947 [details] Patch Attachment 182947 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15905347 New failing tests: fast/dom/shadow/composed-shadow-tree-walker.html editing/shadow/insertorderedlist-crash.html editing/shadow/selection-of-orphan-shadowroot.html fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html editing/shadow/select-contenteditable-shadowhost.html accessibility/corresponding-control-deleted-crash.html fast/dom/shadow/athost-atrules.html editing/shadow/doubleclick-on-meter-in-shadow-crash.html editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html editing/shadow/breaking-editing-boundary-with-table.html fast/dom/shadow/compare-document-position.html fast/dom/shadow/composed-shadow-tree-walker-shadow-reprojection.html fast/css/style-scoped/style-scoped-apply-author-styles.html fast/dom/shadow/adopt-node-with-shadow-root.html editing/shadow/rightclick-on-meter-in-shadow-crash.html editing/shadow/shadow-selection-not-exported.html editing/shadow/contenteditable-propagation-at-shadow-boundary.html fast/block/block-remove-child-delete-line-box-crash.html fast/dom/shadow/access-key.html fast/css/style-scoped/style-scoped-in-shadow.html editing/shadow/bold-twice-in-shadow.html fast/dom/HTMLTemplateElement/cycles-in-shadow.html editing/shadow/breaking-editing-boundaries-2.html fast/css/style-scoped/style-scoped-with-important-rule.html editing/shadow/selection-of-shadowroot.html editing/shadow/execcommand-indent-in-shadow.html fast/css/style-scoped/style-scoped-nested.html editing/shadow/breaking-editing-boundaries.html editing/shadow/delete-characters-in-distributed-node-crash.html editing/shadow/compare-positions-in-nested-shadow.html
WebKit Review Bot
Comment 12 2013-01-16 05:11:25 PST
Comment on attachment 182947 [details] Patch Attachment 182947 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15905367 New failing tests: fast/dom/shadow/composed-shadow-tree-walker.html editing/shadow/insertorderedlist-crash.html editing/shadow/selection-of-orphan-shadowroot.html fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html editing/shadow/select-contenteditable-shadowhost.html accessibility/corresponding-control-deleted-crash.html fast/dom/shadow/athost-atrules.html editing/shadow/doubleclick-on-meter-in-shadow-crash.html editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html editing/shadow/breaking-editing-boundary-with-table.html fast/dom/shadow/compare-document-position.html fast/dom/shadow/composed-shadow-tree-walker-shadow-reprojection.html fast/css/style-scoped/style-scoped-apply-author-styles.html fast/dom/shadow/adopt-node-with-shadow-root.html editing/shadow/rightclick-on-meter-in-shadow-crash.html editing/shadow/shadow-selection-not-exported.html editing/shadow/contenteditable-propagation-at-shadow-boundary.html fast/block/block-remove-child-delete-line-box-crash.html fast/dom/shadow/access-key.html fast/css/style-scoped/style-scoped-in-shadow.html editing/shadow/bold-twice-in-shadow.html fast/dom/HTMLTemplateElement/cycles-in-shadow.html editing/shadow/breaking-editing-boundaries-2.html fast/css/style-scoped/style-scoped-with-important-rule.html editing/shadow/selection-of-shadowroot.html editing/shadow/execcommand-indent-in-shadow.html fast/css/style-scoped/style-scoped-nested.html editing/shadow/breaking-editing-boundaries.html editing/shadow/delete-characters-in-distributed-node-crash.html editing/shadow/compare-positions-in-nested-shadow.html
Build Bot
Comment 13 2013-01-17 03:12:49 PST
Comment on attachment 182947 [details] Patch Attachment 182947 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/15926548
Hajime Morrita
Comment 14 2013-01-22 04:02:51 PST
Hajime Morrita
Comment 15 2013-01-22 04:05:06 PST
This one is almost ready.
Build Bot
Comment 16 2013-01-22 04:40:07 PST
WebKit Review Bot
Comment 17 2013-01-22 05:31:14 PST
Comment on attachment 183960 [details] Patch Attachment 183960 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16038511 New failing tests: fast/dom/shadow/composed-shadow-tree-walker.html editing/shadow/insertorderedlist-crash.html editing/shadow/selection-of-orphan-shadowroot.html fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html editing/shadow/select-contenteditable-shadowhost.html accessibility/corresponding-control-deleted-crash.html fast/dom/click-method-on-html-element.html fast/dom/shadow/athost-atrules.html editing/shadow/doubleclick-on-meter-in-shadow-crash.html editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html editing/shadow/breaking-editing-boundary-with-table.html fast/dom/shadow/compare-document-position.html fast/dom/shadow/composed-shadow-tree-walker-shadow-reprojection.html fast/css/style-scoped/style-scoped-apply-author-styles.html fast/dom/shadow/adopt-node-with-shadow-root.html editing/shadow/rightclick-on-meter-in-shadow-crash.html editing/shadow/shadow-selection-not-exported.html editing/shadow/contenteditable-propagation-at-shadow-boundary.html fast/css/style-scoped/style-scoped-with-important-rule.html fast/dom/shadow/access-key.html fast/css/style-scoped/style-scoped-in-shadow.html editing/shadow/bold-twice-in-shadow.html fast/dom/HTMLTemplateElement/cycles-in-shadow.html editing/shadow/breaking-editing-boundaries-2.html editing/shadow/selection-of-shadowroot.html editing/shadow/execcommand-indent-in-shadow.html fast/css/style-scoped/style-scoped-nested.html editing/shadow/breaking-editing-boundaries.html editing/shadow/delete-characters-in-distributed-node-crash.html editing/shadow/compare-positions-in-nested-shadow.html
Build Bot
Comment 18 2013-01-22 05:46:12 PST
Hajime Morrita
Comment 19 2013-01-22 18:26:51 PST
Hajime Morrita
Comment 20 2013-01-22 20:29:15 PST
Created attachment 184117 [details] Fixing Mac and Win build
Hajime Morrita
Comment 21 2013-01-22 21:16:36 PST
Build Bot
Comment 22 2013-01-23 02:01:18 PST
Comment on attachment 184129 [details] Patch Attachment 184129 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16073128 New failing tests: fullscreen/full-screen-render-inline.html inspector/elements/shadow-root.html svg/custom/use-multiple-on-nested-disallowed-font.html
Build Bot
Comment 23 2013-01-23 03:08:43 PST
Comment on attachment 184129 [details] Patch Attachment 184129 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16063534 New failing tests: fullscreen/full-screen-render-inline.html inspector/elements/shadow-root.html svg/custom/use-multiple-on-nested-disallowed-font.html
Build Bot
Comment 24 2013-01-23 13:14:21 PST
Comment on attachment 184129 [details] Patch Attachment 184129 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16075310 New failing tests: svg/custom/use-multiple-on-nested-disallowed-font.html inspector/elements/shadow-root.html fullscreen/full-screen-render-inline.html
Hajime Morrita
Comment 25 2013-01-24 01:37:29 PST
Hajime Morrita
Comment 26 2013-01-24 03:02:01 PST
WebKit Review Bot
Comment 27 2013-01-24 04:50:03 PST
Attachment 184454 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fullscreen/full-screen-render-inline-expected.png', u'LayoutTests/fullscreen/full-screen-render-inline-expected.txt', u'LayoutTests/platform/mac-wk2/TestExpectations', u'LayoutTests/platform/mac/TestExpectations', u'LayoutTests/platform/mac/fast/html/details-nested-2-expected.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/css/StyleResolver.cpp', u'Source/WebCore/css/StyleScopeResolver.cpp', u'Source/WebCore/css/StyleScopeResolver.h', u'Source/WebCore/dom/AncestorChainWalker.cpp', u'Source/WebCore/dom/ComposedShadowTreeWalker.cpp', u'Source/WebCore/dom/ComposedShadowTreeWalker.h', u'Source/WebCore/dom/Element.cpp', u'Source/WebCore/dom/ElementShadow.cpp', u'Source/WebCore/dom/ElementShadow.h', u'Source/WebCore/dom/NodeRenderingTraversal.cpp', u'Source/WebCore/dom/NodeRenderingTraversal.h', u'Source/WebCore/dom/ShadowRoot.cpp', u'Source/WebCore/dom/ShadowRoot.h', u'Source/WebCore/html/HTMLDetailsElement.cpp', u'Source/WebCore/html/HTMLDetailsElement.h', u'Source/WebCore/html/HTMLInputElement.cpp', u'Source/WebCore/html/shadow/ContentDistributor.cpp', u'Source/WebCore/html/shadow/ContentDistributor.h', u'Source/WebCore/html/shadow/ContentSelectorQuery.cpp', u'Source/WebCore/html/shadow/ContentSelectorQuery.h', u'Source/WebCore/html/shadow/HTMLContentElement.h', u'Source/WebCore/html/shadow/InsertionPoint.cpp', u'Source/WebCore/html/shadow/InsertionPoint.h', u'Source/WebCore/html/shadow/SelectRuleFeatureSet.cpp', u'Source/WebCore/html/shadow/SelectRuleFeatureSet.h', u'Source/WebCore/svg/SVGUseElement.cpp', u'Source/WebCore/svg/SVGUseElement.h', u'Source/WebCore/testing/Internals.cpp', u'Source/WebKit/win/ChangeLog', u'Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in']" exit_code: 1 LayoutTests/fullscreen/full-screen-render-inline-expected.png:0: Have to enable auto props in the subversion config file (/home/alancutter/.subversion/config "enable-auto-props = yes"). Have to set the svn:mime-type in the subversion config file (/home/alancutter/.subversion/config "*.png = svn:mime-type=image/png"). [image/png] [5] Total errors found: 1 in 36 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antti Koivisto
Comment 28 2013-01-24 05:09:33 PST
There seems to be a lot of confusing code and complexity here purely because of <details> elements Shadow DOM dependency. It might be better to move it off the Shadow DOM first.
WebKit Review Bot
Comment 29 2013-01-24 05:31:34 PST
Comment on attachment 184454 [details] Patch Attachment 184454 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16077694 New failing tests: fullscreen/full-screen-render-inline.html
Dimitri Glazkov (Google)
Comment 30 2013-01-24 07:37:59 PST
(In reply to comment #28) > There seems to be a lot of confusing code and complexity here purely because of <details> elements Shadow DOM dependency. It might be better to move it off the Shadow DOM first. Shadow DOM is the right way to implement this. I don't understand why we would be forcing ourselves to churn this from Shadow DOM implementation to some one-off hack and back to it again?
Hajime Morrita
Comment 31 2013-01-24 17:23:48 PST
Adam Barth
Comment 32 2013-01-24 21:47:51 PST
This "cure" seems worse than the disease. This patch reads like an in-place fork of WebCore.
Adam Barth
Comment 33 2013-01-24 21:48:31 PST
(In reply to comment #28) > There seems to be a lot of confusing code and complexity here purely because of <details> elements Shadow DOM dependency. It might be better to move it off the Shadow DOM first. Or we could just accept the fact that Shadow DOM is part of WebCore and skip all this make-work.
Hajime Morrita
Comment 34 2013-01-24 22:23:01 PST
Hajime Morrita
Comment 35 2013-01-24 22:33:39 PST
The last patch tried to make it clear which part is for non-SHADOW_DOM <details> implementations. I hope I could make it work even with SHADOW_DOM flag. But it's so hard - just like it is hard to make <input> work with shadow DOM.
WebKit Review Bot
Comment 36 2013-01-24 22:58:08 PST
Comment on attachment 184665 [details] Patch Attachment 184665 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16121136
Hajime Morrita
Comment 37 2013-01-24 23:21:50 PST
Hajime Morrita
Comment 38 2013-01-25 00:45:05 PST
> > Or we could just accept the fact that Shadow DOM is part of WebCore and skip all this make-work. Actually, this is what Antti did at Bug 103208. Probably I should go that way.
Hajime Morrita
Comment 39 2013-01-25 01:32:47 PST
Antti Koivisto
Comment 40 2013-01-25 01:47:27 PST
(In reply to comment #33) > Or we could just accept the fact that Shadow DOM is part of WebCore and skip all this make-work. No such decision has been made. Shadow DOM is currently strictly an experiment. If you want to make that argument please do it elsewhere.
EFL EWS Bot
Comment 41 2013-01-25 04:21:49 PST
WebKit Review Bot
Comment 42 2013-01-25 04:36:23 PST
Comment on attachment 184698 [details] WIP Attachment 184698 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16119266 New failing tests: fast/dom/shadow/composed-shadow-tree-walker.html editing/shadow/insertorderedlist-crash.html editing/shadow/selection-of-orphan-shadowroot.html fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html editing/shadow/select-contenteditable-shadowhost.html accessibility/corresponding-control-deleted-crash.html fast/dom/shadow/athost-atrules.html editing/shadow/doubleclick-on-meter-in-shadow-crash.html editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html editing/shadow/breaking-editing-boundary-with-table.html fast/dom/HTMLTemplateElement/cycles-in-shadow.html fast/dom/shadow/composed-shadow-tree-walker-shadow-reprojection.html fast/css/style-scoped/style-scoped-apply-author-styles.html fast/dom/shadow/adopt-node-with-shadow-root.html editing/shadow/rightclick-on-meter-in-shadow-crash.html editing/shadow/shadow-selection-not-exported.html editing/shadow/contenteditable-propagation-at-shadow-boundary.html fast/css/style-scoped/style-scoped-with-important-rule.html fast/dom/shadow/access-key.html fast/css/style-scoped/style-scoped-in-shadow.html editing/shadow/bold-twice-in-shadow.html fast/dom/shadow/compare-document-position.html editing/shadow/breaking-editing-boundaries-2.html editing/shadow/selection-of-shadowroot.html editing/shadow/execcommand-indent-in-shadow.html fast/css/style-scoped/style-scoped-nested.html editing/shadow/breaking-editing-boundaries.html fast/dom/shadow/content-after-style.html editing/shadow/delete-characters-in-distributed-node-crash.html editing/shadow/compare-positions-in-nested-shadow.html
Build Bot
Comment 43 2013-01-25 05:48:51 PST
Build Bot
Comment 44 2013-01-25 05:50:40 PST
Comment on attachment 184698 [details] WIP Attachment 184698 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16120284
Build Bot
Comment 45 2013-01-25 06:53:03 PST
Dimitri Glazkov (Google)
Comment 46 2013-01-25 07:42:32 PST
(In reply to comment #40) > (In reply to comment #33) > > Or we could just accept the fact that Shadow DOM is part of WebCore and skip all this make-work. > > No such decision has been made. Shadow DOM is currently strictly an experiment. If you want to make that argument please do it elsewhere. Can you help me understand this a bit more? I think you're saying that there's a process that takes a new feature in WebKit from some stage that called "experiment" to another stage where it's not. As far as I know, we don't have any process like that. We just announce a feature on webkit-dev, have a spirited discussion, and then, if everyone is content, we build it (http://www.webkit.org/coding/adding-features.html) -- which is what happened with Shadow DOM. Would you like me to start another discussion on webkit-dev to baptize Shadow DOM somehow? Should we have a modification to our typical process to clarify this?
Antti Koivisto
Comment 47 2013-01-25 09:47:37 PST
We use feature flags for non-core (things that not everyone ships) and experimental (work-in-progress standards, things no one ships) features. This automatically prevents orthogonal features and the core from becoming dependent on them. Had this been done properly in the first place <details> could not depend on the Shadow DOM infrastructure now. If you want to argue that Shadow DOM is a core feature that should not be behind a feature flag then that is definitely a new discussion.
Adam Barth
Comment 48 2013-01-25 17:05:37 PST
I think it's appropriate to use ENABLE macros to hide APIs from the web. However, I don't see any reason why we shouldn't use these facilities internally in the engine. The patch just reads like you're angry and want Shadow DOM to get off your lawn and you don't care about making a mess of WebCore in the process. For better or worse, we share this lawn and we should worth together to make it beautiful rather than working at cross purposes.
Dominic Cooney
Comment 49 2013-01-28 06:20:45 PST
Comment on attachment 184698 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=184698&action=review > Source/WebCore/ChangeLog:14 > + Since <detail> and <summary> are relying on this mechanism, Nit: <detail> => <details> > Source/WebCore/ChangeLog:15 > + they are now disabled when ENABLE(SHADOW_DOM) is not given. Is this correct? Because in the patch it looks like ShadowTreeWalker is there to support details/summary when SHADOW_DOM isn’t enabled. > Source/WebCore/WebCore.exp.in:2531 > +__ZN7WebCore18ContentDistributor22ensureSelectFeatureSetEPNS_13ElementShadowE These symbols are kept in sorted order, I think; this should be sorted.
Anders Carlsson
Comment 50 2013-09-28 20:43:52 PDT
Comment on attachment 184698 [details] WIP We're removing Shadow DOM.
Note You need to log in before you can comment on or make changes to this bug.