2011-04-15 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Apr 2011 20:47:54 +0000 (20:47 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Apr 2011 20:47:54 +0000 (20:47 +0000)
commita0fd53bb1000c1e06fa92c99f2653a6a165ac911
treea38416f1e134be7b10cb3c159fbb763d3e4e451e
parentd8eac9aa2e137560fa31f5ed50ecc89b635bfe27
2011-04-15  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Some mechanical DOM wrapper cleanup
        https://bugs.webkit.org/show_bug.cgi?id=58689

        * WebCore.exp.in: Export!

        * bindings/js/DOMWrapperWorld.cpp:
        (WebCore::isReachableFromDOM): Inverted the inDocument test to make the
        relationship of the special cases to the normal case clearer.

        * bindings/js/JSArrayBufferViewHelper.h:
        (WebCore::toJSArrayBufferView):
        * bindings/js/JSCSSRuleCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSCSSValueCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::getCachedDOMObjectWrapper):
        (WebCore::cacheDOMObjectWrapper):
        * bindings/js/JSDOMBinding.h:
        (WebCore::createDOMObjectWrapper):
        (WebCore::getDOMObjectWrapper):
        (WebCore::createDOMNodeWrapper):
        (WebCore::getDOMNodeWrapper): Changed DOM wrapper functions to operate
        in terms of DOMWrapperWorlds instead of ExecStates. This is clearer,
        and ever-so-slightly faster.

        Removed hasCachedXXX functions, now that they're unused.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::history):
        (WebCore::JSDOMWindow::location):
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::location):
        (WebCore::toJS):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSEventCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSHTMLCollectionCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSImageDataCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * bindings/js/JSNodeCustom.h:
        (WebCore::getCachedDOMNodeWrapper):
        (WebCore::cacheDOMNodeWrapper):
        (WebCore::toJS):
        * bindings/js/JSSVGPathSegCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSStyleSheetCustom.cpp:
        (WebCore::toJS): Updated for changes above.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::dropProtection): Removed use of hasCachedDOMObjectWrapper
        because XHR is almost always created and used by JavaScript, so it's
        simpler to just always report extra cost.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/js/DOMWrapperWorld.cpp
Source/WebCore/bindings/js/JSArrayBufferViewHelper.h
Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
Source/WebCore/bindings/js/JSCSSValueCustom.cpp
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSDocumentCustom.cpp
Source/WebCore/bindings/js/JSElementCustom.cpp
Source/WebCore/bindings/js/JSEventCustom.cpp
Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
Source/WebCore/bindings/js/JSImageDataCustom.cpp
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/bindings/js/JSNodeCustom.h
Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp
Source/WebCore/bindings/js/JSStyleSheetCustom.cpp
Source/WebCore/xml/XMLHttpRequest.cpp