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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 2508743002: Changed EWhiteSpace to an enum class and renamed its members to keywords (Closed)
Patch Set: Small mac fix Created 4 years 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 1333
1334 if ((needsWordSpacing && len > 1) || (ignoringSpaces && !firstWord)) 1334 if ((needsWordSpacing && len > 1) || (ignoringSpaces && !firstWord))
1335 currMaxWidth += wordSpacing; 1335 currMaxWidth += wordSpacing;
1336 1336
1337 m_minWidth = std::max(currMinWidth, m_minWidth); 1337 m_minWidth = std::max(currMinWidth, m_minWidth);
1338 m_maxWidth = std::max(currMaxWidth, m_maxWidth); 1338 m_maxWidth = std::max(currMaxWidth, m_maxWidth);
1339 1339
1340 if (!styleToUse.autoWrap()) 1340 if (!styleToUse.autoWrap())
1341 m_minWidth = m_maxWidth; 1341 m_minWidth = m_maxWidth;
1342 1342
1343 if (styleToUse.whiteSpace() == PRE) { 1343 if (styleToUse.whiteSpace() == EWhiteSpace::Pre) {
1344 if (firstLine) 1344 if (firstLine)
1345 m_firstLineMinWidth = m_maxWidth; 1345 m_firstLineMinWidth = m_maxWidth;
1346 m_lastLineLineMinWidth = currMaxWidth; 1346 m_lastLineLineMinWidth = currMaxWidth;
1347 } 1347 }
1348 1348
1349 const SimpleFontData* fontData = f.primaryFont(); 1349 const SimpleFontData* fontData = f.primaryFont();
1350 DCHECK(fontData); 1350 DCHECK(fontData);
1351 1351
1352 GlyphOverflow glyphOverflow; 1352 GlyphOverflow glyphOverflow;
1353 if (fontData) { 1353 if (fontData) {
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 LayoutRect rect = LayoutRect( 1973 LayoutRect rect = LayoutRect(
1974 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); 1974 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height()));
1975 LayoutBlock* block = containingBlock(); 1975 LayoutBlock* block = containingBlock();
1976 if (block && hasTextBoxes()) 1976 if (block && hasTextBoxes())
1977 block->adjustChildDebugRect(rect); 1977 block->adjustChildDebugRect(rect);
1978 1978
1979 return rect; 1979 return rect;
1980 } 1980 }
1981 1981
1982 } // namespace blink 1982 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698