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

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxPainter.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/BoxPainter.h" 5 #include "core/paint/BoxPainter.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLFrameOwnerElement.h" 9 #include "core/html/HTMLFrameOwnerElement.h"
10 #include "core/layout/ImageQualityController.h" 10 #include "core/layout/ImageQualityController.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // latest data (buffered ranges, current time and duration) which may be dif ferent from the cached data. 108 // latest data (buffered ranges, current time and duration) which may be dif ferent from the cached data.
109 if ((RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled() && style.appearance() == MediaSliderPart) 109 if ((RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled() && style.appearance() == MediaSliderPart)
110 // We may paint a delayed-invalidation object before it's actually inval idated. Note this would be handled for 110 // We may paint a delayed-invalidation object before it's actually inval idated. Note this would be handled for
111 // us by LayoutObjectDrawingRecorder but we have to use DrawingRecorder as we may use the scrolling contents 111 // us by LayoutObjectDrawingRecorder but we have to use DrawingRecorder as we may use the scrolling contents
112 // layer as DisplayItemClient below. 112 // layer as DisplayItemClient below.
113 || m_layoutBox.fullPaintInvalidationReason() == PaintInvalidationDelayed Full) { 113 || m_layoutBox.fullPaintInvalidationReason() == PaintInvalidationDelayed Full) {
114 cacheSkipper.emplace(paintInfo.context); 114 cacheSkipper.emplace(paintInfo.context);
115 } 115 }
116 116
117 const DisplayItemClient& displayItemClient = paintingOverflowContents ? stat ic_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping() ->scrollingContentsLayer()) : m_layoutBox; 117 const DisplayItemClient& displayItemClient = paintingOverflowContents ? stat ic_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping() ->scrollingContentsLayer()) : m_layoutBox;
118 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, displayIt emClient, DisplayItem::BoxDecorationBackground)) 118 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, displayIt emClient, DisplayItem::kBoxDecorationBackground))
119 return; 119 return;
120 120
121 DrawingRecorder recorder(paintInfo.context, displayItemClient, DisplayItem:: BoxDecorationBackground, FloatRect(boundsForDrawingRecorder(paintInfo, paintOffs et))); 121 DrawingRecorder recorder(paintInfo.context, displayItemClient, DisplayItem:: kBoxDecorationBackground, FloatRect(boundsForDrawingRecorder(paintInfo, paintOff set)));
122 BoxDecorationData boxDecorationData(m_layoutBox); 122 BoxDecorationData boxDecorationData(m_layoutBox);
123 GraphicsContextStateSaver stateSaver(paintInfo.context, false); 123 GraphicsContextStateSaver stateSaver(paintInfo.context, false);
124 124
125 if (!paintingOverflowContents) { 125 if (!paintingOverflowContents) {
126 // FIXME: Should eventually give the theme control over whether the box shadow should paint, since controls could have 126 // FIXME: Should eventually give the theme control over whether the box shadow should paint, since controls could have
127 // custom shadows of their own. 127 // custom shadows of their own.
128 if (!m_layoutBox.boxShadowShouldBeAppliedToBackground(boxDecorationData. bleedAvoidance)) { 128 if (!m_layoutBox.boxShadowShouldBeAppliedToBackground(boxDecorationData. bleedAvoidance)) {
129 paintBoxShadow(paintInfo, paintRect, style, Normal); 129 paintBoxShadow(paintInfo, paintRect, style, Normal);
130 } 130 }
131 131
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 } 867 }
868 } 868 }
869 869
870 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document) 870 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document)
871 { 871 {
872 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus tEconomy 872 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus tEconomy
873 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ()); 873 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ());
874 } 874 }
875 875
876 } // namespace blink 876 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxClipper.cpp ('k') | third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698