Closed Bug 909603 Opened 11 years ago Closed 11 years ago

Bogus assertion in nsLayoutUtils::PaintFrame

Categories

(Core :: Layout, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: roc, Assigned: roc)

References

Details

Attachments

(1 file)

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.
Attached patch fixSplinter Review
Attachment #795786 - Flags: review?(tnikkel)
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.
https://hg.mozilla.org/mozilla-central/rev/82570baff149
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: