| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 24 matching lines...) Expand all Loading... |
| 35 DecodedDataDocumentParser::DecodedDataDocumentParser(Document* document) | 35 DecodedDataDocumentParser::DecodedDataDocumentParser(Document* document) |
| 36 : DocumentParser(document) | 36 : DocumentParser(document) |
| 37 , m_hasAppendedData(false) | 37 , m_hasAppendedData(false) |
| 38 { | 38 { |
| 39 } | 39 } |
| 40 | 40 |
| 41 DecodedDataDocumentParser::~DecodedDataDocumentParser() | 41 DecodedDataDocumentParser::~DecodedDataDocumentParser() |
| 42 { | 42 { |
| 43 } | 43 } |
| 44 | 44 |
| 45 void DecodedDataDocumentParser::setDecoder(PassRefPtr<TextResourceDecoder> decod
er) | 45 void DecodedDataDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decod
er) |
| 46 { | 46 { |
| 47 m_decoder = decoder; | 47 m_decoder = decoder; |
| 48 } | 48 } |
| 49 | 49 |
| 50 PassRefPtr<TextResourceDecoder> DecodedDataDocumentParser::decoder() | 50 TextResourceDecoder* DecodedDataDocumentParser::decoder() |
| 51 { | 51 { |
| 52 return m_decoder; | 52 return m_decoder.get(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void DecodedDataDocumentParser::setHasAppendedData() | 55 void DecodedDataDocumentParser::setHasAppendedData() |
| 56 { | 56 { |
| 57 m_hasAppendedData = true; | 57 m_hasAppendedData = true; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void DecodedDataDocumentParser::appendBytes(const char* data, size_t length) | 60 void DecodedDataDocumentParser::appendBytes(const char* data, size_t length) |
| 61 { | 61 { |
| 62 if (!length) | 62 if (!length) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 append(decodedData.releaseImpl()); | 103 append(decodedData.releaseImpl()); |
| 104 // FIXME: Should be removed as part of https://code.google.com/p/chromium/is
sues/detail?id=319643 | 104 // FIXME: Should be removed as part of https://code.google.com/p/chromium/is
sues/detail?id=319643 |
| 105 if (!m_hasAppendedData) { | 105 if (!m_hasAppendedData) { |
| 106 m_hasAppendedData = true; | 106 m_hasAppendedData = true; |
| 107 if (m_decoder->encoding().usesVisualOrdering()) | 107 if (m_decoder->encoding().usesVisualOrdering()) |
| 108 document()->setVisuallyOrdered(); | 108 document()->setVisuallyOrdered(); |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 }; | 112 }; |
| OLD | NEW |