Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2510353004: Deprecating AutoplayExperimentHelper (Closed)
Patch Set: cleaned up the layout code no longer used Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 978
980 void LayoutView::willBeDestroyed() { 979 void LayoutView::willBeDestroyed() {
981 // TODO(wangxianzhu): This is a workaround of crbug.com/570706. 980 // TODO(wangxianzhu): This is a workaround of crbug.com/570706.
982 // Should find and fix the root cause. 981 // Should find and fix the root cause.
983 if (PaintLayer* layer = this->layer()) 982 if (PaintLayer* layer = this->layer())
984 layer->setNeedsRepaint(); 983 layer->setNeedsRepaint();
985 LayoutBlockFlow::willBeDestroyed(); 984 LayoutBlockFlow::willBeDestroyed();
986 m_compositor.reset(); 985 m_compositor.reset();
987 } 986 }
988 987
989 void LayoutView::registerMediaForPositionChangeNotification(
990 LayoutMedia& media) {
991 if (!m_mediaForPositionNotification.contains(&media))
992 m_mediaForPositionNotification.append(&media);
993 }
994
995 void LayoutView::unregisterMediaForPositionChangeNotification(
996 LayoutMedia& media) {
997 size_t at = m_mediaForPositionNotification.find(&media);
998 if (at != kNotFound)
999 m_mediaForPositionNotification.remove(at);
1000 }
1001
1002 void LayoutView::sendMediaPositionChangeNotifications(
1003 const IntRect& visibleRect) {
1004 for (auto& media : m_mediaForPositionNotification) {
1005 media->notifyPositionMayHaveChanged(visibleRect);
1006 }
1007 }
1008
1009 void LayoutView::updateFromStyle() { 988 void LayoutView::updateFromStyle() {
1010 LayoutBlockFlow::updateFromStyle(); 989 LayoutBlockFlow::updateFromStyle();
1011 990
1012 // LayoutView of the main frame is responsible for painting base background. 991 // LayoutView of the main frame is responsible for painting base background.
1013 if (document().isInMainFrame()) 992 if (document().isInMainFrame())
1014 setHasBoxDecorationBackground(true); 993 setHasBoxDecorationBackground(true);
1015 } 994 }
1016 995
1017 bool LayoutView::allowsOverflowClip() const { 996 bool LayoutView::allowsOverflowClip() const {
1018 return RuntimeEnabledFeatures::rootLayerScrollingEnabled(); 997 return RuntimeEnabledFeatures::rootLayerScrollingEnabled();
(...skipping 19 matching lines...) Expand all
1038 if (block) 1017 if (block)
1039 block->adjustChildDebugRect(rect); 1018 block->adjustChildDebugRect(rect);
1040 1019
1041 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); 1020 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars)));
1042 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); 1021 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars)));
1043 1022
1044 return rect; 1023 return rect;
1045 } 1024 }
1046 1025
1047 } // namespace blink 1026 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698