Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebSurroundingText.cpp |
| diff --git a/third_party/WebKit/Source/web/WebSurroundingText.cpp b/third_party/WebKit/Source/web/WebSurroundingText.cpp |
| index 497251765e9751444098988dca7b50a379e065ed..446c48f3582f0f37f2e155eafb18a502c803b092 100644 |
| --- a/third_party/WebKit/Source/web/WebSurroundingText.cpp |
| +++ b/third_party/WebKit/Source/web/WebSurroundingText.cpp |
| @@ -58,6 +58,8 @@ void WebSurroundingText::initialize(const WebNode& webNode, |
| if (!node->layoutObject()) |
| return; |
| + // TODO(xiaochengh): The followinng SurroundingText can hold a null Range, |
| + // in which case we should prevent it from being stored in |m_privated|. |
|
tkent
2016/10/20 05:33:58
m_privated -> m_private
Xiaocheng
2016/10/20 05:37:49
Done.
|
| m_private.reset(new SurroundingText( |
| createVisiblePosition(node->layoutObject()->positionForPoint( |
| static_cast<IntPoint>(nodePoint))) |
| @@ -75,17 +77,14 @@ void WebSurroundingText::initializeFromCurrentSelection(WebLocalFrame* frame, |
| webFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| if (Range* range = createRange( |
| - webFrame->selection().selection().toNormalizedEphemeralRange())) |
| + webFrame->selection().selection().toNormalizedEphemeralRange())) { |
| + // TODO(xiaochengh): The followinng SurroundingText can hold a null Range, |
| + // in which case we should prevent it from being stored in |m_privated|. |
|
tkent
2016/10/20 05:33:58
m_privated -> m_private
Xiaocheng
2016/10/20 05:37:49
Done.
|
| m_private.reset(new SurroundingText(*range, maxLength)); |
| + } |
| } |
| WebString WebSurroundingText::textContent() const { |
| - DCHECK(m_private->document()); |
| - |
| - // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| - // needs to be audited. See http://crbug.com/590369 for more details. |
| - m_private->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| - |
| return m_private->content(); |
| } |