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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 bool restrictedByLineClamp = false; | 565 bool restrictedByLineClamp = false; |
566 if (parent()) { | 566 if (parent()) { |
567 parentBox = parent()->enclosingBox(); | 567 parentBox = parent()->enclosingBox(); |
568 restrictedByLineClamp = !parent()->style()->lineClamp().isNone(); | 568 restrictedByLineClamp = !parent()->style()->lineClamp().isNone(); |
569 } | 569 } |
570 | 570 |
571 if (hasOverflowClip() && !restrictedByLineClamp) { | 571 if (hasOverflowClip() && !restrictedByLineClamp) { |
572 // Don't scroll to reveal an overflow layer that is restricted by the -w
ebkit-line-clamp property. | 572 // Don't scroll to reveal an overflow layer that is restricted by the -w
ebkit-line-clamp property. |
573 // This will prevent us from revealing text hidden by the slider in Safa
ri RSS. | 573 // This will prevent us from revealing text hidden by the slider in Safa
ri RSS. |
574 newRect = getScrollableArea()->scrollIntoView(rect, alignX, alignY, scro
llType); | 574 newRect = getScrollableArea()->scrollIntoView(rect, alignX, alignY, scro
llType); |
| 575 if (newRect.isEmpty()) |
| 576 return; |
575 } else if (!parentBox && canBeProgramaticallyScrolled()) { | 577 } else if (!parentBox && canBeProgramaticallyScrolled()) { |
576 if (FrameView* frameView = this->frameView()) { | 578 if (FrameView* frameView = this->frameView()) { |
577 HTMLFrameOwnerElement* ownerElement = document().localOwner(); | 579 HTMLFrameOwnerElement* ownerElement = document().localOwner(); |
578 if (!isDisallowedAutoscroll(ownerElement, frameView)) { | 580 if (!isDisallowedAutoscroll(ownerElement, frameView)) { |
579 if (makeVisibleInVisualViewport) { | 581 if (makeVisibleInVisualViewport) { |
580 frameView->getScrollableArea()->scrollIntoView(rect, alignX,
alignY, scrollType); | 582 frameView->getScrollableArea()->scrollIntoView(rect, alignX,
alignY, scrollType); |
581 } else { | 583 } else { |
582 frameView->layoutViewportScrollableArea()->scrollIntoView(re
ct, alignX, alignY, scrollType); | 584 frameView->layoutViewportScrollableArea()->scrollIntoView(re
ct, alignX, alignY, scrollType); |
583 } | 585 } |
584 if (ownerElement && ownerElement->layoutObject()) { | 586 if (ownerElement && ownerElement->layoutObject()) { |
(...skipping 4242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4827 m_rareData->m_snapAreas->remove(&snapArea); | 4829 m_rareData->m_snapAreas->remove(&snapArea); |
4828 } | 4830 } |
4829 } | 4831 } |
4830 | 4832 |
4831 SnapAreaSet* LayoutBox::snapAreas() const | 4833 SnapAreaSet* LayoutBox::snapAreas() const |
4832 { | 4834 { |
4833 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4835 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4834 } | 4836 } |
4835 | 4837 |
4836 } // namespace blink | 4838 } // namespace blink |
OLD | NEW |