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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 714783003: Remove some straggling zoom-related code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | no next file » | 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) 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #include "wtf/CurrentTime.h" 104 #include "wtf/CurrentTime.h"
105 #include "wtf/RefPtr.h" 105 #include "wtf/RefPtr.h"
106 #include "wtf/TemporaryChange.h" 106 #include "wtf/TemporaryChange.h"
107 107
108 // Get rid of WTF's pow define so we can use std::pow. 108 // Get rid of WTF's pow define so we can use std::pow.
109 #undef pow 109 #undef pow
110 #include <cmath> // for std::pow 110 #include <cmath> // for std::pow
111 111
112 namespace blink { 112 namespace blink {
113 113
114 // Change the text zoom level by kTextSizeMultiplierRatio each time the user
115 // zooms text in or out (ie., change by 20%). The min and max values limit
116 // text zoom to half and 3x the original text size. These three values match
117 // those in Apple's port in WebKit/WebKit/WebView/WebView.mm
118 const double WebView::textSizeMultiplierRatio = 1.2;
119 const double WebView::minTextSizeMultiplier = 0.5;
120 const double WebView::maxTextSizeMultiplier = 3.0;
121
122 // WebView ---------------------------------------------------------------- 114 // WebView ----------------------------------------------------------------
123 115
124 WebView* WebView::create(WebViewClient* client) 116 WebView* WebView::create(WebViewClient* client)
125 { 117 {
126 // Pass the WebViewImpl's self-reference to the caller. 118 // Pass the WebViewImpl's self-reference to the caller.
127 return WebViewImpl::create(client); 119 return WebViewImpl::create(client);
128 } 120 }
129 121
130 WebViewImpl* WebViewImpl::create(WebViewClient* client) 122 WebViewImpl* WebViewImpl::create(WebViewClient* client)
131 { 123 {
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 // Safari documentation for -webkit-tap-highlight-color says if the spec ified color has 0 alpha, 725 // Safari documentation for -webkit-tap-highlight-color says if the spec ified color has 0 alpha,
734 // then tap highlighting is disabled. 726 // then tap highlighting is disabled.
735 // http://developer.apple.com/library/safari/#documentation/appleapplica tions/reference/safaricssref/articles/standardcssproperties.html 727 // http://developer.apple.com/library/safari/#documentation/appleapplica tions/reference/safaricssref/articles/standardcssproperties.html
736 if (!highlightColor.alpha()) 728 if (!highlightColor.alpha())
737 continue; 729 continue;
738 730
739 m_linkHighlights.append(LinkHighlight::create(node, this)); 731 m_linkHighlights.append(LinkHighlight::create(node, this));
740 } 732 }
741 } 733 }
742 734
743 void WebViewImpl::animateDoubleTapZoom(const IntPoint& point)
744 {
745 //FIXME(sky)
746 }
747
748 void WebViewImpl::zoomToFindInPageRect(const WebRect& rect)
749 {
750 //FIXME(sky)
751 }
752
753 bool WebViewImpl::zoomToMultipleTargetsRect(const WebRect& rect)
754 {
755 return false;
756 }
757
758 bool WebViewImpl::keyEventDefault(const WebKeyboardEvent& event) 735 bool WebViewImpl::keyEventDefault(const WebKeyboardEvent& event)
759 { 736 {
760 LocalFrame* frame = focusedCoreFrame(); 737 LocalFrame* frame = focusedCoreFrame();
761 if (!frame) 738 if (!frame)
762 return false; 739 return false;
763 740
764 switch (event.type) { 741 switch (event.type) {
765 case WebInputEvent::Char: 742 case WebInputEvent::Char:
766 if (event.windowsKeyCode == VKEY_SPACE) { 743 if (event.windowsKeyCode == VKEY_SPACE) {
767 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PR IOR : VKEY_NEXT); 744 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PR IOR : VKEY_NEXT);
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 m_layerTreeView->setVisible(visible); 2270 m_layerTreeView->setVisible(visible);
2294 } 2271 }
2295 } 2272 }
2296 2273
2297 bool WebViewImpl::shouldDisableDesktopWorkarounds() 2274 bool WebViewImpl::shouldDisableDesktopWorkarounds()
2298 { 2275 {
2299 return true; 2276 return true;
2300 } 2277 }
2301 2278
2302 } // namespace blink 2279 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698