Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2262373003: Clip PaintLayerScrollableArea::scrollIntoView return to layer bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the code style Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698