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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 16081007: Introduce toHTMLInputElement(Node*), and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
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 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 return info; 2210 return info;
2211 } 2211 }
2212 2212
2213 WebTextInputType WebViewImpl::textInputType() 2213 WebTextInputType WebViewImpl::textInputType()
2214 { 2214 {
2215 Node* node = focusedWebCoreNode(); 2215 Node* node = focusedWebCoreNode();
2216 if (!node) 2216 if (!node)
2217 return WebTextInputTypeNone; 2217 return WebTextInputTypeNone;
2218 2218
2219 if (node->hasTagName(HTMLNames::inputTag)) { 2219 if (node->hasTagName(HTMLNames::inputTag)) {
2220 HTMLInputElement* input = static_cast<HTMLInputElement*>(node); 2220 HTMLInputElement* input = toHTMLInputElement(node);
2221 2221
2222 if (input->isDisabledOrReadOnly()) 2222 if (input->isDisabledOrReadOnly())
2223 return WebTextInputTypeNone; 2223 return WebTextInputTypeNone;
2224 2224
2225 if (input->isPasswordField()) 2225 if (input->isPasswordField())
2226 return WebTextInputTypePassword; 2226 return WebTextInputTypePassword;
2227 if (input->isSearchField()) 2227 if (input->isSearchField())
2228 return WebTextInputTypeSearch; 2228 return WebTextInputTypeSearch;
2229 if (input->isEmailField()) 2229 if (input->isEmailField())
2230 return WebTextInputTypeEmail; 2230 return WebTextInputTypeEmail;
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
4088 } 4088 }
4089 4089
4090 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4090 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4091 { 4091 {
4092 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4092 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4093 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4093 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4094 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4094 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4095 } 4095 }
4096 4096
4097 } // namespace WebKit 4097 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebSearchableFormData.cpp ('k') | Source/core/accessibility/AccessibilityMediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698