Use ownerNode() instead of base() in HTMLCollection
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 17:52:50 +0000 (17:52 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 17:52:50 +0000 (17:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104244

Reviewed by Adam Barth.

Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
Notice that the definition of base(), which this patch removes, is "return ownerNode()".

* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::indexSetter):
(WebCore::JSHTMLOptionsCollection::remove):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateOpaqueRootForGC):
* bindings/scripts/IDLAttributes.txt:
* bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::removeCallback):
(WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::ownerNode):
* dom/WebKitNamedFlow.h:
(WebKitNamedFlow):
* dom/WebKitNamedFlow.idl:
* html/HTMLAllCollection.idl:
* html/HTMLCollection.h:
(HTMLCollection):
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::HTMLFormControlsCollection::create):
(WebCore::HTMLFormControlsCollection::formControlElements):
(WebCore::HTMLFormControlsCollection::formImageElements):
(WebCore::HTMLFormControlsCollection::namedItem):
(WebCore::HTMLFormControlsCollection::updateNameCache):
* html/HTMLFormControlsCollection.idl:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::~HTMLNameCollection):
(WebCore::HTMLNameCollection::virtualItemAfter):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
(WebCore::HTMLOptionsCollection::remove):
(WebCore::HTMLOptionsCollection::selectedIndex):
(WebCore::HTMLOptionsCollection::setSelectedIndex):
(WebCore::HTMLOptionsCollection::setLength):
* html/HTMLOptionsCollection.idl:
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::updateRefElements):
(WebCore::HTMLPropertiesCollection::namedItem):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::virtualItemAfter):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136850 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/IDLAttributes.txt
Source/WebCore/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
Source/WebCore/dom/WebKitNamedFlow.cpp
Source/WebCore/dom/WebKitNamedFlow.h
Source/WebCore/dom/WebKitNamedFlow.idl
Source/WebCore/html/HTMLAllCollection.idl
Source/WebCore/html/HTMLCollection.h
Source/WebCore/html/HTMLCollection.idl
Source/WebCore/html/HTMLFormControlsCollection.cpp
Source/WebCore/html/HTMLFormControlsCollection.idl
Source/WebCore/html/HTMLNameCollection.cpp
Source/WebCore/html/HTMLOptionsCollection.cpp
Source/WebCore/html/HTMLOptionsCollection.idl
Source/WebCore/html/HTMLPropertiesCollection.cpp
Source/WebCore/html/HTMLTableRowsCollection.cpp

index 1e726fa..29f0da1 100644 (file)
@@ -1,3 +1,61 @@
+2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Use ownerNode() instead of base() in HTMLCollection
+        https://bugs.webkit.org/show_bug.cgi?id=104244
+
+        Reviewed by Adam Barth.
+
+        Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
+        Notice that the definition of base(), which this patch removes, is "return ownerNode()".
+
+        * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
+        (WebCore::getNamedItems):
+        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+        (WebCore::JSHTMLOptionsCollection::indexSetter):
+        (WebCore::JSHTMLOptionsCollection::remove):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateOpaqueRootForGC):
+        * bindings/scripts/IDLAttributes.txt:
+        * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
+        (WebCore::getNamedItems):
+        * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+        (WebCore::V8HTMLOptionsCollection::removeCallback):
+        (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
+        * dom/WebKitNamedFlow.cpp:
+        (WebCore::WebKitNamedFlow::ownerNode):
+        * dom/WebKitNamedFlow.h:
+        (WebKitNamedFlow):
+        * dom/WebKitNamedFlow.idl:
+        * html/HTMLAllCollection.idl:
+        * html/HTMLCollection.h:
+        (HTMLCollection):
+        * html/HTMLCollection.idl:
+        * html/HTMLFormControlsCollection.cpp:
+        (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
+        (WebCore::HTMLFormControlsCollection::create):
+        (WebCore::HTMLFormControlsCollection::formControlElements):
+        (WebCore::HTMLFormControlsCollection::formImageElements):
+        (WebCore::HTMLFormControlsCollection::namedItem):
+        (WebCore::HTMLFormControlsCollection::updateNameCache):
+        * html/HTMLFormControlsCollection.idl:
+        * html/HTMLNameCollection.cpp:
+        (WebCore::HTMLNameCollection::~HTMLNameCollection):
+        (WebCore::HTMLNameCollection::virtualItemAfter):
+        * html/HTMLOptionsCollection.cpp:
+        (WebCore::HTMLOptionsCollection::add):
+        (WebCore::HTMLOptionsCollection::remove):
+        (WebCore::HTMLOptionsCollection::selectedIndex):
+        (WebCore::HTMLOptionsCollection::setSelectedIndex):
+        (WebCore::HTMLOptionsCollection::setLength):
+        * html/HTMLOptionsCollection.idl:
+        * html/HTMLPropertiesCollection.cpp:
+        (WebCore::HTMLPropertiesCollection::updateRefElements):
+        (WebCore::HTMLPropertiesCollection::namedItem):
+        * html/HTMLTableRowsCollection.cpp:
+        (WebCore::HTMLTableRowsCollection::virtualItemAfter):
+
 2012-12-06  Tommy Widenflycht  <tommyw@google.com>
 
         Speech Recognition API: Change the error code to a string on SpeechRecognitionError
index 01c3060..3a8c7fc 100644 (file)
@@ -49,7 +49,7 @@ static JSValue getNamedItems(ExecState* exec, JSHTMLFormControlsCollection* coll
         return toJS(exec, collection->globalObject(), namedItems[0].get());
 
     ASSERT(collection->impl()->type() == FormControls);
-    return toJS(exec, collection->globalObject(), collection->impl()->base()->radioNodeList(name).get());
+    return toJS(exec, collection->globalObject(), collection->impl()->ownerNode()->radioNodeList(name).get());
 }
 
 bool JSHTMLFormControlsCollection::canGetItemsForName(ExecState*, HTMLFormControlsCollection* collection, PropertyName propertyName)
index 8c07936..e74d097 100644 (file)
@@ -90,7 +90,7 @@ void JSHTMLOptionsCollection::setLength(ExecState* exec, JSValue value)
 void JSHTMLOptionsCollection::indexSetter(ExecState* exec, unsigned index, JSValue value)
 {
     HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl());
-    HTMLSelectElement* base = toHTMLSelectElement(imp->base());
+    HTMLSelectElement* base = toHTMLSelectElement(imp->ownerNode());
     selectIndexSetter(base, exec, index, value);
 }
 
@@ -118,7 +118,7 @@ JSValue JSHTMLOptionsCollection::add(ExecState* exec)
 JSValue JSHTMLOptionsCollection::remove(ExecState* exec)
 {
     HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl());
-    JSHTMLSelectElement* base = jsCast<JSHTMLSelectElement*>(asObject(toJS(exec, globalObject(), imp->base())));
+    JSHTMLSelectElement* base = jsCast<JSHTMLSelectElement*>(asObject(toJS(exec, globalObject(), imp->ownerNode())));
     return base->remove(exec);
 }
 
index e8203dc..022d637 100644 (file)
@@ -2510,8 +2510,8 @@ sub GenerateImplementation
                 $rootString .= "    void* root = WebCore::root(element);\n";
             } elsif ($interfaceName eq "CanvasRenderingContext") {
                 $rootString  = "    void* root = WebCore::root(js${interfaceName}->impl()->canvas());\n";
-            } elsif (GetGenerateIsReachable($interface) eq "ImplBaseRoot") {
-                $rootString  = "    void* root = WebCore::root(js${interfaceName}->impl()->base());\n";
+            } elsif (GetGenerateIsReachable($interface) eq "ImplOwnerNodeRoot") {
+                $rootString  = "    void* root = WebCore::root(js${interfaceName}->impl()->ownerNode());\n";
             } else {
                 $rootString  = "    void* root = WebCore::root(js${interfaceName}->impl());\n";
             }
index 77704a6..5d91735 100644 (file)
@@ -195,8 +195,7 @@ END
     if (GetGenerateIsReachable($interface) eq  "ImplDocument" ||
         GetGenerateIsReachable($interface) eq  "ImplElementRoot" ||
         GetGenerateIsReachable($interface) eq  "ImplOwnerRoot" ||
-        GetGenerateIsReachable($interface) eq  "ImplOwnerNodeRoot" ||
-        GetGenerateIsReachable($interface) eq  "ImplBaseRoot") {
+        GetGenerateIsReachable($interface) eq  "ImplOwnerNodeRoot") {
 
         $implIncludes{"V8GCController.h"} = 1;
 
@@ -205,7 +204,6 @@ END
         $methodName = "element" if (GetGenerateIsReachable($interface) eq "ImplElementRoot");
         $methodName = "owner" if (GetGenerateIsReachable($interface) eq "ImplOwnerRoot");
         $methodName = "ownerNode" if (GetGenerateIsReachable($interface) eq "ImplOwnerNodeRoot");
-        $methodName = "base" if (GetGenerateIsReachable($interface) eq "ImplBaseRoot");
 
         push(@implContent, <<END);
     if (Node* owner = impl->${methodName}())
index 7090f66..ba91c43 100644 (file)
@@ -53,7 +53,7 @@ DoNotCheckSecurityOnGetter
 DoNotCheckSecurityOnSetter
 EventTarget
 ExtendsDOMGlobalObject
-GenerateIsReachable=ImplDocument|ImplElementRoot|ImplBaseRoot
+GenerateIsReachable=ImplDocument|ImplElementRoot|ImplOwnerNodeRoot
 Immutable
 ImplementedAs=*
 IndexedGetter
@@ -76,7 +76,7 @@ JSCustomPushEventHandlerScope
 JSCustomSetter
 JSCustomToJSObject
 JSCustomToNativeObject
-JSGenerateIsReachable=|Impl|ImplContext|ImplDocument|ImplElementRoot|ImplFrame|ImplBaseRoot
+JSGenerateIsReachable=|Impl|ImplContext|ImplDocument|ImplElementRoot|ImplFrame|ImplOwnerNodeRoot
 JSGenerateToJSObject
 JSGenerateToNativeObject
 JSInlineGetOwnPropertySlot
@@ -118,7 +118,7 @@ V8DependentLifetime
 V8DoNotCheckSignature
 V8EnabledAtRuntime=*
 V8EnabledPerContext=*
-V8GenerateIsReachable=ImplDocument|ImplElementRoot|ImplOwnerRoot|ImplOwnerNodeRoot|ImplBaseRoot
+V8GenerateIsReachable=ImplDocument|ImplElementRoot|ImplOwnerRoot|ImplOwnerNodeRoot
 V8NoWrapperCache
 V8MeasureAs=*
 V8ReadOnly
index 40f2ff9..522ca7b 100644 (file)
@@ -50,7 +50,7 @@ static v8::Handle<v8::Value> getNamedItems(HTMLFormControlsCollection* collectio
     if (namedItems.size() == 1)
         return toV8(namedItems.at(0).release(), creationContext, isolate);
 
-    return toV8(collection->base()->radioNodeList(name).get(), creationContext, isolate);
+    return toV8(collection->ownerNode()->radioNodeList(name).get(), creationContext, isolate);
 }
 
 v8::Handle<v8::Value> V8HTMLFormControlsCollection::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
index c9cc0fe..4f85122 100644 (file)
@@ -88,7 +88,7 @@ v8::Handle<v8::Value> V8HTMLOptionsCollection::removeCallback(const v8::Argument
 {
     INC_STATS("DOM.HTMLOptionsCollection.remove()");
     HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder());
-    HTMLSelectElement* base = static_cast<HTMLSelectElement*>(imp->base());
+    HTMLSelectElement* base = static_cast<HTMLSelectElement*>(imp->ownerNode());
     return removeElement(base, args);
 }
 
@@ -155,7 +155,7 @@ v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertySetter(uint32_t in
 {
     INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertySetter");
     HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.Holder());
-    HTMLSelectElement* base = static_cast<HTMLSelectElement*>(collection->base());
+    HTMLSelectElement* base = static_cast<HTMLSelectElement*>(collection->ownerNode());
     return toOptionsCollectionSetter(index, value, base, info.GetIsolate());
 }
 
index ab26302..99f9148 100644 (file)
@@ -216,7 +216,7 @@ ScriptExecutionContext* WebKitNamedFlow::scriptExecutionContext() const
     return m_flowManager->document();
 }
 
-Node* WebKitNamedFlow::base() const
+Node* WebKitNamedFlow::ownerNode() const
 {
     return m_flowManager->document();
 }
index 9069ad5..c544a89 100644 (file)
@@ -67,7 +67,7 @@ public:
 
     // This function is called from the JS binding code to determine if the NamedFlow object is reachable or not.
     // If the object has listeners, the object should only be discarded if the parent Document is not reachable.
-    Node* base() const;
+    Node* ownerNode() const;
 
     void setRenderer(RenderNamedFlowThread* parentFlowThread);
 
index a46058e..11ee4ad 100644 (file)
@@ -30,7 +30,7 @@
 [
     EventTarget,
     JSGenerateToJSObject,
-    GenerateIsReachable=ImplBaseRoot
+    GenerateIsReachable=ImplOwnerNodeRoot
 ] interface WebKitNamedFlow {
     readonly attribute DOMString name;
     readonly attribute boolean overset;
index c9bc92c..4d714fb 100644 (file)
@@ -28,7 +28,7 @@
     NamedGetter,
     CustomCall,
     MasqueradesAsUndefined,
-    GenerateIsReachable=ImplBaseRoot,
+    GenerateIsReachable=ImplOwnerNodeRoot,
     V8DependentLifetime
 ] interface HTMLAllCollection {
     readonly attribute unsigned long length;
index 1707f56..1352e7e 100644 (file)
@@ -62,7 +62,6 @@ public:
         return item(0) && !item(1);
     }
 
-    Node* base() const { return ownerNode(); }
     virtual Element* virtualItemAfter(unsigned& offsetInArray, Element*) const;
 
 protected:
index 1e175df..d38a704 100644 (file)
@@ -22,7 +22,7 @@
     IndexedGetter,
     NamedGetter,
     CustomToJSObject,
-    GenerateIsReachable=ImplBaseRoot,
+    GenerateIsReachable=ImplOwnerNodeRoot,
     V8DependentLifetime,
     ObjCPolymorphic
 ] interface HTMLCollection {
index aac92ba..1ba0305 100644 (file)
@@ -36,15 +36,15 @@ using namespace HTMLNames;
 // Since the collections are to be "live", we have to do the
 // calculation every time if anything has changed.
 
-HTMLFormControlsCollection::HTMLFormControlsCollection(Node* base)
-    : HTMLCollection(base, FormControls, OverridesItemAfter)
+HTMLFormControlsCollection::HTMLFormControlsCollection(Node* ownerNode)
+    : HTMLCollection(ownerNode, FormControls, OverridesItemAfter)
 {
-    ASSERT(base->hasTagName(formTag) || base->hasTagName(fieldsetTag));
+    ASSERT(ownerNode->hasTagName(formTag) || ownerNode->hasTagName(fieldsetTag));
 }
 
-PassRefPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(Node* base, CollectionType)
+PassRefPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(Node* ownerNode, CollectionType)
 {
-    return adoptRef(new HTMLFormControlsCollection(base));
+    return adoptRef(new HTMLFormControlsCollection(ownerNode));
 }
 
 HTMLFormControlsCollection::~HTMLFormControlsCollection()
@@ -53,18 +53,18 @@ HTMLFormControlsCollection::~HTMLFormControlsCollection()
 
 const Vector<FormAssociatedElement*>& HTMLFormControlsCollection::formControlElements() const
 {
-    ASSERT(base());
-    ASSERT(base()->hasTagName(formTag) || base()->hasTagName(fieldsetTag));
-    if (base()->hasTagName(formTag))
-        return static_cast<HTMLFormElement*>(base())->associatedElements();
-    return static_cast<HTMLFieldSetElement*>(base())->associatedElements();
+    ASSERT(ownerNode());
+    ASSERT(ownerNode()->hasTagName(formTag) || ownerNode()->hasTagName(fieldsetTag));
+    if (ownerNode()->hasTagName(formTag))
+        return static_cast<HTMLFormElement*>(ownerNode())->associatedElements();
+    return static_cast<HTMLFieldSetElement*>(ownerNode())->associatedElements();
 }
 
 const Vector<HTMLImageElement*>& HTMLFormControlsCollection::formImageElements() const
 {
-    ASSERT(base());
-    ASSERT(base()->hasTagName(formTag));
-    return static_cast<HTMLFormElement*>(base())->imageElements();
+    ASSERT(ownerNode());
+    ASSERT(ownerNode()->hasTagName(formTag));
+    return static_cast<HTMLFormElement*>(ownerNode())->imageElements();
 }
 
 Element* HTMLFormControlsCollection::virtualItemAfter(unsigned& offset, Element* previousItem) const
@@ -111,7 +111,7 @@ Node* HTMLFormControlsCollection::namedItem(const AtomicString& name) const
     // attribute. If a match is not found, the method then searches for an
     // object with a matching name attribute, but only on those elements
     // that are allowed a name attribute.
-    const Vector<HTMLImageElement*>* imagesElements = base()->hasTagName(fieldsetTag) ? 0 : &formImageElements();
+    const Vector<HTMLImageElement*>* imagesElements = ownerNode()->hasTagName(fieldsetTag) ? 0 : &formImageElements();
     if (HTMLElement* item = firstNamedItem(formControlElements(), imagesElements, idAttr, name))
         return item;
 
@@ -144,7 +144,7 @@ void HTMLFormControlsCollection::updateNameCache() const
         }
     }
 
-    if (base()->hasTagName(formTag)) {
+    if (ownerNode()->hasTagName(formTag)) {
         const Vector<HTMLImageElement*>& imageElementsArray = formImageElements();
         for (unsigned i = 0; i < imageElementsArray.size(); ++i) {
             HTMLImageElement* element = imageElementsArray[i];
index 99fafee..001a3ee 100644 (file)
@@ -21,7 +21,7 @@
 [
     IndexedGetter,
     NamedGetter,
-    GenerateIsReachable=ImplBaseRoot,
+    GenerateIsReachable=ImplOwnerNodeRoot,
     V8DependentLifetime,
 ] interface HTMLFormControlsCollection : HTMLCollection {
     [Custom] Node namedItem(in [Optional=DefaultIsUndefined] DOMString name);
index 9e48527..329be06 100644 (file)
@@ -41,8 +41,8 @@ HTMLNameCollection::HTMLNameCollection(Node* document, CollectionType type, cons
 
 HTMLNameCollection::~HTMLNameCollection()
 {
-    ASSERT(base());
-    ASSERT(base()->isDocumentNode());
+    ASSERT(ownerNode());
+    ASSERT(ownerNode()->isDocumentNode());
     ASSERT(type() == WindowNamedItems || type() == DocumentNamedItems);
 
     ownerNode()->nodeLists()->removeCacheWithAtomicName(this, type(), m_name);
@@ -51,15 +51,15 @@ HTMLNameCollection::~HTMLNameCollection()
 Element* HTMLNameCollection::virtualItemAfter(unsigned& offsetInArray, Element* previous) const
 {
     ASSERT_UNUSED(offsetInArray, !offsetInArray);
-    ASSERT(previous != base());
+    ASSERT(previous != ownerNode());
 
     Node* current;
     if (!previous)
-        current = base()->firstChild();
+        current = ownerNode()->firstChild();
     else
-        current = previous->traverseNextNode(base());
+        current = previous->traverseNextNode(ownerNode());
 
-    for (; current; current = current->traverseNextNode(base())) {
+    for (; current; current = current->traverseNextNode(ownerNode())) {
         if (!current->isElementNode())
             continue;
         Element* e = static_cast<Element*>(current);
index 75b707e..855a407 100644 (file)
@@ -58,7 +58,7 @@ void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, int index
     }
 
     ec = 0;
-    HTMLSelectElement* select = toHTMLSelectElement(base());
+    HTMLSelectElement* select = toHTMLSelectElement(ownerNode());
 
     if (index == -1 || unsigned(index) >= length())
         select->add(newOption, 0, ec);
@@ -70,22 +70,22 @@ void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, int index
 
 void HTMLOptionsCollection::remove(int index)
 {
-    toHTMLSelectElement(base())->remove(index);
+    toHTMLSelectElement(ownerNode())->remove(index);
 }
 
 int HTMLOptionsCollection::selectedIndex() const
 {
-    return toHTMLSelectElement(base())->selectedIndex();
+    return toHTMLSelectElement(ownerNode())->selectedIndex();
 }
 
 void HTMLOptionsCollection::setSelectedIndex(int index)
 {
-    toHTMLSelectElement(base())->setSelectedIndex(index);
+    toHTMLSelectElement(ownerNode())->setSelectedIndex(index);
 }
 
 void HTMLOptionsCollection::setLength(unsigned length, ExceptionCode& ec)
 {
-    toHTMLSelectElement(base())->setLength(length, ec);
+    toHTMLSelectElement(ownerNode())->setLength(length, ec);
 }
 
 } //namespace
index 0a3eb74..74fb710 100644 (file)
@@ -22,7 +22,7 @@
     JSGenerateToNativeObject,
     CustomIndexedSetter,
     NamedGetter,
-    GenerateIsReachable=ImplBaseRoot,
+    GenerateIsReachable=ImplOwnerNodeRoot,
     V8DependentLifetime,
 ] interface HTMLOptionsCollection : HTMLCollection {
     attribute long selectedIndex;
index 00e3372..f757e2f 100644 (file)
@@ -66,7 +66,7 @@ void HTMLPropertiesCollection::updateRefElements() const
 
     m_itemRefElements.clear();
     setItemRefElementsCacheValid();
-    toHTMLElement(base())->getItemRefElements(m_itemRefElements);
+    toHTMLElement(ownerNode())->getItemRefElements(m_itemRefElements);
 }
 
 static Node* nextNodeWithProperty(Node* rootNode, Node* previous, Node* ownerNode)
@@ -137,7 +137,7 @@ PassRefPtr<DOMStringList> HTMLPropertiesCollection::names() const
 
 PassRefPtr<PropertyNodeList> HTMLPropertiesCollection::namedItem(const String& name) const
 {
-    return base()->propertyNodeList(name);
+    return ownerNode()->propertyNodeList(name);
 }
 
 bool HTMLPropertiesCollection::hasNamedItem(const AtomicString& name) const
index 9845936..55fb9c2 100644 (file)
@@ -166,7 +166,7 @@ Element* HTMLTableRowsCollection::virtualItemAfter(unsigned& offsetInArray, Elem
 {
     ASSERT_UNUSED(offsetInArray, !offsetInArray);
     ASSERT(!previous || (previous->isHTMLElement() && toHTMLElement(previous)->hasLocalName(trTag)));
-    return rowAfter(static_cast<HTMLTableElement*>(base()), static_cast<HTMLTableRowElement*>(previous));
+    return rowAfter(static_cast<HTMLTableElement*>(ownerNode()), static_cast<HTMLTableRowElement*>(previous));
 }
 
 }