Bug 439274: NS_THEME_SCROLLBAR_GRIPPER_* should get its state from its parent, r+sr=roc

This commit is contained in:
Kai Liu 2008-06-15 21:32:15 -04:00
Родитель ce815b2469
Коммит a39f48b35f
1 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -893,12 +893,10 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
SP_GRIPPERHOR : SP_GRIPPERVERT;
if (!aFrame)
aState = TS_NORMAL;
else if (IsDisabled(aFrame))
else if (IsDisabled(aFrame->GetParent()))
aState = TS_DISABLED;
else {
// XXXdwh The gripper needs to get a hover attribute set on it, since it
// never goes into :hover.
PRInt32 eventState = GetContentState(aFrame, aWidgetType);
PRInt32 eventState = GetContentState(aFrame->GetParent(), aWidgetType);
if (eventState & NS_EVENT_STATE_ACTIVE) // Hover is not also a requirement for
// the gripper, since the drag is not canceled
// when you move outside the gripper.