| Index: Source/core/page/PageScaleConstraints.h
|
| diff --git a/Source/core/html/ime/Composition.h b/Source/core/page/PageScaleConstraints.h
|
| similarity index 71%
|
| copy from Source/core/html/ime/Composition.h
|
| copy to Source/core/page/PageScaleConstraints.h
|
| index 9947d2411a77f4fa0a4cd3dc9758d369a8cfaf7b..92688aadd2aa49de59ef2afc8eff53673454dd2f 100644
|
| --- a/Source/core/html/ime/Composition.h
|
| +++ b/Source/core/page/PageScaleConstraints.h
|
| @@ -28,33 +28,31 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef Composition_h
|
| -#define Composition_h
|
| +#ifndef PageScaleConstraints_h
|
| +#define PageScaleConstraints_h
|
|
|
| -#include "wtf/PassRefPtr.h"
|
| -#include "wtf/RefCounted.h"
|
| -#include "wtf/RefPtr.h"
|
| +#include "core/platform/graphics/FloatSize.h"
|
|
|
| namespace WebCore {
|
|
|
| -class Node;
|
| -class Range;
|
| +struct PageScaleConstraints {
|
| + FloatSize layoutSize;
|
|
|
| -class Composition : public RefCounted<Composition> {
|
| -public:
|
| - static PassRefPtr<Composition> create(Node*, Range*);
|
| - ~Composition();
|
| + float initialScale;
|
| + float minimumScale;
|
| + float maximumScale;
|
|
|
| - Node* text() const { return m_text.get(); }
|
| - Range* caret() const { return m_caret.get(); }
|
| + PageScaleConstraints();
|
| + PageScaleConstraints(float initial, float minimum, float maximum);
|
|
|
| -private:
|
| - Composition(Node*, Range*);
|
| + void overrideWith(const PageScaleConstraints& other);
|
| + float clampToConstraints(float pageScaleFactor) const;
|
| + void clampAll();
|
| + void fitToContentsWidth(float contentsWidth, int viewWidthNotIncludingScrollbars);
|
|
|
| - RefPtr<Node> m_text;
|
| - RefPtr<Range> m_caret;
|
| + bool operator==(const PageScaleConstraints& other) const;
|
| };
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // Composition_h
|
| +#endif // PageScaleConstraints_h
|
|
|