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

Side by Side Diff: Source/core/rendering/RenderText.h

Issue 23983002: Expose InlineTextBoxes in the accessibility tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix include path Created 7 years, 2 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 void checkConsistency() const; 135 void checkConsistency() const;
136 136
137 bool isAllCollapsibleWhitespace() const; 137 bool isAllCollapsibleWhitespace() const;
138 138
139 bool canUseSimpleFontCodePath() const { return m_canUseSimpleFontCodePath; } 139 bool canUseSimpleFontCodePath() const { return m_canUseSimpleFontCodePath; }
140 bool knownToHaveNoOverflowAndNoFallbackFonts() const { return m_knownToHaveN oOverflowAndNoFallbackFonts; } 140 bool knownToHaveNoOverflowAndNoFallbackFonts() const { return m_knownToHaveN oOverflowAndNoFallbackFonts; }
141 141
142 void removeAndDestroyTextBoxes(); 142 void removeAndDestroyTextBoxes();
143 143
144 // High-level abstraction of InlineTextBox to allow the accessibility module to
145 // get information about InlineTextBoxes without tight coupling.
146 typedef InlineTextBox AbstractInlineTextBox;
eseidel 2013/10/03 20:36:55 So this actually isn't going to do anything. :) T
147 struct WordBoundaries {
148 WordBoundaries(int startIndex, int endIndex) : startIndex(startIndex), e ndIndex(endIndex) { }
149 int startIndex;
150 int endIndex;
151 };
152 enum AbstractInlineTextBoxDirection {
153 AbstractInlineTextBoxDirectionLR,
154 AbstractInlineTextBoxDirectionRL,
155 AbstractInlineTextBoxDirectionTB,
156 AbstractInlineTextBoxDirectionBT
157 };
158 AbstractInlineTextBox* firstInlineTextBox() const;
eseidel 2013/10/03 20:36:55 I might have moved this all out of RenderText into
leviw_travelin_and_unemployed 2013/10/03 20:42:07 This description is what I was expecting after the
dmazzoni 2013/10/04 07:56:09 Got it. That way we can really decouple it.
159 AbstractInlineTextBox* nextInlineTextBox(AbstractInlineTextBox*) const;
160 LayoutRect inlineTextBoxBounds(AbstractInlineTextBox*) const;
161 unsigned inlineTextBoxStart(AbstractInlineTextBox*) const;
162 unsigned inlineTextBoxLen(AbstractInlineTextBox*) const;
163 AbstractInlineTextBoxDirection inlineTextBoxDirection(AbstractInlineTextBox* ) const;
164 void inlineTextBoxCharacterWidths(AbstractInlineTextBox*, Vector<float>&) co nst;
165 void inlineTextBoxWordBoundaries(AbstractInlineTextBox*, Vector<WordBoundari es>&) const;
166 String inlineTextBoxText(AbstractInlineTextBox*) const;
167
144 protected: 168 protected:
145 virtual void computePreferredLogicalWidths(float leadWidth); 169 virtual void computePreferredLogicalWidths(float leadWidth);
146 virtual void willBeDestroyed(); 170 virtual void willBeDestroyed();
147 171
148 virtual void styleWillChange(StyleDifference, const RenderStyle*) OVERRIDE F INAL { } 172 virtual void styleWillChange(StyleDifference, const RenderStyle*) OVERRIDE F INAL { }
149 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 173 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
150 174
151 virtual void setTextInternal(PassRefPtr<StringImpl>); 175 virtual void setTextInternal(PassRefPtr<StringImpl>);
152 virtual UChar previousCharacter() const; 176 virtual UChar previousCharacter() const;
153 177
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 inline void RenderText::checkConsistency() const 262 inline void RenderText::checkConsistency() const
239 { 263 {
240 } 264 }
241 #endif 265 #endif
242 266
243 void applyTextTransform(const RenderStyle*, String&, UChar); 267 void applyTextTransform(const RenderStyle*, String&, UChar);
244 268
245 } // namespace WebCore 269 } // namespace WebCore
246 270
247 #endif // RenderText_h 271 #endif // RenderText_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698