| 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 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2750 #else | 2750 #else |
| 2751 int rightAligned = 0; | 2751 int rightAligned = 0; |
| 2752 #endif | 2752 #endif |
| 2753 IntPoint locationInRootFrame; | 2753 IntPoint locationInRootFrame; |
| 2754 | 2754 |
| 2755 Element* focusedElement = overrideTargetElement ? overrideTargetElement : do
c->focusedElement(); | 2755 Element* focusedElement = overrideTargetElement ? overrideTargetElement : do
c->focusedElement(); |
| 2756 FrameSelection& selection = m_frame->selection(); | 2756 FrameSelection& selection = m_frame->selection(); |
| 2757 Position start = selection.selection().start(); | 2757 Position start = selection.selection().start(); |
| 2758 PinchViewport& pinchViewport = m_frame->page()->frameHost().pinchViewport(); | 2758 PinchViewport& pinchViewport = m_frame->page()->frameHost().pinchViewport(); |
| 2759 | 2759 |
| 2760 if (!overrideTargetElement && start.deprecatedNode() && (selection.rootEdita
bleElement() || selection.isRange())) { | 2760 if (!overrideTargetElement && start.anchorNode() && (selection.rootEditableE
lement() || selection.isRange())) { |
| 2761 RefPtrWillBeRawPtr<Range> selectionRange = selection.toNormalizedRange()
; | 2761 RefPtrWillBeRawPtr<Range> selectionRange = selection.toNormalizedRange()
; |
| 2762 IntRect firstRect = m_frame->editor().firstRectForRange(selectionRange.g
et()); | 2762 IntRect firstRect = m_frame->editor().firstRectForRange(selectionRange.g
et()); |
| 2763 | 2763 |
| 2764 int x = rightAligned ? firstRect.maxX() : firstRect.x(); | 2764 int x = rightAligned ? firstRect.maxX() : firstRect.x(); |
| 2765 // In a multiline edit, firstRect.maxY() would endup on the next line, s
o -1. | 2765 // In a multiline edit, firstRect.maxY() would endup on the next line, s
o -1. |
| 2766 int y = firstRect.maxY() ? firstRect.maxY() - 1 : 0; | 2766 int y = firstRect.maxY() ? firstRect.maxY() - 1 : 0; |
| 2767 locationInRootFrame = view->contentsToRootFrame(IntPoint(x, y)); | 2767 locationInRootFrame = view->contentsToRootFrame(IntPoint(x, y)); |
| 2768 } else if (focusedElement) { | 2768 } else if (focusedElement) { |
| 2769 IntRect clippedRect = focusedElement->boundsInViewportSpace(); | 2769 IntRect clippedRect = focusedElement->boundsInViewportSpace(); |
| 2770 // FIXME: boundsInViewportSpace is actually in the weird scaled but untr
anslated coordinate space of | 2770 // FIXME: boundsInViewportSpace is actually in the weird scaled but untr
anslated coordinate space of |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4020 unsigned EventHandler::accessKeyModifiers() | 4020 unsigned EventHandler::accessKeyModifiers() |
| 4021 { | 4021 { |
| 4022 #if OS(MACOSX) | 4022 #if OS(MACOSX) |
| 4023 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4023 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 4024 #else | 4024 #else |
| 4025 return PlatformEvent::AltKey; | 4025 return PlatformEvent::AltKey; |
| 4026 #endif | 4026 #endif |
| 4027 } | 4027 } |
| 4028 | 4028 |
| 4029 } // namespace blink | 4029 } // namespace blink |
| OLD | NEW |