diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index 30b6001589a8..ae7dcd9adc4d 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -2304,24 +2304,6 @@ nsEventStateManager::ClearFrameRefs(nsIFrame* aFrame) return NS_OK; } -PRBool -nsEventStateManager::CheckDisabled(nsIContent* aContent) -{ - nsIAtom *tag = aContent->Tag(); - - if (((tag == nsHTMLAtoms::input || - tag == nsHTMLAtoms::select || - tag == nsHTMLAtoms::textarea || - tag == nsHTMLAtoms::button) && - (aContent->IsContentOfType(nsIContent::eHTML))) || - (tag == nsHTMLAtoms::button && - aContent->IsContentOfType(nsIContent::eXUL))) { - return aContent->HasAttr(kNameSpaceID_None, nsHTMLAtoms::disabled); - } - - return PR_FALSE; -} - void nsEventStateManager::UpdateCursor(nsPresContext* aPresContext, nsEvent* aEvent, nsIFrame* aTargetFrame, @@ -2335,22 +2317,12 @@ nsEventStateManager::UpdateCursor(nsPresContext* aPresContext, cursor = mLockCursor; } //If not locked, look for correct cursor - else { - nsIContent* targetContent = nsnull; - if (mCurrentTarget) { - targetContent = mCurrentTarget->GetContent(); - } - - //If not disabled, check for the right cursor. - if (!targetContent || !CheckDisabled(targetContent)) { - if (aTargetFrame) { - nsIFrame::Cursor framecursor; - if (NS_FAILED(aTargetFrame->GetCursor(aEvent->point, framecursor))) - return; // don't update the cursor if we failed to get it from the frame see bug 118877 - cursor = framecursor.mCursor; - container = framecursor.mContainer; - } - } + else if (aTargetFrame) { + nsIFrame::Cursor framecursor; + if (NS_FAILED(aTargetFrame->GetCursor(aEvent->point, framecursor))) + return; // don't update the cursor if we failed to get it from the frame see bug 118877 + cursor = framecursor.mCursor; + container = framecursor.mContainer; } // Check whether or not to show the busy cursor diff --git a/content/events/src/nsEventStateManager.h b/content/events/src/nsEventStateManager.h index 27325b3b6d80..a7ef6aec916a 100644 --- a/content/events/src/nsEventStateManager.h +++ b/content/events/src/nsEventStateManager.h @@ -195,7 +195,6 @@ protected: PRInt32 GetNextTabIndex(nsIContent* aParent, PRBool foward); nsresult SendFocusBlur(nsPresContext* aPresContext, nsIContent *aContent, PRBool aEnsureWindowHasFocus); - PRBool CheckDisabled(nsIContent* aContent); void EnsureDocument(nsIPresShell* aPresShell); void EnsureDocument(nsPresContext* aPresContext); void FlushPendingEvents(nsPresContext* aPresContext); diff --git a/layout/forms/resources/content/xbl-forms.css b/layout/forms/resources/content/xbl-forms.css index a24131c95c9d..0d451caa9e58 100644 --- a/layout/forms/resources/content/xbl-forms.css +++ b/layout/forms/resources/content/xbl-forms.css @@ -248,7 +248,7 @@ optgroup[disabled], select[disabled], select[disabled]::-moz-display-comboboxcontrol-frame { color: GrayText; - cursor: default; + cursor: inherit; } /* hidden inputs */ @@ -270,7 +270,7 @@ input[type="image"] { } input[type="image"][disabled] { - cursor: default; + cursor: inherit; } input[type="image"]:focus { diff --git a/layout/style/forms.css b/layout/style/forms.css index d61f5f953a6b..0238bf2bf98f 100644 --- a/layout/style/forms.css +++ b/layout/style/forms.css @@ -258,7 +258,7 @@ select[disabled] { -moz-user-focus: ignore; color: GrayText; background-color: ThreeDFace; - cursor: default; + cursor: inherit; } option[disabled], @@ -291,7 +291,7 @@ input[type="image"] { } input[type="image"][disabled] { - cursor: default; + cursor: inherit; } input[type="image"]:focus { @@ -376,6 +376,7 @@ input[type="checkbox"][disabled]:hover:active { /* same as above, but !important */ color: GrayText ! important; background-color: ThreeDFace ! important; + cursor: inherit; } input[type="checkbox"]:focus, @@ -472,6 +473,7 @@ input[type="submit"][disabled] { padding: 1px 7px 1px 7px; border: 1px outset ButtonShadow; color: GrayText; + cursor: inherit; } /*