Changeset 215486 in webkit
- Timestamp:
- Apr 18, 2017 4:27:04 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r215484 r215486 1 2017-04-18 Brent Fulgham <bfulgham@apple.com> 2 3 Correct handling of isolatedWorld in event handling 4 https://bugs.webkit.org/show_bug.cgi?id=65589 5 <rdar://problem/24097804> 6 7 Reviewed by Geoffrey Garen. 8 9 This following test cases are from the following Blink change: 10 https://src.chromium.org/viewvc/blink?revision=152377&view=revision 11 12 * fast/dom/event-attrs-isolated-world-expected.txt: Added. 13 * fast/dom/event-attrs-isolated-world.html: Added. 14 * http/tests/security/isolatedWorld/onclick-attribute-expected.txt: Added. 15 * http/tests/security/isolatedWorld/onclick-attribute.html: Added. 16 1 17 2017-04-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r215485 r215486 1 2017-04-18 Brent Fulgham <bfulgham@apple.com> 2 3 Correct handling of isolatedWorld in event handling 4 https://bugs.webkit.org/show_bug.cgi?id=65589 5 <rdar://problem/24097804> 6 7 Reviewed by Geoffrey Garen. 8 9 This patch was inspired by Adam's original patch as well as the 10 following Blink change: 11 https://src.chromium.org/viewvc/blink?revision=152377&view=revision 12 13 Thread isolatedWorld state through event handling logic. 14 15 Tests: fast/dom/event-attrs-isolated-world.html 16 http/tests/security/isolatedWorld/onclick-attribute.html 17 18 * bindings/js/JSEventListener.cpp: 19 (WebCore::JSEventListener::initializeJSFunction): 20 (WebCore::JSEventListener::world): 21 (WebCore::eventHandlerAttribute): 22 (WebCore::setEventHandlerAttribute): 23 (WebCore::windowEventHandlerAttribute): 24 (WebCore::setWindowEventHandlerAttribute): 25 (WebCore::documentEventHandlerAttribute): 26 (WebCore::setDocumentEventHandlerAttribute): 27 * bindings/js/JSEventListener.h: 28 * bindings/scripts/CodeGeneratorJS.pm: 29 (GenerateImplementation): 30 * dom/Document.cpp: 31 (WebCore::Document::setWindowAttributeEventListener): 32 (WebCore::Document::getWindowAttributeEventListener): 33 * dom/Document.h: 34 * dom/Element.cpp: 35 (WebCore::Element::setAttributeEventListener): 36 * dom/EventTarget.cpp: 37 (WebCore::EventTarget::setAttributeEventListener): 38 (WebCore::EventTarget::attributeEventListener): 39 * dom/EventTarget.h: 40 * editing/ReplaceSelectionCommand.cpp: 41 (WebCore::ReplacementFragment::ReplacementFragment): 42 * html/HTMLBodyElement.cpp: 43 (WebCore::HTMLBodyElement::parseAttribute): 44 * html/HTMLFrameSetElement.cpp: 45 (WebCore::HTMLFrameSetElement::parseAttribute): 46 * svg/SVGSVGElement.cpp: 47 (WebCore::SVGSVGElement::parseAttribute): 48 1 49 2017-04-18 Jeremy Jones <jeremyj@apple.com> 2 50 -
trunk/Source/WebCore/bindings/js/JSEventListener.cpp
r215477 r215486 1 1 /* 2 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 3 * Copyright (C) 2003 , 2004, 2005, 2006, 2007, 2008, 2009, 2013Apple Inc. All Rights Reserved.3 * Copyright (C) 2003-2017 Apple Inc. All Rights Reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 63 63 JSObject* JSEventListener::initializeJSFunction(ScriptExecutionContext*) const 64 64 { 65 return 0;65 return nullptr; 66 66 } 67 67 … … 217 217 } 218 218 219 JSC::JSValue eventHandlerAttribute(EventTarget& target, const AtomicString& eventType )220 { 221 return eventHandlerAttribute(target.attributeEventListener(eventType ), *target.scriptExecutionContext());219 JSC::JSValue eventHandlerAttribute(EventTarget& target, const AtomicString& eventType, DOMWrapperWorld& isolatedWorld) 220 { 221 return eventHandlerAttribute(target.attributeEventListener(eventType, isolatedWorld), *target.scriptExecutionContext()); 222 222 } 223 223 224 224 void setEventHandlerAttribute(JSC::ExecState& state, JSC::JSObject& wrapper, EventTarget& target, const AtomicString& eventType, JSC::JSValue value) 225 225 { 226 target.setAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, wrapper) );227 } 228 229 JSC::JSValue windowEventHandlerAttribute(HTMLElement& element, const AtomicString& eventType )226 target.setAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, wrapper), currentWorld(&state)); 227 } 228 229 JSC::JSValue windowEventHandlerAttribute(HTMLElement& element, const AtomicString& eventType, DOMWrapperWorld& isolatedWorld) 230 230 { 231 231 auto& document = element.document(); 232 return eventHandlerAttribute(document.getWindowAttributeEventListener(eventType ), document);232 return eventHandlerAttribute(document.getWindowAttributeEventListener(eventType, isolatedWorld), document); 233 233 } 234 234 … … 236 236 { 237 237 ASSERT(wrapper.globalObject()); 238 element.document().setWindowAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, *wrapper.globalObject()) );239 } 240 241 JSC::JSValue windowEventHandlerAttribute(DOMWindow& window, const AtomicString& eventType )242 { 243 return eventHandlerAttribute(window, eventType );238 element.document().setWindowAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, *wrapper.globalObject()), currentWorld(&state)); 239 } 240 241 JSC::JSValue windowEventHandlerAttribute(DOMWindow& window, const AtomicString& eventType, DOMWrapperWorld& isolatedWorld) 242 { 243 return eventHandlerAttribute(window, eventType, isolatedWorld); 244 244 } 245 245 … … 249 249 } 250 250 251 JSC::JSValue documentEventHandlerAttribute(HTMLElement& element, const AtomicString& eventType )251 JSC::JSValue documentEventHandlerAttribute(HTMLElement& element, const AtomicString& eventType, DOMWrapperWorld& isolatedWorld) 252 252 { 253 253 auto& document = element.document(); 254 return eventHandlerAttribute(document.attributeEventListener(eventType ), document);254 return eventHandlerAttribute(document.attributeEventListener(eventType, isolatedWorld), document); 255 255 } 256 256 … … 261 261 auto* documentWrapper = JSC::jsCast<JSDocument*>(toJS(&state, JSC::jsCast<JSDOMGlobalObject*>(wrapper.globalObject()), document)); 262 262 ASSERT(documentWrapper); 263 document.setAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, *documentWrapper) );264 } 265 266 JSC::JSValue documentEventHandlerAttribute(Document& document, const AtomicString& eventType )267 { 268 return eventHandlerAttribute(document, eventType );263 document.setAttributeEventListener(eventType, createEventListenerForEventHandlerAttribute(state, value, *documentWrapper), currentWorld(&state)); 264 } 265 266 JSC::JSValue documentEventHandlerAttribute(Document& document, const AtomicString& eventType, DOMWrapperWorld& isolatedWorld) 267 { 268 return eventHandlerAttribute(document, eventType, isolatedWorld); 269 269 } 270 270 -
trunk/Source/WebCore/bindings/js/JSEventListener.h
r209627 r215486 1 1 /* 2 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 3 * Copyright (C) 2003 , 2008, 2009Apple Inc. All rights reserved.3 * Copyright (C) 2003-2017 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 26 26 #include <heap/WeakInlines.h> 27 27 #include <wtf/Ref.h> 28 #include <wtf/TypeCasts.h> 28 29 #include <wtf/text/TextPosition.h> 29 30 #include <wtf/text/WTFString.h> … … 92 93 93 94 // For "onxxx" attributes that automatically set up JavaScript event listeners. 94 JSC::JSValue eventHandlerAttribute(EventTarget&, const AtomicString& eventType );95 JSC::JSValue eventHandlerAttribute(EventTarget&, const AtomicString& eventType, DOMWrapperWorld&); 95 96 void setEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, EventTarget&, const AtomicString& eventType, JSC::JSValue); 96 97 97 98 // Like the functions above, but for attributes that forward event handlers to the window object rather than setting them on the target. 98 JSC::JSValue windowEventHandlerAttribute(HTMLElement&, const AtomicString& eventType );99 JSC::JSValue windowEventHandlerAttribute(HTMLElement&, const AtomicString& eventType, DOMWrapperWorld&); 99 100 void setWindowEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, HTMLElement&, const AtomicString& eventType, JSC::JSValue); 100 JSC::JSValue windowEventHandlerAttribute(DOMWindow&, const AtomicString& eventType );101 JSC::JSValue windowEventHandlerAttribute(DOMWindow&, const AtomicString& eventType, DOMWrapperWorld&); 101 102 void setWindowEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, DOMWindow&, const AtomicString& eventType, JSC::JSValue); 102 103 103 104 // Like the functions above, but for attributes that forward event handlers to the document rather than setting them on the target. 104 JSC::JSValue documentEventHandlerAttribute(HTMLElement&, const AtomicString& eventType );105 JSC::JSValue documentEventHandlerAttribute(HTMLElement&, const AtomicString& eventType, DOMWrapperWorld&); 105 106 void setDocumentEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, HTMLElement&, const AtomicString& eventType, JSC::JSValue); 106 JSC::JSValue documentEventHandlerAttribute(Document&, const AtomicString& eventType );107 JSC::JSValue documentEventHandlerAttribute(Document&, const AtomicString& eventType, DOMWrapperWorld&); 107 108 void setDocumentEventHandlerAttribute(JSC::ExecState&, JSC::JSObject&, Document&, const AtomicString& eventType, JSC::JSValue); 108 109 … … 139 140 140 141 } // namespace WebCore 142 143 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::JSEventListener) 144 static bool isType(const WebCore::EventListener& input) { return input.type() == WebCore::JSEventListener::JSEventListenerType; } 145 SPECIALIZE_TYPE_TRAITS_END() -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r215477 r215486 3687 3687 : "eventHandlerAttribute"; 3688 3688 my $eventName = EventHandlerAttributeEventName($attribute); 3689 push(@implContent, " return $getter(thisObject.wrapped(), $eventName );\n");3689 push(@implContent, " return $getter(thisObject.wrapped(), $eventName, worldForDOMObject(&thisObject));\n"); 3690 3690 } elsif ($codeGenerator->IsConstructorType($attribute->type)) { 3691 3691 my $constructorType = $attribute->type->name; … … 3864 3864 if ((($interfaceName eq "DOMWindow") or ($interfaceName eq "WorkerGlobalScope")) and $name eq "onerror") { 3865 3865 $implIncludes{"JSErrorHandler.h"} = 1; 3866 push(@implContent, " thisObject.wrapped().setAttributeEventListener($eventName, createJSErrorHandler(&state, value, &thisObject) );\n");3866 push(@implContent, " thisObject.wrapped().setAttributeEventListener($eventName, createJSErrorHandler(&state, value, &thisObject), worldForDOMObject(&thisObject));\n"); 3867 3867 } else { 3868 3868 $implIncludes{"JSEventListener.h"} = 1; -
trunk/Source/WebCore/dom/Document.cpp
r215465 r215486 3994 3994 } 3995 3995 3996 void Document::setAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& attributeValue )3997 { 3998 setAttributeEventListener(eventType, JSLazyEventListener::create(*this, attributeName, attributeValue) );3999 } 4000 4001 void Document::setWindowAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&& listener )3996 void Document::setAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& attributeValue, DOMWrapperWorld& isolatedWorld) 3997 { 3998 setAttributeEventListener(eventType, JSLazyEventListener::create(*this, attributeName, attributeValue), isolatedWorld); 3999 } 4000 4001 void Document::setWindowAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&& listener, DOMWrapperWorld& isolatedWorld) 4002 4002 { 4003 4003 if (!m_domWindow) 4004 4004 return; 4005 m_domWindow->setAttributeEventListener(eventType, WTFMove(listener) );4006 } 4007 4008 void Document::setWindowAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& attributeValue )4005 m_domWindow->setAttributeEventListener(eventType, WTFMove(listener), isolatedWorld); 4006 } 4007 4008 void Document::setWindowAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& attributeValue, DOMWrapperWorld& isolatedWorld) 4009 4009 { 4010 4010 if (!m_domWindow) 4011 4011 return; 4012 setWindowAttributeEventListener(eventType, JSLazyEventListener::create(*m_domWindow, attributeName, attributeValue) );4013 } 4014 4015 EventListener* Document::getWindowAttributeEventListener(const AtomicString& eventType )4012 setWindowAttributeEventListener(eventType, JSLazyEventListener::create(*m_domWindow, attributeName, attributeValue), isolatedWorld); 4013 } 4014 4015 EventListener* Document::getWindowAttributeEventListener(const AtomicString& eventType, DOMWrapperWorld& isolatedWorld) 4016 4016 { 4017 4017 if (!m_domWindow) 4018 4018 return nullptr; 4019 return m_domWindow->attributeEventListener(eventType );4019 return m_domWindow->attributeEventListener(eventType, isolatedWorld); 4020 4020 } 4021 4021 -
trunk/Source/WebCore/dom/Document.h
r215444 r215486 759 759 760 760 // Helper functions for forwarding DOMWindow event related tasks to the DOMWindow if it exists. 761 void setWindowAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& value );762 void setWindowAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&& );763 EventListener* getWindowAttributeEventListener(const AtomicString& eventType );761 void setWindowAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& value, DOMWrapperWorld&); 762 void setWindowAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&&, DOMWrapperWorld&); 763 EventListener* getWindowAttributeEventListener(const AtomicString& eventType, DOMWrapperWorld&); 764 764 WEBCORE_EXPORT void dispatchWindowEvent(Event&, EventTarget* = nullptr); 765 765 void dispatchWindowLoadEvent(); … … 1289 1289 1290 1290 using ContainerNode::setAttributeEventListener; 1291 void setAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& value );1291 void setAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& value, DOMWrapperWorld& isolatedWorld); 1292 1292 1293 1293 DOMSelection* getSelection(); -
trunk/Source/WebCore/dom/Element.cpp
r214510 r215486 5 5 * (C) 2001 Dirk Mueller (mueller@kde.org) 6 6 * (C) 2007 David Smith (catfish.man@gmail.com) 7 * Copyright (C) 2004-201 6Apple Inc. All rights reserved.7 * Copyright (C) 2004-2017 Apple Inc. All rights reserved. 8 8 * (C) 2007 Eric Seidel (eric@webkit.org) 9 9 * … … 2056 2056 void Element::setAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& attributeValue) 2057 2057 { 2058 setAttributeEventListener(eventType, JSLazyEventListener::create(*this, attributeName, attributeValue) );2058 setAttributeEventListener(eventType, JSLazyEventListener::create(*this, attributeName, attributeValue), mainThreadNormalWorld()); 2059 2059 } 2060 2060 -
trunk/Source/WebCore/dom/EventTarget.cpp
r212321 r215486 3 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 4 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * Copyright (C) 2004 , 2005, 2006, 2007 Apple Inc. All rights reserved.5 * Copyright (C) 2004-2017 Apple Inc. All rights reserved. 6 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 7 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> … … 33 33 #include "EventTarget.h" 34 34 35 #include "DOMWrapperWorld.h" 35 36 #include "EventNames.h" 36 37 #include "ExceptionCode.h" 37 38 #include "InspectorInstrumentation.h" 39 #include "JSEventListener.h" 38 40 #include "NoEventDispatchAssertion.h" 39 41 #include "ScriptController.h" … … 105 107 } 106 108 107 bool EventTarget::setAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&& listener )108 { 109 auto* existingListener = attributeEventListener(eventType );109 bool EventTarget::setAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&& listener, DOMWrapperWorld& isolatedWorld) 110 { 111 auto* existingListener = attributeEventListener(eventType, isolatedWorld); 110 112 if (!listener) { 111 113 if (existingListener) … … 120 122 } 121 123 122 EventListener* EventTarget::attributeEventListener(const AtomicString& eventType )124 EventListener* EventTarget::attributeEventListener(const AtomicString& eventType, DOMWrapperWorld& isolatedWorld) 123 125 { 124 126 for (auto& eventListener : eventListeners(eventType)) { 125 if (eventListener->callback().isAttribute()) 126 return &eventListener->callback(); 127 } 127 auto& listener = eventListener->callback(); 128 if (!listener.isAttribute()) 129 continue; 130 131 auto& listenerWorld = downcast<JSEventListener>(listener).isolatedWorld(); 132 if (&listenerWorld == &isolatedWorld) 133 return &listener; 134 } 135 128 136 return nullptr; 129 137 } -
trunk/Source/WebCore/dom/EventTarget.h
r209570 r215486 3 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 4 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * Copyright (C) 2004 , 2005, 2006, 2007, 2008Apple Inc. All rights reserved.5 * Copyright (C) 2004-2017 Apple Inc. All rights reserved. 6 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 7 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> … … 42 42 43 43 class DOMWindow; 44 class DOMWrapperWorld; 44 45 class Node; 45 46 … … 105 106 106 107 // Used for legacy "onevent" attributes. 107 bool setAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&& );108 EventListener* attributeEventListener(const AtomicString& eventType );108 bool setAttributeEventListener(const AtomicString& eventType, RefPtr<EventListener>&&, DOMWrapperWorld&); 109 EventListener* attributeEventListener(const AtomicString& eventType, DOMWrapperWorld&); 109 110 110 111 bool hasEventListeners() const; -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r213355 r215486 1 1 /* 2 * Copyright (C) 2005 , 2006, 2008Apple Inc. All rights reserved.2 * Copyright (C) 2005-2017 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 4 4 * … … 33 33 #include "BreakBlockquoteCommand.h" 34 34 #include "CSSStyleDeclaration.h" 35 #include "DOMWrapperWorld.h" 35 36 #include "DataTransfer.h" 36 37 #include "Document.h" … … 168 169 Node* shadowAncestorNode = editableRoot->deprecatedShadowAncestorNode(); 169 170 170 if (!editableRoot->attributeEventListener(eventNames().webkitBeforeTextInsertedEvent )171 if (!editableRoot->attributeEventListener(eventNames().webkitBeforeTextInsertedEvent, mainThreadNormalWorld()) 171 172 && !(shadowAncestorNode && shadowAncestorNode->renderer() && shadowAncestorNode->renderer()->isTextControl()) 172 173 && editableRoot->hasRichlyEditableStyle()) { -
trunk/Source/WebCore/html/HTMLBodyElement.cpp
r211591 r215486 4 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 5 5 * (C) 2001 Dirk Mueller (mueller@kde.org) 6 * Copyright (C) 2004 , 2006-2010, 2015Apple Inc. All rights reserved.6 * Copyright (C) 2004-2017 Apple Inc. All rights reserved. 7 7 * 8 8 * This library is free software; you can redistribute it and/or … … 29 29 #include "CSSValueKeywords.h" 30 30 #include "DOMWindow.h" 31 #include "DOMWrapperWorld.h" 31 32 #include "EventNames.h" 32 33 #include "Frame.h" … … 174 175 175 176 if (name == onselectionchangeAttr) { 176 document().setAttributeEventListener(eventNames().selectionchangeEvent, name, value );177 document().setAttributeEventListener(eventNames().selectionchangeEvent, name, value, mainThreadNormalWorld()); 177 178 return; 178 179 } … … 180 181 auto& eventName = eventNameForWindowEventHandlerAttribute(name); 181 182 if (!eventName.isNull()) { 182 document().setWindowAttributeEventListener(eventName, name, value );183 document().setWindowAttributeEventListener(eventName, name, value, mainThreadNormalWorld()); 183 184 return; 184 185 } -
trunk/Source/WebCore/html/HTMLFrameSetElement.cpp
r214435 r215486 4 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 5 5 * (C) 2001 Dirk Mueller (mueller@kde.org) 6 * Copyright (C) 2004 , 2006, 2009, 2010Apple Inc. All rights reserved.6 * Copyright (C) 2004-2017 Apple Inc. All rights reserved. 7 7 * 8 8 * This library is free software; you can redistribute it and/or … … 26 26 27 27 #include "CSSPropertyNames.h" 28 #include "DOMWrapperWorld.h" 28 29 #include "Document.h" 29 30 #include "ElementIterator.h" … … 143 144 auto& eventName = HTMLBodyElement::eventNameForWindowEventHandlerAttribute(name); 144 145 if (!eventName.isNull()) { 145 document().setWindowAttributeEventListener(eventName, name, value );146 document().setWindowAttributeEventListener(eventName, name, value, mainThreadNormalWorld()); 146 147 return; 147 148 } -
trunk/Source/WebCore/svg/SVGSVGElement.cpp
r214503 r215486 2 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 , 2015Apple Inc. All rights reserved.4 * Copyright (C) 2007-2017 Apple Inc. All rights reserved. 5 5 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. 6 6 * … … 25 25 26 26 #include "CSSHelper.h" 27 #include "DOMWrapperWorld.h" 27 28 #include "ElementIterator.h" 28 29 #include "EventNames.h" … … 216 217 // setting certain event handlers directly on the window object. 217 218 if (name == HTMLNames::onunloadAttr) { 218 document().setWindowAttributeEventListener(eventNames().unloadEvent, name, value );219 document().setWindowAttributeEventListener(eventNames().unloadEvent, name, value, mainThreadNormalWorld()); 219 220 return; 220 221 } 221 222 if (name == HTMLNames::onresizeAttr) { 222 document().setWindowAttributeEventListener(eventNames().resizeEvent, name, value );223 document().setWindowAttributeEventListener(eventNames().resizeEvent, name, value, mainThreadNormalWorld()); 223 224 return; 224 225 } 225 226 if (name == HTMLNames::onscrollAttr) { 226 document().setWindowAttributeEventListener(eventNames().scrollEvent, name, value );227 document().setWindowAttributeEventListener(eventNames().scrollEvent, name, value, mainThreadNormalWorld()); 227 228 return; 228 229 } 229 230 if (name == SVGNames::onzoomAttr) { 230 document().setWindowAttributeEventListener(eventNames().zoomEvent, name, value );231 document().setWindowAttributeEventListener(eventNames().zoomEvent, name, value, mainThreadNormalWorld()); 231 232 return; 232 233 } … … 237 238 // FIXME: Why different from the events above that work only on the outermost <svg> element? 238 239 if (name == HTMLNames::onabortAttr) { 239 document().setWindowAttributeEventListener(eventNames().abortEvent, name, value );240 document().setWindowAttributeEventListener(eventNames().abortEvent, name, value, mainThreadNormalWorld()); 240 241 return; 241 242 } 242 243 if (name == HTMLNames::onerrorAttr) { 243 document().setWindowAttributeEventListener(eventNames().errorEvent, name, value );244 document().setWindowAttributeEventListener(eventNames().errorEvent, name, value, mainThreadNormalWorld()); 244 245 return; 245 246 }
Note: See TracChangeset
for help on using the changeset viewer.