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

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

Issue 1709963002: [css-align] New CSS Value 'normal' for Self Alignment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Getting back the FullScreen fix, missed during the rebase. Created 4 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
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 642fb0227372f9018f2e544a8c7460d4125f45dc..daac9bbd5f7c4b8fff320bf7c658d86b1a75aece 100644
--- a/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp
@@ -94,6 +94,9 @@ PassRefPtr<ComputedStyle> EditingViewPortElement::customStyleForLayoutObject()
style->setUserModify(READ_ONLY);
style->setUnique();
+ if (const ComputedStyle* parentStyle = parentComputedStyle())
+ StyleAdjuster::adjustStyleForAlignment(*style, *parentStyle);
+
return style.release();
}
@@ -144,8 +147,10 @@ PassRefPtr<ComputedStyle> TextControlInnerEditorElement::customStyleForLayoutObj
LayoutTextControlItem textControlLayoutItem = LayoutTextControlItem(toLayoutTextControl(parentLayoutObject));
RefPtr<ComputedStyle> innerEditorStyle = textControlLayoutItem.createInnerEditorStyle(textControlLayoutItem.styleRef());
// Using StyleAdjuster::adjustComputedStyle updates unwanted style. We'd like
- // to apply only editing-related.
+ // to apply only editing-related and alignment-related.
StyleAdjuster::adjustStyleForEditing(*innerEditorStyle);
+ if (const ComputedStyle* parentStyle = parentComputedStyle())
+ StyleAdjuster::adjustStyleForAlignment(*innerEditorStyle, *parentStyle);
return innerEditorStyle.release();
}
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698