OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 28 matching lines...) Expand all Loading... |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 ALWAYS_INLINE ValidationMessage::ValidationMessage(HTMLFormControlElement* eleme
nt) | 41 ALWAYS_INLINE ValidationMessage::ValidationMessage(HTMLFormControlElement* eleme
nt) |
42 : m_element(element) | 42 : m_element(element) |
43 { | 43 { |
44 ASSERT(m_element); | 44 ASSERT(m_element); |
45 } | 45 } |
46 | 46 |
47 ValidationMessage::~ValidationMessage() | 47 ValidationMessage::~ValidationMessage() |
48 { | 48 { |
49 if (ValidationMessageClient* client = validationMessageClient()) | |
50 client->hideValidationMessage(*m_element); | |
51 } | 49 } |
52 | 50 |
53 PassOwnPtr<ValidationMessage> ValidationMessage::create(HTMLFormControlElement*
element) | 51 PassOwnPtr<ValidationMessage> ValidationMessage::create(HTMLFormControlElement*
element) |
54 { | 52 { |
55 return adoptPtr(new ValidationMessage(element)); | 53 return adoptPtr(new ValidationMessage(element)); |
56 } | 54 } |
57 | 55 |
58 ValidationMessageClient* ValidationMessage::validationMessageClient() const | 56 ValidationMessageClient* ValidationMessage::validationMessageClient() const |
59 { | 57 { |
60 Page* page = m_element->document().page(); | 58 Page* page = m_element->document().page(); |
(...skipping 21 matching lines...) Expand all Loading... |
82 } | 80 } |
83 | 81 |
84 bool ValidationMessage::isVisible() const | 82 bool ValidationMessage::isVisible() const |
85 { | 83 { |
86 if (ValidationMessageClient* client = validationMessageClient()) | 84 if (ValidationMessageClient* client = validationMessageClient()) |
87 return client->isValidationMessageVisible(*m_element); | 85 return client->isValidationMessageVisible(*m_element); |
88 return false; | 86 return false; |
89 } | 87 } |
90 | 88 |
91 } // namespace WebCore | 89 } // namespace WebCore |
OLD | NEW |