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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTextFragment.h

Issue 2963093002: Add full offset mapping construction in a block (Closed)
Patch Set: Fix first letter handling Created 3 years, 5 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
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return first_letter_pseudo_element_; 85 return first_letter_pseudo_element_;
86 } 86 }
87 87
88 void SetIsRemainingTextLayoutObject(bool is_remaining_text) { 88 void SetIsRemainingTextLayoutObject(bool is_remaining_text) {
89 is_remaining_text_layout_object_ = is_remaining_text; 89 is_remaining_text_layout_object_ = is_remaining_text;
90 } 90 }
91 bool IsRemainingTextLayoutObject() const { 91 bool IsRemainingTextLayoutObject() const {
92 return is_remaining_text_layout_object_; 92 return is_remaining_text_layout_object_;
93 } 93 }
94 94
95 Text* AssociatedTextNode() const;
96
95 protected: 97 protected:
96 void WillBeDestroyed() override; 98 void WillBeDestroyed() override;
97 99
98 private: 100 private:
99 LayoutBlock* BlockForAccompanyingFirstLetter() const; 101 LayoutBlock* BlockForAccompanyingFirstLetter() const;
100 UChar PreviousCharacter() const override; 102 UChar PreviousCharacter() const override;
101 103
102 Text* AssociatedTextNode() const;
103 void UpdateHitTestResult(HitTestResult&, const LayoutPoint&) override; 104 void UpdateHitTestResult(HitTestResult&, const LayoutPoint&) override;
104 105
105 unsigned start_; 106 unsigned start_;
106 unsigned fragment_length_; 107 unsigned fragment_length_;
107 bool is_remaining_text_layout_object_; 108 bool is_remaining_text_layout_object_;
108 RefPtr<StringImpl> content_string_; 109 RefPtr<StringImpl> content_string_;
109 // Reference back to FirstLetterPseudoElement; cleared by 110 // Reference back to FirstLetterPseudoElement; cleared by
110 // FirstLetterPseudoElement::detachLayoutTree() if it goes away first. 111 // FirstLetterPseudoElement::detachLayoutTree() if it goes away first.
111 UntracedMember<FirstLetterPseudoElement> first_letter_pseudo_element_; 112 UntracedMember<FirstLetterPseudoElement> first_letter_pseudo_element_;
112 }; 113 };
113 114
114 DEFINE_TYPE_CASTS(LayoutTextFragment, 115 DEFINE_TYPE_CASTS(LayoutTextFragment,
115 LayoutObject, 116 LayoutObject,
116 object, 117 object,
117 ToLayoutText(object)->IsTextFragment(), 118 ToLayoutText(object)->IsTextFragment(),
118 ToLayoutText(object).IsTextFragment()); 119 ToLayoutText(object).IsTextFragment());
119 120
120 } // namespace blink 121 } // namespace blink
121 122
122 #endif // LayoutTextFragment_h 123 #endif // LayoutTextFragment_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698