| 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 webFrame->client()->forwardInputEvent(&event); | 995 webFrame->client()->forwardInputEvent(&event); |
| 996 return true; | 996 return true; |
| 997 } | 997 } |
| 998 | 998 |
| 999 if (!focusedFrame || !focusedFrame->isLocalFrame()) | 999 if (!focusedFrame || !focusedFrame->isLocalFrame()) |
| 1000 return false; | 1000 return false; |
| 1001 | 1001 |
| 1002 LocalFrame* frame = toLocalFrame(focusedFrame.get()); | 1002 LocalFrame* frame = toLocalFrame(focusedFrame.get()); |
| 1003 | 1003 |
| 1004 PlatformKeyboardEventBuilder evt(event); | 1004 PlatformKeyboardEventBuilder evt(event); |
| 1005 evt.setDOMCode(m_client->getKeyboardDOMCodeValue(evt.nativeVirtualKeyCode())
); |
| 1005 | 1006 |
| 1006 if (frame->eventHandler().keyEvent(evt)) { | 1007 if (frame->eventHandler().keyEvent(evt)) { |
| 1007 if (WebInputEvent::RawKeyDown == event.type) { | 1008 if (WebInputEvent::RawKeyDown == event.type) { |
| 1008 // Suppress the next keypress event unless the focused node is a plu
g-in node. | 1009 // Suppress the next keypress event unless the focused node is a plu
g-in node. |
| 1009 // (Flash needs these keypress events to handle non-US keyboards.) | 1010 // (Flash needs these keypress events to handle non-US keyboards.) |
| 1010 Element* element = focusedElement(); | 1011 Element* element = focusedElement(); |
| 1011 if (!element || !element->renderer() || !element->renderer()->isEmbe
ddedObject()) | 1012 if (!element || !element->renderer() || !element->renderer()->isEmbe
ddedObject()) |
| 1012 m_suppressNextKeypressEvent = true; | 1013 m_suppressNextKeypressEvent = true; |
| 1013 } | 1014 } |
| 1014 return true; | 1015 return true; |
| (...skipping 3460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4475 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4476 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4476 | 4477 |
| 4477 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4478 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4478 return false; | 4479 return false; |
| 4479 | 4480 |
| 4480 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4481 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4481 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4482 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4482 } | 4483 } |
| 4483 | 4484 |
| 4484 } // namespace blink | 4485 } // namespace blink |
| OLD | NEW |