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

Side by Side Diff: Source/core/layout/svg/SVGTextLayoutEngine.h

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
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 12 matching lines...) Expand all
23 #include "core/layout/svg/SVGTextChunkBuilder.h" 23 #include "core/layout/svg/SVGTextChunkBuilder.h"
24 #include "core/layout/svg/SVGTextFragment.h" 24 #include "core/layout/svg/SVGTextFragment.h"
25 #include "core/layout/svg/SVGTextLayoutAttributes.h" 25 #include "core/layout/svg/SVGTextLayoutAttributes.h"
26 #include "core/layout/svg/SVGTextMetrics.h" 26 #include "core/layout/svg/SVGTextMetrics.h"
27 #include "platform/graphics/Path.h" 27 #include "platform/graphics/Path.h"
28 #include "wtf/Vector.h" 28 #include "wtf/Vector.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 class LayoutObject; 32 class LayoutObject;
33 class LayoutStyle; 33 class ComputedStyle;
34 class LayoutSVGInlineText; 34 class LayoutSVGInlineText;
35 class SVGInlineTextBox; 35 class SVGInlineTextBox;
36 36
37 // SVGTextLayoutEngine performs the second layout phase for SVG text. 37 // SVGTextLayoutEngine performs the second layout phase for SVG text.
38 // 38 //
39 // The InlineBox tree was created, containing the text chunk information, necess ary to apply 39 // The InlineBox tree was created, containing the text chunk information, necess ary to apply
40 // certain SVG specific text layout properties (text-length adjustments and text -anchor). 40 // certain SVG specific text layout properties (text-length adjustments and text -anchor).
41 // The second layout phase uses the SVGTextLayoutAttributes stored in the indivi dual 41 // The second layout phase uses the SVGTextLayoutAttributes stored in the indivi dual
42 // LayoutSVGInlineText layoutObjects to compute the final positions for each cha racter 42 // LayoutSVGInlineText layoutObjects to compute the final positions for each cha racter
43 // which are stored in the SVGInlineTextBox objects. 43 // which are stored in the SVGInlineTextBox objects.
(...skipping 12 matching lines...) Expand all
56 void finishLayout(); 56 void finishLayout();
57 57
58 private: 58 private:
59 void updateCharacterPositionIfNeeded(float& x, float& y); 59 void updateCharacterPositionIfNeeded(float& x, float& y);
60 void updateCurrentTextPosition(float x, float y, float glyphAdvance); 60 void updateCurrentTextPosition(float x, float y, float glyphAdvance);
61 void updateRelativePositionAdjustmentsIfNeeded(float dx, float dy); 61 void updateRelativePositionAdjustmentsIfNeeded(float dx, float dy);
62 62
63 void recordTextFragment(SVGInlineTextBox*, const Vector<SVGTextMetrics>&); 63 void recordTextFragment(SVGInlineTextBox*, const Vector<SVGTextMetrics>&);
64 bool parentDefinesTextLength(LayoutObject*) const; 64 bool parentDefinesTextLength(LayoutObject*) const;
65 65
66 void layoutTextOnLineOrPath(SVGInlineTextBox*, const LayoutSVGInlineText&, c onst LayoutStyle&); 66 void layoutTextOnLineOrPath(SVGInlineTextBox*, const LayoutSVGInlineText&, c onst ComputedStyle&);
67 void finalizeTransformMatrices(Vector<SVGInlineTextBox*>&); 67 void finalizeTransformMatrices(Vector<SVGInlineTextBox*>&);
68 68
69 bool currentLogicalCharacterAttributes(SVGTextLayoutAttributes*&); 69 bool currentLogicalCharacterAttributes(SVGTextLayoutAttributes*&);
70 bool currentLogicalCharacterMetrics(SVGTextLayoutAttributes*&, SVGTextMetric s&); 70 bool currentLogicalCharacterMetrics(SVGTextLayoutAttributes*&, SVGTextMetric s&);
71 bool currentVisualCharacterMetrics(SVGInlineTextBox*, const Vector<SVGTextMe trics>&, SVGTextMetrics&); 71 bool currentVisualCharacterMetrics(SVGInlineTextBox*, const Vector<SVGTextMe trics>&, SVGTextMetrics&);
72 72
73 void advanceToNextLogicalCharacter(const SVGTextMetrics&); 73 void advanceToNextLogicalCharacter(const SVGTextMetrics&);
74 void advanceToNextVisualCharacter(const SVGTextMetrics&); 74 void advanceToNextVisualCharacter(const SVGTextMetrics&);
75 75
76 private: 76 private:
(...skipping 21 matching lines...) Expand all
98 float m_textPathLength; 98 float m_textPathLength;
99 float m_textPathStartOffset; 99 float m_textPathStartOffset;
100 float m_textPathCurrentOffset; 100 float m_textPathCurrentOffset;
101 float m_textPathSpacing; 101 float m_textPathSpacing;
102 float m_textPathScaling; 102 float m_textPathScaling;
103 }; 103 };
104 104
105 } // namespace blink 105 } // namespace blink
106 106
107 #endif 107 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/svg/SVGTextChunkBuilder.cpp ('k') | Source/core/layout/svg/SVGTextLayoutEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698