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

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

Issue 2454913003: MainFrame scrollbars should work with RFV instead of FV (Closed)
Patch Set: Add TODOs Created 4 years, 1 month 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (!scrollbar) 424 if (!scrollbar)
425 return; 425 return;
426 426
427 m_scrollableArea->willRemoveScrollbar(*scrollbar, orientation); 427 m_scrollableArea->willRemoveScrollbar(*scrollbar, orientation);
428 m_scrollableArea->layoutBox()->document().view()->removeChild( 428 m_scrollableArea->layoutBox()->document().view()->removeChild(
429 scrollbar.get()); 429 scrollbar.get());
430 scrollbar->disconnectFromScrollableArea(); 430 scrollbar->disconnectFromScrollableArea();
431 scrollbar = nullptr; 431 scrollbar = nullptr;
432 } 432 }
433 433
434 ScrollableArea* FrameView::ScrollbarManager::scrollableArea() const {
435 return m_scrollableArea.get();
436 }
437
438 void FrameView::ScrollbarManager::updateScrollbarGeometry(IntSize viewSize) {
439 if (!hasHorizontalScrollbar() && !hasVerticalScrollbar())
440 return;
441
442 bool scrollbarOnLeft = m_scrollableArea->shouldPlaceVerticalScrollbarOnLeft();
443
444 if (hasHorizontalScrollbar()) {
445 int thickness = m_hBar->scrollbarThickness();
446 IntRect oldRect(m_hBar->frameRect());
447 IntRect hBarRect(
448 (scrollbarOnLeft && hasVerticalScrollbar()) ? m_vBar->width() : 0,
449 viewSize.height() - thickness,
450 viewSize.width() - (hasVerticalScrollbar() ? m_vBar->width() : 0),
451 thickness);
452 m_hBar->setFrameRect(hBarRect);
453 if (oldRect != m_hBar->frameRect())
454 m_scrollableArea->setScrollbarNeedsPaintInvalidation(HorizontalScrollbar);
455
456 int visibleWidth = m_scrollableArea->visibleWidth();
457 int contentsWidth = m_scrollableArea->contentsSize().width();
458 m_hBar->setEnabled(contentsWidth > visibleWidth &&
459 !m_scrollableArea->scrollbarsHidden());
460 m_hBar->setProportion(visibleWidth, contentsWidth);
461 m_hBar->offsetDidChange();
462 }
463
464 if (hasVerticalScrollbar()) {
465 int thickness = m_vBar->scrollbarThickness();
466 IntRect oldRect(m_vBar->frameRect());
467 IntRect vBarRect(
468 scrollbarOnLeft ? 0 : (viewSize.width() - thickness), 0, thickness,
469 viewSize.height() - (hasHorizontalScrollbar() ? m_hBar->height() : 0));
470 m_vBar->setFrameRect(vBarRect);
471 if (oldRect != m_vBar->frameRect())
472 m_scrollableArea->setScrollbarNeedsPaintInvalidation(VerticalScrollbar);
473
474 int clientHeight = m_scrollableArea->visibleHeight();
475 int contentsHeight = m_scrollableArea->contentsSize().height();
476 m_vBar->setEnabled(contentsHeight > clientHeight &&
477 !m_scrollableArea->scrollbarsHidden());
478 m_vBar->setProportion(clientHeight, contentsHeight);
479 m_vBar->offsetDidChange();
480 }
481 }
482
434 void FrameView::recalculateCustomScrollbarStyle() { 483 void FrameView::recalculateCustomScrollbarStyle() {
435 bool didStyleChange = false; 484 bool didStyleChange = false;
436 if (horizontalScrollbar() && horizontalScrollbar()->isCustomScrollbar()) { 485 if (horizontalScrollbar() && horizontalScrollbar()->isCustomScrollbar()) {
437 horizontalScrollbar()->styleChanged(); 486 horizontalScrollbar()->styleChanged();
438 didStyleChange = true; 487 didStyleChange = true;
439 } 488 }
440 if (verticalScrollbar() && verticalScrollbar()->isCustomScrollbar()) { 489 if (verticalScrollbar() && verticalScrollbar()->isCustomScrollbar()) {
441 verticalScrollbar()->styleChanged(); 490 verticalScrollbar()->styleChanged();
442 didStyleChange = true; 491 didStyleChange = true;
443 } 492 }
444 if (didStyleChange) { 493 if (didStyleChange) {
445 updateScrollbarGeometry(); 494 m_scrollbarManager.updateScrollbarGeometry(size());
446 updateScrollCorner(); 495 updateScrollCorner();
447 positionScrollbarLayers(); 496 positionScrollbarLayers();
448 } 497 }
449 } 498 }
450 499
451 void FrameView::invalidateAllCustomScrollbarsOnActiveChanged() { 500 void FrameView::invalidateAllCustomScrollbarsOnActiveChanged() {
452 bool usesWindowInactiveSelector = 501 bool usesWindowInactiveSelector =
453 m_frame->document()->styleEngine().usesWindowInactiveSelector(); 502 m_frame->document()->styleEngine().usesWindowInactiveSelector();
454 503
455 const ChildrenWidgetSet* viewChildren = children(); 504 const ChildrenWidgetSet* viewChildren = children();
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 831
783 bool hasHorizontalScrollbar = horizontalScrollbar(); 832 bool hasHorizontalScrollbar = horizontalScrollbar();
784 bool hasVerticalScrollbar = verticalScrollbar(); 833 bool hasVerticalScrollbar = verticalScrollbar();
785 if (hasHorizontalScrollbar != shouldHaveHorizontalScrollbar || 834 if (hasHorizontalScrollbar != shouldHaveHorizontalScrollbar ||
786 hasVerticalScrollbar != shouldHaveVerticalScrollbar) { 835 hasVerticalScrollbar != shouldHaveVerticalScrollbar) {
787 setNeedsLayout(); 836 setNeedsLayout();
788 return; 837 return;
789 } 838 }
790 839
791 adjustViewSize(); 840 adjustViewSize();
792 updateScrollbarGeometry(); 841 m_scrollbarManager.updateScrollbarGeometry(size());
793 842
794 if (scrollOriginChanged()) 843 if (scrollOriginChanged())
795 setNeedsLayout(); 844 setNeedsLayout();
796 } 845 }
797 846
798 bool FrameView::usesCompositedScrolling() const { 847 bool FrameView::usesCompositedScrolling() const {
799 LayoutViewItem layoutView = this->layoutViewItem(); 848 LayoutViewItem layoutView = this->layoutViewItem();
800 if (layoutView.isNull()) 849 if (layoutView.isNull())
801 return false; 850 return false;
802 if (m_frame->settings() && 851 if (m_frame->settings() &&
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2398 2447
2399 return ScrollableArea::shouldUseIntegerScrollOffset(); 2448 return ScrollableArea::shouldUseIntegerScrollOffset();
2400 } 2449 }
2401 2450
2402 bool FrameView::isActive() const { 2451 bool FrameView::isActive() const {
2403 Page* page = frame().page(); 2452 Page* page = frame().page();
2404 return page && page->focusController().isActive(); 2453 return page && page->focusController().isActive();
2405 } 2454 }
2406 2455
2407 void FrameView::invalidatePaintForTickmarks() { 2456 void FrameView::invalidatePaintForTickmarks() {
2408 if (Scrollbar* scrollbar = verticalScrollbar()) 2457 if (Scrollbar* scrollbar = getScrollableArea()->verticalScrollbar())
2409 scrollbar->setNeedsPaintInvalidation( 2458 scrollbar->setNeedsPaintInvalidation(
2410 static_cast<ScrollbarPart>(~ThumbPart)); 2459 static_cast<ScrollbarPart>(~ThumbPart));
2411 } 2460 }
2412 2461
2462 void FrameView::setTickmarks(const Vector<IntRect>& tickmarks) {
2463 // Tickmarks for main frame are stored in RFV.
skobes 2016/11/09 23:18:25 Why do we need to store tickmarks in RFV? Tickmar
ymalik 2016/11/10 17:58:04 I had to do this to make a test pass with root lay
skobes 2016/11/10 18:41:28 Why can't RFV call getTickmarks() on the FV?
ymalik 2016/11/10 21:05:21 I believe RFV doesn't have access to FV. It relays
2464 if (m_frame->isMainFrame())
2465 m_viewportScrollableArea->setTickmarks(tickmarks);
2466 else
2467 m_tickmarks = tickmarks;
2468
2469 invalidatePaintForTickmarks();
2470 }
2471
2413 void FrameView::getTickmarks(Vector<IntRect>& tickmarks) const { 2472 void FrameView::getTickmarks(Vector<IntRect>& tickmarks) const {
2414 if (!m_tickmarks.isEmpty()) 2473 if (!m_tickmarks.isEmpty())
2415 tickmarks = m_tickmarks; 2474 tickmarks = m_tickmarks;
2416 else 2475 else
2417 tickmarks = frame().document()->markers().renderedRectsForMarkers( 2476 tickmarks = frame().document()->markers().renderedRectsForMarkers(
2418 DocumentMarker::TextMatch); 2477 DocumentMarker::TextMatch);
2419 } 2478 }
2420 2479
2421 void FrameView::setInputEventsTransformForEmulation(const IntSize& offset, 2480 void FrameView::setInputEventsTransformForEmulation(const IntSize& offset,
2422 float contentScaleFactor) { 2481 float contentScaleFactor) {
(...skipping 12 matching lines...) Expand all
2435 2494
2436 bool FrameView::scrollbarsCanBeActive() const { 2495 bool FrameView::scrollbarsCanBeActive() const {
2437 if (m_frame->view() != this) 2496 if (m_frame->view() != this)
2438 return false; 2497 return false;
2439 2498
2440 return !!m_frame->document(); 2499 return !!m_frame->document();
2441 } 2500 }
2442 2501
2443 void FrameView::scrollbarVisibilityChanged() { 2502 void FrameView::scrollbarVisibilityChanged() {
2444 // Scrollbar enabled state is set from updateScrollbarGeometry. 2503 // Scrollbar enabled state is set from updateScrollbarGeometry.
2445 updateScrollbarGeometry(); 2504 m_scrollbarManager.updateScrollbarGeometry(size());
2446 LayoutViewItem viewItem = layoutViewItem(); 2505 LayoutViewItem viewItem = layoutViewItem();
2447 if (!viewItem.isNull()) 2506 if (!viewItem.isNull())
2448 viewItem.clearHitTestCache(); 2507 viewItem.clearHitTestCache();
2449 } 2508 }
2450 2509
2451 IntRect FrameView::scrollableAreaBoundingBox() const { 2510 IntRect FrameView::scrollableAreaBoundingBox() const {
2452 LayoutPartItem ownerLayoutItem = frame().ownerLayoutItem(); 2511 LayoutPartItem ownerLayoutItem = frame().ownerLayoutItem();
2453 if (ownerLayoutItem.isNull()) 2512 if (ownerLayoutItem.isNull())
2454 return frameRect(); 2513 return frameRect();
2455 2514
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 2627
2569 if (m_frame->isMainFrame()) { 2628 if (m_frame->isMainFrame()) {
2570 ScrollableArea& visualViewport = frameHost->visualViewport(); 2629 ScrollableArea& visualViewport = frameHost->visualViewport();
2571 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); 2630 ScrollableArea* layoutViewport = layoutViewportScrollableArea();
2572 DCHECK(layoutViewport); 2631 DCHECK(layoutViewport);
2573 2632
2574 RootFrameViewport* rootFrameViewport = 2633 RootFrameViewport* rootFrameViewport =
2575 RootFrameViewport::create(visualViewport, *layoutViewport); 2634 RootFrameViewport::create(visualViewport, *layoutViewport);
2576 m_viewportScrollableArea = rootFrameViewport; 2635 m_viewportScrollableArea = rootFrameViewport;
2577 2636
2637 // TODO(crbug.com/661236): Currently for the main frame, the scroller that
2638 // the scrollbar manager works with is RootFrameViewport which is needed so
2639 // that the visual viewport is taken into account when determining scrollbar
2640 // extent and existence. Eventually, each scroller should have its own
2641 // scrollbar manager and we shouldn't set the scroller here.
2642 m_scrollbarManager.setScroller(rootFrameViewport);
2643
2578 frameHost->globalRootScrollerController().initializeViewportScrollCallback( 2644 frameHost->globalRootScrollerController().initializeViewportScrollCallback(
2579 *rootFrameViewport); 2645 *rootFrameViewport);
2580 } 2646 }
2581 } 2647 }
2582 2648
2583 void FrameView::updateScrollCorner() { 2649 void FrameView::updateScrollCorner() {
2584 RefPtr<ComputedStyle> cornerStyle; 2650 RefPtr<ComputedStyle> cornerStyle;
2585 IntRect cornerRect = scrollCornerRect(); 2651 IntRect cornerRect = scrollCornerRect();
2586 Document* doc = m_frame->document(); 2652 Document* doc = m_frame->document();
2587 2653
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3701 if (frame().isMainFrame()) 3767 if (frame().isMainFrame())
3702 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); 3768 frame().host()->chromeClient().mainFrameScrollOffsetChanged();
3703 } 3769 }
3704 3770
3705 void FrameView::clearScrollAnchor() { 3771 void FrameView::clearScrollAnchor() {
3706 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) 3772 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled())
3707 return; 3773 return;
3708 m_scrollAnchor.clear(); 3774 m_scrollAnchor.clear();
3709 } 3775 }
3710 3776
3711 bool FrameView::hasOverlayScrollbars() const {
3712 return (horizontalScrollbar() &&
3713 horizontalScrollbar()->isOverlayScrollbar()) ||
3714 (verticalScrollbar() && verticalScrollbar()->isOverlayScrollbar());
3715 }
3716
3717 void FrameView::computeScrollbarExistence( 3777 void FrameView::computeScrollbarExistence(
3718 bool& newHasHorizontalScrollbar, 3778 bool& newHasHorizontalScrollbar,
3719 bool& newHasVerticalScrollbar, 3779 bool& newHasVerticalScrollbar,
3720 const IntSize& docSize, 3780 const IntSize& docSize,
3721 ComputeScrollbarExistenceOption option) const { 3781 ComputeScrollbarExistenceOption option) const {
3722 if (m_frame->settings() && m_frame->settings()->hideScrollbars()) { 3782 if (m_frame->settings() && m_frame->settings()->hideScrollbars()) {
3723 newHasHorizontalScrollbar = false; 3783 newHasHorizontalScrollbar = false;
3724 newHasVerticalScrollbar = false; 3784 newHasVerticalScrollbar = false;
3725 return; 3785 return;
3726 } 3786 }
(...skipping 12 matching lines...) Expand all
3739 3799
3740 if (hScroll != ScrollbarAuto) 3800 if (hScroll != ScrollbarAuto)
3741 newHasHorizontalScrollbar = (hScroll == ScrollbarAlwaysOn); 3801 newHasHorizontalScrollbar = (hScroll == ScrollbarAlwaysOn);
3742 if (vScroll != ScrollbarAuto) 3802 if (vScroll != ScrollbarAuto)
3743 newHasVerticalScrollbar = (vScroll == ScrollbarAlwaysOn); 3803 newHasVerticalScrollbar = (vScroll == ScrollbarAlwaysOn);
3744 3804
3745 if (m_scrollbarsSuppressed || 3805 if (m_scrollbarsSuppressed ||
3746 (hScroll != ScrollbarAuto && vScroll != ScrollbarAuto)) 3806 (hScroll != ScrollbarAuto && vScroll != ScrollbarAuto))
3747 return; 3807 return;
3748 3808
3809 ScrollableArea* scroller = m_scrollbarManager.scrollableArea();
3749 if (hScroll == ScrollbarAuto) 3810 if (hScroll == ScrollbarAuto)
3750 newHasHorizontalScrollbar = docSize.width() > visibleWidth(); 3811 newHasHorizontalScrollbar = docSize.width() > scroller->visibleWidth();
3751 if (vScroll == ScrollbarAuto) 3812 if (vScroll == ScrollbarAuto)
3752 newHasVerticalScrollbar = docSize.height() > visibleHeight(); 3813 newHasVerticalScrollbar = docSize.height() > scroller->visibleHeight();
3753 3814
3754 if (hasOverlayScrollbars()) 3815 if (hasOverlayScrollbars())
3755 return; 3816 return;
3756 3817
3757 IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size(); 3818 IntSize fullVisibleSize =
3819 scroller->visibleContentRect(IncludeScrollbars).size();
3758 3820
3759 bool attemptToRemoveScrollbars = 3821 bool attemptToRemoveScrollbars =
3760 (option == FirstPass && docSize.width() <= fullVisibleSize.width() && 3822 (option == FirstPass && docSize.width() <= fullVisibleSize.width() &&
3761 docSize.height() <= fullVisibleSize.height()); 3823 docSize.height() <= fullVisibleSize.height());
3762 if (attemptToRemoveScrollbars) { 3824 if (attemptToRemoveScrollbars) {
3763 if (hScroll == ScrollbarAuto) 3825 if (hScroll == ScrollbarAuto)
3764 newHasHorizontalScrollbar = false; 3826 newHasHorizontalScrollbar = false;
3765 if (vScroll == ScrollbarAuto) 3827 if (vScroll == ScrollbarAuto)
3766 newHasVerticalScrollbar = false; 3828 newHasVerticalScrollbar = false;
3767 } 3829 }
3768 } 3830 }
3769 3831
3770 void FrameView::updateScrollbarGeometry() {
3771 if (horizontalScrollbar()) {
3772 int thickness = horizontalScrollbar()->scrollbarThickness();
3773 int clientWidth = visibleWidth();
3774 IntRect oldRect(horizontalScrollbar()->frameRect());
3775 IntRect hBarRect(
3776 (shouldPlaceVerticalScrollbarOnLeft() && verticalScrollbar())
3777 ? verticalScrollbar()->width()
3778 : 0,
3779 height() - thickness,
3780 width() - (verticalScrollbar() ? verticalScrollbar()->width() : 0),
3781 thickness);
3782 horizontalScrollbar()->setFrameRect(hBarRect);
3783 if (oldRect != horizontalScrollbar()->frameRect())
3784 setScrollbarNeedsPaintInvalidation(HorizontalScrollbar);
3785
3786 horizontalScrollbar()->setEnabled(contentsWidth() > clientWidth &&
3787 !scrollbarsHidden());
3788 horizontalScrollbar()->setProportion(clientWidth, contentsWidth());
3789 horizontalScrollbar()->offsetDidChange();
3790 }
3791
3792 if (verticalScrollbar()) {
3793 int thickness = verticalScrollbar()->scrollbarThickness();
3794 int clientHeight = visibleHeight();
3795 IntRect oldRect(verticalScrollbar()->frameRect());
3796 IntRect vBarRect(
3797 shouldPlaceVerticalScrollbarOnLeft() ? 0 : (width() - thickness), 0,
3798 thickness,
3799 height() -
3800 (horizontalScrollbar() ? horizontalScrollbar()->height() : 0));
3801 verticalScrollbar()->setFrameRect(vBarRect);
3802 if (oldRect != verticalScrollbar()->frameRect())
3803 setScrollbarNeedsPaintInvalidation(VerticalScrollbar);
3804
3805 verticalScrollbar()->setEnabled(contentsHeight() > clientHeight &&
3806 !scrollbarsHidden());
3807 verticalScrollbar()->setProportion(clientHeight, contentsHeight());
3808 verticalScrollbar()->offsetDidChange();
3809 }
3810 }
3811
3812 bool FrameView::adjustScrollbarExistence( 3832 bool FrameView::adjustScrollbarExistence(
3813 ComputeScrollbarExistenceOption option) { 3833 ComputeScrollbarExistenceOption option) {
3814 ASSERT(m_inUpdateScrollbars); 3834 ASSERT(m_inUpdateScrollbars);
3815 3835
3816 // If we came in here with the view already needing a layout, then go ahead 3836 // If we came in here with the view already needing a layout, then go ahead
3817 // and do that first. (This will be the common case, e.g., when the page 3837 // and do that first. (This will be the common case, e.g., when the page
3818 // changes due to window resizing for example). This layout will not re-enter 3838 // changes due to window resizing for example). This layout will not re-enter
3819 // updateScrollbars and does not count towards our max layout pass total. 3839 // updateScrollbars and does not count towards our max layout pass total.
3820 if (!m_scrollbarsSuppressed) 3840 if (!m_scrollbarsSuppressed)
3821 scrollbarExistenceDidChange(); 3841 scrollbarExistenceDidChange();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
3900 int maxUpdateScrollbarsPass = 3920 int maxUpdateScrollbarsPass =
3901 hasOverlayScrollbars() || m_scrollbarsSuppressed ? 1 : 3; 3921 hasOverlayScrollbars() || m_scrollbarsSuppressed ? 1 : 3;
3902 for (int updateScrollbarsPass = 0; 3922 for (int updateScrollbarsPass = 0;
3903 updateScrollbarsPass < maxUpdateScrollbarsPass; updateScrollbarsPass++) { 3923 updateScrollbarsPass < maxUpdateScrollbarsPass; updateScrollbarsPass++) {
3904 if (!adjustScrollbarExistence(updateScrollbarsPass ? Incremental 3924 if (!adjustScrollbarExistence(updateScrollbarsPass ? Incremental
3905 : FirstPass)) 3925 : FirstPass))
3906 break; 3926 break;
3907 scrollbarExistenceChanged = true; 3927 scrollbarExistenceChanged = true;
3908 } 3928 }
3909 3929
3910 updateScrollbarGeometry(); 3930 m_scrollbarManager.updateScrollbarGeometry(size());
3911 3931
3912 if (scrollbarExistenceChanged) { 3932 if (scrollbarExistenceChanged) {
3913 // FIXME: Is frameRectsChanged really necessary here? Have any frame rects 3933 // FIXME: Is frameRectsChanged really necessary here? Have any frame rects
3914 // changed? 3934 // changed?
3915 frameRectsChanged(); 3935 frameRectsChanged();
3916 positionScrollbarLayers(); 3936 positionScrollbarLayers();
3917 updateScrollCorner(); 3937 updateScrollCorner();
3918 } 3938 }
3919 3939
3920 adjustScrollOffsetFromUpdateScrollbars(); 3940 adjustScrollOffsetFromUpdateScrollbars();
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
4537 DCHECK(m_frame->isMainFrame()); 4557 DCHECK(m_frame->isMainFrame());
4538 return m_initialViewportSize.width(); 4558 return m_initialViewportSize.width();
4539 } 4559 }
4540 4560
4541 int FrameView::initialViewportHeight() const { 4561 int FrameView::initialViewportHeight() const {
4542 DCHECK(m_frame->isMainFrame()); 4562 DCHECK(m_frame->isMainFrame());
4543 return m_initialViewportSize.height(); 4563 return m_initialViewportSize.height();
4544 } 4564 }
4545 4565
4546 } // namespace blink 4566 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698