| 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 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) |
| 1026 : nullptr; |
| 1020 } | 1027 } |
| 1021 | 1028 |
| 1022 static inline int adjustedScrollDelta(int beginningDelta) { | 1029 static inline int adjustedScrollDelta(int beginningDelta) { |
| 1023 // This implemention matches Firefox's. | 1030 // This implemention matches Firefox's. |
| 1024 // http://mxr.mozilla.org/firefox/source/toolkit/content/widgets/browser.xml#8
56. | 1031 // http://mxr.mozilla.org/firefox/source/toolkit/content/widgets/browser.xml#8
56. |
| 1025 const int speedReducer = 12; | 1032 const int speedReducer = 12; |
| 1026 | 1033 |
| 1027 int adjustedDelta = beginningDelta / speedReducer; | 1034 int adjustedDelta = beginningDelta / speedReducer; |
| 1028 if (adjustedDelta > 1) | 1035 if (adjustedDelta > 1) |
| 1029 adjustedDelta = static_cast<int>(adjustedDelta * | 1036 adjustedDelta = static_cast<int>(adjustedDelta * |
| (...skipping 4556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5586 LayoutRect rect = frameRect(); | 5593 LayoutRect rect = frameRect(); |
| 5587 | 5594 |
| 5588 LayoutBlock* block = containingBlock(); | 5595 LayoutBlock* block = containingBlock(); |
| 5589 if (block) | 5596 if (block) |
| 5590 block->adjustChildDebugRect(rect); | 5597 block->adjustChildDebugRect(rect); |
| 5591 | 5598 |
| 5592 return rect; | 5599 return rect; |
| 5593 } | 5600 } |
| 5594 | 5601 |
| 5595 } // namespace blink | 5602 } // namespace blink |
| OLD | NEW |