diff options
author | Ben Murdoch <benm@google.com> | 2011-05-05 14:36:32 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-10 15:38:30 +0100 |
commit | f05b935882198ccf7d81675736e3aeb089c5113a (patch) | |
tree | 4ea0ca838d9ef1b15cf17ddb3928efb427c7e5a1 /WebCore/page/WindowFeatures.h | |
parent | 60fbdcc62bced8db2cb1fd233cc4d1e4ea17db1b (diff) | |
download | external_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.zip external_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.tar.gz external_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.tar.bz2 |
Merge WebKit at r74534: Initial merge by git.
Change-Id: I6ccd1154fa1b19c2ec2a66878eb675738735f1eb
Diffstat (limited to 'WebCore/page/WindowFeatures.h')
-rw-r--r-- | WebCore/page/WindowFeatures.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/WebCore/page/WindowFeatures.h b/WebCore/page/WindowFeatures.h index a414552..ea5768f 100644 --- a/WebCore/page/WindowFeatures.h +++ b/WebCore/page/WindowFeatures.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2007, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,7 +34,10 @@ namespace WebCore { + class FloatRect; + struct WindowFeatures { + // FIXME: We can delete this constructor once V8 showModalDialog is changed to use DOMWindow. WindowFeatures() : xSet(false) , ySet(false) @@ -51,12 +54,8 @@ namespace WebCore { { } - WindowFeatures(const String& features); - - void setWindowFeature(const String& keyString, const String& valueString); - - static bool boolFeature(const HashMap<String, String>& features, const char* key, bool defaultValue = false); - static float floatFeature(const HashMap<String, String>& features, const char* key, float min, float max, float defaultValue); + WindowFeatures(const String& windowFeaturesString); + WindowFeatures(const String& dialogFeaturesString, const FloatRect& screenAvailableRect); float x; bool xSet; @@ -78,6 +77,15 @@ namespace WebCore { bool dialog; Vector<String> additionalFeatures; + + // FIXME: We can make these functions private non-member functions once V8 showModalDialog is changed to use DOMWindow. + typedef HashMap<String, String> DialogFeaturesMap; + static void parseDialogFeatures(const String&, HashMap<String, String>&); + static bool boolFeature(const DialogFeaturesMap&, const char* key, bool defaultValue = false); + static float floatFeature(const DialogFeaturesMap&, const char* key, float min, float max, float defaultValue); + + private: + void setWindowFeature(const String& keyString, const String& valueString); }; } // namespace WebCore |