From cac3dbcc003d99240e6fc7463ddbe897fe372efe Mon Sep 17 00:00:00 2001 From: "martijn.martijn%gmail.com" Date: Mon, 23 Jul 2007 21:15:15 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20386729=20=C2=96=20Textarea=20context=20me?= =?UTF-8?q?nu=20appears=20on=20page=20with=20contenteditable=20node,=20pat?= =?UTF-8?q?ch=20by=20Peter=20Van=20der=20Beken,=20r=3Dmano?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@230666 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/nsContextMenu.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mozilla/browser/base/content/nsContextMenu.js b/mozilla/browser/base/content/nsContextMenu.js index 604ca518a39..9269442c2a5 100644 --- a/mozilla/browser/base/content/nsContextMenu.js +++ b/mozilla/browser/base/content/nsContextMenu.js @@ -559,7 +559,10 @@ nsContextMenu.prototype = { .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIEditingSession); - isEditable = editingSession.windowIsEditable(win); + if (editingSession.windowIsEditable(win) && + this.getComputedStyle(this.target, "-moz-user-modify") == "read-write") { + isEditable = true; + } } catch(ex) { // If someone built with composer disabled, we can't get an editing session. @@ -587,9 +590,9 @@ nsContextMenu.prototype = { // Returns the computed style attribute for the given element. getComputedStyle: function(aElem, aProp) { - return elem.ownerDocument - .defaultView - .getComputedStyle(aElem, "").getPropertyValue(prop); + return aElem.ownerDocument + .defaultView + .getComputedStyle(aElem, "").getPropertyValue(aProp); }, // Returns a "url"-type computed style attribute value, with the url() stripped.