OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1819 #endif | 1819 #endif |
1820 IntPoint location_in_root_frame; | 1820 IntPoint location_in_root_frame; |
1821 | 1821 |
1822 Element* focused_element = | 1822 Element* focused_element = |
1823 override_target_element ? override_target_element : doc->FocusedElement(); | 1823 override_target_element ? override_target_element : doc->FocusedElement(); |
1824 FrameSelection& selection = frame_->Selection(); | 1824 FrameSelection& selection = frame_->Selection(); |
1825 Position start = | 1825 Position start = |
1826 selection.ComputeVisibleSelectionInDOMTreeDeprecated().Start(); | 1826 selection.ComputeVisibleSelectionInDOMTreeDeprecated().Start(); |
1827 VisualViewport& visual_viewport = frame_->GetPage()->GetVisualViewport(); | 1827 VisualViewport& visual_viewport = frame_->GetPage()->GetVisualViewport(); |
1828 | 1828 |
1829 if (!override_target_element && start.AnchorNode() && | 1829 if (!override_target_element && start.AnchorNode() && !selection.IsHidden() && |
1830 (selection.ComputeVisibleSelectionInDOMTreeDeprecated() | 1830 (selection.ComputeVisibleSelectionInDOMTreeDeprecated() |
1831 .RootEditableElement() || | 1831 .RootEditableElement() || |
1832 selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsRange())) { | 1832 selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsRange())) { |
1833 // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets | 1833 // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets |
1834 // needs to be audited. See http://crbug.com/590369 for more details. | 1834 // needs to be audited. See http://crbug.com/590369 for more details. |
1835 doc->UpdateStyleAndLayoutIgnorePendingStylesheets(); | 1835 doc->UpdateStyleAndLayoutIgnorePendingStylesheets(); |
1836 | 1836 |
1837 IntRect first_rect = frame_->GetEditor().FirstRectForRange( | 1837 IntRect first_rect = frame_->GetEditor().FirstRectForRange( |
1838 selection.ComputeVisibleSelectionInDOMTree() | 1838 selection.ComputeVisibleSelectionInDOMTree() |
1839 .ToNormalizedEphemeralRange()); | 1839 .ToNormalizedEphemeralRange()); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 MouseEventWithHitTestResults& mev, | 2117 MouseEventWithHitTestResults& mev, |
2118 LocalFrame* subframe) { | 2118 LocalFrame* subframe) { |
2119 WebInputEventResult result = | 2119 WebInputEventResult result = |
2120 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); | 2120 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); |
2121 if (result != WebInputEventResult::kNotHandled) | 2121 if (result != WebInputEventResult::kNotHandled) |
2122 return result; | 2122 return result; |
2123 return WebInputEventResult::kHandledSystem; | 2123 return WebInputEventResult::kHandledSystem; |
2124 } | 2124 } |
2125 | 2125 |
2126 } // namespace blink | 2126 } // namespace blink |
OLD | NEW |