diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 7e3a2e3f113..eecec62f3f4 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -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 htmlElement(do_QueryInterface(content)); - if (htmlElement) + nsCOMPtr htmlInputElement(do_QueryInterface(content)); + nsCOMPtr htmlTextAreaElement(do_QueryInterface(content)); + if (htmlInputElement || htmlTextAreaElement) { nsIFrame *htmlInputFrame; rv = GetPrimaryFrameFor(content, &htmlInputFrame); diff --git a/layout/html/base/src/nsPresShell.cpp b/layout/html/base/src/nsPresShell.cpp index 7e3a2e3f113..eecec62f3f4 100644 --- a/layout/html/base/src/nsPresShell.cpp +++ b/layout/html/base/src/nsPresShell.cpp @@ -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 htmlElement(do_QueryInterface(content)); - if (htmlElement) + nsCOMPtr htmlInputElement(do_QueryInterface(content)); + nsCOMPtr htmlTextAreaElement(do_QueryInterface(content)); + if (htmlInputElement || htmlTextAreaElement) { nsIFrame *htmlInputFrame; rv = GetPrimaryFrameFor(content, &htmlInputFrame);