| Index: third_party/WebKit/Source/core/editing/SurroundingText.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/SurroundingText.cpp b/third_party/WebKit/Source/core/editing/SurroundingText.cpp
|
| index 8c49e39bf8d5b552735dad55a354d1c46aabbcd7..e6534794fd2a6439503366a220cceae71a604044 100644
|
| --- a/third_party/WebKit/Source/core/editing/SurroundingText.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/SurroundingText.cpp
|
| @@ -104,15 +104,13 @@ void SurroundingText::initialize(const Position& startPosition,
|
| DCHECK(m_contentRange);
|
| }
|
|
|
| -Document* SurroundingText::document() const {
|
| - if (m_contentRange)
|
| - return &m_contentRange->ownerDocument();
|
| - return nullptr;
|
| -}
|
| -
|
| String SurroundingText::content() const {
|
| - if (m_contentRange)
|
| + if (m_contentRange) {
|
| + // SurroundingText is created with clean layout and must not be stored
|
| + // through DOM or style changes, so layout must still be clean here.
|
| + DCHECK(!m_contentRange->ownerDocument().needsLayoutTreeUpdate());
|
| return m_contentRange->text();
|
| + }
|
| return String();
|
| }
|
|
|
|
|