Changeset 121234 in webkit
- Timestamp:
- Jun 26, 2012 12:41:32 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r121216 r121234 1 2012-06-26 Dominic Cooney <dominicc@chromium.org> 2 3 WheelEvent should inherit from MouseEvent 4 https://bugs.webkit.org/show_bug.cgi?id=76104 5 6 Reviewed by Kentaro Hara. 7 8 * fast/events/event-creation-expected.txt: 9 * fast/events/event-creation.html: Also check WheelEvent instanceof MouseEvent as well as UIEvent, Event 10 1 11 2012-06-25 Fumitoshi Ukai <ukai@chromium.org> 2 12 -
trunk/LayoutTests/fast/events/event-creation-expected.txt
r119360 r121234 79 79 PASS document.createEvent('WebKitTransitionEvent').constructor === window.WebKitTransitionEvent is true 80 80 PASS document.createEvent('WheelEvent') instanceof window.WheelEvent is true 81 PASS document.createEvent('WheelEvent') instanceof window.MouseEvent is true 81 82 PASS document.createEvent('WheelEvent') instanceof window.UIEvent is true 82 83 PASS document.createEvent('WheelEvent') instanceof window.Event is true -
trunk/LayoutTests/fast/events/event-creation.html
r119360 r121234 130 130 // WheelEvent 131 131 shouldBeTrue("document.createEvent('WheelEvent') instanceof window.WheelEvent"); 132 shouldBeTrue("document.createEvent('WheelEvent') instanceof window.MouseEvent"); 132 133 shouldBeTrue("document.createEvent('WheelEvent') instanceof window.UIEvent"); 133 134 shouldBeTrue("document.createEvent('WheelEvent') instanceof window.Event"); -
trunk/Source/WebCore/ChangeLog
-
Property
svn:executable
set to
*
r121232 r121234 1 2012-06-26 Dominic Cooney <dominicc@chromium.org> 2 3 WheelEvent should inherit from MouseEvent 4 https://bugs.webkit.org/show_bug.cgi?id=76104 5 6 Reviewed by Kentaro Hara. 7 8 The spec for WheelEvent is 9 <http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-WheelEvent> 10 11 Tests: fast/events/event-creation.html 12 http://samples.msdn.microsoft.com/ietestcenter/dominheritance/showdominheritancetest.htm?Prototype_WheelEvent 13 14 * bindings/objc/PublicDOMInterfaces.h: Remove redundant MouseEvent API from WheelEvent 15 * bindings/scripts/CodeGeneratorObjC.pm: MouseEvents are Events 16 * dom/MouseEvent.h: Expose no-arg constructor to WheelEvent 17 * dom/WheelEvent.cpp: 18 (WebCore::WheelEvent::WheelEvent): Call MouseEvent superconstructor 19 (WebCore::WheelEvent::isMouseEvent): Existing callers use this just for 20 moves and clicks, ie the type is exactly MouseEvent. 21 * dom/WheelEvent.h: Extend MouseEvent 22 * dom/WheelEvent.idl: " 23 1 24 2012-06-25 Ryosuke Niwa <rniwa@webkit.org> 2 25 -
Property
svn:executable
set to
-
trunk/Source/WebCore/bindings/objc/DOMEvents.mm
-
Property
svn:executable
set to
*
-
Property
svn:executable
set to
-
trunk/Source/WebCore/bindings/objc/PublicDOMInterfaces.h
r120158 r121234 1083 1083 @end 1084 1084 1085 @interface DOMWheelEvent : DOMUIEvent WEBKIT_VERSION_3_0 1086 @property(readonly) int screenX; 1087 @property(readonly) int screenY; 1088 @property(readonly) int clientX; 1089 @property(readonly) int clientY; 1090 @property(readonly) BOOL ctrlKey; 1091 @property(readonly) BOOL shiftKey; 1092 @property(readonly) BOOL altKey; 1093 @property(readonly) BOOL metaKey; 1085 @interface DOMWheelEvent : DOMMouseEvent WEBKIT_VERSION_3_0 1094 1086 @property(readonly) BOOL isHorizontal; 1095 1087 @property(readonly) int wheelDelta; 1096 1088 @property(readonly) int wheelDeltaX AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER; 1097 1089 @property(readonly) int wheelDeltaY AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER; 1098 @property(readonly) int offsetX AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;1099 @property(readonly) int offsetY AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;1100 @property(readonly) int x AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;1101 @property(readonly) int y AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;1102 1090 - (void)initWheelEvent:(int)wheelDeltaX wheelDeltaY:(int)wheelDeltaY view:(DOMAbstractView *)view screenX:(int)screenX screenY:(int)screenY clientX:(int)clientX clientY:(int)clientY ctrlKey:(BOOL)ctrlKey altKey:(BOOL)altKey shiftKey:(BOOL)shiftKey metaKey:(BOOL)metaKey AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER; 1103 1091 @end -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r120206 r121234 419 419 420 420 return $parent if $parent eq "Object" or IsBaseType($parent); 421 return "Event" if $parent eq "UIEvent" ;421 return "Event" if $parent eq "UIEvent" or $parent eq "MouseEvent"; 422 422 return "CSSValue" if $parent eq "SVGColor" or $parent eq "CSSValueList"; 423 423 return "Node"; -
trunk/Source/WebCore/dom/MouseEvent.h
r119360 r121234 93 93 PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard> clipboard, bool isSimulated); 94 94 95 pr ivate:95 protected: 96 96 MouseEvent(); 97 97 98 private: 98 99 unsigned short m_button; 99 100 bool m_buttonDown; -
trunk/Source/WebCore/dom/WheelEvent.cpp
-
Property
svn:executable
set to
*
r119360 r121234 43 43 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, 44 44 bool directionInvertedFromDevice) 45 : MouseRelatedEvent(eventNames().mousewheelEvent, 46 true, true, view, 0, screenLocation, pageLocation, 45 : MouseEvent(eventNames().mousewheelEvent, 46 true, true, view, 0, screenLocation.x(), screenLocation.y(), 47 pageLocation.x(), pageLocation.y(), 47 48 #if ENABLE(POINTER_LOCK) 48 IntPoint(0, 0),49 0, 0, 49 50 #endif 50 ctrlKey, altKey, shiftKey, metaKey)51 ctrlKey, altKey, shiftKey, metaKey, 0, 0, 0, false) 51 52 , m_wheelDelta(IntPoint(static_cast<int>(wheelTicks.x() * tickMultiplier), static_cast<int>(wheelTicks.y() * tickMultiplier))) 52 53 , m_rawDelta(roundedIntPoint(rawDelta)) … … 94 95 } 95 96 97 bool WheelEvent::isMouseEvent() const 98 { 99 return false; 100 } 101 96 102 inline static WheelEvent::Granularity granularity(const PlatformWheelEvent& event) 97 103 { -
Property
svn:executable
set to
-
trunk/Source/WebCore/dom/WheelEvent.h
-
Property
svn:executable
set to
*
r119360 r121234 27 27 #include "EventDispatchMediator.h" 28 28 #include "FloatPoint.h" 29 #include "Mouse RelatedEvent.h"29 #include "MouseEvent.h" 30 30 31 31 namespace WebCore { 32 32 33 33 // extension: mouse wheel event 34 class WheelEvent : public Mouse RelatedEvent {34 class WheelEvent : public MouseEvent { 35 35 public: 36 36 enum { tickMultiplier = 120 }; … … 71 71 72 72 virtual const AtomicString& interfaceName() const; 73 virtual bool isMouseEvent() const; 73 74 74 75 private: 75 76 WheelEvent(); 76 77 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, 77 Granularity granularity, PassRefPtr<AbstractView>,78 Granularity, PassRefPtr<AbstractView>, 78 79 const IntPoint& screenLocation, const IntPoint& pageLocation, 79 80 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvertedFromDevice); -
Property
svn:executable
set to
-
trunk/Source/WebCore/dom/WheelEvent.idl
r119360 r121234 21 21 module events { 22 22 23 // Based off of proposed IDL interface for WheelEvent: 24 interface WheelEvent : UIEvent { 25 readonly attribute long screenX; 26 readonly attribute long screenY; 27 readonly attribute long clientX; 28 readonly attribute long clientY; 29 readonly attribute boolean ctrlKey; 30 readonly attribute boolean shiftKey; 31 readonly attribute boolean altKey; 32 readonly attribute boolean metaKey; 23 // Based off http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-wheelevents 24 interface WheelEvent : MouseEvent 25 { 33 26 readonly attribute long wheelDelta; 34 27 readonly attribute long wheelDeltaX; 35 28 readonly attribute long wheelDeltaY; 36 29 37 // WebKit Extensions 38 readonly attribute long offsetX; 39 readonly attribute long offsetY; 40 readonly attribute long x; 41 readonly attribute long y; 30 // WebKit Extension 42 31 readonly attribute boolean webkitDirectionInvertedFromDevice; 43 32
Note: See TracChangeset
for help on using the changeset viewer.