Changeset 107266 in webkit


Ignore:
Timestamp:
Feb 9, 2012 11:16:03 AM (12 years ago)
Author:
commit-queue@webkit.org
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 <webkit.review.bot@gmail.com> 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:
Location:
trunk
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r107264 r107266  
     12012-02-09  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r107035.
     4        http://trac.webkit.org/changeset/107035
     5        https://bugs.webkit.org/show_bug.cgi?id=78253
     6
     7        Regressed DOMDivWalk (Requested by arv on #webkit).
     8
     9        * platform/chromium/test_expectations.txt:
     10
    1112012-02-09  Julien Chaffraix  <jchaffraix@webkit.org>
    212
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r107262 r107266  
    590590BUGWK66377 : fast/dom/StyleSheet/gc-parent-stylesheet.html = TEXT
    591591BUGWK66377 : fast/dom/StyleSheet/gc-rule-children-wrappers.html = TEXT
     592BUGWK66377 : fast/dom/StyleSheet/gc-styleheet-wrapper.xhtml = TEXT
    592593
    593594// -----------------------------------------------------------------
  • trunk/Source/WebCore/ChangeLog

    r107263 r107266  
     12012-02-09  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r107035.
     4        http://trac.webkit.org/changeset/107035
     5        https://bugs.webkit.org/show_bug.cgi?id=78253
     6
     7        Regressed DOMDivWalk (Requested by arv on #webkit).
     8
     9        * Target.pri:
     10        * UseV8.cmake:
     11        * WebCore.gypi:
     12        * bindings/scripts/CodeGeneratorV8.pm:
     13        (GenerateNormalAttrGetter):
     14        (HasCustomToV8Implementation):
     15        * bindings/v8/custom/V8DOMStringMapCustom.cpp:
     16        (WebCore::toV8):
     17        (WebCore):
     18        * bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp.
     19        (WebCore):
     20        (WebCore::toV8):
     21        * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
     22        (WebCore::toV8):
     23        (WebCore):
     24
    1252012-02-09  David Barton  <dbarton@mathscribe.com>
    226
  • trunk/Source/WebCore/Target.pri

    r107257 r107266  
    159159        bindings/v8/custom/V8InjectedScriptManager.cpp \
    160160        bindings/v8/custom/V8InspectorFrontendHostCustom.cpp \
    161         bindings/v8/custom/V8DOMStringMapCustom.cpp
     161        bindings/v8/custom/V8DOMStringMapCustom.cpp \
     162        bindings/v8/custom/V8DOMTokenListCustom.cpp
    162163
    163164    SOURCES += \
  • trunk/Source/WebCore/UseV8.cmake

    r107035 r107266  
    8282    bindings/v8/custom/V8DOMFormDataCustom.cpp
    8383    bindings/v8/custom/V8DOMStringMapCustom.cpp
     84    bindings/v8/custom/V8DOMTokenListCustom.cpp
    8485    bindings/v8/custom/V8DOMWindowCustom.cpp
    8586    bindings/v8/custom/V8DataViewCustom.cpp
  • trunk/Source/WebCore/WebCore.gypi

    r107257 r107266  
    18161816            'bindings/v8/custom/V8DOMFormDataCustom.cpp',
    18171817            'bindings/v8/custom/V8DOMStringMapCustom.cpp',
     1818            'bindings/v8/custom/V8DOMTokenListCustom.cpp',
    18181819            'bindings/v8/custom/V8DOMWindowCustom.cpp',
    18191820            'bindings/v8/custom/V8DataViewCustom.cpp',
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r107204 r107266  
    44# Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
    55# Copyright (C) 2006 Apple Computer, Inc.
    6 # Copyright (C) 2007-2012 Google Inc.
     6# Copyright (C) 2007, 2008, 2009 Google Inc.
    77# Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
    88# Copyright (C) Research In Motion Limited 2010. All rights reserved.
     
    923923    # garbage-collected prematurely when their lifetime is strongly tied to their owner. We accomplish this by inserting a reference to
    924924    # the newly created wrapper into an internal field of the holder object.
    925     if ($attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
     925    if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
    926926        && $returnType ne "EventTarget" && $returnType ne "SerializedScriptValue" && $returnType ne "DOMWindow"
    927927        && $returnType !~ /SVG/ && $returnType !~ /HTML/ && !IsDOMNodeType($returnType))) {
     
    31203120    return 1 if $interfaceName eq "CSSStyleSheet";
    31213121    return 1 if $interfaceName eq "CanvasPixelArray";
     3122    return 1 if $interfaceName eq "DOMStringMap";
    31223123    return 1 if $interfaceName eq "DOMWindow";
     3124    return 1 if $interfaceName eq "DOMTokenList";
    31233125    return 1 if $interfaceName eq "Element";
    31243126    return 1 if $interfaceName eq "HTMLDocument";
    31253127    return 1 if $interfaceName eq "HTMLElement";
    31263128    return 1 if $interfaceName eq "Location";
     3129    return 1 if $interfaceName eq "NamedNodeMap";
    31273130    return 1 if $interfaceName eq "SVGDocument";
    31283131    return 1 if $interfaceName eq "SVGElement";
     
    31403143    return 0 if $interfaceName eq "StyleSheetList";
    31413144    return 0 if $interfaceName eq "DOMImplementation";
     3145    return 0 if $interfaceName eq "DOMStringMap";
     3146    return 0 if $interfaceName eq "DOMTokenList";
    31423147    return 0 if $interfaceName eq "TextTrack";
    31433148
  • trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp

    r107035 r107266  
    11/*
    2  * Copyright (C) 2012 Google Inc. All rights reserved.
     2 * Copyright (C) 2010 Google Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    8585}
    8686
     87v8::Handle<v8::Value> toV8(DOMStringMap* impl)
     88{
     89    if (!impl)
     90        return v8::Null();
     91    v8::Handle<v8::Object> wrapper = V8DOMStringMap::wrap(impl);
     92    // Add a hidden reference from the element to the DOMStringMap.
     93    Element* element = impl->element();
     94    if (!wrapper.IsEmpty() && element) {
     95        v8::Handle<v8::Value> elementValue = toV8(element);
     96        if (!elementValue.IsEmpty() && elementValue->IsObject())
     97            V8DOMWrapper::setNamedHiddenReference(elementValue.As<v8::Object>(), "domStringMap", wrapper);
     98    }
     99    return wrapper;
     100}
     101
    87102} // namespace WebCore
  • trunk/Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp

    r107264 r107266  
    11/*
    2  * Copyright (C) 2007-2012 Google Inc. All rights reserved.
     2 * Copyright (C) 2010 Google Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3030
    3131#include "config.h"
    32 #include "V8NamedNodeMap.h"
     32#include "V8DOMTokenList.h"
    3333
    34 #include "NamedNodeMap.h"
    35 #include "V8Attr.h"
     34#include "DOMTokenList.h"
    3635#include "V8Binding.h"
    37 #include "V8BindingState.h"
     36#include "V8DOMWrapper.h"
    3837#include "V8Element.h"
    39 #include "V8Node.h"
    40 #include "V8Proxy.h"
    41 
    42 #include <wtf/RefPtr.h>
    4338
    4439namespace WebCore {
    4540
    46 v8::Handle<v8::Value> V8NamedNodeMap::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
     41v8::Handle<v8::Value> toV8(DOMTokenList* impl)
    4742{
    48     INC_STATS("DOM.NamedNodeMap.IndexedPropertyGetter");
    49     NamedNodeMap* imp = V8NamedNodeMap::toNative(info.Holder());
    50     RefPtr<Node> result = imp->item(index);
    51     if (!result)
    52         return notHandledByInterceptor();
    53 
    54     return toV8(result.release());
    55 }
    56 
    57 v8::Handle<v8::Value> V8NamedNodeMap::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
    58 {
    59     INC_STATS("DOM.NamedNodeMap.NamedPropertyGetter");
    60 
    61     if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
    62         return notHandledByInterceptor();
    63     if (info.Holder()->HasRealNamedCallbackProperty(name))
    64         return notHandledByInterceptor();
    65 
    66     NamedNodeMap* imp = V8NamedNodeMap::toNative(info.Holder());
    67     RefPtr<Node> result = imp->getNamedItem(toWebCoreString(name));
    68     if (!result)
    69         return notHandledByInterceptor();
    70 
    71     return toV8(result.release());
     43    if (!impl)
     44        return v8::Null();
     45    v8::Handle<v8::Object> wrapper = V8DOMTokenList::wrap(impl);
     46    // Add a hidden reference from the element to the DOMTokenList.
     47    Element* element = impl->element();
     48    if (!wrapper.IsEmpty() && element) {
     49        v8::Handle<v8::Value> elementValue = toV8(element);
     50        if (!elementValue.IsEmpty() && elementValue->IsObject())
     51            V8DOMWrapper::setNamedHiddenReference(elementValue.As<v8::Object>(), "domTokenList", wrapper);
     52    }
     53    return wrapper;
    7254}
    7355
  • trunk/Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp

    r107035 r107266  
    11/*
    2  * Copyright (C) 2007-2012 Google Inc. All rights reserved.
     2 * Copyright (C) 2007-2009 Google Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    7272}
    7373
     74v8::Handle<v8::Value> toV8(NamedNodeMap* impl)
     75{
     76    if (!impl)
     77        return v8::Null();
     78    v8::Handle<v8::Object> wrapper = V8NamedNodeMap::wrap(impl);
     79    // Add a hidden reference from named node map to its owner node.
     80    Element* element = impl->element();
     81    if (!wrapper.IsEmpty() && element)
     82        V8DOMWrapper::setNamedHiddenReference(wrapper, "ownerNode", toV8(element));
     83    return wrapper;
     84}
     85
    7486} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.