Title: [107266] trunk
Revision
107266
Author
[email protected]
Date
2012-02-09 11:16:03 -0800 (Thu, 09 Feb 2012)

Log Message

Unreviewed, rolling out r107035.
http://trac.webkit.org/changeset/107035
https://bugs.webkit.org/show_bug.cgi?id=78253

Regressed DOMDivWalk (Requested by arv on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-02-09

Source/WebCore:

* Target.pri:
* UseV8.cmake:
* WebCore.gypi:
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(HasCustomToV8Implementation):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::toV8):
(WebCore):
* bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp.
(WebCore):
(WebCore::toV8):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::toV8):
(WebCore):

LayoutTests:

* platform/chromium/test_expectations.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (107265 => 107266)


--- trunk/LayoutTests/ChangeLog	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/LayoutTests/ChangeLog	2012-02-09 19:16:03 UTC (rev 107266)
@@ -1,3 +1,13 @@
+2012-02-09  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r107035.
+        http://trac.webkit.org/changeset/107035
+        https://bugs.webkit.org/show_bug.cgi?id=78253
+
+        Regressed DOMDivWalk (Requested by arv on #webkit).
+
+        * platform/chromium/test_expectations.txt:
+
 2012-02-09  Julien Chaffraix  <[email protected]>
 
         Another unreviewed svg rebaselining after r107207.

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (107265 => 107266)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-02-09 19:16:03 UTC (rev 107266)
@@ -589,6 +589,7 @@
 BUGWK66377 : fast/dom/StyleSheet/gc-parent-rule.html = TEXT
 BUGWK66377 : fast/dom/StyleSheet/gc-parent-stylesheet.html = TEXT
 BUGWK66377 : fast/dom/StyleSheet/gc-rule-children-wrappers.html = TEXT
+BUGWK66377 : fast/dom/StyleSheet/gc-styleheet-wrapper.xhtml = TEXT
 
 // -----------------------------------------------------------------
 // PENDING TESTS (forked to pending/, need to be sent upstream)

Modified: trunk/Source/WebCore/ChangeLog (107265 => 107266)


--- trunk/Source/WebCore/ChangeLog	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/Source/WebCore/ChangeLog	2012-02-09 19:16:03 UTC (rev 107266)
@@ -1,3 +1,27 @@
+2012-02-09  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r107035.
+        http://trac.webkit.org/changeset/107035
+        https://bugs.webkit.org/show_bug.cgi?id=78253
+
+        Regressed DOMDivWalk (Requested by arv on #webkit).
+
+        * Target.pri:
+        * UseV8.cmake:
+        * WebCore.gypi:
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateNormalAttrGetter):
+        (HasCustomToV8Implementation):
+        * bindings/v8/custom/V8DOMStringMapCustom.cpp:
+        (WebCore::toV8):
+        (WebCore):
+        * bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp.
+        (WebCore):
+        (WebCore::toV8):
+        * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+        (WebCore::toV8):
+        (WebCore):
+
 2012-02-09  David Barton  <[email protected]>
 
         MathML internals for bug 52444 fix - type checking, PassRefPtr

Modified: trunk/Source/WebCore/Target.pri (107265 => 107266)


--- trunk/Source/WebCore/Target.pri	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/Source/WebCore/Target.pri	2012-02-09 19:16:03 UTC (rev 107266)
@@ -158,7 +158,8 @@
         bindings/v8/custom/V8InjectedScriptHostCustom.cpp \
         bindings/v8/custom/V8InjectedScriptManager.cpp \
         bindings/v8/custom/V8InspectorFrontendHostCustom.cpp \
-        bindings/v8/custom/V8DOMStringMapCustom.cpp
+        bindings/v8/custom/V8DOMStringMapCustom.cpp \
+        bindings/v8/custom/V8DOMTokenListCustom.cpp
 
     SOURCES += \
         bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp \

Modified: trunk/Source/WebCore/UseV8.cmake (107265 => 107266)


--- trunk/Source/WebCore/UseV8.cmake	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/Source/WebCore/UseV8.cmake	2012-02-09 19:16:03 UTC (rev 107266)
@@ -81,6 +81,7 @@
     bindings/v8/custom/V8CustomXPathNSResolver.cpp
     bindings/v8/custom/V8DOMFormDataCustom.cpp
     bindings/v8/custom/V8DOMStringMapCustom.cpp
+    bindings/v8/custom/V8DOMTokenListCustom.cpp
     bindings/v8/custom/V8DOMWindowCustom.cpp
     bindings/v8/custom/V8DataViewCustom.cpp
     bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp

Modified: trunk/Source/WebCore/WebCore.gypi (107265 => 107266)


--- trunk/Source/WebCore/WebCore.gypi	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/Source/WebCore/WebCore.gypi	2012-02-09 19:16:03 UTC (rev 107266)
@@ -1815,6 +1815,7 @@
             'bindings/v8/custom/V8CustomXPathNSResolver.h',
             'bindings/v8/custom/V8DOMFormDataCustom.cpp',
             'bindings/v8/custom/V8DOMStringMapCustom.cpp',
+            'bindings/v8/custom/V8DOMTokenListCustom.cpp',
             'bindings/v8/custom/V8DOMWindowCustom.cpp',
             'bindings/v8/custom/V8DataViewCustom.cpp',
             'bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp',

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (107265 => 107266)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-02-09 19:16:03 UTC (rev 107266)
@@ -3,7 +3,7 @@
 # Copyright (C) 2006 Samuel Weinig <[email protected]>
 # Copyright (C) 2006 Alexey Proskuryakov <[email protected]>
 # Copyright (C) 2006 Apple Computer, Inc.
-# Copyright (C) 2007-2012 Google Inc.
+# Copyright (C) 2007, 2008, 2009 Google Inc.
 # Copyright (C) 2009 Cameron McCormack <[email protected]>
 # Copyright (C) Research In Motion Limited 2010. All rights reserved.
 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
@@ -922,7 +922,7 @@
     # Special case for readonly or Replaceable attributes (with a few exceptions). This attempts to ensure that JS wrappers don't get
     # garbage-collected prematurely when their lifetime is strongly tied to their owner. We accomplish this by inserting a reference to
     # the newly created wrapper into an internal field of the holder object.
-    if ($attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
+    if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
         && $returnType ne "EventTarget" && $returnType ne "SerializedScriptValue" && $returnType ne "DOMWindow" 
         && $returnType !~ /SVG/ && $returnType !~ /HTML/ && !IsDOMNodeType($returnType))) {
         AddIncludesForType($returnType);
@@ -3119,11 +3119,14 @@
     # We generate a custom converter (but JSC doesn't) for the following:
     return 1 if $interfaceName eq "CSSStyleSheet";
     return 1 if $interfaceName eq "CanvasPixelArray";
+    return 1 if $interfaceName eq "DOMStringMap";
     return 1 if $interfaceName eq "DOMWindow";
+    return 1 if $interfaceName eq "DOMTokenList";
     return 1 if $interfaceName eq "Element";
     return 1 if $interfaceName eq "HTMLDocument";
     return 1 if $interfaceName eq "HTMLElement";
     return 1 if $interfaceName eq "Location";
+    return 1 if $interfaceName eq "NamedNodeMap";
     return 1 if $interfaceName eq "SVGDocument";
     return 1 if $interfaceName eq "SVGElement";
     return 1 if $interfaceName eq "ScriptProfile";
@@ -3139,6 +3142,8 @@
     return 0 if $interfaceName eq "MediaList";
     return 0 if $interfaceName eq "StyleSheetList";
     return 0 if $interfaceName eq "DOMImplementation";
+    return 0 if $interfaceName eq "DOMStringMap";
+    return 0 if $interfaceName eq "DOMTokenList";
     return 0 if $interfaceName eq "TextTrack";
 
     # For everything else, do what JSC does.

Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp (107265 => 107266)


--- trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp	2012-02-09 19:16:03 UTC (rev 107266)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -84,4 +84,19 @@
     return value;
 }
 
+v8::Handle<v8::Value> toV8(DOMStringMap* impl)
+{
+    if (!impl)
+        return v8::Null();
+    v8::Handle<v8::Object> wrapper = V8DOMStringMap::wrap(impl);
+    // Add a hidden reference from the element to the DOMStringMap.
+    Element* element = impl->element();
+    if (!wrapper.IsEmpty() && element) {
+        v8::Handle<v8::Value> elementValue = toV8(element);
+        if (!elementValue.IsEmpty() && elementValue->IsObject())
+            V8DOMWrapper::setNamedHiddenReference(elementValue.As<v8::Object>(), "domStringMap", wrapper);
+    }
+    return wrapper;
+}
+
 } // namespace WebCore

Copied: trunk/Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp (from rev 107264, trunk/Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp) (0 => 107266)


--- trunk/Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp	2012-02-09 19:16:03 UTC (rev 107266)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8DOMTokenList.h"
+
+#include "DOMTokenList.h"
+#include "V8Binding.h"
+#include "V8DOMWrapper.h"
+#include "V8Element.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> toV8(DOMTokenList* impl)
+{
+    if (!impl)
+        return v8::Null();
+    v8::Handle<v8::Object> wrapper = V8DOMTokenList::wrap(impl);
+    // Add a hidden reference from the element to the DOMTokenList.
+    Element* element = impl->element();
+    if (!wrapper.IsEmpty() && element) {
+        v8::Handle<v8::Value> elementValue = toV8(element);
+        if (!elementValue.IsEmpty() && elementValue->IsObject())
+            V8DOMWrapper::setNamedHiddenReference(elementValue.As<v8::Object>(), "domTokenList", wrapper);
+    }
+    return wrapper;
+}
+
+} // namespace WebCore

Modified: trunk/Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp (107265 => 107266)


--- trunk/Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp	2012-02-09 19:15:36 UTC (rev 107265)
+++ trunk/Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp	2012-02-09 19:16:03 UTC (rev 107266)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Google Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -71,4 +71,16 @@
     return toV8(result.release());
 }
 
+v8::Handle<v8::Value> toV8(NamedNodeMap* impl)
+{
+    if (!impl)
+        return v8::Null();
+    v8::Handle<v8::Object> wrapper = V8NamedNodeMap::wrap(impl);
+    // Add a hidden reference from named node map to its owner node.
+    Element* element = impl->element();
+    if (!wrapper.IsEmpty() && element)
+        V8DOMWrapper::setNamedHiddenReference(wrapper, "ownerNode", toV8(element));
+    return wrapper;
+}
+
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to