Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/ReplacedPainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp b/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp |
| index 96793b41e7d4479c10bedf713d7317c7b3e04165..1d890afc1a4d8bb93a89a94ad75a572621991717 100644 |
| --- a/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp |
| @@ -7,6 +7,7 @@ |
| #include "core/layout/LayoutReplaced.h" |
| #include "core/layout/api/SelectionState.h" |
| +#include "core/layout/svg/LayoutSVGRoot.h" |
| #include "core/paint/BoxPainter.h" |
| #include "core/paint/LayoutObjectDrawingRecorder.h" |
| #include "core/paint/ObjectPainter.h" |
| @@ -59,16 +60,18 @@ void ReplacedPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint |
| if (borderRect.isEmpty()) { |
| completelyClippedOut = true; |
| } else { |
| - // Push a clip if we have a border radius, since we want to round the foreground content that gets painted. |
| - FloatRoundedRect roundedInnerRect = m_layoutReplaced.style()->getRoundedInnerBorderFor(borderRect, |
| - LayoutRectOutsets( |
| - -(m_layoutReplaced.paddingTop() + m_layoutReplaced.borderTop()), |
| - -(m_layoutReplaced.paddingRight() + m_layoutReplaced.borderRight()), |
| - -(m_layoutReplaced.paddingBottom() + m_layoutReplaced.borderBottom()), |
| - -(m_layoutReplaced.paddingLeft() + m_layoutReplaced.borderLeft())), |
| - true, true); |
| - |
| - clipper.emplace(m_layoutReplaced, paintInfo, borderRect, roundedInnerRect, ApplyToDisplayList); |
| + if (!m_layoutReplaced.isSVGRoot() || toLayoutSVGRoot(&m_layoutReplaced)->shouldApplyViewportClip()) { |
|
fs
2015/11/16 15:35:03
Could you put this in a helper method, and then do
Shanmuga Pandi
2015/11/17 06:11:15
Done.
|
| + // Push a clip if we have a border radius, since we want to round the foreground content that gets painted. |
| + FloatRoundedRect roundedInnerRect = m_layoutReplaced.style()->getRoundedInnerBorderFor(borderRect, |
| + LayoutRectOutsets( |
| + -(m_layoutReplaced.paddingTop() + m_layoutReplaced.borderTop()), |
| + -(m_layoutReplaced.paddingRight() + m_layoutReplaced.borderRight()), |
| + -(m_layoutReplaced.paddingBottom() + m_layoutReplaced.borderBottom()), |
| + -(m_layoutReplaced.paddingLeft() + m_layoutReplaced.borderLeft())), |
| + true, true); |
| + |
| + clipper.emplace(m_layoutReplaced, paintInfo, borderRect, roundedInnerRect, ApplyToDisplayList); |
| + } |
| } |
| } |