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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 850113003: iframe updates its parent scrollable area set when its visibility change (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added tests Created 5 years, 11 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after
3951 return; 3951 return;
3952 3952
3953 for (const auto& child : m_children) 3953 for (const auto& child : m_children)
3954 child->setParentVisible(visible); 3954 child->setParentVisible(visible);
3955 } 3955 }
3956 3956
3957 void FrameView::show() 3957 void FrameView::show()
3958 { 3958 {
3959 if (!isSelfVisible()) { 3959 if (!isSelfVisible()) {
3960 setSelfVisible(true); 3960 setSelfVisible(true);
3961 updateScrollableAreaSet();
3961 if (isParentVisible()) { 3962 if (isParentVisible()) {
3962 for (const auto& child : m_children) 3963 for (const auto& child : m_children)
3963 child->setParentVisible(true); 3964 child->setParentVisible(true);
3964 } 3965 }
3965 } 3966 }
3966 3967
3967 Widget::show(); 3968 Widget::show();
3968 } 3969 }
3969 3970
3970 void FrameView::hide() 3971 void FrameView::hide()
3971 { 3972 {
3972 if (isSelfVisible()) { 3973 if (isSelfVisible()) {
3973 if (isParentVisible()) { 3974 if (isParentVisible()) {
3974 for (const auto& child : m_children) 3975 for (const auto& child : m_children)
3975 child->setParentVisible(false); 3976 child->setParentVisible(false);
3976 } 3977 }
3977 setSelfVisible(false); 3978 setSelfVisible(false);
3979 updateScrollableAreaSet();
3978 } 3980 }
3979 3981
3980 Widget::hide(); 3982 Widget::hide();
3981 } 3983 }
3982 3984
3983 void FrameView::addPanScrollIcon(const IntPoint& iconPosition) 3985 void FrameView::addPanScrollIcon(const IntPoint& iconPosition)
3984 { 3986 {
3985 HostWindow* window = hostWindow(); 3987 HostWindow* window = hostWindow();
3986 if (!window) 3988 if (!window)
3987 return; 3989 return;
(...skipping 17 matching lines...) Expand all
4005 return; 4007 return;
4006 4008
4007 ScrollableArea::setScrollOrigin(origin); 4009 ScrollableArea::setScrollOrigin(origin);
4008 4010
4009 // Update if the scroll origin changes, since our position will be different if the content size did not change. 4011 // Update if the scroll origin changes, since our position will be different if the content size did not change.
4010 if (updatePositionAtAll && updatePositionSynchronously) 4012 if (updatePositionAtAll && updatePositionSynchronously)
4011 updateScrollbars(scrollOffsetDouble()); 4013 updateScrollbars(scrollOffsetDouble());
4012 } 4014 }
4013 4015
4014 } // namespace blink 4016 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698