| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 namespace blink { | 70 namespace blink { |
| 71 | 71 |
| 72 static bool isCharsetSpecifyingNode(const Node& node) | 72 static bool isCharsetSpecifyingNode(const Node& node) |
| 73 { | 73 { |
| 74 if (!isHTMLMetaElement(node)) | 74 if (!isHTMLMetaElement(node)) |
| 75 return false; | 75 return false; |
| 76 | 76 |
| 77 const HTMLMetaElement& element = toHTMLMetaElement(node); | 77 const HTMLMetaElement& element = toHTMLMetaElement(node); |
| 78 HTMLAttributeList attributeList; | 78 HTMLAttributeList attributeList; |
| 79 AttributeCollection attributes = element.attributes(); | 79 AttributeCollection attributes = element.attributes(); |
| 80 AttributeCollection::const_iterator end = attributes.end(); | 80 AttributeCollection::iterator end = attributes.end(); |
| 81 for (AttributeCollection::const_iterator it = attributes.begin(); it != end;
++it) { | 81 for (AttributeCollection::iterator it = attributes.begin(); it != end; ++it)
{ |
| 82 // FIXME: We should deal appropriately with the attribute if they have a
namespace. | 82 // FIXME: We should deal appropriately with the attribute if they have a
namespace. |
| 83 attributeList.append(std::make_pair(it->name().localName(), it->value().
string())); | 83 attributeList.append(std::make_pair(it->name().localName(), it->value().
string())); |
| 84 } | 84 } |
| 85 WTF::TextEncoding textEncoding = encodingFromMetaAttributes(attributeList); | 85 WTF::TextEncoding textEncoding = encodingFromMetaAttributes(attributeList); |
| 86 return textEncoding.isValid(); | 86 return textEncoding.isValid(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 static bool shouldIgnoreElement(const Element& element) | 89 static bool shouldIgnoreElement(const Element& element) |
| 90 { | 90 { |
| 91 return isHTMLScriptElement(element) || isHTMLNoScriptElement(element) || isC
harsetSpecifyingNode(element); | 91 return isHTMLScriptElement(element) || isHTMLNoScriptElement(element) || isC
harsetSpecifyingNode(element); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 if (iter != m_blankFrameURLs.end()) | 382 if (iter != m_blankFrameURLs.end()) |
| 383 return iter->value; | 383 return iter->value; |
| 384 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); | 384 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); |
| 385 KURL fakeURL(ParsedURLString, url); | 385 KURL fakeURL(ParsedURLString, url); |
| 386 m_blankFrameURLs.add(frame, fakeURL); | 386 m_blankFrameURLs.add(frame, fakeURL); |
| 387 | 387 |
| 388 return fakeURL; | 388 return fakeURL; |
| 389 } | 389 } |
| 390 | 390 |
| 391 } | 391 } |
| OLD | NEW |