OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2542 | 2542 |
2543 WebString WebViewImpl::pageEncoding() const | 2543 WebString WebViewImpl::pageEncoding() const |
2544 { | 2544 { |
2545 if (!m_page) | 2545 if (!m_page) |
2546 return WebString(); | 2546 return WebString(); |
2547 | 2547 |
2548 // FIXME: Is this check needed? | 2548 // FIXME: Is this check needed? |
2549 if (!m_page->mainFrame()->document()->loader()) | 2549 if (!m_page->mainFrame()->document()->loader()) |
2550 return WebString(); | 2550 return WebString(); |
2551 | 2551 |
2552 return m_page->mainFrame()->document()->encoding(); | 2552 return m_page->mainFrame()->document()->encodingName(); |
2553 } | 2553 } |
2554 | 2554 |
2555 void WebViewImpl::setPageEncoding(const WebString& encodingName) | 2555 void WebViewImpl::setPageEncoding(const WebString& encodingName) |
2556 { | 2556 { |
2557 if (!m_page) | 2557 if (!m_page) |
2558 return; | 2558 return; |
2559 | 2559 |
2560 // Only change override encoding, don't change default encoding. | 2560 // Only change override encoding, don't change default encoding. |
2561 // Note that the new encoding must be 0 if it isn't supposed to be set. | 2561 // Note that the new encoding must be 0 if it isn't supposed to be set. |
2562 String newEncodingName; | 2562 String newEncodingName; |
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4118 } | 4118 } |
4119 | 4119 |
4120 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4120 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
4121 { | 4121 { |
4122 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4122 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); |
4123 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4123 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom |
4124 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4124 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); |
4125 } | 4125 } |
4126 | 4126 |
4127 } // namespace WebKit | 4127 } // namespace WebKit |
OLD | NEW |