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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 715653004: Navigation transitions (web to native app): Hide/Show transition elements (Blink side) (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 unified diff | Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 5641 matching lines...) Expand 10 before | Expand all | Expand 10 after
5652 if (elementList && !exceptionState.hadException()) { 5652 if (elementList && !exceptionState.hadException()) {
5653 unsigned nodeListLength = elementList->length(); 5653 unsigned nodeListLength = elementList->length();
5654 5654
5655 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) { 5655 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) {
5656 Element* element = elementList->item(nodeIndex); 5656 Element* element = elementList->item(nodeIndex);
5657 element->setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiv eValue::CSS_NUMBER); 5657 element->setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiv eValue::CSS_NUMBER);
5658 } 5658 }
5659 } 5659 }
5660 } 5660 }
5661 5661
5662 void Document::showTransitionElements(const AtomicString& cssSelector)
Nate Chapin 2014/11/11 22:18:56 It might be good to have a private helper to share
Zhen Wang 2014/11/11 22:55:58 Added a helper function, which updates element's o
5663 {
5664 TrackExceptionState exceptionState;
5665 RefPtrWillBeRawPtr<StaticElementList> elementList = querySelectorAll(cssSele ctor, exceptionState);
5666 if (elementList && !exceptionState.hadException()) {
5667 unsigned nodeListLength = elementList->length();
5668
5669 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) {
5670 Element* element = elementList->item(nodeIndex);
5671 element->setInlineStyleProperty(CSSPropertyOpacity, 1.0, CSSPrimitiv eValue::CSS_NUMBER);
5672 }
5673 }
5674 }
5675
5662 bool Document::hasFocus() const 5676 bool Document::hasFocus() const
5663 { 5677 {
5664 Page* page = this->page(); 5678 Page* page = this->page();
5665 if (!page) 5679 if (!page)
5666 return false; 5680 return false;
5667 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) 5681 if (!page->focusController().isActive() || !page->focusController().isFocuse d())
5668 return false; 5682 return false;
5669 Frame* focusedFrame = page->focusController().focusedFrame(); 5683 Frame* focusedFrame = page->focusController().focusedFrame();
5670 if (focusedFrame && focusedFrame->isLocalFrame()) { 5684 if (focusedFrame && focusedFrame->isLocalFrame()) {
5671 if (toLocalFrame(focusedFrame)->tree().isDescendantOf(frame())) 5685 if (toLocalFrame(focusedFrame)->tree().isDescendantOf(frame()))
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
5838 #ifndef NDEBUG 5852 #ifndef NDEBUG
5839 using namespace blink; 5853 using namespace blink;
5840 void showLiveDocumentInstances() 5854 void showLiveDocumentInstances()
5841 { 5855 {
5842 WeakDocumentSet& set = liveDocumentSet(); 5856 WeakDocumentSet& set = liveDocumentSet();
5843 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5857 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5844 for (Document* document : set) 5858 for (Document* document : set)
5845 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5859 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5846 } 5860 }
5847 #endif 5861 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698