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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.h

Issue 1461193003: Revert of [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make patch applicable Created 5 years, 1 month 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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void rebuildMetricsForTextLayoutObject(LayoutSVGInlineText*); 52 void rebuildMetricsForTextLayoutObject(LayoutSVGInlineText*);
53 53
54 // Invoked whenever the underlying DOM tree changes, so that m_textPositions is rebuild. 54 // Invoked whenever the underlying DOM tree changes, so that m_textPositions is rebuild.
55 void clearTextPositioningElements() { m_textPositions.clear(); } 55 void clearTextPositioningElements() { m_textPositions.clear(); }
56 unsigned numberOfTextPositioningElements() const { return m_textPositions.si ze(); } 56 unsigned numberOfTextPositioningElements() const { return m_textPositions.si ze(); }
57 57
58 struct TextPosition { 58 struct TextPosition {
59 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 59 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
60 public: 60 public:
61 TextPosition(SVGTextPositioningElement* = nullptr, unsigned newStart = 0 , unsigned newLength = 0); 61 TextPosition(SVGTextPositioningElement* newElement = nullptr, unsigned n ewStart = 0, unsigned newLength = 0)
62 : element(newElement)
63 , start(newStart)
64 , length(newLength)
65 {
66 }
62 67
63 DECLARE_TRACE(); 68 DECLARE_TRACE();
64 69
65 RawPtrWillBeMember<SVGTextPositioningElement> element; 70 RawPtrWillBeMember<SVGTextPositioningElement> element;
66 unsigned start; 71 unsigned start;
67 unsigned length; 72 unsigned length;
68 }; 73 };
69 74
70 private: 75 private:
71 void buildCharacterDataMap(LayoutSVGText&); 76 void buildCharacterDataMap(LayoutSVGText&);
72 void collectTextPositioningElements(LayoutBoxModelObject&, UChar& lastCharac ter); 77 void collectTextPositioningElements(LayoutBoxModelObject&, UChar& lastCharac ter);
73 void fillCharacterDataMap(const TextPosition&); 78 void fillCharacterDataMap(const TextPosition&);
74 79
75 private: 80 private:
76 unsigned m_textLength; 81 unsigned m_textLength;
77 WillBePersistentHeapVector<TextPosition> m_textPositions; 82 WillBePersistentHeapVector<TextPosition> m_textPositions;
78 SVGCharacterDataMap m_characterDataMap; 83 SVGCharacterDataMap m_characterDataMap;
79 }; 84 };
80 85
81 } // namespace blink 86 } // namespace blink
82 87
83 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::SVGTextLayoutAttributesBuilder ::TextPosition); 88 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::SVGTextLayoutAttributesBuilder ::TextPosition);
84 89
85 #endif 90 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698