OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005-2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005-2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2006 David Smith (catfish.man@gmail.com) | 3 * Copyright (C) 2006 David Smith (catfish.man@gmail.com) |
4 * Copyright (C) 2010 Igalia S.L | 4 * Copyright (C) 2010 Igalia S.L |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 6266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6277 [_private->fullscreenController exitFullscreen]; | 6277 [_private->fullscreenController exitFullscreen]; |
6278 [_private->fullscreenController release]; | 6278 [_private->fullscreenController release]; |
6279 _private->fullscreenController = nil; | 6279 _private->fullscreenController = nil; |
6280 } | 6280 } |
6281 | 6281 |
6282 #endif | 6282 #endif |
6283 | 6283 |
6284 #if ENABLE(FULLSCREEN_API) | 6284 #if ENABLE(FULLSCREEN_API) |
6285 - (BOOL)_supportsFullScreenForElement:(const WebCore::Element*)element withKeybo
ard:(BOOL)withKeyboard | 6285 - (BOOL)_supportsFullScreenForElement:(const WebCore::Element*)element withKeybo
ard:(BOOL)withKeyboard |
6286 { | 6286 { |
| 6287 if (withKeyboard) |
| 6288 return NO; |
| 6289 |
6287 if (![[WebPreferences standardPreferences] fullScreenEnabled]) | 6290 if (![[WebPreferences standardPreferences] fullScreenEnabled]) |
6288 return NO; | 6291 return NO; |
6289 | 6292 |
| 6293 // FIXME: If the element is in an IFrame, we should ensure it has |
| 6294 // an AllowsFullScreen=YES attribute before allowing fullscreen access. |
6290 return YES; | 6295 return YES; |
6291 } | 6296 } |
6292 | 6297 |
6293 - (void)_enterFullScreenForElement:(WebCore::Element*)element | 6298 - (void)_enterFullScreenForElement:(WebCore::Element*)element |
6294 { | 6299 { |
6295 if (!_private->newFullscreenController) | 6300 if (!_private->newFullscreenController) |
6296 _private->newFullscreenController = [[WebFullScreenController alloc] ini
t]; | 6301 _private->newFullscreenController = [[WebFullScreenController alloc] ini
t]; |
6297 | 6302 |
6298 [_private->newFullscreenController setElement:element]; | 6303 [_private->newFullscreenController setElement:element]; |
6299 [_private->newFullscreenController setWebView:self]; | 6304 [_private->newFullscreenController setWebView:self]; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6487 { | 6492 { |
6488 #ifdef BUILDING_ON_LEOPARD | 6493 #ifdef BUILDING_ON_LEOPARD |
6489 if (!WKAppVersionCheckLessThan(@"com.apple.mail", -1, 4.0)) | 6494 if (!WKAppVersionCheckLessThan(@"com.apple.mail", -1, 4.0)) |
6490 return; | 6495 return; |
6491 Method methodToPatch = class_getInstanceMethod(objc_getRequiredClass("DOMNod
e"), @selector(recursivelyRemoveMailAttributes:convertObjectsToImages:convertEdi
tableElements:)); | 6496 Method methodToPatch = class_getInstanceMethod(objc_getRequiredClass("DOMNod
e"), @selector(recursivelyRemoveMailAttributes:convertObjectsToImages:convertEdi
tableElements:)); |
6492 if (!methodToPatch) | 6497 if (!methodToPatch) |
6493 return; | 6498 return; |
6494 originalRecursivelyRemoveMailAttributesImp = method_setImplementation(method
ToPatch, reinterpret_cast<IMP>(recursivelyRemoveMailAttributes)); | 6499 originalRecursivelyRemoveMailAttributesImp = method_setImplementation(method
ToPatch, reinterpret_cast<IMP>(recursivelyRemoveMailAttributes)); |
6495 #endif | 6500 #endif |
6496 } | 6501 } |
OLD | NEW |