| Index: sky/engine/core/html/parser/HTMLElementStack.cpp
|
| diff --git a/sky/engine/core/html/parser/HTMLElementStack.cpp b/sky/engine/core/html/parser/HTMLElementStack.cpp
|
| index db88829f6ad33980db9e5c56f009af7e5ff06cfe..38e3825d3ce67ceda957c5c43b36b0eba510c678 100644
|
| --- a/sky/engine/core/html/parser/HTMLElementStack.cpp
|
| +++ b/sky/engine/core/html/parser/HTMLElementStack.cpp
|
| @@ -46,6 +46,7 @@ HTMLElementStack::ElementRecord::~ElementRecord()
|
| HTMLElementStack::HTMLElementStack()
|
| : m_rootNode(nullptr)
|
| , m_stackDepth(0)
|
| + , m_preserveWhiteSpaceCount(0)
|
| {
|
| }
|
|
|
| @@ -57,6 +58,7 @@ void HTMLElementStack::popAll()
|
| {
|
| m_rootNode = nullptr;
|
| m_stackDepth = 0;
|
| + m_preserveWhiteSpaceCount = 0;
|
| while (m_top)
|
| m_top = m_top->releaseNext();
|
| }
|
| @@ -102,12 +104,18 @@ void HTMLElementStack::pushCommon(PassRefPtr<ContainerNode> node)
|
| {
|
| ASSERT(m_rootNode);
|
|
|
| + if (isHTMLTElement(node))
|
| + ++m_preserveWhiteSpaceCount;
|
| m_stackDepth++;
|
| m_top = adoptPtr(new ElementRecord(node, m_top.release()));
|
| }
|
|
|
| void HTMLElementStack::popCommon()
|
| {
|
| + if (isHTMLTElement(topNode())) {
|
| + ASSERT(m_preserveWhiteSpaceCount);
|
| + --m_preserveWhiteSpaceCount;
|
| + }
|
| m_top = m_top->releaseNext();
|
| m_stackDepth--;
|
| }
|
|
|