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 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2516 flags |= WebTextInputFlagAutocorrectOn; | 2516 flags |= WebTextInputFlagAutocorrectOn; |
2517 else if (autocorrect == "off") | 2517 else if (autocorrect == "off") |
2518 flags |= WebTextInputFlagAutocorrectOff; | 2518 flags |= WebTextInputFlagAutocorrectOff; |
2519 | 2519 |
2520 SpellcheckAttributeState spellcheck = element->spellcheckAttributeState(); | 2520 SpellcheckAttributeState spellcheck = element->spellcheckAttributeState(); |
2521 if (spellcheck == SpellcheckAttributeTrue) | 2521 if (spellcheck == SpellcheckAttributeTrue) |
2522 flags |= WebTextInputFlagSpellcheckOn; | 2522 flags |= WebTextInputFlagSpellcheckOn; |
2523 else if (spellcheck == SpellcheckAttributeFalse) | 2523 else if (spellcheck == SpellcheckAttributeFalse) |
2524 flags |= WebTextInputFlagSpellcheckOff; | 2524 flags |= WebTextInputFlagSpellcheckOff; |
2525 | 2525 |
| 2526 if (isHTMLTextFormControlElement(element)) { |
| 2527 HTMLTextFormControlElement* formElement = static_cast<HTMLTextFormContro
lElement*>(element); |
| 2528 if (formElement->supportsAutocapitalize()) { |
| 2529 switch (formElement->autocapitalizeValue()) { |
| 2530 case TextFieldAutocapitalize::None: |
| 2531 flags |= WebTextInputFlagAutocapitalizeNone; |
| 2532 break; |
| 2533 case TextFieldAutocapitalize::Characters: |
| 2534 flags |= WebTextInputFlagAutocapitalizeCharacters; |
| 2535 break; |
| 2536 case TextFieldAutocapitalize::Words: |
| 2537 flags |= WebTextInputFlagAutocapitalizeWords; |
| 2538 break; |
| 2539 case TextFieldAutocapitalize::Sentences: |
| 2540 flags |= WebTextInputFlagAutocapitalizeSentences; |
| 2541 break; |
| 2542 case TextFieldAutocapitalize::Uninitialized: |
| 2543 ASSERT_NOT_REACHED(); |
| 2544 break; |
| 2545 } |
| 2546 } |
| 2547 } |
| 2548 |
2526 return flags; | 2549 return flags; |
2527 } | 2550 } |
2528 | 2551 |
2529 WebString WebViewImpl::inputModeOfFocusedElement() | 2552 WebString WebViewImpl::inputModeOfFocusedElement() |
2530 { | 2553 { |
2531 if (!RuntimeEnabledFeatures::inputModeAttributeEnabled()) | 2554 if (!RuntimeEnabledFeatures::inputModeAttributeEnabled()) |
2532 return WebString(); | 2555 return WebString(); |
2533 | 2556 |
2534 Element* element = focusedElement(); | 2557 Element* element = focusedElement(); |
2535 if (!element) | 2558 if (!element) |
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4679 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4702 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4680 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4703 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4681 } | 4704 } |
4682 | 4705 |
4683 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4706 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4684 { | 4707 { |
4685 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4708 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4686 } | 4709 } |
4687 | 4710 |
4688 } // namespace blink | 4711 } // namespace blink |
OLD | NEW |