~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
PassRefPtr<StringImpl> RenderTextFragment::originalText() const
48
48
{
49
 
    Node* e = element();
50
 
    RefPtr<StringImpl> result = (e ? static_cast<Text*>(e)->string() : contentString());
 
49
    Node* e = node();
 
50
    RefPtr<StringImpl> result = (e ? static_cast<Text*>(e)->dataImpl() : contentString());
51
51
    if (result && (start() > 0 || start() < result->length()))
52
52
        result = result->substring(start(), end());
53
53
    return result.release();
75
75
UChar RenderTextFragment::previousCharacter()
76
76
{
77
77
    if (start()) {
78
 
        Node* e = element();
79
 
        StringImpl*  original = (e ? static_cast<Text*>(e)->string() : contentString());
 
78
        Node* e = node();
 
79
        StringImpl*  original = (e ? static_cast<Text*>(e)->dataImpl() : contentString());
80
80
        if (original)
81
81
            return (*original)[start() - 1];
82
82
    }