Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| index 0cda260965ad4a195be89ab2cd3e462c8d1cd65b..07968a8b6ae80dcb1c06d6584884a5560b29b59e 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -2839,7 +2839,7 @@ LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing(SizeType sizeType, const |
| // FIXME: containingBlockLogicalWidthForContent() is wrong if the replaced element's writing-mode is perpendicular to the |
| // containing block's writing-mode. |
| // https://bugs.webkit.org/show_bug.cgi?id=46496 |
| - const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogicalWidthForPositioned(toLayoutBoxModelObject(container())) : containingBlockLogicalWidthForContent(); |
| + const LayoutUnit cw = std::max(LayoutUnit(), isOutOfFlowPositioned() ? containingBlockLogicalWidthForPositioned(toLayoutBoxModelObject(container())) : containingBlockLogicalWidthForContent()); |
|
cbiesinger
2016/06/27 18:43:49
So, why do these functions return a negative value
jfernandez
2016/06/27 21:38:43
I though about that, actually. However, I've got l
|
| Length containerLogicalWidth = containingBlock()->style()->logicalWidth(); |
| // FIXME: Handle cases when containing block width is calculated or viewport percent. |
| // https://bugs.webkit.org/show_bug.cgi?id=91071 |