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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 #include "config.h" | 25 #include "config.h" |
26 #include "HTMLTextFormControlElement.h" | 26 #include "HTMLTextFormControlElement.h" |
27 | 27 |
28 #include "AXObjectCache.h" | 28 #include "AXObjectCache.h" |
29 #include "Attribute.h" | 29 #include "Attribute.h" |
30 #include "ChromeClient.h" | 30 #include "ChromeClient.h" |
31 #include "Document.h" | 31 #include "Document.h" |
32 #include "Event.h" | 32 #include "Event.h" |
33 #include "EventNames.h" | 33 #include "EventNames.h" |
34 #include "FeatureObserver.h" | 34 #include "UseCounter.h" |
35 #include "Frame.h" | 35 #include "Frame.h" |
36 #include "HTMLBRElement.h" | 36 #include "HTMLBRElement.h" |
37 #include "HTMLFormElement.h" | 37 #include "HTMLFormElement.h" |
38 #include "HTMLInputElement.h" | 38 #include "HTMLInputElement.h" |
39 #include "HTMLNames.h" | 39 #include "HTMLNames.h" |
40 #include "NodeRenderingContext.h" | 40 #include "NodeRenderingContext.h" |
41 #include "NodeTraversal.h" | 41 #include "NodeTraversal.h" |
42 #include "RenderBox.h" | 42 #include "RenderBox.h" |
43 #include "RenderTextControl.h" | 43 #include "RenderTextControl.h" |
44 #include "RenderTheme.h" | 44 #include "RenderTheme.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 if (Frame* frame = document()->frame()) { | 504 if (Frame* frame = document()->frame()) { |
505 if (frame->selection()->isRange() && userTriggered) | 505 if (frame->selection()->isRange() && userTriggered) |
506 dispatchEvent(Event::create(eventNames().selectEvent, true, false)); | 506 dispatchEvent(Event::create(eventNames().selectEvent, true, false)); |
507 } | 507 } |
508 } | 508 } |
509 | 509 |
510 void HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const
AtomicString& value) | 510 void HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const
AtomicString& value) |
511 { | 511 { |
512 if (name == placeholderAttr) { | 512 if (name == placeholderAttr) { |
513 updatePlaceholderVisibility(true); | 513 updatePlaceholderVisibility(true); |
514 FeatureObserver::observe(document(), FeatureObserver::PlaceholderAttribu
te); | 514 UseCounter::observe(document(), UseCounter::PlaceholderAttribute); |
515 } else | 515 } else |
516 HTMLFormControlElementWithState::parseAttribute(name, value); | 516 HTMLFormControlElementWithState::parseAttribute(name, value); |
517 } | 517 } |
518 | 518 |
519 bool HTMLTextFormControlElement::lastChangeWasUserEdit() const | 519 bool HTMLTextFormControlElement::lastChangeWasUserEdit() const |
520 { | 520 { |
521 if (!isTextFormControl()) | 521 if (!isTextFormControl()) |
522 return false; | 522 return false; |
523 return m_lastChangeWasUserEdit; | 523 return m_lastChangeWasUserEdit; |
524 } | 524 } |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 } | 673 } |
674 | 674 |
675 void HTMLTextFormControlElement::reportMemoryUsage(MemoryObjectInfo* memoryObjec
tInfo) const | 675 void HTMLTextFormControlElement::reportMemoryUsage(MemoryObjectInfo* memoryObjec
tInfo) const |
676 { | 676 { |
677 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 677 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
678 HTMLFormControlElementWithState::reportMemoryUsage(memoryObjectInfo); | 678 HTMLFormControlElementWithState::reportMemoryUsage(memoryObjectInfo); |
679 info.addMember(m_textAsOfLastFormControlChangeEvent, "textAsOfLastFormContro
lChangeEvent"); | 679 info.addMember(m_textAsOfLastFormControlChangeEvent, "textAsOfLastFormContro
lChangeEvent"); |
680 } | 680 } |
681 | 681 |
682 } // namespace Webcore | 682 } // namespace Webcore |
OLD | NEW |