Chromium Code Reviews| Index: Source/core/page/DOMWindow.cpp |
| diff --git a/Source/core/page/DOMWindow.cpp b/Source/core/page/DOMWindow.cpp |
| index 6c42964bc50503e55d17007900d91533941f21ed..3d850317f4779a222fcf1da5ba1a4766f0b15cb0 100644 |
| --- a/Source/core/page/DOMWindow.cpp |
| +++ b/Source/core/page/DOMWindow.cpp |
| @@ -1025,6 +1025,10 @@ int DOMWindow::innerHeight() const |
| if (!view) |
| return 0; |
| + // FIXME: This is potentially too much work. We really only need to know the dimensions of the parent frame's renderer. |
|
esprehn
2013/07/16 02:58:50
I don't think you need the fixme, this is true of
|
| + if (Frame* parent = m_frame->tree()->parent()) |
| + parent->document()->updateLayoutIgnorePendingStylesheets(); |
| + |
| // If the device height is overridden, do not include the horizontal scrollbar into the innerHeight (since it is absent on the real device). |
| bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenHeightOverride(m_frame); |
| return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars).height())); |
| @@ -1039,6 +1043,10 @@ int DOMWindow::innerWidth() const |
| if (!view) |
| return 0; |
| + // FIXME: This is potentially too much work. We really only need to know the dimensions of the parent frame's renderer. |
| + if (Frame* parent = m_frame->tree()->parent()) |
| + parent->document()->updateLayoutIgnorePendingStylesheets(); |
| + |
| // If the device width is overridden, do not include the vertical scrollbar into the innerWidth (since it is absent on the real device). |
| bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(m_frame); |
| return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars).width())); |