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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/Font.cpp

Issue 2091633002: Make default constructor of Font class to initialize all member variables (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-23T10:42:43 Created 4 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 | « no previous file | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "wtf/StdLibExtras.h" 50 #include "wtf/StdLibExtras.h"
51 #include "wtf/text/CharacterNames.h" 51 #include "wtf/text/CharacterNames.h"
52 #include "wtf/text/Unicode.h" 52 #include "wtf/text/Unicode.h"
53 53
54 using namespace WTF; 54 using namespace WTF;
55 using namespace Unicode; 55 using namespace Unicode;
56 56
57 namespace blink { 57 namespace blink {
58 58
59 Font::Font() 59 Font::Font()
60 : m_canShapeWordByWord(0)
61 , m_shapeWordByWordComputed(0)
60 { 62 {
61 } 63 }
62 64
63 Font::Font(const FontDescription& fd) 65 Font::Font(const FontDescription& fd)
64 : m_fontDescription(fd) 66 : m_fontDescription(fd)
65 , m_canShapeWordByWord(0) 67 , m_canShapeWordByWord(0)
66 , m_shapeWordByWordComputed(0) 68 , m_shapeWordByWordComputed(0)
67 { 69 {
68 } 70 }
69 71
70 Font::Font(const Font& other) 72 Font::Font(const Font& other)
71 : m_fontDescription(other.m_fontDescription) 73 : m_fontDescription(other.m_fontDescription)
72 , m_fontFallbackList(other.m_fontFallbackList) 74 , m_fontFallbackList(other.m_fontFallbackList)
75 // TODO(yosin): We should have a comment the reason why don't we copy
76 // |m_canShapeWordByWord| and |m_shapeWordByWordComputed| from |other|,
77 // since |operator=()| copies them from |other|.
73 , m_canShapeWordByWord(0) 78 , m_canShapeWordByWord(0)
74 , m_shapeWordByWordComputed(0) 79 , m_shapeWordByWordComputed(0)
75 { 80 {
76 } 81 }
77 82
78 Font& Font::operator=(const Font& other) 83 Font& Font::operator=(const Font& other)
79 { 84 {
80 m_fontDescription = other.m_fontDescription; 85 m_fontDescription = other.m_fontDescription;
81 m_fontFallbackList = other.m_fontFallbackList; 86 m_fontFallbackList = other.m_fontFallbackList;
82 m_canShapeWordByWord = other.m_canShapeWordByWord; 87 m_canShapeWordByWord = other.m_canShapeWordByWord;
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 { 854 {
850 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 855 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
851 } 856 }
852 857
853 bool Font::isFallbackValid() const 858 bool Font::isFallbackValid() const
854 { 859 {
855 return !m_fontFallbackList || m_fontFallbackList->isValid(); 860 return !m_fontFallbackList || m_fontFallbackList->isValid();
856 } 861 }
857 862
858 } // namespace blink 863 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698