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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2567963002: Change ComputedStyle::setWritingMode() to return void instead of bool (Closed)
Patch Set: Rebase Created 4 years 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 88ed08ce73c53ec9f01818f7d54bdfd61dc56081..700adf8f13d2e2675efd53ca1e0c45d494587a70 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1953,8 +1953,11 @@ void LayoutObject::setStyleWithWritingModeOfParent(
void LayoutObject::addChildWithWritingModeOfParent(LayoutObject* newChild,
LayoutObject* beforeChild) {
- if (newChild->mutableStyleRef().setWritingMode(styleRef().getWritingMode()) &&
- newChild->isBoxModelObject()) {
+ const WritingMode oldWritingMode =
+ newChild->mutableStyleRef().getWritingMode();
+ const WritingMode newWritingMode = styleRef().getWritingMode();
+ if (oldWritingMode != newWritingMode && newChild->isBoxModelObject()) {
+ newChild->mutableStyleRef().setWritingMode(newWritingMode);
newChild->setHorizontalWritingMode(isHorizontalWritingMode());
}
addChild(newChild, beforeChild);
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolverState.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698