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 15 matching lines...) Expand all Loading... | |
26 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 26 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
27 #include "core/SVGNames.h" | 27 #include "core/SVGNames.h" |
28 #include "core/css/resolver/StyleResolver.h" | 28 #include "core/css/resolver/StyleResolver.h" |
29 #include "core/dom/ExceptionCode.h" | 29 #include "core/dom/ExceptionCode.h" |
30 #include "core/dom/LayoutTreeBuilder.h" | 30 #include "core/dom/LayoutTreeBuilder.h" |
31 #include "core/dom/LayoutTreeBuilderTraversal.h" | 31 #include "core/dom/LayoutTreeBuilderTraversal.h" |
32 #include "core/dom/NodeComputedStyle.h" | 32 #include "core/dom/NodeComputedStyle.h" |
33 #include "core/dom/NodeTraversal.h" | 33 #include "core/dom/NodeTraversal.h" |
34 #include "core/dom/shadow/ShadowRoot.h" | 34 #include "core/dom/shadow/ShadowRoot.h" |
35 #include "core/events/ScopedEventQueue.h" | 35 #include "core/events/ScopedEventQueue.h" |
36 #include "core/html/HTMLTableCellElement.h" | |
36 #include "core/layout/LayoutText.h" | 37 #include "core/layout/LayoutText.h" |
37 #include "core/layout/LayoutTextCombine.h" | 38 #include "core/layout/LayoutTextCombine.h" |
38 #include "core/layout/svg/LayoutSVGInlineText.h" | 39 #include "core/layout/svg/LayoutSVGInlineText.h" |
39 #include "core/svg/SVGForeignObjectElement.h" | 40 #include "core/svg/SVGForeignObjectElement.h" |
40 #include "wtf/text/CString.h" | 41 #include "wtf/text/CString.h" |
41 #include "wtf/text/StringBuilder.h" | 42 #include "wtf/text/StringBuilder.h" |
42 | 43 |
43 namespace blink { | 44 namespace blink { |
44 | 45 |
45 PassRefPtrWillBeRawPtr<Text> Text::create(Document& document, const String& data ) | 46 PassRefPtrWillBeRawPtr<Text> Text::create(Document& document, const String& data ) |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 return cloneWithData(data()); | 238 return cloneWithData(data()); |
238 } | 239 } |
239 | 240 |
240 static inline bool hasGeneratedAnonymousTableCells(const LayoutObject& parent) | 241 static inline bool hasGeneratedAnonymousTableCells(const LayoutObject& parent) |
241 { | 242 { |
242 // We're checking whether the table part has generated anonymous table | 243 // We're checking whether the table part has generated anonymous table |
243 // 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. |
244 LayoutObject* child = parent.slowFirstChild(); | 245 LayoutObject* child = parent.slowFirstChild(); |
245 if (!child || !child->isAnonymous()) | 246 if (!child || !child->isAnonymous()) |
246 return false; | 247 return false; |
247 if (child->isTableCell()) | 248 if (child->isTableCell()) { |
248 return true; | 249 LayoutObject* firstChild = child->slowFirstChild(); |
250 bool childIsTableCellWithAlternativeDisplayStyle = firstChild && firstCh ild->node() && isHTMLTableCellElement(firstChild->node()); | |
esprehn
2015/07/22 19:12:51
This variable name is hard to read, I think you ju
| |
251 return !childIsTableCellWithAlternativeDisplayStyle; | |
esprehn
2015/07/22 19:12:51
Where is this in the spec? The tag name should hav
| |
252 } | |
249 if (child->isTableSection() || child->isTableRow()) | 253 if (child->isTableSection() || child->isTableRow()) |
250 return hasGeneratedAnonymousTableCells(*child); | 254 return hasGeneratedAnonymousTableCells(*child); |
251 return false; | 255 return false; |
252 } | 256 } |
253 | 257 |
254 static inline bool canHaveWhitespaceChildren(const LayoutObject& parent) | 258 static inline bool canHaveWhitespaceChildren(const LayoutObject& parent) |
255 { | 259 { |
256 // <button> should allow whitespace even though LayoutFlexibleBox doesn't. | 260 // <button> should allow whitespace even though LayoutFlexibleBox doesn't. |
257 if (parent.isLayoutButton()) | 261 if (parent.isLayoutButton()) |
258 return true; | 262 return true; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 result.appendLiteral("; "); | 456 result.appendLiteral("; "); |
453 result.appendLiteral("value="); | 457 result.appendLiteral("value="); |
454 result.append(s); | 458 result.append(s); |
455 } | 459 } |
456 | 460 |
457 strncpy(buffer, result.toString().utf8().data(), length - 1); | 461 strncpy(buffer, result.toString().utf8().data(), length - 1); |
458 } | 462 } |
459 #endif | 463 #endif |
460 | 464 |
461 } // namespace blink | 465 } // namespace blink |
OLD | NEW |