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

Unified Diff: Source/core/rendering/RootInlineBox.cpp

Issue 630093005: Move paint code from RootInlineBox and EllipsisBox to RootInlineBoxPainter and EllipsisBoxPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RootInlineBox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RootInlineBox.cpp
diff --git a/Source/core/rendering/RootInlineBox.cpp b/Source/core/rendering/RootInlineBox.cpp
index b92384a0ec48392b5a8d6a016dce0ba988ef547a..0a8b551c320626d05223746804dfe07fc6930792 100644
--- a/Source/core/rendering/RootInlineBox.cpp
+++ b/Source/core/rendering/RootInlineBox.cpp
@@ -22,6 +22,7 @@
#include "core/dom/Document.h"
#include "core/dom/StyleEngine.h"
+#include "core/paint/RootInlineBoxPainter.h"
#include "core/rendering/EllipsisBox.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/InlineTextBox.h"
@@ -151,17 +152,9 @@ float RootInlineBox::placeEllipsisBox(bool ltr, float blockLeftEdge, float block
return result;
}
-void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const
-{
- if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(&renderer()) && renderer().style()->visibility() == VISIBLE
- && paintInfo.phase == PaintPhaseForeground)
- ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom);
-}
-
void RootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
{
- InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom);
- paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom);
+ RootInlineBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBottom);
}
bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
« no previous file with comments | « Source/core/rendering/RootInlineBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698