OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 return true; | 212 return true; |
213 | 213 |
214 RenderObject* prev = context.previousRenderer(); | 214 RenderObject* prev = context.previousRenderer(); |
215 if (prev && prev->isBR()) // <span><br/> <br/></span> | 215 if (prev && prev->isBR()) // <span><br/> <br/></span> |
216 return false; | 216 return false; |
217 | 217 |
218 if (parent->isRenderInline()) { | 218 if (parent->isRenderInline()) { |
219 // <span><div/> <div/></span> | 219 // <span><div/> <div/></span> |
220 if (prev && !prev->isInline()) | 220 if (prev && !prev->isInline()) |
221 return false; | 221 return false; |
| 222 else if (parent->isTableTag()) |
| 223 return false; |
222 } else { | 224 } else { |
223 if (parent->isRenderBlock() && !parent->childrenInline() && (!prev || !p
rev->isInline())) | 225 if (parent->isRenderBlock() && !parent->childrenInline() && (!prev || !p
rev->isInline())) |
224 return false; | 226 return false; |
225 | 227 |
226 // Avoiding creation of a Renderer for the text node is a non-essential
memory optimization. | 228 // Avoiding creation of a Renderer for the text node is a non-essential
memory optimization. |
227 // So to avoid blowing up on very wide DOMs, we limit the number of sibl
ings to visit. | 229 // So to avoid blowing up on very wide DOMs, we limit the number of sibl
ings to visit. |
228 unsigned maxSiblingsToVisit = 50; | 230 unsigned maxSiblingsToVisit = 50; |
229 | 231 |
230 RenderObject* first = parent->firstChild(); | 232 RenderObject* first = parent->firstChild(); |
231 while (first && first->isFloatingOrOutOfFlowPositioned() && maxSiblingsT
oVisit--) | 233 while (first && first->isFloatingOrOutOfFlowPositioned() && maxSiblingsT
oVisit--) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 result.appendLiteral("; "); | 346 result.appendLiteral("; "); |
345 result.appendLiteral("value="); | 347 result.appendLiteral("value="); |
346 result.append(s); | 348 result.append(s); |
347 } | 349 } |
348 | 350 |
349 strncpy(buffer, result.toString().utf8().data(), length - 1); | 351 strncpy(buffer, result.toString().utf8().data(), length - 1); |
350 } | 352 } |
351 #endif | 353 #endif |
352 | 354 |
353 } // namespace WebCore | 355 } // namespace WebCore |
OLD | NEW |