| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 void FrameView::scrollElementToRect(Element* element, const IntRect& rect) | 1524 void FrameView::scrollElementToRect(Element* element, const IntRect& rect) |
| 1525 { | 1525 { |
| 1526 // FIXME(http://crbug.com/371896) - This method shouldn't be manually doing | 1526 // FIXME(http://crbug.com/371896) - This method shouldn't be manually doing |
| 1527 // coordinate transformations to the PinchViewport. | 1527 // coordinate transformations to the PinchViewport. |
| 1528 IntRect targetRect(rect); | 1528 IntRect targetRect(rect); |
| 1529 | 1529 |
| 1530 m_frame->document()->updateLayoutIgnorePendingStylesheets(); | 1530 m_frame->document()->updateLayoutIgnorePendingStylesheets(); |
| 1531 | 1531 |
| 1532 bool pinchVirtualViewportEnabled = m_frame->settings()->pinchVirtualViewport
Enabled(); | 1532 bool pinchVirtualViewportEnabled = m_frame->settings()->pinchVirtualViewport
Enabled(); |
| 1533 | 1533 |
| 1534 // FIXME: This needs an isMainFrame() check as well. crbug.com/378776. |
| 1534 if (pinchVirtualViewportEnabled) { | 1535 if (pinchVirtualViewportEnabled) { |
| 1535 PinchViewport& pinchViewport = m_frame->page()->frameHost().pinchViewpor
t(); | 1536 PinchViewport& pinchViewport = m_frame->page()->frameHost().pinchViewpor
t(); |
| 1536 | 1537 |
| 1537 IntSize pinchViewportSize = expandedIntSize(pinchViewport.visibleRect().
size()); | 1538 IntSize pinchViewportSize = expandedIntSize(pinchViewport.visibleRect().
size()); |
| 1538 targetRect.moveBy(ceiledIntPoint(pinchViewport.visibleRect().location())
); | 1539 targetRect.moveBy(ceiledIntPoint(pinchViewport.visibleRect().location())
); |
| 1539 targetRect.setSize(pinchViewportSize.shrunkTo(targetRect.size())); | 1540 targetRect.setSize(pinchViewportSize.shrunkTo(targetRect.size())); |
| 1540 } | 1541 } |
| 1541 | 1542 |
| 1542 LayoutRect bounds = element->boundingBox(); | 1543 LayoutRect bounds = element->boundingBox(); |
| 1543 int centeringOffsetX = (targetRect.width() - bounds.width()) / 2; | 1544 int centeringOffsetX = (targetRect.width() - bounds.width()) / 2; |
| (...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4004 return; | 4005 return; |
| 4005 | 4006 |
| 4006 ScrollableArea::setScrollOrigin(origin); | 4007 ScrollableArea::setScrollOrigin(origin); |
| 4007 | 4008 |
| 4008 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 4009 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
| 4009 if (updatePositionAtAll && updatePositionSynchronously) | 4010 if (updatePositionAtAll && updatePositionSynchronously) |
| 4010 updateScrollbars(scrollOffsetDouble()); | 4011 updateScrollbars(scrollOffsetDouble()); |
| 4011 } | 4012 } |
| 4012 | 4013 |
| 4013 } // namespace blink | 4014 } // namespace blink |
| OLD | NEW |