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 2305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2316 return; | 2316 return; |
2317 } | 2317 } |
2318 | 2318 |
2319 document->updateLayout(); | 2319 document->updateLayout(); |
2320 | 2320 |
2321 RenderView* view = document->renderView(); | 2321 RenderView* view = document->renderView(); |
2322 if (view->compositor()) | 2322 if (view->compositor()) |
2323 view->compositor()->updateCompositingLayers(); | 2323 view->compositor()->updateCompositingLayers(); |
2324 } | 2324 } |
2325 | 2325 |
| 2326 bool Internals::isCompositorFramePending(Document* document, ExceptionState& exc
eptionState) |
| 2327 { |
| 2328 if (!document || !document->renderView()) { |
| 2329 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's render view cannot be retrieved." : "The document provided is invalid.")
; |
| 2330 return false; |
| 2331 } |
| 2332 |
| 2333 return document->page()->chrome().client().isCompositorFramePending(); |
| 2334 } |
| 2335 |
2326 void Internals::setZoomFactor(float factor) | 2336 void Internals::setZoomFactor(float factor) |
2327 { | 2337 { |
2328 frame()->setPageZoomFactor(factor); | 2338 frame()->setPageZoomFactor(factor); |
2329 } | 2339 } |
2330 | 2340 |
2331 void Internals::setShouldRevealPassword(Element* element, bool reveal, Exception
State& exceptionState) | 2341 void Internals::setShouldRevealPassword(Element* element, bool reveal, Exception
State& exceptionState) |
2332 { | 2342 { |
2333 if (!element || !element->hasTagName(inputTag)) { | 2343 if (!element || !element->hasTagName(inputTag)) { |
2334 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 2344 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
2335 return; | 2345 return; |
(...skipping 29 matching lines...) Expand all Loading... |
2365 }; | 2375 }; |
2366 | 2376 |
2367 } // namespace | 2377 } // namespace |
2368 | 2378 |
2369 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) | 2379 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) |
2370 { | 2380 { |
2371 return promise.then(AddOneFunction::create(context)); | 2381 return promise.then(AddOneFunction::create(context)); |
2372 } | 2382 } |
2373 | 2383 |
2374 } | 2384 } |
OLD | NEW |