[Webkit-unassigned] [Bug 50971] Combine setShadowRoot and clearShadowRoot into a simpler API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 28 09:06:30 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=50971
Dimitri Glazkov (Google) <dglazkov at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #76776| |commit-queue+
Flag| |
--- Comment #8 from Dimitri Glazkov (Google) <dglazkov at chromium.org> 2010-12-28 09:06:30 PST ---
(From update of attachment 76776)
View in context: https://bugs.webkit.org/attachment.cgi?id=76776&action=review
Cq to the resQUE! :)
>> WebCore/dom/Element.cpp:1089
>> + RefPtr<Node> newRoot = node;
>
> I'm not sure why you use the newRoot here. We don't really need the extra ref. Maybe Darin asked you to use a local RefPtr?
Yeah, I could've danced around this with just using node.get() when assigning m_shadowRoot to avoid PassRefPtr derefing. But I generally don't like using PassRefPtrs for doing anything other than passing :)
>> WebCore/dom/Element.cpp:1093
>> + ensureRareData()->m_shadowRoot = newRoot;
>
> You could just assign it here w/o the check, no?
No, because ensureRareData always creates a new ElementRareData, which is not necessary if newRoot is 0.
--
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