Bug 1202290 - Remove special-case condition for Fennec that is not needed any more. r=tn

The special-case was added back when the Fennec dynamic toolbar showing/hiding
behaviour didn't resize the content area. As of bug 1180295 that is no longer
the case, and showing/hiding the dynamic toolbar *does* resize the content area.
Therefore the widget bounds always represents the actual content area and can
be used directly as the composition bounds.

In addition, the special-case code relied on a particular quirk of the Fennec
CSS viewport determination code which was removed in bug 1180267. The quirk was
that the CSS viewport height was always set such that it would cover the
available screen height when the page was zoomed out to the minimum allowed
zoom. This behaviour was technically incorrect as it would ignore any height
properties provided in the meta-viewport tag. Now that this quirk has been
removed, the special-case code breaks because the root frame's height is
independent of the screen height and can result in an incorrect composition
bounds.

--HG--
extra : commitid : 69FDhj50WEN
This commit is contained in:
Kartikaya Gupta 2015-09-09 23:22:19 -04:00
Родитель 33d16f7c15
Коммит 8f2b8f8996
1 изменённых файлов: 0 добавлений и 18 удалений

Просмотреть файл

@ -7810,15 +7810,6 @@ UpdateCompositionBoundsForRCDRSF(ParentLayerRect& aCompBounds,
return false;
}
// On Android, we need to do things a bit differently to get things
// right (see bug 983208, bug 988882). We use the bounds of the nearest
// widget, but clamp the height to the frame bounds height. This clamping
// is done to get correct results for a page where the page is sized to
// the screen and thus the dynamic toolbar never disappears. In such a
// case, we want the composition bounds to exclude the toolbar height,
// but the widget bounds includes it. We don't currently have a good way
// of knowing about the toolbar height, but clamping to the frame bounds
// height gives the correct answer in the cases we care about.
#ifdef MOZ_WIDGET_ANDROID
nsIWidget* widget = rootFrame->GetNearestWidget();
#else
@ -7831,15 +7822,6 @@ UpdateCompositionBoundsForRCDRSF(ParentLayerRect& aCompBounds,
widget->GetBounds(widgetBounds);
widgetBounds.MoveTo(0, 0);
aCompBounds = ParentLayerRect(ViewAs<ParentLayerPixel>(widgetBounds));
#ifdef MOZ_WIDGET_ANDROID
ParentLayerRect frameBounds =
LayoutDeviceRect::FromAppUnits(aFrameBounds, aPresContext->AppUnitsPerDevPixel())
* aCumulativeResolution
* LayerToParentLayerScale(1.0);
if (frameBounds.height < aCompBounds.height) {
aCompBounds.height = frameBounds.height;
}
#endif
return true;
}