| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 | 955 |
| 956 bool LayoutView::backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const | 956 bool LayoutView::backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const |
| 957 { | 957 { |
| 958 // FIXME: Remove this main frame check. Same concept applies to subframes to
o. | 958 // FIXME: Remove this main frame check. Same concept applies to subframes to
o. |
| 959 if (!frame()->isMainFrame()) | 959 if (!frame()->isMainFrame()) |
| 960 return false; | 960 return false; |
| 961 | 961 |
| 962 return m_frameView->hasOpaqueBackground(); | 962 return m_frameView->hasOpaqueBackground(); |
| 963 } | 963 } |
| 964 | 964 |
| 965 FloatSize LayoutView::viewportSizeForViewportUnits() const | 965 double LayoutView::layoutViewportWidth() const |
| 966 { | 966 { |
| 967 return frameView() ? frameView()->viewportSizeForViewportUnits() : FloatSize
(); | 967 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 968 return viewWidth(IncludeScrollbars) / scale; |
| 969 } |
| 970 |
| 971 double LayoutView::layoutViewportHeight() const |
| 972 { |
| 973 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 974 return viewHeight(IncludeScrollbars) / scale; |
| 968 } | 975 } |
| 969 | 976 |
| 970 void LayoutView::willBeDestroyed() | 977 void LayoutView::willBeDestroyed() |
| 971 { | 978 { |
| 972 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. | 979 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. |
| 973 // Should find and fix the root cause. | 980 // Should find and fix the root cause. |
| 974 if (PaintLayer* layer = this->layer()) | 981 if (PaintLayer* layer = this->layer()) |
| 975 layer->setNeedsRepaint(); | 982 layer->setNeedsRepaint(); |
| 976 LayoutBlockFlow::willBeDestroyed(); | 983 LayoutBlockFlow::willBeDestroyed(); |
| 977 m_compositor.clear(); | 984 m_compositor.clear(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 991 } | 998 } |
| 992 | 999 |
| 993 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) | 1000 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) |
| 994 { | 1001 { |
| 995 for (auto& media : m_mediaForPositionNotification) { | 1002 for (auto& media : m_mediaForPositionNotification) { |
| 996 media->notifyPositionMayHaveChanged(visibleRect); | 1003 media->notifyPositionMayHaveChanged(visibleRect); |
| 997 } | 1004 } |
| 998 } | 1005 } |
| 999 | 1006 |
| 1000 } // namespace blink | 1007 } // namespace blink |
| OLD | NEW |