Merge pull request #7362 from bsclifton/fix-windows-draggable-high-dpi

Fixes mouse coordinates for Windows when display is set to a higher DPI
This commit is contained in:
Cheng Zhao 2016-09-28 19:42:17 +08:00 committed by GitHub
commit c51982a231

View file

@ -131,8 +131,9 @@ void AtomRenderViewObserver::DraggableRegionsChanged(blink::WebFrame* frame) {
blink::WebVector<blink::WebDraggableRegion> webregions = blink::WebVector<blink::WebDraggableRegion> webregions =
frame->document().draggableRegions(); frame->document().draggableRegions();
std::vector<DraggableRegion> regions; std::vector<DraggableRegion> regions;
for (const auto& webregion : webregions) { for (auto& webregion : webregions) {
DraggableRegion region; DraggableRegion region;
render_view()->ConvertViewportToWindowViaWidget(&webregion.bounds);
region.bounds = webregion.bounds; region.bounds = webregion.bounds;
region.draggable = webregion.draggable; region.draggable = webregion.draggable;
regions.push_back(region); regions.push_back(region);