Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index 50bfccb701b158c6c80e287d9936e622c79077fb..7e148051480e00659aa313a6e399da3ad07d82e0 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -5659,6 +5659,20 @@ void Document::hideTransitionElements(const AtomicString& cssSelector) |
| } |
| } |
| +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
|
| +{ |
| + 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, 1.0, CSSPrimitiveValue::CSS_NUMBER); |
| + } |
| + } |
| +} |
| + |
| bool Document::hasFocus() const |
| { |
| Page* page = this->page(); |