OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 30 matching lines...) Expand all Loading... |
41 // the meta viewport tag and other sources. | 41 // the meta viewport tag and other sources. |
42 class PageScaleConstraintsSet { | 42 class PageScaleConstraintsSet { |
43 public: | 43 public: |
44 PageScaleConstraintsSet(); | 44 PageScaleConstraintsSet(); |
45 | 45 |
46 PageScaleConstraints defaultConstraints() const; | 46 PageScaleConstraints defaultConstraints() const; |
47 | 47 |
48 // Settings defined in the website's viewport tag, if viewport tag support | 48 // Settings defined in the website's viewport tag, if viewport tag support |
49 // is enabled. | 49 // is enabled. |
50 const PageScaleConstraints& pageDefinedConstraints() const { return m_pageDe
finedConstraints; } | 50 const PageScaleConstraints& pageDefinedConstraints() const { return m_pageDe
finedConstraints; } |
51 void updatePageDefinedConstraints(const ViewportArguments&, IntSize viewSize
, int layoutFallbackWidth); | 51 void updatePageDefinedConstraints(const ViewportArguments&, IntSize viewSize
); |
52 void adjustPageDefinedConstraintsForAndroidWebView(const ViewportArguments&,
IntSize viewSize, int layoutFallbackWidth, float deviceScaleFactor, bool useWid
eViewport, bool loadWithOverviewMode); | 52 void adjustPageDefinedConstraintsForAndroidWebView(const ViewportArguments&,
IntSize viewSize, int layoutFallbackWidth, float deviceScaleFactor, bool useWid
eViewport, bool loadWithOverviewMode); |
53 | 53 |
54 // Constraints may also be set from Chromium -- this overrides any | 54 // Constraints may also be set from Chromium -- this overrides any |
55 // page-defined values. | 55 // page-defined values. |
56 const PageScaleConstraints& userAgentConstraints() const { return m_userAgen
tConstraints; } | 56 const PageScaleConstraints& userAgentConstraints() const { return m_userAgen
tConstraints; } |
57 void setUserAgentConstraints(const PageScaleConstraints&); | 57 void setUserAgentConstraints(const PageScaleConstraints&); |
58 | 58 |
59 // Actual computed values, taking into account the above plus the current | 59 // Actual computed values, taking into account the above plus the current |
60 // viewport size and document width. | 60 // viewport size and document width. |
61 const PageScaleConstraints& finalConstraints() const { return m_finalConstra
ints; } | 61 const PageScaleConstraints& finalConstraints() const { return m_finalConstra
ints; } |
(...skipping 17 matching lines...) Expand all Loading... |
79 | 79 |
80 int m_lastContentsWidth; | 80 int m_lastContentsWidth; |
81 | 81 |
82 bool m_needsReset; | 82 bool m_needsReset; |
83 bool m_constraintsDirty; | 83 bool m_constraintsDirty; |
84 }; | 84 }; |
85 | 85 |
86 } // namespace WebCore | 86 } // namespace WebCore |
87 | 87 |
88 #endif // PageScaleConstraintsSet_h | 88 #endif // PageScaleConstraintsSet_h |
OLD | NEW |