Title: [150339] trunk/Source/WebCore
Revision
150339
Author
[email protected]
Date
2013-05-18 09:06:53 -0700 (Sat, 18 May 2013)

Log Message

Simplify EventLoop::cycle() on Mac.

https://webkit.org/b/116392

Reviewed by Anders Carlsson.

* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (150338 => 150339)


--- trunk/Source/WebCore/ChangeLog	2013-05-18 16:06:18 UTC (rev 150338)
+++ trunk/Source/WebCore/ChangeLog	2013-05-18 16:06:53 UTC (rev 150339)
@@ -1,3 +1,14 @@
+2013-05-18  Timothy Hatcher  <[email protected]>
+
+        Simplify EventLoop::cycle() on Mac.
+
+        https://webkit.org/b/116392
+
+        Reviewed by Anders Carlsson.
+
+        * platform/mac/EventLoopMac.mm:
+        (WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
+
 2013-05-18  Andreas Kling  <[email protected]>
 
         Use CSSParserSelector::appendTagHistory() from CSS grammar.

Modified: trunk/Source/WebCore/platform/mac/EventLoopMac.mm (150338 => 150339)


--- trunk/Source/WebCore/platform/mac/EventLoopMac.mm	2013-05-18 16:06:18 UTC (rev 150338)
+++ trunk/Source/WebCore/platform/mac/EventLoopMac.mm	2013-05-18 16:06:53 UTC (rev 150339)
@@ -30,13 +30,8 @@
 
 void EventLoop::cycle()
 {
-    // FIXME: Should this use NSRunLoopCommonModes? Switching to NSRunLoopCommonModes causes Safari to hang in a tight loop.
-    [NSApp setWindowsNeedUpdate:YES];
-    NSTimeInterval interval = [[NSDate date] timeIntervalSinceReferenceDate];
-    interval += 0.05;
-    NSDate *untilDate = [NSDate dateWithTimeIntervalSinceReferenceDate:interval];
-    NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:untilDate inMode:NSDefaultRunLoopMode dequeue:YES];
-    [NSApp sendEvent:event];
+    CFTimeInterval timeInterval = 0.05;
+    CFRunLoopRunInMode(kCFRunLoopDefaultMode, timeInterval, true);
 }
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to