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

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: Order tweak 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
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 66a461fea5e4c51ed4d45f511cd3984e3ac2d03d..8f9f9c68102417ad131e36b95af8b2894707f0a0 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() {

Powered by Google App Engine
This is Rietveld 408576698