Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1563)

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 494823002: Plumb selection edge points through the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/render_widget_compositor.cc
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 814157a5b08d790c73acd8e67b2a73a989529227..1b911ffc5eef0f71a443c4db5f2e3681a27deded 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -85,24 +85,25 @@ bool GetSwitchValueAsInt(
}
cc::LayerSelectionBound ConvertWebSelectionBound(
- const WebSelectionBound& bound) {
- DCHECK(bound.layerId);
+ const WebSelectionBound& web_bound) {
+ DCHECK(web_bound.layerId);
- cc::LayerSelectionBound result;
- switch (bound.type) {
+ cc::LayerSelectionBound cc_bound;
+ switch (web_bound.type) {
case blink::WebSelectionBound::Caret:
- result.type = cc::SELECTION_BOUND_CENTER;
+ cc_bound.type = cc::SELECTION_BOUND_CENTER;
break;
case blink::WebSelectionBound::SelectionLeft:
- result.type = cc::SELECTION_BOUND_LEFT;
+ cc_bound.type = cc::SELECTION_BOUND_LEFT;
break;
case blink::WebSelectionBound::SelectionRight:
- result.type = cc::SELECTION_BOUND_RIGHT;
+ cc_bound.type = cc::SELECTION_BOUND_RIGHT;
break;
}
- result.layer_id = bound.layerId;
- result.layer_rect = gfx::Rect(bound.edgeRectInLayer);
- return result;
+ cc_bound.layer_id = web_bound.layerId;
+ cc_bound.edge_top = gfx::Point(web_bound.edgeTopInLayer);
+ cc_bound.edge_bottom = gfx::Point(web_bound.edgeBottomInLayer);
+ return cc_bound;
}
gfx::Size CalculateDefaultTileSize() {
« no previous file with comments | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698