| 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 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3361 | 3361 |
| 3362 Document* document = m_page->mainFrame()->isLocalFrame() ? m_page->deprecate
dLocalMainFrame()->document() : 0; | 3362 Document* document = m_page->mainFrame()->isLocalFrame() ? m_page->deprecate
dLocalMainFrame()->document() : 0; |
| 3363 if (!document || !document->layoutView() || !document->documentElement() ||
!document->documentElement()->layoutBox()) | 3363 if (!document || !document->layoutView() || !document->documentElement() ||
!document->documentElement()->layoutBox()) |
| 3364 return WebSize(); | 3364 return WebSize(); |
| 3365 | 3365 |
| 3366 int widthScaled = document->layoutView()->minPreferredLogicalWidth().round()
; // Already accounts for zoom. | 3366 int widthScaled = document->layoutView()->minPreferredLogicalWidth().round()
; // Already accounts for zoom. |
| 3367 int heightScaled = document->documentElement()->layoutBox()->scrollHeight().
round(); | 3367 int heightScaled = document->documentElement()->layoutBox()->scrollHeight().
round(); |
| 3368 return IntSize(widthScaled, heightScaled); | 3368 return IntSize(widthScaled, heightScaled); |
| 3369 } | 3369 } |
| 3370 | 3370 |
| 3371 void WebViewImpl::setCompositedDisplayList(WebCompositedDisplayList* compositedD
isplayList) |
| 3372 { |
| 3373 m_compositedDisplayList = adoptPtr(compositedDisplayList); |
| 3374 } |
| 3375 |
| 3376 WebCompositedDisplayList* WebViewImpl::compositedDisplayList() |
| 3377 { |
| 3378 return m_compositedDisplayList.get(); |
| 3379 } |
| 3380 |
| 3371 void WebViewImpl::enableViewport() | 3381 void WebViewImpl::enableViewport() |
| 3372 { | 3382 { |
| 3373 settings()->setViewportEnabled(true); | 3383 settings()->setViewportEnabled(true); |
| 3374 } | 3384 } |
| 3375 | 3385 |
| 3376 void WebViewImpl::disableViewport() | 3386 void WebViewImpl::disableViewport() |
| 3377 { | 3387 { |
| 3378 settings()->setViewportEnabled(false); | 3388 settings()->setViewportEnabled(false); |
| 3379 pageScaleConstraintsSet().clearPageDefinedConstraints(); | 3389 pageScaleConstraintsSet().clearPageDefinedConstraints(); |
| 3380 updateMainFrameLayoutSize(); | 3390 updateMainFrameLayoutSize(); |
| (...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4455 if (m_pageColorOverlay) | 4465 if (m_pageColorOverlay) |
| 4456 m_pageColorOverlay->update(); | 4466 m_pageColorOverlay->update(); |
| 4457 if (m_inspectorOverlay) { | 4467 if (m_inspectorOverlay) { |
| 4458 PageOverlay* inspectorPageOverlay = m_inspectorOverlay->pageOverlay(); | 4468 PageOverlay* inspectorPageOverlay = m_inspectorOverlay->pageOverlay(); |
| 4459 if (inspectorPageOverlay) | 4469 if (inspectorPageOverlay) |
| 4460 inspectorPageOverlay->update(); | 4470 inspectorPageOverlay->update(); |
| 4461 } | 4471 } |
| 4462 } | 4472 } |
| 4463 | 4473 |
| 4464 } // namespace blink | 4474 } // namespace blink |
| OLD | NEW |