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

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: Expectation for fast/inline/justify-emphasis-inline-box.html. 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
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/LineBoxListPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/InlinePainter.cpp
diff --git a/Source/core/paint/InlinePainter.cpp b/Source/core/paint/InlinePainter.cpp
index d8708834faad5f7bcb49ed0a10d38556b6e63374..393cb9b7e050289fb0b4f3a176830cfa59a90f75 100644
--- a/Source/core/paint/InlinePainter.cpp
+++ b/Source/core/paint/InlinePainter.cpp
@@ -6,10 +6,12 @@
#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"
#include "core/rendering/PaintInfo.h"
+#include "core/rendering/RenderBlock.h"
#include "core/rendering/RenderInline.h"
#include "core/rendering/RenderTheme.h"
#include "core/rendering/RootInlineBox.h"
@@ -29,6 +31,15 @@ void InlinePainter::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintO
if (!styleToUse->hasOutline())
return;
+ LayoutRect bounds;
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ // FIXME: Use tighter bounds.
+ RenderBlock* cb = m_renderInline.containingBlock();
+ bounds = cb->visualOverflowRect();
+ 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.
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/LineBoxListPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698