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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 obj.paint(info, scrolledPaintRect.location() - localOffset); 791 obj.paint(info, scrolledPaintRect.location() - localOffset);
792 } 792 }
793 793
794 context.endLayer(); 794 context.endLayer();
795 context.endLayer(); 795 context.endLayer();
796 } 796 }
797 } 797 }
798 798
799 void BoxPainter::paintMask(const PaintInfo& paintInfo, 799 void BoxPainter::paintMask(const PaintInfo& paintInfo,
800 const LayoutPoint& paintOffset) { 800 const LayoutPoint& paintOffset) {
801 if (m_layoutBox.style()->visibility() != EVisibility::Visible || 801 if (m_layoutBox.style()->visibility() != EVisibility::kVisible ||
802 paintInfo.phase != PaintPhaseMask) 802 paintInfo.phase != PaintPhaseMask)
803 return; 803 return;
804 804
805 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( 805 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(
806 paintInfo.context, m_layoutBox, paintInfo.phase)) 806 paintInfo.context, m_layoutBox, paintInfo.phase))
807 return; 807 return;
808 808
809 LayoutRect visualOverflowRect(m_layoutBox.visualOverflowRect()); 809 LayoutRect visualOverflowRect(m_layoutBox.visualOverflowRect());
810 visualOverflowRect.moveBy(paintOffset); 810 visualOverflowRect.moveBy(paintOffset);
811 811
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 } 850 }
851 851
852 if (pushTransparencyLayer) 852 if (pushTransparencyLayer)
853 paintInfo.context.endLayer(); 853 paintInfo.context.endLayer();
854 } 854 }
855 855
856 void BoxPainter::paintClippingMask(const PaintInfo& paintInfo, 856 void BoxPainter::paintClippingMask(const PaintInfo& paintInfo,
857 const LayoutPoint& paintOffset) { 857 const LayoutPoint& paintOffset) {
858 DCHECK(paintInfo.phase == PaintPhaseClippingMask); 858 DCHECK(paintInfo.phase == PaintPhaseClippingMask);
859 859
860 if (m_layoutBox.style()->visibility() != EVisibility::Visible) 860 if (m_layoutBox.style()->visibility() != EVisibility::kVisible)
861 return; 861 return;
862 862
863 if (!m_layoutBox.layer() || 863 if (!m_layoutBox.layer() ||
864 m_layoutBox.layer()->compositingState() != PaintsIntoOwnBacking) 864 m_layoutBox.layer()->compositingState() != PaintsIntoOwnBacking)
865 return; 865 return;
866 866
867 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( 867 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(
868 paintInfo.context, m_layoutBox, paintInfo.phase)) 868 paintInfo.context, m_layoutBox, paintInfo.phase))
869 return; 869 return;
870 870
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 } 1077 }
1078 context.drawInnerShadow(bounds, shadowColor, shadowOffset, shadowBlur, 1078 context.drawInnerShadow(bounds, shadowColor, shadowOffset, shadowBlur,
1079 shadowSpread, clippedEdges); 1079 shadowSpread, clippedEdges);
1080 } 1080 }
1081 } 1081 }
1082 1082
1083 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy( 1083 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(
1084 const ComputedStyle& style, 1084 const ComputedStyle& style,
1085 const Document& document) { 1085 const Document& document) {
1086 return document.printing() && 1086 return document.printing() &&
1087 style.printColorAdjust() == EPrintColorAdjust::Economy && 1087 style.printColorAdjust() == EPrintColorAdjust::kEconomy &&
1088 (!document.settings() || 1088 (!document.settings() ||
1089 !document.settings()->getShouldPrintBackgrounds()); 1089 !document.settings()->getShouldPrintBackgrounds());
1090 } 1090 }
1091 1091
1092 } // namespace blink 1092 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockPainter.cpp ('k') | third_party/WebKit/Source/core/paint/DetailsMarkerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698