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

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

Issue 1775363002: Avoiding losing too much precision when hit-testing SVG <text> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use HitTestLocation(const FloatPoint&) Created 4 years, 9 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) 2009 Google, Inc. 3 * Copyright (C) 2009 Google, Inc.
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (!localTransform.isInvertible()) 130 if (!localTransform.isInvertible())
131 return false; 131 return false;
132 132
133 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); 133 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent);
134 134
135 // Early exit if local point is not contained in clipped viewport area 135 // Early exit if local point is not contained in clipped viewport area
136 if (SVGLayoutSupport::isOverflowHidden(this) && !m_viewport.contains(localPo int)) 136 if (SVGLayoutSupport::isOverflowHidden(this) && !m_viewport.contains(localPo int))
137 return false; 137 return false;
138 138
139 // FOs establish a stacking context, so we need to hit-test all layers. 139 // FOs establish a stacking context, so we need to hit-test all layers.
140 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); 140 HitTestLocation hitTestLocation(localPoint);
141 return LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT estForeground) 141 return LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT estForeground)
142 || LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT estFloat) 142 || LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT estFloat)
143 || LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT estChildBlockBackgrounds); 143 || LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT estChildBlockBackgrounds);
144 } 144 }
145 145
146 } // namespace blink 146 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698