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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 setStyle(std::move(style)); 1946 setStyle(std::move(style));
1947 } 1947 }
1948 1948
1949 void LayoutObject::setStyleWithWritingModeOfParent( 1949 void LayoutObject::setStyleWithWritingModeOfParent(
1950 PassRefPtr<ComputedStyle> style) { 1950 PassRefPtr<ComputedStyle> style) {
1951 setStyleWithWritingModeOf(std::move(style), parent()); 1951 setStyleWithWritingModeOf(std::move(style), parent());
1952 } 1952 }
1953 1953
1954 void LayoutObject::addChildWithWritingModeOfParent(LayoutObject* newChild, 1954 void LayoutObject::addChildWithWritingModeOfParent(LayoutObject* newChild,
1955 LayoutObject* beforeChild) { 1955 LayoutObject* beforeChild) {
1956 if (newChild->mutableStyleRef().setWritingMode(styleRef().getWritingMode()) && 1956 const WritingMode oldWritingMode =
1957 newChild->isBoxModelObject()) { 1957 newChild->mutableStyleRef().getWritingMode();
1958 const WritingMode newWritingMode = styleRef().getWritingMode();
1959 if (oldWritingMode != newWritingMode && newChild->isBoxModelObject()) {
1960 newChild->mutableStyleRef().setWritingMode(newWritingMode);
1958 newChild->setHorizontalWritingMode(isHorizontalWritingMode()); 1961 newChild->setHorizontalWritingMode(isHorizontalWritingMode());
1959 } 1962 }
1960 addChild(newChild, beforeChild); 1963 addChild(newChild, beforeChild);
1961 } 1964 }
1962 1965
1963 void LayoutObject::updateFillImages(const FillLayer* oldLayers, 1966 void LayoutObject::updateFillImages(const FillLayer* oldLayers,
1964 const FillLayer& newLayers) { 1967 const FillLayer& newLayers) {
1965 // Optimize the common case 1968 // Optimize the common case
1966 if (FillLayer::imagesIdentical(oldLayers, &newLayers)) 1969 if (FillLayer::imagesIdentical(oldLayers, &newLayers))
1967 return; 1970 return;
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 const blink::LayoutObject* root = object1; 3511 const blink::LayoutObject* root = object1;
3509 while (root->parent()) 3512 while (root->parent())
3510 root = root->parent(); 3513 root = root->parent();
3511 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3514 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3512 } else { 3515 } else {
3513 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3516 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3514 } 3517 }
3515 } 3518 }
3516 3519
3517 #endif 3520 #endif
OLDNEW
« 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