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() && | |
1013 toLayoutBox(layoutObject)->layer()->scrollsWithViewport()) { | |
1014 return 0; | |
bokan
2016/10/24 14:11:29
nit: return nullptr
| |
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 4565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5586 LayoutRect rect = frameRect(); | 5592 LayoutRect rect = frameRect(); |
5587 | 5593 |
5588 LayoutBlock* block = containingBlock(); | 5594 LayoutBlock* block = containingBlock(); |
5589 if (block) | 5595 if (block) |
5590 block->adjustChildDebugRect(rect); | 5596 block->adjustChildDebugRect(rect); |
5591 | 5597 |
5592 return rect; | 5598 return rect; |
5593 } | 5599 } |
5594 | 5600 |
5595 } // namespace blink | 5601 } // namespace blink |
OLD | NEW |