OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 return transform; | 501 return transform; |
502 } | 502 } |
503 | 503 |
504 float SVGLayoutSupport::calculateScreenFontSizeScalingFactor(const LayoutObject*
layoutObject) | 504 float SVGLayoutSupport::calculateScreenFontSizeScalingFactor(const LayoutObject*
layoutObject) |
505 { | 505 { |
506 ASSERT(layoutObject); | 506 ASSERT(layoutObject); |
507 | 507 |
508 // FIXME: trying to compute a device space transform at record time is wrong
. All clients | 508 // FIXME: trying to compute a device space transform at record time is wrong
. All clients |
509 // should be updated to avoid relying on this information, and the method sh
ould be removed. | 509 // should be updated to avoid relying on this information, and the method sh
ould be removed. |
510 AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * Su
btreeContentTransformScope::currentContentTransformation(); | 510 AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * Su
btreeContentTransformScope::currentContentTransformation(); |
511 ctm.scale(layoutObject->document().frameHost()->deviceScaleFactor()); | 511 ctm.scale(layoutObject->document().frameHost()->deviceScaleFactorDeprecated(
)); |
512 | 512 |
513 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); | 513 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); |
514 } | 514 } |
515 | 515 |
516 static inline bool compareCandidateDistance(const SearchCandidate& r1, const Sea
rchCandidate& r2) | 516 static inline bool compareCandidateDistance(const SearchCandidate& r1, const Sea
rchCandidate& r2) |
517 { | 517 { |
518 return r1.candidateDistance < r2.candidateDistance; | 518 return r1.candidateDistance < r2.candidateDistance; |
519 } | 519 } |
520 | 520 |
521 static inline float distanceToChildLayoutObject(LayoutObject* child, const Float
Point& point) | 521 static inline float distanceToChildLayoutObject(LayoutObject* child, const Float
Point& point) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 | 577 |
578 return closestText; | 578 return closestText; |
579 } | 579 } |
580 | 580 |
581 LayoutObject* SVGLayoutSupport::findClosestLayoutSVGText(LayoutObject* layoutObj
ect, const FloatPoint& point) | 581 LayoutObject* SVGLayoutSupport::findClosestLayoutSVGText(LayoutObject* layoutObj
ect, const FloatPoint& point) |
582 { | 582 { |
583 return searchTreeForFindClosestLayoutSVGText(layoutObject, point).candidateL
ayoutObject; | 583 return searchTreeForFindClosestLayoutSVGText(layoutObject, point).candidateL
ayoutObject; |
584 } | 584 } |
585 | 585 |
586 } // namespace blink | 586 } // namespace blink |
OLD | NEW |