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

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

Issue 679593004: Refactor RenderQuote to not delete renderers on style change. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/RenderQuote.cpp ('k') | Source/core/rendering/RenderTextFragment.cpp » ('j') | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual bool canBeSelectionLeaf() const override { return node() && node()-> hasEditableStyle(); } 43 virtual bool canBeSelectionLeaf() const override { return node() && node()-> hasEditableStyle(); }
44 44
45 unsigned start() const { return m_start; } 45 unsigned start() const { return m_start; }
46 unsigned end() const { return m_end; } 46 unsigned end() const { return m_end; }
47 virtual unsigned textStartOffset() const override { return start(); } 47 virtual unsigned textStartOffset() const override { return start(); }
48 48
49 RenderBoxModelObject* firstLetter() const { return m_firstLetter; } 49 RenderBoxModelObject* firstLetter() const { return m_firstLetter; }
50 void setFirstLetter(RenderBoxModelObject* firstLetter) { m_firstLetter = fir stLetter; } 50 void setFirstLetter(RenderBoxModelObject* firstLetter) { m_firstLetter = fir stLetter; }
51 RenderText* firstRenderTextInFirstLetter() const; 51 RenderText* firstRenderTextInFirstLetter() const;
52 52
53 StringImpl* contentString() const { return m_contentString.get(); } 53 void setContentString(StringImpl*);
54 virtual PassRefPtr<StringImpl> originalText() const override; 54 virtual PassRefPtr<StringImpl> originalText() const override;
55 55
56 virtual void setText(PassRefPtr<StringImpl>, bool force = false) override; 56 virtual void setText(PassRefPtr<StringImpl>, bool force = false) override;
57 57
58 virtual void transformText() override; 58 virtual void transformText() override;
59 59
60 virtual const char* renderName() const override final { return "RenderTextFr agment"; } 60 virtual const char* renderName() const override final { return "RenderTextFr agment"; }
61 61
62 protected: 62 protected:
63 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride; 63 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride;
64 64
65 private: 65 private:
66 virtual void willBeDestroyed() override; 66 virtual void willBeDestroyed() override;
67 67
68 virtual UChar previousCharacter() const override; 68 virtual UChar previousCharacter() const override;
69 RenderBlock* blockForAccompanyingFirstLetter() const; 69 RenderBlock* blockForAccompanyingFirstLetter() const;
70 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid e; 70 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid e;
71 71
72 unsigned m_start; 72 unsigned m_start;
73 unsigned m_end; 73 unsigned m_end;
74 RefPtr<StringImpl> m_contentString; 74 RefPtr<StringImpl> m_contentString;
75 RawPtrWillBeMember<RenderBoxModelObject> m_firstLetter; 75 RawPtrWillBeMember<RenderBoxModelObject> m_firstLetter;
76 }; 76 };
77 77
78 DEFINE_TYPE_CASTS(RenderTextFragment, RenderObject, object, toRenderText(object) ->isTextFragment(), toRenderText(object).isTextFragment()); 78 DEFINE_TYPE_CASTS(RenderTextFragment, RenderObject, object, toRenderText(object) ->isTextFragment(), toRenderText(object).isTextFragment());
79 79
80 } // namespace blink 80 } // namespace blink
81 81
82 #endif // RenderTextFragment_h 82 #endif // RenderTextFragment_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderQuote.cpp ('k') | Source/core/rendering/RenderTextFragment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698