OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |