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

Side by Side Diff: third_party/WebKit/Source/core/paint/BlockPainter.cpp

Issue 2286843002: Rename DisplayItem::Type enum constants to Chromium style. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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
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 "core/paint/BlockPainter.h" 5 #include "core/paint/BlockPainter.h"
6 6
7 #include "core/editing/DragCaretController.h" 7 #include "core/editing/DragCaretController.h"
8 #include "core/editing/FrameSelection.h" 8 #include "core/editing/FrameSelection.h"
9 #include "core/layout/LayoutFlexibleBox.h" 9 #include "core/layout/LayoutFlexibleBox.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void BlockPainter::paintOverflowControlsIfNeeded(const PaintInfo& paintInfo, con st LayoutPoint& paintOffset) 71 void BlockPainter::paintOverflowControlsIfNeeded(const PaintInfo& paintInfo, con st LayoutPoint& paintOffset)
72 { 72 {
73 if (m_layoutBlock.hasOverflowClip() 73 if (m_layoutBlock.hasOverflowClip()
74 && m_layoutBlock.style()->visibility() == EVisibility::Visible 74 && m_layoutBlock.style()->visibility() == EVisibility::Visible
75 && shouldPaintSelfBlockBackground(paintInfo.phase) 75 && shouldPaintSelfBlockBackground(paintInfo.phase)
76 && !paintInfo.paintRootBackgroundOnly()) { 76 && !paintInfo.paintRootBackgroundOnly()) {
77 Optional<ClipRecorder> clipRecorder; 77 Optional<ClipRecorder> clipRecorder;
78 if (!m_layoutBlock.layer()->isSelfPaintingLayer()) { 78 if (!m_layoutBlock.layer()->isSelfPaintingLayer()) {
79 LayoutRect clipRect = m_layoutBlock.borderBoxRect(); 79 LayoutRect clipRect = m_layoutBlock.borderBoxRect();
80 clipRect.moveBy(paintOffset); 80 clipRect.moveBy(paintOffset);
81 clipRecorder.emplace(paintInfo.context, m_layoutBlock, DisplayItem:: ClipScrollbarsToBoxBounds, pixelSnappedIntRect(clipRect)); 81 clipRecorder.emplace(paintInfo.context, m_layoutBlock, DisplayItem:: kClipScrollbarsToBoxBounds, pixelSnappedIntRect(clipRect));
82 } 82 }
83 ScrollableAreaPainter(*m_layoutBlock.layer()->getScrollableArea()).paint OverflowControls(paintInfo.context, roundedIntPoint(paintOffset), paintInfo.cull Rect(), false /* paintingOverlayControls */); 83 ScrollableAreaPainter(*m_layoutBlock.layer()->getScrollableArea()).paint OverflowControls(paintInfo.context, roundedIntPoint(paintOffset), paintInfo.cull Rect(), false /* paintingOverlayControls */);
84 } 84 }
85 } 85 }
86 86
87 void BlockPainter::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) 87 void BlockPainter::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
88 { 88 {
89 for (LayoutBox* child = m_layoutBlock.firstChildBox(); child; child = child- >nextSiblingBox()) 89 for (LayoutBox* child = m_layoutBlock.firstChildBox(); child; child = child- >nextSiblingBox())
90 paintChild(*child, paintInfo, paintOffset); 90 paintChild(*child, paintInfo, paintOffset);
91 } 91 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 void BlockPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) 243 void BlockPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
244 { 244 {
245 DCHECK(!m_layoutBlock.childrenInline()); 245 DCHECK(!m_layoutBlock.childrenInline());
246 PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); 246 PaintInfo paintInfoForDescendants = paintInfo.forDescendants();
247 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); 247 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset);
248 } 248 }
249 249
250 } // namespace blink 250 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/PrintContextTest.cpp ('k') | third_party/WebKit/Source/core/paint/BoxClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698