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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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) 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 11 matching lines...) Expand all
22 #include "core/layout/svg/SVGLayoutSupport.h" 22 #include "core/layout/svg/SVGLayoutSupport.h"
23 #include "core/svg/SVGPathElement.h" 23 #include "core/svg/SVGPathElement.h"
24 #include "core/svg/SVGTextPathElement.h" 24 #include "core/svg/SVGTextPathElement.h"
25 #include "platform/graphics/Path.h" 25 #include "platform/graphics/Path.h"
26 26
27 namespace blink { 27 namespace blink {
28 28
29 TreeScope& treeScopeForIdResolution(const SVGElement& element) 29 TreeScope& treeScopeForIdResolution(const SVGElement& element)
30 { 30 {
31 if (SVGElement* correspondingElement = element.correspondingElement()) 31 if (SVGElement* correspondingElement = element.correspondingElement())
32 return correspondingElement->treeScope(); 32 return correspondingElement->treeScopeOrDocument();
33 return element.treeScope(); 33 return element.treeScopeOrDocument();
34 } 34 }
35 35
36 PathPositionMapper::PathPositionMapper(const Path& path) 36 PathPositionMapper::PathPositionMapper(const Path& path)
37 : m_positionCalculator(path) 37 : m_positionCalculator(path)
38 , m_pathLength(path.length()) 38 , m_pathLength(path.length())
39 { 39 {
40 } 40 }
41 41
42 PathPositionMapper::PositionType PathPositionMapper::pointAndNormalAtLength( 42 PathPositionMapper::PositionType PathPositionMapper::pointAndNormalAtLength(
43 float length, FloatPoint& point, float& angle) 43 float length, FloatPoint& point, float& angle)
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 { 92 {
93 const SVGLength& startOffset = *toSVGTextPathElement(node())->startOffset()- >currentValue(); 93 const SVGLength& startOffset = *toSVGTextPathElement(node())->startOffset()- >currentValue();
94 float textPathStartOffset = startOffset.valueAsPercentage(); 94 float textPathStartOffset = startOffset.valueAsPercentage();
95 if (startOffset.typeWithCalcResolved() == CSSPrimitiveValue::UnitType::Perce ntage) 95 if (startOffset.typeWithCalcResolved() == CSSPrimitiveValue::UnitType::Perce ntage)
96 textPathStartOffset *= pathLength; 96 textPathStartOffset *= pathLength;
97 97
98 return textPathStartOffset; 98 return textPathStartOffset;
99 } 99 }
100 100
101 } // namespace blink 101 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698