| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "wtf/text/TextPosition.h" | 34 #include "wtf/text/TextPosition.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class Document; | 38 class Document; |
| 39 | 39 |
| 40 class XMLErrors { | 40 class XMLErrors { |
| 41 DISALLOW_ALLOCATION(); | 41 DISALLOW_ALLOCATION(); |
| 42 public: | 42 public: |
| 43 explicit XMLErrors(Document*); | 43 explicit XMLErrors(Document*); |
| 44 void trace(Visitor*); | 44 DECLARE_TRACE(); |
| 45 | 45 |
| 46 // Exposed for callbacks: | 46 // Exposed for callbacks: |
| 47 enum ErrorType { ErrorTypeWarning, ErrorTypeNonFatal, ErrorTypeFatal }; | 47 enum ErrorType { ErrorTypeWarning, ErrorTypeNonFatal, ErrorTypeFatal }; |
| 48 void handleError(ErrorType, const char* message, int lineNumber, int columnN
umber); | 48 void handleError(ErrorType, const char* message, int lineNumber, int columnN
umber); |
| 49 void handleError(ErrorType, const char* message, TextPosition); | 49 void handleError(ErrorType, const char* message, TextPosition); |
| 50 | 50 |
| 51 void insertErrorMessageBlock(); | 51 void insertErrorMessageBlock(); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 void appendErrorMessage(const String& typeString, TextPosition, const char*
message); | 54 void appendErrorMessage(const String& typeString, TextPosition, const char*
message); |
| 55 | 55 |
| 56 RawPtrWillBeMember<Document> m_document; | 56 RawPtrWillBeMember<Document> m_document; |
| 57 | 57 |
| 58 int m_errorCount; | 58 int m_errorCount; |
| 59 TextPosition m_lastErrorPosition; | 59 TextPosition m_lastErrorPosition; |
| 60 StringBuilder m_errorMessages; | 60 StringBuilder m_errorMessages; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| 64 | 64 |
| 65 #endif // XMLErrors_h | 65 #endif // XMLErrors_h |
| OLD | NEW |