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

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

Issue 729523002: Add fast/inline to virtual/slimmingpaint and make the tests pass (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
Index: Source/core/paint/InlinePainter.cpp
diff --git a/Source/core/paint/InlinePainter.cpp b/Source/core/paint/InlinePainter.cpp
index d8708834faad5f7bcb49ed0a10d38556b6e63374..8f79fd7f755b05a959b119fd6b92707afd8a403f 100644
--- a/Source/core/paint/InlinePainter.cpp
+++ b/Source/core/paint/InlinePainter.cpp
@@ -6,6 +6,7 @@
#include "core/paint/InlinePainter.h"
#include "core/paint/BoxPainter.h"
+#include "core/paint/DrawingRecorder.h"
#include "core/paint/LineBoxListPainter.h"
#include "core/paint/ObjectPainter.h"
#include "core/rendering/GraphicsContextAnnotator.h"
@@ -29,6 +30,13 @@ void InlinePainter::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintO
if (!styleToUse->hasOutline())
return;
+ LayoutRect bounds;
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ bounds = m_renderInline.linesVisualOverflowBoundingBox();
leviw_travelin_and_unemployed 2014/11/14 22:27:59 This is going to be really expensive to calculate
chrishtr 2014/11/14 22:31:43 It suffices to use a bound that includes the inlin
fs 2014/11/17 16:13:20 I've used Levi's suggestion for now. I'm not sure
+ bounds.moveBy(paintOffset);
+ }
+ DrawingRecorder recorder(paintInfo.context, &m_renderInline, paintInfo.phase, bounds);
+
if (styleToUse->outlineStyleIsAuto()) {
if (RenderTheme::theme().shouldDrawDefaultFocusRing(&m_renderInline)) {
// Only paint the focus ring by hand if the theme isn't able to draw the focus ring.

Powered by Google App Engine
This is Rietveld 408576698