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 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3250 ->view() | 3250 ->view() |
3251 ->updateLifecycleToCompositingCleanPlusScrolling(); | 3251 ->updateLifecycleToCompositingCleanPlusScrolling(); |
3252 | 3252 |
3253 Document* document = m_page->mainFrame()->isLocalFrame() | 3253 Document* document = m_page->mainFrame()->isLocalFrame() |
3254 ? m_page->deprecatedLocalMainFrame()->document() | 3254 ? m_page->deprecatedLocalMainFrame()->document() |
3255 : nullptr; | 3255 : nullptr; |
3256 if (!document || document->layoutViewItem().isNull() || | 3256 if (!document || document->layoutViewItem().isNull() || |
3257 !document->documentElement() || !document->documentElement()->layoutBox()) | 3257 !document->documentElement() || !document->documentElement()->layoutBox()) |
3258 return WebSize(); | 3258 return WebSize(); |
3259 | 3259 |
| 3260 // Needed for computing minPreferredWidth. |
| 3261 FontCachePurgePreventer fontCachePurgePreventer; |
3260 int widthScaled = document->layoutViewItem() | 3262 int widthScaled = document->layoutViewItem() |
3261 .minPreferredLogicalWidth() | 3263 .minPreferredLogicalWidth() |
3262 .round(); // Already accounts for zoom. | 3264 .round(); // Already accounts for zoom. |
3263 int heightScaled = | 3265 int heightScaled = |
3264 document->documentElement()->layoutBox()->scrollHeight().round(); | 3266 document->documentElement()->layoutBox()->scrollHeight().round(); |
3265 return IntSize(widthScaled, heightScaled); | 3267 return IntSize(widthScaled, heightScaled); |
3266 } | 3268 } |
3267 | 3269 |
3268 float WebViewImpl::defaultMinimumPageScaleFactor() const { | 3270 float WebViewImpl::defaultMinimumPageScaleFactor() const { |
3269 return pageScaleConstraintsSet().defaultConstraints().minimumScale; | 3271 return pageScaleConstraintsSet().defaultConstraints().minimumScale; |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4174 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4176 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
4175 return nullptr; | 4177 return nullptr; |
4176 return focusedFrame; | 4178 return focusedFrame; |
4177 } | 4179 } |
4178 | 4180 |
4179 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4181 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
4180 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4182 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
4181 } | 4183 } |
4182 | 4184 |
4183 } // namespace blink | 4185 } // namespace blink |
OLD | NEW |