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

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 17 matching lines...) Expand all
28 28
29 // LayoutTextCombine uses different coordinate systems for layout and inlineText Box, 29 // LayoutTextCombine uses different coordinate systems for layout and inlineText Box,
30 // because it is treated as 1em-box character in vertical flow for the layout, 30 // because it is treated as 1em-box character in vertical flow for the layout,
31 // while its inline box is in horizontal flow. 31 // while its inline box is in horizontal flow.
32 class LayoutTextCombine final : public LayoutText { 32 class LayoutTextCombine final : public LayoutText {
33 public: 33 public:
34 LayoutTextCombine(Node*, PassRefPtr<StringImpl>); 34 LayoutTextCombine(Node*, PassRefPtr<StringImpl>);
35 35
36 void updateFont(); 36 void updateFont();
37 bool isCombined() const { return m_isCombined; } 37 bool isCombined() const { return m_isCombined; }
38 float combinedTextWidth(const Font& font) const { return font.fontDescriptio n().computedSize(); } 38 float combinedTextWidth(const Font& font) const { return font.getFontDescrip tion().computedSize(); }
39 const Font& originalFont() const { return parent()->style()->font(); } 39 const Font& originalFont() const { return parent()->style()->font(); }
40 void transformToInlineCoordinates(GraphicsContext&, const LayoutRect& boxRec t, bool clip = false) const; 40 void transformToInlineCoordinates(GraphicsContext&, const LayoutRect& boxRec t, bool clip = false) const;
41 LayoutUnit inlineWidthForLayout() const; 41 LayoutUnit inlineWidthForLayout() const;
42 42
43 const char* name() const override { return "LayoutTextCombine"; } 43 const char* name() const override { return "LayoutTextCombine"; }
44 44
45 private: 45 private:
46 bool isCombineText() const override { return true; } 46 bool isCombineText() const override { return true; }
47 float width(unsigned from, unsigned length, const Font&, LayoutUnit xPositio n, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts = nullptr, Float Rect* glyphBounds = nullptr) const override; 47 float width(unsigned from, unsigned length, const Font&, LayoutUnit xPositio n, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts = nullptr, Float Rect* glyphBounds = nullptr) const override;
48 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ; 48 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
(...skipping 10 matching lines...) Expand all
59 59
60 inline LayoutUnit LayoutTextCombine::inlineWidthForLayout() const 60 inline LayoutUnit LayoutTextCombine::inlineWidthForLayout() const
61 { 61 {
62 ASSERT(!m_needsFontUpdate); 62 ASSERT(!m_needsFontUpdate);
63 return LayoutUnit::fromFloatCeil(m_combinedTextWidth); 63 return LayoutUnit::fromFloatCeil(m_combinedTextWidth);
64 } 64 }
65 65
66 } // namespace blink 66 } // namespace blink
67 67
68 #endif // LayoutTextCombine_h 68 #endif // LayoutTextCombine_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTextCombine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698