OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 && !isSVGScriptElement(node); | 87 && !isSVGScriptElement(node); |
88 } | 88 } |
89 | 89 |
90 static unsigned textLengthLimitForContainer(const ContainerNode& node) | 90 static unsigned textLengthLimitForContainer(const ContainerNode& node) |
91 { | 91 { |
92 return shouldUseLengthLimit(node) ? Text::defaultLengthLimit : std::numeric_
limits<unsigned>::max(); | 92 return shouldUseLengthLimit(node) ? Text::defaultLengthLimit : std::numeric_
limits<unsigned>::max(); |
93 } | 93 } |
94 | 94 |
95 static inline bool isAllWhitespace(const String& string) | 95 static inline bool isAllWhitespace(const String& string) |
96 { | 96 { |
97 return string.isAllSpecialCharacters<isHTMLSpace<UChar> >(); | 97 return string.isAllSpecialCharacters<isHTMLSpace<UChar>>(); |
98 } | 98 } |
99 | 99 |
100 static inline void insert(HTMLConstructionSiteTask& task) | 100 static inline void insert(HTMLConstructionSiteTask& task) |
101 { | 101 { |
102 if (isHTMLTemplateElement(*task.parent)) | 102 if (isHTMLTemplateElement(*task.parent)) |
103 task.parent = toHTMLTemplateElement(task.parent.get())->content(); | 103 task.parent = toHTMLTemplateElement(task.parent.get())->content(); |
104 | 104 |
105 if (ContainerNode* parent = task.child->parentNode()) | 105 if (ContainerNode* parent = task.child->parentNode()) |
106 parent->parserRemoveChild(*task.child); | 106 parent->parserRemoveChild(*task.child); |
107 | 107 |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 } | 879 } |
880 | 880 |
881 void HTMLConstructionSite::PendingText::trace(Visitor* visitor) | 881 void HTMLConstructionSite::PendingText::trace(Visitor* visitor) |
882 { | 882 { |
883 visitor->trace(parent); | 883 visitor->trace(parent); |
884 visitor->trace(nextChild); | 884 visitor->trace(nextChild); |
885 } | 885 } |
886 | 886 |
887 | 887 |
888 } | 888 } |
OLD | NEW |