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

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

Issue 1960553002: Do not ignore the text style properties when checking styles in EditingStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use w3c test harness Created 4 years, 7 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 | « third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/EditingStyle.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingStyle.cpp b/third_party/WebKit/Source/core/editing/EditingStyle.cpp
index 7c62fca5ed96119af06504c6ea8b183dc33a700a..3f7fd86fc1223ddbe7fbc11cc4ec8dbf2d54d00b 100644
--- a/third_party/WebKit/Source/core/editing/EditingStyle.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingStyle.cpp
@@ -751,7 +751,9 @@ TriState EditingStyle::triStateOfStyle(const VisibleSelection& selection) const
if (node.layoutObject() && node.hasEditableStyle()) {
CSSComputedStyleDeclaration* nodeStyle = CSSComputedStyleDeclaration::create(&node);
if (nodeStyle) {
- TriState nodeState = triStateOfStyle(nodeStyle, node.isTextNode() ? EditingStyle::DoNotIgnoreTextOnlyProperties : EditingStyle::IgnoreTextOnlyProperties);
+ // Pass EditingStyle::DoNotIgnoreTextOnlyProperties without checking if node.isTextNode()
+ // because the node can be an element node. See bug http://crbug.com/584939.
+ TriState nodeState = triStateOfStyle(nodeStyle, EditingStyle::DoNotIgnoreTextOnlyProperties);
if (nodeIsStart) {
state = nodeState;
nodeIsStart = false;
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698