[Webkit-unassigned] [Bug 20263] [XBL] Add loading code for XBLBinding
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Aug 3 00:09:57 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=20263
eric at webkit.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #22619|review? |review-
Flag| |
------- Comment #2 from eric at webkit.org 2008-08-03 00:09 PDT -------
(From update of attachment 22619)
What does "hasIndex" mean? Maybe you mean "has fragment"? #foo is a "fragment
url", maybe the XBL spec calls it an index?
I wonder if it's safe to just grab weak pointers to other documents:
+ Document* bindingDocument;
+ if (documentURL == boundElement->document()->url())
+ // This is the case of an <xbl> element inside another document.
+ // The binding document is the bound document.
+ bindingDocument = boundElement->document();
Does this automatically ref?
+ m_cachedDocument =
boundElement->document()->docLoader()->requestXBLDocument(documentURL);
if so, when is the XBLBinding releasing the CachedDocument?
How does the .get() make sense here?
bindingDocument = m_cachedDocument->document().get();
does document() return a const RefPtr&?
I'm not sure this check is really necessary:
if (!m_id.isNull()) {
the hash-lookup of a NULL pointer won't be many more cycles :)
Why is it safe for XBLBinding to have a weak pointer to an XBLBindingElement?
+ Element* bindingElement = bindingDocument->getElementById(m_id);
+ if (bindingElement->isXBLElement() &&
static_cast<XBLElement*>(bindingElement)->isXBLBindingElement())
+ m_bindingElement =
static_cast<XBLBindingElement*>(bindingElement);
What if that binding element was removed from the document?
This could probably have a slightly more descriptive name:
+ String m_id;
r- for the leak of the CachedDocument and possible crash due to weak pointers.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list