Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 3783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3794 // Scrollbars won't be transformed within us | 3794 // Scrollbars won't be transformed within us |
| 3795 newPoint.moveBy(-scrollbar.location()); | 3795 newPoint.moveBy(-scrollbar.location()); |
| 3796 return newPoint; | 3796 return newPoint; |
| 3797 } | 3797 } |
| 3798 | 3798 |
| 3799 void FrameView::setParentVisible(bool visible) | 3799 void FrameView::setParentVisible(bool visible) |
| 3800 { | 3800 { |
| 3801 if (isParentVisible() == visible) | 3801 if (isParentVisible() == visible) |
| 3802 return; | 3802 return; |
| 3803 | 3803 |
| 3804 // As parent visibility changes, we may need to recomposite this frame view and potentially child frame views. | |
| 3805 if (PaintLayerCompositor* compositor = layoutView() ? layoutView()->composit or() : nullptr) | |
| 3806 compositor->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); | |
| 3807 | |
| 3804 Widget::setParentVisible(visible); | 3808 Widget::setParentVisible(visible); |
| 3805 | 3809 |
| 3806 if (!isSelfVisible()) | 3810 if (!isSelfVisible()) |
| 3807 return; | 3811 return; |
| 3808 | 3812 |
| 3809 for (const auto& child : m_children) | 3813 for (const auto& child : m_children) |
| 3810 child->setParentVisible(visible); | 3814 child->setParentVisible(visible); |
| 3811 } | 3815 } |
| 3812 | 3816 |
| 3813 void FrameView::show() | 3817 void FrameView::show() |
| 3814 { | 3818 { |
| 3815 if (!isSelfVisible()) { | 3819 if (!isSelfVisible()) { |
| 3816 setSelfVisible(true); | 3820 setSelfVisible(true); |
| 3817 updateScrollableAreaSet(); | 3821 updateScrollableAreaSet(); |
| 3818 if (isParentVisible()) { | 3822 if (isParentVisible()) { |
| 3819 for (const auto& child : m_children) | 3823 for (const auto& child : m_children) { |
|
chrishtr
2016/01/28 00:32:31
Remove curlies.
wkorman
2016/01/28 00:55:21
Done.
| |
| 3820 child->setParentVisible(true); | 3824 child->setParentVisible(true); |
| 3825 } | |
| 3821 } | 3826 } |
| 3822 } | 3827 } |
| 3823 | 3828 |
| 3824 Widget::show(); | 3829 Widget::show(); |
| 3825 } | 3830 } |
| 3826 | 3831 |
| 3827 void FrameView::hide() | 3832 void FrameView::hide() |
| 3828 { | 3833 { |
| 3829 if (isSelfVisible()) { | 3834 if (isSelfVisible()) { |
| 3830 if (isParentVisible()) { | 3835 if (isParentVisible()) { |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4050 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4055 return m_hiddenForThrottling && m_crossOriginForThrottling; |
| 4051 } | 4056 } |
| 4052 | 4057 |
| 4053 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4058 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4054 { | 4059 { |
| 4055 ASSERT(layoutView()); | 4060 ASSERT(layoutView()); |
| 4056 return *layoutView(); | 4061 return *layoutView(); |
| 4057 } | 4062 } |
| 4058 | 4063 |
| 4059 } // namespace blink | 4064 } // namespace blink |
| OLD | NEW |