Bug 388646, Resizers shown for non-editable elements when document contains contenteditable element, r+sr=peterv

This commit is contained in:
2007-07-20 16:21:49 -07:00
parent c17e734ce6
commit edd9af2ee8

View File

@@ -315,7 +315,8 @@ nsHTMLEditor::CheckSelectionStateForAnonymousButtons(nsISelection * aSelection)
// now, let's display all contextual UI for good
if (mIsObjectResizingEnabled && focusElement) {
if (mIsObjectResizingEnabled && focusElement &&
IsModifiableNode(focusElement)) {
if (nsEditProperty::img == focusTagAtom)
mResizedObjectIsAnImage = PR_TRUE;
if (refreshResizing)
@@ -325,7 +326,8 @@ nsHTMLEditor::CheckSelectionStateForAnonymousButtons(nsISelection * aSelection)
if (NS_FAILED(res)) return res;
}
if (mIsAbsolutelyPositioningEnabled && absPosElement) {
if (mIsAbsolutelyPositioningEnabled && absPosElement &&
IsModifiableNode(absPosElement)) {
if (refreshPositioning)
res = RefreshGrabber();
else
@@ -333,7 +335,8 @@ nsHTMLEditor::CheckSelectionStateForAnonymousButtons(nsISelection * aSelection)
if (NS_FAILED(res)) return res;
}
if (mIsInlineTableEditingEnabled && cellElement) {
if (mIsInlineTableEditingEnabled && cellElement &&
IsModifiableNode(cellElement)) {
if (refreshTableEditing)
res = RefreshInlineTableEditingUI();
else