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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1422513006: Simplify TouchAction enum to be a simple bit flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix computed style / layout tests and CR feedback Created 5 years, 1 month 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
OLDNEW
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 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after
2838 element->document().updateLayoutIgnorePendingStylesheets(); 2838 element->document().updateLayoutIgnorePendingStylesheets();
2839 2839
2840 bool zoomInToLegibleScale = m_webSettings->autoZoomFocusedNodeToLegibleScale () 2840 bool zoomInToLegibleScale = m_webSettings->autoZoomFocusedNodeToLegibleScale ()
2841 && !page()->frameHost().visualViewport().shouldDisableDesktopWorkarounds (); 2841 && !page()->frameHost().visualViewport().shouldDisableDesktopWorkarounds ();
2842 2842
2843 if (zoomInToLegibleScale) { 2843 if (zoomInToLegibleScale) {
2844 // When deciding whether to zoom in on a focused text box, we should dec ide not to 2844 // When deciding whether to zoom in on a focused text box, we should dec ide not to
2845 // zoom in if the user won't be able to zoom out. e.g if the textbox is within a 2845 // zoom in if the user won't be able to zoom out. e.g if the textbox is within a
2846 // touch-action: none container the user can't zoom back out. 2846 // touch-action: none container the user can't zoom back out.
2847 TouchAction action = TouchActionUtil::computeEffectiveTouchAction(*eleme nt); 2847 TouchAction action = TouchActionUtil::computeEffectiveTouchAction(*eleme nt);
2848 if (action != TouchActionAuto && !(action & TouchActionPinchZoom)) 2848 if (!(action & TouchActionPinchZoom))
2849 zoomInToLegibleScale = false; 2849 zoomInToLegibleScale = false;
2850 } 2850 }
2851 2851
2852 float scale; 2852 float scale;
2853 IntPoint scroll; 2853 IntPoint scroll;
2854 bool needAnimation; 2854 bool needAnimation;
2855 computeScaleAndScrollForFocusedNode(element, zoomInToLegibleScale, scale, sc roll, needAnimation); 2855 computeScaleAndScrollForFocusedNode(element, zoomInToLegibleScale, scale, sc roll, needAnimation);
2856 if (needAnimation) 2856 if (needAnimation)
2857 return startPageScaleAnimation(scroll, false, scale, scrollAndScaleAnima tionDurationInSeconds); 2857 return startPageScaleAnimation(scroll, false, scale, scrollAndScaleAnima tionDurationInSeconds);
2858 2858
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
4431 if (m_pageColorOverlay) 4431 if (m_pageColorOverlay)
4432 m_pageColorOverlay->update(); 4432 m_pageColorOverlay->update();
4433 if (InspectorOverlay* overlay = inspectorOverlay()) { 4433 if (InspectorOverlay* overlay = inspectorOverlay()) {
4434 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); 4434 PageOverlay* inspectorPageOverlay = overlay->pageOverlay();
4435 if (inspectorPageOverlay) 4435 if (inspectorPageOverlay)
4436 inspectorPageOverlay->update(); 4436 inspectorPageOverlay->update();
4437 } 4437 }
4438 } 4438 }
4439 4439
4440 } // namespace blink 4440 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/AssertMatchingEnums.cpp ('k') | third_party/WebKit/public/web/WebTouchAction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698