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 2065823002: Use selfVisualOverflowRect instead of visualOverflowRect as bounds of painting of LayoutBox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void BoxPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) 47 void BoxPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
48 { 48 {
49 LayoutRect paintRect = m_layoutBox.borderBoxRect(); 49 LayoutRect paintRect = m_layoutBox.borderBoxRect();
50 paintRect.moveBy(paintOffset); 50 paintRect.moveBy(paintOffset);
51 paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, paintRect); 51 paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, paintRect);
52 } 52 }
53 53
54 LayoutRect BoxPainter::boundsForDrawingRecorder(const LayoutPoint& adjustedPaint Offset) 54 LayoutRect BoxPainter::boundsForDrawingRecorder(const LayoutPoint& adjustedPaint Offset)
55 { 55 {
56 LayoutRect bounds = m_layoutBox.visualOverflowRect(); 56 LayoutRect bounds = m_layoutBox.selfVisualOverflowRect();
57 bounds.moveBy(adjustedPaintOffset); 57 bounds.moveBy(adjustedPaintOffset);
58 return bounds; 58 return bounds;
59 } 59 }
60 60
61 namespace { 61 namespace {
62 62
63 bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance) 63 bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance)
64 { 64 {
65 return bleedAvoidance == BackgroundBleedClipOnly || bleedAvoidance == Backgr oundBleedClipLayer; 65 return bleedAvoidance == BackgroundBleedClipOnly || bleedAvoidance == Backgr oundBleedClipLayer;
66 } 66 }
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 } 815 }
816 } 816 }
817 817
818 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document) 818 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document)
819 { 819 {
820 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus tEconomy 820 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus tEconomy
821 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ()); 821 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ());
822 } 822 }
823 823
824 } // namespace blink 824 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698