Title: [124640] trunk/Source/WebKit/chromium
- Revision
- 124640
- Author
- [email protected]
- Date
- 2012-08-03 12:45:43 -0700 (Fri, 03 Aug 2012)
Log Message
[Chromium] Add stubs for the find-in-page match rects API
https://bugs.webkit.org/show_bug.cgi?id=93110
Reviewed by Adam Barth.
The Android port allows tapping on the find-in-page result tickmarks taking
the user to the corresponding matches. This patch introduces stubs for the
new required methods in order to achieve WebKit API compatibility for this
port as soon as possible. The implementation of these methods will be added
later in https://bugs.webkit.org/show_bug.cgi?id=93111.
* public/WebFrame.h:
(WebKit):
(WebFrame):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::findMatchMarkersVersion):
(WebKit):
(WebKit::WebFrameImpl::activeFindMatchRect):
(WebKit::WebFrameImpl::findMatchRects):
(WebKit::WebFrameImpl::selectNearestFindMatch):
* src/WebFrameImpl.h:
(WebFrameImpl):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (124639 => 124640)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-08-03 19:36:19 UTC (rev 124639)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-03 19:45:43 UTC (rev 124640)
@@ -1,3 +1,28 @@
+2012-08-03 Leandro Gracia Gil <[email protected]>
+
+ [Chromium] Add stubs for the find-in-page match rects API
+ https://bugs.webkit.org/show_bug.cgi?id=93110
+
+ Reviewed by Adam Barth.
+
+ The Android port allows tapping on the find-in-page result tickmarks taking
+ the user to the corresponding matches. This patch introduces stubs for the
+ new required methods in order to achieve WebKit API compatibility for this
+ port as soon as possible. The implementation of these methods will be added
+ later in https://bugs.webkit.org/show_bug.cgi?id=93111.
+
+ * public/WebFrame.h:
+ (WebKit):
+ (WebFrame):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::findMatchMarkersVersion):
+ (WebKit):
+ (WebKit::WebFrameImpl::activeFindMatchRect):
+ (WebKit::WebFrameImpl::findMatchRects):
+ (WebKit::WebFrameImpl::selectNearestFindMatch):
+ * src/WebFrameImpl.h:
+ (WebFrameImpl):
+
2012-08-03 Mike West <[email protected]>
Blocking a plugin via CSP should result in one (and only one) console message.
Modified: trunk/Source/WebKit/chromium/public/WebFrame.h (124639 => 124640)
--- trunk/Source/WebKit/chromium/public/WebFrame.h 2012-08-03 19:36:19 UTC (rev 124639)
+++ trunk/Source/WebKit/chromium/public/WebFrame.h 2012-08-03 19:45:43 UTC (rev 124640)
@@ -75,6 +75,8 @@
class WebView;
struct WebConsoleMessage;
struct WebFindOptions;
+struct WebFloatPoint;
+struct WebFloatRect;
struct WebPoint;
struct WebPrintParams;
struct WebRect;
@@ -575,6 +577,30 @@
// of matches found during the scoping effort.
virtual void resetMatchCount() = 0;
+ // Returns a counter that is incremented when the find-in-page markers are
+ // changed on any frame. Switching the active marker doesn't change the
+ // current version. Should be called only on the main frame.
+ virtual int findMatchMarkersVersion() const = 0;
+
+ // Returns the bounding box of the active find-in-page match marker or an
+ // empty rect if no such marker exists. The rect is returned in find-in-page
+ // coordinates whatever frame the active marker is.
+ // Should be called only on the main frame.
+ virtual WebFloatRect activeFindMatchRect() = 0;
+
+ // Swaps the contents of the provided vector with the bounding boxes of the
+ // find-in-page match markers from all frames. The bounding boxes are returned
+ // in find-in-page coordinates. This method should be called only on the main frame.
+ virtual void findMatchRects(WebVector<WebFloatRect>&) = 0;
+
+ // Selects the find-in-page match in the appropriate frame closest to the
+ // provided point in find-in-page coordinates. Returns the ordinal of such
+ // match or -1 if none could be found. If not null, selectionRect is set to
+ // the bounding box of the selected match in window coordinates.
+ // This method should be called only on the main frame.
+ virtual int selectNearestFindMatch(const WebFloatPoint&,
+ WebRect* selectionRect) = 0;
+
// OrientationChange event ---------------------------------------------
// Orientation is the interface orientation in degrees.
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (124639 => 124640)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-08-03 19:36:19 UTC (rev 124639)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-08-03 19:45:43 UTC (rev 124640)
@@ -169,6 +169,8 @@
#include "XPathResult.h"
#include "markup.h"
#include "painting/GraphicsContextBuilder.h"
+#include "platform/WebFloatPoint.h"
+#include "platform/WebFloatRect.h"
#include "platform/WebPoint.h"
#include "platform/WebRect.h"
#include "platform/WebSerializedScriptValue.h"
@@ -1938,6 +1940,29 @@
m_frame->domWindow()->dispatchMessageEventWithOriginCheck(intendedTargetOrigin.get(), event, 0);
}
+int WebFrameImpl::findMatchMarkersVersion() const
+{
+ // FIXME: Implement this as part of https://bugs.webkit.org/show_bug.cgi?id=93111.
+ return 0;
+}
+
+WebFloatRect WebFrameImpl::activeFindMatchRect()
+{
+ // FIXME: Implement this as part of https://bugs.webkit.org/show_bug.cgi?id=93111.
+ return WebFloatRect();
+}
+
+void WebFrameImpl::findMatchRects(WebVector<WebFloatRect>& outputRects)
+{
+ // FIXME: Implement this as part of https://bugs.webkit.org/show_bug.cgi?id=93111.
+}
+
+int WebFrameImpl::selectNearestFindMatch(const WebFloatPoint& point, WebRect* selectionRect)
+{
+ // FIXME: Implement this as part of https://bugs.webkit.org/show_bug.cgi?id=93111.
+ return 0;
+}
+
void WebFrameImpl::deliverIntent(const WebIntent& intent, WebMessagePortChannelArray* ports, WebDeliveredIntentClient* intentClient)
{
#if ENABLE(WEB_INTENTS)
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.h (124639 => 124640)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.h 2012-08-03 19:36:19 UTC (rev 124639)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.h 2012-08-03 19:45:43 UTC (rev 124640)
@@ -210,6 +210,10 @@
virtual void cancelPendingScopingEffort();
virtual void increaseMatchCount(int count, int identifier);
virtual void resetMatchCount();
+ virtual int findMatchMarkersVersion() const;
+ virtual WebFloatRect activeFindMatchRect();
+ virtual void findMatchRects(WebVector<WebFloatRect>&);
+ virtual int selectNearestFindMatch(const WebFloatPoint&, WebRect* selectionRect);
virtual void sendOrientationChangeEvent(int orientation);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes