| Index: Source/core/paint/BlockPainter.cpp | 
| diff --git a/Source/core/paint/BlockPainter.cpp b/Source/core/paint/BlockPainter.cpp | 
| index b92e7b3e5549a8e0a76197024be600725dcff16c..cda4d2c7ecb8e5012fd801a8ee3184f478aac717 100644 | 
| --- a/Source/core/paint/BlockPainter.cpp | 
| +++ b/Source/core/paint/BlockPainter.cpp | 
| @@ -109,8 +109,12 @@ void BlockPainter::paintInlineBox(InlineBox& inlineBox, PaintInfo& paintInfo, co | 
| return; | 
|  | 
| LayoutPoint childPoint = paintOffset; | 
| -    if (inlineBox.parent()->renderer().style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock(). | 
| +    // Faster than calling containingBlock(). | 
| +    const RenderObject& renderer = inlineBox.parent()->renderer(); | 
| +    if (!UNLIKELY(renderer.document().containsAnyVerticalWritingModes()) | 
| +        && renderer.style()->slowIsFlippedBlocksWritingMode()) { | 
| childPoint = inlineBox.renderer().containingBlock()->flipForWritingModeForChild(&toRenderBox(inlineBox.renderer()), childPoint); | 
| +    } | 
|  | 
| paintAsInlineBlock(&inlineBox.renderer(), paintInfo, childPoint); | 
| } | 
| @@ -331,7 +335,7 @@ void BlockPainter::paintColumnRules(PaintInfo& paintInfo, const LayoutPoint& pai | 
| ruleLogicalLeft = currLogicalLeftOffset; | 
| } | 
| } else { | 
| -        bool topToBottom = !m_renderBlock.style()->isFlippedBlocksWritingMode(); | 
| +        bool topToBottom = !m_renderBlock.style()->slowIsFlippedBlocksWritingMode(); | 
| LayoutUnit ruleLeft = m_renderBlock.isHorizontalWritingMode() | 
| ? m_renderBlock.borderLeft() + m_renderBlock.paddingLeft() | 
| : colGap / 2 - colGap - ruleThickness / 2 + m_renderBlock.borderBefore() + m_renderBlock.paddingBefore(); | 
| @@ -418,7 +422,7 @@ void BlockPainter::paintColumnContents(PaintInfo& paintInfo, const LayoutPoint& | 
| } | 
|  | 
| LayoutUnit blockDelta = (m_renderBlock.isHorizontalWritingMode() ? colRect.height() : colRect.width()); | 
| -        if (m_renderBlock.style()->isFlippedBlocksWritingMode()) | 
| +        if (m_renderBlock.style()->slowIsFlippedBlocksWritingMode()) | 
| currLogicalTopOffset += blockDelta; | 
| else | 
| currLogicalTopOffset -= blockDelta; | 
|  |