| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 const HTMLAttributeList& attributes) { | 411 const HTMLAttributeList& attributes) { |
| 412 bool got_pragma = false; | 412 bool got_pragma = false; |
| 413 MetaAttribute mode = MetaAttribute::kNone; | 413 MetaAttribute mode = MetaAttribute::kNone; |
| 414 String charset; | 414 String charset; |
| 415 | 415 |
| 416 for (const auto& html_attribute : attributes) { | 416 for (const auto& html_attribute : attributes) { |
| 417 const String& attribute_name = html_attribute.first; | 417 const String& attribute_name = html_attribute.first; |
| 418 const String& attribute_value = AtomicString(html_attribute.second); | 418 const String& attribute_value = AtomicString(html_attribute.second); |
| 419 | 419 |
| 420 if (ThreadSafeMatch(attribute_name, http_equivAttr)) { | 420 if (ThreadSafeMatch(attribute_name, http_equivAttr)) { |
| 421 if (EqualIgnoringCase(attribute_value, "content-type")) | 421 if (DeprecatedEqualIgnoringCase(attribute_value, "content-type")) |
| 422 got_pragma = true; | 422 got_pragma = true; |
| 423 } else if (charset.IsEmpty()) { | 423 } else if (charset.IsEmpty()) { |
| 424 if (ThreadSafeMatch(attribute_name, charsetAttr)) { | 424 if (ThreadSafeMatch(attribute_name, charsetAttr)) { |
| 425 charset = attribute_value; | 425 charset = attribute_value; |
| 426 mode = MetaAttribute::kCharset; | 426 mode = MetaAttribute::kCharset; |
| 427 } else if (ThreadSafeMatch(attribute_name, contentAttr)) { | 427 } else if (ThreadSafeMatch(attribute_name, contentAttr)) { |
| 428 charset = ExtractCharset(attribute_value); | 428 charset = ExtractCharset(attribute_value); |
| 429 if (charset.length()) | 429 if (charset.length()) |
| 430 mode = MetaAttribute::kPragma; | 430 mode = MetaAttribute::kPragma; |
| 431 } | 431 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 string = StringImpl::Create8BitIfPossible(characters, size); | 495 string = StringImpl::Create8BitIfPossible(characters, size); |
| 496 else if (width == kForce8Bit) | 496 else if (width == kForce8Bit) |
| 497 string = String::Make8BitFrom16BitSource(characters, size); | 497 string = String::Make8BitFrom16BitSource(characters, size); |
| 498 else | 498 else |
| 499 string = String(characters, size); | 499 string = String(characters, size); |
| 500 | 500 |
| 501 return string; | 501 return string; |
| 502 } | 502 } |
| 503 | 503 |
| 504 } // namespace blink | 504 } // namespace blink |
| OLD | NEW |