| 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. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #include "core/dom/Document.h" | 24 #include "core/dom/Document.h" |
| 25 #include "core/dom/Element.h" | 25 #include "core/dom/Element.h" |
| 26 #include "core/editing/FrameSelection.h" | 26 #include "core/editing/FrameSelection.h" |
| 27 #include "core/frame/FrameView.h" | 27 #include "core/frame/FrameView.h" |
| 28 #include "core/frame/LocalFrame.h" | 28 #include "core/frame/LocalFrame.h" |
| 29 #include "core/frame/Settings.h" | 29 #include "core/frame/Settings.h" |
| 30 #include "core/html/HTMLIFrameElement.h" | 30 #include "core/html/HTMLIFrameElement.h" |
| 31 #include "core/layout/HitTestResult.h" | 31 #include "core/layout/HitTestResult.h" |
| 32 #include "core/layout/LayoutGeometryMap.h" | 32 #include "core/layout/LayoutGeometryMap.h" |
| 33 #include "core/layout/LayoutMedia.h" | |
| 34 #include "core/layout/LayoutPart.h" | 33 #include "core/layout/LayoutPart.h" |
| 35 #include "core/layout/ViewFragmentationContext.h" | 34 #include "core/layout/ViewFragmentationContext.h" |
| 36 #include "core/layout/api/LayoutAPIShim.h" | 35 #include "core/layout/api/LayoutAPIShim.h" |
| 37 #include "core/layout/api/LayoutPartItem.h" | 36 #include "core/layout/api/LayoutPartItem.h" |
| 38 #include "core/layout/api/LayoutViewItem.h" | 37 #include "core/layout/api/LayoutViewItem.h" |
| 39 #include "core/layout/compositing/PaintLayerCompositor.h" | 38 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 40 #include "core/page/Page.h" | 39 #include "core/page/Page.h" |
| 41 #include "core/paint/PaintLayer.h" | 40 #include "core/paint/PaintLayer.h" |
| 42 #include "core/paint/ViewPainter.h" | 41 #include "core/paint/ViewPainter.h" |
| 43 #include "core/svg/SVGDocumentExtensions.h" | 42 #include "core/svg/SVGDocumentExtensions.h" |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 | 981 |
| 983 void LayoutView::willBeDestroyed() { | 982 void LayoutView::willBeDestroyed() { |
| 984 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. | 983 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. |
| 985 // Should find and fix the root cause. | 984 // Should find and fix the root cause. |
| 986 if (PaintLayer* layer = this->layer()) | 985 if (PaintLayer* layer = this->layer()) |
| 987 layer->setNeedsRepaint(); | 986 layer->setNeedsRepaint(); |
| 988 LayoutBlockFlow::willBeDestroyed(); | 987 LayoutBlockFlow::willBeDestroyed(); |
| 989 m_compositor.reset(); | 988 m_compositor.reset(); |
| 990 } | 989 } |
| 991 | 990 |
| 992 void LayoutView::registerMediaForPositionChangeNotification( | |
| 993 LayoutMedia& media) { | |
| 994 if (!m_mediaForPositionNotification.contains(&media)) | |
| 995 m_mediaForPositionNotification.append(&media); | |
| 996 } | |
| 997 | |
| 998 void LayoutView::unregisterMediaForPositionChangeNotification( | |
| 999 LayoutMedia& media) { | |
| 1000 size_t at = m_mediaForPositionNotification.find(&media); | |
| 1001 if (at != kNotFound) | |
| 1002 m_mediaForPositionNotification.remove(at); | |
| 1003 } | |
| 1004 | |
| 1005 void LayoutView::sendMediaPositionChangeNotifications( | |
| 1006 const IntRect& visibleRect) { | |
| 1007 for (auto& media : m_mediaForPositionNotification) { | |
| 1008 media->notifyPositionMayHaveChanged(visibleRect); | |
| 1009 } | |
| 1010 } | |
| 1011 | |
| 1012 void LayoutView::updateFromStyle() { | 991 void LayoutView::updateFromStyle() { |
| 1013 LayoutBlockFlow::updateFromStyle(); | 992 LayoutBlockFlow::updateFromStyle(); |
| 1014 | 993 |
| 1015 // LayoutView of the main frame is responsible for painting base background. | 994 // LayoutView of the main frame is responsible for painting base background. |
| 1016 if (document().isInMainFrame()) | 995 if (document().isInMainFrame()) |
| 1017 setHasBoxDecorationBackground(true); | 996 setHasBoxDecorationBackground(true); |
| 1018 } | 997 } |
| 1019 | 998 |
| 1020 bool LayoutView::allowsOverflowClip() const { | 999 bool LayoutView::allowsOverflowClip() const { |
| 1021 return RuntimeEnabledFeatures::rootLayerScrollingEnabled(); | 1000 return RuntimeEnabledFeatures::rootLayerScrollingEnabled(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1041 if (block) | 1020 if (block) |
| 1042 block->adjustChildDebugRect(rect); | 1021 block->adjustChildDebugRect(rect); |
| 1043 | 1022 |
| 1044 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); | 1023 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); |
| 1045 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); | 1024 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); |
| 1046 | 1025 |
| 1047 return rect; | 1026 return rect; |
| 1048 } | 1027 } |
| 1049 | 1028 |
| 1050 } // namespace blink | 1029 } // namespace blink |
| OLD | NEW |