Fix for nsbeta2+ bug 42625, written by brade, r=sfraser. When checking whether to get a special text field selection, QI to test for text area as well as input.

This commit is contained in:
sfraser%netscape.com 2000-06-29 22:33:36 +00:00
Родитель ad2a7c4da1
Коммит c657cd3755
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -84,6 +84,7 @@
#include "nsXIFDTD.h"
#include "nsIFrameSelection.h"
#include "nsIDOMNSHTMLInputElement.h" //optimization for ::DoXXX commands
#include "nsIDOMNSHTMLTextAreaElement.h"
#include "nsViewsCID.h"
#include "nsIFrameManager.h"
#include "nsISupportsPrimitives.h"
@ -2832,11 +2833,11 @@ PresShell::DoCopy()
rv = manager->GetFocusedContent(getter_AddRefs(content));
if (NS_SUCCEEDED(rv) && content)
{
//check to see if we need to get selection from frame
//optimization that MAY need to be expanded as more things implement their own "selection"
nsCOMPtr<nsIDOMNSHTMLInputElement> htmlElement(do_QueryInterface(content));
if (htmlElement)
nsCOMPtr<nsIDOMNSHTMLInputElement> htmlInputElement(do_QueryInterface(content));
nsCOMPtr<nsIDOMNSHTMLTextAreaElement> htmlTextAreaElement(do_QueryInterface(content));
if (htmlInputElement || htmlTextAreaElement)
{
nsIFrame *htmlInputFrame;
rv = GetPrimaryFrameFor(content, &htmlInputFrame);

Просмотреть файл

@ -84,6 +84,7 @@
#include "nsXIFDTD.h"
#include "nsIFrameSelection.h"
#include "nsIDOMNSHTMLInputElement.h" //optimization for ::DoXXX commands
#include "nsIDOMNSHTMLTextAreaElement.h"
#include "nsViewsCID.h"
#include "nsIFrameManager.h"
#include "nsISupportsPrimitives.h"
@ -2832,11 +2833,11 @@ PresShell::DoCopy()
rv = manager->GetFocusedContent(getter_AddRefs(content));
if (NS_SUCCEEDED(rv) && content)
{
//check to see if we need to get selection from frame
//optimization that MAY need to be expanded as more things implement their own "selection"
nsCOMPtr<nsIDOMNSHTMLInputElement> htmlElement(do_QueryInterface(content));
if (htmlElement)
nsCOMPtr<nsIDOMNSHTMLInputElement> htmlInputElement(do_QueryInterface(content));
nsCOMPtr<nsIDOMNSHTMLTextAreaElement> htmlTextAreaElement(do_QueryInterface(content));
if (htmlInputElement || htmlTextAreaElement)
{
nsIFrame *htmlInputFrame;
rv = GetPrimaryFrameFor(content, &htmlInputFrame);