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

Side by Side Diff: Source/web/WebDocument.cpp

Issue 653223002: Navigation transitions (web to native app): Revert exit transition (Blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return toIntSize(view->maximumScrollPosition()); 283 return toIntSize(view->maximumScrollPosition());
284 return WebSize(); 284 return WebSize();
285 } 285 }
286 286
287 void WebDocument::setIsTransitionDocument() 287 void WebDocument::setIsTransitionDocument()
288 { 288 {
289 // This ensures the transition UA stylesheet gets applied. 289 // This ensures the transition UA stylesheet gets applied.
290 unwrap<Document>()->setIsTransitionDocument(); 290 unwrap<Document>()->setIsTransitionDocument();
291 } 291 }
292 292
293 void WebDocument::resetIsTransitionDocument()
294 {
295 // This ensures the transition UA stylesheet is not applied when reverting t he transition.
296 unwrap<Document>()->resetIsTransitionDocument();
297 }
298
293 // FIXME: This will be removed once the Chrome side implementation is done 299 // FIXME: This will be removed once the Chrome side implementation is done
294 void WebDocument::beginExitTransition(const WebString& cssSelector) 300 void WebDocument::beginExitTransition(const WebString& cssSelector)
295 { 301 {
296 beginExitTransition(cssSelector, false); 302 beginExitTransition(cssSelector, false);
297 } 303 }
298 304
299 void WebDocument::beginExitTransition(const WebString& cssSelector, bool exitToN ativeApp) 305 void WebDocument::beginExitTransition(const WebString& cssSelector, bool exitToN ativeApp)
300 { 306 {
301 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 307 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
302 if (!exitToNativeApp) 308 if (!exitToNativeApp)
303 document->hideTransitionElements(cssSelector); 309 document->hideTransitionElements(cssSelector);
304 document->styleEngine()->enableExitTransitionStylesheets(); 310 document->styleEngine()->enableExitTransitionStylesheets();
305 } 311 }
306 312
313 void WebDocument::revertExitTransition()
314 {
315 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
316 document->styleEngine()->disableExitTransitionStylesheets();
317 }
318
307 void WebDocument::hideTransitionElements(const WebString& cssSelector) 319 void WebDocument::hideTransitionElements(const WebString& cssSelector)
308 { 320 {
309 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 321 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
310 document->hideTransitionElements(cssSelector); 322 document->hideTransitionElements(cssSelector);
311 } 323 }
312 324
313 void WebDocument::showTransitionElements(const WebString& cssSelector) 325 void WebDocument::showTransitionElements(const WebString& cssSelector)
314 { 326 {
315 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 327 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
316 document->showTransitionElements(cssSelector); 328 document->showTransitionElements(cssSelector);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 m_private = elem; 393 m_private = elem;
382 return *this; 394 return *this;
383 } 395 }
384 396
385 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 397 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
386 { 398 {
387 return toDocument(m_private.get()); 399 return toDocument(m_private.get());
388 } 400 }
389 401
390 } // namespace blink 402 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698