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

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

Issue 654953002: Navigation transitions (web to native app): Get names and rects of transition elements (Step 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review fix 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 | « Source/core/dom/Document.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index ece3ad357e441e31d3b0a2ec63740864c965192b..eb0d5b7999a52fe2c2e715a6f26ef62fe0dd910a 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -61,6 +61,7 @@
#include "core/dom/AddConsoleMessageTask.h"
#include "core/dom/Attr.h"
#include "core/dom/CDATASection.h"
+#include "core/dom/ClientRect.h"
#include "core/dom/Comment.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/DOMImplementation.h"
@@ -5623,13 +5624,20 @@ void Document::getTransitionElementData(Vector<TransitionElementData>& elementDa
if (!nodeListLength)
continue;
+ TransitionElementData newElements;
StringBuilder markup;
for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) {
Element* element = elementList->item(nodeIndex);
markup.append(createStyledMarkupForNavigationTransition(element));
+ TransitionElement transitionElement;
+ if (element->hasID())
+ transitionElement.id = element->getIdAttribute().string();
+ else
+ transitionElement.id = "";
+ transitionElement.rect = element->boundsInRootViewSpace();
+ newElements.elements.append(transitionElement);
}
- TransitionElementData newElements;
newElements.scope = metaElementContents.substring(firstSemicolon + 1).stripWhiteSpace();
newElements.selector = selector;
newElements.markup = markup.toString();
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698