[webkit-reviews] review denied: [Bug 14455] Autogenerate the JS bindings for the StyleSheetList : [Attachment 15307] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 30 11:37:41 PDT 2007

Darin Adler <darin at apple.com> has denied Sam Weinig <sam at webkit.org>'s request
for review:
Bug 14455: Autogenerate the JS bindings for the StyleSheetList

Attachment 15307: patch

------- Additional Comments from Darin Adler <darin at apple.com>
+    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

-    // 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
-    // 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?

+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?

More information about the webkit-reviews mailing list