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

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

Issue 2265113002: More const LayoutObject references in SVGLayoutSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
6 * Copyright (C) 2008 Rob Buis <buis@kde.org> 6 * Copyright (C) 2008 Rob Buis <buis@kde.org>
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
9 * Copyright (C) 2012 Google Inc. 9 * Copyright (C) 2012 Google Inc.
10 * 10 *
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 if (hitTestAction != HitTestForeground) 289 if (hitTestAction != HitTestForeground)
290 return false; 290 return false;
291 291
292 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, r esult.hitTestRequest(), style()->pointerEvents()); 292 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, r esult.hitTestRequest(), style()->pointerEvents());
293 bool isVisible = (style()->visibility() == EVisibility::Visible); 293 bool isVisible = (style()->visibility() == EVisibility::Visible);
294 if (isVisible || !hitRules.requireVisible) { 294 if (isVisible || !hitRules.requireVisible) {
295 if ((hitRules.canHitBoundingBox && !objectBoundingBox().isEmpty()) 295 if ((hitRules.canHitBoundingBox && !objectBoundingBox().isEmpty())
296 || (hitRules.canHitStroke && (style()->svgStyle().hasStroke() || !hi tRules.requireStroke)) 296 || (hitRules.canHitStroke && (style()->svgStyle().hasStroke() || !hi tRules.requireStroke))
297 || (hitRules.canHitFill && (style()->svgStyle().hasFill() || !hitRul es.requireFill))) { 297 || (hitRules.canHitFill && (style()->svgStyle().hasFill() || !hitRul es.requireFill))) {
298 FloatPoint localPoint; 298 FloatPoint localPoint;
299 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, lo calToSVGParentTransform(), pointInParent, localPoint)) 299 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(*this, l ocalToSVGParentTransform(), pointInParent, localPoint))
300 return false; 300 return false;
301 301
302 HitTestLocation hitTestLocation(localPoint); 302 HitTestLocation hitTestLocation(localPoint);
303 if (LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), hitTestAction)) 303 if (LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), hitTestAction))
304 return true; 304 return true;
305 305
306 // Consider the bounding box if requested. 306 // Consider the bounding box if requested.
307 if (hitRules.canHitBoundingBox && objectBoundingBox().contains(local Point)) { 307 if (hitRules.canHitBoundingBox && objectBoundingBox().contains(local Point)) {
308 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPo int); 308 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPo int);
309 updateHitTestResult(result, localLayoutPoint); 309 updateHitTestResult(result, localLayoutPoint);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 } 393 }
394 394
395 void LayoutSVGText::invalidateTreeIfNeeded(const PaintInvalidationState& paintIn validationState) 395 void LayoutSVGText::invalidateTreeIfNeeded(const PaintInvalidationState& paintIn validationState)
396 { 396 {
397 // TODO(wangxianzhu): Verify if the inherited LayoutBoxModelObject::invalida teTreeIfNeeded() 397 // TODO(wangxianzhu): Verify if the inherited LayoutBoxModelObject::invalida teTreeIfNeeded()
398 // is applicable here. If yes, remove this overriding method. 398 // is applicable here. If yes, remove this overriding method.
399 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); 399 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState);
400 } 400 }
401 401
402 } // namespace blink 402 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698