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

Side by Side Diff: Source/core/paint/ViewPainter.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/ViewPainter.h" 6 #include "core/paint/ViewPainter.h"
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/LayoutBox.h" 9 #include "core/layout/LayoutBox.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo) 62 void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo)
63 { 63 {
64 if (m_layoutView.document().ownerElement() || !m_layoutView.view()) 64 if (m_layoutView.document().ownerElement() || !m_layoutView.view())
65 return; 65 return;
66 66
67 if (paintInfo.skipRootBackground()) 67 if (paintInfo.skipRootBackground())
68 return; 68 return;
69 69
70 bool shouldPaintBackground = true; 70 bool shouldPaintBackground = true;
71 Node* documentElement = m_layoutView.document().documentElement(); 71 Node* documentElement = m_layoutView.document().documentElement();
72 if (LayoutBox* rootBox = documentElement ? toLayoutBox(documentElement->rend erer()) : 0) 72 if (LayoutBox* rootBox = documentElement ? toLayoutBox(documentElement->layo utObject()) : 0)
73 shouldPaintBackground = !rootFillsViewportBackground(rootBox) || !render erObscuresBackground(rootBox); 73 shouldPaintBackground = !rootFillsViewportBackground(rootBox) || !render erObscuresBackground(rootBox);
74 74
75 // If painting will entirely fill the view, no need to fill the background. 75 // If painting will entirely fill the view, no need to fill the background.
76 if (!shouldPaintBackground) 76 if (!shouldPaintBackground)
77 return; 77 return;
78 78
79 // This code typically only executes if the root element's visibility has be en set to hidden, 79 // This code typically only executes if the root element's visibility has be en set to hidden,
80 // if there is a transform on the <html>, or if there is a page scale factor less than 1. 80 // if there is a transform on the <html>, or if there is a page scale factor less than 1.
81 // Only fill with the base background color (typically white) if we're the r oot document, 81 // Only fill with the base background color (typically white) if we're the r oot document,
82 // since iframes/frames with no background in the child document should show the parent's background. 82 // since iframes/frames with no background in the child document should show the parent's background.
(...skipping 21 matching lines...) Expand all
104 { 104 {
105 ASSERT(rootBox); 105 ASSERT(rootBox);
106 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers ) 106 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers )
107 if (!rootBox->isSVG()) 107 if (!rootBox->isSVG())
108 return true; 108 return true;
109 109
110 return rootBox->frameRect().contains(m_layoutView.frameRect()); 110 return rootBox->frameRect().contains(m_layoutView.frameRect());
111 } 111 }
112 112
113 } // namespace blink 113 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ViewDisplayListTest.cpp ('k') | Source/core/plugins/PluginOcclusionSupport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698