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 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2252 DisableCompositingQueryAsserts disabler; | 2252 DisableCompositingQueryAsserts disabler; |
2253 | 2253 |
2254 if (!document || !document->renderView()) { | 2254 if (!document || !document->renderView()) { |
2255 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's render view cannot be retrieved." : "The document provided is invalid.")
; | 2255 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's render view cannot be retrieved." : "The document provided is invalid.")
; |
2256 return; | 2256 return; |
2257 } | 2257 } |
2258 | 2258 |
2259 document->frame()->view()->updateLayoutAndStyleForPainting(); | 2259 document->frame()->view()->updateLayoutAndStyleForPainting(); |
2260 } | 2260 } |
2261 | 2261 |
2262 bool Internals::isCompositorFramePending(Document* document, ExceptionState& exc
eptionState) | |
2263 { | |
2264 if (!document || !document->renderView()) { | |
2265 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's render view cannot be retrieved." : "The document provided is invalid.")
; | |
2266 return false; | |
2267 } | |
2268 | |
2269 return document->page()->chrome().client().isCompositorFramePending(); | |
2270 } | |
2271 | |
2272 void Internals::setZoomFactor(float factor) | 2262 void Internals::setZoomFactor(float factor) |
2273 { | 2263 { |
2274 frame()->setPageZoomFactor(factor); | 2264 frame()->setPageZoomFactor(factor); |
2275 } | 2265 } |
2276 | 2266 |
2277 void Internals::setShouldRevealPassword(Element* element, bool reveal, Exception
State& exceptionState) | 2267 void Internals::setShouldRevealPassword(Element* element, bool reveal, Exception
State& exceptionState) |
2278 { | 2268 { |
2279 if (!isHTMLInputElement(element)) { | 2269 if (!isHTMLInputElement(element)) { |
2280 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Element")); | 2270 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Element")); |
2281 return; | 2271 return; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2352 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2342 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
2353 { | 2343 { |
2354 if (!node) | 2344 if (!node) |
2355 return String(); | 2345 return String(); |
2356 blink::WebPoint point(x, y); | 2346 blink::WebPoint point(x, y); |
2357 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); | 2347 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); |
2358 return surroundingText.content(); | 2348 return surroundingText.content(); |
2359 } | 2349 } |
2360 | 2350 |
2361 } | 2351 } |
OLD | NEW |