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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 636 updateScrollbars(); | 636 updateScrollbars(); |
| 637 ScrollableArea::contentsResized(); | 637 ScrollableArea::contentsResized(); |
| 638 | 638 |
| 639 Page* page = frame().page(); | 639 Page* page = frame().page(); |
| 640 if (!page) | 640 if (!page) |
| 641 return; | 641 return; |
| 642 | 642 |
| 643 updateParentScrollableAreaSet(); | 643 updateParentScrollableAreaSet(); |
| 644 | 644 |
| 645 page->chromeClient().contentsSizeChanged(m_frame.get(), size); | 645 page->chromeClient().contentsSizeChanged(m_frame.get(), size); |
| 646 | |
| 647 // Ensure the scrollToFragmentAnchor is called before | |
| 648 // restoreScrollPositionAndViewState when reload | |
|
Charlie Reis
2016/12/05 18:54:15
nit: when reloading.
nit: End with period.
| |
| 649 scrollToFragmentAnchor(); | |
| 646 frame().loader().restoreScrollPositionAndViewState(); | 650 frame().loader().restoreScrollPositionAndViewState(); |
| 647 } | 651 } |
| 648 | 652 |
| 649 void FrameView::adjustViewSize() { | 653 void FrameView::adjustViewSize() { |
| 650 if (m_suppressAdjustViewSize) | 654 if (m_suppressAdjustViewSize) |
| 651 return; | 655 return; |
| 652 | 656 |
| 653 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 657 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 654 if (layoutViewItem.isNull()) | 658 if (layoutViewItem.isNull()) |
| 655 return; | 659 return; |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2372 | 2376 |
| 2373 // Plugins could have torn down the page inside updateWidgetGeometries(). | 2377 // Plugins could have torn down the page inside updateWidgetGeometries(). |
| 2374 if (layoutViewItem().isNull()) | 2378 if (layoutViewItem().isNull()) |
| 2375 return; | 2379 return; |
| 2376 | 2380 |
| 2377 scheduleUpdateWidgetsIfNecessary(); | 2381 scheduleUpdateWidgetsIfNecessary(); |
| 2378 | 2382 |
| 2379 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) | 2383 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) |
| 2380 scrollingCoordinator->notifyGeometryChanged(); | 2384 scrollingCoordinator->notifyGeometryChanged(); |
| 2381 | 2385 |
| 2382 scrollToFragmentAnchor(); | |
| 2383 sendResizeEventIfNeeded(); | 2386 sendResizeEventIfNeeded(); |
| 2384 } | 2387 } |
| 2385 | 2388 |
| 2386 bool FrameView::wasViewportResized() { | 2389 bool FrameView::wasViewportResized() { |
| 2387 ASSERT(m_frame); | 2390 ASSERT(m_frame); |
| 2388 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 2391 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 2389 if (layoutViewItem.isNull()) | 2392 if (layoutViewItem.isNull()) |
| 2390 return false; | 2393 return false; |
| 2391 ASSERT(layoutViewItem.style()); | 2394 ASSERT(layoutViewItem.style()); |
| 2392 return (layoutSize(IncludeScrollbars) != m_lastViewportSize || | 2395 return (layoutSize(IncludeScrollbars) != m_lastViewportSize || |
| (...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4651 DCHECK(m_frame->isMainFrame()); | 4654 DCHECK(m_frame->isMainFrame()); |
| 4652 return m_initialViewportSize.width(); | 4655 return m_initialViewportSize.width(); |
| 4653 } | 4656 } |
| 4654 | 4657 |
| 4655 int FrameView::initialViewportHeight() const { | 4658 int FrameView::initialViewportHeight() const { |
| 4656 DCHECK(m_frame->isMainFrame()); | 4659 DCHECK(m_frame->isMainFrame()); |
| 4657 return m_initialViewportSize.height(); | 4660 return m_initialViewportSize.height(); |
| 4658 } | 4661 } |
| 4659 | 4662 |
| 4660 } // namespace blink | 4663 } // namespace blink |
| OLD | NEW |