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

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

Issue 2858913002: Simplify the SVGGraphicsElement ...CTM methods (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGGraphicsElement.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 Google, Inc. 5 * Copyright (C) 2014 Google, Inc.
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 GeometryMatchingMode mode) const { 325 GeometryMatchingMode mode) const {
326 LayoutObject* layout_object = element.GetLayoutObject(); 326 LayoutObject* layout_object = element.GetLayoutObject();
327 DCHECK(!layout_object || layout_object->Style()); 327 DCHECK(!layout_object || layout_object->Style());
328 if (!layout_object || 328 if (!layout_object ||
329 layout_object->Style()->PointerEvents() == EPointerEvents::kNone) 329 layout_object->Style()->PointerEvents() == EPointerEvents::kNone)
330 return false; 330 return false;
331 331
332 if (!IsIntersectionOrEnclosureTarget(layout_object)) 332 if (!IsIntersectionOrEnclosureTarget(layout_object))
333 return false; 333 return false;
334 334
335 AffineTransform ctm = ToSVGGraphicsElement(element).ComputeCTM( 335 AffineTransform ctm =
336 kAncestorScope, kDisallowStyleUpdate, this); 336 ToSVGGraphicsElement(element).ComputeCTM(kAncestorScope, this);
337 FloatRect mapped_repaint_rect = 337 FloatRect mapped_repaint_rect =
338 ctm.MapRect(layout_object->VisualRectInLocalSVGCoordinates()); 338 ctm.MapRect(layout_object->VisualRectInLocalSVGCoordinates());
339 339
340 bool result = false; 340 bool result = false;
341 switch (mode) { 341 switch (mode) {
342 case kCheckIntersection: 342 case kCheckIntersection:
343 result = IntersectsAllowingEmpty(rect, mapped_repaint_rect); 343 result = IntersectsAllowingEmpty(rect, mapped_repaint_rect);
344 break; 344 break;
345 case kCheckEnclosure: 345 case kCheckEnclosure:
346 result = rect.Contains(mapped_repaint_rect); 346 result = rect.Contains(mapped_repaint_rect);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 visitor->Trace(width_); 764 visitor->Trace(width_);
765 visitor->Trace(height_); 765 visitor->Trace(height_);
766 visitor->Trace(translation_); 766 visitor->Trace(translation_);
767 visitor->Trace(time_container_); 767 visitor->Trace(time_container_);
768 visitor->Trace(view_spec_); 768 visitor->Trace(view_spec_);
769 SVGGraphicsElement::Trace(visitor); 769 SVGGraphicsElement::Trace(visitor);
770 SVGFitToViewBox::Trace(visitor); 770 SVGFitToViewBox::Trace(visitor);
771 } 771 }
772 772
773 } // namespace blink 773 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGGraphicsElement.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698