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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 m_cachedPaintRecord.reset(); 110 m_cachedPaintRecord.reset();
111 m_localClipBounds = FloatRect(); 111 m_localClipBounds = FloatRect();
112 markAllClientsForInvalidation(markForInvalidation 112 markAllClientsForInvalidation(markForInvalidation
113 ? LayoutAndBoundariesInvalidation 113 ? LayoutAndBoundariesInvalidation
114 : ParentOnlyInvalidation); 114 : ParentOnlyInvalidation);
115 } 115 }
116 116
117 void LayoutSVGResourceClipper::removeClientFromCache(LayoutObject* client, 117 void LayoutSVGResourceClipper::removeClientFromCache(LayoutObject* client,
118 bool markForInvalidation) { 118 bool markForInvalidation) {
119 ASSERT(client); 119 ASSERT(client);
120 markClientForInvalidation(client, markForInvalidation 120 markClientForInvalidation(
121 ? BoundariesInvalidation 121 client,
122 : ParentOnlyInvalidation); 122 markForInvalidation ? BoundariesInvalidation : ParentOnlyInvalidation);
123 } 123 }
124 124
125 bool LayoutSVGResourceClipper::calculateClipContentPathIfNeeded() { 125 bool LayoutSVGResourceClipper::calculateClipContentPathIfNeeded() {
126 if (!m_clipContentPath.isEmpty()) 126 if (!m_clipContentPath.isEmpty())
127 return true; 127 return true;
128 128
129 // If the current clip-path gets clipped itself, we have to fallback to 129 // If the current clip-path gets clipped itself, we have to fallback to
130 // masking. 130 // masking.
131 if (styleRef().clipPath()) 131 if (styleRef().clipPath())
132 return false; 132 return false;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 toSVGClipPathElement(element())->calculateTransform( 303 toSVGClipPathElement(element())->calculateTransform(
304 SVGElement::IncludeMotionTransform); 304 SVGElement::IncludeMotionTransform);
305 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) { 305 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) {
306 transform.translate(referenceBox.x(), referenceBox.y()); 306 transform.translate(referenceBox.x(), referenceBox.y());
307 transform.scaleNonUniform(referenceBox.width(), referenceBox.height()); 307 transform.scaleNonUniform(referenceBox.width(), referenceBox.height());
308 } 308 }
309 return transform.mapRect(m_localClipBounds); 309 return transform.mapRect(m_localClipBounds);
310 } 310 }
311 311
312 } // namespace blink 312 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698