~ubuntu-branches/ubuntu/karmic/webkit/karmic-proposed

« back to all changes in this revision

Viewing changes to WebCore/dom/InputElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-05-15 18:30:58 UTC
  • mto: (4.4.1 sid) (1.2.2 upstream) (16.1.1 lucid)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20090515183058-35m5or0ufm5tutud
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "Document.h"
27
27
#include "Event.h"
28
28
#include "EventNames.h"
29
 
#include "FormControlElement.h"
30
29
#include "Frame.h"
31
30
#include "HTMLInputElement.h"
32
31
#include "HTMLNames.h"
 
32
#include "MappedAttribute.h"
33
33
#include "Page.h"
34
34
#include "RenderTextControlSingleLine.h"
35
35
#include "SelectionController.h"
89
89
 
90
90
    data.setPlaceholderShouldBeVisible(data.inputElement()->value().isEmpty() 
91
91
                                       && document->focusedNode() != element
92
 
                                       && !data.inputElement()->placeholderValue().isEmpty());
 
92
                                       && !data.inputElement()->placeholder().isEmpty());
93
93
 
94
94
    if ((oldPlaceholderShouldBeVisible != data.placeholderShouldBeVisible() || placeholderValueChanged) && element->renderer())
95
95
        static_cast<RenderTextControlSingleLine*>(element->renderer())->updatePlaceholderVisibility();
143
143
        data.setValue(value);
144
144
 
145
145
    Element* element = data.element();
146
 
    FormControlElement* formControlElement = toFormControlElement(element);
147
 
    ASSERT(formControlElement);
148
 
    formControlElement->setValueMatchesRenderer();
 
146
    element->setFormControlValueMatchesRenderer(true);
149
147
 
150
148
    // Fire the "input" DOM event
151
149
    element->dispatchEvent(eventNames().inputEvent, true, false);