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

Side by Side Diff: third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.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/InlineFlowBoxPainter.h" 5 #include "core/paint/InlineFlowBoxPainter.h"
6 6
7 #include "core/layout/api/LineLayoutAPIShim.h" 7 #include "core/layout/api/LineLayoutAPIShim.h"
8 #include "core/layout/line/RootInlineBox.h" 8 #include "core/layout/line/RootInlineBox.h"
9 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
10 #include "core/paint/PaintInfo.h" 10 #include "core/paint/PaintInfo.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const ComputedStyle* styleToUse = m_inlineFlowBox.getLineLayoutItem().style( m_inlineFlowBox.isFirstLineStyle()); 181 const ComputedStyle* styleToUse = m_inlineFlowBox.getLineLayoutItem().style( m_inlineFlowBox.isFirstLineStyle());
182 bool shouldPaintBoxDecorationBackground; 182 bool shouldPaintBoxDecorationBackground;
183 if (m_inlineFlowBox.parent()) 183 if (m_inlineFlowBox.parent())
184 shouldPaintBoxDecorationBackground = inlineFlowBoxLayoutObject->hasBoxDe corationBackground(); 184 shouldPaintBoxDecorationBackground = inlineFlowBoxLayoutObject->hasBoxDe corationBackground();
185 else 185 else
186 shouldPaintBoxDecorationBackground = m_inlineFlowBox.isFirstLineStyle() && styleToUse != m_inlineFlowBox.getLineLayoutItem().style(); 186 shouldPaintBoxDecorationBackground = m_inlineFlowBox.isFirstLineStyle() && styleToUse != m_inlineFlowBox.getLineLayoutItem().style();
187 187
188 if (!shouldPaintBoxDecorationBackground) 188 if (!shouldPaintBoxDecorationBackground)
189 return; 189 return;
190 190
191 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_inlineF lowBox, DisplayItem::BoxDecorationBackground)) 191 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_inlineF lowBox, DisplayItem::kBoxDecorationBackground))
192 return; 192 return;
193 193
194 DrawingRecorder recorder(paintInfo.context, m_inlineFlowBox, DisplayItem::Bo xDecorationBackground, pixelSnappedIntRect(cullRect)); 194 DrawingRecorder recorder(paintInfo.context, m_inlineFlowBox, DisplayItem::kB oxDecorationBackground, pixelSnappedIntRect(cullRect));
195 195
196 LayoutRect frameRect = frameRectClampedToLineTopAndBottomIfNeeded(); 196 LayoutRect frameRect = frameRectClampedToLineTopAndBottomIfNeeded();
197 197
198 // Move x/y to our coordinates. 198 // Move x/y to our coordinates.
199 LayoutRect localRect(frameRect); 199 LayoutRect localRect(frameRect);
200 m_inlineFlowBox.flipForWritingMode(localRect); 200 m_inlineFlowBox.flipForWritingMode(localRect);
201 LayoutPoint adjustedPaintOffset = paintOffset + localRect.location(); 201 LayoutPoint adjustedPaintOffset = paintOffset + localRect.location();
202 202
203 LayoutRect adjustedFrameRect = LayoutRect(adjustedPaintOffset, frameRect.siz e()); 203 LayoutRect adjustedFrameRect = LayoutRect(adjustedPaintOffset, frameRect.siz e());
204 204
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 rect.setHeight(logicalHeight); 313 rect.setHeight(logicalHeight);
314 } else { 314 } else {
315 rect.setX(logicalTop); 315 rect.setX(logicalTop);
316 rect.setWidth(logicalHeight); 316 rect.setWidth(logicalHeight);
317 } 317 }
318 } 318 }
319 return rect; 319 return rect;
320 } 320 }
321 321
322 } // namespace blink 322 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ImagePainter.cpp ('k') | third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698