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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
241 static inline bool hasGeneratedAnonymousTableCells(const LayoutObject& parent) | 241 static inline bool hasGeneratedAnonymousTableCells(const LayoutObject& parent) |
242 { | 242 { |
243 // We're checking whether the table part has generated anonymous table | 243 // We're checking whether the table part has generated anonymous table |
244 // part wrappers to hold its contents, so inspecting its first child will su ffice. | 244 // part wrappers to hold its contents, so inspecting its first child will su ffice. |
245 LayoutObject* child = parent.slowFirstChild(); | 245 LayoutObject* child = parent.slowFirstChild(); |
246 if (!child || !child->isAnonymous()) | 246 if (!child || !child->isAnonymous()) |
247 return false; | 247 return false; |
248 if (child->isTableCell()) { | 248 if (child->isTableCell()) { |
249 LayoutObject* firstChild = child->slowFirstChild(); | 249 LayoutObject* firstChild = child->slowFirstChild(); |
250 // Ignore the anonymous table cell if it is wrapping a table cell elemen t (e.g. because of <td style="display:block;">). | 250 // Ignore the anonymous table cell if it is wrapping a table cell elemen t (e.g. because of <td style="display:block;">). |
251 return !firstChild || !firstChild->node() || !isHTMLTableCellElement(fir stChild->node()); | 251 return !firstChild || !firstChild->node() || (firstChild->style()->origi nalDisplay() != TABLE_CELL && !isHTMLTableCellElement(firstChild->node())); |
mstensho (USE GERRIT)
2015/08/25 11:24:05
I don't think this is quite right, because:
<!DOC
| |
252 } | 252 } |
253 if (child->isTableSection() || child->isTableRow()) | 253 if (child->isTableSection() || child->isTableRow()) |
254 return hasGeneratedAnonymousTableCells(*child); | 254 return hasGeneratedAnonymousTableCells(*child); |
255 return false; | 255 return false; |
256 } | 256 } |
257 | 257 |
258 static inline bool canHaveWhitespaceChildren(const LayoutObject& parent) | 258 static inline bool canHaveWhitespaceChildren(const LayoutObject& parent) |
259 { | 259 { |
260 // <button> should allow whitespace even though LayoutFlexibleBox doesn't. | 260 // <button> should allow whitespace even though LayoutFlexibleBox doesn't. |
261 if (parent.isLayoutButton()) | 261 if (parent.isLayoutButton()) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
456 result.appendLiteral("; "); | 456 result.appendLiteral("; "); |
457 result.appendLiteral("value="); | 457 result.appendLiteral("value="); |
458 result.append(s); | 458 result.append(s); |
459 } | 459 } |
460 | 460 |
461 strncpy(buffer, result.toString().utf8().data(), length - 1); | 461 strncpy(buffer, result.toString().utf8().data(), length - 1); |
462 } | 462 } |
463 #endif | 463 #endif |
464 | 464 |
465 } // namespace blink | 465 } // namespace blink |
OLD | NEW |