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

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGRootPainter.cpp

Issue 2065593002: Unprefix the CSS 'filter' property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove disabler. Try different DCHECK expressions. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/SVGRootPainter.h" 5 #include "core/paint/SVGRootPainter.h"
6 6
7 #include "core/layout/svg/LayoutSVGRoot.h" 7 #include "core/layout/svg/LayoutSVGRoot.h"
8 #include "core/layout/svg/SVGLayoutSupport.h" 8 #include "core/layout/svg/SVGLayoutSupport.h"
9 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
10 #include "core/paint/ObjectPaintProperties.h" 10 #include "core/paint/ObjectPaintProperties.h"
(...skipping 21 matching lines...) Expand all
32 if (shouldPaintSelfOutline(paintInfo.phase)) 32 if (shouldPaintSelfOutline(paintInfo.phase))
33 return; 33 return;
34 34
35 // An empty viewBox also disables rendering. 35 // An empty viewBox also disables rendering.
36 // (http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute) 36 // (http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute)
37 SVGSVGElement* svg = toSVGSVGElement(m_layoutSVGRoot.node()); 37 SVGSVGElement* svg = toSVGSVGElement(m_layoutSVGRoot.node());
38 ASSERT(svg); 38 ASSERT(svg);
39 if (svg->hasEmptyViewBox()) 39 if (svg->hasEmptyViewBox())
40 return; 40 return;
41 41
42 // Don't paint if we don't have kids, except if we have filters we should pa int those.
43 if (!m_layoutSVGRoot.firstChild() && !SVGLayoutSupport::hasFilterResource(m_ layoutSVGRoot))
44 return;
45
46 PaintInfo paintInfoBeforeFiltering(paintInfo); 42 PaintInfo paintInfoBeforeFiltering(paintInfo);
47 43
48 Optional<ScopedPaintChunkProperties> propertyScope; 44 Optional<ScopedPaintChunkProperties> propertyScope;
49 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 45 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
50 const auto* objectProperties = m_layoutSVGRoot.objectPaintProperties(); 46 const auto* objectProperties = m_layoutSVGRoot.objectPaintProperties();
51 // If a transform exists, we can rely on a paint layer existing to apply it. 47 // If a transform exists, we can rely on a paint layer existing to apply it.
52 DCHECK(!objectProperties || !objectProperties->transform() || m_layoutSV GRoot.hasLayer()); 48 DCHECK(!objectProperties || !objectProperties->transform() || m_layoutSV GRoot.hasLayer());
53 if (objectProperties && objectProperties->svgLocalToBorderBoxTransform() ) { 49 if (objectProperties && objectProperties->svgLocalToBorderBoxTransform() ) {
54 auto& paintController = paintInfoBeforeFiltering.context.getPaintCon troller(); 50 auto& paintController = paintInfoBeforeFiltering.context.getPaintCon troller();
55 PaintChunkProperties properties(paintController.currentPaintChunkPro perties()); 51 PaintChunkProperties properties(paintController.currentPaintChunkPro perties());
(...skipping 26 matching lines...) Expand all
82 if (paintContext.paintInfo().phase == PaintPhaseForeground && !paintContext. applyClipMaskAndFilterIfNecessary()) 78 if (paintContext.paintInfo().phase == PaintPhaseForeground && !paintContext. applyClipMaskAndFilterIfNecessary())
83 return; 79 return;
84 80
85 BoxPainter(m_layoutSVGRoot).paint(paintContext.paintInfo(), LayoutPoint()); 81 BoxPainter(m_layoutSVGRoot).paint(paintContext.paintInfo(), LayoutPoint());
86 82
87 PaintTiming& timing = PaintTiming::from(m_layoutSVGRoot.node()->document().t opDocument()); 83 PaintTiming& timing = PaintTiming::from(m_layoutSVGRoot.node()->document().t opDocument());
88 timing.markFirstContentfulPaint(); 84 timing.markFirstContentfulPaint();
89 } 85 }
90 86
91 } // namespace blink 87 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGPaintContext.cpp ('k') | third_party/WebKit/Source/core/style/SVGComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698