| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 { | 107 { |
| 108 if (n->isDocumentNode()) | 108 if (n->isDocumentNode()) |
| 109 return ""; | 109 return ""; |
| 110 if (n->nodeType() == Node::COMMENT_NODE) | 110 if (n->nodeType() == Node::COMMENT_NODE) |
| 111 return "COMMENT"; | 111 return "COMMENT"; |
| 112 return n->nodeName(); | 112 return n->nodeName(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 static bool isEmptyOrUnstyledAppleStyleSpan(const Node* node) | 115 static bool isEmptyOrUnstyledAppleStyleSpan(const Node* node) |
| 116 { | 116 { |
| 117 if (!node || !node->isHTMLElement() || !node->hasTagName(spanTag)) | 117 if (!isHTMLSpanElement(node)) |
| 118 return false; | 118 return false; |
| 119 | 119 |
| 120 const HTMLElement* elem = toHTMLElement(node); | 120 const HTMLElement& elem = toHTMLElement(*node); |
| 121 if (elem->getAttribute(classAttr) != "Apple-style-span") | 121 if (elem.getAttribute(classAttr) != "Apple-style-span") |
| 122 return false; | 122 return false; |
| 123 | 123 |
| 124 if (!node->hasChildren()) | 124 if (!elem.hasChildren()) |
| 125 return true; | 125 return true; |
| 126 | 126 |
| 127 const StylePropertySet* inlineStyleDecl = elem->inlineStyle(); | 127 const StylePropertySet* inlineStyleDecl = elem.inlineStyle(); |
| 128 return (!inlineStyleDecl || inlineStyleDecl->isEmpty()); | 128 return (!inlineStyleDecl || inlineStyleDecl->isEmpty()); |
| 129 } | 129 } |
| 130 | 130 |
| 131 String quoteAndEscapeNonPrintables(const String& s) | 131 String quoteAndEscapeNonPrintables(const String& s) |
| 132 { | 132 { |
| 133 StringBuilder result; | 133 StringBuilder result; |
| 134 result.append('"'); | 134 result.append('"'); |
| 135 for (unsigned i = 0; i != s.length(); ++i) { | 135 for (unsigned i = 0; i != s.length(); ++i) { |
| 136 UChar c = s[i]; | 136 UChar c = s[i]; |
| 137 if (c == '\\') { | 137 if (c == '\\') { |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 element->document().updateLayout(); | 763 element->document().updateLayout(); |
| 764 | 764 |
| 765 RenderObject* renderer = element->renderer(); | 765 RenderObject* renderer = element->renderer(); |
| 766 if (!renderer || !renderer->isListItem()) | 766 if (!renderer || !renderer->isListItem()) |
| 767 return String(); | 767 return String(); |
| 768 | 768 |
| 769 return toRenderListItem(renderer)->markerText(); | 769 return toRenderListItem(renderer)->markerText(); |
| 770 } | 770 } |
| 771 | 771 |
| 772 } // namespace WebCore | 772 } // namespace WebCore |
| OLD | NEW |