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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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/FileUploadControlPainter.h" 5 #include "core/paint/FileUploadControlPainter.h"
6 6
7 #include "core/layout/LayoutButton.h" 7 #include "core/layout/LayoutButton.h"
8 #include "core/layout/LayoutFileUploadControl.h" 8 #include "core/layout/LayoutFileUploadControl.h"
9 #include "core/layout/TextRunConstructor.h" 9 #include "core/layout/TextRunConstructor.h"
10 #include "core/paint/LayoutObjectDrawingRecorder.h" 10 #include "core/paint/LayoutObjectDrawingRecorder.h"
(...skipping 11 matching lines...) Expand all
22 return; 22 return;
23 23
24 // Push a clip. 24 // Push a clip.
25 Optional<ClipRecorder> clipRecorder; 25 Optional<ClipRecorder> clipRecorder;
26 if (paintInfo.phase == PaintPhaseForeground || 26 if (paintInfo.phase == PaintPhaseForeground ||
27 paintInfo.phase == PaintPhaseDescendantBlockBackgroundsOnly) { 27 paintInfo.phase == PaintPhaseDescendantBlockBackgroundsOnly) {
28 IntRect clipRect = enclosingIntRect(LayoutRect( 28 IntRect clipRect = enclosingIntRect(LayoutRect(
29 LayoutPoint(paintOffset.x() + m_layoutFileUploadControl.borderLeft(), 29 LayoutPoint(paintOffset.x() + m_layoutFileUploadControl.borderLeft(),
30 paintOffset.y() + m_layoutFileUploadControl.borderTop()), 30 paintOffset.y() + m_layoutFileUploadControl.borderTop()),
31 m_layoutFileUploadControl.size() + 31 m_layoutFileUploadControl.size() +
32 LayoutSize(LayoutUnit(), -m_layoutFileUploadControl.borderWidth() + 32 LayoutSize(LayoutUnit(),
33 buttonShadowHeight))); 33 -m_layoutFileUploadControl.borderWidth() +
34 buttonShadowHeight)));
34 if (clipRect.isEmpty()) 35 if (clipRect.isEmpty())
35 return; 36 return;
36 clipRecorder.emplace(paintInfo.context, m_layoutFileUploadControl, 37 clipRecorder.emplace(paintInfo.context, m_layoutFileUploadControl,
37 DisplayItem::kClipFileUploadControlRect, clipRect); 38 DisplayItem::kClipFileUploadControlRect, clipRect);
38 } 39 }
39 40
40 if (paintInfo.phase == PaintPhaseForeground && 41 if (paintInfo.phase == PaintPhaseForeground &&
41 !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( 42 !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(
42 paintInfo.context, m_layoutFileUploadControl, paintInfo.phase)) { 43 paintInfo.context, m_layoutFileUploadControl, paintInfo.phase)) {
43 const String& displayedFilename = m_layoutFileUploadControl.fileTextValue(); 44 const String& displayedFilename = m_layoutFileUploadControl.fileTextValue();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 font, textRunPaintInfo, 104 font, textRunPaintInfo,
104 FloatPoint(roundToInt(textX), roundToInt(textY))); 105 FloatPoint(roundToInt(textX), roundToInt(textY)));
105 } 106 }
106 107
107 // Paint the children. 108 // Paint the children.
108 m_layoutFileUploadControl.LayoutBlockFlow::paintObject(paintInfo, 109 m_layoutFileUploadControl.LayoutBlockFlow::paintObject(paintInfo,
109 paintOffset); 110 paintOffset);
110 } 111 }
111 112
112 } // namespace blink 113 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698