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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
666 UseTransforms | TraverseDocumentBoundaries) | 666 UseTransforms | TraverseDocumentBoundaries) |
667 .boundingBox()); | 667 .boundingBox()); |
668 } else { | 668 } else { |
669 parentBox = nullptr; | 669 parentBox = nullptr; |
670 } | 670 } |
671 } | 671 } |
672 } | 672 } |
673 } | 673 } |
674 } | 674 } |
675 | 675 |
676 // If we are fixed-position and scroll with the viewport, it is useless to | 676 // If we are fixed-position and stick to the viewport, it is useless to |
677 // scroll the parent. | 677 // scroll the parent. |
678 if (style()->position() == FixedPosition && hasLayer() && | 678 if (style()->position() == FixedPosition && |
679 layer()->scrollsWithViewport()) { | 679 containerForFixedPosition() == view()) { |
chrishtr
2016/12/07 18:07:19
This one was pretty easy to adjust to not call sti
| |
680 return; | 680 return; |
681 } | 681 } |
682 | 682 |
683 if (frame()->page()->autoscrollController().autoscrollInProgress()) | 683 if (frame()->page()->autoscrollController().autoscrollInProgress()) |
684 parentBox = enclosingScrollableBox(); | 684 parentBox = enclosingScrollableBox(); |
685 | 685 |
686 if (parentBox) | 686 if (parentBox) |
687 parentBox->scrollRectToVisible(newRect, alignX, alignY, scrollType, | 687 parentBox->scrollRectToVisible(newRect, alignX, alignY, scrollType, |
688 makeVisibleInVisualViewport); | 688 makeVisibleInVisualViewport); |
689 } | 689 } |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1020 | 1020 |
1021 return windowAutoscrollPoint - pointInRootFrame; | 1021 return windowAutoscrollPoint - pointInRootFrame; |
1022 } | 1022 } |
1023 | 1023 |
1024 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) { | 1024 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) { |
1025 while ( | 1025 while ( |
1026 layoutObject && | 1026 layoutObject && |
1027 !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) { | 1027 !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) { |
1028 // Do not start autoscroll when the node is inside a fixed-position element. | 1028 // Do not start autoscroll when the node is inside a fixed-position element. |
1029 if (layoutObject->isBox() && toLayoutBox(layoutObject)->hasLayer() && | 1029 if (layoutObject->isBox() && toLayoutBox(layoutObject)->hasLayer() && |
1030 toLayoutBox(layoutObject)->layer()->scrollsWithViewport()) { | 1030 toLayoutBox(layoutObject)->layer()->sticksToViewport()) { |
1031 return nullptr; | 1031 return nullptr; |
1032 } | 1032 } |
1033 | 1033 |
1034 if (!layoutObject->parent() && | 1034 if (!layoutObject->parent() && |
1035 layoutObject->node() == layoutObject->document() && | 1035 layoutObject->node() == layoutObject->document() && |
1036 layoutObject->document().localOwner()) | 1036 layoutObject->document().localOwner()) |
1037 layoutObject = layoutObject->document().localOwner()->layoutObject(); | 1037 layoutObject = layoutObject->document().localOwner()->layoutObject(); |
1038 else | 1038 else |
1039 layoutObject = layoutObject->parent(); | 1039 layoutObject = layoutObject->parent(); |
1040 } | 1040 } |
(...skipping 4582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5623 LayoutRect rect = frameRect(); | 5623 LayoutRect rect = frameRect(); |
5624 | 5624 |
5625 LayoutBlock* block = containingBlock(); | 5625 LayoutBlock* block = containingBlock(); |
5626 if (block) | 5626 if (block) |
5627 block->adjustChildDebugRect(rect); | 5627 block->adjustChildDebugRect(rect); |
5628 | 5628 |
5629 return rect; | 5629 return rect; |
5630 } | 5630 } |
5631 | 5631 |
5632 } // namespace blink | 5632 } // namespace blink |
OLD | NEW |