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

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

Issue 660413002: Detach first letter pseudo element during RenderTextFragment destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
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
« no previous file with comments | « no previous file | 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 21 matching lines...) Expand all
32 // Used to represent a text substring of an element, e.g., for text runs that ar e split because of 32 // Used to represent a text substring of an element, e.g., for text runs that ar e split because of
33 // first letter and that must therefore have different styles (and positions in the render tree). 33 // first letter and that must therefore have different styles (and positions in the render tree).
34 // We cache offsets so that text transformations can be applied in such a way th at we can recover 34 // We cache offsets so that text transformations can be applied in such a way th at we can recover
35 // the original unaltered string from our corresponding DOM node. 35 // the original unaltered string from our corresponding DOM node.
36 class RenderTextFragment final : public RenderText { 36 class RenderTextFragment final : public RenderText {
37 public: 37 public:
38 RenderTextFragment(Node*, StringImpl*, int startOffset, int length); 38 RenderTextFragment(Node*, StringImpl*, int startOffset, int length);
39 RenderTextFragment(Node*, StringImpl*); 39 RenderTextFragment(Node*, StringImpl*);
40 virtual ~RenderTextFragment(); 40 virtual ~RenderTextFragment();
41 virtual void trace(Visitor*) override; 41 virtual void trace(Visitor*) override;
42 virtual void destroy() override;
42 43
43 virtual bool isTextFragment() const override { return true; } 44 virtual bool isTextFragment() const override { return true; }
44 45
45 virtual bool canBeSelectionLeaf() const override { return node() && node()-> hasEditableStyle(); } 46 virtual bool canBeSelectionLeaf() const override { return node() && node()-> hasEditableStyle(); }
46 47
47 unsigned start() const { return m_start; } 48 unsigned start() const { return m_start; }
48 unsigned end() const { return m_end; } 49 unsigned end() const { return m_end; }
49 virtual unsigned textStartOffset() const override { return start(); } 50 virtual unsigned textStartOffset() const override { return start(); }
50 51
51 StringImpl* contentString() const { return m_contentString.get(); } 52 StringImpl* contentString() const { return m_contentString.get(); }
(...skipping 27 matching lines...) Expand all
79 bool m_isRemainingTextRenderer; 80 bool m_isRemainingTextRenderer;
80 RefPtr<StringImpl> m_contentString; 81 RefPtr<StringImpl> m_contentString;
81 RawPtrWillBeMember<FirstLetterPseudoElement> m_firstLetterPseudoElement; 82 RawPtrWillBeMember<FirstLetterPseudoElement> m_firstLetterPseudoElement;
82 }; 83 };
83 84
84 DEFINE_TYPE_CASTS(RenderTextFragment, RenderObject, object, toRenderText(object) ->isTextFragment(), toRenderText(object).isTextFragment()); 85 DEFINE_TYPE_CASTS(RenderTextFragment, RenderObject, object, toRenderText(object) ->isTextFragment(), toRenderText(object).isTextFragment());
85 86
86 } // namespace blink 87 } // namespace blink
87 88
88 #endif // RenderTextFragment_h 89 #endif // RenderTextFragment_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderTextFragment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698