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

Unified Diff: third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp

Issue 1813663002: Don't collapse whitespace in contenteditable=plaintext-only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('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/html/shadow/TextControlInnerElements.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp b/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp
index 7b2c745ec0c9cd13bccbb23439af1a06a492916e..71eaed4485fc3c0f22d74b2b81195c701b3c1a1b 100644
--- a/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp
@@ -27,6 +27,7 @@
#include "core/html/shadow/TextControlInnerElements.h"
#include "core/HTMLNames.h"
+#include "core/css/resolver/StyleAdjuster.h"
#include "core/dom/Document.h"
#include "core/dom/NodeComputedStyle.h"
#include "core/events/MouseEvent.h"
@@ -142,7 +143,11 @@ PassRefPtr<ComputedStyle> TextControlInnerEditorElement::customStyleForLayoutObj
if (!parentLayoutObject || !parentLayoutObject->isTextControl())
return originalStyleForLayoutObject();
LayoutTextControlItem textControlLayoutItem = LayoutTextControlItem(toLayoutTextControl(parentLayoutObject));
- return textControlLayoutItem.createInnerEditorStyle(textControlLayoutItem.styleRef());
+ RefPtr<ComputedStyle> innerEditorStyle = textControlLayoutItem.createInnerEditorStyle(textControlLayoutItem.styleRef());
+ // Using StyleAdjuster::adjustComputedStyle updates unwanted style. We'd like
+ // to apply only editing-related.
+ StyleAdjuster::adjustStyleForEditing(*innerEditorStyle);
+ return innerEditorStyle.release();
}
// ----------------------------
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698