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

Unified Diff: Source/core/paint/LineBoxListPainter.cpp

Issue 1224933002: Combine outline and focus ring code paths (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix empty focus ring on Mac Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/InlineTextBoxPainter.cpp ('k') | Source/core/paint/ObjectPainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/LineBoxListPainter.cpp
diff --git a/Source/core/paint/LineBoxListPainter.cpp b/Source/core/paint/LineBoxListPainter.cpp
index c48384d9964af15c8b65b37786becbb562843358..324b3b9486542619cdb254b77c6973acba72631e 100644
--- a/Source/core/paint/LineBoxListPainter.cpp
+++ b/Source/core/paint/LineBoxListPainter.cpp
@@ -6,6 +6,7 @@
#include "core/paint/LineBoxListPainter.h"
#include "core/layout/LayoutBoxModelObject.h"
+#include "core/layout/LayoutInline.h"
#include "core/layout/api/LineLayoutBoxModel.h"
#include "core/layout/line/InlineFlowBox.h"
#include "core/layout/line/LineBoxList.h"
@@ -28,10 +29,10 @@ static void addPDFURLRectsForInlineChildrenRecursively(LayoutObject* layoutObjec
void LineBoxListPainter::paint(LayoutBoxModelObject* layoutObject, const PaintInfo& paintInfo, const LayoutPoint& paintOffset) const
{
+ ASSERT(paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines);
+
// Only paint during the foreground/selection phases.
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseOutline
- && paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines && paintInfo.phase != PaintPhaseTextClip
- && paintInfo.phase != PaintPhaseMask)
+ if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseTextClip && paintInfo.phase != PaintPhaseMask)
return;
ASSERT(layoutObject->isLayoutBlock() || (layoutObject->isLayoutInline() && layoutObject->hasLayer())); // The only way an inline could paint like this is if it has a layer.
@@ -49,8 +50,6 @@ void LineBoxListPainter::paint(LayoutBoxModelObject* layoutObject, const PaintIn
return;
PaintInfo info(paintInfo);
- ListHashSet<LayoutInline*> outlineObjects;
- info.setOutlineObjects(&outlineObjects);
// See if our root lines intersect with the dirty rect. If so, then we paint
// them. Note that boxes can easily overlap, so we can't make any assumptions
@@ -61,12 +60,6 @@ void LineBoxListPainter::paint(LayoutBoxModelObject* layoutObject, const PaintIn
curr->paint(info, paintOffset, root.lineTop(), root.lineBottom());
}
}
-
- if (info.phase == PaintPhaseOutline || info.phase == PaintPhaseSelfOutline || info.phase == PaintPhaseChildOutlines) {
- for (LayoutInline* flow : *info.outlineObjects())
- InlinePainter(*flow).paintOutline(info, paintOffset);
- info.outlineObjects()->clear();
- }
}
} // namespace blink
« no previous file with comments | « Source/core/paint/InlineTextBoxPainter.cpp ('k') | Source/core/paint/ObjectPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698