[Webkit-unassigned] [Bug 77610] Introduces BuiltinShadowRoot and methods.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 6 00:45:03 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=77610





--- Comment #5 from Shinya Kawanaka <shinyak at chromium.org>  2012-02-06 00:45:03 PST ---
(From update of attachment 125579)
View in context: https://bugs.webkit.org/attachment.cgi?id=125579&action=review

>> Source/WebCore/ChangeLog:44
>> +        (WebCore::ColorInputType::createShadowSubtree):
> 
> Would it be simpler to, instead of introducing a new BuiltinShadowRoot type and new methods for built-in shadows, to just have elements which have built-in shadows like *InputType, HTMLDetailsElement, HTMLKeygenElement, HTMLMediaElement, HTMLTextAreaElement, etc. have a member that points to its built-in shadow root? It avoids the virtual method call, avoids new API, avoids a new type, etc.
> 
> You can leave the shadow root mechanism to manage the refcount of the built-in shadow root, since there is no way to remove them, and just use a raw pointer to the built-in shadow root.

Let me mention that there is a case that a shadow root is recreated now. For example, input element recreates shadow root when its type attribute is changed.
So we have to have a new API to insert/remove built-in shadow root now. Otherwise we have to change HTMLInputElement behavior.

This patch is a first step to support shadow subtree. Before adding multiple shadow subtrees, we must have a way to distinguish built-in shadow root from user generated shadow root because currently they are mixed. It is very confusing.

In my plan,
  (1) distinguish built-in and user generated shadow root.
  (2) allow us to have multiple shadow subtrees (with built-in shadow root and generated shadow root clearly separated)
  (3) removes ensureShadowRoot.
  (3) merge them if possible.

Maybe we can have a pointer to a built-in shadow root, however, I don't want to do in this patch. If we introduce such a pointer in this patch, we cannot share ensureBuiltinShadowRoot method. This will make this patch complex. I have a plan to kill this method later, so let's do that in later patch (3).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list