| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 m_horizontalScrollbarMode(ScrollbarAuto), | 175 m_horizontalScrollbarMode(ScrollbarAuto), |
| 176 m_verticalScrollbarMode(ScrollbarAuto), | 176 m_verticalScrollbarMode(ScrollbarAuto), |
| 177 m_horizontalScrollbarLock(false), | 177 m_horizontalScrollbarLock(false), |
| 178 m_verticalScrollbarLock(false), | 178 m_verticalScrollbarLock(false), |
| 179 m_scrollbarsSuppressed(false), | 179 m_scrollbarsSuppressed(false), |
| 180 m_inUpdateScrollbars(false), | 180 m_inUpdateScrollbars(false), |
| 181 m_frameTimingRequestsDirty(true), | 181 m_frameTimingRequestsDirty(true), |
| 182 m_hiddenForThrottling(false), | 182 m_hiddenForThrottling(false), |
| 183 m_subtreeThrottled(false), | 183 m_subtreeThrottled(false), |
| 184 m_lifecycleUpdatesThrottled(false), | 184 m_lifecycleUpdatesThrottled(false), |
| 185 m_needsPaintPropertyUpdate(true), |
| 185 m_currentUpdateLifecyclePhasesTargetState( | 186 m_currentUpdateLifecyclePhasesTargetState( |
| 186 DocumentLifecycle::Uninitialized), | 187 DocumentLifecycle::Uninitialized), |
| 187 m_scrollAnchor(this), | 188 m_scrollAnchor(this), |
| 188 m_scrollbarManager(*this), | 189 m_scrollbarManager(*this), |
| 189 m_needsScrollbarsUpdate(false), | 190 m_needsScrollbarsUpdate(false), |
| 190 m_suppressAdjustViewSize(false), | 191 m_suppressAdjustViewSize(false), |
| 191 m_allowsLayoutInvalidationAfterLayoutClean(true) { | 192 m_allowsLayoutInvalidationAfterLayoutClean(true) { |
| 192 ASSERT(m_frame); | 193 ASSERT(m_frame); |
| 193 init(); | 194 init(); |
| 194 } | 195 } |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 ScrollableArea::contentsResized(); | 640 ScrollableArea::contentsResized(); |
| 640 | 641 |
| 641 Page* page = frame().page(); | 642 Page* page = frame().page(); |
| 642 if (!page) | 643 if (!page) |
| 643 return; | 644 return; |
| 644 | 645 |
| 645 updateParentScrollableAreaSet(); | 646 updateParentScrollableAreaSet(); |
| 646 | 647 |
| 647 page->chromeClient().contentsSizeChanged(m_frame.get(), size); | 648 page->chromeClient().contentsSizeChanged(m_frame.get(), size); |
| 648 frame().loader().restoreScrollPositionAndViewState(); | 649 frame().loader().restoreScrollPositionAndViewState(); |
| 650 |
| 651 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 652 // The presence of overflow depends on the contents size. The scroll |
| 653 // properties can change depending on whether overflow scrolling occurs. |
| 654 setNeedsPaintPropertyUpdate(); |
| 655 } |
| 649 } | 656 } |
| 650 | 657 |
| 651 void FrameView::adjustViewSize() { | 658 void FrameView::adjustViewSize() { |
| 652 if (m_suppressAdjustViewSize) | 659 if (m_suppressAdjustViewSize) |
| 653 return; | 660 return; |
| 654 | 661 |
| 655 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 662 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 656 if (layoutViewItem.isNull()) | 663 if (layoutViewItem.isNull()) |
| 657 return; | 664 return; |
| 658 | 665 |
| (...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3699 } | 3706 } |
| 3700 | 3707 |
| 3701 if (scrollType != AnchoringScroll && scrollType != ClampingScroll) | 3708 if (scrollType != AnchoringScroll && scrollType != ClampingScroll) |
| 3702 clearScrollAnchor(); | 3709 clearScrollAnchor(); |
| 3703 } | 3710 } |
| 3704 | 3711 |
| 3705 void FrameView::didChangeScrollOffset() { | 3712 void FrameView::didChangeScrollOffset() { |
| 3706 frame().loader().client()->didChangeScrollOffset(); | 3713 frame().loader().client()->didChangeScrollOffset(); |
| 3707 if (frame().isMainFrame()) | 3714 if (frame().isMainFrame()) |
| 3708 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); | 3715 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); |
| 3716 |
| 3717 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 3718 // The scroll translation paint property depends on scroll offset. |
| 3719 setNeedsPaintPropertyUpdate(); |
| 3720 } |
| 3709 } | 3721 } |
| 3710 | 3722 |
| 3711 void FrameView::clearScrollAnchor() { | 3723 void FrameView::clearScrollAnchor() { |
| 3712 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 3724 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) |
| 3713 return; | 3725 return; |
| 3714 m_scrollAnchor.clear(); | 3726 m_scrollAnchor.clear(); |
| 3715 } | 3727 } |
| 3716 | 3728 |
| 3717 bool FrameView::hasOverlayScrollbars() const { | 3729 bool FrameView::hasOverlayScrollbars() const { |
| 3718 return (horizontalScrollbar() && | 3730 return (horizontalScrollbar() && |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4562 DCHECK(m_frame->isMainFrame()); | 4574 DCHECK(m_frame->isMainFrame()); |
| 4563 return m_initialViewportSize.width(); | 4575 return m_initialViewportSize.width(); |
| 4564 } | 4576 } |
| 4565 | 4577 |
| 4566 int FrameView::initialViewportHeight() const { | 4578 int FrameView::initialViewportHeight() const { |
| 4567 DCHECK(m_frame->isMainFrame()); | 4579 DCHECK(m_frame->isMainFrame()); |
| 4568 return m_initialViewportSize.height(); | 4580 return m_initialViewportSize.height(); |
| 4569 } | 4581 } |
| 4570 | 4582 |
| 4571 } // namespace blink | 4583 } // namespace blink |
| OLD | NEW |