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

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

Issue 1584903002: Improvement handling of background and outline paint phases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PaintPhaseRename
Patch Set: Fix TablePainter and TableRowPainter Created 4 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/InlineFlowBoxPainter.h" 5 #include "core/paint/InlineFlowBoxPainter.h"
6 6
7 #include "core/layout/LayoutBlock.h" 7 #include "core/layout/LayoutBlock.h"
8 #include "core/layout/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/LayoutView.h" 9 #include "core/layout/LayoutView.h"
10 #include "core/layout/api/LineLayoutBoxModel.h" 10 #include "core/layout/api/LineLayoutBoxModel.h"
11 #include "core/layout/api/SelectionState.h" 11 #include "core/layout/api/SelectionState.h"
12 #include "core/layout/line/InlineFlowBox.h" 12 #include "core/layout/line/InlineFlowBox.h"
13 #include "core/paint/BoxPainter.h" 13 #include "core/paint/BoxPainter.h"
14 #include "core/paint/LineLayoutPaintShim.h" 14 #include "core/paint/LineLayoutPaintShim.h"
15 #include "core/paint/PaintInfo.h" 15 #include "core/paint/PaintInfo.h"
16 #include "core/paint/PaintLayer.h" 16 #include "core/paint/PaintLayer.h"
17 #include "platform/graphics/GraphicsContextStateSaver.h" 17 #include "platform/graphics/GraphicsContextStateSaver.h"
18 #include "platform/graphics/paint/DrawingRecorder.h" 18 #include "platform/graphics/paint/DrawingRecorder.h"
19 19
20 namespace blink { 20 namespace blink {
21 21
22 void InlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, const LayoutUnit lineTop, const LayoutUnit lineBottom) 22 void InlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, const LayoutUnit lineTop, const LayoutUnit lineBottom)
23 { 23 {
24 ASSERT(paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhase SelfOutline && paintInfo.phase != PaintPhaseDescendantOutlines); 24 ASSERT(!shouldPaintSelfOutline(paintInfo.phase) && !shouldPaintDescendantOut lines(paintInfo.phase));
25 25
26 LayoutRect overflowRect(m_inlineFlowBox.visualOverflowRect(lineTop, lineBott om)); 26 LayoutRect overflowRect(m_inlineFlowBox.visualOverflowRect(lineTop, lineBott om));
27 m_inlineFlowBox.flipForWritingMode(overflowRect); 27 m_inlineFlowBox.flipForWritingMode(overflowRect);
28 overflowRect.moveBy(paintOffset); 28 overflowRect.moveBy(paintOffset);
29 29
30 if (!paintInfo.cullRect().intersectsCullRect(overflowRect)) 30 if (!paintInfo.cullRect().intersectsCullRect(overflowRect))
31 return; 31 return;
32 32
33 if (paintInfo.phase == PaintPhaseMask) { 33 if (paintInfo.phase == PaintPhaseMask) {
34 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_inl ineFlowBox, DisplayItem::paintPhaseToDrawingType(paintInfo.phase))) 34 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_inl ineFlowBox, DisplayItem::paintPhaseToDrawingType(paintInfo.phase)))
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 rect.setHeight(logicalHeight); 322 rect.setHeight(logicalHeight);
323 } else { 323 } else {
324 rect.setX(logicalTop); 324 rect.setX(logicalTop);
325 rect.setWidth(logicalHeight); 325 rect.setWidth(logicalHeight);
326 } 326 }
327 } 327 }
328 return rect; 328 return rect;
329 } 329 }
330 330
331 } // namespace blink 331 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698