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

Unified Diff: Source/core/editing/EditingStyle.cpp

Issue 1292303005: Make core/editing/ files to match Blink coding style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-18T10:48:50 Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/EditingStyle.h ('k') | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditingStyle.cpp
diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp
index 638dfd3940f719ad37b63589565de28f5bb8b5b8..0dd836b56b5af72678c51c347028a9597ef4a545 100644
--- a/Source/core/editing/EditingStyle.cpp
+++ b/Source/core/editing/EditingStyle.cpp
@@ -936,9 +936,9 @@ bool EditingStyle::elementIsStyledSpanOrHTMLEquivalent(const HTMLElement* elemen
{
ASSERT(element);
bool elementIsSpanOrElementEquivalent = false;
- if (isHTMLSpanElement(*element))
+ if (isHTMLSpanElement(*element)) {
elementIsSpanOrElementEquivalent = true;
- else {
+ } else {
const WillBeHeapVector<OwnPtrWillBeMember<HTMLElementEquivalent>>& HTMLElementEquivalents = htmlElementEquivalents();
size_t i;
for (i = 0; i < HTMLElementEquivalents.size(); ++i) {
@@ -1491,10 +1491,11 @@ StyleChange::StyleChange(EditingStyle* style, const Position& position)
static void setTextDecorationProperty(MutableStylePropertySet* style, const CSSValueList* newTextDecoration, CSSPropertyID propertyID)
{
- if (newTextDecoration->length())
+ if (newTextDecoration->length()) {
style->setProperty(propertyID, newTextDecoration->cssText(), style->propertyIsImportant(propertyID));
- else {
- // text-decoration: none is redundant since it does not remove any text decorations.
+ } else {
+ // text-decoration: none is redundant since it does not remove any text
+ // decorations.
style->removeProperty(propertyID);
}
}
@@ -1585,21 +1586,21 @@ static bool fontWeightIsBold(CSSValue* fontWeight)
// Because b tag can only bold text, there are only two states in plain html: bold and not bold.
// Collapse all other values to either one of these two states for editing purposes.
switch (toCSSPrimitiveValue(fontWeight)->getValueID()) {
- case CSSValue100:
- case CSSValue200:
- case CSSValue300:
- case CSSValue400:
- case CSSValue500:
- case CSSValueNormal:
- return false;
- case CSSValueBold:
- case CSSValue600:
- case CSSValue700:
- case CSSValue800:
- case CSSValue900:
- return true;
- default:
- break;
+ case CSSValue100:
+ case CSSValue200:
+ case CSSValue300:
+ case CSSValue400:
+ case CSSValue500:
+ case CSSValueNormal:
+ return false;
+ case CSSValueBold:
+ case CSSValue600:
+ case CSSValue700:
+ case CSSValue800:
+ case CSSValue900:
+ return true;
+ default:
+ break;
}
ASSERT_NOT_REACHED(); // For CSSValueBolder and CSSValueLighter
« no previous file with comments | « Source/core/editing/EditingStyle.h ('k') | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698