Commit 3c824e0d authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

blink: remove TODO and replace with DCHECK

AFAICT LayoutView is always a scroll container. So, the TODOs for
dealing with infinite width/height because of overflow:visible mixed
with overflow:clip can never happen. This converts them to DCHECKs.

BUG=1087667

Change-Id: I079be338a55067d6f5b1a62e72feb58709dfbc24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441953Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815235}
parent 4fa5865e
......@@ -1290,9 +1290,9 @@ int Element::clientWidth() {
this, DocumentUpdateReason::kJavaScript);
}
if (GetDocument().GetPage()->GetSettings().GetForceZeroLayoutHeight()) {
// TODO(sky): deal with OverflowClipRect() being infinite along an
// axis (because of overflow: clip and overflow:visible along the
// opposite axis).
// OverflowClipRect() may return infinite along a particular axis if
// |layout_view| is not a scroll-container.
DCHECK(layout_view->IsScrollContainer());
return AdjustForAbsoluteZoom::AdjustLayoutUnit(
layout_view->OverflowClipRect(PhysicalOffset()).Width(),
layout_view->StyleRef())
......@@ -1336,9 +1336,9 @@ int Element::clientHeight() {
this, DocumentUpdateReason::kJavaScript);
}
if (GetDocument().GetPage()->GetSettings().GetForceZeroLayoutHeight()) {
// TODO(sky): deal with OverflowClipRect() being infinite along an
// axis (because of overflow: clip and overflow:visible along the
// opposite axis).
// OverflowClipRect() may return infinite along a particular axis if
// |layout_view| is not a scroll-container.
DCHECK(layout_view->IsScrollContainer());
return AdjustForAbsoluteZoom::AdjustLayoutUnit(
layout_view->OverflowClipRect(PhysicalOffset()).Height(),
layout_view->StyleRef())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment