John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1 | // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
Lei Zhang | a6d9f0e | 2015-06-13 00:48:38 -0700 | [diff] [blame] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Dan Sinclair | edbb319 | 2016-03-21 09:08:24 -0400 | [diff] [blame^] | 7 | #include "fpdfsdk/formfiller/cba_fontmap.h" |
Lei Zhang | c2fb35f | 2016-01-05 16:46:58 -0800 | [diff] [blame] | 8 | |
Dan Sinclair | 455a419 | 2016-03-16 09:48:56 -0400 | [diff] [blame] | 9 | #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
Dan Sinclair | aa403d3 | 2016-03-15 14:57:22 -0400 | [diff] [blame] | 10 | #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| 11 | #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" |
Lei Zhang | c2fb35f | 2016-01-05 16:46:58 -0800 | [diff] [blame] | 12 | #include "fpdfsdk/include/fsdk_baseannot.h" |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 13 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 14 | CBA_FontMap::CBA_FontMap(CPDFSDK_Annot* pAnnot, |
| 15 | IFX_SystemHandler* pSystemHandler) |
| 16 | : CPWL_FontMap(pSystemHandler), |
| 17 | m_pDocument(NULL), |
| 18 | m_pAnnotDict(NULL), |
| 19 | m_pDefaultFont(NULL), |
| 20 | m_sAPType("N") { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 21 | CPDF_Page* pPage = pAnnot->GetPDFPage(); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 22 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 23 | m_pDocument = pPage->m_pDocument; |
| 24 | m_pAnnotDict = pAnnot->GetPDFAnnot()->GetAnnotDict(); |
Lei Zhang | fcfa3b8 | 2015-12-24 21:07:28 -0800 | [diff] [blame] | 25 | Initialize(); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 26 | } |
| 27 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 28 | CBA_FontMap::~CBA_FontMap() {} |
| 29 | |
| 30 | void CBA_FontMap::Reset() { |
| 31 | Empty(); |
| 32 | m_pDefaultFont = NULL; |
| 33 | m_sDefaultFontName = ""; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 34 | } |
| 35 | |
Lei Zhang | fcfa3b8 | 2015-12-24 21:07:28 -0800 | [diff] [blame] | 36 | void CBA_FontMap::Initialize() { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 37 | int32_t nCharset = DEFAULT_CHARSET; |
| 38 | |
| 39 | if (!m_pDefaultFont) { |
| 40 | m_pDefaultFont = GetAnnotDefaultFont(m_sDefaultFontName); |
| 41 | if (m_pDefaultFont) { |
Lei Zhang | c2fb35f | 2016-01-05 16:46:58 -0800 | [diff] [blame] | 42 | if (const CFX_SubstFont* pSubstFont = m_pDefaultFont->GetSubstFont()) { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 43 | nCharset = pSubstFont->m_Charset; |
Lei Zhang | c2fb35f | 2016-01-05 16:46:58 -0800 | [diff] [blame] | 44 | } else { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 45 | if (m_sDefaultFontName == "Wingdings" || |
| 46 | m_sDefaultFontName == "Wingdings2" || |
| 47 | m_sDefaultFontName == "Wingdings3" || |
| 48 | m_sDefaultFontName == "Webdings") |
| 49 | nCharset = SYMBOL_CHARSET; |
| 50 | else |
| 51 | nCharset = ANSI_CHARSET; |
| 52 | } |
| 53 | AddFontData(m_pDefaultFont, m_sDefaultFontName, nCharset); |
| 54 | AddFontToAnnotDict(m_pDefaultFont, m_sDefaultFontName); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | if (nCharset != ANSI_CHARSET) |
Lei Zhang | fcfa3b8 | 2015-12-24 21:07:28 -0800 | [diff] [blame] | 59 | CPWL_FontMap::Initialize(); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 60 | } |
| 61 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 62 | void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont, |
| 63 | const CFX_ByteString& sFontName) { |
Lei Zhang | 5eca305 | 2016-02-22 20:32:21 -0800 | [diff] [blame] | 64 | ASSERT(pFont); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 65 | |
| 66 | if (m_pDefaultFont) |
| 67 | return; |
| 68 | |
| 69 | m_pDefaultFont = pFont; |
| 70 | m_sDefaultFontName = sFontName; |
| 71 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 72 | int32_t nCharset = DEFAULT_CHARSET; |
| 73 | if (const CFX_SubstFont* pSubstFont = m_pDefaultFont->GetSubstFont()) |
| 74 | nCharset = pSubstFont->m_Charset; |
| 75 | AddFontData(m_pDefaultFont, m_sDefaultFontName, nCharset); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 76 | } |
| 77 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 78 | CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, |
| 79 | int32_t nCharset) { |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 80 | if (m_pAnnotDict->GetStringBy("Subtype") == "Widget") { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 81 | CPDF_Document* pDocument = GetDocument(); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 82 | CPDF_Dictionary* pRootDict = pDocument->GetRoot(); |
| 83 | if (!pRootDict) |
| 84 | return NULL; |
| 85 | |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 86 | CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm"); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 87 | if (!pAcroFormDict) |
| 88 | return NULL; |
| 89 | |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 90 | CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR"); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 91 | if (!pDRDict) |
| 92 | return NULL; |
| 93 | |
| 94 | return FindResFontSameCharset(pDRDict, sFontAlias, nCharset); |
| 95 | } |
| 96 | |
| 97 | return NULL; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 98 | } |
| 99 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 100 | CPDF_Document* CBA_FontMap::GetDocument() { |
| 101 | return m_pDocument; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 102 | } |
| 103 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 104 | CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, |
| 105 | CFX_ByteString& sFontAlias, |
| 106 | int32_t nCharset) { |
| 107 | if (!pResDict) |
| 108 | return NULL; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 109 | |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 110 | CPDF_Dictionary* pFonts = pResDict->GetDictBy("Font"); |
Lei Zhang | 412e908 | 2015-12-14 18:34:00 -0800 | [diff] [blame] | 111 | if (!pFonts) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 112 | return NULL; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 113 | |
Lei Zhang | 5eca305 | 2016-02-22 20:32:21 -0800 | [diff] [blame] | 114 | CPDF_Document* pDocument = GetDocument(); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 115 | CPDF_Font* pFind = NULL; |
Oliver Chang | 3f1c71f | 2016-01-11 08:45:31 -0800 | [diff] [blame] | 116 | for (const auto& it : *pFonts) { |
| 117 | const CFX_ByteString& csKey = it.first; |
| 118 | CPDF_Object* pObj = it.second; |
Lei Zhang | 412e908 | 2015-12-14 18:34:00 -0800 | [diff] [blame] | 119 | if (!pObj) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 120 | continue; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 121 | |
Dan Sinclair | f1251c1 | 2015-10-20 16:24:45 -0400 | [diff] [blame] | 122 | CPDF_Dictionary* pElement = ToDictionary(pObj->GetDirect()); |
| 123 | if (!pElement) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 124 | continue; |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 125 | if (pElement->GetStringBy("Type") != "Font") |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 126 | continue; |
| 127 | |
| 128 | CPDF_Font* pFont = pDocument->LoadFont(pElement); |
Lei Zhang | 412e908 | 2015-12-14 18:34:00 -0800 | [diff] [blame] | 129 | if (!pFont) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 130 | continue; |
| 131 | const CFX_SubstFont* pSubst = pFont->GetSubstFont(); |
Lei Zhang | 412e908 | 2015-12-14 18:34:00 -0800 | [diff] [blame] | 132 | if (!pSubst) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 133 | continue; |
| 134 | if (pSubst->m_Charset == nCharset) { |
| 135 | sFontAlias = csKey; |
| 136 | pFind = pFont; |
| 137 | } |
| 138 | } |
| 139 | return pFind; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 140 | } |
| 141 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 142 | void CBA_FontMap::AddedFont(CPDF_Font* pFont, |
| 143 | const CFX_ByteString& sFontAlias) { |
| 144 | AddFontToAnnotDict(pFont, sFontAlias); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 145 | } |
| 146 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 147 | void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, |
| 148 | const CFX_ByteString& sAlias) { |
| 149 | if (!pFont) |
| 150 | return; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 151 | |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 152 | CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 153 | |
Lei Zhang | 412e908 | 2015-12-14 18:34:00 -0800 | [diff] [blame] | 154 | if (!pAPDict) { |
Tom Sepez | ae51c81 | 2015-08-05 12:34:06 -0700 | [diff] [blame] | 155 | pAPDict = new CPDF_Dictionary; |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 156 | m_pAnnotDict->SetAt("AP", pAPDict); |
| 157 | } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 158 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 159 | // to avoid checkbox and radiobutton |
| 160 | CPDF_Object* pObject = pAPDict->GetElement(m_sAPType); |
Dan Sinclair | f1251c1 | 2015-10-20 16:24:45 -0400 | [diff] [blame] | 161 | if (ToDictionary(pObject)) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 162 | return; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 163 | |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 164 | CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType); |
Lei Zhang | 412e908 | 2015-12-14 18:34:00 -0800 | [diff] [blame] | 165 | if (!pStream) { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 166 | pStream = new CPDF_Stream(NULL, 0, NULL); |
| 167 | int32_t objnum = m_pDocument->AddIndirectObject(pStream); |
| 168 | pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum); |
| 169 | } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 170 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 171 | CPDF_Dictionary* pStreamDict = pStream->GetDict(); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 172 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 173 | if (!pStreamDict) { |
Tom Sepez | ae51c81 | 2015-08-05 12:34:06 -0700 | [diff] [blame] | 174 | pStreamDict = new CPDF_Dictionary; |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 175 | pStream->InitStream(NULL, 0, pStreamDict); |
| 176 | } |
| 177 | |
| 178 | if (pStreamDict) { |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 179 | CPDF_Dictionary* pStreamResList = pStreamDict->GetDictBy("Resources"); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 180 | if (!pStreamResList) { |
Tom Sepez | ae51c81 | 2015-08-05 12:34:06 -0700 | [diff] [blame] | 181 | pStreamResList = new CPDF_Dictionary(); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 182 | pStreamDict->SetAt("Resources", pStreamResList); |
| 183 | } |
| 184 | |
| 185 | if (pStreamResList) { |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 186 | CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDictBy("Font"); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 187 | if (!pStreamResFontList) { |
| 188 | pStreamResFontList = new CPDF_Dictionary; |
| 189 | int32_t objnum = m_pDocument->AddIndirectObject(pStreamResFontList); |
| 190 | pStreamResList->SetAtReference("Font", m_pDocument, objnum); |
| 191 | } |
| 192 | if (!pStreamResFontList->KeyExist(sAlias)) |
| 193 | pStreamResFontList->SetAtReference(sAlias, m_pDocument, |
| 194 | pFont->GetFontDict()); |
| 195 | } |
| 196 | } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 197 | } |
| 198 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 199 | CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 200 | CPDF_Dictionary* pAcroFormDict = NULL; |
Tom Sepez | 007e6c0 | 2016-02-26 14:31:56 -0800 | [diff] [blame] | 201 | const bool bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget"); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 202 | if (bWidget) { |
| 203 | if (CPDF_Dictionary* pRootDict = m_pDocument->GetRoot()) |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 204 | pAcroFormDict = pRootDict->GetDictBy("AcroForm"); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | CFX_ByteString sDA; |
| 208 | CPDF_Object* pObj; |
| 209 | if ((pObj = FPDF_GetFieldAttr(m_pAnnotDict, "DA"))) |
| 210 | sDA = pObj->GetString(); |
| 211 | |
| 212 | if (bWidget) { |
| 213 | if (sDA.IsEmpty()) { |
| 214 | pObj = FPDF_GetFieldAttr(pAcroFormDict, "DA"); |
| 215 | sDA = pObj ? pObj->GetString() : CFX_ByteString(); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | CPDF_Dictionary* pFontDict = NULL; |
| 220 | |
| 221 | if (!sDA.IsEmpty()) { |
| 222 | CPDF_SimpleParser syntax(sDA); |
Wei Li | 970c11e | 2016-02-16 14:26:22 -0800 | [diff] [blame] | 223 | syntax.FindTagParamFromStart("Tf", 2); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 224 | CFX_ByteString sFontName = syntax.GetWord(); |
| 225 | sAlias = PDF_NameDecode(sFontName).Mid(1); |
| 226 | |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 227 | if (CPDF_Dictionary* pDRDict = m_pAnnotDict->GetDictBy("DR")) |
| 228 | if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font")) |
| 229 | pFontDict = pDRFontDict->GetDictBy(sAlias); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 230 | |
| 231 | if (!pFontDict) |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 232 | if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP")) |
| 233 | if (CPDF_Dictionary* pNormalDict = pAPDict->GetDictBy("N")) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 234 | if (CPDF_Dictionary* pNormalResDict = |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 235 | pNormalDict->GetDictBy("Resources")) |
| 236 | if (CPDF_Dictionary* pResFontDict = |
| 237 | pNormalResDict->GetDictBy("Font")) |
| 238 | pFontDict = pResFontDict->GetDictBy(sAlias); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 239 | |
| 240 | if (bWidget) { |
| 241 | if (!pFontDict) { |
| 242 | if (pAcroFormDict) { |
Wei Li | 9b76113 | 2016-01-29 15:44:20 -0800 | [diff] [blame] | 243 | if (CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR")) |
| 244 | if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font")) |
| 245 | pFontDict = pDRFontDict->GetDictBy(sAlias); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 246 | } |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 252 | } |
| 253 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 254 | void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) { |
| 255 | m_sAPType = sAPType; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 256 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 257 | Reset(); |
Lei Zhang | fcfa3b8 | 2015-12-24 21:07:28 -0800 | [diff] [blame] | 258 | Initialize(); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 259 | } |