Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: sky/engine/core/html/parser/HTMLElementStack.cpp

Issue 788113002: Simplify HTMLStyleElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/html/parser/HTMLElementStack.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a946b9b1f81095c6c8579d93c1729bfec1d35b46..db88829f6ad33980db9e5c56f009af7e5ff06cfe 100644
--- a/sky/engine/core/html/parser/HTMLElementStack.cpp
+++ b/sky/engine/core/html/parser/HTMLElementStack.cpp
@@ -57,12 +57,8 @@ void HTMLElementStack::popAll()
{
m_rootNode = nullptr;
m_stackDepth = 0;
- while (m_top) {
- Node& node = *topNode();
- if (node.isElementNode())
- toElement(node).finishParsingChildren();
+ while (m_top)
m_top = m_top->releaseNext();
- }
}
void HTMLElementStack::pop()
@@ -112,27 +108,10 @@ void HTMLElementStack::pushCommon(PassRefPtr<ContainerNode> node)
void HTMLElementStack::popCommon()
{
- top()->finishParsingChildren();
m_top = m_top->releaseNext();
m_stackDepth--;
}
-void HTMLElementStack::removeNonTopCommon(Element* element)
-{
- ASSERT(top() != element);
- for (ElementRecord* pos = m_top.get(); pos; pos = pos->next()) {
- if (pos->next()->element() == element) {
- // FIXME: Is it OK to call finishParsingChildren()
- // when the children aren't actually finished?
- element->finishParsingChildren();
- pos->setNext(pos->next()->releaseNext());
- m_stackDepth--;
- return;
- }
- }
- ASSERT_NOT_REACHED();
-}
-
#ifndef NDEBUG
void HTMLElementStack::show()
« no previous file with comments | « sky/engine/core/html/parser/HTMLElementStack.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698