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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 // Forbid autoscrolls when scrollbars are off, but permits other programmati
c scrolls, | 467 // Forbid autoscrolls when scrollbars are off, but permits other programmati
c scrolls, |
468 // like navigation to an anchor. | 468 // like navigation to an anchor. |
469 Page* page = frameView->frame().page(); | 469 Page* page = frameView->frame().page(); |
470 if (!page) | 470 if (!page) |
471 return false; | 471 return false; |
472 return !page->autoscrollController().autoscrollInProgress(); | 472 return !page->autoscrollController().autoscrollInProgress(); |
473 } | 473 } |
474 | 474 |
475 void RenderBox::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignmen
t& alignX, const ScrollAlignment& alignY) | 475 void RenderBox::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignmen
t& alignX, const ScrollAlignment& alignY) |
476 { | 476 { |
| 477 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
| 478 DisableCompositingQueryAsserts disabler; |
| 479 |
477 RenderBox* parentBox = 0; | 480 RenderBox* parentBox = 0; |
478 LayoutRect newRect = rect; | 481 LayoutRect newRect = rect; |
479 | 482 |
480 bool restrictedByLineClamp = false; | 483 bool restrictedByLineClamp = false; |
481 if (parent()) { | 484 if (parent()) { |
482 parentBox = parent()->enclosingBox(); | 485 parentBox = parent()->enclosingBox(); |
483 restrictedByLineClamp = !parent()->style()->lineClamp().isNone(); | 486 restrictedByLineClamp = !parent()->style()->lineClamp().isNone(); |
484 } | 487 } |
485 | 488 |
486 if (hasOverflowClip() && !restrictedByLineClamp) { | 489 if (hasOverflowClip() && !restrictedByLineClamp) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { | 734 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { |
732 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); | 735 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); |
733 return horizontalScrollbarHeight(); | 736 return horizontalScrollbarHeight(); |
734 } | 737 } |
735 | 738 |
736 return 0; | 739 return 0; |
737 } | 740 } |
738 | 741 |
739 bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity,
float delta) | 742 bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity,
float delta) |
740 { | 743 { |
| 744 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
| 745 DisableCompositingQueryAsserts disabler; |
| 746 |
741 // Logical scroll is a higher level concept, all directions by here must be
physical | 747 // Logical scroll is a higher level concept, all directions by here must be
physical |
742 ASSERT(!isLogical(direction)); | 748 ASSERT(!isLogical(direction)); |
743 | 749 |
744 if (!layer() || !layer()->scrollableArea()) | 750 if (!layer() || !layer()->scrollableArea()) |
745 return false; | 751 return false; |
746 | 752 |
747 return layer()->scrollableArea()->scroll(direction, granularity, delta); | 753 return layer()->scrollableArea()->scroll(direction, granularity, delta); |
748 } | 754 } |
749 | 755 |
750 bool RenderBox::canBeScrolledAndHasScrollableArea() const | 756 bool RenderBox::canBeScrolledAndHasScrollableArea() const |
(...skipping 3941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4692 return 0; | 4698 return 0; |
4693 | 4699 |
4694 if (!layoutState && !flowThreadContainingBlock()) | 4700 if (!layoutState && !flowThreadContainingBlock()) |
4695 return 0; | 4701 return 0; |
4696 | 4702 |
4697 RenderBlock* containerBlock = containingBlock(); | 4703 RenderBlock* containerBlock = containingBlock(); |
4698 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4704 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4699 } | 4705 } |
4700 | 4706 |
4701 } // namespace WebCore | 4707 } // namespace WebCore |
OLD | NEW |