[Webkit-unassigned] [Bug 14455] Autogenerate the JS bindings for the StyleSheetList
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 30 14:55:00 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=14455
sam at webkit.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |darin at apple.com
------- Comment #3 from sam at webkit.org 2007-06-30 14:54 PDT -------
(In reply to comment #2)
> (From update of attachment 15307 [edit])
> + HTMLStyleElement* element = thisObj->impl()->getNamedItem(propertyName);
> + return toJS(exec, element->sheet());
>
> Looks like this won't do the right thing if element is 0. Maybe a pre-existing
> problem?
This will never be called if element is 0 as it is only called after the
canGetItemsForName() function which checks.
> - // IE also supports retrieving a stylesheet by name, using the name/id of
> the <style> tag
> - // (this is consistent with all the other collections)
> - // ### Bad implementation because returns a single element (are IDs always
> unique?)
> - // and doesn't look for name attribute (see implementation above).
> - // But unicity of stylesheet ids is good practice anyway ;)
>
> Where did all these comments go?
Oops, forgot to move that, fixing it.
> +HTMLStyleElement* StyleSheetList::getNamedItem(const String& name) const
> +{
> + Element* element = m_doc->getElementById(name);
>
> What guarantees the document in m_doc has not yet been destroyed?
Now, I am not 100% sure, but since Document is the only one that creates and
the StyleSheetList and stores it and it should be deleted when it is destroyed
this should not be an issue.
--
Configure bugmail: http://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