Changeset 107115 in webkit


Ignore:
Timestamp:
Feb 8, 2012 12:16:21 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Chromium] Don't add selection from password fields to context menu.
https://bugs.webkit.org/show_bug.cgi?id=77733

Patch by Bernhard Bauer <bauerb@google.com> on 2012-02-08
Reviewed by Adam Barth.

  • src/ContextMenuClientImpl.cpp:

(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):

Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r107111 r107115  
     12012-02-08  Bernhard Bauer  <bauerb@google.com>
     2
     3        [Chromium] Don't add selection from password fields to context menu.
     4        https://bugs.webkit.org/show_bug.cgi?id=77733
     5
     6        Reviewed by Adam Barth.
     7
     8        * src/ContextMenuClientImpl.cpp:
     9        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
     10
    1112012-02-08  Nico Weber  <nicolasweber@gmx.de>
    212
  • trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp

    r104634 r107115  
    260260    }
    261261
    262     if (r.isSelected())
    263         data.selectedText = selectedFrame->editor()->selectedText().stripWhiteSpace();
     262    if (r.isSelected()) {
     263        if (!r.innerNonSharedNode()->hasTagName(HTMLNames::inputTag) || !static_cast<HTMLInputElement*>(r.innerNonSharedNode())->isPasswordField())
     264            data.selectedText = selectedFrame->editor()->selectedText().stripWhiteSpace();
     265    }
    264266
    265267    if (r.isContentEditable()) {
Note: See TracChangeset for help on using the changeset viewer.