Changeset 72618 in webkit
- Timestamp:
- Nov 23, 2010 11:33:57 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r72615 r72618 1 2010-11-23 Avi Drissman <avi@google.com> 2 3 Reviewed by Antonio Gomes. 4 5 Add preference to not select when right-clicked 6 https://bugs.webkit.org/show_bug.cgi?id=23351 7 8 * editing/selection/context-menu-text-selection-expected.txt: Added. 9 * editing/selection/context-menu-text-selection.html: Added. 10 1 11 2010-11-23 Alexander Pavlov <apavlov@chromium.org> 2 12 -
trunk/WebCore/ChangeLog
r72615 r72618 1 2010-11-23 Avi Drissman <avi@google.com> 2 3 Reviewed by Antonio Gomes. 4 5 Add preference to not select when right-clicked 6 https://bugs.webkit.org/show_bug.cgi?id=23351 7 8 Test: editing/selection/context-menu-text-selection.html 9 10 * editing/EditingBehavior.h: 11 (WebCore::EditingBehavior::shouldSelectOnContextualMenuClick): 12 * page/EventHandler.cpp: 13 (WebCore::EventHandler::sendContextMenuEvent): 14 1 15 2010-11-23 Alexander Pavlov <apavlov@chromium.org> 2 16 -
trunk/WebCore/editing/EditingBehavior.h
r67909 r72618 58 58 bool shouldAlwaysGrowSelectionWhenExtendingToBoundary() const { return m_type == EditingMacBehavior; } 59 59 60 // On Mac, when processing a contextual click, the object being clicked upon should be selected. 61 bool shouldSelectOnContextualMenuClick() const { return m_type == EditingMacBehavior; } 62 60 63 private: 61 64 EditingBehaviorType m_type; -
trunk/WebCore/page/EventHandler.cpp
r72013 r72618 2008 2008 MouseEventWithHitTestResults mev = doc->prepareMouseEvent(request, viewportPos, event); 2009 2009 2010 // Context menu events shouldn't select text in GTK+ applications or in Chromium. 2011 // FIXME: This should probably be configurable by embedders. Consider making it a WebPreferences setting. 2012 // See: https://bugs.webkit.org/show_bug.cgi?id=15279 2013 #if !PLATFORM(GTK) && !PLATFORM(CHROMIUM) 2014 if (!m_frame->selection()->contains(viewportPos) 2010 if (m_frame->editor()->behavior().shouldSelectOnContextualMenuClick() 2011 && !m_frame->selection()->contains(viewportPos) 2015 2012 // FIXME: In the editable case, word selection sometimes selects content that isn't underneath the mouse. 2016 2013 // If the selection is non-editable, we do word selection to make it easier to use the contextual menu items … … 2020 2017 selectClosestWordOrLinkFromMouseEvent(mev); 2021 2018 } 2022 #endif2023 2019 2024 2020 swallowEvent = dispatchMouseEvent(eventNames().contextmenuEvent, mev.targetNode(), true, 0, event, false);
Note: See TracChangeset
for help on using the changeset viewer.