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

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

Issue 2392443009: reflow comments in core/paint (Closed)
Patch Set: Created 4 years, 2 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/LineBoxListPainter.h" 5 #include "core/paint/LineBoxListPainter.h"
6 6
7 #include "core/layout/LayoutBoxModelObject.h" 7 #include "core/layout/LayoutBoxModelObject.h"
8 #include "core/layout/api/LineLayoutBoxModel.h" 8 #include "core/layout/api/LineLayoutBoxModel.h"
9 #include "core/layout/line/InlineFlowBox.h" 9 #include "core/layout/line/InlineFlowBox.h"
10 #include "core/layout/line/LineBoxList.h" 10 #include "core/layout/line/LineBoxList.h"
(...skipping 24 matching lines...) Expand all
35 ASSERT(!shouldPaintSelfOutline(paintInfo.phase) && 35 ASSERT(!shouldPaintSelfOutline(paintInfo.phase) &&
36 !shouldPaintDescendantOutlines(paintInfo.phase)); 36 !shouldPaintDescendantOutlines(paintInfo.phase));
37 37
38 // Only paint during the foreground/selection phases. 38 // Only paint during the foreground/selection phases.
39 if (paintInfo.phase != PaintPhaseForeground && 39 if (paintInfo.phase != PaintPhaseForeground &&
40 paintInfo.phase != PaintPhaseSelection && 40 paintInfo.phase != PaintPhaseSelection &&
41 paintInfo.phase != PaintPhaseTextClip && 41 paintInfo.phase != PaintPhaseTextClip &&
42 paintInfo.phase != PaintPhaseMask) 42 paintInfo.phase != PaintPhaseMask)
43 return; 43 return;
44 44
45 ASSERT( 45 // The only way an inline could paint like this is if it has a layer.
46 layoutObject.isLayoutBlock() || 46 ASSERT(layoutObject.isLayoutBlock() ||
47 (layoutObject.isLayoutInline() && 47 (layoutObject.isLayoutInline() && layoutObject.hasLayer()));
48 layoutObject
49 .hasLayer())); // The only way an inline could paint like this is if it has a layer.
50 48
51 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting()) 49 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting())
52 addPDFURLRectsForInlineChildrenRecursively(layoutObject, paintInfo, 50 addPDFURLRectsForInlineChildrenRecursively(layoutObject, paintInfo,
53 paintOffset); 51 paintOffset);
54 52
55 // If we have no lines then we have no work to do. 53 // If we have no lines then we have no work to do.
56 if (!m_lineBoxList.firstLineBox()) 54 if (!m_lineBoxList.firstLineBox())
57 return; 55 return;
58 56
59 if (!m_lineBoxList.anyLineIntersectsRect( 57 if (!m_lineBoxList.anyLineIntersectsRect(
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 95
98 void LineBoxListPainter::invalidateLineBoxPaintOffsets( 96 void LineBoxListPainter::invalidateLineBoxPaintOffsets(
99 const PaintInfo& paintInfo) const { 97 const PaintInfo& paintInfo) const {
100 PaintController& paintController = paintInfo.context.getPaintController(); 98 PaintController& paintController = paintInfo.context.getPaintController();
101 for (InlineFlowBox* curr = m_lineBoxList.firstLineBox(); curr; 99 for (InlineFlowBox* curr = m_lineBoxList.firstLineBox(); curr;
102 curr = curr->nextLineBox()) 100 curr = curr->nextLineBox())
103 invalidateLineBoxPaintOffsetsInternal(paintController, curr); 101 invalidateLineBoxPaintOffsetsInternal(paintController, curr);
104 } 102 }
105 103
106 } // namespace blink 104 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698