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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 UseTransforms | TraverseDocumentBoundaries) | 675 UseTransforms | TraverseDocumentBoundaries) |
676 .boundingBox()); | 676 .boundingBox()); |
677 } else { | 677 } else { |
678 parentBox = nullptr; | 678 parentBox = nullptr; |
679 } | 679 } |
680 } | 680 } |
681 } | 681 } |
682 } | 682 } |
683 } | 683 } |
684 | 684 |
685 // If we are fixed-position and scroll with the viewport, it is useless to | 685 // If we are fixed-position and stick to the viewport, it is useless to |
686 // scroll the parent. | 686 // scroll the parent. |
687 if (style()->position() == FixedPosition && hasLayer() && | 687 if (style()->position() == FixedPosition && |
688 layer()->scrollsWithViewport()) { | 688 containerForFixedPosition() == view()) { |
689 return; | 689 return; |
690 } | 690 } |
691 | 691 |
692 if (frame()->page()->autoscrollController().autoscrollInProgress()) | 692 if (frame()->page()->autoscrollController().autoscrollInProgress()) |
693 parentBox = enclosingScrollableBox(); | 693 parentBox = enclosingScrollableBox(); |
694 | 694 |
695 if (parentBox) | 695 if (parentBox) |
696 parentBox->scrollRectToVisible(newRect, alignX, alignY, scrollType, | 696 parentBox->scrollRectToVisible(newRect, alignX, alignY, scrollType, |
697 makeVisibleInVisualViewport); | 697 makeVisibleInVisualViewport); |
698 } | 698 } |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 | 1029 |
1030 return windowAutoscrollPoint - pointInRootFrame; | 1030 return windowAutoscrollPoint - pointInRootFrame; |
1031 } | 1031 } |
1032 | 1032 |
1033 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) { | 1033 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) { |
1034 while ( | 1034 while ( |
1035 layoutObject && | 1035 layoutObject && |
1036 !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) { | 1036 !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) { |
1037 // Do not start autoscroll when the node is inside a fixed-position element. | 1037 // Do not start autoscroll when the node is inside a fixed-position element. |
1038 if (layoutObject->isBox() && toLayoutBox(layoutObject)->hasLayer() && | 1038 if (layoutObject->isBox() && toLayoutBox(layoutObject)->hasLayer() && |
1039 toLayoutBox(layoutObject)->layer()->scrollsWithViewport()) { | 1039 toLayoutBox(layoutObject)->layer()->sticksToViewport()) { |
1040 return nullptr; | 1040 return nullptr; |
1041 } | 1041 } |
1042 | 1042 |
1043 if (!layoutObject->parent() && | 1043 if (!layoutObject->parent() && |
1044 layoutObject->node() == layoutObject->document() && | 1044 layoutObject->node() == layoutObject->document() && |
1045 layoutObject->document().localOwner()) | 1045 layoutObject->document().localOwner()) |
1046 layoutObject = layoutObject->document().localOwner()->layoutObject(); | 1046 layoutObject = layoutObject->document().localOwner()->layoutObject(); |
1047 else | 1047 else |
1048 layoutObject = layoutObject->parent(); | 1048 layoutObject = layoutObject->parent(); |
1049 } | 1049 } |
(...skipping 4590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5640 LayoutRect rect = frameRect(); | 5640 LayoutRect rect = frameRect(); |
5641 | 5641 |
5642 LayoutBlock* block = containingBlock(); | 5642 LayoutBlock* block = containingBlock(); |
5643 if (block) | 5643 if (block) |
5644 block->adjustChildDebugRect(rect); | 5644 block->adjustChildDebugRect(rect); |
5645 | 5645 |
5646 return rect; | 5646 return rect; |
5647 } | 5647 } |
5648 | 5648 |
5649 } // namespace blink | 5649 } // namespace blink |
OLD | NEW |