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

« back to all changes in this revision

Viewing changes to WebCore/rendering/RenderTextControlSingleLine.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-05-15 18:30:58 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090515183058-50q5exjo9b1kxy9s
Tags: 1.1.7-1
* New upstream release
* debian/libwebkit-1.0-2.symbols:
- updated with the new symbols in 1.1.7
* debian/libwebkit-dev.install, debian/libwebkit-dev.links,
  debian/rules:
- Build, and ship gtk-doc documentation (Closes: #526683)
* debian/copyright:
- updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "SearchPopupMenu.h"
40
40
#include "SelectionController.h"
41
41
#include "Settings.h"
 
42
#include "SimpleFontData.h"
42
43
#include "TextControlInnerElements.h"
43
44
 
44
45
using namespace std;
404
405
 
405
406
    int result = static_cast<int>(ceilf(charWidth * factor));
406
407
 
 
408
    // For text inputs, IE adds some extra width.
 
409
    result += style()->font().primaryFont()->maxCharWidth() - charWidth;
 
410
 
407
411
    if (RenderBox* resultsRenderer = m_resultsButton ? m_resultsButton->renderBox() : 0)
408
412
        result += resultsRenderer->borderLeft() + resultsRenderer->borderRight() +
409
413
                  resultsRenderer->paddingLeft() + resultsRenderer->paddingRight();
480
484
 
481
485
    if (m_placeholderVisible) {
482
486
        ExceptionCode ec = 0;
483
 
        innerTextElement()->setInnerText(inputElement()->placeholderValue(), ec);
 
487
        innerTextElement()->setInnerText(inputElement()->placeholder(), ec);
484
488
        ASSERT(!ec);
485
 
    } else if (!formControlElement()->valueMatchesRenderer() || placeholderVisibilityShouldChange)
 
489
    } else if (!static_cast<Element*>(node())->formControlValueMatchesRenderer() || placeholderVisibilityShouldChange)
486
490
        setInnerTextValue(inputElement()->value());
487
491
 
488
492
    if (m_searchPopupIsVisible)