Closed Bug 394279 Opened 17 years ago Closed 17 years ago

nsRect::Contains() should always succeed if the parameter rect is empty

Categories

(Core Graveyard :: GFX, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: Callek, Assigned: Callek)

Details

Attachments

(1 file, 1 obsolete file)

from mozilla.dev.tech.layout

robert@ocallahan.org wrote:
> On Aug 29, 8:03 am, fantasai <fantasai.li...@inkedblade.net> wrote: 
>> ... This means an assertion
>>      frame->GetOverflowRect().Contains(frame->GetRect())
>>    will sometimes fail.
>
> Contains() should always succeed if the parameter rect is empty.
> That's a bug, I'll take a patch for that :-) 

We should fix this :-)
Attached patch v1 (obsolete) — Splinter Review
I don't have my msvc properly re-setup yet, so did not actually test the compile, but this should still be right.
Attachment #278915 - Flags: superreview?(roc)
Attachment #278915 - Flags: review?(roc)
Attached patch v1.1Splinter Review
sorry, had a moment of mental idiocy (checked if the wrong nsRect was empty in prior patch)
Attachment #278915 - Attachment is obsolete: true
Attachment #278916 - Flags: superreview?(roc)
Attachment #278916 - Flags: review?(roc)
Attachment #278915 - Flags: superreview?(roc)
Attachment #278915 - Flags: review?(roc)
rerequest review when you've tested it
Comment on attachment 278916 [details] [diff] [review]
v1.1

tested, appears fine.
Attachment #278916 - Flags: superreview?(roc)
Attachment #278916 - Flags: review?(roc)
Attachment #278916 - Flags: superreview?(roc)
Attachment #278916 - Flags: superreview+
Attachment #278916 - Flags: review?(roc)
Attachment #278916 - Flags: review+
Attachment #278916 - Flags: approval1.9?
Attachment #278916 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in gfx/src/nsRect.cpp;
/cvsroot/mozilla/gfx/src/nsRect.cpp,v  <--  nsRect.cpp
new revision: 3.21; previous revision: 3.20
done
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Summary: nsRect::Contains() should always succeed if the parameter rect is empty. → nsRect::Contains() should always succeed if the parameter rect is empty
Target Milestone: --- → mozilla1.9 M9
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: