OLD | NEW |
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 RootInlineBox* box = new SVGRootInlineBox(this); | 435 RootInlineBox* box = new SVGRootInlineBox(this); |
436 box->setHasVirtualLogicalHeight(); | 436 box->setHasVirtualLogicalHeight(); |
437 return box; | 437 return box; |
438 } | 438 } |
439 | 439 |
440 bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResul
t& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) | 440 bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResul
t& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) |
441 { | 441 { |
442 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, r
equest, style()->pointerEvents()); | 442 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, r
equest, style()->pointerEvents()); |
443 bool isVisible = (style()->visibility() == VISIBLE); | 443 bool isVisible = (style()->visibility() == VISIBLE); |
444 if (isVisible || !hitRules.requireVisible) { | 444 if (isVisible || !hitRules.requireVisible) { |
445 if ((hitRules.canHitStroke && (style()->svgStyle()->hasStroke() || !hitR
ules.requireStroke)) | 445 if ((hitRules.canHitBoundingBox && !objectBoundingBox().isEmpty()) |
| 446 || (hitRules.canHitStroke && (style()->svgStyle()->hasStroke() || !h
itRules.requireStroke)) |
446 || (hitRules.canHitFill && (style()->svgStyle()->hasFill() || !hitRu
les.requireFill))) { | 447 || (hitRules.canHitFill && (style()->svgStyle()->hasFill() || !hitRu
les.requireFill))) { |
447 FloatPoint localPoint = localToParentTransform().inverse().mapPoint(
pointInParent); | 448 FloatPoint localPoint = localToParentTransform().inverse().mapPoint(
pointInParent); |
448 | 449 |
449 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) | 450 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) |
450 return false; | 451 return false; |
| 452 if (hitRules.canHitBoundingBox && !objectBoundingBox().contains(loca
lPoint)) |
| 453 return false; |
451 | 454 |
452 HitTestLocation hitTestLocation(LayoutPoint(flooredIntPoint(localPoi
nt))); | 455 HitTestLocation hitTestLocation(LayoutPoint(flooredIntPoint(localPoi
nt))); |
453 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, La
youtPoint(), hitTestAction); | 456 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, La
youtPoint(), hitTestAction); |
454 } | 457 } |
455 } | 458 } |
456 | 459 |
457 return false; | 460 return false; |
458 } | 461 } |
459 | 462 |
460 bool RenderSVGText::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hit
TestLocation&, const LayoutPoint&, HitTestAction) | 463 bool RenderSVGText::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hit
TestLocation&, const LayoutPoint&, HitTestAction) |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 return 0; | 554 return 0; |
552 } | 555 } |
553 | 556 |
554 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl
e | 557 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl
e |
555 // in a SVG text element context. | 558 // in a SVG text element context. |
556 void RenderSVGText::updateFirstLetter() | 559 void RenderSVGText::updateFirstLetter() |
557 { | 560 { |
558 } | 561 } |
559 | 562 |
560 } | 563 } |
OLD | NEW |