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

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

Issue 1151573002: [SP] Fix cull rect for fieldset painting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop TE-tweak. Created 5 years, 7 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
« no previous file with comments | « no previous file | 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 "config.h" 5 #include "config.h"
6 #include "core/paint/FieldsetPainter.h" 6 #include "core/paint/FieldsetPainter.h"
7 7
8 #include "core/layout/LayoutFieldset.h" 8 #include "core/layout/LayoutFieldset.h"
9 #include "core/paint/BoxDecorationData.h" 9 #include "core/paint/BoxDecorationData.h"
10 #include "core/paint/BoxPainter.h" 10 #include "core/paint/BoxPainter.h"
(...skipping 18 matching lines...) Expand all
29 if (m_layoutFieldset.style()->isHorizontalWritingMode()) { 29 if (m_layoutFieldset.style()->isHorizontalWritingMode()) {
30 LayoutUnit yOff = (legend->location().y() > 0) ? LayoutUnit() : (legend- >size().height() - m_layoutFieldset.borderTop()) / 2; 30 LayoutUnit yOff = (legend->location().y() > 0) ? LayoutUnit() : (legend- >size().height() - m_layoutFieldset.borderTop()) / 2;
31 paintRect.setHeight(paintRect.height() - yOff); 31 paintRect.setHeight(paintRect.height() - yOff);
32 paintRect.setY(paintRect.y() + yOff); 32 paintRect.setY(paintRect.y() + yOff);
33 } else { 33 } else {
34 LayoutUnit xOff = (legend->location().x() > 0) ? LayoutUnit() : (legend- >size().width() - m_layoutFieldset.borderLeft()) / 2; 34 LayoutUnit xOff = (legend->location().x() > 0) ? LayoutUnit() : (legend- >size().width() - m_layoutFieldset.borderLeft()) / 2;
35 paintRect.setWidth(paintRect.width() - xOff); 35 paintRect.setWidth(paintRect.width() - xOff);
36 paintRect.setX(paintRect.x() + xOff); 36 paintRect.setX(paintRect.x() + xOff);
37 } 37 }
38 38
39 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFieldset, p aintInfo.phase, pixelSnappedIntRect(paintOffset, paintRect.size())); 39 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFieldset, p aintInfo.phase, pixelSnappedIntRect(paintRect));
40 if (recorder.canUseCachedDrawing()) 40 if (recorder.canUseCachedDrawing())
41 return; 41 return;
42 42
43 BoxDecorationData boxDecorationData(m_layoutFieldset); 43 BoxDecorationData boxDecorationData(m_layoutFieldset);
44 44
45 if (boxDecorationData.bleedAvoidance == BackgroundBleedNone) 45 if (boxDecorationData.bleedAvoidance == BackgroundBleedNone)
46 BoxPainter::paintBoxShadow(paintInfo, paintRect, m_layoutFieldset.styleR ef(), Normal); 46 BoxPainter::paintBoxShadow(paintInfo, paintRect, m_layoutFieldset.styleR ef(), Normal);
47 BoxPainter(m_layoutFieldset).paintFillLayers(paintInfo, boxDecorationData.ba ckgroundColor, m_layoutFieldset.style()->backgroundLayers(), paintRect); 47 BoxPainter(m_layoutFieldset).paintFillLayers(paintInfo, boxDecorationData.ba ckgroundColor, m_layoutFieldset.style()->backgroundLayers(), paintRect);
48 BoxPainter::paintBoxShadow(paintInfo, paintRect, m_layoutFieldset.styleRef() , Inset); 48 BoxPainter::paintBoxShadow(paintInfo, paintRect, m_layoutFieldset.styleRef() , Inset);
49 49
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } else { 90 } else {
91 LayoutUnit xOff = (legend->location().x() > 0) ? LayoutUnit() : (legend- >size().width() - m_layoutFieldset.borderLeft()) / 2; 91 LayoutUnit xOff = (legend->location().x() > 0) ? LayoutUnit() : (legend- >size().width() - m_layoutFieldset.borderLeft()) / 2;
92 paintRect.expand(-xOff, 0); 92 paintRect.expand(-xOff, 0);
93 paintRect.move(xOff, 0); 93 paintRect.move(xOff, 0);
94 } 94 }
95 95
96 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect); 96 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect);
97 } 97 }
98 98
99 } // namespace blink 99 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698