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

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

Issue 2604073002: Apply offset from the correct graphics layer; simplify code for link highlights. (Closed)
Patch Set: Created 3 years, 11 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-2009, 2013 Apple Inc. All rights reserved. 4 * Copyright (C) 2004-2009, 2013 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void dirtyOrDeleteLineBoxesIfNeeded(bool fullLayout); 95 void dirtyOrDeleteLineBoxesIfNeeded(bool fullLayout);
96 void dirtyLineBoxes(); 96 void dirtyLineBoxes();
97 97
98 void absoluteRects(Vector<IntRect>&, 98 void absoluteRects(Vector<IntRect>&,
99 const LayoutPoint& accumulatedOffset) const final; 99 const LayoutPoint& accumulatedOffset) const final;
100 void absoluteRectsForRange(Vector<IntRect>&, 100 void absoluteRectsForRange(Vector<IntRect>&,
101 unsigned startOffset = 0, 101 unsigned startOffset = 0,
102 unsigned endOffset = INT_MAX, 102 unsigned endOffset = INT_MAX,
103 bool useSelectionHeight = false); 103 bool useSelectionHeight = false);
104 104
105 void absoluteQuads(Vector<FloatQuad>&) const final; 105 void absoluteQuads(Vector<FloatQuad>&,
106 MapCoordinatesFlags mode = 0) const final;
106 void absoluteQuadsForRange(Vector<FloatQuad>&, 107 void absoluteQuadsForRange(Vector<FloatQuad>&,
107 unsigned startOffset = 0, 108 unsigned startOffset = 0,
108 unsigned endOffset = INT_MAX, 109 unsigned endOffset = INT_MAX,
109 bool useSelectionHeight = false); 110 bool useSelectionHeight = false);
110 FloatRect localBoundingBoxRectForAccessibility() const final; 111 FloatRect localBoundingBoxRectForAccessibility() const final;
111 112
112 enum ClippingOption { NoClipping, ClipToEllipsis }; 113 enum ClippingOption { NoClipping, ClipToEllipsis };
113 enum LocalOrAbsoluteOption { LocalQuads, AbsoluteQuads }; 114 enum LocalOrAbsoluteOption { LocalQuads, AbsoluteQuads };
114 void quads(Vector<FloatQuad>&, 115 void quads(Vector<FloatQuad>&,
115 ClippingOption = NoClipping, 116 ClippingOption = NoClipping,
116 LocalOrAbsoluteOption = AbsoluteQuads) const; 117 LocalOrAbsoluteOption = AbsoluteQuads,
118 MapCoordinatesFlags mode = 0) const;
117 119
118 PositionWithAffinity positionForPoint(const LayoutPoint&) override; 120 PositionWithAffinity positionForPoint(const LayoutPoint&) override;
119 121
120 bool is8Bit() const { return m_text.is8Bit(); } 122 bool is8Bit() const { return m_text.is8Bit(); }
121 const LChar* characters8() const { return m_text.impl()->characters8(); } 123 const LChar* characters8() const { return m_text.impl()->characters8(); }
122 const UChar* characters16() const { return m_text.impl()->characters16(); } 124 const UChar* characters16() const { return m_text.impl()->characters16(); }
123 bool hasEmptyText() const { return m_text.isEmpty(); } 125 bool hasEmptyText() const { return m_text.isEmpty(); }
124 UChar characterAt(unsigned) const; 126 UChar characterAt(unsigned) const;
125 UChar uncheckedCharacterAt(unsigned) const; 127 UChar uncheckedCharacterAt(unsigned) const;
126 UChar operator[](unsigned i) const { return uncheckedCharacterAt(i); } 128 UChar operator[](unsigned i) const { return uncheckedCharacterAt(i); }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 349
348 inline LayoutText* Text::layoutObject() const { 350 inline LayoutText* Text::layoutObject() const {
349 return toLayoutText(CharacterData::layoutObject()); 351 return toLayoutText(CharacterData::layoutObject());
350 } 352 }
351 353
352 void applyTextTransform(const ComputedStyle*, String&, UChar); 354 void applyTextTransform(const ComputedStyle*, String&, UChar);
353 355
354 } // namespace blink 356 } // namespace blink
355 357
356 #endif // LayoutText_h 358 #endif // LayoutText_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698