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

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

Issue 2739123002: Utilize EphemeralRange::commonAncestorContainer in createStyleAtSelectionStart (Closed)
Patch Set: 2017-03-09T18:34:12 Created 3 years, 9 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 | « no previous file | 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/EditingStyleUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp
index 1c72d9b452487d87e062b1f1395fbc785e1379be..9822f5433456b1641c86ad0d8600eba9eb2edf80 100644
--- a/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp
@@ -148,9 +148,7 @@ EditingStyle* EditingStyleUtilities::createStyleAtSelectionStart(
(selection.isRange() || hasTransparentBackgroundColor(style->style()))) {
const EphemeralRange range(selection.toNormalizedEphemeralRange());
if (const CSSValue* value =
- backgroundColorValueInEffect(Range::commonAncestorContainer(
- range.startPosition().computeContainerNode(),
- range.endPosition().computeContainerNode())))
+ backgroundColorValueInEffect(range.commonAncestorContainer()))
style->setProperty(CSSPropertyBackgroundColor, value->cssText());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698