OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 3031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3042 if (settings()->viewportEnabled()) { | 3042 if (settings()->viewportEnabled()) { |
3043 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra ints().layoutSize); | 3043 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra ints().layoutSize); |
3044 | 3044 |
3045 bool textAutosizingEnabled = page()->settings().textAutosizingEnabled(); | 3045 bool textAutosizingEnabled = page()->settings().textAutosizingEnabled(); |
3046 if (textAutosizingEnabled && layoutSize.width != view->layoutSize().widt h()) { | 3046 if (textAutosizingEnabled && layoutSize.width != view->layoutSize().widt h()) { |
3047 if (TextAutosizer* textAutosizer = page()->deprecatedLocalMainFrame( )->document()->textAutosizer()) | 3047 if (TextAutosizer* textAutosizer = page()->deprecatedLocalMainFrame( )->document()->textAutosizer()) |
3048 textAutosizer->recalculateMultipliers(); | 3048 textAutosizer->recalculateMultipliers(); |
3049 } | 3049 } |
3050 } | 3050 } |
3051 | 3051 |
3052 if (page()->settings().forceZeroLayoutHeight()) | |
3053 layoutSize.height = 0; | |
abarth-chromium
2014/07/29 16:54:55
The settings machinery looks fine, but I don't und
mkosiba (inactive)
2014/07/29 16:57:43
Thanks! I'll ask Alex to take a look.
| |
3054 | |
3052 view->setLayoutSize(layoutSize); | 3055 view->setLayoutSize(layoutSize); |
3053 } | 3056 } |
3054 | 3057 |
3055 IntSize WebViewImpl::contentsSize() const | 3058 IntSize WebViewImpl::contentsSize() const |
3056 { | 3059 { |
3057 if (!page()->mainFrame()->isLocalFrame()) | 3060 if (!page()->mainFrame()->isLocalFrame()) |
3058 return IntSize(); | 3061 return IntSize(); |
3059 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); | 3062 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); |
3060 if (!root) | 3063 if (!root) |
3061 return IntSize(); | 3064 return IntSize(); |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4179 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4182 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
4180 | 4183 |
4181 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4184 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4182 return false; | 4185 return false; |
4183 | 4186 |
4184 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4187 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4185 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4188 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4186 } | 4189 } |
4187 | 4190 |
4188 } // namespace blink | 4191 } // namespace blink |
OLD | NEW |