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

Unified Diff: sky/engine/core/editing/TextIterator.cpp

Issue 759663003: Only allow one shadowRoot. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: ojan review. Created 6 years, 1 month 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/dom/shadow/ShadowRoot.idl ('k') | sky/engine/core/events/EventPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/TextIterator.cpp
diff --git a/sky/engine/core/editing/TextIterator.cpp b/sky/engine/core/editing/TextIterator.cpp
index a68f6c3196bbee9c1e869af83de26bc13b533c8d..a2f878558d49d68ab22fff6577fd9617d9ad26fd 100644
--- a/sky/engine/core/editing/TextIterator.cpp
+++ b/sky/engine/core/editing/TextIterator.cpp
@@ -461,23 +461,12 @@ void TextIterator::advance()
}
if (!next && !parentNode && m_shadowDepth > 0) {
- // 4. Reached the top of a shadow root. If it's created by author, then try to visit the next
- // sibling shadow root, if any.
+ // 4. Reached the top of a shadow root.
ShadowRoot* shadowRoot = toShadowRoot(m_node);
- ShadowRoot* nextShadowRoot = shadowRoot->olderShadowRoot();
- if (nextShadowRoot) {
- m_fullyClippedStack.pop();
- m_node = nextShadowRoot;
- m_iterationProgress = HandledNone;
- // m_shadowDepth is unchanged since we exit from a shadow root and enter another.
- pushFullyClippedState(m_fullyClippedStack, m_node);
- } else {
- // We are the last shadow root; exit from here and go back to where we were.
- m_node = shadowRoot->host();
- m_iterationProgress = HandledAuthorShadowRoots;
- --m_shadowDepth;
- m_fullyClippedStack.pop();
- }
+ m_node = shadowRoot->host();
+ m_iterationProgress = HandledAuthorShadowRoots;
+ --m_shadowDepth;
+ m_fullyClippedStack.pop();
continue;
}
}
« no previous file with comments | « sky/engine/core/dom/shadow/ShadowRoot.idl ('k') | sky/engine/core/events/EventPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698