| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 const int maxErrors = 25; | 44 const int maxErrors = 25; |
| 45 | 45 |
| 46 XMLErrors::XMLErrors(Document* document) | 46 XMLErrors::XMLErrors(Document* document) |
| 47 : m_document(document) | 47 : m_document(document) |
| 48 , m_errorCount(0) | 48 , m_errorCount(0) |
| 49 , m_lastErrorPosition(TextPosition::belowRangePosition()) | 49 , m_lastErrorPosition(TextPosition::belowRangePosition()) |
| 50 { | 50 { |
| 51 } | 51 } |
| 52 | 52 |
| 53 void XMLErrors::trace(Visitor* visitor) | 53 DEFINE_TRACE(XMLErrors) |
| 54 { | 54 { |
| 55 visitor->trace(m_document); | 55 visitor->trace(m_document); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void XMLErrors::handleError(ErrorType type, const char* message, int lineNumber,
int columnNumber) | 58 void XMLErrors::handleError(ErrorType type, const char* message, int lineNumber,
int columnNumber) |
| 59 { | 59 { |
| 60 handleError(type, message, TextPosition(OrdinalNumber::fromOneBasedInt(lineN
umber), OrdinalNumber::fromOneBasedInt(columnNumber))); | 60 handleError(type, message, TextPosition(OrdinalNumber::fromOneBasedInt(lineN
umber), OrdinalNumber::fromOneBasedInt(columnNumber))); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void XMLErrors::handleError(ErrorType type, const char* message, TextPosition po
sition) | 63 void XMLErrors::handleError(ErrorType type, const char* message, TextPosition po
sition) |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 if (firstChild) | 165 if (firstChild) |
| 166 documentElement->parserInsertBefore(reportElement, *firstChild); | 166 documentElement->parserInsertBefore(reportElement, *firstChild); |
| 167 else | 167 else |
| 168 documentElement->parserAppendChild(reportElement); | 168 documentElement->parserAppendChild(reportElement); |
| 169 | 169 |
| 170 // FIXME: Why do we need to call this manually? | 170 // FIXME: Why do we need to call this manually? |
| 171 m_document->updateRenderTreeIfNeeded(); | 171 m_document->updateRenderTreeIfNeeded(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |