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

Unified Diff: third_party/WebKit/Source/core/paint/ReplacedPainter.cpp

Issue 1817623004: When the SVG element is 'visible', the SVG element is not shown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/visibility-enable-on-svg-element-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6f1c65510f542981c346be17e0dba4c2985e314d..01e68c8ca3afd7b6a30826f2b9720515ae56d76b 100644
--- a/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp
@@ -30,7 +30,7 @@ void ReplacedPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint
LayoutRect borderRect(adjustedPaintOffset, m_layoutReplaced.size());
- if (m_layoutReplaced.hasBoxDecorationBackground() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
+ if (m_layoutReplaced.style()->visibility() != HIDDEN && m_layoutReplaced.hasBoxDecorationBackground() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
fs 2016/03/23 14:44:23 Ought to be == VISIBLE here (to handle 'collapse'
hyunjunekim2 2016/03/24 12:40:48 Done.
m_layoutReplaced.paintBoxDecorationBackground(paintInfo, adjustedPaintOffset);
if (paintInfo.phase == PaintPhaseMask) {
@@ -102,7 +102,7 @@ bool ReplacedPainter::shouldPaint(const PaintInfo& paintInfo, const LayoutPoint&
return false;
// If we're invisible or haven't received a layout yet, just bail.
- if (m_layoutReplaced.style()->visibility() != VISIBLE)
+ if (!m_layoutReplaced.isSVGRoot() && m_layoutReplaced.style()->visibility() != VISIBLE)
fs 2016/03/23 14:44:23 Document the new part of the condition.
hyunjunekim2 2016/03/24 12:40:48 Added the comment.
return false;
LayoutRect paintRect(m_layoutReplaced.visualOverflowRect());
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/visibility-enable-on-svg-element-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698