Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: Source/core/rendering/RenderTextFragment.h

Issue 295923002: Use tighter typing for RenderTextFragment::firstLetter() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 27 matching lines...) Expand all
38 virtual ~RenderTextFragment(); 38 virtual ~RenderTextFragment();
39 39
40 virtual bool isTextFragment() const OVERRIDE { return true; } 40 virtual bool isTextFragment() const OVERRIDE { return true; }
41 41
42 virtual bool canBeSelectionLeaf() const OVERRIDE { return node() && node()-> rendererIsEditable(); } 42 virtual bool canBeSelectionLeaf() const OVERRIDE { return node() && node()-> rendererIsEditable(); }
43 43
44 unsigned start() const { return m_start; } 44 unsigned start() const { return m_start; }
45 unsigned end() const { return m_end; } 45 unsigned end() const { return m_end; }
46 virtual unsigned textStartOffset() const OVERRIDE { return start(); } 46 virtual unsigned textStartOffset() const OVERRIDE { return start(); }
47 47
48 RenderObject* firstLetter() const { return m_firstLetter; } 48 RenderBoxModelObject* firstLetter() const { return m_firstLetter; }
49 void setFirstLetter(RenderObject* firstLetter) { m_firstLetter = firstLetter ; } 49 void setFirstLetter(RenderBoxModelObject* firstLetter) { m_firstLetter = fir stLetter; }
50 RenderText* firstRenderTextInFirstLetter() const; 50 RenderText* firstRenderTextInFirstLetter() const;
51 51
52 StringImpl* contentString() const { return m_contentString.get(); } 52 StringImpl* contentString() const { return m_contentString.get(); }
53 virtual PassRefPtr<StringImpl> originalText() const OVERRIDE; 53 virtual PassRefPtr<StringImpl> originalText() const OVERRIDE;
54 54
55 virtual void setText(PassRefPtr<StringImpl>, bool force = false) OVERRIDE; 55 virtual void setText(PassRefPtr<StringImpl>, bool force = false) OVERRIDE;
56 56
57 virtual void transformText() OVERRIDE; 57 virtual void transformText() OVERRIDE;
58 58
59 protected: 59 protected:
60 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; 60 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
61 61
62 private: 62 private:
63 virtual void willBeDestroyed() OVERRIDE; 63 virtual void willBeDestroyed() OVERRIDE;
64 64
65 virtual UChar previousCharacter() const OVERRIDE; 65 virtual UChar previousCharacter() const OVERRIDE;
66 RenderBlock* blockForAccompanyingFirstLetter() const; 66 RenderBlock* blockForAccompanyingFirstLetter() const;
67 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID E; 67 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID E;
68 68
69 unsigned m_start; 69 unsigned m_start;
70 unsigned m_end; 70 unsigned m_end;
71 RefPtr<StringImpl> m_contentString; 71 RefPtr<StringImpl> m_contentString;
72 RenderObject* m_firstLetter; 72 RenderBoxModelObject* m_firstLetter;
73 }; 73 };
74 74
75 DEFINE_TYPE_CASTS(RenderTextFragment, RenderObject, object, toRenderText(object) ->isTextFragment(), toRenderText(object).isTextFragment()); 75 DEFINE_TYPE_CASTS(RenderTextFragment, RenderObject, object, toRenderText(object) ->isTextFragment(), toRenderText(object).isTextFragment());
76 76
77 } // namespace WebCore 77 } // namespace WebCore
78 78
79 #endif // RenderTextFragment_h 79 #endif // RenderTextFragment_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698