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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
index 9fec720ec9fdd59bda1fe7e9ed856e7c11251666..d125cb141bc58ed6ed8f880c43fb5ff8271a405a 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -138,12 +138,12 @@ void StyleAdjuster::adjustStyleForEditing(ComputedStyle& style) {
if (style.userModify() != READ_WRITE_PLAINTEXT_ONLY)
return;
// Collapsing whitespace is harmful in plain-text editing.
- if (style.whiteSpace() == NORMAL)
- style.setWhiteSpace(PRE_WRAP);
- else if (style.whiteSpace() == NOWRAP)
- style.setWhiteSpace(PRE);
- else if (style.whiteSpace() == PRE_LINE)
- style.setWhiteSpace(PRE_WRAP);
+ if (style.whiteSpace() == EWhiteSpace::Normal)
+ style.setWhiteSpace(EWhiteSpace::PreWrap);
+ else if (style.whiteSpace() == EWhiteSpace::Nowrap)
+ style.setWhiteSpace(EWhiteSpace::Pre);
+ else if (style.whiteSpace() == EWhiteSpace::PreLine)
+ style.setWhiteSpace(EWhiteSpace::PreWrap);
}
static void adjustStyleForFirstLetter(ComputedStyle& style) {
@@ -196,14 +196,14 @@ static void adjustStyleForHTMLElement(ComputedStyle& style,
return;
if (isHTMLTableCellElement(element)) {
- if (style.whiteSpace() == KHTML_NOWRAP) {
+ if (style.whiteSpace() == EWhiteSpace::KhtmlNowrap) {
// Figure out if we are really nowrapping or if we should just
// use normal instead. If the width of the cell is fixed, then
// we don't actually use NOWRAP.
if (style.width().isFixed())
- style.setWhiteSpace(NORMAL);
+ style.setWhiteSpace(EWhiteSpace::Normal);
else
- style.setWhiteSpace(NOWRAP);
+ style.setWhiteSpace(EWhiteSpace::Nowrap);
}
return;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h ('k') | third_party/WebKit/Source/core/dom/Text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698