Chromium Code Reviews| Index: content/browser/devtools/protocol/color_picker.cc |
| diff --git a/content/browser/devtools/protocol/color_picker.cc b/content/browser/devtools/protocol/color_picker.cc |
| index ac04aa4ac5378c56ac4d18874325df7f90e52b95..722df3358a6a27aefc045d62cb1c4350616de24e 100644 |
| --- a/content/browser/devtools/protocol/color_picker.cc |
| +++ b/content/browser/devtools/protocol/color_picker.cc |
| @@ -83,11 +83,14 @@ void ColorPicker::UpdateFrame() { |
| if (!view) |
| return; |
| - gfx::Size size = view->GetViewBounds().size(); |
| - view->CopyFromCompositingSurface( |
| - gfx::Rect(size), size, |
| - base::Bind(&ColorPicker::FrameUpdated, |
| - weak_factory_.GetWeakPtr()), |
| + // TODO(miu): This is the wrong size. It's the size of the view on-screen, and |
|
dgozman
2017/02/28 19:13:52
Does cc::CompositorFrameMetadata work? We have it
miu
2017/03/01 01:17:02
Possibly. Here, I'm not making any functional chan
|
| + // not the rendering size of the view. The latter is what is wanted here, so |
| + // that the resulting bitmap's pixel coordinates line-up with the |
| + // blink::WebMouseEvent coordinates. http://crbug.com/73362 |
| + gfx::Size should_be_rendering_size = view->GetViewBounds().size(); |
| + view->CopyFromSurface( |
| + gfx::Rect(), should_be_rendering_size, |
| + base::Bind(&ColorPicker::FrameUpdated, weak_factory_.GetWeakPtr()), |
| kN32_SkColorType); |
| } |