OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void Internals::setForceCompositingMode(Document* document, bool enabled, Except
ionCode& ec) | 241 void Internals::setForceCompositingMode(Document* document, bool enabled, Except
ionCode& ec) |
242 { | 242 { |
243 if (!document || !document->settings()) { | 243 if (!document || !document->settings()) { |
244 ec = INVALID_ACCESS_ERR; | 244 ec = INVALID_ACCESS_ERR; |
245 return; | 245 return; |
246 } | 246 } |
247 | 247 |
248 document->settings()->setForceCompositingMode(enabled); | 248 document->settings()->setForceCompositingMode(enabled); |
249 } | 249 } |
250 | 250 |
| 251 void Internals::setEnableCompositingForScrollableFrames(Document* document, bool
enabled, ExceptionCode& ec) |
| 252 { |
| 253 if (!document || !document->settings()) { |
| 254 ec = INVALID_ACCESS_ERR; |
| 255 return; |
| 256 } |
| 257 |
| 258 document->settings()->setAcceleratedCompositingForScrollableFramesEnabled(en
abled); |
| 259 } |
| 260 |
251 void Internals::setEnableScrollAnimator(Document* document, bool enabled, Except
ionCode& ec) | 261 void Internals::setEnableScrollAnimator(Document* document, bool enabled, Except
ionCode& ec) |
252 { | 262 { |
253 if (!document || !document->settings()) { | 263 if (!document || !document->settings()) { |
254 ec = INVALID_ACCESS_ERR; | 264 ec = INVALID_ACCESS_ERR; |
255 return; | 265 return; |
256 } | 266 } |
257 | 267 |
258 #if ENABLE(SMOOTH_SCROLLING) | 268 #if ENABLE(SMOOTH_SCROLLING) |
259 document->settings()->setEnableScrollAnimator(enabled); | 269 document->settings()->setEnableScrollAnimator(enabled); |
260 #else | 270 #else |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 return 0; | 478 return 0; |
469 } | 479 } |
470 | 480 |
471 size_t unusedLocation = 0; | 481 size_t unusedLocation = 0; |
472 size_t length = 0; | 482 size_t length = 0; |
473 TextIterator::getLocationAndLengthFromRange(scope, range, unusedLocation, le
ngth); | 483 TextIterator::getLocationAndLengthFromRange(scope, range, unusedLocation, le
ngth); |
474 return length; | 484 return length; |
475 } | 485 } |
476 | 486 |
477 } | 487 } |
OLD | NEW |