mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Null-check before calling GetPrimaryFrameFor(). b=362800 r+sr=roc
This commit is contained in:
parent
4bd09f70d5
commit
2125ae0a61
@ -3977,8 +3977,9 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
|
||||
if (!mPresContext || mPresContext->IsDynamic()) {
|
||||
newHover = aContent;
|
||||
} else {
|
||||
nsIFrame *frame = mPresContext->PresShell()->GetPrimaryFrameFor(aContent);
|
||||
if (nsLayoutUtils::IsViewportScrollbarFrame(frame)) {
|
||||
nsIFrame *frame = aContent ?
|
||||
mPresContext->PresShell()->GetPrimaryFrameFor(aContent) : nsnull;
|
||||
if (frame && nsLayoutUtils::IsViewportScrollbarFrame(frame)) {
|
||||
// The scrollbars of viewport should not ignore the hover state.
|
||||
// Because they are *not* the content of the web page.
|
||||
newHover = aContent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user