Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2901203002: Rename VisualViewport properties to match updated spec (Closed)
Patch Set: Make methods const Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/Window.idl ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Window.idl ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698