| 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. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 parentBox = parent()->enclosingBox(); | 536 parentBox = parent()->enclosingBox(); |
| 537 restrictedByLineClamp = !parent()->style()->lineClamp().isNone(); | 537 restrictedByLineClamp = !parent()->style()->lineClamp().isNone(); |
| 538 } | 538 } |
| 539 | 539 |
| 540 if (hasOverflowClip() && !restrictedByLineClamp) { | 540 if (hasOverflowClip() && !restrictedByLineClamp) { |
| 541 // Don't scroll to reveal an overflow layer that is restricted by the -w
ebkit-line-clamp property. | 541 // Don't scroll to reveal an overflow layer that is restricted by the -w
ebkit-line-clamp property. |
| 542 // This will prevent us from revealing text hidden by the slider in Safa
ri RSS. | 542 // This will prevent us from revealing text hidden by the slider in Safa
ri RSS. |
| 543 newRect = getScrollableArea()->scrollIntoView(rect, alignX, alignY, scro
llType); | 543 newRect = getScrollableArea()->scrollIntoView(rect, alignX, alignY, scro
llType); |
| 544 } else if (!parentBox && canBeProgramaticallyScrolled()) { | 544 } else if (!parentBox && canBeProgramaticallyScrolled()) { |
| 545 if (FrameView* frameView = this->frameView()) { | 545 if (FrameView* frameView = this->frameView()) { |
| 546 HTMLFrameOwnerElement* ownerElement = document().ownerElement(); | 546 HTMLFrameOwnerElement* ownerElement = document().localOwner(); |
| 547 if (!isDisallowedAutoscroll(ownerElement, frameView)) { | 547 if (!isDisallowedAutoscroll(ownerElement, frameView)) { |
| 548 if (makeVisibleInVisualViewport) { | 548 if (makeVisibleInVisualViewport) { |
| 549 frameView->getScrollableArea()->scrollIntoView(rect, alignX,
alignY, scrollType); | 549 frameView->getScrollableArea()->scrollIntoView(rect, alignX,
alignY, scrollType); |
| 550 } else { | 550 } else { |
| 551 frameView->layoutViewportScrollableArea()->scrollIntoView(re
ct, alignX, alignY, scrollType); | 551 frameView->layoutViewportScrollableArea()->scrollIntoView(re
ct, alignX, alignY, scrollType); |
| 552 } | 552 } |
| 553 if (ownerElement && ownerElement->layoutObject()) { | 553 if (ownerElement && ownerElement->layoutObject()) { |
| 554 if (frameView->safeToPropagateScrollToParent()) { | 554 if (frameView->safeToPropagateScrollToParent()) { |
| 555 parentBox = ownerElement->layoutObject()->enclosingBox()
; | 555 parentBox = ownerElement->layoutObject()->enclosingBox()
; |
| 556 LayoutView* parentView = ownerElement->layoutObject()->v
iew(); | 556 LayoutView* parentView = ownerElement->layoutObject()->v
iew(); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 windowAutoscrollPoint.move(0, -autoscrollBeltSize); | 848 windowAutoscrollPoint.move(0, -autoscrollBeltSize); |
| 849 else if (windowAutoscrollPoint.y() > windowBox.maxY() - autoscrollBeltSize) | 849 else if (windowAutoscrollPoint.y() > windowBox.maxY() - autoscrollBeltSize) |
| 850 windowAutoscrollPoint.move(0, autoscrollBeltSize); | 850 windowAutoscrollPoint.move(0, autoscrollBeltSize); |
| 851 | 851 |
| 852 return windowAutoscrollPoint - pointInRootFrame; | 852 return windowAutoscrollPoint - pointInRootFrame; |
| 853 } | 853 } |
| 854 | 854 |
| 855 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) | 855 LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) |
| 856 { | 856 { |
| 857 while (layoutObject && !(layoutObject->isBox() && toLayoutBox(layoutObject)-
>canAutoscroll())) { | 857 while (layoutObject && !(layoutObject->isBox() && toLayoutBox(layoutObject)-
>canAutoscroll())) { |
| 858 if (!layoutObject->parent() && layoutObject->node() == layoutObject->doc
ument() && layoutObject->document().ownerElement()) | 858 if (!layoutObject->parent() && layoutObject->node() == layoutObject->doc
ument() && layoutObject->document().localOwner()) |
| 859 layoutObject = layoutObject->document().ownerElement()->layoutObject
(); | 859 layoutObject = layoutObject->document().localOwner()->layoutObject()
; |
| 860 else | 860 else |
| 861 layoutObject = layoutObject->parent(); | 861 layoutObject = layoutObject->parent(); |
| 862 } | 862 } |
| 863 | 863 |
| 864 return layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject) : 0
; | 864 return layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject) : 0
; |
| 865 } | 865 } |
| 866 | 866 |
| 867 static inline int adjustedScrollDelta(int beginningDelta) | 867 static inline int adjustedScrollDelta(int beginningDelta) |
| 868 { | 868 { |
| 869 // This implemention matches Firefox's. | 869 // This implemention matches Firefox's. |
| (...skipping 3915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4785 | 4785 |
| 4786 void LayoutBox::clearPercentHeightDescendants() | 4786 void LayoutBox::clearPercentHeightDescendants() |
| 4787 { | 4787 { |
| 4788 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { | 4788 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { |
| 4789 if (curr->isBox()) | 4789 if (curr->isBox()) |
| 4790 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4790 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
| 4791 } | 4791 } |
| 4792 } | 4792 } |
| 4793 | 4793 |
| 4794 } // namespace blink | 4794 } // namespace blink |
| OLD | NEW |