| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); | 237 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); |
| 238 | 238 |
| 239 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) | 239 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) |
| 240 scrollingCoordinator->reset(); | 240 scrollingCoordinator->reset(); |
| 241 | 241 |
| 242 page->deprecatedLocalMainFrame()->view()->clear(); | 242 page->deprecatedLocalMainFrame()->view()->clear(); |
| 243 PlatformKeyboardEvent::setCurrentCapsLockState(PlatformKeyboardEvent::Overri
deCapsLockState::Default); | 243 PlatformKeyboardEvent::setCurrentCapsLockState(PlatformKeyboardEvent::Overri
deCapsLockState::Default); |
| 244 } | 244 } |
| 245 | 245 |
| 246 Internals::Internals(ScriptState* scriptState) | 246 Internals::Internals(ScriptState* scriptState) |
| 247 : ContextLifecycleObserver(scriptState->executionContext()) | 247 : ContextLifecycleObserver(scriptState->getExecutionContext()) |
| 248 , m_runtimeFlags(InternalRuntimeFlags::create()) | 248 , m_runtimeFlags(InternalRuntimeFlags::create()) |
| 249 { | 249 { |
| 250 } | 250 } |
| 251 | 251 |
| 252 Document* Internals::contextDocument() const | 252 Document* Internals::contextDocument() const |
| 253 { | 253 { |
| 254 return toDocument(executionContext()); | 254 return toDocument(getExecutionContext()); |
| 255 } | 255 } |
| 256 | 256 |
| 257 LocalFrame* Internals::frame() const | 257 LocalFrame* Internals::frame() const |
| 258 { | 258 { |
| 259 if (!contextDocument()) | 259 if (!contextDocument()) |
| 260 return 0; | 260 return 0; |
| 261 return contextDocument()->frame(); | 261 return contextDocument()->frame(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 InternalSettings* Internals::settings() const | 264 InternalSettings* Internals::settings() const |
| (...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2276 explicit AddOneFunction(ScriptState* scriptState) | 2276 explicit AddOneFunction(ScriptState* scriptState) |
| 2277 : ScriptFunction(scriptState) | 2277 : ScriptFunction(scriptState) |
| 2278 { | 2278 { |
| 2279 } | 2279 } |
| 2280 | 2280 |
| 2281 ScriptValue call(ScriptValue value) override | 2281 ScriptValue call(ScriptValue value) override |
| 2282 { | 2282 { |
| 2283 v8::Local<v8::Value> v8Value = value.v8Value(); | 2283 v8::Local<v8::Value> v8Value = value.v8Value(); |
| 2284 ASSERT(v8Value->IsNumber()); | 2284 ASSERT(v8Value->IsNumber()); |
| 2285 int intValue = v8Value.As<v8::Integer>()->Value(); | 2285 int intValue = v8Value.As<v8::Integer>()->Value(); |
| 2286 return ScriptValue(scriptState(), v8::Integer::New(scriptState()->isolat
e(), intValue + 1)); | 2286 return ScriptValue(getScriptState(), v8::Integer::New(getScriptState()->
isolate(), intValue + 1)); |
| 2287 } | 2287 } |
| 2288 }; | 2288 }; |
| 2289 | 2289 |
| 2290 } // namespace | 2290 } // namespace |
| 2291 | 2291 |
| 2292 ScriptPromise Internals::createResolvedPromise(ScriptState* scriptState, ScriptV
alue value) | 2292 ScriptPromise Internals::createResolvedPromise(ScriptState* scriptState, ScriptV
alue value) |
| 2293 { | 2293 { |
| 2294 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; | 2294 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; |
| 2295 ScriptPromise promise = resolver->promise(); | 2295 ScriptPromise promise = resolver->promise(); |
| 2296 resolver->resolve(value); | 2296 resolver->resolve(value); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2566 } | 2566 } |
| 2567 | 2567 |
| 2568 int Internals::getScrollAnimationState(Node* node) const | 2568 int Internals::getScrollAnimationState(Node* node) const |
| 2569 { | 2569 { |
| 2570 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2570 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2571 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); | 2571 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); |
| 2572 return -1; | 2572 return -1; |
| 2573 } | 2573 } |
| 2574 | 2574 |
| 2575 } // namespace blink | 2575 } // namespace blink |
| OLD | NEW |