Chromium Code Reviews| Index: Source/core/dom/Text.cpp |
| diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp |
| index 1f155bc5926b1a4639bc1113bae1caf95dda2dcb..782e058b4871983231619023ff9cd21da213eda6 100644 |
| --- a/Source/core/dom/Text.cpp |
| +++ b/Source/core/dom/Text.cpp |
| @@ -277,6 +277,10 @@ bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& pa |
| if (style.preserveNewline()) // pre/pre-wrap/pre-line always make renderers. |
| return true; |
| + // childNeedsDistributionRecalc() here is rare, only happens JS calling surroundContents() etc. from DOMNodeInsertedIntoDocument etc. |
| + if (document().childNeedsDistributionRecalc()) |
|
hayato
2015/01/23 04:06:30
Could you help me to understand why it is okay to
kojii
2015/01/23 04:23:13
In short, this fix disables a non-essential memory
|
| + return true; |
| + |
| const RenderObject* prev = NodeRenderingTraversal::previousSiblingRenderer(*this); |
| if (prev && prev->isBR()) // <span><br/> <br/></span> |
| return false; |