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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 (!node || !node->isHTMLElement() || !node->hasTagName(spanTag)) |
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->hasChildNodes()) | 124 if (!node->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('"'); |
(...skipping 628 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 |