Chromium Code Reviews| Index: Source/core/layout/LayoutText.h |
| diff --git a/Source/core/layout/LayoutText.h b/Source/core/layout/LayoutText.h |
| index 155e94f12ffc32e402f961032a4a0dea535c713b..7d31eab7ba56475cfacafb66387302bd36a36100 100644 |
| --- a/Source/core/layout/LayoutText.h |
| +++ b/Source/core/layout/LayoutText.h |
| @@ -37,6 +37,20 @@ namespace blink { |
| class AbstractInlineTextBox; |
| class InlineTextBox; |
| +// LayoutText is the root class for anything that represents |
| +// a text node (see core/dom/Text.h). |
| +// |
| +// To limit memory overhead, this class inherits directly |
| +// from LayoutObject. It also means that it's mostly a |
| +// placeholder in the tree for the text node's content and |
| +// the line boxes. |
| +// |
| +// The actual layout of text is handled by the containing inline |
| +// or block flow, that will invoke the bidi algorithm to break the |
| +// text into lines (m_firstTextBox and m_lastTextBox). |
| +// See e.g. LayoutBlockFlow::layoutInlineChildren. |
|
eae
2015/08/27 22:22:25
It is probably worth pointing out that this class
|
| +// |
| +// The previous comment applies also for painting. |
| class CORE_EXPORT LayoutText : public LayoutObject { |
| public: |
| // FIXME: If the node argument is not a Text node or the string argument is |
| @@ -171,6 +185,7 @@ private: |
| // callers with a LayoutObject* can continue to use length(). |
| unsigned length() const final { return textLength(); } |
| + // See the class comment as to why we shouldn't call this function directly. |
| void paint(const PaintInfo&, const LayoutPoint&) final { ASSERT_NOT_REACHED(); } |
| void layout() final { ASSERT_NOT_REACHED(); } |
| bool nodeAtPoint(HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction) final { ASSERT_NOT_REACHED(); return false; } |