| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // This function is called just before detaching the decoration. It must not | 58 // This function is called just before detaching the decoration. It must not |
| 59 // call functions which updating state of the specified HTMLInputElement | 59 // call functions which updating state of the specified HTMLInputElement |
| 60 // object. | 60 // object. |
| 61 virtual void willDetach(HTMLInputElement*) = 0; | 61 virtual void willDetach(HTMLInputElement*) = 0; |
| 62 | 62 |
| 63 virtual ~TextFieldDecorator(); | 63 virtual ~TextFieldDecorator(); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 // A TextFieldDecorationElement object must be in a shadow tree of an | 66 // A TextFieldDecorationElement object must be in a shadow tree of an |
| 67 // HTMLInputElement. | 67 // HTMLInputElement. |
| 68 class TextFieldDecorationElement : public HTMLDivElement { | 68 class TextFieldDecorationElement FINAL : public HTMLDivElement { |
| 69 public: | 69 public: |
| 70 static PassRefPtr<TextFieldDecorationElement> create(Document*, TextFieldDec
orator*); | 70 static PassRefPtr<TextFieldDecorationElement> create(Document*, TextFieldDec
orator*); |
| 71 static TextFieldDecorationElement* fromShadowRoot(ShadowRoot*); | 71 static TextFieldDecorationElement* fromShadowRoot(ShadowRoot*); |
| 72 TextFieldDecorator* textFieldDecorator() { return m_textFieldDecorator; } | 72 TextFieldDecorator* textFieldDecorator() { return m_textFieldDecorator; } |
| 73 void decorate(HTMLInputElement*, bool visible); | 73 void decorate(HTMLInputElement*, bool visible); |
| 74 | 74 |
| 75 virtual bool willRespondToMouseMoveEvents() OVERRIDE; | 75 virtual bool willRespondToMouseMoveEvents() OVERRIDE; |
| 76 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 76 virtual bool willRespondToMouseClickEvents() OVERRIDE; |
| 77 | 77 |
| 78 private: | 78 private: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 95 inline TextFieldDecorationElement* toTextFieldDecorationElement(Node* node) | 95 inline TextFieldDecorationElement* toTextFieldDecorationElement(Node* node) |
| 96 { | 96 { |
| 97 ASSERT(node); | 97 ASSERT(node); |
| 98 ASSERT_WITH_SECURITY_IMPLICATION(node->isElementNode()); | 98 ASSERT_WITH_SECURITY_IMPLICATION(node->isElementNode()); |
| 99 ASSERT_WITH_SECURITY_IMPLICATION(toElement(node)->isTextFieldDecoration()); | 99 ASSERT_WITH_SECURITY_IMPLICATION(toElement(node)->isTextFieldDecoration()); |
| 100 return static_cast<TextFieldDecorationElement*>(node); | 100 return static_cast<TextFieldDecorationElement*>(node); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } | 103 } |
| 104 #endif | 104 #endif |
| OLD | NEW |