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 22 matching lines...) Expand all Loading... | |
33 DisallowScriptingContent, | 33 DisallowScriptingContent, |
34 AllowScriptingContent, | 34 AllowScriptingContent, |
35 AllowScriptingContentAndDoNotMarkAlreadyStarted, | 35 AllowScriptingContentAndDoNotMarkAlreadyStarted, |
36 }; | 36 }; |
37 | 37 |
38 static inline bool scriptingContentIsAllowed(ParserContentPolicy parserContentPo licy) | 38 static inline bool scriptingContentIsAllowed(ParserContentPolicy parserContentPo licy) |
39 { | 39 { |
40 return parserContentPolicy == AllowScriptingContent || parserContentPolicy = = AllowScriptingContentAndDoNotMarkAlreadyStarted; | 40 return parserContentPolicy == AllowScriptingContent || parserContentPolicy = = AllowScriptingContentAndDoNotMarkAlreadyStarted; |
41 } | 41 } |
42 | 42 |
43 static inline ParserContentPolicy disallowScriptingContent(ParserContentPolicy p arserContentPolicy) | |
tkent
2016/07/06 04:06:44
Is this change related to the purpose of this CL?
dominicc (has gone to gerrit)
2016/07/06 06:52:14
No, just some opportunistic clean up--this is unus
| |
44 { | |
45 if (!scriptingContentIsAllowed(parserContentPolicy)) | |
46 return parserContentPolicy; | |
47 return DisallowScriptingContent; | |
48 } | |
49 | |
50 static inline bool pluginContentIsAllowed(ParserContentPolicy parserContentPolic y) | 43 static inline bool pluginContentIsAllowed(ParserContentPolicy parserContentPolic y) |
51 { | 44 { |
52 return parserContentPolicy != DisallowScriptingAndPluginContent; | 45 return parserContentPolicy != DisallowScriptingAndPluginContent; |
53 } | 46 } |
54 | 47 |
55 } // namespace blink | 48 } // namespace blink |
56 | 49 |
57 #endif // ParserContentPolicy_h | 50 #endif // ParserContentPolicy_h |
OLD | NEW |