Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: Source/core/dom/ViewportAttributes.h

Issue 14813025: Refactor viewport initialization logic out of WebViewImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another RTL test fix Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/ViewportAttributes.h
diff --git a/Source/core/animation/AnimationEffect.h b/Source/core/dom/ViewportAttributes.h
similarity index 74%
copy from Source/core/animation/AnimationEffect.h
copy to Source/core/dom/ViewportAttributes.h
index 68c9497b5046e4512888dd3b156df8feff3f4ee1..82800bc1e87be1c8e2c1c7dfb0f1ded64d0ba534 100644
--- a/Source/core/animation/AnimationEffect.h
+++ b/Source/core/dom/ViewportAttributes.h
@@ -28,27 +28,30 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AnimationEffect_h
-#define AnimationEffect_h
+#ifndef ViewportAttributes_h
+#define ViewportAttributes_h
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "core/platform/graphics/FloatSize.h"
namespace WebCore {
-class StylePropertySet;
+struct ViewportAttributes {
+ FloatSize layoutSize;
-class AnimationEffect : public RefCounted<AnimationEffect> {
+ float initialScale;
+ float minimumScale;
+ float maximumScale;
-public:
- static PassRefPtr<AnimationEffect> create();
+ ViewportAttributes();
+ ViewportAttributes(float initial, float minimum, float maximum);
- PassRefPtr<StylePropertySet> sample(double fraction, int iteration);
+ void overrideWith(const ViewportAttributes& other);
+ float clampToConstraints(float pageScaleFactor) const;
+ void clampAll();
-private:
- AnimationEffect();
+ bool operator==(const ViewportAttributes& other) const;
};
} // namespace WebCore
-#endif // AnimationEffect_h
+#endif // ViewportArguments_h

Powered by Google App Engine
This is Rietveld 408576698