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 double LayoutView::layoutViewportWidth() const | 965 FloatSize LayoutView::viewportSizeForViewportUnits() const |
966 { | 966 { |
967 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 967 return frameView() ? frameView()->viewportSizeForViewportUnits() : FloatSize
(); |
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; | |
975 } | 968 } |
976 | 969 |
977 void LayoutView::willBeDestroyed() | 970 void LayoutView::willBeDestroyed() |
978 { | 971 { |
979 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. | 972 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. |
980 // Should find and fix the root cause. | 973 // Should find and fix the root cause. |
981 if (PaintLayer* layer = this->layer()) | 974 if (PaintLayer* layer = this->layer()) |
982 layer->setNeedsRepaint(); | 975 layer->setNeedsRepaint(); |
983 LayoutBlockFlow::willBeDestroyed(); | 976 LayoutBlockFlow::willBeDestroyed(); |
984 m_compositor.clear(); | 977 m_compositor.clear(); |
(...skipping 13 matching lines...) Expand all Loading... |
998 } | 991 } |
999 | 992 |
1000 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) | 993 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) |
1001 { | 994 { |
1002 for (auto& media : m_mediaForPositionNotification) { | 995 for (auto& media : m_mediaForPositionNotification) { |
1003 media->notifyPositionMayHaveChanged(visibleRect); | 996 media->notifyPositionMayHaveChanged(visibleRect); |
1004 } | 997 } |
1005 } | 998 } |
1006 | 999 |
1007 } // namespace blink | 1000 } // namespace blink |
OLD | NEW |