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

Unified Diff: Source/core/dom/Document.cpp

Issue 316053007: Navigation transitions: Added notifyTransitionsShown and setupTransitionsView to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes Created 6 years, 6 months 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index d369a5ec7df561bb902763ea6f8a21b031f2bdde..05ac8fce845a05c40611a58d802f6072e6df8de4 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -5716,6 +5716,35 @@ Element* Document::activeElement() const
return body();
}
+void Document::hideTransitionElements(unsigned elementsToHide)
+{
+ unsigned currentValidTransitionElementsTag = 0;
+ for (HTMLMetaElement* metaElement = head() ? Traversal<HTMLMetaElement>::firstChild(*head()) : 0; metaElement; metaElement = Traversal<HTMLMetaElement>::nextSibling(*metaElement)) {
+ if (metaElement->name() != "transition-elements")
+ continue;
+
+ Vector<String> tokens;
+ metaElement->content().string().split(';', tokens);
+ if (tokens.size() != 2)
+ continue;
+
+ TrackExceptionState exceptionState;
+ RefPtr<NodeList> nodeList = querySelectorAll(AtomicString(tokens[0]), exceptionState);
+ if (nodeList && !exceptionState.hadException()) {
+ unsigned nodeListLength = nodeList->length();
+ if (!nodeListLength || elementsToHide != currentValidTransitionElementsTag++)
+ continue;
abarth-chromium 2014/06/21 05:38:36 What if the meta tag has changed since the caller
oystein (OOO til 10th of July) 2014/07/22 21:17:21 I've changed this to just pass around the CSS sele
+
+ for (unsigned nodeIdx = 0; nodeIdx < nodeListLength; ++nodeIdx) {
abarth-chromium 2014/06/21 05:38:36 nodeIndex
oystein (OOO til 10th of July) 2014/07/22 21:17:21 Done.
+ Node* node = nodeList->item(nodeIdx);
+ toElement(node)->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
abarth-chromium 2014/06/21 05:38:36 This all looks like something that could be better
+ }
+
+ return;
+ }
+ }
+}
+
bool Document::hasFocus() const
{
Page* page = this->page();

Powered by Google App Engine
This is Rietveld 408576698