| 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 4409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4420 } | 4420 } |
| 4421 | 4421 |
| 4422 void FrameView::show() { | 4422 void FrameView::show() { |
| 4423 if (!isSelfVisible()) { | 4423 if (!isSelfVisible()) { |
| 4424 setSelfVisible(true); | 4424 setSelfVisible(true); |
| 4425 if (ScrollingCoordinator* scrollingCoordinator = | 4425 if (ScrollingCoordinator* scrollingCoordinator = |
| 4426 this->scrollingCoordinator()) | 4426 this->scrollingCoordinator()) |
| 4427 scrollingCoordinator->frameViewVisibilityDidChange(); | 4427 scrollingCoordinator->frameViewVisibilityDidChange(); |
| 4428 setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); | 4428 setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); |
| 4429 updateParentScrollableAreaSet(); | 4429 updateParentScrollableAreaSet(); |
| 4430 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 4431 // The existance of scrolling properties depends on visibility through |
| 4432 // isScrollable() so ensure properties are updated if visibility changes. |
| 4433 setNeedsPaintPropertyUpdate(); |
| 4434 } |
| 4430 if (isParentVisible()) { | 4435 if (isParentVisible()) { |
| 4431 for (const auto& child : m_children) | 4436 for (const auto& child : m_children) |
| 4432 child->setParentVisible(true); | 4437 child->setParentVisible(true); |
| 4433 } | 4438 } |
| 4434 } | 4439 } |
| 4435 | 4440 |
| 4436 Widget::show(); | 4441 Widget::show(); |
| 4437 } | 4442 } |
| 4438 | 4443 |
| 4439 void FrameView::hide() { | 4444 void FrameView::hide() { |
| 4440 if (isSelfVisible()) { | 4445 if (isSelfVisible()) { |
| 4441 if (isParentVisible()) { | 4446 if (isParentVisible()) { |
| 4442 for (const auto& child : m_children) | 4447 for (const auto& child : m_children) |
| 4443 child->setParentVisible(false); | 4448 child->setParentVisible(false); |
| 4444 } | 4449 } |
| 4445 setSelfVisible(false); | 4450 setSelfVisible(false); |
| 4446 if (ScrollingCoordinator* scrollingCoordinator = | 4451 if (ScrollingCoordinator* scrollingCoordinator = |
| 4447 this->scrollingCoordinator()) | 4452 this->scrollingCoordinator()) |
| 4448 scrollingCoordinator->frameViewVisibilityDidChange(); | 4453 scrollingCoordinator->frameViewVisibilityDidChange(); |
| 4449 setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); | 4454 setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); |
| 4450 updateParentScrollableAreaSet(); | 4455 updateParentScrollableAreaSet(); |
| 4456 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 4457 // The existance of scrolling properties depends on visibility through |
| 4458 // isScrollable() so ensure properties are updated if visibility changes. |
| 4459 setNeedsPaintPropertyUpdate(); |
| 4460 } |
| 4451 } | 4461 } |
| 4452 | 4462 |
| 4453 Widget::hide(); | 4463 Widget::hide(); |
| 4454 } | 4464 } |
| 4455 | 4465 |
| 4456 int FrameView::viewportWidth() const { | 4466 int FrameView::viewportWidth() const { |
| 4457 int viewportWidth = layoutSize(IncludeScrollbars).width(); | 4467 int viewportWidth = layoutSize(IncludeScrollbars).width(); |
| 4458 return adjustForAbsoluteZoom(viewportWidth, layoutView()); | 4468 return adjustForAbsoluteZoom(viewportWidth, layoutView()); |
| 4459 } | 4469 } |
| 4460 | 4470 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4683 DCHECK(m_frame->isMainFrame()); | 4693 DCHECK(m_frame->isMainFrame()); |
| 4684 return m_initialViewportSize.width(); | 4694 return m_initialViewportSize.width(); |
| 4685 } | 4695 } |
| 4686 | 4696 |
| 4687 int FrameView::initialViewportHeight() const { | 4697 int FrameView::initialViewportHeight() const { |
| 4688 DCHECK(m_frame->isMainFrame()); | 4698 DCHECK(m_frame->isMainFrame()); |
| 4689 return m_initialViewportSize.height(); | 4699 return m_initialViewportSize.height(); |
| 4690 } | 4700 } |
| 4691 | 4701 |
| 4692 } // namespace blink | 4702 } // namespace blink |
| OLD | NEW |