Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: WebCore/dom/RawDataDocumentParser.h

Issue 3776004: Revert 66670 - 2010-09-01 Tony Gentilcore <tonyg@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « WebCore/dom/DocumentParser.cpp ('k') | WebCore/dom/XMLDocumentParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 32
33 class RawDataDocumentParser : public DocumentParser { 33 class RawDataDocumentParser : public DocumentParser {
34 protected: 34 protected:
35 RawDataDocumentParser(Document* document) 35 RawDataDocumentParser(Document* document)
36 : DocumentParser(document) 36 : DocumentParser(document)
37 { 37 {
38 } 38 }
39 39
40 virtual void finish() 40 virtual void finish()
41 { 41 {
42 if (!isStopped()) 42 if (!m_parserStopped && !isDetached())
43 document()->finishedParsing(); 43 document()->finishedParsing();
44 } 44 }
45 45
46 private: 46 private:
47 virtual void insert(const SegmentedString&) 47 virtual void insert(const SegmentedString&)
48 { 48 {
49 // <https://bugs.webkit.org/show_bug.cgi?id=25397>: JS code can always c all document.write, we need to handle it. 49 // <https://bugs.webkit.org/show_bug.cgi?id=25397>: JS code can always c all document.write, we need to handle it.
50 ASSERT_NOT_REACHED(); 50 ASSERT_NOT_REACHED();
51 } 51 }
52 52
53 virtual void append(const SegmentedString&) 53 virtual void append(const SegmentedString&)
54 { 54 {
55 ASSERT_NOT_REACHED(); 55 ASSERT_NOT_REACHED();
56 } 56 }
57 57
58 virtual bool finishWasCalled() 58 virtual bool finishWasCalled()
59 { 59 {
60 // finish() always calls document()->finishedParsing() so we will be 60 // finish() always calls document()->finishedParsing() so we will be
61 // deleted after finish(). 61 // deleted after finish().
62 return false; 62 return false;
63 } 63 }
64 }; 64 };
65 65
66 }; 66 };
67 67
68 #endif // RawDataDocumentParser_h 68 #endif // RawDataDocumentParser_h
OLDNEW
« no previous file with comments | « WebCore/dom/DocumentParser.cpp ('k') | WebCore/dom/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698