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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 return false; | 724 return false; |
725 } | 725 } |
726 | 726 |
727 bool RenderBox::canBeScrolledAndHasScrollableArea() const | 727 bool RenderBox::canBeScrolledAndHasScrollableArea() const |
728 { | 728 { |
729 return canBeProgramaticallyScrolled() && (scrollHeight() != clientHeight() |
| scrollWidth() != clientWidth()); | 729 return canBeProgramaticallyScrolled() && (scrollHeight() != clientHeight() |
| scrollWidth() != clientWidth()); |
730 } | 730 } |
731 | 731 |
732 bool RenderBox::canBeProgramaticallyScrolled() const | 732 bool RenderBox::canBeProgramaticallyScrolled() const |
733 { | 733 { |
734 return (hasOverflowClip() && (scrollsOverflow() || (node() && node()->render
erIsEditable()))) || (node() && node()->isDocumentNode()); | 734 Node* node = this->node(); |
| 735 if (node && node->isDocumentNode()) |
| 736 return true; |
| 737 |
| 738 if (!hasOverflowClip()) |
| 739 return false; |
| 740 |
| 741 bool hasScrollableOverflow = hasScrollableOverflowX() || hasScrollableOverfl
owY(); |
| 742 if (scrollsOverflow() && hasScrollableOverflow) |
| 743 return true; |
| 744 |
| 745 return node && node->rendererIsEditable(); |
735 } | 746 } |
736 | 747 |
737 bool RenderBox::usesCompositedScrolling() const | 748 bool RenderBox::usesCompositedScrolling() const |
738 { | 749 { |
739 return hasOverflowClip() && hasLayer() && layer()->usesCompositedScrolling()
; | 750 return hasOverflowClip() && hasLayer() && layer()->usesCompositedScrolling()
; |
740 } | 751 } |
741 | 752 |
742 void RenderBox::autoscroll(const IntPoint& position) | 753 void RenderBox::autoscroll(const IntPoint& position) |
743 { | 754 { |
744 if (layer()) | 755 if (layer()) |
(...skipping 3965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4710 } | 4721 } |
4711 | 4722 |
4712 if (didSplitParentAnonymousBoxes) | 4723 if (didSplitParentAnonymousBoxes) |
4713 markBoxForRelayoutAfterSplit(this); | 4724 markBoxForRelayoutAfterSplit(this); |
4714 | 4725 |
4715 ASSERT(beforeChild->parent() == this); | 4726 ASSERT(beforeChild->parent() == this); |
4716 return beforeChild; | 4727 return beforeChild; |
4717 } | 4728 } |
4718 | 4729 |
4719 } // namespace WebCore | 4730 } // namespace WebCore |
OLD | NEW |