OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 namespace WebCore { | 46 namespace WebCore { |
47 | 47 |
48 using namespace HTMLNames; | 48 using namespace HTMLNames; |
49 | 49 |
50 class RenderTextControlInnerBlock : public RenderBlock { | 50 class RenderTextControlInnerBlock : public RenderBlock { |
51 public: | 51 public: |
52 RenderTextControlInnerBlock(Node* node, bool isMultiLine) : RenderBlock(node
), m_multiLine(isMultiLine) { } | 52 RenderTextControlInnerBlock(Node* node, bool isMultiLine) : RenderBlock(node
), m_multiLine(isMultiLine) { } |
53 | 53 |
54 private: | 54 private: |
| 55 virtual bool hasLineIfEmpty() const { return true; } |
55 virtual VisiblePosition positionForPoint(const IntPoint&); | 56 virtual VisiblePosition positionForPoint(const IntPoint&); |
56 | 57 |
57 bool m_multiLine; | 58 bool m_multiLine; |
58 }; | 59 }; |
59 | 60 |
60 VisiblePosition RenderTextControlInnerBlock::positionForPoint(const IntPoint& po
int) | 61 VisiblePosition RenderTextControlInnerBlock::positionForPoint(const IntPoint& po
int) |
61 { | 62 { |
62 IntPoint contentsPoint(point); | 63 IntPoint contentsPoint(point); |
63 | 64 |
64 // Multiline text controls have the scroll on shadowAncestorNode, so we need
to take that | 65 // Multiline text controls have the scroll on shadowAncestorNode, so we need
to take that |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 488 |
488 if (m_state != Idle) | 489 if (m_state != Idle) |
489 speechInput()->cancelRecognition(m_listenerId); | 490 speechInput()->cancelRecognition(m_listenerId); |
490 | 491 |
491 TextControlInnerElement::detach(); | 492 TextControlInnerElement::detach(); |
492 } | 493 } |
493 | 494 |
494 #endif // ENABLE(INPUT_SPEECH) | 495 #endif // ENABLE(INPUT_SPEECH) |
495 | 496 |
496 } | 497 } |
OLD | NEW |