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

Unified Diff: ios/web/web_state/js/resources/core.js

Issue 1107083002: Upstream more leaf files in ios/web/web_state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-resync
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/js/crw_js_window_id_manager.mm ('k') | ios/web/web_state/web_state_observer_bridge.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/resources/core.js
diff --git a/ios/web/web_state/js/resources/core.js b/ios/web/web_state/js/resources/core.js
index 3d723234efb282242142526ea73180bf03454272..717fa1b5f54d9b18deabaf9fca06082ee7561f7f 100644
--- a/ios/web/web_state/js/resources/core.js
+++ b/ios/web/web_state/js/resources/core.js
@@ -42,8 +42,14 @@ new function() {
*/
var touchMargin_ = 25;
- __gCrWeb['innerSizeAsString'] = function() {
- return window.innerWidth + '/' + window.innerHeight;
+ __gCrWeb['getPageWidth'] = function() {
+ var documentElement = document.documentElement;
+ var documentBody = document.body;
+ return Math.max(documentElement.clientWidth,
+ documentElement.scrollWidth,
+ documentElement.offsetWidth,
+ documentBody.scrollWidth,
+ documentBody.offsetWidth);
};
// Implementation of document.elementFromPoint that is working for iOS4 and
« no previous file with comments | « ios/web/web_state/js/crw_js_window_id_manager.mm ('k') | ios/web/web_state/web_state_observer_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698