Chromium Code Reviews| Index: third_party/WebKit/public/web/WebLocalFrame.h |
| diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h |
| index 1b47bdfa652ead547059ffba359dc912d5970c47..b6ad9ad073e5b6b20e288a04018ace0b197b22f7 100644 |
| --- a/third_party/WebKit/public/web/WebLocalFrame.h |
| +++ b/third_party/WebKit/public/web/WebLocalFrame.h |
| @@ -250,8 +250,10 @@ public: |
| // tick-marks and highlighting from the previous search. If |
| // clearSelection is true, it will also make sure the end state for the |
| // find operation does not leave a selection. This can occur when the |
| - // user clears the search string but does not close the find box. |
| - virtual void stopFinding(bool clearSelection) = 0; |
| + // user clears the search string but does not close the find box. If |
| + // activateSelection is true, the find-in-page selection will be |
| + // activated, if one exists. |
| + virtual void stopFinding(bool clearSelection, bool activateSelection) = 0; |
|
dcheng
2016/05/18 21:29:21
enum instead of two bools (since the bools are mut
paulmeyer
2016/05/19 20:08:36
Done.
|
| // Counts how many times a particular string occurs within the frame. |
| // It also retrieves the location of the string and updates a vector in |
| @@ -294,24 +296,32 @@ public: |
| 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. |
| + // 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. |
| + // Selects the find-in-page match 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; |
| + // Returns the distance (squared) to the closest find-in-page match from the |
|
dcheng
2016/05/18 21:29:21
Maybe name this distanceToNearestFindMatch() to ma
paulmeyer
2016/05/19 20:08:36
Done. I didn't add "squared" because I agree that
|
| + // provided point, in find-in-page coordinates. |
| + virtual float nearestFindMatch(const WebFloatPoint&) = 0; |
| + |
| // Set the tickmarks for the frame. This will override the default tickmarks |
| // generated by find results. If this is called with an empty array, the |
| // default behavior will be restored. |
| virtual void setTickmarks(const WebVector<WebRect>&) = 0; |
| + // Clears the active find match in the frame, if one exists. |
| + virtual void clearActiveFindMatch() = 0; |
| + |
| // Context menu ----------------------------------------------------------- |
| // Returns the node that the context menu opened over. |