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

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

Issue 1140153006: Remove Navigation Transitions from Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed layout tests. Created 5 years, 7 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
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/StyleEngine.h » ('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 eccc2c96c6969f3bb364b998532f58091684dd81..7b3f130830225605ec8ecc38204ca6c364dc5caa 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -455,7 +455,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_sawElementsInKnownNamespaces(false)
, m_isSrcdocDocument(false)
, m_isMobileDocument(false)
- , m_isTransitionDocument(false)
, m_layoutView(0)
#if !ENABLE(OILPAN)
, m_weakFactory(this)
@@ -5468,75 +5467,6 @@ Element* Document::activeElement() const
return body();
}
-void Document::getTransitionElementData(Vector<TransitionElementData>& elementData)
-{
- if (!head())
- return;
-
- for (HTMLMetaElement* metaElement = Traversal<HTMLMetaElement>::firstChild(*head()); metaElement; metaElement = Traversal<HTMLMetaElement>::nextSibling(*metaElement)) {
- if (metaElement->name() != "transition-elements")
- continue;
-
- const String& metaElementContents = metaElement->content().string();
- size_t firstSemicolon = metaElementContents.find(';');
- if (firstSemicolon == kNotFound)
- continue;
-
- TrackExceptionState exceptionState;
- AtomicString selector(metaElementContents.substring(0, firstSemicolon));
- RefPtrWillBeRawPtr<StaticElementList> elementList = querySelectorAll(selector, exceptionState);
- if (!elementList || exceptionState.hadException())
- continue;
-
- unsigned nodeListLength = elementList->length();
- 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->boundsInViewportSpace();
- newElements.elements.append(transitionElement);
- }
-
- newElements.scope = metaElementContents.substring(firstSemicolon + 1).stripWhiteSpace();
- newElements.selector = selector;
- newElements.markup = markup.toString();
- elementData.append(newElements);
- }
-}
-
-void Document::updateElementOpacity(const AtomicString& cssSelector, double opacity)
-{
- TrackExceptionState exceptionState;
- RefPtrWillBeRawPtr<StaticElementList> elementList = querySelectorAll(cssSelector, exceptionState);
- if (elementList && !exceptionState.hadException()) {
- unsigned nodeListLength = elementList->length();
-
- for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) {
- Element* element = elementList->item(nodeIndex);
- element->setInlineStyleProperty(CSSPropertyOpacity, opacity, CSSPrimitiveValue::CSS_NUMBER);
- }
- }
-}
-
-void Document::hideTransitionElements(const AtomicString& cssSelector)
-{
- updateElementOpacity(cssSelector, 0.0);
-}
-
-void Document::showTransitionElements(const AtomicString& cssSelector)
-{
- updateElementOpacity(cssSelector, 1.0);
-}
-
bool Document::hasFocus() const
{
Page* page = this->page();
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698