| Index: Source/core/html/HTMLDialogElement.cpp
|
| diff --git a/Source/core/html/HTMLDialogElement.cpp b/Source/core/html/HTMLDialogElement.cpp
|
| index f640a15834bf1362fe1048d458bf2a8abf70589a..90451dafcb3913e690750f6e8c96dbd92a8a81ad 100644
|
| --- a/Source/core/html/HTMLDialogElement.cpp
|
| +++ b/Source/core/html/HTMLDialogElement.cpp
|
| @@ -92,13 +92,10 @@ void HTMLDialogElement::positionAndReattach()
|
| // FIXME: Figure out what to do in vertical writing mode.
|
| FrameView* frameView = document()->view();
|
| int scrollTop = frameView->scrollOffset().height();
|
| - FloatPoint absolutePoint(0, scrollTop);
|
| int visibleHeight = frameView->visibleContentRect(ScrollableArea::IncludeScrollbars).height();
|
| + m_top = scrollTop;
|
| if (box->height() < visibleHeight)
|
| - absolutePoint.move(0, (visibleHeight - box->height()) / 2);
|
| - FloatPoint localPoint = box->containingBlock()->absoluteToLocal(absolutePoint);
|
| -
|
| - m_top = localPoint.y();
|
| + m_top += (visibleHeight - box->height()) / 2;
|
| m_topIsValid = true;
|
|
|
| // FIXME: It's inefficient to reattach here. We could do better by mutating style directly and forcing another layout.
|
| @@ -134,4 +131,11 @@ bool HTMLDialogElement::isPresentationAttribute(const QualifiedName& name) const
|
| return HTMLElement::isPresentationAttribute(name);
|
| }
|
|
|
| +bool HTMLDialogElement::isReparentedByRenderView(const RenderStyle* style) const
|
| +{
|
| + if (style && style->position() == AbsolutePosition)
|
| + return true;
|
| + return Element::isReparentedByRenderView(style);
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|