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

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

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 years, 6 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 | « Source/core/layout/LayoutText.cpp ('k') | Source/core/layout/LayoutTextControl.h » ('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 * 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 27 matching lines...) Expand all
38 float combinedTextWidth(const Font& font) const { return font.fontDescriptio n().computedSize(); } 38 float combinedTextWidth(const Font& font) const { return font.fontDescriptio n().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) const; 40 void transformToInlineCoordinates(GraphicsContext&, const LayoutRect& boxRec t) const;
41 void transformLayoutRect(LayoutRect& boxRect) const; 41 void transformLayoutRect(LayoutRect& boxRect) const;
42 LayoutUnit inlineWidthForLayout() const; 42 LayoutUnit inlineWidthForLayout() const;
43 43
44 virtual const char* name() const override { return "LayoutTextCombine"; } 44 virtual const char* name() const override { return "LayoutTextCombine"; }
45 45
46 private: 46 private:
47 virtual bool isCombineText() const override { return true; } 47 virtual bool isCombineText() const override { return true; }
48 virtual float width(unsigned from, unsigned length, const Font&, LayoutUnit xPosition, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts = 0, Gly phOverflow* = 0) const override; 48 virtual float width(unsigned from, unsigned length, const Font&, LayoutUnit xPosition, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts = nullpt r, GlyphOverflow* = nullptr) const override;
49 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; 49 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
50 virtual void setTextInternal(PassRefPtr<StringImpl>) override; 50 virtual void setTextInternal(PassRefPtr<StringImpl>) override;
51 void updateIsCombined(); 51 void updateIsCombined();
52 52
53 float offsetX(const LayoutRect& boxRect) const; 53 float offsetX(const LayoutRect& boxRect) const;
54 float offsetXNoScale(const LayoutRect& boxRect) const; 54 float offsetXNoScale(const LayoutRect& boxRect) const;
55 55
56 float m_combinedTextWidth; 56 float m_combinedTextWidth;
57 float m_scaleX; 57 float m_scaleX;
58 bool m_isCombined : 1; 58 bool m_isCombined : 1;
(...skipping 17 matching lines...) Expand all
76 inline float LayoutTextCombine::offsetXNoScale(const LayoutRect& boxRect) const 76 inline float LayoutTextCombine::offsetXNoScale(const LayoutRect& boxRect) const
77 { 77 {
78 ASSERT(!m_needsFontUpdate); 78 ASSERT(!m_needsFontUpdate);
79 return (boxRect.height() - m_combinedTextWidth) / 2; 79 return (boxRect.height() - m_combinedTextWidth) / 2;
80 } 80 }
81 81
82 82
83 } // namespace blink 83 } // namespace blink
84 84
85 #endif // LayoutTextCombine_h 85 #endif // LayoutTextCombine_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutText.cpp ('k') | Source/core/layout/LayoutTextControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698