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

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: review fix 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
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/web/tests/WebDocumentTest.cpp » ('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) 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 return WebSize(); 277 return WebSize();
278 } 278 }
279 279
280 WebSize WebDocument::maximumScrollOffset() const 280 WebSize WebDocument::maximumScrollOffset() const
281 { 281 {
282 if (FrameView* view = constUnwrap<Document>()->view()) 282 if (FrameView* view = constUnwrap<Document>()->view())
283 return toIntSize(view->maximumScrollPosition()); 283 return toIntSize(view->maximumScrollPosition());
284 return WebSize(); 284 return WebSize();
285 } 285 }
286 286
287 // FIXME: This will be removed once Chrome side implementation is done.
287 void WebDocument::setIsTransitionDocument() 288 void WebDocument::setIsTransitionDocument()
288 { 289 {
289 // This ensures the transition UA stylesheet gets applied. 290 // This ensures the transition UA stylesheet gets applied.
290 unwrap<Document>()->setIsTransitionDocument(); 291 unwrap<Document>()->setIsTransitionDocument(true);
292 }
293
294 void WebDocument::setIsTransitionDocument(bool isTransitionDocument)
295 {
296 // When isTransitionDocument is true, it ensures the transition UA
297 // stylesheet gets applied. When isTransitionDocument is false, it ensures
298 // the transition UA stylesheet is not applied when reverting the transition .
299 unwrap<Document>()->setIsTransitionDocument(isTransitionDocument);
291 } 300 }
292 301
293 void WebDocument::beginExitTransition(const WebString& cssSelector, bool exitToN ativeApp) 302 void WebDocument::beginExitTransition(const WebString& cssSelector, bool exitToN ativeApp)
294 { 303 {
295 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 304 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
296 if (!exitToNativeApp) 305 if (!exitToNativeApp)
297 document->hideTransitionElements(cssSelector); 306 document->hideTransitionElements(cssSelector);
298 document->styleEngine()->enableExitTransitionStylesheets(); 307 document->styleEngine()->setExitTransitionStylesheetsEnabled(true);
308 }
309
310 void WebDocument::revertExitTransition()
311 {
312 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
313 document->styleEngine()->setExitTransitionStylesheetsEnabled(false);
299 } 314 }
300 315
301 void WebDocument::hideTransitionElements(const WebString& cssSelector) 316 void WebDocument::hideTransitionElements(const WebString& cssSelector)
302 { 317 {
303 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 318 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
304 document->hideTransitionElements(cssSelector); 319 document->hideTransitionElements(cssSelector);
305 } 320 }
306 321
307 void WebDocument::showTransitionElements(const WebString& cssSelector) 322 void WebDocument::showTransitionElements(const WebString& cssSelector)
308 { 323 {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 m_private = elem; 390 m_private = elem;
376 return *this; 391 return *this;
377 } 392 }
378 393
379 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 394 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
380 { 395 {
381 return toDocument(m_private.get()); 396 return toDocument(m_private.get());
382 } 397 }
383 398
384 } // namespace blink 399 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/web/tests/WebDocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698