Diff
Modified: trunk/Source/WebKit2/ChangeLog (152794 => 152795)
--- trunk/Source/WebKit2/ChangeLog 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/ChangeLog 2013-07-17 19:31:39 UTC (rev 152795)
@@ -1,3 +1,21 @@
+2013-07-17 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r152786 and r152789.
+ http://trac.webkit.org/changeset/152786
+ http://trac.webkit.org/changeset/152789
+ https://bugs.webkit.org/show_bug.cgi?id=118807
+
+ overly platform specific and dirty API (and Sam says no)
+ (Requested by thorton on #webkit).
+
+ * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
+ * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
+ * WebProcess/WebPage/PageOverlay.cpp:
+ * WebProcess/WebPage/PageOverlay.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
+
2013-07-17 Tim Horton <[email protected]>
AX: VoiceOver not working with data detection page overlays
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp (152794 => 152795)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp 2013-07-17 19:31:39 UTC (rev 152795)
@@ -115,34 +115,6 @@
}
}
- virtual bool supportsDataDetection(PageOverlay* pageOverlay)
- {
- if (!m_client.dataDetectionCallbacks.supportsDataDetectors)
- return false;
- return m_client.dataDetectionCallbacks.supportsDataDetectors(toAPI(pageOverlay), m_client.clientInfo);
- }
-
- virtual bool dataDetectorExistsAtPoint(PageOverlay* pageOverlay, const WebCore::IntPoint& point)
- {
- if (!m_client.dataDetectionCallbacks.dataDetectorExistsAtPoint)
- return false;
- return m_client.dataDetectionCallbacks.dataDetectorExistsAtPoint(toAPI(pageOverlay), WKPointMake(point.x(), point.y()), m_client.clientInfo);
- }
-
- virtual WKStringRef dataDetectorCopyTypeAtPoint(PageOverlay* pageOverlay, const WebCore::IntPoint& point)
- {
- if (!m_client.dataDetectionCallbacks.dataDetectorCopyTypeAtPoint)
- return 0;
- return m_client.dataDetectionCallbacks.dataDetectorCopyTypeAtPoint(toAPI(pageOverlay), WKPointMake(point.x(), point.y()), m_client.clientInfo);
- }
-
- virtual bool showDataDetectorMenuAtPoint(PageOverlay* pageOverlay, const WebCore::IntPoint& point)
- {
- if (!m_client.dataDetectionCallbacks.showDataDetectorMenuAtPoint)
- return false;
- return m_client.dataDetectionCallbacks.showDataDetectorMenuAtPoint(toAPI(pageOverlay), WKPointMake(point.x(), point.y()), m_client.clientInfo);
- }
-
WKBundlePageOverlayClient m_client;
};
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h (152794 => 152795)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h 2013-07-17 19:31:39 UTC (rev 152795)
@@ -49,18 +49,6 @@
typedef bool (*WKBundlePageOverlayMouseMovedCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, const void* clientInfo);
typedef bool (*WKBundlePageOverlayMouseDraggedCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, WKEventMouseButton mouseButton, const void* clientInfo);
-typedef bool (*WKDataDetectionIsSupportedCallback)(WKBundlePageOverlayRef pageOverlay, const void* clientInfo);
-typedef bool (*WKDataDetectionExistsAtPointCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, const void* clientInfo);
-typedef WKStringRef (*WKDataDetectionTypeAtPointCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, const void* clientInfo);
-typedef bool (*WKDataDetectionShowMenuAtPointCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, const void* clientInfo);
-
-struct WKBundlePageOverlayDataDetectionCallbacks {
- WKDataDetectionIsSupportedCallback supportsDataDetectors;
- WKDataDetectionExistsAtPointCallback dataDetectorExistsAtPoint;
- WKDataDetectionTypeAtPointCallback dataDetectorCopyTypeAtPoint;
- WKDataDetectionShowMenuAtPointCallback showDataDetectorMenuAtPoint;
-};
-
struct WKBundlePageOverlayClient {
int version;
const void * clientInfo;
@@ -71,13 +59,10 @@
WKBundlePageOverlayMouseUpCallback mouseUp;
WKBundlePageOverlayMouseMovedCallback mouseMoved;
WKBundlePageOverlayMouseDraggedCallback mouseDragged;
-
- // Version 1
- struct WKBundlePageOverlayDataDetectionCallbacks dataDetectionCallbacks;
};
typedef struct WKBundlePageOverlayClient WKBundlePageOverlayClient;
-enum { kWKBundlePageOverlayClientCurrentVersion = 1 };
+enum { kWKBundlePageOverlayClientCurrentVersion = 0 };
WK_EXPORT WKTypeID WKBundlePageOverlayGetTypeID();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp (152794 => 152795)
--- trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp 2013-07-17 19:31:39 UTC (rev 152795)
@@ -130,26 +130,6 @@
return m_client->mouseEvent(this, mouseEvent);
}
-bool PageOverlay::supportsDataDetection()
-{
- return m_client->supportsDataDetection(this);
-}
-
-bool PageOverlay::dataDetectorExistsAtPoint(const WebCore::IntPoint& point)
-{
- return m_client->dataDetectorExistsAtPoint(this, point);
-}
-
-WKStringRef PageOverlay::dataDetectorCopyTypeAtPoint(const WebCore::IntPoint& point)
-{
- return m_client->dataDetectorCopyTypeAtPoint(this, point);
-}
-
-bool PageOverlay::dataDetectorOpenMenuAtPoint(const WebCore::IntPoint& point)
-{
- return m_client->showDataDetectorMenuAtPoint(this, point);
-}
-
void PageOverlay::startFadeInAnimation()
{
m_fractionFadedIn = 0.0;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.h (152794 => 152795)
--- trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.h 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/WebProcess/WebPage/PageOverlay.h 2013-07-17 19:31:39 UTC (rev 152795)
@@ -27,13 +27,11 @@
#define PageOverlay_h
#include "APIObject.h"
-#include "WKBase.h"
#include <WebCore/RunLoop.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
class GraphicsContext;
- class IntPoint;
class IntRect;
}
@@ -54,11 +52,6 @@
virtual void didMoveToWebPage(PageOverlay*, WebPage*) = 0;
virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) = 0;
virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&) = 0;
-
- virtual bool supportsDataDetection(PageOverlay*) { return false; }
- virtual bool dataDetectorExistsAtPoint(PageOverlay*, const WebCore::IntPoint&) { return false; }
- virtual WKStringRef dataDetectorCopyTypeAtPoint(PageOverlay*, const WebCore::IntPoint&) { return 0; }
- virtual bool showDataDetectorMenuAtPoint(PageOverlay*, const WebCore::IntPoint&) { return false; }
};
static PassRefPtr<PageOverlay> create(Client*);
@@ -71,11 +64,6 @@
void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
bool mouseEvent(const WebMouseEvent&);
- bool supportsDataDetection();
- bool dataDetectorExistsAtPoint(const WebCore::IntPoint&);
- WKStringRef dataDetectorCopyTypeAtPoint(const WebCore::IntPoint&);
- bool dataDetectorOpenMenuAtPoint(const WebCore::IntPoint&);
-
void startFadeInAnimation();
void startFadeOutAnimation();
void stopFadeOutAnimation();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (152794 => 152795)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-07-17 19:31:39 UTC (rev 152795)
@@ -1837,51 +1837,7 @@
send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(gestureEvent.type()), handled));
}
#endif
-
-bool WebPage::pageOverlayOpenDataDetectorMenuAtPoint(const WebCore::IntPoint& point)
-{
- if (!m_pageOverlays.size())
- return false;
- PageOverlayList::reverse_iterator end = m_pageOverlays.rend();
- for (PageOverlayList::reverse_iterator it = m_pageOverlays.rbegin(); it != end; ++it)
- if ((*it)->supportsDataDetection())
- return (*it)->dataDetectorOpenMenuAtPoint(point);
- return false;
-}
-WKStringRef WebPage::pageOverlayDataDetectorCopyTypeAtPoint(const WebCore::IntPoint& point)
-{
- if (!m_pageOverlays.size())
- return 0;
- PageOverlayList::reverse_iterator end = m_pageOverlays.rend();
- for (PageOverlayList::reverse_iterator it = m_pageOverlays.rbegin(); it != end; ++it)
- if ((*it)->supportsDataDetection())
- return (*it)->dataDetectorCopyTypeAtPoint(point);
- return 0;
-}
-
-bool WebPage::pageOverlayDataDetectorExistsAtPoint(const WebCore::IntPoint& point)
-{
- if (!m_pageOverlays.size())
- return false;
- PageOverlayList::reverse_iterator end = m_pageOverlays.rend();
- for (PageOverlayList::reverse_iterator it = m_pageOverlays.rbegin(); it != end; ++it)
- if ((*it)->supportsDataDetection())
- return (*it)->dataDetectorExistsAtPoint(point);
- return false;
-}
-
-bool WebPage::pageOverlaySupportsDataDetection()
-{
- if (!m_pageOverlays.size())
- return false;
- PageOverlayList::reverse_iterator end = m_pageOverlays.rend();
- for (PageOverlayList::reverse_iterator it = m_pageOverlays.rbegin(); it != end; ++it)
- if ((*it)->supportsDataDetection())
- return true;
- return false;
-}
-
void WebPage::validateCommand(const String& commandName, uint64_t callbackID)
{
bool isEnabled = false;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (152794 => 152795)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-07-17 19:31:39 UTC (rev 152795)
@@ -664,11 +664,6 @@
WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
- bool pageOverlaySupportsDataDetection();
- bool pageOverlayOpenDataDetectorMenuAtPoint(const WebCore::IntPoint&);
- WKStringRef pageOverlayDataDetectorCopyTypeAtPoint(const WebCore::IntPoint&);
- bool pageOverlayDataDetectorExistsAtPoint(const WebCore::IntPoint&);
-
private:
WebPage(uint64_t pageID, const WebPageCreationParameters&);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm (152794 => 152795)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm 2013-07-17 19:24:50 UTC (rev 152794)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm 2013-07-17 19:31:39 UTC (rev 152795)
@@ -28,8 +28,6 @@
#import "WebFrame.h"
#import "WebPage.h"
-#import "WKRetainPtr.h"
-#import "WKStringCF.h"
#import <WebCore/AXObjectCache.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
@@ -41,10 +39,6 @@
using namespace WebCore;
using namespace WebKit;
-static NSString *NSAccessibilityDataDetectorExistsAtPoint = @"AXDataDetectorExistsAtPoint";
-static NSString *NSAccessibilityDidShowDataDetectorMenuAtPoint = @"AXDidShowDataDetectorMenuAtPoint";
-static NSString *NSAccessibilityDataDetectorTypeAtPoint = @"AXDataDetectorTypeAtPoint";
-
@implementation WKAccessibilityWebPageObject
- (id)accessibilityRootObjectWrapper
@@ -109,16 +103,6 @@
return m_attributeNames;
}
-- (NSArray *)accessibilityParameterizedAttributeNames
-{
- NSArray *names = nil;
-
- if (m_page->pageOverlaySupportsDataDetection())
- names = [NSArray arrayWithObjects:NSAccessibilityDataDetectorExistsAtPoint, NSAccessibilityDataDetectorTypeAtPoint, NSAccessibilityDidShowDataDetectorMenuAtPoint, nil];
-
- return names;
-}
-
- (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute
{
return NO;
@@ -178,40 +162,6 @@
return nil;
}
-- (NSPoint)_convertScreenPointToWindow:(NSPoint)point
-{
- return m_page->screenToWindow(IntPoint(point.x, point.y));
-}
-
-- (id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter
-{
- if ([attribute isEqualToString:NSAccessibilityDidShowDataDetectorMenuAtPoint]) {
- if (![parameter isKindOfClass:[NSValue class]])
- return nil;
-
- NSPoint point = [self _convertScreenPointToWindow:[(NSValue *)parameter pointValue]];
- return [NSNumber numberWithBool:m_page->pageOverlayOpenDataDetectorMenuAtPoint(IntPoint(point))];
- }
- if ([attribute isEqualToString:NSAccessibilityDataDetectorTypeAtPoint]) {
- if (![parameter isKindOfClass:[NSValue class]])
- return nil;
-
- NSPoint point = [self _convertScreenPointToWindow:[(NSValue *)parameter pointValue]];
- WKRetainPtr<WKStringRef> type = adoptWK(m_page->pageOverlayDataDetectorCopyTypeAtPoint(IntPoint(point)));
- if (type)
- return [(NSString *)WKStringCopyCFString(kCFAllocatorDefault, type.get()) autorelease];
- }
- if ([attribute isEqualToString:NSAccessibilityDataDetectorExistsAtPoint]) {
- if (![parameter isKindOfClass:[NSValue class]])
- return nil;
-
- NSPoint point = [self _convertScreenPointToWindow:[(NSValue *)parameter pointValue]];
- return [NSNumber numberWithBool:m_page->pageOverlayDataDetectorExistsAtPoint(IntPoint(point))];
- }
-
- return nil;
-}
-
- (BOOL)accessibilityShouldUseUniqueId
{
return YES;