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

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: Remove unused include Created 7 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 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;
+ struct WordBoundaries {
+ WordBoundaries(int startIndex, int endIndex) : startIndex(startIndex), endIndex(endIndex) { }
+ int startIndex;
+ int endIndex;
+ };
+ enum AbstractInlineTextBoxDirection {
+ AbstractInlineTextBoxDirectionLR,
+ AbstractInlineTextBoxDirectionRL,
+ AbstractInlineTextBoxDirectionTB,
+ AbstractInlineTextBoxDirectionBT
+ };
+ AbstractInlineTextBox* firstInlineTextBox() const;
+ 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