Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: third_party/WebKit/Source/core/dom/Text.cpp

Issue 2373223002: Fieldset should allow whitespaces even though LayoutFlexibleBox doesn't. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/fast/forms/focus-selection-textarea-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/fast/forms/focus-selection-textarea-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698