<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174700] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174700">174700</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2014-10-14 13:59:32 -0700 (Tue, 14 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
https://bugs.webkit.org/show_bug.cgi?id=137676
&lt;rdar://problem/15735049&gt;

Reviewed by Alexey Proskuryakov.

Remove the code I added that tracks the timestamp of the most recent
user gesture from the event handling dispatch, as it was both
a silly place to do it and it originally crashed when events were fired from
Worker threads (although this was fixed in <a href="http://trac.webkit.org/projects/webkit/changeset/152238">r152238</a>).

It's now recorded by going through UserGestureIndicator, which is good because
it knows when a user has triggered an event. Its constructor now takes
a pointer to Document, and updates the timestamp there if necessary.

Not all UserGestureIndicator instances needed to reset the timestamp; Those did
not have to pass along the Document.

This is untestable due to the fix mentioned above.

* WebCore.exp.in: Change constructor signature.

* accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp: Ditto.
(WebCore::AccessibilityObject::press):

* dom/Document.cpp:
(WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
* dom/Document.h:

* dom/EventTarget.cpp: Remove the code to update the timestamp.
(WebCore::EventTarget::fireEventListeners):

* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
this is a user gesture, then reset the timestamp.
* dom/UserGestureIndicator.h:

* page/EventHandler.cpp: Pass a pointer to the Document.
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleTouchEvent):

* rendering/HitTestResult.cpp: Ditto.
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetcpp">trunk/Source/WebCore/dom/EventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCoredomUserGestureIndicatorcpp">trunk/Source/WebCore/dom/UserGestureIndicator.cpp</a></li>
<li><a href="#trunkSourceWebCoredomUserGestureIndicatorh">trunk/Source/WebCore/dom/UserGestureIndicator.h</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingHitTestResultcpp">trunk/Source/WebCore/rendering/HitTestResult.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/ChangeLog        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2014-10-14  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
+        https://bugs.webkit.org/show_bug.cgi?id=137676
+        &lt;rdar://problem/15735049&gt;
+
+        Reviewed by Alexey Proskuryakov.
+
+        Remove the code I added that tracks the timestamp of the most recent
+        user gesture from the event handling dispatch, as it was both
+        a silly place to do it and it originally crashed when events were fired from
+        Worker threads (although this was fixed in r152238).
+
+        It's now recorded by going through UserGestureIndicator, which is good because
+        it knows when a user has triggered an event. Its constructor now takes
+        a pointer to Document, and updates the timestamp there if necessary.
+
+        Not all UserGestureIndicator instances needed to reset the timestamp; Those did
+        not have to pass along the Document.
+
+        This is untestable due to the fix mentioned above.
+
+        * WebCore.exp.in: Change constructor signature.
+
+        * accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
+        (WebCore::AccessibilityNodeObject::increment):
+        (WebCore::AccessibilityNodeObject::decrement):
+        * accessibility/AccessibilityObject.cpp: Ditto.
+        (WebCore::AccessibilityObject::press):
+
+        * dom/Document.cpp:
+        (WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
+        * dom/Document.h:
+
+        * dom/EventTarget.cpp: Remove the code to update the timestamp.
+        (WebCore::EventTarget::fireEventListeners):
+
+        * dom/UserGestureIndicator.cpp:
+        (WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
+        this is a user gesture, then reset the timestamp.
+        * dom/UserGestureIndicator.h:
+
+        * page/EventHandler.cpp: Pass a pointer to the Document.
+        (WebCore::EventHandler::handleMousePressEvent):
+        (WebCore::EventHandler::handleMouseDoubleClickEvent):
+        (WebCore::EventHandler::handleMouseReleaseEvent):
+        (WebCore::EventHandler::keyEvent):
+        (WebCore::EventHandler::handleTouchEvent):
+
+        * rendering/HitTestResult.cpp: Ditto.
+        (WebCore::HitTestResult::toggleMediaFullscreenState):
+        (WebCore::HitTestResult::enterFullscreenForVideo):
+
</ins><span class="cx"> 2014-10-14  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -890,7 +890,7 @@
</span><span class="cx"> __ZN7WebCore20TransformationMatrix5scaleEd
</span><span class="cx"> __ZN7WebCore20TransformationMatrix9translateEdd
</span><span class="cx"> __ZN7WebCore20UserGestureIndicator7s_stateE
</span><del>-__ZN7WebCore20UserGestureIndicatorC1ENS_26ProcessingUserGestureStateE
</del><ins>+__ZN7WebCore20UserGestureIndicatorC1ENS_26ProcessingUserGestureStateEPNS_8DocumentE
</ins><span class="cx"> __ZN7WebCore20UserGestureIndicatorD1Ev
</span><span class="cx"> __ZN7WebCore20deleteEmptyDirectoryERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore20looksLikeAbsoluteURLEP8NSString
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -1076,13 +1076,13 @@
</span><span class="cx">     
</span><span class="cx"> void AccessibilityNodeObject::increment()
</span><span class="cx"> {
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, document());
</ins><span class="cx">     alterSliderValue(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityNodeObject::decrement()
</span><span class="cx"> {
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, document());
</ins><span class="cx">     alterSliderValue(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -845,7 +845,8 @@
</span><span class="cx">     // Hit test at this location to determine if there is a sub-node element that should act
</span><span class="cx">     // as the target of the action.
</span><span class="cx">     Element* hitTestElement = nullptr;
</span><del>-    if (Document* document = this-&gt;document()) {
</del><ins>+    Document* document = this-&gt;document();
+    if (document) {
</ins><span class="cx">         HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AccessibilityHitTest);
</span><span class="cx">         HitTestResult hitTestResult(clickPoint());
</span><span class="cx">         document-&gt;renderView()-&gt;hitTest(request, hitTestResult);
</span><span class="lines">@@ -866,7 +867,7 @@
</span><span class="cx">     if (hitTestElement &amp;&amp; hitTestElement-&gt;isDescendantOf(pressElement))
</span><span class="cx">         pressElement = hitTestElement;
</span><span class="cx">     
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, document);
</ins><span class="cx">     pressElement-&gt;accessKeyAction(true);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -5911,8 +5911,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>-
-void Document::resetLastHandledUserGestureTimestamp()
</del><ins>+void Document::updateLastHandledUserGestureTimestamp()
</ins><span class="cx"> {
</span><span class="cx">     m_lastHandledUserGestureTimestamp = monotonicallyIncreasingTime();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/dom/Document.h        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -1202,7 +1202,7 @@
</span><span class="cx">     WEBCORE_EXPORT void didRemoveWheelEventHandler();
</span><span class="cx"> 
</span><span class="cx">     double lastHandledUserGestureTimestamp() const { return m_lastHandledUserGestureTimestamp; }
</span><del>-    void resetLastHandledUserGestureTimestamp();
</del><ins>+    void updateLastHandledUserGestureTimestamp();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     bool hasTouchEventHandlers() const { return (m_touchEventTargets.get()) ? m_touchEventTargets-&gt;size() : false; }
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.cpp (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.cpp        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/dom/EventTarget.cpp        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -213,7 +213,6 @@
</span><span class="cx">     // Also, don't fire event listeners added during event dispatch. Conveniently, all new event listeners will be added
</span><span class="cx">     // after or at index |size|, so iterating up to (but not including) |size| naturally excludes new event listeners.
</span><span class="cx"> 
</span><del>-    bool userEventWasHandled = false;
</del><span class="cx">     size_t i = 0;
</span><span class="cx">     size_t size = entry.size();
</span><span class="cx">     if (!d-&gt;firingEventIterators)
</span><span class="lines">@@ -244,13 +243,9 @@
</span><span class="cx">         // To match Mozilla, the AT_TARGET phase fires both capturing and bubbling
</span><span class="cx">         // event listeners, even though that violates some versions of the DOM spec.
</span><span class="cx">         registeredListener.listener-&gt;handleEvent(context, event);
</span><del>-        if (!userEventWasHandled &amp;&amp; ScriptController::processingUserGesture())
-            userEventWasHandled = true;
</del><span class="cx">         InspectorInstrumentation::didHandleEvent(cookie);
</span><span class="cx">     }
</span><span class="cx">     d-&gt;firingEventIterators-&gt;removeLast();
</span><del>-    if (userEventWasHandled &amp;&amp; document)
-        document-&gt;resetLastHandledUserGestureTimestamp();
</del><span class="cx"> 
</span><span class="cx">     if (document)
</span><span class="cx">         InspectorInstrumentation::didDispatchEvent(willDispatchEventCookie);
</span></span></pre></div>
<a id="trunkSourceWebCoredomUserGestureIndicatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/UserGestureIndicator.cpp (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/UserGestureIndicator.cpp        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/dom/UserGestureIndicator.cpp        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;UserGestureIndicator.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;Document.h&quot;
</ins><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -37,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx"> ProcessingUserGestureState UserGestureIndicator::s_state = DefinitelyNotProcessingUserGesture;
</span><span class="cx"> 
</span><del>-UserGestureIndicator::UserGestureIndicator(ProcessingUserGestureState state)
</del><ins>+UserGestureIndicator::UserGestureIndicator(ProcessingUserGestureState state, Document* document)
</ins><span class="cx">     : m_previousState(s_state)
</span><span class="cx"> {
</span><span class="cx">     // Silently ignore UserGestureIndicators on non main threads.
</span><span class="lines">@@ -47,6 +48,9 @@
</span><span class="cx">     if (isDefinite(state))
</span><span class="cx">         s_state = state;
</span><span class="cx">     ASSERT(isDefinite(s_state));
</span><ins>+
+    if (document &amp;&amp; s_state == DefinitelyProcessingUserGesture)
+        document-&gt;topDocument().updateLastHandledUserGestureTimestamp();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> UserGestureIndicator::~UserGestureIndicator()
</span></span></pre></div>
<a id="trunkSourceWebCoredomUserGestureIndicatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/UserGestureIndicator.h (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/UserGestureIndicator.h        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/dom/UserGestureIndicator.h        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class Document;
+
</ins><span class="cx"> enum ProcessingUserGestureState {
</span><span class="cx">     DefinitelyProcessingUserGesture,
</span><span class="cx">     PossiblyProcessingUserGesture,
</span><span class="lines">@@ -41,10 +43,10 @@
</span><span class="cx"> public:
</span><span class="cx">     static bool processingUserGesture();
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT explicit UserGestureIndicator(ProcessingUserGestureState);
</del><ins>+    // If a document is provided, its last known user gesture timestamp is updated.
+    WEBCORE_EXPORT explicit UserGestureIndicator(ProcessingUserGestureState, Document* = nullptr);
</ins><span class="cx">     WEBCORE_EXPORT ~UserGestureIndicator();
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> private:
</span><span class="cx">     WEBCORE_EXPORT static ProcessingUserGestureState s_state;
</span><span class="cx">     ProcessingUserGestureState m_previousState;
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -1653,7 +1653,7 @@
</span><span class="cx">         return true;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, m_frame.document());
</ins><span class="cx"> 
</span><span class="cx">     // FIXME (bug 68185): this call should be made at another abstraction layer
</span><span class="cx">     m_frame.loader().resetMultipleFormSubmissionProtection();
</span><span class="lines">@@ -1790,7 +1790,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_frame.selection().setCaretBlinkingSuspended(false);
</span><span class="cx"> 
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, m_frame.document());
</ins><span class="cx"> 
</span><span class="cx">     // We get this instead of a second mouse-up 
</span><span class="cx">     m_mousePressed = false;
</span><span class="lines">@@ -2035,7 +2035,7 @@
</span><span class="cx">         return true;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, m_frame.document());
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(PAN_SCROLLING)
</span><span class="cx">     m_autoscrollController-&gt;handleMouseReleaseEvent(platformMouseEvent);
</span><span class="lines">@@ -3071,7 +3071,7 @@
</span><span class="cx">     if (!element)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, m_frame.document());
</ins><span class="cx">     UserTypingGestureIndicator typingGestureIndicator(m_frame);
</span><span class="cx"> 
</span><span class="cx">     if (FrameView* view = m_frame.view())
</span><span class="lines">@@ -3799,7 +3799,7 @@
</span><span class="cx"> 
</span><span class="cx">     const Vector&lt;PlatformTouchPoint&gt;&amp; points = event.touchPoints();
</span><span class="cx"> 
</span><del>-    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
</del><ins>+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, m_frame.document());
</ins><span class="cx"> 
</span><span class="cx">     unsigned i;
</span><span class="cx">     bool freshTouchEvents = true;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingHitTestResultcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/HitTestResult.cpp (174699 => 174700)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/HitTestResult.cpp        2014-10-14 20:36:18 UTC (rev 174699)
+++ trunk/Source/WebCore/rendering/HitTestResult.cpp        2014-10-14 20:59:32 UTC (rev 174700)
</span><span class="lines">@@ -414,7 +414,7 @@
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx">     if (HTMLMediaElement* mediaElement = this-&gt;mediaElement()) {
</span><span class="cx">         if (mediaElement-&gt;isVideo() &amp;&amp; mediaElement-&gt;supportsFullscreen()) {
</span><del>-            UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
</del><ins>+            UserGestureIndicator indicator(DefinitelyProcessingUserGesture, &amp;mediaElement-&gt;document());
</ins><span class="cx">             mediaElement-&gt;toggleFullscreenState();
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -428,7 +428,7 @@
</span><span class="cx">     if (is&lt;HTMLVideoElement&gt;(mediaElement)) {
</span><span class="cx">         HTMLVideoElement&amp; videoElement = downcast&lt;HTMLVideoElement&gt;(*mediaElement);
</span><span class="cx">         if (!videoElement.isFullscreen() &amp;&amp; mediaElement-&gt;supportsFullscreen()) {
</span><del>-            UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
</del><ins>+            UserGestureIndicator indicator(DefinitelyProcessingUserGesture, &amp;mediaElement-&gt;document());
</ins><span class="cx">             videoElement.enterFullscreen();
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>