| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 } | 746 } |
| 747 | 747 |
| 748 bool RenderBox::autoscrollInProgress() const | 748 bool RenderBox::autoscrollInProgress() const |
| 749 { | 749 { |
| 750 return frame() && frame()->page() && frame()->page()->autoscrollInProgress(t
his); | 750 return frame() && frame()->page() && frame()->page()->autoscrollInProgress(t
his); |
| 751 } | 751 } |
| 752 | 752 |
| 753 // There are two kinds of renderer that can autoscroll. | 753 // There are two kinds of renderer that can autoscroll. |
| 754 bool RenderBox::canAutoscroll() const | 754 bool RenderBox::canAutoscroll() const |
| 755 { | 755 { |
| 756 if (node() && node()->isDocumentNode()) |
| 757 return view()->frameView()->isScrollable(); |
| 758 |
| 756 // Check for a box that can be scrolled in its own right. | 759 // Check for a box that can be scrolled in its own right. |
| 757 if (canBeScrolledAndHasScrollableArea()) | 760 return canBeScrolledAndHasScrollableArea(); |
| 758 return true; | |
| 759 | |
| 760 // Check for a box that represents the top level of a web page. | |
| 761 if (node() != &document()) | |
| 762 return false; | |
| 763 Frame* frame = this->frame(); | |
| 764 if (!frame) | |
| 765 return false; | |
| 766 Page* page = frame->page(); | |
| 767 return page && page->mainFrame() == frame && frame->view()->isScrollable(); | |
| 768 } | 761 } |
| 769 | 762 |
| 770 // If specified point is in border belt, returned offset denotes direction of | 763 // If specified point is in border belt, returned offset denotes direction of |
| 771 // scrolling. | 764 // scrolling. |
| 772 IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) con
st | 765 IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) con
st |
| 773 { | 766 { |
| 774 if (!frame()) | 767 if (!frame()) |
| 775 return IntSize(); | 768 return IntSize(); |
| 776 | 769 |
| 777 FrameView* frameView = frame()->view(); | 770 FrameView* frameView = frame()->view(); |
| (...skipping 3932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4710 } | 4703 } |
| 4711 | 4704 |
| 4712 if (didSplitParentAnonymousBoxes) | 4705 if (didSplitParentAnonymousBoxes) |
| 4713 markBoxForRelayoutAfterSplit(this); | 4706 markBoxForRelayoutAfterSplit(this); |
| 4714 | 4707 |
| 4715 ASSERT(beforeChild->parent() == this); | 4708 ASSERT(beforeChild->parent() == this); |
| 4716 return beforeChild; | 4709 return beforeChild; |
| 4717 } | 4710 } |
| 4718 | 4711 |
| 4719 } // namespace WebCore | 4712 } // namespace WebCore |
| OLD | NEW |