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

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

Issue 620753006: Rendering API cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address jchaffraix remarks Created 6 years, 2 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 return; 705 return;
706 706
707 FrameView* frameView = frame->view(); 707 FrameView* frameView = frame->view();
708 if (!frameView) 708 if (!frameView)
709 return; 709 return;
710 710
711 IntPoint currentDocumentPosition = frameView->windowToContents(position); 711 IntPoint currentDocumentPosition = frameView->windowToContents(position);
712 scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), S crollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); 712 scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), S crollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
713 } 713 }
714 714
715 bool RenderBox::autoscrollInProgress() const
716 {
717 return frame() && frame()->page() && frame()->page()->autoscrollController() .autoscrollInProgress(this);
718 }
719
720 // There are two kinds of renderer that can autoscroll. 715 // There are two kinds of renderer that can autoscroll.
721 bool RenderBox::canAutoscroll() const 716 bool RenderBox::canAutoscroll() const
722 { 717 {
723 if (node() && node()->isDocumentNode()) 718 if (node() && node()->isDocumentNode())
724 return view()->frameView()->isScrollable(); 719 return view()->frameView()->isScrollable();
725 720
726 // Check for a box that can be scrolled in its own right. 721 // Check for a box that can be scrolled in its own right.
727 return canBeScrolledAndHasScrollableArea(); 722 return canBeScrolledAndHasScrollableArea();
728 } 723 }
729 724
(...skipping 3793 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); 4518 ASSERT(style()->hasBackground() || style()->hasBoxDecorations());
4524 4519
4525 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) 4520 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1)
4526 return m_rareData->m_previousBorderBoxSize; 4521 return m_rareData->m_previousBorderBoxSize;
4527 4522
4528 // We didn't save the old border box size because it was the same as the siz e of oldBounds. 4523 // We didn't save the old border box size because it was the same as the siz e of oldBounds.
4529 return previousBoundsSize; 4524 return previousBoundsSize;
4530 } 4525 }
4531 4526
4532 } // namespace blink 4527 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698