It's difficult to support multiple shadow subtrees if a shadow root is recreated. We should change this.
Created attachment 126005 [details] Patch
Zimmermann, I'm now implementing "multiple shadow subtrees", which is described in https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html When "multiple shadow subtrees" is supported, a user can append a shadow root into any elements. SVG elements are not exceptional. So if a user adds a new shadow root into 'tref' element before tref adds shadow root by itself, a problem may happen. So I would like to ensure that a shadow root is created before user can add a new shadow root into this element. Do you think a problem happens if a shadow root is added in a construction phase? If not, I would like to proceed this change. If it does, we have to think another solution.
Comment on attachment 126005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=126005&action=review r- for the missing tests for now. Patch looks good in general. > Source/WebCore/ChangeLog:9 > + SVGTRefElement creates a shadow root dynamically. This will cause a problem to support > + multiple shadow subtrees. So it should be created in a constructor phase. > + > + Reviewed by NOBODY (OOPS!). These blocks should be swapped. Can you include a testcase that shows this problem? Otherwise this will break again in future. > Source/WebCore/svg/SVGTRefElement.cpp:61 > - return adoptRef(new SVGTRefElement(tagName, document)); > + RefPtr<SVGTRefElement> elem = adoptRef(new SVGTRefElement(tagName, document)); > + elem->createShadowSubtree(); > + return elem.release(); s/elem/element/ - no abbreviations please.
I'll resubmit this after Bug 77935 is landed. I'm now using it...
Created attachment 126417 [details] Patch
Comment on attachment 126417 [details] Patch Rejecting attachment 126417 [details] from commit-queue. shinyak@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
Comment on attachment 126417 [details] Patch Clearing flags on attachment: 126417 Committed r107523: <http://trac.webkit.org/changeset/107523>
All reviewed patches have been landed. Closing bug.
This bug is still mentioned in http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/dom/ShadowRoot.cpp&exact_package=chromium&q=allowsAuthorShadowRoot&type=cs&l=75. Should we remove the check now?