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

Side by Side Diff: chrome_frame/html_utils.h

Issue 5708007: Have Chrome Frame "support" IE conditional comment tags (of the downlevel-hid... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome_frame/html_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines utility functions for working with html. 5 // This file defines utility functions for working with html.
6 6
7 #ifndef CHROME_FRAME_HTML_UTILS_H_ 7 #ifndef CHROME_FRAME_HTML_UTILS_H_
8 #define CHROME_FRAME_HTML_UTILS_H_ 8 #define CHROME_FRAME_HTML_UTILS_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Returns false if we have reached the end of the html data. 100 // Returns false if we have reached the end of the html data.
101 bool NextTag(StringRange* html_string, StringRange* tag); 101 bool NextTag(StringRange* html_string, StringRange* tag);
102 102
103 // Returns true if c can be found in quotes_, false otherwise 103 // Returns true if c can be found in quotes_, false otherwise
104 bool IsQuote(wchar_t c); 104 bool IsQuote(wchar_t c);
105 105
106 // Returns true if pos refers to the last character in an HTML comment in a 106 // Returns true if pos refers to the last character in an HTML comment in a
107 // string described by html_string, false otherwise. 107 // string described by html_string, false otherwise.
108 // For example with html_string describing <!-- foo> -->, pos must refer to 108 // For example with html_string describing <!-- foo> -->, pos must refer to
109 // the last > for this method to return true. 109 // the last > for this method to return true.
110 bool IsHTMLCommentClose(StringRange* html_string, StrPos pos); 110 bool IsHTMLCommentClose(const StringRange* html_string, StrPos pos);
111
112 // Returns true if pos refers to the last character in the terminator of the
113 // opening tag of a downlevel-hidden conditional comment in IE as per
114 // http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx#syntax
115 // For example with html_string describing <![if booga >wooga]>, pos must
116 // refer to the last > for this method to return true.
117 bool IsIEConditionalCommentClose(const StringRange* html_string, StrPos pos);
111 118
112 // We store a (CollapsedWhitespace'd) copy of the html data. 119 // We store a (CollapsedWhitespace'd) copy of the html data.
113 const std::wstring html_string_; 120 const std::wstring html_string_;
114 121
115 // Store the string of quote characters to avoid repeated construction. 122 // Store the string of quote characters to avoid repeated construction.
116 const std::wstring quotes_; 123 const std::wstring quotes_;
117 124
118 DISALLOW_COPY_AND_ASSIGN(HTMLScanner); 125 DISALLOW_COPY_AND_ASSIGN(HTMLScanner);
119 }; 126 };
120 127
(...skipping 26 matching lines...) Expand all
147 // may be multiple X-Frame-Options values specified; if there is one anywhere in 154 // may be multiple X-Frame-Options values specified; if there is one anywhere in
148 // the list with a value other than ALLOWALL, this returns true. 155 // the list with a value other than ALLOWALL, this returns true.
149 bool HasFrameBustingHeader(const std::string& http_headers); 156 bool HasFrameBustingHeader(const std::string& http_headers);
150 157
151 // Returns the header passed in from the headers list. 158 // Returns the header passed in from the headers list.
152 std::string GetHttpHeaderFromHeaderList(const std::string& header_name, 159 std::string GetHttpHeaderFromHeaderList(const std::string& header_name,
153 const std::string& headers); 160 const std::string& headers);
154 } // namespace http_utils 161 } // namespace http_utils
155 162
156 #endif // CHROME_FRAME_HTML_UTILS_H_ 163 #endif // CHROME_FRAME_HTML_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome_frame/html_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698