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

Side by Side Diff: Source/core/rendering/svg/RenderSVGRect.cpp

Issue 355813004: [SVG2] Elements that don't render shouldn't contribute to ancestor bboxes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 /* 1 /*
2 * Copyright (C) 2011 University of Szeged 2 * Copyright (C) 2011 University of Szeged
3 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 3 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return m_outerStrokeRect.contains(point, FloatRect::InsideOrOnStroke) && !m_ innerStrokeRect.contains(point, FloatRect::InsideButNotOnStroke); 122 return m_outerStrokeRect.contains(point, FloatRect::InsideOrOnStroke) && !m_ innerStrokeRect.contains(point, FloatRect::InsideButNotOnStroke);
123 } 123 }
124 124
125 bool RenderSVGRect::shapeDependentFillContains(const FloatPoint& point, const Wi ndRule fillRule) const 125 bool RenderSVGRect::shapeDependentFillContains(const FloatPoint& point, const Wi ndRule fillRule) const
126 { 126 {
127 if (m_usePathFallback) 127 if (m_usePathFallback)
128 return RenderSVGShape::shapeDependentFillContains(point, fillRule); 128 return RenderSVGShape::shapeDependentFillContains(point, fillRule);
129 return m_fillBoundingBox.contains(point.x(), point.y()); 129 return m_fillBoundingBox.contains(point.x(), point.y());
130 } 130 }
131 131
132 bool RenderSVGRect::isRenderingDisabled() const
133 {
134 // Some combinations of attributes cause SVG elements
135 // to not render.
136 // For rects a negative dimension is an error and
137 // a zero dimension disables rendering.
138 return m_fillBoundingBox.isEmpty();
132 } 139 }
140
141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698