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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1001 else if (windowAutoscrollPoint.y() > windowBox.maxY() - autoscrollBeltSize) | 1001 else if (windowAutoscrollPoint.y() > windowBox.maxY() - autoscrollBeltSize) |
1002 windowAutoscrollPoint.move(0, autoscrollBeltSize); | 1002 windowAutoscrollPoint.move(0, autoscrollBeltSize); |
1003 | 1003 |
1004 return windowAutoscrollPoint - pointInRootFrame; | 1004 return windowAutoscrollPoint - pointInRootFrame; |
1005 } | 1005 } |
1006 | 1006 |
1007 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) { | 1007 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) { |
1008 while ( | 1008 while ( |
1009 layoutObject && | 1009 layoutObject && |
1010 !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) { | 1010 !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) { |
1011 // Do not start autoscroll when the node is inside a fixed-position element. | |
1012 if (layoutObject->isBox() && toLayoutBox(layoutObject)->hasLayer() && | |
bokan
2016/10/24 13:22:00
Could you confirm that a scroller inside a positio
sunyunjia
2016/10/24 14:10:25
Confirmed!
| |
1013 toLayoutBox(layoutObject)->layer()->scrollsWithViewport()) { | |
1014 return 0; | |
1015 } | |
1016 | |
1011 if (!layoutObject->parent() && | 1017 if (!layoutObject->parent() && |
1012 layoutObject->node() == layoutObject->document() && | 1018 layoutObject->node() == layoutObject->document() && |
1013 layoutObject->document().localOwner()) | 1019 layoutObject->document().localOwner()) |
1014 layoutObject = layoutObject->document().localOwner()->layoutObject(); | 1020 layoutObject = layoutObject->document().localOwner()->layoutObject(); |
1015 else | 1021 else |
1016 layoutObject = layoutObject->parent(); | 1022 layoutObject = layoutObject->parent(); |
1017 } | 1023 } |
1018 | 1024 |
1019 return layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject) : 0; | 1025 return layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject) : 0; |
1020 } | 1026 } |
(...skipping 4566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5587 LayoutRect rect = frameRect(); | 5593 LayoutRect rect = frameRect(); |
5588 | 5594 |
5589 LayoutBlock* block = containingBlock(); | 5595 LayoutBlock* block = containingBlock(); |
5590 if (block) | 5596 if (block) |
5591 block->adjustChildDebugRect(rect); | 5597 block->adjustChildDebugRect(rect); |
5592 | 5598 |
5593 return rect; | 5599 return rect; |
5594 } | 5600 } |
5595 | 5601 |
5596 } // namespace blink | 5602 } // namespace blink |
OLD | NEW |