 Chromium Code Reviews
 Chromium Code Reviews Issue 316053007:
  Navigation transitions: Added notifyTransitionsShown and setupTransitionsView to WebLocalFrame  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 316053007:
  Navigation transitions: Added notifyTransitionsShown and setupTransitionsView to WebLocalFrame  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| Index: Source/web/WebLocalFrameImpl.cpp | 
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp | 
| index 1da9bd2f555b412039aabe83f3fb361836eefa02..1fe33298f01a83d219d61355a0f0faca9a140fc2 100644 | 
| --- a/Source/web/WebLocalFrameImpl.cpp | 
| +++ b/Source/web/WebLocalFrameImpl.cpp | 
| @@ -1333,6 +1333,27 @@ void WebLocalFrameImpl::addStyleSheetByURL(const WebString& url) | 
| frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCEPTION); | 
| } | 
| +void WebLocalFrameImpl::notifyTransitionShown(int elementsToHide) | 
| 
abarth-chromium
2014/06/21 05:38:36
Perhaps this function should be called "beginExitT
 
oystein (OOO til 10th of July)
2014/07/22 21:17:21
Done.
 | 
| +{ | 
| + frame()->loader().closeURL(); | 
| + | 
| + if (elementsToHide >= 0) | 
| + frame()->document()->hideTransitionElements((unsigned)elementsToHide); | 
| 
abarth-chromium
2014/06/21 05:38:36
Why randomly cast from signed to unsigned?  Will a
 | 
| + frame()->document()->setIsTransitionDocument(); | 
| + frame()->document()->styleEngine()->enableExitTransitionStylesheets(); | 
| +} | 
| + | 
| +void WebLocalFrameImpl::setupTransitionView(const WebData& markup) | 
| +{ | 
| + // Need this so that the transition UA stylesheet gets applied. | 
| + frame()->document()->setIsTransitionDocument(); | 
| + | 
| + ASSERT(document().securityOrigin().isUnique()); | 
| + frame()->document()->enforceSandboxFlags(SandboxAll); | 
| + | 
| + loadData(markup, WebString::fromUTF8("text/html"), WebString::fromUTF8("UTF-8"), document().url(), WebURL(), true); | 
| +} | 
| 
abarth-chromium
2014/06/21 05:38:36
These all seem like separate steps that the embedd
 
oystein (OOO til 10th of July)
2014/07/22 21:17:21
I moved the setIsTransitionDocument to a separate
 | 
| + | 
| void WebLocalFrameImpl::setCaretVisible(bool visible) | 
| { | 
| frame()->selection().setCaretVisible(visible); |