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

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

Issue 625933003: Consolidated checks for the PaintBehaviorRenderingSVGMask flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either 11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version. 12 * version 2 of the License, or (at your option) any later version.
13 * 13 *
14 * This library is distributed in the hope that it will be useful, 14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details. 17 * Library General Public License for more details.
18 * 18 *
19 * You should have received a copy of the GNU Library General Public License 19 * You should have received a copy of the GNU Library General Public License
20 * along with this library; see the file COPYING.LIB. If not, write to 20 * along with this library; see the file COPYING.LIB. If not, write to
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA. 22 * Boston, MA 02110-1301, USA.
23 */ 23 */
24 24
25 #include "config.h" 25 #include "config.h"
26 #include "core/rendering/svg/SVGRenderSupport.h" 26 #include "core/rendering/svg/SVGRenderSupport.h"
27 27
28 #include "core/frame/FrameView.h"
29 #include "core/frame/LocalFrame.h"
28 #include "core/rendering/PaintInfo.h" 30 #include "core/rendering/PaintInfo.h"
29 #include "core/rendering/RenderGeometryMap.h" 31 #include "core/rendering/RenderGeometryMap.h"
30 #include "core/rendering/RenderLayer.h" 32 #include "core/rendering/RenderLayer.h"
31 #include "core/rendering/SubtreeLayoutScope.h" 33 #include "core/rendering/SubtreeLayoutScope.h"
32 #include "core/rendering/svg/RenderSVGInlineText.h" 34 #include "core/rendering/svg/RenderSVGInlineText.h"
33 #include "core/rendering/svg/RenderSVGResourceClipper.h" 35 #include "core/rendering/svg/RenderSVGResourceClipper.h"
34 #include "core/rendering/svg/RenderSVGResourceFilter.h" 36 #include "core/rendering/svg/RenderSVGResourceFilter.h"
35 #include "core/rendering/svg/RenderSVGResourceMasker.h" 37 #include "core/rendering/svg/RenderSVGResourceMasker.h"
36 #include "core/rendering/svg/RenderSVGRoot.h" 38 #include "core/rendering/svg/RenderSVGRoot.h"
37 #include "core/rendering/svg/RenderSVGShape.h" 39 #include "core/rendering/svg/RenderSVGShape.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 269 }
268 270
269 bool SVGRenderSupport::isOverflowHidden(const RenderObject* object) 271 bool SVGRenderSupport::isOverflowHidden(const RenderObject* object)
270 { 272 {
271 // RenderSVGRoot should never query for overflow state - it should always cl ip itself to the initial viewport size. 273 // RenderSVGRoot should never query for overflow state - it should always cl ip itself to the initial viewport size.
272 ASSERT(!object->isDocumentElement()); 274 ASSERT(!object->isDocumentElement());
273 275
274 return object->style()->overflowX() == OHIDDEN || object->style()->overflowX () == OSCROLL; 276 return object->style()->overflowX() == OHIDDEN || object->style()->overflowX () == OSCROLL;
275 } 277 }
276 278
279 bool SVGRenderSupport::isRenderingMaskImage(const RenderObject& object)
280 {
281 return object.frame() && object.frame()->view() && object.frame()->view()->p aintBehavior() & PaintBehaviorRenderingSVGMask;
282 }
283
277 void SVGRenderSupport::intersectPaintInvalidationRectWithResources(const RenderO bject* renderer, FloatRect& paintInvalidationRect) 284 void SVGRenderSupport::intersectPaintInvalidationRectWithResources(const RenderO bject* renderer, FloatRect& paintInvalidationRect)
278 { 285 {
279 ASSERT(renderer); 286 ASSERT(renderer);
280 287
281 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject( renderer); 288 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject( renderer);
282 if (!resources) 289 if (!resources)
283 return; 290 return;
284 291
285 if (RenderSVGResourceFilter* filter = resources->filter()) 292 if (RenderSVGResourceFilter* filter = resources->filter())
286 paintInvalidationRect = filter->resourceBoundingBox(renderer); 293 paintInvalidationRect = filter->resourceBoundingBox(renderer);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 405 }
399 406
400 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) 407 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object)
401 { 408 {
402 ASSERT(object->isText()); 409 ASSERT(object->isText());
403 // <br> is marked as text, but is not handled by the SVG rendering code-path . 410 // <br> is marked as text, but is not handled by the SVG rendering code-path .
404 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty Text(); 411 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty Text();
405 } 412 }
406 413
407 } 414 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698