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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize
()) | 901 ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize
()) |
902 : root->pixelSnappedBoundingBox(); | 902 : root->pixelSnappedBoundingBox(); |
903 | 903 |
904 boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox
); | 904 boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox
); |
905 boundingBox.scale(pageScaleFactor()); | 905 boundingBox.scale(pageScaleFactor()); |
906 bounds = boundingBox; | 906 bounds = boundingBox; |
907 } | 907 } |
908 | 908 |
909 void WebViewImpl::acceptLanguagesChanged() | 909 void WebViewImpl::acceptLanguagesChanged() |
910 { | 910 { |
| 911 if (!page()) |
| 912 return; |
| 913 |
| 914 page()->acceptLanguagesChanged(); |
911 } | 915 } |
912 | 916 |
913 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) | 917 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) |
914 { | 918 { |
915 ASSERT((event.type == WebInputEvent::RawKeyDown) | 919 ASSERT((event.type == WebInputEvent::RawKeyDown) |
916 || (event.type == WebInputEvent::KeyDown) | 920 || (event.type == WebInputEvent::KeyDown) |
917 || (event.type == WebInputEvent::KeyUp)); | 921 || (event.type == WebInputEvent::KeyUp)); |
918 | 922 |
919 // Halt an in-progress fling on a key event. | 923 // Halt an in-progress fling on a key event. |
920 endActiveFlingAnimation(); | 924 endActiveFlingAnimation(); |
(...skipping 3158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4079 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4083 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4080 | 4084 |
4081 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4085 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4082 return false; | 4086 return false; |
4083 | 4087 |
4084 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4088 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4085 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4089 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4086 } | 4090 } |
4087 | 4091 |
4088 } // namespace blink | 4092 } // namespace blink |
OLD | NEW |