Title: [171155] trunk/Source/WebKit2
Revision
171155
Author
[email protected]
Date
2014-07-16 15:36:24 -0700 (Wed, 16 Jul 2014)

Log Message

Dispatch top content inset changes immediately if synchronously waiting for view state changes
​https://bugs.webkit.org/show_bug.cgi?id=134942
<rdar://problem/17666800>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dispatchSetTopContentInset]):
(-[WKView _setTopContentInset:]):
Move the check from _setTopContentInset: to _dispatchSetTopContentInset
that ensures that we only send the message if the top content inset changed.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (171154 => 171155)


--- trunk/Source/WebKit2/ChangeLog	2014-07-16 22:26:56 UTC (rev 171154)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-16 22:36:24 UTC (rev 171155)
@@ -1,3 +1,17 @@
+2014-07-16  Timothy Horton  <[email protected]>
+
+        Dispatch top content inset changes immediately if synchronously waiting for view state changes
+        ​https://bugs.webkit.org/show_bug.cgi?id=134942
+        <rdar://problem/17666800>
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _dispatchSetTopContentInset]):
+        (-[WKView _setTopContentInset:]):
+        Move the check from _setTopContentInset: to _dispatchSetTopContentInset
+        that ensures that we only send the message if the top content inset changed.
+
 2014-07-16  Benjamin Poulain  <[email protected]>
 
         [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (171154 => 171155)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2014-07-16 22:26:56 UTC (rev 171154)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2014-07-16 22:36:24 UTC (rev 171155)
@@ -3885,6 +3885,9 @@
 
 - (void)_dispatchSetTopContentInset
 {
+    if (!_data->_didScheduleSetTopContentInset)
+        return;
+
     _data->_didScheduleSetTopContentInset = NO;
     _data->_page->setTopContentInset(_data->_topContentInset);
 }
@@ -3899,8 +3902,7 @@
     _data->_didScheduleSetTopContentInset = YES;
 
     dispatch_async(dispatch_get_main_queue(), ^{
-        if (_data->_didScheduleSetTopContentInset)
-            [self _dispatchSetTopContentInset];
+        [self _dispatchSetTopContentInset];
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to