| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 // FrameSelection::setFocusedNodeIfNeeded. | 1788 // FrameSelection::setFocusedNodeIfNeeded. |
| 1789 if (element && m_frame->selection().isRange()) { | 1789 if (element && m_frame->selection().isRange()) { |
| 1790 // TODO(yosin) We should not create |Range| object for calling | 1790 // TODO(yosin) We should not create |Range| object for calling |
| 1791 // |isNodeFullyContained()|. | 1791 // |isNodeFullyContained()|. |
| 1792 if (createRange(m_frame->selection().selection().toNormalizedEphemeralRa
nge())->isNodeFullyContained(*element) | 1792 if (createRange(m_frame->selection().selection().toNormalizedEphemeralRa
nge())->isNodeFullyContained(*element) |
| 1793 && element->isDescendantOf(m_frame->document()->focusedElement())) | 1793 && element->isDescendantOf(m_frame->document()->focusedElement())) |
| 1794 return false; | 1794 return false; |
| 1795 } | 1795 } |
| 1796 | 1796 |
| 1797 | 1797 |
| 1798 // Only change the focus when clicking scrollbars if it can transfered to a | 1798 // Only change the focus when clicking scrollbars if it can transferred to a |
| 1799 // mouse focusable node. | 1799 // mouse focusable node. |
| 1800 if (!element && targetedEvent.hitTestResult().scrollbar()) | 1800 if (!element && targetedEvent.hitTestResult().scrollbar()) |
| 1801 return true; | 1801 return true; |
| 1802 | 1802 |
| 1803 if (Page* page = m_frame->page()) { | 1803 if (Page* page = m_frame->page()) { |
| 1804 // If focus shift is blocked, we eat the event. Note we should never | 1804 // If focus shift is blocked, we eat the event. Note we should never |
| 1805 // clear swallowEvent if the page already set it (e.g., by canceling | 1805 // clear swallowEvent if the page already set it (e.g., by canceling |
| 1806 // default behavior). | 1806 // default behavior). |
| 1807 if (element) { | 1807 if (element) { |
| 1808 if (slideFocusOnShadowHostIfNecessary(*element)) | 1808 if (slideFocusOnShadowHostIfNecessary(*element)) |
| (...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4087 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 4087 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 4088 { | 4088 { |
| 4089 #if OS(MACOSX) | 4089 #if OS(MACOSX) |
| 4090 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 4090 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
| 4091 #else | 4091 #else |
| 4092 return PlatformEvent::AltKey; | 4092 return PlatformEvent::AltKey; |
| 4093 #endif | 4093 #endif |
| 4094 } | 4094 } |
| 4095 | 4095 |
| 4096 } // namespace blink | 4096 } // namespace blink |
| OLD | NEW |