Changeset 83814 in webkit


Ignore:
Timestamp:
Apr 13, 2011 10:40:09 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-13 Jon Lee <jonlee@apple.com>

Reviewed by Maciej Stachowiak.

REGRESSION(r81880): Paste menu is disabled for many edit fields (yahoo and google search, yahoo mail msg, forms, etc)
https://bugs.webkit.org/show_bug.cgi?id=58284
<rdar://problem/9246149>

  • WebCore.exp.in: Exporting EditingBehavior.h for use in WebKit2
  • editing/EditingBehavior.h: (WebCore::EditingBehavior::shouldClearSelectionWhenLosingWebPageFocus): moving the platform-specific code out of an #ifdef and into this class for run-time instead of compile-time checking

2011-04-13 Jon Lee <jonlee@apple.com>

Reviewed by Maciej Stachowiak.

REGRESSION(r81880): Paste menu is disabled for many edit fields (yahoo and google search, yahoo mail msg, forms, etc)
https://bugs.webkit.org/show_bug.cgi?id=58284
<rdar://problem/9246149>

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setFocused): Check for whether we are not supposed to be focused AND whether our platform behavior dictates to clear out the selection
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83813 r83814  
     12011-04-13  Jon Lee  <jonlee@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        REGRESSION(r81880): Paste menu is disabled for many edit fields (yahoo and google search, yahoo mail msg, forms, etc)
     6        https://bugs.webkit.org/show_bug.cgi?id=58284
     7        <rdar://problem/9246149>
     8
     9        * WebCore.exp.in: Exporting EditingBehavior.h for use in WebKit2
     10        * editing/EditingBehavior.h:
     11        (WebCore::EditingBehavior::shouldClearSelectionWhenLosingWebPageFocus): moving the platform-specific code out of an #ifdef and into this class for run-time instead of compile-time checking
     12
    1132011-04-13  Yael Aharon  <yael.aharon@nokia.com>
    214
  • trunk/Source/WebCore/WebCore.exp.in

    r83808 r83814  
    12201220__ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesERKNS_16NavigationActionE
    12211221__ZNK7WebCore6Cursor14platformCursorEv
     1222__ZNK7WebCore6Editor8behaviorEv
    12221223__ZNK7WebCore6Editor12selectedTextEv
    12231224__ZNK7WebCore6Editor13canEditRichlyEv
  • trunk/Source/WebCore/editing/EditingBehavior.h

    r72678 r83814  
    6060    // On Mac, when processing a contextual click, the object being clicked upon should be selected.
    6161    bool shouldSelectOnContextualMenuClick() const { return m_type == EditingMacBehavior; }
     62   
     63    // On Mac, when the web view loses focus, any active selection clears. On Windows, the selection
     64    // should remain highlighted, just in an inactive state.
     65    bool shouldClearSelectionWhenLosingWebPageFocus() const { return m_type == EditingMacBehavior; }
    6266
    6367private:
  • trunk/Source/WebKit2/ChangeLog

    r83812 r83814  
     12011-04-13  Jon Lee  <jonlee@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        REGRESSION(r81880): Paste menu is disabled for many edit fields (yahoo and google search, yahoo mail msg, forms, etc)
     6        https://bugs.webkit.org/show_bug.cgi?id=58284
     7        <rdar://problem/9246149>
     8
     9        * WebProcess/WebPage/WebPage.cpp:
     10        (WebKit::WebPage::setFocused): Check for whether we are not supposed to be focused AND whether our platform behavior dictates to clear out the selection
     11
    1122011-04-13  Dan Bernstein  <mitz@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r83766 r83814  
    8080#include <WebCore/DragController.h>
    8181#include <WebCore/DragData.h>
     82#include <WebCore/EditingBehavior.h>
    8283#include <WebCore/EventHandler.h>
    8384#include <WebCore/FocusController.h>
     
    11461147void WebPage::setFocused(bool isFocused)
    11471148{
    1148     if (!isFocused)
     1149    if (!isFocused && m_page->focusController()->focusedOrMainFrame()->editor()->behavior().shouldClearSelectionWhenLosingWebPageFocus())
    11491150        m_page->focusController()->focusedOrMainFrame()->selection()->clear();
     1151
    11501152    m_page->focusController()->setFocused(isFocused);
    11511153}
Note: See TracChangeset for help on using the changeset viewer.