зеркало из https://github.com/mozilla/gecko-dev.git
Skip -moz-user-select=none only when copying. Follow-up to bug 166235. b=558726 r=roc
This commit is contained in:
Родитель
ea458d36b2
Коммит
96f669ed52
|
@ -365,14 +365,16 @@ nsDocumentEncoder::SerializeToStringRecursive(nsIDOMNode* aNode,
|
|||
if (!maybeFixedNode)
|
||||
maybeFixedNode = aNode;
|
||||
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
if (content){
|
||||
nsIFrame* frame = content->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
PRBool isSelectable;
|
||||
frame->IsSelectable(&isSelectable, nsnull);
|
||||
if (!isSelectable){
|
||||
aDontSerializeRoot = PR_TRUE;
|
||||
if (mIsCopying) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
if (content){
|
||||
nsIFrame* frame = content->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
PRBool isSelectable;
|
||||
frame->IsSelectable(&isSelectable, nsnull);
|
||||
if (!isSelectable){
|
||||
aDontSerializeRoot = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ var selection = window.getSelection();
|
|||
// expected results for selection.toString()
|
||||
var originalStrings = [
|
||||
'This text should be copied.',
|
||||
'This text should be copied.',
|
||||
'This text should be copied.',
|
||||
'This text should NOT be copied.',
|
||||
'This text should NOT be copied.',
|
||||
];
|
||||
|
||||
// expected results when selection is copied and HTML tags removed
|
||||
|
|
Загрузка…
Ссылка в новой задаче