Bug 66617 - if tabbing scrolls page, focus outline doesn't leave first link (second try). r=saari, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@101405 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c3f049538f
commit
bf9fa1fa2f
@ -311,9 +311,6 @@ nsHTMLAnchorElement::SetFocus(nsIPresContext* aPresContext)
|
||||
aPresContext->GetEventStateManager(getter_AddRefs(stateManager));
|
||||
|
||||
if (stateManager) {
|
||||
nsCOMPtr<nsIContent> oldFocus;
|
||||
stateManager->GetFocusedContent(getter_AddRefs(oldFocus));
|
||||
|
||||
stateManager->SetContentState(this, NS_EVENT_STATE_FOCUS);
|
||||
|
||||
// Make sure the presentation is up-to-date
|
||||
@ -330,14 +327,6 @@ nsHTMLAnchorElement::SetFocus(nsIPresContext* aPresContext)
|
||||
if (frame) {
|
||||
presShell->ScrollFrameIntoView(frame, NS_PRESSHELL_SCROLL_ANYWHERE,
|
||||
NS_PRESSHELL_SCROLL_ANYWHERE);
|
||||
nsIFrame* oldFocusFrame = nsnull;
|
||||
presShell->GetPrimaryFrameFor(oldFocus, &oldFocusFrame);
|
||||
if (oldFocusFrame) {
|
||||
// Invalidate the area that the old frame covers
|
||||
nsRect rect;
|
||||
oldFocusFrame->GetRect(rect);
|
||||
oldFocusFrame->Invalidate(aPresContext, rect, PR_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1031,17 +1031,6 @@ public:
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
PRBool aCheckVis,
|
||||
PRBool* aIsVisible) = 0;
|
||||
|
||||
/**
|
||||
* Invalidate part of the frame by asking the view manager to repaint.
|
||||
* @param aPresContext a PresContext for this frame
|
||||
* @param aDamageRect area of the frame to repaint, in the frame's local coordinate space
|
||||
* @param aImmedaite repaint synchronously
|
||||
*/
|
||||
NS_IMETHOD Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate = PR_FALSE) const = 0;
|
||||
|
||||
#ifdef IBMBIDI
|
||||
/**
|
||||
* retrieve and set Bidi property of this frame
|
||||
|
||||
@ -2177,7 +2177,7 @@ nsFrame::GetFrameType(nsIAtom** aType) const
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsFrame::Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate) const
|
||||
@ -2191,7 +2191,7 @@ nsFrame::Invalidate(nsIPresContext* aPresContext,
|
||||
PRBool suppressed = PR_FALSE;
|
||||
shell->IsPaintingSuppressed(&suppressed);
|
||||
if (suppressed)
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2228,7 +2228,6 @@ nsFrame::Invalidate(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(viewManager);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//#define MAX_REFLOW_DEPTH 500 get this from nsIHTMLContentSink.h; bug 55095
|
||||
|
||||
@ -347,9 +347,9 @@ public:
|
||||
|
||||
// Invalidate part of the frame by asking the view manager to repaint.
|
||||
// aDamageRect is in the frame's local coordinate space
|
||||
NS_IMETHOD Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate = PR_FALSE) const;
|
||||
void Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate = PR_FALSE) const;
|
||||
|
||||
// Helper function to return the index in parent of the frame's content
|
||||
// object. Returns -1 on error or if the frame doesn't have a content object
|
||||
|
||||
@ -1031,17 +1031,6 @@ public:
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
PRBool aCheckVis,
|
||||
PRBool* aIsVisible) = 0;
|
||||
|
||||
/**
|
||||
* Invalidate part of the frame by asking the view manager to repaint.
|
||||
* @param aPresContext a PresContext for this frame
|
||||
* @param aDamageRect area of the frame to repaint, in the frame's local coordinate space
|
||||
* @param aImmedaite repaint synchronously
|
||||
*/
|
||||
NS_IMETHOD Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate = PR_FALSE) const = 0;
|
||||
|
||||
#ifdef IBMBIDI
|
||||
/**
|
||||
* retrieve and set Bidi property of this frame
|
||||
|
||||
@ -2177,7 +2177,7 @@ nsFrame::GetFrameType(nsIAtom** aType) const
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsFrame::Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate) const
|
||||
@ -2191,7 +2191,7 @@ nsFrame::Invalidate(nsIPresContext* aPresContext,
|
||||
PRBool suppressed = PR_FALSE;
|
||||
shell->IsPaintingSuppressed(&suppressed);
|
||||
if (suppressed)
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2228,7 +2228,6 @@ nsFrame::Invalidate(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(viewManager);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//#define MAX_REFLOW_DEPTH 500 get this from nsIHTMLContentSink.h; bug 55095
|
||||
|
||||
@ -347,9 +347,9 @@ public:
|
||||
|
||||
// Invalidate part of the frame by asking the view manager to repaint.
|
||||
// aDamageRect is in the frame's local coordinate space
|
||||
NS_IMETHOD Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate = PR_FALSE) const;
|
||||
void Invalidate(nsIPresContext* aPresContext,
|
||||
const nsRect& aDamageRect,
|
||||
PRBool aImmediate = PR_FALSE) const;
|
||||
|
||||
// Helper function to return the index in parent of the frame's content
|
||||
// object. Returns -1 on error or if the frame doesn't have a content object
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include "nsIClipView.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsIScrollPositionListener.h"
|
||||
#include "nsIRegion.h"
|
||||
|
||||
static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID);
|
||||
static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
@ -527,7 +528,12 @@ void nsScrollPortView::Scroll(nsIView *aScrolledView, PRInt32 aDx, PRInt32 aDy,
|
||||
{
|
||||
if ((aDx != 0) || (aDy != 0))
|
||||
{
|
||||
|
||||
// Since we keep track of the dirty region as absolute screen coordintes,
|
||||
// we need to offset it by the amount we scrolled.
|
||||
nsCOMPtr<nsIRegion> dirtyRegion;
|
||||
GetDirtyRegion(*getter_AddRefs(dirtyRegion));
|
||||
dirtyRegion->Offset(aDx, aDy);
|
||||
|
||||
nsIWidget *scrollWidget = nsnull;
|
||||
|
||||
GetWidget(scrollWidget);
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include "nsIClipView.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsIScrollPositionListener.h"
|
||||
#include "nsIRegion.h"
|
||||
|
||||
static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID);
|
||||
static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
@ -1676,6 +1677,12 @@ void nsScrollingView::Scroll(nsIView *aScrolledView, PRInt32 aDx, PRInt32 aDy, f
|
||||
{
|
||||
if ((aDx != 0) || (aDy != 0))
|
||||
{
|
||||
// Since we keep track of the dirty region as absolute screen coordintes,
|
||||
// we need to offset it by the amount we scrolled.
|
||||
nsCOMPtr<nsIRegion> dirtyRegion;
|
||||
GetDirtyRegion(*getter_AddRefs(dirtyRegion));
|
||||
dirtyRegion->Offset(aDx, aDy);
|
||||
|
||||
nsIWidget *clipWidget;
|
||||
|
||||
mClipView->GetWidget(clipWidget);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user