Bogus assertion in nsLayoutUtils::PaintFrame

RESOLVED FIXED in mozilla26

Status

()

Core
Layout
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: roc, Assigned: roc)

Tracking

Trunk
mozilla26
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

if (ignoreViewportScrolling) {
    nsIDocument* doc = aFrame->GetContent() ?
      aFrame->GetContent()->GetCurrentDoc() : nullptr;
    NS_ASSERTION(!aFrame->GetParent() ||
                 (doc && doc->IsBeingUsedAsImage()),
                 "Only expecting ignoreViewportScrolling for root frames and "
                 "for image documents.");


This assertion is bogus. Features like -moz-element can cause nsLayoutUtils::PaintFrame to be called on any frame while we're doing a drawWindow that paints ignoring viewport scrolling, and there's nothing wrong with that.
Comment on attachment 795786 [details] [diff] [review]
fix

Nice catch.

Perhaps we should only set ignoreViewportScrolling to true if we are actually going to change our behaviour based on it? (ie if we are painting a root frame)

You also have a hunk adding the PAINT_IGNORE_VIEWPORT_SCROLLING flag to the header, but you don't need it in this patch. Not sure why.

It looks like we also have a similar problem in this function with the usingDisplayPort variable, except that effects behaviour and not just asserts.
Attachment #795786 - Flags: review?(tnikkel) → review+
(In reply to Timothy Nikkel (:tn) from comment #2)
> It looks like we also have a similar problem in this function with the
> usingDisplayPort variable, except that effects behaviour and not just
> asserts.

I created bug 910529 for this.

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/82570baff149
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.