| Index: third_party/WebKit/Source/core/layout/LayoutObject.h
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| index ae8d7805bd1f4b4606a4cebc8aae601315f7f79e..cef8ef1a279f3757243cf20cc8e294f15cd80a5c 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| @@ -889,10 +889,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| // first-line, first-letter and text-overflow.
|
| // The flex box and grid specs require that flex box and grid do not
|
| // support first-line|first-letter, though.
|
| + // When LayoutObject and display do not agree, allow first-line|first-letter
|
| + // only when both indicate it's a block container.
|
| // TODO(cbiesinger): Remove when buttons are implemented with align-items
|
| // instead of flex box. crbug.com/226252.
|
| bool behavesLikeBlockContainer() const {
|
| - return isLayoutBlockFlow() || isLayoutButton();
|
| + return (isLayoutBlockFlow() && style()->isDisplayBlockContainer()) ||
|
| + isLayoutButton();
|
| }
|
|
|
| // May be optionally passed to container() and various other similar methods
|
|
|