OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2262 { | 2262 { |
2263 LOG(Media, "HTMLMediaElement::setLoop(%s)", boolString(b)); | 2263 LOG(Media, "HTMLMediaElement::setLoop(%s)", boolString(b)); |
2264 setBooleanAttribute(loopAttr, b); | 2264 setBooleanAttribute(loopAttr, b); |
2265 } | 2265 } |
2266 | 2266 |
2267 bool HTMLMediaElement::controls() const | 2267 bool HTMLMediaElement::controls() const |
2268 { | 2268 { |
2269 Frame* frame = document().frame(); | 2269 Frame* frame = document().frame(); |
2270 | 2270 |
2271 // always show controls when scripting is disabled | 2271 // always show controls when scripting is disabled |
2272 if (frame && !frame->script()->canExecuteScripts(NotAboutToExecuteScript)) | 2272 if (frame && !frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
2273 return true; | 2273 return true; |
2274 | 2274 |
2275 // Always show controls when in full screen mode. | 2275 // Always show controls when in full screen mode. |
2276 if (isFullscreen()) | 2276 if (isFullscreen()) |
2277 return true; | 2277 return true; |
2278 | 2278 |
2279 return fastHasAttribute(controlsAttr); | 2279 return fastHasAttribute(controlsAttr); |
2280 } | 2280 } |
2281 | 2281 |
2282 void HTMLMediaElement::setControls(bool b) | 2282 void HTMLMediaElement::setControls(bool b) |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3876 { | 3876 { |
3877 scheduleLayerUpdate(); | 3877 scheduleLayerUpdate(); |
3878 } | 3878 } |
3879 | 3879 |
3880 bool HTMLMediaElement::isInteractiveContent() const | 3880 bool HTMLMediaElement::isInteractiveContent() const |
3881 { | 3881 { |
3882 return fastHasAttribute(controlsAttr); | 3882 return fastHasAttribute(controlsAttr); |
3883 } | 3883 } |
3884 | 3884 |
3885 } | 3885 } |
OLD | NEW |