Bug 77938 - SVGTRefElement shouldn't dynamically create a shadow root.
: SVGTRefElement shouldn't dynamically create a shadow root.
: WebKit
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
: 77503
  Show dependency treegraph
Reported: 2012-02-06 22:38 PST by
Modified: 2012-05-30 09:41 PST (History)

Patch (3.45 KB, patch)
2012-02-07 22:33 PST, Shinya Kawanaka
no flags Review Patch | Details | Formatted Diff | Diff
Patch (6.33 KB, patch)
2012-02-09 18:04 PST, Shinya Kawanaka
no flags Review Patch | Details | Formatted Diff | Diff


You need to log in before you can comment on or make changes to this bug.

Description From 2012-02-06 22:38:09 PST
It's difficult to support multiple shadow subtrees if a shadow root is recreated.
We should change this.
------- Comment #1 From 2012-02-07 22:33:36 PST -------
Created an attachment (id=126005) [details]
------- Comment #2 From 2012-02-07 22:45:35 PST -------

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 #3 From 2012-02-08 01:46:46 PST -------
(From update of attachment 126005 [details])
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.
------- Comment #4 From 2012-02-08 23:57:49 PST -------
I'll resubmit this after Bug 77935 is landed. I'm now using it...
------- Comment #5 From 2012-02-09 18:04:15 PST -------
Created an attachment (id=126417) [details]
------- Comment #6 From 2012-02-12 17:35:51 PST -------
(From update of attachment 126417 [details])
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 #7 From 2012-02-12 19:35:35 PST -------
(From update of attachment 126417 [details])
Clearing flags on attachment: 126417

Committed r107523: <http://trac.webkit.org/changeset/107523>
------- Comment #8 From 2012-02-12 19:35:40 PST -------
All reviewed patches have been landed.  Closing bug.