| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } | 234 } |
| 235 | 235 |
| 236 InternalSettings* Internals::settings() const | 236 InternalSettings* Internals::settings() const |
| 237 { | 237 { |
| 238 Document* document = contextDocument(); | 238 Document* document = contextDocument(); |
| 239 if (!document) | 239 if (!document) |
| 240 return 0; | 240 return 0; |
| 241 Page* page = document->page(); | 241 Page* page = document->page(); |
| 242 if (!page) | 242 if (!page) |
| 243 return 0; | 243 return 0; |
| 244 return InternalSettings::from(page); | 244 return InternalSettings::from(*page); |
| 245 } | 245 } |
| 246 | 246 |
| 247 InternalRuntimeFlags* Internals::runtimeFlags() const | 247 InternalRuntimeFlags* Internals::runtimeFlags() const |
| 248 { | 248 { |
| 249 return m_runtimeFlags.get(); | 249 return m_runtimeFlags.get(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 InternalProfilers* Internals::profilers() | 252 InternalProfilers* Internals::profilers() |
| 253 { | 253 { |
| 254 if (!m_profilers) | 254 if (!m_profilers) |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 WebCore::overrideUserPreferredLanguages(atomicLanguages); | 1256 WebCore::overrideUserPreferredLanguages(atomicLanguages); |
| 1257 } | 1257 } |
| 1258 | 1258 |
| 1259 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e
xceptionState) | 1259 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e
xceptionState) |
| 1260 { | 1260 { |
| 1261 if (!document) { | 1261 if (!document) { |
| 1262 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); | 1262 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); |
| 1263 return 0; | 1263 return 0; |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 return WheelController::from(document)->wheelEventHandlerCount(); | 1266 return WheelController::from(*document)->wheelEventHandlerCount(); |
| 1267 } | 1267 } |
| 1268 | 1268 |
| 1269 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e
xceptionState) | 1269 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e
xceptionState) |
| 1270 { | 1270 { |
| 1271 if (!document) { | 1271 if (!document) { |
| 1272 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); | 1272 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); |
| 1273 return 0; | 1273 return 0; |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); | 1276 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1997 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's page cannot be retrieved." : "No context document can be obtained."); | 1997 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's page cannot be retrieved." : "No context document can be obtained."); |
| 1998 return; | 1998 return; |
| 1999 } | 1999 } |
| 2000 document->page()->setIsCursorVisible(isVisible); | 2000 document->page()->setIsCursorVisible(isVisible); |
| 2001 } | 2001 } |
| 2002 | 2002 |
| 2003 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element*
element) | 2003 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element*
element) |
| 2004 { | 2004 { |
| 2005 if (!document) | 2005 if (!document) |
| 2006 return; | 2006 return; |
| 2007 FullscreenElementStack::from(document)->webkitWillEnterFullScreenForElement(
element); | 2007 FullscreenElementStack::from(*document).webkitWillEnterFullScreenForElement(
element); |
| 2008 } | 2008 } |
| 2009 | 2009 |
| 2010 void Internals::webkitDidEnterFullScreenForElement(Document* document, Element*
element) | 2010 void Internals::webkitDidEnterFullScreenForElement(Document* document, Element*
element) |
| 2011 { | 2011 { |
| 2012 if (!document) | 2012 if (!document) |
| 2013 return; | 2013 return; |
| 2014 FullscreenElementStack::from(document)->webkitDidEnterFullScreenForElement(e
lement); | 2014 FullscreenElementStack::from(*document).webkitDidEnterFullScreenForElement(e
lement); |
| 2015 } | 2015 } |
| 2016 | 2016 |
| 2017 void Internals::webkitWillExitFullScreenForElement(Document* document, Element*
element) | 2017 void Internals::webkitWillExitFullScreenForElement(Document* document, Element*
element) |
| 2018 { | 2018 { |
| 2019 if (!document) | 2019 if (!document) |
| 2020 return; | 2020 return; |
| 2021 FullscreenElementStack::from(document)->webkitWillExitFullScreenForElement(e
lement); | 2021 FullscreenElementStack::from(*document).webkitWillExitFullScreenForElement(e
lement); |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 void Internals::webkitDidExitFullScreenForElement(Document* document, Element* e
lement) | 2024 void Internals::webkitDidExitFullScreenForElement(Document* document, Element* e
lement) |
| 2025 { | 2025 { |
| 2026 if (!document) | 2026 if (!document) |
| 2027 return; | 2027 return; |
| 2028 FullscreenElementStack::from(document)->webkitDidExitFullScreenForElement(el
ement); | 2028 FullscreenElementStack::from(*document).webkitDidExitFullScreenForElement(el
ement); |
| 2029 } | 2029 } |
| 2030 | 2030 |
| 2031 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String&
scheme) | 2031 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String&
scheme) |
| 2032 { | 2032 { |
| 2033 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme); | 2033 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme); |
| 2034 } | 2034 } |
| 2035 | 2035 |
| 2036 void Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const
String& scheme) | 2036 void Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const
String& scheme) |
| 2037 { | 2037 { |
| 2038 SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(sc
heme); | 2038 SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(sc
heme); |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2364 }; | 2364 }; |
| 2365 | 2365 |
| 2366 } // namespace | 2366 } // namespace |
| 2367 | 2367 |
| 2368 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) | 2368 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) |
| 2369 { | 2369 { |
| 2370 return promise.then(AddOneFunction::create(context)); | 2370 return promise.then(AddOneFunction::create(context)); |
| 2371 } | 2371 } |
| 2372 | 2372 |
| 2373 } | 2373 } |
| OLD | NEW |