| Index: third_party/WebKit/Source/core/layout/LayoutText.h
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutText.h b/third_party/WebKit/Source/core/layout/LayoutText.h
|
| index e5b27c3e00d0ddbbbf96eb276807b334de6c27e0..550ab2dd3a52861e9372cdc3e0955f52accf931c 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutText.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutText.h
|
| @@ -23,6 +23,7 @@
|
| #ifndef LayoutText_h
|
| #define LayoutText_h
|
|
|
| +#include <iterator>
|
| #include "core/CoreExport.h"
|
| #include "core/dom/Text.h"
|
| #include "core/layout/LayoutObject.h"
|
| @@ -352,6 +353,39 @@ inline LayoutText* Text::GetLayoutObject() const {
|
| return ToLayoutText(CharacterData::GetLayoutObject());
|
| }
|
|
|
| +// Represents list of |InlineTextBox| objects associated to |LayoutText| in
|
| +// layout order.
|
| +class InlineTextBoxRange {
|
| + public:
|
| + class Iterator
|
| + : public std::iterator<std::input_iterator_tag, InlineTextBox*> {
|
| + public:
|
| + explicit Iterator(InlineTextBox*);
|
| + Iterator(const Iterator&) = default;
|
| +
|
| + Iterator& operator++();
|
| + InlineTextBox* operator*() const;
|
| +
|
| + bool operator==(const Iterator& other) const {
|
| + return current_ == other.current_;
|
| + }
|
| + bool operator!=(const Iterator& other) const { return !operator==(other); }
|
| +
|
| + private:
|
| + InlineTextBox* current_;
|
| + };
|
| +
|
| + explicit InlineTextBoxRange(const LayoutText&);
|
| +
|
| + Iterator begin() const { return Iterator(layout_text_->FirstTextBox()); }
|
| + Iterator end() const { return Iterator(nullptr); }
|
| +
|
| + private:
|
| + const LayoutText* layout_text_;
|
| +};
|
| +
|
| +InlineTextBoxRange InlineTextBoxesOf(const LayoutText&);
|
| +
|
| void ApplyTextTransform(const ComputedStyle*, String&, UChar);
|
|
|
| } // namespace blink
|
|
|