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

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

Issue 2342203004: Don't include LineLayoutItem.h from SVGTextContentElement.h. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTextContentElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 12 matching lines...) Expand all
23 #include "bindings/core/v8/ExceptionMessages.h" 23 #include "bindings/core/v8/ExceptionMessages.h"
24 #include "bindings/core/v8/ExceptionState.h" 24 #include "bindings/core/v8/ExceptionState.h"
25 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 25 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
26 #include "core/CSSPropertyNames.h" 26 #include "core/CSSPropertyNames.h"
27 #include "core/CSSValueKeywords.h" 27 #include "core/CSSValueKeywords.h"
28 #include "core/SVGNames.h" 28 #include "core/SVGNames.h"
29 #include "core/XMLNames.h" 29 #include "core/XMLNames.h"
30 #include "core/editing/FrameSelection.h" 30 #include "core/editing/FrameSelection.h"
31 #include "core/frame/LocalFrame.h" 31 #include "core/frame/LocalFrame.h"
32 #include "core/frame/UseCounter.h" 32 #include "core/frame/UseCounter.h"
33 #include "core/layout/api/LineLayoutItem.h"
33 #include "core/layout/svg/SVGTextQuery.h" 34 #include "core/layout/svg/SVGTextQuery.h"
34 35
35 namespace blink { 36 namespace blink {
36 37
37 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGLengthAd justType>() 38 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGLengthAd justType>()
38 { 39 {
39 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); 40 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ());
40 if (entries.isEmpty()) { 41 if (entries.isEmpty()) {
41 entries.append(std::make_pair(SVGLengthAdjustSpacing, "spacing")); 42 entries.append(std::make_pair(SVGLengthAdjustSpacing, "spacing"));
42 entries.append(std::make_pair(SVGLengthAdjustSpacingAndGlyphs, "spacingA ndGlyphs")); 43 entries.append(std::make_pair(SVGLengthAdjustSpacingAndGlyphs, "spacingA ndGlyphs"));
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 243 }
243 244
244 bool SVGTextContentElement::selfHasRelativeLengths() const 245 bool SVGTextContentElement::selfHasRelativeLengths() const
245 { 246 {
246 // Any element of the <text> subtree is advertized as using relative lengths . 247 // Any element of the <text> subtree is advertized as using relative lengths .
247 // On any window size change, we have to relayout the text subtree, as the 248 // On any window size change, we have to relayout the text subtree, as the
248 // effective 'on-screen' font size may change. 249 // effective 'on-screen' font size may change.
249 return true; 250 return true;
250 } 251 }
251 252
252 SVGTextContentElement* SVGTextContentElement::elementFromLineLayoutItem(LineLayo utItem lineLayoutItem) 253 SVGTextContentElement* SVGTextContentElement::elementFromLineLayoutItem(const Li neLayoutItem& lineLayoutItem)
253 { 254 {
254 if (!lineLayoutItem || (!lineLayoutItem.isSVGText() && !lineLayoutItem.isSVG Inline())) 255 if (!lineLayoutItem || (!lineLayoutItem.isSVGText() && !lineLayoutItem.isSVG Inline()))
255 return nullptr; 256 return nullptr;
256 257
257 SVGElement* element = toSVGElement(lineLayoutItem.node()); 258 SVGElement* element = toSVGElement(lineLayoutItem.node());
258 ASSERT(element); 259 ASSERT(element);
259 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element) : 0; 260 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element) : 0;
260 } 261 }
261 262
262 } // namespace blink 263 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTextContentElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698