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: add tests Created 6 years, 2 months 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return toIntSize(view->maximumScrollPosition()); 282 return toIntSize(view->maximumScrollPosition());
283 return WebSize(); 283 return WebSize();
284 } 284 }
285 285
286 void WebDocument::setIsTransitionDocument() 286 void WebDocument::setIsTransitionDocument()
287 { 287 {
288 // This ensures the transition UA stylesheet gets applied. 288 // This ensures the transition UA stylesheet gets applied.
289 unwrap<Document>()->setIsTransitionDocument(); 289 unwrap<Document>()->setIsTransitionDocument();
290 } 290 }
291 291
292 // TODO(zhenw): This will be removed once the Chrome side implementation is done
292 void WebDocument::beginExitTransition(const WebString& cssSelector) 293 void WebDocument::beginExitTransition(const WebString& cssSelector)
293 { 294 {
294 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 295 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
295 document->hideTransitionElements(cssSelector); 296 document->onTransitionElementOpacity(cssSelector, 0.0);
296 document->styleEngine()->enableExitTransitionStylesheets(); 297 document->styleEngine()->enableExitTransitionStylesheets();
297 } 298 }
298 299
300 void WebDocument::beginExitTransition(const WebString& cssSelector, const bool e xitToActivity)
301 {
302 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
303 if (!exitToActivity)
304 document->onTransitionElementOpacity(cssSelector, 0.0);
305 document->styleEngine()->enableExitTransitionStylesheets();
306 }
307
308 void WebDocument::revertExitTransition()
309 {
310 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
311 document->styleEngine()->disableExitTransitionStylesheets();
312 }
313
314 void WebDocument::onTransitionElementOpacity(const WebString& cssSelector, const double opacity)
315 {
316 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
317 document->onTransitionElementOpacity(cssSelector, opacity);
esprehn 2014/10/15 18:01:26 onFoo is not a verb.
Zhen Wang 2014/10/15 19:50:58 Done.
318 }
319
299 WebAXObject WebDocument::accessibilityObject() const 320 WebAXObject WebDocument::accessibilityObject() const
300 { 321 {
301 const Document* document = constUnwrap<Document>(); 322 const Document* document = constUnwrap<Document>();
302 AXObjectCache* cache = document->axObjectCache(); 323 AXObjectCache* cache = document->axObjectCache();
303 return cache ? WebAXObject(cache->getOrCreate(document->renderView())) : Web AXObject(); 324 return cache ? WebAXObject(cache->getOrCreate(document->renderView())) : Web AXObject();
304 } 325 }
305 326
306 WebAXObject WebDocument::accessibilityObjectFromID(int axID) const 327 WebAXObject WebDocument::accessibilityObjectFromID(int axID) const
307 { 328 {
308 const Document* document = constUnwrap<Document>(); 329 const Document* document = constUnwrap<Document>();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 m_private = elem; 379 m_private = elem;
359 return *this; 380 return *this;
360 } 381 }
361 382
362 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 383 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
363 { 384 {
364 return toDocument(m_private.get()); 385 return toDocument(m_private.get());
365 } 386 }
366 387
367 } // namespace blink 388 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698