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

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

Issue 18094004: change WebViewImpl::inputModeOfFocusedElement to return lowered string. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: add comment to WebTextInputInfo Created 7 years, 5 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
« no previous file with comments | « no previous file | Source/WebKit/chromium/tests/data/input_mode_default_url.html » ('j') | 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 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 2307
2308 WebString WebViewImpl::inputModeOfFocusedElement() 2308 WebString WebViewImpl::inputModeOfFocusedElement()
2309 { 2309 {
2310 Node* node = focusedWebCoreNode(); 2310 Node* node = focusedWebCoreNode();
2311 if (!node) 2311 if (!node)
2312 return WebString(); 2312 return WebString();
2313 2313
2314 if (node->hasTagName(HTMLNames::inputTag)) { 2314 if (node->hasTagName(HTMLNames::inputTag)) {
2315 const HTMLInputElement* input = toHTMLInputElement(node); 2315 const HTMLInputElement* input = toHTMLInputElement(node);
2316 if (input->supportsInputModeAttribute()) 2316 if (input->supportsInputModeAttribute())
2317 return input->fastGetAttribute(HTMLNames::inputmodeAttr); 2317 return input->fastGetAttribute(HTMLNames::inputmodeAttr).lower();
2318 return WebString(); 2318 return WebString();
2319 } 2319 }
2320 if (isHTMLTextAreaElement(node)) { 2320 if (isHTMLTextAreaElement(node)) {
2321 const HTMLTextAreaElement* textarea = toHTMLTextAreaElement(node); 2321 const HTMLTextAreaElement* textarea = toHTMLTextAreaElement(node);
2322 return textarea->fastGetAttribute(HTMLNames::inputmodeAttr); 2322 return textarea->fastGetAttribute(HTMLNames::inputmodeAttr).lower();
2323 } 2323 }
2324 2324
2325 return WebString(); 2325 return WebString();
2326 } 2326 }
2327 2327
2328 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const 2328 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const
2329 { 2329 {
2330 const Frame* frame = focusedWebCoreFrame(); 2330 const Frame* frame = focusedWebCoreFrame();
2331 if (!frame) 2331 if (!frame)
2332 return false; 2332 return false;
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 } 4163 }
4164 4164
4165 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4165 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4166 { 4166 {
4167 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4167 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4168 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4168 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4169 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4169 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4170 } 4170 }
4171 4171
4172 } // namespace WebKit 4172 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | Source/WebKit/chromium/tests/data/input_mode_default_url.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698