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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 853103003: Fix drag-and-drop autoscrolling with --enable-pinch-virtual-viewport (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 // absolute coordinates in the parent. 519 // absolute coordinates in the parent.
520 newRect.setX(rect.x() - frameView->scrollX() + frameView ->x()); 520 newRect.setX(rect.x() - frameView->scrollX() + frameView ->x());
521 newRect.setY(rect.y() - frameView->scrollY() + frameView ->y()); 521 newRect.setY(rect.y() - frameView->scrollY() + frameView ->y());
522 } else { 522 } else {
523 parentBox = 0; 523 parentBox = 0;
524 } 524 }
525 } 525 }
526 } else { 526 } else {
527 if (frame()->settings()->pinchVirtualViewportEnabled()) { 527 if (frame()->settings()->pinchVirtualViewportEnabled()) {
528 PinchViewport& pinchViewport = frame()->page()->frameHost(). pinchViewport(); 528 PinchViewport& pinchViewport = frame()->page()->frameHost(). pinchViewport();
529 LayoutRect r = ScrollAlignment::getRectToExpose(LayoutRect(p inchViewport.visibleRectInDocument()), rect, alignX, alignY); 529 LayoutRect viewRect = intersection(
530 LayoutRect(pinchViewport.visibleRectInDocument()), frame View->visibleContentRect());
531 LayoutRect r = ScrollAlignment::getRectToExpose(viewRect, re ct, alignX, alignY);
530 pinchViewport.scrollIntoView(r); 532 pinchViewport.scrollIntoView(r);
531 } else { 533 } else {
532 LayoutRect viewRect = frameView->visibleContentRect(); 534 LayoutRect viewRect = frameView->visibleContentRect();
533 LayoutRect r = ScrollAlignment::getRectToExpose(viewRect, re ct, alignX, alignY); 535 LayoutRect r = ScrollAlignment::getRectToExpose(viewRect, re ct, alignX, alignY);
534 frameView->setScrollPosition(DoublePoint(r.location())); 536 frameView->setScrollPosition(DoublePoint(r.location()));
535 } 537 }
536 } 538 }
537 } 539 }
538 } 540 }
539 541
(...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after
4545 computedValues.m_margins.m_end = marginEnd(); 4547 computedValues.m_margins.m_end = marginEnd();
4546 4548
4547 setLogicalTop(oldLogicalTop); 4549 setLogicalTop(oldLogicalTop);
4548 setLogicalWidth(oldLogicalWidth); 4550 setLogicalWidth(oldLogicalWidth);
4549 setLogicalLeft(oldLogicalLeft); 4551 setLogicalLeft(oldLogicalLeft);
4550 setMarginLeft(oldMarginLeft); 4552 setMarginLeft(oldMarginLeft);
4551 setMarginRight(oldMarginRight); 4553 setMarginRight(oldMarginRight);
4552 } 4554 }
4553 4555
4554 } // namespace blink 4556 } // namespace blink
OLDNEW
« Source/core/frame/PinchViewport.cpp ('K') | « Source/core/frame/PinchViewport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698