| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 void setLastChangeWasNotUserEdit() { m_lastChangeWasUserEdit = false; } | 111 void setLastChangeWasNotUserEdit() { m_lastChangeWasUserEdit = false; } |
| 112 | 112 |
| 113 String valueWithHardLineBreaks() const; | 113 String valueWithHardLineBreaks() const; |
| 114 | 114 |
| 115 private: | 115 private: |
| 116 int computeSelectionStart() const; | 116 int computeSelectionStart() const; |
| 117 int computeSelectionEnd() const; | 117 int computeSelectionEnd() const; |
| 118 TextFieldSelectionDirection computeSelectionDirection() const; | 118 TextFieldSelectionDirection computeSelectionDirection() const; |
| 119 | 119 |
| 120 // FIXME: Author shadows should be allowed | |
| 121 // https://bugs.webkit.org/show_bug.cgi?id=92608 | |
| 122 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } | |
| 123 | |
| 124 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusDirection)
OVERRIDE; | 120 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusDirection)
OVERRIDE; |
| 125 virtual void dispatchBlurEvent(Element* newFocusedElement) OVERRIDE; | 121 virtual void dispatchBlurEvent(Element* newFocusedElement) OVERRIDE; |
| 126 | 122 |
| 127 // Returns true if user-editable value is empty. Used to check placeholder v
isibility. | 123 // Returns true if user-editable value is empty. Used to check placeholder v
isibility. |
| 128 virtual bool isEmptyValue() const = 0; | 124 virtual bool isEmptyValue() const = 0; |
| 129 // Returns true if suggested value is empty. Used to check placeholder visib
ility. | 125 // Returns true if suggested value is empty. Used to check placeholder visib
ility. |
| 130 virtual bool isEmptySuggestedValue() const { return true; } | 126 virtual bool isEmptySuggestedValue() const { return true; } |
| 131 // Called in dispatchFocusEvent(), after placeholder process, before calling
parent's dispatchFocusEvent(). | 127 // Called in dispatchFocusEvent(), after placeholder process, before calling
parent's dispatchFocusEvent(). |
| 132 virtual void handleFocusEvent(Element* /* oldFocusedNode */, FocusDirection)
{ } | 128 virtual void handleFocusEvent(Element* /* oldFocusedNode */, FocusDirection)
{ } |
| 133 // Called in dispatchBlurEvent(), after placeholder process, before calling
parent's dispatchBlurEvent(). | 129 // Called in dispatchBlurEvent(), after placeholder process, before calling
parent's dispatchBlurEvent(). |
| (...skipping 16 matching lines...) Expand all Loading... |
| 150 { | 146 { |
| 151 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTextFormControlElement(node)
); | 147 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTextFormControlElement(node)
); |
| 152 return static_cast<HTMLTextFormControlElement*>(node); | 148 return static_cast<HTMLTextFormControlElement*>(node); |
| 153 } | 149 } |
| 154 | 150 |
| 155 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); | 151 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); |
| 156 | 152 |
| 157 } // namespace | 153 } // namespace |
| 158 | 154 |
| 159 #endif | 155 #endif |
| OLD | NEW |