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

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

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return box; 283 return box;
284 } 284 }
285 285
286 bool LayoutSVGText::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& po intInParent, HitTestAction hitTestAction) 286 bool LayoutSVGText::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& po intInParent, HitTestAction hitTestAction)
287 { 287 {
288 // We only draw in the foreground phase, so we only hit-test then. 288 // We only draw in the foreground phase, so we only hit-test then.
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() == 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, lo calToSVGParentTransform(), 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))
(...skipping 89 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