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-20120824204659.patch (text/plain), 32.57 KB, created by
Robert Flack
on 2012-08-24 17:47:04 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Robert Flack
Created:
2012-08-24 17:47:04 PDT
Size:
32.57 KB
patch
obsolete
>Subversion Revision: 126658 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2d80923836c2993a30d01daca1dd028347250df4..12d85c66d993f4712890f3eab577479328455e2f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,63 @@ >+2012-08-24 Robert Flack <flackr@chromium.org> >+ >+ Implement HRTimeStamp >+ https://bugs.webkit.org/show_bug.cgi?id=94987 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds a webkitHRTimeStamp property to DOM events which exposes the platform event timestamp consistent with Performance.now() timestamps. >+ >+ * dom/Event.cpp: >+ (WebCore::Event::Event): >+ * dom/Event.h: >+ (WebCore::Event::webkitHRTimeStamp): >+ (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-08-24 Florin Malita <fmalita@chromium.org> > > ASSERTION FAILED: !attached() in WebCore::Node::attach() >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index 0809512d1da49079ee1fcd692da88cc77dcf1a49..7a3c76aecb5a7748a24c68e5ed5051911c9735cd 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,15 @@ >+2012-08-24 Robert Flack <flackr@chromium.org> >+ >+ Implement HRTimeStamp >+ https://bugs.webkit.org/show_bug.cgi?id=94987 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds a webkitHRTimeStamp property to DOM events which exposes the platform event timestamp consistent with Performance.now() timestamps. >+ >+ * src/WebInputEventConversion.cpp: >+ (WebKit::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): >+ > 2012-08-24 W. James MacLean <wjmaclean@chromium.org> > > [chromium] WebViewImpl::enableTouchHighlight() should always clear any existing highlight when invoked. >diff --git a/Source/WebCore/dom/Event.cpp b/Source/WebCore/dom/Event.cpp >index f19cbdda765c626de6275a981351427ba7e7d274..a6d700427b83fb0df8d8a3ad9d4180df2434cb22 100644 >--- a/Source/WebCore/dom/Event.cpp >+++ b/Source/WebCore/dom/Event.cpp >@@ -50,10 +50,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) >@@ -65,6 +66,7 @@ Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr > , m_eventPhase(0) > , m_currentTarget(0) > , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) >+ , m_timeStamp(timeStamp) > { > } > >@@ -80,6 +82,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 5c7d7c753d5ab049d94ad45119c4e03e926ecece..db6455e4974db8dc969cdf32e2ef59dcae34f74d 100644 >--- a/Source/WebCore/dom/Event.h >+++ b/Source/WebCore/dom/Event.h >@@ -103,6 +103,7 @@ namespace WebCore { > bool bubbles() const { return m_canBubble; } > bool cancelable() const { return m_cancelable; } > DOMTimeStamp timeStamp() const { return m_createTime; } >+ double webkitHRTimeStamp() const { return m_timeStamp; } > > void stopPropagation() { m_propagationStopped = true; } > void stopImmediatePropagation() { m_immediatePropagationStopped = true; } >@@ -160,7 +161,7 @@ namespace WebCore { > > 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(); >@@ -181,6 +182,7 @@ namespace WebCore { > 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..8ed56e6c3d2cf74e82cafab3c7fe65a4fe9139f8 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 webkitHRTimeStamp; > > 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 0bb8a26fa1ac6ddc779bfe9ddb7e7c32177f652e..cb00dbbf36b0c98bbf8bc7c13a8b02778c10e0a3 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 a3a1c22f25549f7fcabf4070161ab698ed21c79b..9039c3b2f90e4da4e6d5fabd967ce9e7a7cdfab0 100644 >--- a/Source/WebCore/dom/Node.cpp >+++ b/Source/WebCore/dom/Node.cpp >@@ -44,6 +44,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" >@@ -2623,13 +2626,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()->convertMonotonicTimeToZeroBasedDocumentTime(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()->convertMonotonicTimeToZeroBasedDocumentTime(event.timestamp())))); > } > > #if ENABLE(GESTURE_EVENTS) >@@ -2660,7 +2663,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()->convertMonotonicTimeToZeroBasedDocumentTime(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 9e73316fb93b6fc1f20cd306d8431973ec4e7cdd..5b596545978d4f9bb0811b36f069a637bdf1c286 100644 >--- a/Source/WebCore/dom/UIEvent.cpp >+++ b/Source/WebCore/dom/UIEvent.cpp >@@ -34,8 +34,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 957ada3401405e26330dd42d5b4575ef29d665ad..43ca4b9758c2db3448a3540440ebfdbc0dc882bf 100644 >--- a/Source/WebCore/page/EventHandler.cpp >+++ b/Source/WebCore/page/EventHandler.cpp >@@ -36,6 +36,7 @@ > #include "CursorList.h" > #include "Document.h" > #include "DocumentEventQueue.h" >+#include "DocumentLoader.h" > #include "DragController.h" > #include "DragState.h" > #include "Editor.h" >@@ -61,6 +62,7 @@ > #include "MouseEvent.h" > #include "MouseEventWithHitTestResults.h" > #include "Page.h" >+#include "PerformanceTiming.h" > #include "PlatformEvent.h" > #include "PlatformKeyboardEvent.h" > #include "PlatformWheelEvent.h" >@@ -1898,7 +1900,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()->convertMonotonicTimeToZeroBasedDocumentTime(event.timestamp())); > > ExceptionCode ec; > dragTarget->dispatchEvent(me.get(), ec); >@@ -2884,7 +2887,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()->convertMonotonicTimeToZeroBasedDocumentTime(initialKeyEvent.timestamp())); > if (matchedAnAccessKey) > keydown->setDefaultPrevented(true); > keydown->setTarget(node); >@@ -2907,7 +2910,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()->convertMonotonicTimeToZeroBasedDocumentTime(initialKeyEvent.timestamp())); > keydown->setTarget(node); > keydown->setDefaultHandled(); > } >@@ -2931,7 +2934,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()->convertMonotonicTimeToZeroBasedDocumentTime(initialKeyEvent.timestamp())); > keypress->setTarget(node); > if (keydownResult) > keypress->setDefaultPrevented(true); >@@ -3677,7 +3680,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()->convertMonotonicTimeToZeroBasedDocumentTime(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 0391c285b7f8e3e66951639d365f58bd73e8a992..28e98d7a20dba5dc8d0ccb2089b8fe48f2d83c1f 100644 >--- a/Source/WebKit/chromium/src/WebInputEventConversion.cpp >+++ b/Source/WebKit/chromium/src/WebInputEventConversion.cpp >@@ -227,6 +227,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