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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp

Issue 2607403002: Disallow setting invalid values for registered properties via CSSOM (Closed)
Patch Set: fix comments Created 3 years, 12 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
Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
index 13c1cbdb9e22ac3f62d0301efcd3138549d45a62..7ce49a30a437fada7456cf9b19b86c126f46be4f 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -687,13 +687,17 @@ void ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(
// Mutate using the CSSOM wrapper so we get the same event behavior as a
// script.
- if (isEnclosingBlock(element))
- element->style()->setPropertyInternal(
- CSSPropertyDisplay, String(), "inline", false, IGNORE_EXCEPTION);
+ if (isEnclosingBlock(element)) {
+ element->style()->setPropertyInternal(CSSPropertyDisplay, String(),
+ "inline", false, nullptr,
+ IGNORE_EXCEPTION);
+ }
if (element->layoutObject() &&
- element->layoutObject()->style()->isFloating())
+ element->layoutObject()->style()->isFloating()) {
element->style()->setPropertyInternal(CSSPropertyFloat, String(),
- "none", false, IGNORE_EXCEPTION);
+ "none", false, nullptr,
+ IGNORE_EXCEPTION);
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698