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

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

Issue 23737004: Paint flex items atomically, like inline-blocks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update comment Created 7 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
Index: Source/core/rendering/InlineBox.cpp
diff --git a/Source/core/rendering/InlineBox.cpp b/Source/core/rendering/InlineBox.cpp
index bfd9db658ecabfab5fee8a714dd84e49622eeb2c..5015173f7f5618bdc90ae31f68aaedca60243107 100644
--- a/Source/core/rendering/InlineBox.cpp
+++ b/Source/core/rendering/InlineBox.cpp
@@ -197,30 +197,14 @@ void InlineBox::adjustPosition(float dx, float dy)
void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
{
- if (!paintInfo.shouldPaintWithinRoot(renderer()) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
+ if (!paintInfo.shouldPaintWithinRoot(renderer()))
return;
LayoutPoint childPoint = paintOffset;
if (parent()->renderer()->style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
childPoint = renderer()->containingBlock()->flipForWritingModeForChild(toRenderBox(renderer()), childPoint);
- // Paint all phases of replaced elements atomically, as though the replaced element established its
- // own stacking context. (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
- // specification.)
- bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip;
- PaintInfo info(paintInfo);
- info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
- renderer()->paint(info, childPoint);
- if (!preservePhase) {
- info.phase = PaintPhaseChildBlockBackgrounds;
- renderer()->paint(info, childPoint);
- info.phase = PaintPhaseFloat;
- renderer()->paint(info, childPoint);
- info.phase = PaintPhaseForeground;
- renderer()->paint(info, childPoint);
- info.phase = PaintPhaseOutline;
- renderer()->paint(info, childPoint);
- }
+ RenderBlock::paintAsInlineBlock(renderer(), paintInfo, childPoint);
}
bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)

Powered by Google App Engine
This is Rietveld 408576698