| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class PageScaleConstraintsSet { | 43 class PageScaleConstraintsSet { |
| 44 public: | 44 public: |
| 45 PageScaleConstraintsSet(); | 45 PageScaleConstraintsSet(); |
| 46 | 46 |
| 47 WebCore::PageScaleConstraints defaultConstraints() const; | 47 WebCore::PageScaleConstraints defaultConstraints() const; |
| 48 | 48 |
| 49 // Settings defined in the website's viewport tag, if viewport tag support | 49 // Settings defined in the website's viewport tag, if viewport tag support |
| 50 // is enabled. | 50 // is enabled. |
| 51 const WebCore::PageScaleConstraints& pageDefinedConstraints() const { return
m_pageDefinedConstraints; } | 51 const WebCore::PageScaleConstraints& pageDefinedConstraints() const { return
m_pageDefinedConstraints; } |
| 52 void updatePageDefinedConstraints(const WebCore::ViewportDescription&, WebCo
re::Length legacyFallbackWidth); | 52 void updatePageDefinedConstraints(const WebCore::ViewportDescription&, WebCo
re::Length legacyFallbackWidth); |
| 53 void adjustForAndroidWebViewQuirks(const WebCore::ViewportDescription&, int
layoutFallbackWidth, float deviceScaleFactor, bool supportTargetDensityDPI, bool
wideViewportQuirkEnabled, bool useWideViewport, bool loadWithOverviewMode, bool
nonUserScalableQuirkEnabled); | 53 void adjustForAndroidWebViewQuirks(const WebCore::ViewportDescription&, int
layoutFallbackWidth, float deviceScaleFactor, bool supportTargetDensityDPI, bool
wideViewportQuirkEnabled, bool useWideViewport, bool shrinksViewportContentToFi
t, bool nonUserScalableQuirkEnabled); |
| 54 | 54 |
| 55 // Constraints may also be set from Chromium -- this overrides any | 55 // Constraints may also be set from Chromium -- this overrides any |
| 56 // page-defined values. | 56 // page-defined values. |
| 57 const WebCore::PageScaleConstraints& userAgentConstraints() const { return m
_userAgentConstraints; } | 57 const WebCore::PageScaleConstraints& userAgentConstraints() const { return m
_userAgentConstraints; } |
| 58 void setUserAgentConstraints(const WebCore::PageScaleConstraints&); | 58 void setUserAgentConstraints(const WebCore::PageScaleConstraints&); |
| 59 | 59 |
| 60 // Actual computed values, taking into account the above plus the current | 60 // Actual computed values, taking into account the above plus the current |
| 61 // viewport size and document width. | 61 // viewport size and document width. |
| 62 const WebCore::PageScaleConstraints& finalConstraints() const { return m_fin
alConstraints; } | 62 const WebCore::PageScaleConstraints& finalConstraints() const { return m_fin
alConstraints; } |
| 63 void computeFinalConstraints(); | 63 void computeFinalConstraints(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 87 int m_lastContentsWidth; | 87 int m_lastContentsWidth; |
| 88 WebCore::IntSize m_viewSize; | 88 WebCore::IntSize m_viewSize; |
| 89 | 89 |
| 90 bool m_needsReset; | 90 bool m_needsReset; |
| 91 bool m_constraintsDirty; | 91 bool m_constraintsDirty; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace WebCore | 94 } // namespace WebCore |
| 95 | 95 |
| 96 #endif // PageScaleConstraintsSet_h | 96 #endif // PageScaleConstraintsSet_h |
| OLD | NEW |