| 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 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 if (toHTMLTextAreaElement(*element).isDisabledOrReadOnly()) | 2544 if (toHTMLTextAreaElement(*element).isDisabledOrReadOnly()) |
| 2545 return WebTextInputTypeNone; | 2545 return WebTextInputTypeNone; |
| 2546 return WebTextInputTypeTextArea; | 2546 return WebTextInputTypeTextArea; |
| 2547 } | 2547 } |
| 2548 | 2548 |
| 2549 if (element->isHTMLElement()) { | 2549 if (element->isHTMLElement()) { |
| 2550 if (toHTMLElement(element)->isDateTimeFieldElement()) | 2550 if (toHTMLElement(element)->isDateTimeFieldElement()) |
| 2551 return WebTextInputTypeDateTimeField; | 2551 return WebTextInputTypeDateTimeField; |
| 2552 } | 2552 } |
| 2553 | 2553 |
| 2554 if (element->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable)) | 2554 if (element->isContentEditable()) |
| 2555 return WebTextInputTypeContentEditable; | 2555 return WebTextInputTypeContentEditable; |
| 2556 | 2556 |
| 2557 return WebTextInputTypeNone; | 2557 return WebTextInputTypeNone; |
| 2558 } | 2558 } |
| 2559 | 2559 |
| 2560 int WebViewImpl::textInputFlags() | 2560 int WebViewImpl::textInputFlags() |
| 2561 { | 2561 { |
| 2562 Element* element = focusedElement(); | 2562 Element* element = focusedElement(); |
| 2563 if (!element) | 2563 if (!element) |
| 2564 return WebTextInputFlagNone; | 2564 return WebTextInputFlagNone; |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4573 { | 4573 { |
| 4574 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4574 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4575 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4575 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4576 if (!page()) | 4576 if (!page()) |
| 4577 return 1; | 4577 return 1; |
| 4578 | 4578 |
| 4579 return page()->deviceScaleFactor(); | 4579 return page()->deviceScaleFactor(); |
| 4580 } | 4580 } |
| 4581 | 4581 |
| 4582 } // namespace blink | 4582 } // namespace blink |
| OLD | NEW |