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 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 if (parentRect.isEmpty()) | 1398 if (parentRect.isEmpty()) |
1399 return IntRect(); | 1399 return IntRect(); |
1400 | 1400 |
1401 us.intersect(parentRect); | 1401 us.intersect(parentRect); |
1402 } | 1402 } |
1403 | 1403 |
1404 return us; | 1404 return us; |
1405 } | 1405 } |
1406 | 1406 |
1407 FloatSize FrameView::viewportSizeForViewportUnits() const { | 1407 FloatSize FrameView::viewportSizeForViewportUnits() const { |
1408 float zoom = frame().pageZoomFactor(); | 1408 float zoom = 1; |
| 1409 if (!m_frame->document() || !m_frame->document()->printing()) |
| 1410 zoom = frame().pageZoomFactor(); |
1409 | 1411 |
1410 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 1412 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
1411 if (layoutViewItem.isNull()) | 1413 if (layoutViewItem.isNull()) |
1412 return FloatSize(); | 1414 return FloatSize(); |
1413 | 1415 |
1414 FloatSize layoutSize; | 1416 FloatSize layoutSize; |
1415 layoutSize.setWidth(layoutViewItem.viewWidth(IncludeScrollbars) / zoom); | 1417 layoutSize.setWidth(layoutViewItem.viewWidth(IncludeScrollbars) / zoom); |
1416 layoutSize.setHeight(layoutViewItem.viewHeight(IncludeScrollbars) / zoom); | 1418 layoutSize.setHeight(layoutViewItem.viewHeight(IncludeScrollbars) / zoom); |
1417 | 1419 |
1418 BrowserControls& browserControls = m_frame->page()->browserControls(); | 1420 BrowserControls& browserControls = m_frame->page()->browserControls(); |
(...skipping 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5253 void FrameView::setAnimationHost( | 5255 void FrameView::setAnimationHost( |
5254 std::unique_ptr<CompositorAnimationHost> host) { | 5256 std::unique_ptr<CompositorAnimationHost> host) { |
5255 m_animationHost = std::move(host); | 5257 m_animationHost = std::move(host); |
5256 } | 5258 } |
5257 | 5259 |
5258 LayoutUnit FrameView::caretWidth() const { | 5260 LayoutUnit FrameView::caretWidth() const { |
5259 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5261 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
5260 } | 5262 } |
5261 | 5263 |
5262 } // namespace blink | 5264 } // namespace blink |
OLD | NEW |