Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Use WindowProxy instead of DOMWindow in our IDL
https://bugs.webkit.org/show_bug.cgi?id=185022 Reviewed by Sam Weinig. Source/WebCore: Stop using DOMWindow in all of our IDL files and use WindowProxy as per their respective specifications. As a result, the implementation as also updated to use WindowProxy type instead of DOMWindow. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMConvertWindowProxy.h: Removed. * bindings/js/JSWindowProxy.cpp: (WebCore::JSWindowProxy::windowProxy const): (WebCore::JSWindowProxy::toWrapped): * bindings/js/JSWindowProxy.h: (WebCore::window): Use static_cast<>() instead of jsCast<>() because jsCast<>() relies on classInfo() which is not allowed to be called during JS sweep due to an assertion inside classInfo(). The JSWindowProxy objects are held strongly by the WindowProxy so we know the JSWindowProxy object is not getting destroyed here. (WebCore::toJS): * bindings/js/WindowProxy.cpp: (WebCore::WindowProxy::globalObject): * bindings/js/WindowProxy.h: (WebCore::WindowProxy::frame const): * bindings/scripts/CodeGenerator.pm: (IsBuiltinType): (ComputeIsCallbackInterface): (ComputeIsCallbackFunction): * bindings/scripts/CodeGeneratorJS.pm: (AddToIncludesForIDLType): (GetBaseIDLType): (NativeToJSValueDOMConvertNeedsState): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body): (WebCore::jsTestObjPrototypeFunctionOverloadedMethodOverloadDispatcher): * bindings/scripts/test/TestObj.idl: * dom/CompositionEvent.cpp: (WebCore::CompositionEvent::CompositionEvent): (WebCore::CompositionEvent::initCompositionEvent): * dom/CompositionEvent.h: * dom/CompositionEvent.idl: * dom/Document.cpp: (WebCore::Document::defaultView const): * dom/Document.h: * dom/Document.idl: * dom/DocumentTouch.cpp: (WebCore::DocumentTouch::createTouch): * dom/DocumentTouch.h: * dom/DocumentTouch.idl: * dom/FocusEvent.cpp: (WebCore::FocusEvent::FocusEvent): * dom/FocusEvent.h: * dom/InputEvent.cpp: (WebCore::InputEvent::create): (WebCore::InputEvent::InputEvent): * dom/InputEvent.h: * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent): (WebCore::KeyboardEvent::create): (WebCore::KeyboardEvent::initKeyboardEvent): (WebCore::KeyboardEvent::charCode const): * dom/KeyboardEvent.h: * dom/KeyboardEvent.idl: * dom/MessageEvent.h: * dom/MessageEvent.idl: * dom/MouseEvent.cpp: (WebCore::MouseEvent::create): (WebCore::MouseEvent::MouseEvent): (WebCore::MouseEvent::initMouseEvent): (WebCore::MouseEvent::initMouseEventQuirk): * dom/MouseEvent.h: * dom/MouseEvent.idl: * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): (WebCore::MouseRelatedEvent::init): (WebCore::MouseRelatedEvent::frameViewFromWindowProxy): (WebCore::MouseRelatedEvent::initCoordinates): (WebCore::MouseRelatedEvent::documentToAbsoluteScaleFactor const): (WebCore::MouseRelatedEvent::computePageLocation): (WebCore::MouseRelatedEvent::locationInRootViewCoordinates const): * dom/MouseRelatedEvent.h: * dom/Node.cpp: * dom/SimulatedClick.cpp: * dom/TextEvent.cpp: (WebCore::TextEvent::create): (WebCore::TextEvent::createForPlainTextPaste): (WebCore::TextEvent::createForFragmentPaste): (WebCore::TextEvent::createForDrop): (WebCore::TextEvent::createForDictation): (WebCore::TextEvent::TextEvent): (WebCore::TextEvent::initTextEvent): * dom/TextEvent.h: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.cpp: (WebCore::UIEvent::UIEvent): (WebCore::UIEvent::initUIEvent): * dom/UIEvent.h: (WebCore::UIEvent::create): (WebCore::UIEvent::view const): * dom/UIEvent.idl: * dom/UIEventInit.h: * dom/UIEventInit.idl: * dom/UIEventWithKeyState.h: (WebCore::UIEventWithKeyState::UIEventWithKeyState): * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::create): (WebCore::WheelEvent::initWebKitWheelEvent): * dom/WheelEvent.h: * dom/WheelEvent.idl: * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::insertDictatedText): * editing/Editor.cpp: (WebCore::Editor::pasteAsPlainText): (WebCore::Editor::pasteAsFragment): (WebCore::Editor::setComposition): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::namedItem): * html/HTMLDocument.h: * html/HTMLDocument.idl: * html/HTMLFrameElement.idl: * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::contentWindow const): * html/HTMLFrameOwnerElement.h: * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::namedItem): * html/HTMLFrameSetElement.h: * html/HTMLFrameSetElement.idl: * html/HTMLIFrameElement.idl: * html/ImageDocument.cpp: * page/DOMWindow.cpp: (WebCore::PostMessageTimer::PostMessageTimer): (WebCore::PostMessageTimer::event): (WebCore::DOMWindow::postMessage): * page/DragController.cpp: (WebCore::DragController::dispatchTextInputEventFor): * page/EventHandler.cpp: (WebCore::EventHandler::handleTextInputEvent): Source/WebKitLegacy/mac: * DOM/DOMAbstractView.mm: (kit): (toWindowProxy): * DOM/DOMAbstractViewInternal.h: * DOM/DOMDocument.mm: (-[DOMDocument defaultView]): (-[DOMDocument getComputedStyle:pseudoElement:]): (-[DOMDocument getMatchedCSSRules:pseudoElement:authorOnly:]): * DOM/DOMHTMLFrameElement.mm: (-[DOMHTMLFrameElement contentWindow]): * DOM/DOMHTMLIFrameElement.mm: (-[DOMHTMLIFrameElement contentWindow]): * DOM/DOMKeyboardEvent.mm: (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]): (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:]): (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]): (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:]): * DOM/DOMMouseEvent.mm: (-[DOMMouseEvent initMouseEvent:canBubble:cancelable:view:detail:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:button:relatedTarget:]): * DOM/DOMTextEvent.mm: (-[DOMTextEvent initTextEvent:canBubbleArg:cancelableArg:viewArg:dataArg:]): * DOM/DOMUIEvent.mm: (-[DOMUIEvent view]): (-[DOMUIEvent initUIEvent:canBubble:cancelable:view:detail:]): * DOM/DOMWheelEvent.mm: (-[DOMWheelEvent initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:]): Source/WebKitLegacy/win: * DOMCoreClasses.cpp: (DOMDocument::getComputedStyle): Canonical link: https://commits.webkit.org/200580@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
523 additions
and 317 deletions.
- +145 −0 Source/WebCore/ChangeLog
- +0 −4 Source/WebCore/WebCore.xcodeproj/project.pbxproj
- +0 −1 Source/WebCore/bindings/IDLTypes.h
- +0 −45 Source/WebCore/bindings/js/JSDOMConvertWindowProxy.h
- +16 −6 Source/WebCore/bindings/js/JSWindowProxy.cpp
- +13 −4 Source/WebCore/bindings/js/JSWindowProxy.h
- +6 −0 Source/WebCore/bindings/js/WindowProxy.cpp
- +7 −5 Source/WebCore/bindings/js/WindowProxy.h
- +2 −1 Source/WebCore/bindings/scripts/CodeGenerator.pm
- +0 −9 Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
- +2 −3 Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
- +1 −1 Source/WebCore/bindings/scripts/test/TestObj.idl
- +4 −4 Source/WebCore/dom/CompositionEvent.cpp
- +4 −4 Source/WebCore/dom/CompositionEvent.h
- +1 −1 Source/WebCore/dom/CompositionEvent.idl
- +7 −0 Source/WebCore/dom/Document.cpp
- +1 −1 Source/WebCore/dom/Document.h
- +1 −1 Source/WebCore/dom/Document.idl
- +10 −3 Source/WebCore/dom/DocumentTouch.cpp
- +2 −2 Source/WebCore/dom/DocumentTouch.h
- +1 −1 Source/WebCore/dom/DocumentTouch.idl
- +8 −8 Source/WebCore/dom/Element.cpp
- +2 −2 Source/WebCore/dom/FocusEvent.cpp
- +3 −3 Source/WebCore/dom/FocusEvent.h
- +5 −5 Source/WebCore/dom/InputEvent.cpp
- +3 −3 Source/WebCore/dom/InputEvent.h
- +11 −9 Source/WebCore/dom/KeyboardEvent.cpp
- +3 −3 Source/WebCore/dom/KeyboardEvent.h
- +1 −1 Source/WebCore/dom/KeyboardEvent.idl
- +3 −3 Source/WebCore/dom/MessageEvent.h
- +2 −2 Source/WebCore/dom/MessageEvent.idl
- +14 −14 Source/WebCore/dom/MouseEvent.cpp
- +8 −7 Source/WebCore/dom/MouseEvent.h
- +1 −1 Source/WebCore/dom/MouseEvent.idl
- +11 −11 Source/WebCore/dom/MouseRelatedEvent.cpp
- +2 −2 Source/WebCore/dom/MouseRelatedEvent.h
- +2 −1 Source/WebCore/dom/Node.cpp
- +5 −5 Source/WebCore/dom/SimulatedClick.cpp
- +18 −18 Source/WebCore/dom/TextEvent.cpp
- +9 −9 Source/WebCore/dom/TextEvent.h
- +1 −1 Source/WebCore/dom/TextEvent.idl
- +4 −4 Source/WebCore/dom/TouchEvent.cpp
- +4 −4 Source/WebCore/dom/TouchEvent.h
- +1 −1 Source/WebCore/dom/TouchEvent.idl
- +5 −5 Source/WebCore/dom/UIEvent.cpp
- +9 −9 Source/WebCore/dom/UIEvent.h
- +2 −2 Source/WebCore/dom/UIEvent.idl
- +2 −2 Source/WebCore/dom/UIEventInit.h
- +1 −1 Source/WebCore/dom/UIEventInit.idl
- +4 −4 Source/WebCore/dom/UIEventWithKeyState.h
- +6 −6 Source/WebCore/dom/WheelEvent.cpp
- +3 −3 Source/WebCore/dom/WheelEvent.h
- +1 −1 Source/WebCore/dom/WheelEvent.idl
- +1 −1 Source/WebCore/editing/AlternativeTextController.cpp
- +9 −9 Source/WebCore/editing/Editor.cpp
- +4 −4 Source/WebCore/html/HTMLDocument.cpp
- +1 −1 Source/WebCore/html/HTMLDocument.h
- +1 −1 Source/WebCore/html/HTMLDocument.idl
- +1 −1 Source/WebCore/html/HTMLFrameElement.idl
- +2 −2 Source/WebCore/html/HTMLFrameOwnerElement.cpp
- +1 −1 Source/WebCore/html/HTMLFrameOwnerElement.h
- +2 −4 Source/WebCore/html/HTMLFrameSetElement.cpp
- +1 −1 Source/WebCore/html/HTMLFrameSetElement.h
- +1 −1 Source/WebCore/html/HTMLFrameSetElement.idl
- +1 −1 Source/WebCore/html/HTMLIFrameElement.idl
- +1 −0 Source/WebCore/html/ImageDocument.cpp
- +5 −4 Source/WebCore/page/DOMWindow.cpp
- +1 −1 Source/WebCore/page/DragController.cpp
- +6 −6 Source/WebCore/page/EventHandler.cpp
- +16 −0 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp
- +3 −0 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowPrivate.h
- +1 −2 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp
- +1 −2 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp
- +1 −2 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp
- +1 −2 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp
- +1 −2 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp
- +2 −4 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp
- +1 −2 Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp
- +1 −1 Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
- +1 −1 Source/WebKit/WebProcess/WebPage/WebPage.cpp
- +34 −0 Source/WebKitLegacy/mac/ChangeLog
- +17 −0 Source/WebKitLegacy/mac/DOM/DOMAbstractView.mm
- +3 −0 Source/WebKitLegacy/mac/DOM/DOMAbstractViewInternal.h
- +3 −3 Source/WebKitLegacy/mac/DOM/DOMDocument.mm
- +4 −4 Source/WebKitLegacy/mac/DOM/DOMKeyboardEvent.mm
- +1 −1 Source/WebKitLegacy/mac/DOM/DOMMouseEvent.mm
- +1 −1 Source/WebKitLegacy/mac/DOM/DOMTextEvent.mm
- +1 −1 Source/WebKitLegacy/mac/DOM/DOMUIEvent.mm
- +1 −1 Source/WebKitLegacy/mac/DOM/DOMWheelEvent.mm
- +3 −3 Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
- +10 −0 Source/WebKitLegacy/win/ChangeLog
- +1 −1 Source/WebKitLegacy/win/DOMCoreClasses.cpp
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.