Diff
Modified: branches/safari-534-branch/Source/WebCore/ChangeLog (87559 => 87560)
--- branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-27 20:59:11 UTC (rev 87559)
+++ branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-27 21:02:56 UTC (rev 87560)
@@ -1,5 +1,17 @@
2011-05-27 Mark Rowe <mr...@apple.com>
+ Merge r87335.
+
+ 2011-05-25 Mark Rowe <mr...@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
+
+ * WebCore.exp.in: Add an export that WebKit2 needs.
+
+2011-05-27 Mark Rowe <mr...@apple.com>
+
Merge r87387.
2011-05-25 Simon Fraser <simon.fra...@apple.com>
Modified: branches/safari-534-branch/Source/WebCore/WebCore.exp.in (87559 => 87560)
--- branches/safari-534-branch/Source/WebCore/WebCore.exp.in 2011-05-27 20:59:11 UTC (rev 87559)
+++ branches/safari-534-branch/Source/WebCore/WebCore.exp.in 2011-05-27 21:02:56 UTC (rev 87560)
@@ -540,6 +540,7 @@
__ZN7WebCore20ResourceResponseBase24setExpectedContentLengthEx
__ZN7WebCore20ResourceResponseBaseC2Ev
__ZN7WebCore20SpaceSplitStringData12createVectorEv
+__ZN7WebCore20UserGestureIndicator23s_processingUserGestureE
__ZN7WebCore20UserGestureIndicatorC1ENS_26ProcessingUserGestureStateE
__ZN7WebCore20UserGestureIndicatorD1Ev
__ZN7WebCore20makeRGBA32FromFloatsEffff
Modified: branches/safari-534-branch/Source/WebKit2/ChangeLog (87559 => 87560)
--- branches/safari-534-branch/Source/WebKit2/ChangeLog 2011-05-27 20:59:11 UTC (rev 87559)
+++ branches/safari-534-branch/Source/WebKit2/ChangeLog 2011-05-27 21:02:56 UTC (rev 87560)
@@ -1,5 +1,25 @@
2011-05-27 Mark Rowe <mr...@apple.com>
+ Merge r87335.
+
+ 2011-05-25 Mark Rowe <mr...@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
+
+ Add WKBundleIsProcessingUserGesture.
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleIsPageBoxVisible):
+ (WKBundleIsProcessingUserGesture):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::isProcessingUserGesture):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+
+2011-05-27 Mark Rowe <mr...@apple.com>
+
Merge r87397.
2011-05-26 Steve Falkenburg <sfal...@apple.com>
Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (87559 => 87560)
--- branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2011-05-27 20:59:11 UTC (rev 87559)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2011-05-27 21:02:56 UTC (rev 87560)
@@ -188,7 +188,12 @@
return toCopiedAPI(toImpl(bundleRef)->pageSizeAndMarginsInPixels(toImpl(frameRef), pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft));
}
-WK_EXPORT bool WKBundleIsPageBoxVisible(WKBundleRef bundleRef, WKBundleFrameRef frameRef, int pageIndex)
+bool WKBundleIsPageBoxVisible(WKBundleRef bundleRef, WKBundleFrameRef frameRef, int pageIndex)
{
return toImpl(bundleRef)->isPageBoxVisible(toImpl(frameRef), pageIndex);
}
+
+bool WKBundleIsProcessingUserGesture(WKBundleRef)
+{
+ return InjectedBundle::isProcessingUserGesture();
+}
Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (87559 => 87560)
--- branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h 2011-05-27 20:59:11 UTC (rev 87559)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h 2011-05-27 21:02:56 UTC (rev 87560)
@@ -78,6 +78,8 @@
WK_EXPORT void WKBundleRemoveOriginAccessWhitelistEntry(WKBundleRef bundle, WKStringRef, WKStringRef, WKStringRef, bool);
WK_EXPORT void WKBundleResetOriginAccessWhitelists(WKBundleRef bundle);
+WK_EXPORT bool WKBundleIsProcessingUserGesture(WKBundleRef bundle);
+
#ifdef __cplusplus
}
#endif
Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (87559 => 87560)
--- branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2011-05-27 20:59:11 UTC (rev 87559)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2011-05-27 21:02:56 UTC (rev 87560)
@@ -51,6 +51,7 @@
#include <WebCore/PrintContext.h>
#include <WebCore/SecurityOrigin.h>
#include <WebCore/Settings.h>
+#include <WebCore/UserGestureIndicator.h>
#include <wtf/OwnArrayPtr.h>
#include <wtf/PassOwnArrayPtr.h>
@@ -209,6 +210,11 @@
return PrintContext::isPageBoxVisible(coreFrame, pageIndex);
}
+bool InjectedBundle::isProcessingUserGesture()
+{
+ return UserGestureIndicator::getUserGestureState() == DefinitelyProcessingUserGesture;
+}
+
static PassOwnPtr<Vector<String> > toStringVector(ImmutableArray* patterns)
{
if (!patterns)
Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (87559 => 87560)
--- branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2011-05-27 20:59:11 UTC (rev 87559)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2011-05-27 21:02:56 UTC (rev 87560)
@@ -130,6 +130,8 @@
static void reportException(JSContextRef, JSValueRef exception);
+ static bool isProcessingUserGesture();
+
private:
InjectedBundle(const String&);