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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2437303002: Fix unscrollable scrollers after closing a <dialog>. (Closed)
Patch Set: address review comments Created 4 years, 1 month 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 void PaintLayerScrollableArea::updateScrollableAreaSet(bool hasOverflow) { 1595 void PaintLayerScrollableArea::updateScrollableAreaSet(bool hasOverflow) {
1596 LocalFrame* frame = box().frame(); 1596 LocalFrame* frame = box().frame();
1597 if (!frame) 1597 if (!frame)
1598 return; 1598 return;
1599 1599
1600 FrameView* frameView = frame->view(); 1600 FrameView* frameView = frame->view();
1601 if (!frameView) 1601 if (!frameView)
1602 return; 1602 return;
1603 1603
1604 // FIXME: Does this need to be fixed later for OOPI? 1604 // FIXME: Does this need to be fixed later for OOPI?
1605 bool isVisibleToHitTest = box().visibleToHitTesting(); 1605 bool isVisibleToHitTest = box().style()->visibleToHitTesting();
1606 if (HTMLFrameOwnerElement* owner = frame->deprecatedLocalOwner()) 1606 if (HTMLFrameOwnerElement* owner = frame->deprecatedLocalOwner()) {
1607 isVisibleToHitTest &= 1607 isVisibleToHitTest &= owner->layoutObject() &&
1608 owner->layoutObject() && owner->layoutObject()->visibleToHitTesting(); 1608 owner->layoutObject()->style()->visibleToHitTesting();
1609 }
1609 1610
1610 bool didScrollOverflow = m_scrollsOverflow; 1611 bool didScrollOverflow = m_scrollsOverflow;
1611 1612
1612 m_scrollsOverflow = hasOverflow && isVisibleToHitTest; 1613 m_scrollsOverflow = hasOverflow && isVisibleToHitTest;
1613 if (didScrollOverflow == scrollsOverflow()) 1614 if (didScrollOverflow == scrollsOverflow())
1614 return; 1615 return;
1615 1616
1616 if (m_scrollsOverflow) { 1617 if (m_scrollsOverflow) {
1617 ASSERT(canHaveOverflowScrollbars(box())); 1618 ASSERT(canHaveOverflowScrollbars(box()));
1618 frameView->addScrollableArea(this); 1619 frameView->addScrollableArea(this);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 1965
1965 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 1966 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
1966 clampScrollableAreas() { 1967 clampScrollableAreas() {
1967 for (auto& scrollableArea : *s_needsClamp) 1968 for (auto& scrollableArea : *s_needsClamp)
1968 scrollableArea->clampScrollOffsetsAfterLayout(); 1969 scrollableArea->clampScrollOffsetsAfterLayout();
1969 delete s_needsClamp; 1970 delete s_needsClamp;
1970 s_needsClamp = nullptr; 1971 s_needsClamp = nullptr;
1971 } 1972 }
1972 1973
1973 } // namespace blink 1974 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698