| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2013 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 { | 87 { |
| 88 #if ENABLE(ASSERT) | 88 #if ENABLE(ASSERT) |
| 89 start = kInvalidOffset; | 89 start = kInvalidOffset; |
| 90 end = kInvalidOffset; | 90 end = kInvalidOffset; |
| 91 #endif | 91 #endif |
| 92 } | 92 } |
| 93 | 93 |
| 94 // Check Range instance that is actively being parsed. | 94 // Check Range instance that is actively being parsed. |
| 95 inline void checkValidStart() const | 95 inline void checkValidStart() const |
| 96 { | 96 { |
| 97 DCHECK(start != kInvalidOffset); | 97 DCHECK_NE(start, kInvalidOffset); |
| 98 DCHECK_GE(start, 0); | 98 DCHECK_GE(start, 0); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // Check Range instance which finished parse. | 101 // Check Range instance which finished parse. |
| 102 inline void checkValid() const | 102 inline void checkValid() const |
| 103 { | 103 { |
| 104 checkValidStart(); | 104 checkValidStart(); |
| 105 DCHECK(end != kInvalidOffset); | 105 DCHECK_NE(end, kInvalidOffset); |
| 106 DCHECK_GE(end, 0); | 106 DCHECK_GE(end, 0); |
| 107 DCHECK_LE(start, end); | 107 DCHECK_LE(start, end); |
| 108 } | 108 } |
| 109 | 109 |
| 110 int start; | 110 int start; |
| 111 int end; | 111 int end; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 AtomicString name() const { return AtomicString(m_name); } | 114 AtomicString name() const { return AtomicString(m_name); } |
| 115 String nameAttemptStaticStringCreation() const { return attemptStaticStr
ingCreation(m_name, Likely8Bit); } | 115 String nameAttemptStaticStringCreation() const { return attemptStaticStr
ingCreation(m_name, Likely8Bit); } |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 // A pointer into m_attributes used during lexing. | 496 // A pointer into m_attributes used during lexing. |
| 497 Attribute* m_currentAttribute; | 497 Attribute* m_currentAttribute; |
| 498 | 498 |
| 499 // For DOCTYPE | 499 // For DOCTYPE |
| 500 std::unique_ptr<DoctypeData> m_doctypeData; | 500 std::unique_ptr<DoctypeData> m_doctypeData; |
| 501 }; | 501 }; |
| 502 | 502 |
| 503 } // namespace blink | 503 } // namespace blink |
| 504 | 504 |
| 505 #endif | 505 #endif |
| OLD | NEW |