| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkDisplayXMLParser.h" | 10 #include "SkDisplayXMLParser.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 if (result == false) { | 182 if (result == false) { |
| 183 int infoCount; | 183 int infoCount; |
| 184 const SkMemberInfo* info = | 184 const SkMemberInfo* info = |
| 185 SkDisplayType::GetMembers(&fMaker, fParents[parentIndex - 1]
.fType, &infoCount); | 185 SkDisplayType::GetMembers(&fMaker, fParents[parentIndex - 1]
.fType, &infoCount); |
| 186 const SkMemberInfo* foundInfo; | 186 const SkMemberInfo* foundInfo; |
| 187 if ((foundInfo = searchContainer(info, infoCount)) != NULL) { | 187 if ((foundInfo = searchContainer(info, infoCount)) != NULL) { |
| 188 parent->setReference(foundInfo, displayable); | 188 parent->setReference(foundInfo, displayable); |
| 189 // if (displayable->isHelper() == false) | 189 // if (displayable->isHelper() == false) |
| 190 fMaker.helperAdd(displayable); | 190 fMaker.helperAdd(displayable); |
| 191 } else { | 191 } else { |
| 192 fMaker.setErrorNoun(SkString(elem)); |
| 192 fMaker.setErrorCode(SkDisplayXMLParserError::kElementTypeNot
AllowedInParent); | 193 fMaker.setErrorCode(SkDisplayXMLParserError::kElementTypeNot
AllowedInParent); |
| 193 return true; | 194 return true; |
| 194 } | 195 } |
| 195 } | 196 } |
| 196 if (parent->childrenNeedDisposing()) | 197 if (parent->childrenNeedDisposing()) |
| 197 delete displayable; | 198 delete displayable; |
| 198 } | 199 } |
| 199 fParents.remove(parentIndex); | 200 fParents.remove(parentIndex); |
| 200 } | 201 } |
| 201 fCurrDisplayable = NULL; | 202 fCurrDisplayable = NULL; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 lastResort = info; | 308 lastResort = info; |
| 308 } | 309 } |
| 309 } | 310 } |
| 310 } | 311 } |
| 311 if (bestDisplayable) | 312 if (bestDisplayable) |
| 312 return bestDisplayable; | 313 return bestDisplayable; |
| 313 if (lastResort) | 314 if (lastResort) |
| 314 return lastResort; | 315 return lastResort; |
| 315 return NULL; | 316 return NULL; |
| 316 } | 317 } |
| OLD | NEW |