| OLD | NEW |
| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 return WebSize(); | 296 return WebSize(); |
| 297 } | 297 } |
| 298 | 298 |
| 299 WebSize WebDocument::maximumScrollOffset() const | 299 WebSize WebDocument::maximumScrollOffset() const |
| 300 { | 300 { |
| 301 if (FrameView* view = constUnwrap<Document>()->view()) | 301 if (FrameView* view = constUnwrap<Document>()->view()) |
| 302 return toIntSize(view->maximumScrollPosition()); | 302 return toIntSize(view->maximumScrollPosition()); |
| 303 return WebSize(); | 303 return WebSize(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void WebDocument::setIsTransitionDocument(bool isTransitionDocument) | |
| 307 { | |
| 308 // When isTransitionDocument is true, it ensures the transition UA | |
| 309 // stylesheet gets applied. When isTransitionDocument is false, it ensures | |
| 310 // the transition UA stylesheet is not applied when reverting the transition
. | |
| 311 unwrap<Document>()->setIsTransitionDocument(isTransitionDocument); | |
| 312 } | |
| 313 | |
| 314 void WebDocument::beginExitTransition(const WebString& cssSelector, bool exitToN
ativeApp) | |
| 315 { | |
| 316 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); | |
| 317 if (!exitToNativeApp) | |
| 318 document->hideTransitionElements(cssSelector); | |
| 319 document->styleEngine().setExitTransitionStylesheetsEnabled(true); | |
| 320 } | |
| 321 | |
| 322 void WebDocument::revertExitTransition() | |
| 323 { | |
| 324 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); | |
| 325 document->styleEngine().setExitTransitionStylesheetsEnabled(false); | |
| 326 } | |
| 327 | |
| 328 void WebDocument::hideTransitionElements(const WebString& cssSelector) | |
| 329 { | |
| 330 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); | |
| 331 document->hideTransitionElements(cssSelector); | |
| 332 } | |
| 333 | |
| 334 void WebDocument::showTransitionElements(const WebString& cssSelector) | |
| 335 { | |
| 336 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); | |
| 337 document->showTransitionElements(cssSelector); | |
| 338 } | |
| 339 | |
| 340 WebAXObject WebDocument::accessibilityObject() const | 306 WebAXObject WebDocument::accessibilityObject() const |
| 341 { | 307 { |
| 342 const Document* document = constUnwrap<Document>(); | 308 const Document* document = constUnwrap<Document>(); |
| 343 AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache()); | 309 AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache()); |
| 344 return cache ? WebAXObject(cache->getOrCreate(document->layoutView())) : Web
AXObject(); | 310 return cache ? WebAXObject(cache->getOrCreate(document->layoutView())) : Web
AXObject(); |
| 345 } | 311 } |
| 346 | 312 |
| 347 WebAXObject WebDocument::accessibilityObjectFromID(int axID) const | 313 WebAXObject WebDocument::accessibilityObjectFromID(int axID) const |
| 348 { | 314 { |
| 349 const Document* document = constUnwrap<Document>(); | 315 const Document* document = constUnwrap<Document>(); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 m_private = elem; | 377 m_private = elem; |
| 412 return *this; | 378 return *this; |
| 413 } | 379 } |
| 414 | 380 |
| 415 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const | 381 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const |
| 416 { | 382 { |
| 417 return toDocument(m_private.get()); | 383 return toDocument(m_private.get()); |
| 418 } | 384 } |
| 419 | 385 |
| 420 } // namespace blink | 386 } // namespace blink |
| OLD | NEW |