Title: [209479] trunk
Revision
209479
Author
simon.fra...@apple.com
Date
2016-12-07 14:21:55 -0800 (Wed, 07 Dec 2016)

Log Message

Fix use of enum in a WK2 C SPI header.
rdar://problem/28725583

Reviewed by Dan Bernstein.

Use correct enum style for a C SPI header and fix the callers.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetEventThrottlingBehaviorOverride):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::prepare):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (209478 => 209479)


--- trunk/Source/WebKit2/ChangeLog	2016-12-07 22:02:04 UTC (rev 209478)
+++ trunk/Source/WebKit2/ChangeLog	2016-12-07 22:21:55 UTC (rev 209479)
@@ -1,3 +1,16 @@
+2016-12-07  Simon Fraser  <simon.fra...@apple.com>
+
+        Fix use of enum in a WK2 C SPI header.
+        rdar://problem/28725583
+
+        Reviewed by Dan Bernstein.
+
+        Use correct enum style for a C SPI header and fix the callers.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        (WKBundlePageSetEventThrottlingBehaviorOverride):
+        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
+
 2016-12-07  Beth Dakin  <bda...@apple.com>
 
         Remove iCloud Pages and Keynote site-specific hacks

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (209478 => 209479)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2016-12-07 22:02:04 UTC (rev 209478)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2016-12-07 22:21:55 UTC (rev 209479)
@@ -693,7 +693,7 @@
     return toAPI(&API::Array::create(WTFMove(originIdentifiers)).leakRef());
 }
 
-void WKBundlePageSetEventThrottlingBehaviorOverride(WKBundlePageRef page, EventThrottlingBehavior* behavior)
+void WKBundlePageSetEventThrottlingBehaviorOverride(WKBundlePageRef page, WKEventThrottlingBehavior* behavior)
 {
     std::optional<WebCore::EventThrottlingBehavior> behaviorValue;
     if (behavior) {

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h (209478 => 209479)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h	2016-12-07 22:02:04 UTC (rev 209478)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h	2016-12-07 22:21:55 UTC (rev 209479)
@@ -111,13 +111,16 @@
 WK_EXPORT void WKBundlePageResetApplicationCacheOriginQuota(WKBundlePageRef page, WKStringRef origin);
 WK_EXPORT WKArrayRef WKBundlePageCopyOriginsWithApplicationCache(WKBundlePageRef page);
 
-enum EventThrottlingBehavior {
-    EventThrottlingBehaviorResponsive,
+enum {
+    EventThrottlingBehaviorResponsive = 0,
     EventThrottlingBehaviorUnresponsive
 };
 
-WK_EXPORT void WKBundlePageSetEventThrottlingBehaviorOverride(WKBundlePageRef, EventThrottlingBehavior*);
+typedef uint32_t WKEventThrottlingBehavior;
 
+// Passing null in the second parameter clears the override.
+WK_EXPORT void WKBundlePageSetEventThrottlingBehaviorOverride(WKBundlePageRef, WKEventThrottlingBehavior*);
+
 #if TARGET_OS_IPHONE
 WK_EXPORT void WKBundlePageSetUseTestingViewportConfiguration(WKBundlePageRef, bool);
 #endif

Modified: trunk/Tools/ChangeLog (209478 => 209479)


--- trunk/Tools/ChangeLog	2016-12-07 22:02:04 UTC (rev 209478)
+++ trunk/Tools/ChangeLog	2016-12-07 22:21:55 UTC (rev 209479)
@@ -1,3 +1,15 @@
+2016-12-07  Simon Fraser  <simon.fra...@apple.com>
+
+        Fix use of enum in a WK2 C SPI header.
+        rdar://problem/28725583
+
+        Reviewed by Dan Bernstein.
+
+        Use correct enum style for a C SPI header and fix the callers.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::prepare):
+
 2016-12-07  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Add a new project for recording and playing back editing commands in editable web content

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (209478 => 209479)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2016-12-07 22:02:04 UTC (rev 209478)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2016-12-07 22:21:55 UTC (rev 209479)
@@ -416,7 +416,7 @@
     WKBundlePageSetTracksRepaints(m_page, false);
     
     // Force consistent "responsive" behavior for WebPage::eventThrottlingDelay() for testing. Tests can override via internals.
-    EventThrottlingBehavior behavior = EventThrottlingBehaviorResponsive;
+    WKEventThrottlingBehavior behavior = EventThrottlingBehaviorResponsive;
     WKBundlePageSetEventThrottlingBehaviorOverride(m_page, &behavior);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to