| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 void process(UChar); | 328 void process(UChar); |
| 329 | 329 |
| 330 bool peek(UChar& character) const { | 330 bool peek(UChar& character) const { |
| 331 if (m_position + 1 >= m_length) | 331 if (m_position + 1 >= m_length) |
| 332 return false; | 332 return false; |
| 333 character = m_sourceString[m_position + 1]; | 333 character = m_sourceString[m_position + 1]; |
| 334 return true; | 334 return true; |
| 335 } | 335 } |
| 336 | 336 |
| 337 UChar current() { | 337 UChar current() { |
| 338 ASSERT_WITH_SECURITY_IMPLICATION(m_position < m_length); | 338 SECURITY_DCHECK(m_position < m_length); |
| 339 return m_sourceString[m_position]; | 339 return m_sourceString[m_position]; |
| 340 } | 340 } |
| 341 | 341 |
| 342 void advance() { ++m_position; } | 342 void advance() { ++m_position; } |
| 343 | 343 |
| 344 static bool isNewline(UChar character) { | 344 static bool isNewline(UChar character) { |
| 345 // Don't attempt to canonicalize newline related characters. | 345 // Don't attempt to canonicalize newline related characters. |
| 346 return (character == '\n' || character == '\r'); | 346 return (character == '\n' || character == '\r'); |
| 347 } | 347 } |
| 348 | 348 |
| (...skipping 7198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7547 | 7547 |
| 7548 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( | 7548 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( |
| 7549 HTMLCanvasElementOrOffscreenCanvas& result) const { | 7549 HTMLCanvasElementOrOffscreenCanvas& result) const { |
| 7550 if (canvas()) | 7550 if (canvas()) |
| 7551 result.setHTMLCanvasElement(canvas()); | 7551 result.setHTMLCanvasElement(canvas()); |
| 7552 else | 7552 else |
| 7553 result.setOffscreenCanvas(getOffscreenCanvas()); | 7553 result.setOffscreenCanvas(getOffscreenCanvas()); |
| 7554 } | 7554 } |
| 7555 | 7555 |
| 7556 } // namespace blink | 7556 } // namespace blink |
| OLD | NEW |