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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 if (layoutView.usesCompositing()) | 426 if (layoutView.usesCompositing()) |
427 layoutView.compositor()->frameViewDidChangeSize(); | 427 layoutView.compositor()->frameViewDidChangeSize(); |
428 } | 428 } |
429 | 429 |
430 if (frameSizeChanged) { | 430 if (frameSizeChanged) { |
431 viewportSizeChanged(newRect.width() != oldRect.width(), | 431 viewportSizeChanged(newRect.width() != oldRect.width(), |
432 newRect.height() != oldRect.height()); | 432 newRect.height() != oldRect.height()); |
433 | 433 |
434 if (m_frame->isMainFrame()) | 434 if (m_frame->isMainFrame()) |
435 m_frame->host()->visualViewport().mainFrameDidChangeSize(); | 435 m_frame->host()->visualViewport().mainFrameDidChangeSize(); |
| 436 |
436 frame().loader().restoreScrollPositionAndViewState(); | 437 frame().loader().restoreScrollPositionAndViewState(); |
437 } | 438 } |
438 } | 439 } |
439 | 440 |
440 Page* FrameView::page() const { | 441 Page* FrameView::page() const { |
441 return frame().page(); | 442 return frame().page(); |
442 } | 443 } |
443 | 444 |
444 LayoutView* FrameView::layoutView() const { | 445 LayoutView* FrameView::layoutView() const { |
445 return frame().contentLayoutObject(); | 446 return frame().contentLayoutObject(); |
(...skipping 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4478 return false; | 4479 return false; |
4479 return m_subtreeThrottled || | 4480 return m_subtreeThrottled || |
4480 (m_hiddenForThrottling && m_crossOriginForThrottling); | 4481 (m_hiddenForThrottling && m_crossOriginForThrottling); |
4481 } | 4482 } |
4482 | 4483 |
4483 void FrameView::setInitialViewportSize(const IntSize& viewportSize) { | 4484 void FrameView::setInitialViewportSize(const IntSize& viewportSize) { |
4484 if (viewportSize == m_initialViewportSize) | 4485 if (viewportSize == m_initialViewportSize) |
4485 return; | 4486 return; |
4486 | 4487 |
4487 m_initialViewportSize = viewportSize; | 4488 m_initialViewportSize = viewportSize; |
4488 // TODO(rune@opera.com): Notify the viewport style resolver about the changed | 4489 if (Document* document = m_frame->document()) |
4489 // initial viewport: | 4490 document->styleEngine().initialViewportChanged(); |
4490 // | |
4491 // if (Document* document = m_frame->document()) | |
4492 // document->styleEngine().initialViewportChanged(); | |
4493 } | 4491 } |
4494 | 4492 |
4495 int FrameView::initialViewportWidth() const { | 4493 int FrameView::initialViewportWidth() const { |
4496 DCHECK(m_frame->isMainFrame()); | 4494 DCHECK(m_frame->isMainFrame()); |
4497 return m_initialViewportSize.width(); | 4495 return m_initialViewportSize.width(); |
4498 } | 4496 } |
4499 | 4497 |
4500 int FrameView::initialViewportHeight() const { | 4498 int FrameView::initialViewportHeight() const { |
4501 DCHECK(m_frame->isMainFrame()); | 4499 DCHECK(m_frame->isMainFrame()); |
4502 return m_initialViewportSize.height(); | 4500 return m_initialViewportSize.height(); |
4503 } | 4501 } |
4504 | 4502 |
4505 } // namespace blink | 4503 } // namespace blink |
OLD | NEW |