WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-94987-20121012095657.patch (text/plain), 32.67 KB, created by
Robert Flack
on 2012-10-12 06:58:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Robert Flack
Created:
2012-10-12 06:58:01 PDT
Size:
32.67 KB
patch
obsolete
>Subversion Revision: 131010 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 41816d33dd64cbd8eca097e9ef298459451665e6..bde42a1e387ca9ce441199a03bd4d4a44da2bf51 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,67 @@ >+2012-10-12 Robert Flack <flackr@chromium.org> >+ >+ Add platform event time to DOM events >+ https://bugs.webkit.org/show_bug.cgi?id=94987 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds a webkitSystemTime property to DOM events which exposes the platform event >+ timestamp consistent with Performance.now() timestamps as discussed on www-dom: >+ http://lists.w3.org/Archives/Public/www-dom/2012AprJun/0069.html >+ >+ No new tests as this just exposes a new property on events. >+ >+ * dom/Event.cpp: >+ (WebCore::Event::Event): >+ * dom/Event.h: >+ (WebCore::Event::webkitSystemTime): >+ (Event): >+ * dom/Event.idl: >+ * dom/KeyboardEvent.cpp: >+ (WebCore::KeyboardEvent::KeyboardEvent): >+ * dom/KeyboardEvent.h: >+ (WebCore::KeyboardEvent::create): >+ (KeyboardEvent): >+ * dom/MouseEvent.cpp: >+ (WebCore::MouseEvent::create): >+ (WebCore::MouseEvent::MouseEvent): >+ (WebCore::SimulatedMouseEvent::SimulatedMouseEvent): >+ * dom/MouseEvent.h: >+ (WebCore::MouseEvent::create): >+ (MouseEvent): >+ * dom/MouseRelatedEvent.cpp: >+ (WebCore::MouseRelatedEvent::MouseRelatedEvent): >+ * dom/MouseRelatedEvent.h: >+ (MouseRelatedEvent): >+ * dom/Node.cpp: >+ (WebCore::Node::dispatchKeyEvent): >+ (WebCore::Node::dispatchMouseEvent): >+ (WebCore::Node::dispatchWheelEvent): >+ * dom/TouchEvent.cpp: >+ (WebCore::TouchEvent::TouchEvent): >+ (WebCore::TouchEvent::initTouchEvent): >+ * dom/TouchEvent.h: >+ (WebCore::TouchEvent::create): >+ (TouchEvent): >+ * dom/UIEvent.cpp: >+ (WebCore::UIEvent::UIEvent): >+ * dom/UIEvent.h: >+ (UIEvent): >+ * dom/UIEventWithKeyState.h: >+ (WebCore::UIEventWithKeyState::UIEventWithKeyState): >+ * dom/WheelEvent.cpp: >+ (WebCore::WheelEvent::WheelEvent): >+ (WebCore::WheelEventDispatchMediator::create): >+ (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): >+ * dom/WheelEvent.h: >+ (WebCore::WheelEvent::create): >+ (WheelEvent): >+ (WheelEventDispatchMediator): >+ * page/EventHandler.cpp: >+ (WebCore::EventHandler::dispatchDragEvent): >+ (WebCore::EventHandler::keyEvent): >+ (WebCore::EventHandler::handleTouchEvent): >+ > 2012-10-10 Simon Fraser <simon.fraser@apple.com> > > compositing/tiling/crash-reparent-tiled-layer.html is flakey >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index 3dbd465d3f9341dae842a8bbb15268f19a5adaa1..9db942aff0ccd9d092cd7b7376e7aa4f2c3bc3d5 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,17 @@ >+2012-10-12 Robert Flack <flackr@chromium.org> >+ >+ Add platform event time to DOM events >+ https://bugs.webkit.org/show_bug.cgi?id=94987 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds a webkitSystemTime property to DOM events which exposes the platform event >+ timestamp consistent with Performance.now() timestamps as discussed on www-dom: >+ http://lists.w3.org/Archives/Public/www-dom/2012AprJun/0069.html >+ >+ * src/WebInputEventConversion.cpp: >+ (WebKit::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): >+ > 2012-10-10 Justin Novosad <junov@chromium.org> > > [Chromium] Smoother animation for non-RAF 2D canvas animations >diff --git a/Source/WebCore/dom/Event.cpp b/Source/WebCore/dom/Event.cpp >index c1e609ff40a0611a72c2c7c11081512beb28dc55..810603a8b2976873f37329570860df943188746d 100644 >--- a/Source/WebCore/dom/Event.cpp >+++ b/Source/WebCore/dom/Event.cpp >@@ -51,10 +51,11 @@ Event::Event() > , m_eventPhase(0) > , m_currentTarget(0) > , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) >+ , m_timeStamp(0) > { > } > >-Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg) >+Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, double timeStamp) > : m_type(eventType) > , m_canBubble(canBubbleArg) > , m_cancelable(cancelableArg) >@@ -66,6 +67,7 @@ Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr > , m_eventPhase(0) > , m_currentTarget(0) > , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) >+ , m_timeStamp(timeStamp) > { > } > >@@ -81,6 +83,7 @@ Event::Event(const AtomicString& eventType, const EventInit& initializer) > , m_eventPhase(0) > , m_currentTarget(0) > , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) >+ , m_timeStamp(0) > { > } > >diff --git a/Source/WebCore/dom/Event.h b/Source/WebCore/dom/Event.h >index 236661391ecb902e10a6a225aa8269da8cf7f7ad..bdb85f1960b38dc891a4ed205207be529d447498 100644 >--- a/Source/WebCore/dom/Event.h >+++ b/Source/WebCore/dom/Event.h >@@ -105,6 +105,7 @@ public: > bool bubbles() const { return m_canBubble; } > bool cancelable() const { return m_cancelable; } > DOMTimeStamp timeStamp() const { return m_createTime; } >+ double webkitSystemTime() const { return m_timeStamp; } > > void stopPropagation() { m_propagationStopped = true; } > void stopImmediatePropagation() { m_immediatePropagationStopped = true; } >@@ -166,7 +167,7 @@ public: > > protected: > Event(); >- Event(const AtomicString& type, bool canBubble, bool cancelable); >+ Event(const AtomicString& type, bool canBubble, bool cancelable, double timeStamp = 0); > Event(const AtomicString& type, const EventInit&); > > virtual void receivedTarget(); >@@ -187,6 +188,7 @@ private: > EventTarget* m_currentTarget; > RefPtr<EventTarget> m_target; > DOMTimeStamp m_createTime; >+ double m_timeStamp; > > RefPtr<Event> m_underlyingEvent; > }; >diff --git a/Source/WebCore/dom/Event.idl b/Source/WebCore/dom/Event.idl >index ab039d07f43da67a928529e766b98a0d2a93597a..547ff77e5367726f4605299683556d345fb9292b 100644 >--- a/Source/WebCore/dom/Event.idl >+++ b/Source/WebCore/dom/Event.idl >@@ -61,6 +61,7 @@ module events { > readonly attribute [InitializedByEventConstructor] boolean bubbles; > readonly attribute [InitializedByEventConstructor] boolean cancelable; > readonly attribute DOMTimeStamp timeStamp; >+ readonly attribute double webkitSystemTime; > > void stopPropagation(); > void preventDefault(); >diff --git a/Source/WebCore/dom/KeyboardEvent.cpp b/Source/WebCore/dom/KeyboardEvent.cpp >index 1c6119f5ba3cbe2d7b2c16368cb222200fb56d36..4198d2be83b366137e6f3f3f82f0bdbe9ff89c51 100644 >--- a/Source/WebCore/dom/KeyboardEvent.cpp >+++ b/Source/WebCore/dom/KeyboardEvent.cpp >@@ -98,9 +98,9 @@ KeyboardEvent::KeyboardEvent() > { > } > >-KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view) >+KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view, double timeStamp) > : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), >- true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey()) >+ true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey(), timeStamp) > , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) > , m_keyIdentifier(key.keyIdentifier()) > , m_keyLocation(keyLocationCode(key)) >diff --git a/Source/WebCore/dom/KeyboardEvent.h b/Source/WebCore/dom/KeyboardEvent.h >index 1537410bebb60bf819b0e3a8a3012620565d8811..f8c926bf4388d436c46d10e5ed1773ab67d6d1a6 100644 >--- a/Source/WebCore/dom/KeyboardEvent.h >+++ b/Source/WebCore/dom/KeyboardEvent.h >@@ -59,9 +59,9 @@ namespace WebCore { > { > return adoptRef(new KeyboardEvent); > } >- static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platformEvent, AbstractView* view) >+ static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platformEvent, AbstractView* view, double timeStamp = 0) > { >- return adoptRef(new KeyboardEvent(platformEvent, view)); >+ return adoptRef(new KeyboardEvent(platformEvent, view, timeStamp)); > } > static PassRefPtr<KeyboardEvent> create(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, > const String& keyIdentifier, unsigned keyLocation, >@@ -99,7 +99,7 @@ namespace WebCore { > > private: > KeyboardEvent(); >- KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*); >+ KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*, double timeStamp); > KeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*, > const String& keyIdentifier, unsigned keyLocation, > bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey); >diff --git a/Source/WebCore/dom/MouseEvent.cpp b/Source/WebCore/dom/MouseEvent.cpp >index 9e92c27136ccf90dbe3b7b260b5bb67aea4456ab..4affecaa5bccf5fba66e8edf7df2a28ba22c1e3d 100644 >--- a/Source/WebCore/dom/MouseEvent.cpp >+++ b/Source/WebCore/dom/MouseEvent.cpp >@@ -32,7 +32,7 @@ > > namespace WebCore { > >-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget) >+PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget, double timeStamp) > { > ASSERT(event.type() == PlatformEvent::MouseMoved || event.button() != NoButton); > >@@ -44,7 +44,7 @@ PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRef > event.movementDelta().x(), event.movementDelta().y(), > #endif > event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.button(), >- relatedTarget, 0, false); >+ relatedTarget, 0, false, timeStamp); > } > > MouseEvent::MouseEvent() >@@ -60,13 +60,15 @@ MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance > #endif > bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, > unsigned short button, PassRefPtr<EventTarget> relatedTarget, >- PassRefPtr<Clipboard> clipboard, bool isSimulated) >+ PassRefPtr<Clipboard> clipboard, bool isSimulated, >+ double timeStamp) > : MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, IntPoint(screenX, screenY), > IntPoint(pageX, pageY), > #if ENABLE(POINTER_LOCK) > IntPoint(movementX, movementY), > #endif >- ctrlKey, altKey, shiftKey, metaKey, isSimulated) >+ ctrlKey, altKey, shiftKey, metaKey, isSimulated, >+ timeStamp) > , m_button(button == (unsigned short)-1 ? 0 : button) > , m_buttonDown(button != (unsigned short)-1) > , m_relatedTarget(relatedTarget) >@@ -192,7 +194,7 @@ SimulatedMouseEvent::SimulatedMouseEvent(const AtomicString& eventType, PassRefP > #if ENABLE(POINTER_LOCK) > 0, 0, > #endif >- false, false, false, false, 0, 0, 0, true) >+ false, false, false, false, 0, 0, 0, true, 0) > { > if (UIEventWithKeyState* keyStateEvent = findEventWithKeyState(underlyingEvent.get())) { > m_ctrlKey = keyStateEvent->ctrlKey(); >diff --git a/Source/WebCore/dom/MouseEvent.h b/Source/WebCore/dom/MouseEvent.h >index a1c7922b9c7d74f2b8d164e84089ecd457a8cc5e..75706795400fb230d35ec7fc3a96e624618ce181 100644 >--- a/Source/WebCore/dom/MouseEvent.h >+++ b/Source/WebCore/dom/MouseEvent.h >@@ -46,15 +46,15 @@ class PlatformMouseEvent; > int movementX, int movementY, > #endif > bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, >- PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard> clipboard = 0, bool isSimulated = false) >+ PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard> clipboard = 0, bool isSimulated = false, double timeStamp = 0) > { > return adoptRef(new MouseEvent(type, canBubble, cancelable, view, detail, screenX, screenY, pageX, pageY, > #if ENABLE(POINTER_LOCK) > movementX, movementY, > #endif >- ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, clipboard, isSimulated)); >+ ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, clipboard, isSimulated, timeStamp)); > } >- static PassRefPtr<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget); >+ static PassRefPtr<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget, double timeStamp); > > virtual ~MouseEvent(); > >@@ -92,7 +92,7 @@ class PlatformMouseEvent; > int movementX, int movementY, > #endif > bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, >- PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard> clipboard, bool isSimulated); >+ PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard> clipboard, bool isSimulated, double timeStamp); > > protected: > MouseEvent(); >diff --git a/Source/WebCore/dom/MouseRelatedEvent.cpp b/Source/WebCore/dom/MouseRelatedEvent.cpp >index 8df33cae355432ddfc3dcd4461de702e73f066d6..4bd8e560c2735ef28daccb5bad0187acb8138ed8 100644 >--- a/Source/WebCore/dom/MouseRelatedEvent.cpp >+++ b/Source/WebCore/dom/MouseRelatedEvent.cpp >@@ -57,8 +57,8 @@ MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubb > #if ENABLE(POINTER_LOCK) > const IntPoint& movementDelta, > #endif >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated) >- : UIEventWithKeyState(eventType, canBubble, cancelable, abstractView, detail, ctrlKey, altKey, shiftKey, metaKey) >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated, double timeStamp) >+ : UIEventWithKeyState(eventType, canBubble, cancelable, abstractView, detail, ctrlKey, altKey, shiftKey, metaKey, timeStamp) > , m_screenLocation(screenLocation) > #if ENABLE(POINTER_LOCK) > , m_movementDelta(movementDelta) >diff --git a/Source/WebCore/dom/MouseRelatedEvent.h b/Source/WebCore/dom/MouseRelatedEvent.h >index 249b83347cd1da51793e743de8cb22a96c1aed04..fdbdda2309f25fd24703ab7514b3791f78774e15 100644 >--- a/Source/WebCore/dom/MouseRelatedEvent.h >+++ b/Source/WebCore/dom/MouseRelatedEvent.h >@@ -67,7 +67,7 @@ namespace WebCore { > #if ENABLE(POINTER_LOCK) > const IntPoint& movementDelta, > #endif >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated = false); >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated = false, double timeStamp = 0); > > void initCoordinates(); > void initCoordinates(const LayoutPoint& clientLocation); >diff --git a/Source/WebCore/dom/Node.cpp b/Source/WebCore/dom/Node.cpp >index 145527edbc1cb5e26a48fe1b0e28c95a3c438b8c..060265a01c273961744fb951bed98a18e34fccf7 100644 >--- a/Source/WebCore/dom/Node.cpp >+++ b/Source/WebCore/dom/Node.cpp >@@ -45,6 +45,7 @@ > #include "DOMImplementation.h" > #include "DOMSettableTokenList.h" > #include "Document.h" >+#include "DocumentLoader.h" > #include "DocumentType.h" > #include "DynamicNodeList.h" > #include "Element.h" >@@ -75,6 +76,8 @@ > #include "NodeRareData.h" > #include "NodeRenderingContext.h" > #include "Page.h" >+#include "PerformanceTiming.h" >+#include "PlatformKeyboardEvent.h" > #include "PlatformMouseEvent.h" > #include "PlatformWheelEvent.h" > #include "ProcessingInstruction.h" >@@ -2648,13 +2651,13 @@ bool Node::dispatchDOMActivateEvent(int detail, PassRefPtr<Event> underlyingEven > > bool Node::dispatchKeyEvent(const PlatformKeyboardEvent& event) > { >- return EventDispatcher::dispatchEvent(this, KeyboardEventDispatchMediator::create(KeyboardEvent::create(event, document()->defaultView()))); >+ return EventDispatcher::dispatchEvent(this, KeyboardEventDispatchMediator::create(KeyboardEvent::create(event, document()->defaultView(), 1000.0 * document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(event.timestamp())))); > } > > bool Node::dispatchMouseEvent(const PlatformMouseEvent& event, const AtomicString& eventType, > int detail, Node* relatedTarget) > { >- return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator::create(MouseEvent::create(eventType, document()->defaultView(), event, detail, relatedTarget))); >+ return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator::create(MouseEvent::create(eventType, document()->defaultView(), event, detail, relatedTarget, 1000.0 * document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(event.timestamp())))); > } > > #if ENABLE(GESTURE_EVENTS) >@@ -2685,7 +2688,7 @@ bool Node::dispatchBeforeLoadEvent(const String& sourceURL) > > bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) > { >- return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::create(event, document()->defaultView())); >+ return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::create(event, document()->defaultView(), 1000.0 * document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(event.timestamp()))); > } > > void Node::dispatchFocusEvent(PassRefPtr<Node> oldFocusedNode) >diff --git a/Source/WebCore/dom/TouchEvent.cpp b/Source/WebCore/dom/TouchEvent.cpp >index a58f1dcc9e238ebea462cfa5b659476e1b6036b3..48aeae0960dc11dafd34fc88e40b2950f21194bb 100644 >--- a/Source/WebCore/dom/TouchEvent.cpp >+++ b/Source/WebCore/dom/TouchEvent.cpp >@@ -42,13 +42,15 @@ TouchEvent::TouchEvent() > TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, > TouchList* changedTouches, const AtomicString& type, > PassRefPtr<AbstractView> view, int screenX, int screenY, int pageX, int pageY, >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, >+ double timeStamp) > : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), > IntPoint(pageX, pageY), > #if ENABLE(POINTER_LOCK) > IntPoint(0, 0), > #endif >- ctrlKey, altKey, shiftKey, metaKey) >+ ctrlKey, altKey, shiftKey, metaKey, false, >+ timeStamp) > , m_touches(touches) > , m_targetTouches(targetTouches) > , m_changedTouches(changedTouches) >@@ -86,7 +88,6 @@ void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, > m_doubleTap = false; > m_touchHold = false; > #endif >- > } > > const AtomicString& TouchEvent::interfaceName() const >diff --git a/Source/WebCore/dom/TouchEvent.h b/Source/WebCore/dom/TouchEvent.h >index b2e5b2ee346bd800752db19d6e82814503c84c77..bdc2c3edbb03964380d9eb54dc05f6687a8a399d 100644 >--- a/Source/WebCore/dom/TouchEvent.h >+++ b/Source/WebCore/dom/TouchEvent.h >@@ -47,11 +47,12 @@ public: > TouchList* targetTouches, TouchList* changedTouches, > const AtomicString& type, PassRefPtr<AbstractView> view, > int screenX, int screenY, int pageX, int pageY, >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, >+ double timeStamp) > { > return adoptRef(new TouchEvent(touches, targetTouches, changedTouches, > type, view, screenX, screenY, pageX, pageY, >- ctrlKey, altKey, shiftKey, metaKey)); >+ ctrlKey, altKey, shiftKey, metaKey, timeStamp)); > } > > void initTouchEvent(TouchList* touches, TouchList* targetTouches, >@@ -79,7 +80,8 @@ private: > TouchList* changedTouches, const AtomicString& type, > PassRefPtr<AbstractView>, int screenX, int screenY, int pageX, > int pageY, >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, >+ double timeStamp); > > RefPtr<TouchList> m_touches; > RefPtr<TouchList> m_targetTouches; >diff --git a/Source/WebCore/dom/UIEvent.cpp b/Source/WebCore/dom/UIEvent.cpp >index 367372670ed8dd055497e8ada4449daefd423d43..f13074df2c47e474cd411474f663792f6bc93309 100644 >--- a/Source/WebCore/dom/UIEvent.cpp >+++ b/Source/WebCore/dom/UIEvent.cpp >@@ -35,8 +35,8 @@ UIEvent::UIEvent() > { > } > >-UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg) >- : Event(eventType, canBubbleArg, cancelableArg) >+UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg, double timeStamp) >+ : Event(eventType, canBubbleArg, cancelableArg, timeStamp) > , m_view(viewArg) > , m_detail(detailArg) > { >diff --git a/Source/WebCore/dom/UIEvent.h b/Source/WebCore/dom/UIEvent.h >index 207eb7b04f6be638621abeba0c42ac85303e5aba..0db6c19fec9b095ec9a3c8436559dfdb5b9d5f89 100644 >--- a/Source/WebCore/dom/UIEvent.h >+++ b/Source/WebCore/dom/UIEvent.h >@@ -65,7 +65,7 @@ namespace WebCore { > > protected: > UIEvent(); >- UIEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, int detail); >+ UIEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, int detail, double timeStamp = 0); > > private: > RefPtr<AbstractView> m_view; >diff --git a/Source/WebCore/dom/UIEventWithKeyState.h b/Source/WebCore/dom/UIEventWithKeyState.h >index 414161a7d062afae7d6350d5ca1bde0cd54f29fd..4e3ff6cad0faa0117bd7868a40ba23ddfa4e01c6 100644 >--- a/Source/WebCore/dom/UIEventWithKeyState.h >+++ b/Source/WebCore/dom/UIEventWithKeyState.h >@@ -45,8 +45,8 @@ namespace WebCore { > } > > UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view, >- int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) >- : UIEvent(type, canBubble, cancelable, view, detail) >+ int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, double timeStamp = 0) >+ : UIEvent(type, canBubble, cancelable, view, detail, timeStamp) > , m_ctrlKey(ctrlKey) > , m_altKey(altKey) > , m_shiftKey(shiftKey) >diff --git a/Source/WebCore/dom/WheelEvent.cpp b/Source/WebCore/dom/WheelEvent.cpp >index e76c33ace9e6f6f053218ef41e2ff22d2beec918..05934ba746c9744c76f1722d81387af51c32acc6 100755 >--- a/Source/WebCore/dom/WheelEvent.cpp >+++ b/Source/WebCore/dom/WheelEvent.cpp >@@ -41,14 +41,14 @@ WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, > Granularity granularity, PassRefPtr<AbstractView> view, > const IntPoint& screenLocation, const IntPoint& pageLocation, > bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, >- bool directionInvertedFromDevice) >+ bool directionInvertedFromDevice, double timeStamp) > : MouseEvent(eventNames().mousewheelEvent, > true, true, view, 0, screenLocation.x(), screenLocation.y(), > pageLocation.x(), pageLocation.y(), > #if ENABLE(POINTER_LOCK) > 0, 0, > #endif >- ctrlKey, altKey, shiftKey, metaKey, 0, 0, 0, false) >+ ctrlKey, altKey, shiftKey, metaKey, 0, 0, 0, false, timeStamp) > , m_wheelDelta(IntPoint(static_cast<int>(wheelTicks.x() * tickMultiplier), static_cast<int>(wheelTicks.y() * tickMultiplier))) > , m_rawDelta(roundedIntPoint(rawDelta)) > , m_granularity(granularity) >@@ -104,19 +104,19 @@ inline static WheelEvent::Granularity granularity(const PlatformWheelEvent& even > return event.granularity() == ScrollByPageWheelEvent ? WheelEvent::Page : WheelEvent::Pixel; > } > >-PassRefPtr<WheelEventDispatchMediator> WheelEventDispatchMediator::create(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view) >+PassRefPtr<WheelEventDispatchMediator> WheelEventDispatchMediator::create(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view, double timeStamp) > { >- return adoptRef(new WheelEventDispatchMediator(event, view)); >+ return adoptRef(new WheelEventDispatchMediator(event, view, timeStamp)); > } > >-WheelEventDispatchMediator::WheelEventDispatchMediator(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view) >+WheelEventDispatchMediator::WheelEventDispatchMediator(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view, double timeStamp) > { > if (!(event.deltaX() || event.deltaY())) > return; > > setEvent(WheelEvent::create(FloatPoint(event.wheelTicksX(), event.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()), > granularity(event), view, event.globalPosition(), event.position(), >- event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.directionInvertedFromDevice())); >+ event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.directionInvertedFromDevice(), timeStamp)); > } > > WheelEvent* WheelEventDispatchMediator::event() const >diff --git a/Source/WebCore/dom/WheelEvent.h b/Source/WebCore/dom/WheelEvent.h >index 13576890d831c3e896f0be3f011375d9111fc8ce..9ea57a4f6d6c3a9deb77150e54f9f82801d570b8 100755 >--- a/Source/WebCore/dom/WheelEvent.h >+++ b/Source/WebCore/dom/WheelEvent.h >@@ -44,10 +44,10 @@ namespace WebCore { > static PassRefPtr<WheelEvent> create(const FloatPoint& wheelTicks, > const FloatPoint& rawDelta, Granularity granularity, PassRefPtr<AbstractView> view, > const IntPoint& screenLocation, const IntPoint& pageLocation, >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvertedFromDevice) >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvertedFromDevice, double timeStamp) > { > return adoptRef(new WheelEvent(wheelTicks, rawDelta, granularity, view, >- screenLocation, pageLocation, ctrlKey, altKey, shiftKey, metaKey, directionInvertedFromDevice)); >+ screenLocation, pageLocation, ctrlKey, altKey, shiftKey, metaKey, directionInvertedFromDevice, timeStamp)); > } > > void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView>, >@@ -77,7 +77,7 @@ namespace WebCore { > WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, > Granularity, PassRefPtr<AbstractView>, > const IntPoint& screenLocation, const IntPoint& pageLocation, >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvertedFromDevice); >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvertedFromDevice, double timeStamp); > > IntPoint m_wheelDelta; > IntPoint m_rawDelta; >@@ -87,9 +87,9 @@ namespace WebCore { > > class WheelEventDispatchMediator : public EventDispatchMediator { > public: >- static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEvent&, PassRefPtr<AbstractView>); >+ static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEvent&, PassRefPtr<AbstractView>, double timeStamp = 0); > private: >- WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractView>); >+ WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractView>, double timeStamp); > WheelEvent* event() const; > virtual bool dispatchEvent(EventDispatcher*) const; > }; >diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp >index 99d99df7644b09a953be00afbf0cd2bee76fd883..dfb494078261ee17e6119e020d17ab41252a408f 100644 >--- a/Source/WebCore/page/EventHandler.cpp >+++ b/Source/WebCore/page/EventHandler.cpp >@@ -37,6 +37,7 @@ > #include "CursorList.h" > #include "Document.h" > #include "DocumentEventQueue.h" >+#include "DocumentLoader.h" > #include "DragController.h" > #include "DragState.h" > #include "Editor.h" >@@ -63,6 +64,7 @@ > #include "MouseEvent.h" > #include "MouseEventWithHitTestResults.h" > #include "Page.h" >+#include "PerformanceTiming.h" > #include "PlatformEvent.h" > #include "PlatformKeyboardEvent.h" > #include "PlatformWheelEvent.h" >@@ -1969,7 +1971,8 @@ bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa > event.movementDelta().x(), event.movementDelta().y(), > #endif > event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), >- 0, 0, clipboard); >+ 0, 0, clipboard, false, >+ 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(event.timestamp())); > > ExceptionCode ec; > dragTarget->dispatchEvent(me.get(), ec); >@@ -2994,7 +2997,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) > PlatformKeyboardEvent keyDownEvent = initialKeyEvent; > if (keyDownEvent.type() != PlatformEvent::RawKeyDown) > keyDownEvent.disambiguateKeyDownEvent(PlatformEvent::RawKeyDown, backwardCompatibilityMode); >- RefPtr<KeyboardEvent> keydown = KeyboardEvent::create(keyDownEvent, m_frame->document()->defaultView()); >+ RefPtr<KeyboardEvent> keydown = KeyboardEvent::create(keyDownEvent, m_frame->document()->defaultView(), 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(initialKeyEvent.timestamp())); > if (matchedAnAccessKey) > keydown->setDefaultPrevented(true); > keydown->setTarget(node); >@@ -3017,7 +3020,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) > > if (handledByInputMethod) { > keyDownEvent.setWindowsVirtualKeyCode(CompositionEventKeyCode); >- keydown = KeyboardEvent::create(keyDownEvent, m_frame->document()->defaultView()); >+ keydown = KeyboardEvent::create(keyDownEvent, m_frame->document()->defaultView(), 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(initialKeyEvent.timestamp())); > keydown->setTarget(node); > keydown->setDefaultHandled(); > } >@@ -3041,7 +3044,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) > keyPressEvent.disambiguateKeyDownEvent(PlatformEvent::Char, backwardCompatibilityMode); > if (keyPressEvent.text().isEmpty()) > return keydownResult; >- RefPtr<KeyboardEvent> keypress = KeyboardEvent::create(keyPressEvent, m_frame->document()->defaultView()); >+ RefPtr<KeyboardEvent> keypress = KeyboardEvent::create(keyPressEvent, m_frame->document()->defaultView(), 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(initialKeyEvent.timestamp())); > keypress->setTarget(node); > if (keydownResult) > keypress->setDefaultPrevented(true); >@@ -3792,7 +3795,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) > RefPtr<TouchEvent> touchEvent = > TouchEvent::create(effectiveTouches.get(), targetTouches.get(), changedTouches[state].m_touches.get(), > stateName, touchEventTarget->toNode()->document()->defaultView(), >- 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey()); >+ 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), >+ 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(event.timestamp())); > ExceptionCode ec = 0; > touchEventTarget->dispatchEvent(touchEvent.get(), ec); > swallowedEvent = swallowedEvent || touchEvent->defaultPrevented() || touchEvent->defaultHandled(); >diff --git a/Source/WebKit/chromium/src/WebInputEventConversion.cpp b/Source/WebKit/chromium/src/WebInputEventConversion.cpp >index 3f9fe091c24ff836b985ddba4e41e359c5e7a0cb..b656b445766dbdc3c0a36713242ca5a316ada71f 100644 >--- a/Source/WebKit/chromium/src/WebInputEventConversion.cpp >+++ b/Source/WebKit/chromium/src/WebInputEventConversion.cpp >@@ -235,6 +235,7 @@ PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder(const WebKeyboardEven > m_nativeVirtualKeyCode = e.nativeKeyCode; > m_isKeypad = (e.modifiers & WebInputEvent::IsKeyPad); > m_isSystemKey = e.isSystemKey; >+ m_timestamp = e.timeStampSeconds; > > m_modifiers = 0; > if (e.modifiers & WebInputEvent::ShiftKey)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 94987
:
160531
|
160541
|
160547
|
168415
|
170536
|
170648
|
170658
|
170659
|
170750
|
170977
|
170978
|
173044
|
173346
|
173360
|
173424
|
173633
|
174436
|
174465
|
175697
|
175826