Index: Source/web/ChromeClientImpl.cpp |
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp |
index 6dcd9436c0ca1f8e8446fc202039189bcb3fccad..a01208555dd7c39a73214c78e4956863b2e679f7 100644 |
--- a/Source/web/ChromeClientImpl.cpp |
+++ b/Source/web/ChromeClientImpl.cpp |
@@ -118,6 +118,7 @@ static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
: m_webView(webView) |
+ , m_overrideCursor(pointerCursor()) |
{ |
} |
@@ -660,7 +661,8 @@ Cursor ChromeClientImpl::lastSetCursorForTesting() const |
void ChromeClientImpl::setCursor(const Cursor& cursor) |
{ |
m_lastSetMouseCursorForTesting = cursor; |
- setCursor(WebCursorInfo(cursor)); |
+ if (m_overrideCursor.type() == Cursor::Pointer) |
pfeldman
2015/08/24 18:22:40
Why is this check here?
sergeyv
2015/08/26 01:57:41
Done.
|
+ setCursor(WebCursorInfo(cursor)); |
} |
void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) |
@@ -680,6 +682,15 @@ void ChromeClientImpl::setCursorForPlugin(const WebCursorInfo& cursor) |
setCursor(cursor); |
} |
+void ChromeClientImpl::setCursorOverride(const Cursor& cursor) |
+{ |
+ if (m_overrideCursor.type() == cursor.type()) |
+ return; |
+ |
+ m_overrideCursor = cursor; |
+ setCursor(WebCursorInfo(cursor)); |
+} |
+ |
void ChromeClientImpl::postAccessibilityNotification(AXObject* obj, AXObjectCache::AXNotification notification) |
{ |
// Alert assistive technology about the accessibility object notification. |