| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011, 2012 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // The returned size has the page zoom factor applied. | 297 // The returned size has the page zoom factor applied. |
| 298 virtual WebSize contentsPreferredMinimumSize() = 0; | 298 virtual WebSize contentsPreferredMinimumSize() = 0; |
| 299 | 299 |
| 300 // The ratio of the current device's screen DPI to the target device's scree
n DPI. | 300 // The ratio of the current device's screen DPI to the target device's scree
n DPI. |
| 301 virtual float deviceScaleFactor() const = 0; | 301 virtual float deviceScaleFactor() const = 0; |
| 302 | 302 |
| 303 // Sets the ratio as computed by computePageScaleConstraints. | 303 // Sets the ratio as computed by computePageScaleConstraints. |
| 304 virtual void setDeviceScaleFactor(float) = 0; | 304 virtual void setDeviceScaleFactor(float) = 0; |
| 305 | 305 |
| 306 | 306 |
| 307 // Fixed Layout -------------------------------------------------------- | 307 // Layout size ----------------------------------------------------------- |
| 308 | 308 |
| 309 // In fixed layout mode, the layout of the page is independent of the | 309 // Locks the main frame's layout size to a fixed value and causes |
| 310 // view port size, given by WebWidget::size(). | 310 // it to ignore the viewport arguments/window resize. Setting width |
| 311 // and height to 0 will remove the lock and renable viewport/resize. |
| 312 virtual void setFixedLayoutSize(const WebSize&) = 0; |
| 311 | 313 |
| 312 virtual bool isFixedLayoutModeEnabled() const = 0; | 314 // TODO: Remove once Chrome side changes land |
| 313 virtual void enableFixedLayoutMode(bool enable) = 0; | 315 virtual void enableFixedLayoutMode(bool enable) { } |
| 314 | 316 virtual bool isFixedLayoutModeEnabled() { return true; } |
| 315 virtual WebSize fixedLayoutSize() const = 0; | |
| 316 virtual void setFixedLayoutSize(const WebSize&) = 0; | |
| 317 | 317 |
| 318 | 318 |
| 319 // Auto-Resize ----------------------------------------------------------- | 319 // Auto-Resize ----------------------------------------------------------- |
| 320 | 320 |
| 321 // In auto-resize mode, the view is automatically adjusted to fit the html | 321 // In auto-resize mode, the view is automatically adjusted to fit the html |
| 322 // content within the given bounds. | 322 // content within the given bounds. |
| 323 virtual void enableAutoResizeMode( | 323 virtual void enableAutoResizeMode( |
| 324 const WebSize& minSize, | 324 const WebSize& minSize, |
| 325 const WebSize& maxSize) = 0; | 325 const WebSize& maxSize) = 0; |
| 326 | 326 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 519 |
| 520 // Testing functionality for TestRunner --------------------------------- | 520 // Testing functionality for TestRunner --------------------------------- |
| 521 | 521 |
| 522 protected: | 522 protected: |
| 523 ~WebView() {} | 523 ~WebView() {} |
| 524 }; | 524 }; |
| 525 | 525 |
| 526 } // namespace WebKit | 526 } // namespace WebKit |
| 527 | 527 |
| 528 #endif | 528 #endif |
| OLD | NEW |