/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// These two events are modelled after the ScrollEvent class in // ScrollContainerFrame.h. class VisualViewportResizeEvent : public Runnable { public:
NS_DECL_NSIRUNNABLE
VisualViewportResizeEvent(VisualViewport* aViewport,
nsPresContext* aPresContext); bool HasPresContext(nsPresContext* aContext) const; void Revoke();
private:
VisualViewport* mViewport;
WeakPtr<nsPresContext> mPresContext; // The VisualViewport "scroll" event is supposed to be fired only when the // *relative* offset between visual and layout viewport changes. The two // viewports are updated independently from each other, though, so the only // thing we can do is note the fact that one of the inputs into the relative // visual viewport offset changed and then check the offset again at the // next refresh driver tick, just before the event is going to fire. // Hopefully, at this point both visual and layout viewport positions have // been updated, so that we're able to tell whether the relative offset did // in fact change or not. const nsPoint mPrevVisualOffset; const nsPoint mPrevLayoutOffset;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.