| 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 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "web/WebViewImpl.h" | 32 #include "web/WebViewImpl.h" |
| 33 | 33 |
| 34 #include "core/CSSValueKeywords.h" | 34 #include "core/CSSValueKeywords.h" |
| 35 #include "core/HTMLNames.h" | 35 #include "core/HTMLNames.h" |
| 36 #include "core/InputTypeNames.h" | 36 #include "core/InputTypeNames.h" |
| 37 #include "core/accessibility/AXObjectCache.h" | 37 #include "core/accessibility/AXObjectCache.h" |
| 38 #include "core/clipboard/DataObject.h" | 38 #include "core/clipboard/DataObject.h" |
| 39 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
| 40 #include "core/dom/DocumentMarkerController.h" | 40 #include "core/dom/DocumentMarkerController.h" |
| 41 #include "core/dom/Fullscreen.h" |
| 41 #include "core/dom/NodeRenderingTraversal.h" | 42 #include "core/dom/NodeRenderingTraversal.h" |
| 42 #include "core/dom/Text.h" | 43 #include "core/dom/Text.h" |
| 43 #include "core/editing/Editor.h" | 44 #include "core/editing/Editor.h" |
| 44 #include "core/editing/FrameSelection.h" | 45 #include "core/editing/FrameSelection.h" |
| 45 #include "core/editing/HTMLInterchange.h" | 46 #include "core/editing/HTMLInterchange.h" |
| 46 #include "core/editing/InputMethodController.h" | 47 #include "core/editing/InputMethodController.h" |
| 47 #include "core/editing/TextIterator.h" | 48 #include "core/editing/TextIterator.h" |
| 48 #include "core/editing/markup.h" | 49 #include "core/editing/markup.h" |
| 49 #include "core/events/KeyboardEvent.h" | 50 #include "core/events/KeyboardEvent.h" |
| 50 #include "core/events/WheelEvent.h" | 51 #include "core/events/WheelEvent.h" |
| (...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 // FIXME: TextAutosizer does not yet support out-of-process frames. | 1751 // FIXME: TextAutosizer does not yet support out-of-process frames. |
| 1751 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) | 1752 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) |
| 1752 { | 1753 { |
| 1753 // Avoids unnecessary invalidations while various bits of state in TextA
utosizer are updated. | 1754 // Avoids unnecessary invalidations while various bits of state in TextA
utosizer are updated. |
| 1754 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); | 1755 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); |
| 1755 performResize(); | 1756 performResize(); |
| 1756 } else { | 1757 } else { |
| 1757 performResize(); | 1758 performResize(); |
| 1758 } | 1759 } |
| 1759 | 1760 |
| 1761 m_fullscreenController->updateSize(); |
| 1762 |
| 1760 if (settings()->viewportEnabled()) { | 1763 if (settings()->viewportEnabled()) { |
| 1761 // Relayout immediately to recalculate the minimum scale limit. | 1764 // Relayout immediately to recalculate the minimum scale limit. |
| 1762 if (view->needsLayout()) | 1765 if (view->needsLayout()) |
| 1763 view->layout(); | 1766 view->layout(); |
| 1764 | 1767 |
| 1765 if (shouldAnchorAndRescaleViewport) { | 1768 if (shouldAnchorAndRescaleViewport) { |
| 1766 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF
actor * minimumPageScaleFactor(); | 1769 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF
actor * minimumPageScaleFactor(); |
| 1767 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor
); | 1770 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor
); |
| 1768 | 1771 |
| 1769 FloatSize pinchViewportSize = FloatSize(newSize); | 1772 FloatSize pinchViewportSize = FloatSize(newSize); |
| (...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4444 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4447 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4445 | 4448 |
| 4446 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4449 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4447 return false; | 4450 return false; |
| 4448 | 4451 |
| 4449 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4452 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4450 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4453 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4451 } | 4454 } |
| 4452 | 4455 |
| 4453 } // namespace blink | 4456 } // namespace blink |
| OLD | NEW |