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

Unified Diff: Source/core/paint/RootInlineBoxPainter.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/paint/RootInlineBoxPainter.h ('k') | Source/core/rendering/EllipsisBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/RootInlineBoxPainter.cpp
diff --git a/Source/core/paint/RootInlineBoxPainter.cpp b/Source/core/paint/RootInlineBoxPainter.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..671e21119e608f095a0a12a371ec64674cb22dc0
--- /dev/null
+++ b/Source/core/paint/RootInlineBoxPainter.cpp
@@ -0,0 +1,27 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "core/paint/RootInlineBoxPainter.h"
+
+#include "core/rendering/EllipsisBox.h"
+#include "core/rendering/PaintInfo.h"
+#include "core/rendering/RootInlineBox.h"
+
+namespace blink {
+
+void RootInlineBoxPainter::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const
+{
+ if (m_rootInlineBox.hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(&m_rootInlineBox.renderer()) && m_rootInlineBox.renderer().style()->visibility() == VISIBLE
+ && paintInfo.phase == PaintPhaseForeground)
+ m_rootInlineBox.ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom);
+}
+
+void RootInlineBoxPainter::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
+{
+ m_rootInlineBox.InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom);
+ paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom);
+}
+
+} // namespace blink
« no previous file with comments | « Source/core/paint/RootInlineBoxPainter.h ('k') | Source/core/rendering/EllipsisBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698