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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderText.h
diff --git a/Source/core/rendering/RenderText.h b/Source/core/rendering/RenderText.h
index 1a49794cf22450e687aded43e5773126fcb995d2..15ffbaa9c20a3435116d97c8c7d046775c112eef 100644
--- a/Source/core/rendering/RenderText.h
+++ b/Source/core/rendering/RenderText.h
@@ -141,6 +141,30 @@ public:
void removeAndDestroyTextBoxes();
+ // High-level abstraction of InlineTextBox to allow the accessibility module to
+ // get information about InlineTextBoxes without tight coupling.
+ typedef InlineTextBox AbstractInlineTextBox;
eseidel 2013/10/03 20:36:55 So this actually isn't going to do anything. :) T
+ struct WordBoundaries {
+ WordBoundaries(int startIndex, int endIndex) : startIndex(startIndex), endIndex(endIndex) { }
+ int startIndex;
+ int endIndex;
+ };
+ enum AbstractInlineTextBoxDirection {
+ AbstractInlineTextBoxDirectionLR,
+ AbstractInlineTextBoxDirectionRL,
+ AbstractInlineTextBoxDirectionTB,
+ AbstractInlineTextBoxDirectionBT
+ };
+ 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.
+ AbstractInlineTextBox* nextInlineTextBox(AbstractInlineTextBox*) const;
+ LayoutRect inlineTextBoxBounds(AbstractInlineTextBox*) const;
+ unsigned inlineTextBoxStart(AbstractInlineTextBox*) const;
+ unsigned inlineTextBoxLen(AbstractInlineTextBox*) const;
+ AbstractInlineTextBoxDirection inlineTextBoxDirection(AbstractInlineTextBox*) const;
+ void inlineTextBoxCharacterWidths(AbstractInlineTextBox*, Vector<float>&) const;
+ void inlineTextBoxWordBoundaries(AbstractInlineTextBox*, Vector<WordBoundaries>&) const;
+ String inlineTextBoxText(AbstractInlineTextBox*) const;
+
protected:
virtual void computePreferredLogicalWidths(float leadWidth);
virtual void willBeDestroyed();

Powered by Google App Engine
This is Rietveld 408576698