Chromium Code Reviews

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

Issue 641733004: Merge FrameView and ScrollView. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 783 matching lines...)
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 scrollByRecursively(adjustedScrollDelta(delta), ScrollOffsetClamped); 808 scrollByRecursively(adjustedScrollDelta(delta), ScrollOffsetClamped);
809 } 809 }
810 810
811 void RenderBox::scrollByRecursively(const DoubleSize& delta, ScrollOffsetClampin g clamp) 811 void RenderBox::scrollByRecursively(const DoubleSize& delta, ScrollOffsetClampin g clamp)
812 { 812 {
813 if (delta.isZero()) 813 if (delta.isZero())
814 return; 814 return;
815 815
816 bool restrictedByLineClamp = false; 816 bool restrictedByLineClamp = false;
(...skipping 3708 matching lines...)
4525 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); 4525 ASSERT(style()->hasBackground() || style()->hasBoxDecorations());
4526 4526
4527 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) 4527 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1)
4528 return m_rareData->m_previousBorderBoxSize; 4528 return m_rareData->m_previousBorderBoxSize;
4529 4529
4530 // We didn't save the old border box size because it was the same as the siz e of oldBounds. 4530 // We didn't save the old border box size because it was the same as the siz e of oldBounds.
4531 return previousBoundsSize; 4531 return previousBoundsSize;
4532 } 4532 }
4533 4533
4534 } // namespace blink 4534 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine