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

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

Issue 19096009: Use isHTMLTextAreaElement and toHTMLTextAreaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 | « Source/web/WebSearchableFormData.cpp ('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 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 if (input->isTimeField()) 2281 if (input->isTimeField())
2282 return WebTextInputTypeTime; 2282 return WebTextInputTypeTime;
2283 if (input->isWeekField()) 2283 if (input->isWeekField())
2284 return WebTextInputTypeWeek; 2284 return WebTextInputTypeWeek;
2285 if (input->isTextField()) 2285 if (input->isTextField())
2286 return WebTextInputTypeText; 2286 return WebTextInputTypeText;
2287 2287
2288 return WebTextInputTypeNone; 2288 return WebTextInputTypeNone;
2289 } 2289 }
2290 2290
2291 if (node->hasTagName(HTMLNames::textareaTag)) { 2291 if (isHTMLTextAreaElement(node)) {
2292 if (static_cast<HTMLTextAreaElement*>(node)->isDisabledOrReadOnly()) 2292 if (toHTMLTextAreaElement(node)->isDisabledOrReadOnly())
2293 return WebTextInputTypeNone; 2293 return WebTextInputTypeNone;
2294 return WebTextInputTypeTextArea; 2294 return WebTextInputTypeTextArea;
2295 } 2295 }
2296 2296
2297 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 2297 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
2298 if (node->isHTMLElement()) { 2298 if (node->isHTMLElement()) {
2299 HTMLElement* element = toHTMLElement(node); 2299 HTMLElement* element = toHTMLElement(node);
2300 if (element->isDateTimeFieldElement()) 2300 if (element->isDateTimeFieldElement())
2301 return WebTextInputTypeDateTimeField; 2301 return WebTextInputTypeDateTimeField;
2302 } 2302 }
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
4166 } 4166 }
4167 4167
4168 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4168 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4169 { 4169 {
4170 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4170 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4171 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4171 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4172 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4172 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4173 } 4173 }
4174 4174
4175 } // namespace WebKit 4175 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebSearchableFormData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698