| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return kTextNode; | 236 return kTextNode; |
| 237 } | 237 } |
| 238 | 238 |
| 239 Node* Text::cloneNode(bool /*deep*/) | 239 Node* Text::cloneNode(bool /*deep*/) |
| 240 { | 240 { |
| 241 return cloneWithData(data()); | 241 return cloneWithData(data()); |
| 242 } | 242 } |
| 243 | 243 |
| 244 static inline bool canHaveWhitespaceChildren(const LayoutObject& parent) | 244 static inline bool canHaveWhitespaceChildren(const LayoutObject& parent) |
| 245 { | 245 { |
| 246 // <button> should allow whitespace even though LayoutFlexibleBox doesn't. | 246 // <button> and <fieldset> should allow whitespace even though |
| 247 if (parent.isLayoutButton()) | 247 // LayoutFlexibleBox doesn't. |
| 248 if (parent.isLayoutButton() || parent.isFieldset()) |
| 248 return true; | 249 return true; |
| 249 | 250 |
| 250 if (parent.isTable() || parent.isTableRow() || parent.isTableSection() | 251 if (parent.isTable() || parent.isTableRow() || parent.isTableSection() |
| 251 || parent.isLayoutTableCol() || parent.isFrameSet() | 252 || parent.isLayoutTableCol() || parent.isFrameSet() |
| 252 || parent.isFlexibleBox() || parent.isLayoutGrid() | 253 || parent.isFlexibleBox() || parent.isLayoutGrid() |
| 253 || parent.isSVGRoot() | 254 || parent.isSVGRoot() |
| 254 || parent.isSVGContainer() | 255 || parent.isSVGContainer() |
| 255 || parent.isSVGImage() | 256 || parent.isSVGImage() |
| 256 || parent.isSVGShape()) { | 257 || parent.isSVGShape()) { |
| 257 return false; | 258 return false; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 { | 439 { |
| 439 return create(document(), data); | 440 return create(document(), data); |
| 440 } | 441 } |
| 441 | 442 |
| 442 DEFINE_TRACE(Text) | 443 DEFINE_TRACE(Text) |
| 443 { | 444 { |
| 444 CharacterData::trace(visitor); | 445 CharacterData::trace(visitor); |
| 445 } | 446 } |
| 446 | 447 |
| 447 } // namespace blink | 448 } // namespace blink |
| OLD | NEW |