Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| index 466e6b5bbd3e52f5a22e787fadb6575b4718c77a..13d0fceaf90a4ff2b580c5ab307ef775510de536 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| @@ -346,8 +346,16 @@ void LayoutInline::addChildIgnoringContinuation(LayoutObject* newChild, |
| // of this inline. We take all of the children after |beforeChild| and put |
| // them in a clone of this object. |
| RefPtr<ComputedStyle> newStyle = |
| - ComputedStyle::createAnonymousStyleWithDisplay( |
| - containingBlock()->styleRef(), EDisplay::kBlock); |
| + ComputedStyle::createAnonymousStyleWithDisplay(styleRef(), |
| + EDisplay::kBlock); |
| + // Block elements in the anon block must use the direction set by the |
| + // anon block's containing block, so we need to prevent the anon block |
| + // from inheriting direction from the inline. If there are any other |
| + // inheritable properties that apply to block and inline elements |
| + // but only affect the layout of children we will want to special-case |
| + // them here too. Writing-mode would be one if it didn't create a |
| + // formatting context of its own, removing the need for continuations. |
|
mstensho (USE GERRIT)
2017/04/19 09:32:48
Great comment. Could you also add that this anonym
|
| + newStyle->setDirection(containingBlock()->styleRef().direction()); |
| // If inside an inline affected by in-flow positioning the block needs to be |
| // affected by it too. Giving the block a layer like this allows it to |