OLD | NEW |
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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 | 794 |
795 // We need to check if the last known mouse position is out of the window. W
hen the mouse is out of the window, the position is incoherent | 795 // We need to check if the last known mouse position is out of the window. W
hen the mouse is out of the window, the position is incoherent |
796 static IntPoint previousMousePosition; | 796 static IntPoint previousMousePosition; |
797 if (lastKnownMousePosition.x() < 0 || lastKnownMousePosition.y() < 0) | 797 if (lastKnownMousePosition.x() < 0 || lastKnownMousePosition.y() < 0) |
798 lastKnownMousePosition = previousMousePosition; | 798 lastKnownMousePosition = previousMousePosition; |
799 else | 799 else |
800 previousMousePosition = lastKnownMousePosition; | 800 previousMousePosition = lastKnownMousePosition; |
801 | 801 |
802 IntSize delta = lastKnownMousePosition - sourcePoint; | 802 IntSize delta = lastKnownMousePosition - sourcePoint; |
803 | 803 |
804 if (abs(delta.width()) <= ScrollView::noPanScrollRadius) // at the center we
let the space for the icon | 804 if (abs(delta.width()) <= FrameView::noPanScrollRadius) // at the center we
let the space for the icon |
805 delta.setWidth(0); | 805 delta.setWidth(0); |
806 if (abs(delta.height()) <= ScrollView::noPanScrollRadius) | 806 if (abs(delta.height()) <= FrameView::noPanScrollRadius) |
807 delta.setHeight(0); | 807 delta.setHeight(0); |
808 | 808 |
809 scrollByRecursively(adjustedScrollDelta(delta), ScrollOffsetClamped); | 809 scrollByRecursively(adjustedScrollDelta(delta), ScrollOffsetClamped); |
810 } | 810 } |
811 | 811 |
812 void RenderBox::scrollByRecursively(const IntSize& delta, ScrollOffsetClamping c
lamp) | 812 void RenderBox::scrollByRecursively(const IntSize& delta, ScrollOffsetClamping c
lamp) |
813 { | 813 { |
814 if (delta.isZero()) | 814 if (delta.isZero()) |
815 return; | 815 return; |
816 | 816 |
(...skipping 3692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4509 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); | 4509 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); |
4510 | 4510 |
4511 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) | 4511 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) |
4512 return m_rareData->m_previousBorderBoxSize; | 4512 return m_rareData->m_previousBorderBoxSize; |
4513 | 4513 |
4514 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. | 4514 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. |
4515 return previousBoundsSize; | 4515 return previousBoundsSize; |
4516 } | 4516 } |
4517 | 4517 |
4518 } // namespace blink | 4518 } // namespace blink |
OLD | NEW |