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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 | 900 |
901 IntRect boundingBox = isHTMLHtmlElement(root) | 901 IntRect boundingBox = isHTMLHtmlElement(root) |
902 ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize
()) | 902 ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize
()) |
903 : root->pixelSnappedBoundingBox(); | 903 : root->pixelSnappedBoundingBox(); |
904 | 904 |
905 boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox
); | 905 boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox
); |
906 boundingBox.scale(pageScaleFactor()); | 906 boundingBox.scale(pageScaleFactor()); |
907 bounds = boundingBox; | 907 bounds = boundingBox; |
908 } | 908 } |
909 | 909 |
| 910 void WebViewImpl::acceptLanguagesChanged() |
| 911 { |
| 912 if (!page()) |
| 913 return; |
| 914 |
| 915 page()->acceptLanguagesChanged(); |
| 916 } |
| 917 |
910 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) | 918 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) |
911 { | 919 { |
912 ASSERT((event.type == WebInputEvent::RawKeyDown) | 920 ASSERT((event.type == WebInputEvent::RawKeyDown) |
913 || (event.type == WebInputEvent::KeyDown) | 921 || (event.type == WebInputEvent::KeyDown) |
914 || (event.type == WebInputEvent::KeyUp)); | 922 || (event.type == WebInputEvent::KeyUp)); |
915 | 923 |
916 // Halt an in-progress fling on a key event. | 924 // Halt an in-progress fling on a key event. |
917 endActiveFlingAnimation(); | 925 endActiveFlingAnimation(); |
918 | 926 |
919 // Please refer to the comments explaining the m_suppressNextKeypressEvent | 927 // Please refer to the comments explaining the m_suppressNextKeypressEvent |
(...skipping 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4109 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4117 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4110 | 4118 |
4111 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4119 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4112 return false; | 4120 return false; |
4113 | 4121 |
4114 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4122 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4115 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4123 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4116 } | 4124 } |
4117 | 4125 |
4118 } // namespace blink | 4126 } // namespace blink |
OLD | NEW |