mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 04:58:00 +00:00
Bug 898563. r=botond
This commit is contained in:
parent
5ecc5126a2
commit
5b4e7ef8b9
@ -1743,6 +1743,11 @@ const FrameMetrics& AsyncPanZoomController::GetFrameMetrics() {
|
||||
}
|
||||
|
||||
void AsyncPanZoomController::ZoomToRect(CSSRect aRect) {
|
||||
if (!aRect.IsFinite()) {
|
||||
NS_WARNING("ZoomToRect got called with a non-finite rect; ignoring...\n");
|
||||
return;
|
||||
}
|
||||
|
||||
SetState(ANIMATING_ZOOM);
|
||||
|
||||
{
|
||||
@ -1973,9 +1978,17 @@ void AsyncPanZoomController::TimeoutContentResponse() {
|
||||
void AsyncPanZoomController::UpdateZoomConstraints(const ZoomConstraints& aConstraints) {
|
||||
APZC_LOG("%p updating zoom constraints to %d %f %f\n", this, aConstraints.mAllowZoom,
|
||||
aConstraints.mMinZoom.scale, aConstraints.mMaxZoom.scale);
|
||||
if (IsFloatNaN(aConstraints.mMinZoom.scale) || IsFloatNaN(aConstraints.mMinZoom.scale)) {
|
||||
NS_WARNING("APZC received zoom constraints with NaN values; dropping...\n");
|
||||
return;
|
||||
}
|
||||
// inf float values and other bad cases should be sanitized by the code below.
|
||||
mZoomConstraints.mAllowZoom = aConstraints.mAllowZoom;
|
||||
mZoomConstraints.mMinZoom = (MIN_ZOOM > aConstraints.mMinZoom ? MIN_ZOOM : aConstraints.mMinZoom);
|
||||
mZoomConstraints.mMaxZoom = (MAX_ZOOM > aConstraints.mMaxZoom ? aConstraints.mMaxZoom : MAX_ZOOM);
|
||||
if (mZoomConstraints.mMaxZoom < mZoomConstraints.mMinZoom) {
|
||||
mZoomConstraints.mMaxZoom = mZoomConstraints.mMinZoom;
|
||||
}
|
||||
}
|
||||
|
||||
ZoomConstraints
|
||||
|
@ -1133,6 +1133,11 @@ void
|
||||
RenderFrameParent::ContentReceivedTouch(const ScrollableLayerGuid& aGuid,
|
||||
bool aPreventDefault)
|
||||
{
|
||||
if (aGuid.mLayersId != mLayersId) {
|
||||
// Guard against bad data from hijacked child processes
|
||||
NS_ERROR("Unexpected layers id in ContentReceivedTouch; dropping message...");
|
||||
return;
|
||||
}
|
||||
if (GetApzcTreeManager()) {
|
||||
GetApzcTreeManager()->ContentReceivedTouch(aGuid, aPreventDefault);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user