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*/) |