| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 m_verticalScrollbarMode(ScrollbarAuto), | 177 m_verticalScrollbarMode(ScrollbarAuto), |
| 178 m_horizontalScrollbarLock(false), | 178 m_horizontalScrollbarLock(false), |
| 179 m_verticalScrollbarLock(false), | 179 m_verticalScrollbarLock(false), |
| 180 m_scrollbarsSuppressed(false), | 180 m_scrollbarsSuppressed(false), |
| 181 m_inUpdateScrollbars(false), | 181 m_inUpdateScrollbars(false), |
| 182 m_frameTimingRequestsDirty(true), | 182 m_frameTimingRequestsDirty(true), |
| 183 m_viewportIntersectionValid(false), | 183 m_viewportIntersectionValid(false), |
| 184 m_hiddenForThrottling(false), | 184 m_hiddenForThrottling(false), |
| 185 m_crossOriginForThrottling(false), | 185 m_crossOriginForThrottling(false), |
| 186 m_subtreeThrottled(false), | 186 m_subtreeThrottled(false), |
| 187 m_needsPaintPropertyUpdate(true), |
| 187 m_currentUpdateLifecyclePhasesTargetState( | 188 m_currentUpdateLifecyclePhasesTargetState( |
| 188 DocumentLifecycle::Uninitialized), | 189 DocumentLifecycle::Uninitialized), |
| 189 m_scrollAnchor(this), | 190 m_scrollAnchor(this), |
| 190 m_scrollbarManager(*this), | 191 m_scrollbarManager(*this), |
| 191 m_needsScrollbarsUpdate(false), | 192 m_needsScrollbarsUpdate(false), |
| 192 m_suppressAdjustViewSize(false), | 193 m_suppressAdjustViewSize(false), |
| 193 m_allowsLayoutInvalidationAfterLayoutClean(true) { | 194 m_allowsLayoutInvalidationAfterLayoutClean(true) { |
| 194 ASSERT(m_frame); | 195 ASSERT(m_frame); |
| 195 init(); | 196 init(); |
| 196 } | 197 } |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 ScrollableArea::contentsResized(); | 600 ScrollableArea::contentsResized(); |
| 600 | 601 |
| 601 Page* page = frame().page(); | 602 Page* page = frame().page(); |
| 602 if (!page) | 603 if (!page) |
| 603 return; | 604 return; |
| 604 | 605 |
| 605 updateScrollableAreaSet(); | 606 updateScrollableAreaSet(); |
| 606 | 607 |
| 607 page->chromeClient().contentsSizeChanged(m_frame.get(), size); | 608 page->chromeClient().contentsSizeChanged(m_frame.get(), size); |
| 608 frame().loader().restoreScrollPositionAndViewState(); | 609 frame().loader().restoreScrollPositionAndViewState(); |
| 610 |
| 611 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 612 // The presence of overflow depends on the contents size. The scroll |
| 613 // properties can change depending on whether overflow scrolling occurs. |
| 614 setNeedsPaintPropertyUpdate(); |
| 615 } |
| 609 } | 616 } |
| 610 | 617 |
| 611 void FrameView::adjustViewSize() { | 618 void FrameView::adjustViewSize() { |
| 612 if (m_suppressAdjustViewSize) | 619 if (m_suppressAdjustViewSize) |
| 613 return; | 620 return; |
| 614 | 621 |
| 615 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 622 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 616 if (layoutViewItem.isNull()) | 623 if (layoutViewItem.isNull()) |
| 617 return; | 624 return; |
| 618 | 625 |
| (...skipping 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3631 } | 3638 } |
| 3632 | 3639 |
| 3633 if (scrollType != AnchoringScroll) | 3640 if (scrollType != AnchoringScroll) |
| 3634 clearScrollAnchor(); | 3641 clearScrollAnchor(); |
| 3635 } | 3642 } |
| 3636 | 3643 |
| 3637 void FrameView::didChangeScrollOffset() { | 3644 void FrameView::didChangeScrollOffset() { |
| 3638 frame().loader().client()->didChangeScrollOffset(); | 3645 frame().loader().client()->didChangeScrollOffset(); |
| 3639 if (frame().isMainFrame()) | 3646 if (frame().isMainFrame()) |
| 3640 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); | 3647 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); |
| 3648 |
| 3649 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 3650 // The scroll translation paint property depends on scroll offset. |
| 3651 setNeedsPaintPropertyUpdate(); |
| 3652 } |
| 3641 } | 3653 } |
| 3642 | 3654 |
| 3643 void FrameView::clearScrollAnchor() { | 3655 void FrameView::clearScrollAnchor() { |
| 3644 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 3656 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) |
| 3645 return; | 3657 return; |
| 3646 m_scrollAnchor.clear(); | 3658 m_scrollAnchor.clear(); |
| 3647 } | 3659 } |
| 3648 | 3660 |
| 3649 bool FrameView::hasOverlayScrollbars() const { | 3661 bool FrameView::hasOverlayScrollbars() const { |
| 3650 return (horizontalScrollbar() && | 3662 return (horizontalScrollbar() && |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4530 DCHECK(m_frame->isMainFrame()); | 4542 DCHECK(m_frame->isMainFrame()); |
| 4531 return m_initialViewportSize.width(); | 4543 return m_initialViewportSize.width(); |
| 4532 } | 4544 } |
| 4533 | 4545 |
| 4534 int FrameView::initialViewportHeight() const { | 4546 int FrameView::initialViewportHeight() const { |
| 4535 DCHECK(m_frame->isMainFrame()); | 4547 DCHECK(m_frame->isMainFrame()); |
| 4536 return m_initialViewportSize.height(); | 4548 return m_initialViewportSize.height(); |
| 4537 } | 4549 } |
| 4538 | 4550 |
| 4539 } // namespace blink | 4551 } // namespace blink |
| OLD | NEW |