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

Side by Side Diff: sky/engine/core/html/parser/BackgroundHTMLParser.h

Issue 814173005: The Sky parser should yield before start tags (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // DataPipeDrainer::Client: 61 // DataPipeDrainer::Client:
62 void OnDataAvailable(const void* data, size_t numberOfBytes) override; 62 void OnDataAvailable(const void* data, size_t numberOfBytes) override;
63 void OnDataComplete() override; 63 void OnDataComplete() override;
64 64
65 void finish(); 65 void finish();
66 void markEndOfFile(); 66 void markEndOfFile();
67 void pumpTokenizer(); 67 void pumpTokenizer();
68 void sendTokensToMainThread(); 68 void sendTokensToMainThread();
69 bool updateTokenizerState(const CompactHTMLToken& token); 69 bool updateTokenizerState(const CompactHTMLToken& token);
70 70
71 enum State {
72 InitialState,
73 DidSeeImportState,
74 };
75
76 State m_state;
71 SegmentedString m_input; 77 SegmentedString m_input;
72 OwnPtr<HTMLToken> m_token; 78 OwnPtr<HTMLToken> m_token;
73 OwnPtr<HTMLTokenizer> m_tokenizer; 79 OwnPtr<HTMLTokenizer> m_tokenizer;
74 base::WeakPtr<HTMLDocumentParser> m_parser; 80 base::WeakPtr<HTMLDocumentParser> m_parser;
75 81
76 OwnPtr<CompactHTMLTokenStream> m_pendingTokens; 82 OwnPtr<CompactHTMLTokenStream> m_pendingTokens;
77 OwnPtr<TextResourceDecoder> m_decoder; 83 OwnPtr<TextResourceDecoder> m_decoder;
78 84
79 mojo::ScopedDataPipeConsumerHandle m_source; 85 mojo::ScopedDataPipeConsumerHandle m_source;
80 OwnPtr<mojo::common::DataPipeDrainer> m_drainer; 86 OwnPtr<mojo::common::DataPipeDrainer> m_drainer;
81 87
82 base::WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; 88 base::WeakPtrFactory<BackgroundHTMLParser> m_weakFactory;
83 }; 89 };
84 90
85 } 91 }
86 92
87 #endif // SKY_ENGINE_CORE_HTML_PARSER_BACKGROUNDHTMLPARSER_H_ 93 #endif // SKY_ENGINE_CORE_HTML_PARSER_BACKGROUNDHTMLPARSER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/DocumentParser.h ('k') | sky/engine/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698