| 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 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2250 margin_bottom, margin_left); | 2250 margin_bottom, margin_left); |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 float Internals::pageScaleFactor(ExceptionState& exception_state) { | 2253 float Internals::pageScaleFactor(ExceptionState& exception_state) { |
| 2254 if (!document_->GetPage()) { | 2254 if (!document_->GetPage()) { |
| 2255 exception_state.ThrowDOMException( | 2255 exception_state.ThrowDOMException( |
| 2256 kInvalidAccessError, "The document's page cannot be retrieved."); | 2256 kInvalidAccessError, "The document's page cannot be retrieved."); |
| 2257 return 0; | 2257 return 0; |
| 2258 } | 2258 } |
| 2259 Page* page = document_->GetPage(); | 2259 Page* page = document_->GetPage(); |
| 2260 return page->GetVisualViewport().PageScale(); | 2260 return page->GetVisualViewport().Scale(); |
| 2261 } | 2261 } |
| 2262 | 2262 |
| 2263 void Internals::setPageScaleFactor(float scale_factor, | 2263 void Internals::setPageScaleFactor(float scale_factor, |
| 2264 ExceptionState& exception_state) { | 2264 ExceptionState& exception_state) { |
| 2265 if (scale_factor <= 0) | 2265 if (scale_factor <= 0) |
| 2266 return; | 2266 return; |
| 2267 if (!document_->GetPage()) { | 2267 if (!document_->GetPage()) { |
| 2268 exception_state.ThrowDOMException( | 2268 exception_state.ThrowDOMException( |
| 2269 kInvalidAccessError, "The document's page cannot be retrieved."); | 2269 kInvalidAccessError, "The document's page cannot be retrieved."); |
| 2270 return; | 2270 return; |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3281 | 3281 |
| 3282 void Internals::crash() { | 3282 void Internals::crash() { |
| 3283 CHECK(false) << "Intentional crash"; | 3283 CHECK(false) << "Intentional crash"; |
| 3284 } | 3284 } |
| 3285 | 3285 |
| 3286 void Internals::setIsLowEndDevice(bool is_low_end_device) { | 3286 void Internals::setIsLowEndDevice(bool is_low_end_device) { |
| 3287 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); | 3287 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); |
| 3288 } | 3288 } |
| 3289 | 3289 |
| 3290 } // namespace blink | 3290 } // namespace blink |
| OLD | NEW |