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

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

Issue 2508743002: Changed EWhiteSpace to an enum class and renamed its members to keywords (Closed)
Patch Set: Small mac fix Created 4 years, 1 month 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
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 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
5 * reserved. 5 * reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 if (style.display() == EDisplay::None) 267 if (style.display() == EDisplay::None)
268 return false; 268 return false;
269 269
270 if (!containsOnlyWhitespace()) 270 if (!containsOnlyWhitespace())
271 return true; 271 return true;
272 272
273 if (!canHaveWhitespaceChildren(parent)) 273 if (!canHaveWhitespaceChildren(parent))
274 return false; 274 return false;
275 275
276 // pre-wrap in SVG never makes layoutObject. 276 // pre-wrap in SVG never makes layoutObject.
277 if (style.whiteSpace() == PRE_WRAP && parent.isSVG()) 277 if (style.whiteSpace() == EWhiteSpace::PreWrap && parent.isSVG())
278 return false; 278 return false;
279 279
280 // pre/pre-wrap/pre-line always make layoutObjects. 280 // pre/pre-wrap/pre-line always make layoutObjects.
281 if (style.preserveNewline()) 281 if (style.preserveNewline())
282 return true; 282 return true;
283 283
284 // childNeedsDistributionRecalc() here is rare, only happens JS calling 284 // childNeedsDistributionRecalc() here is rare, only happens JS calling
285 // surroundContents() etc. from DOMNodeInsertedIntoDocument etc. 285 // surroundContents() etc. from DOMNodeInsertedIntoDocument etc.
286 if (document().childNeedsDistributionRecalc()) 286 if (document().childNeedsDistributionRecalc())
287 return true; 287 return true;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 Text* Text::cloneWithData(const String& data) { 451 Text* Text::cloneWithData(const String& data) {
452 return create(document(), data); 452 return create(document(), data);
453 } 453 }
454 454
455 DEFINE_TRACE(Text) { 455 DEFINE_TRACE(Text) {
456 CharacterData::trace(visitor); 456 CharacterData::trace(visitor);
457 } 457 }
458 458
459 } // namespace blink 459 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698