Closed Bug 372062 Opened 18 years ago Closed 18 years ago

Auto values for right and bottom in CSS clip rect broken

Categories

(Core :: Layout: Positioned, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sharparrow1, Assigned: sharparrow1)

Details

(Keywords: testcase)

Attachments

(2 files, 2 obsolete files)

Attached file Testcase
See testcase. The whole clip rect is incorrectly getting moved rather than just the top left corner changing. (How the heck did anyone manage to implement auto clip rects without testing this?) Should be easy to fix... I'l hold off on making a patch until my other clip fix gets worked out.
Attached patch Patch (obsolete) — Splinter Review
Attachment #259771 - Flags: review?(roc)
Comment on attachment 259771 [details] [diff] [review] Patch Oops; this version has a typo.
Attachment #259771 - Attachment is obsolete: true
Attachment #259771 - Flags: review?(roc)
Attached patch Corrected patch (obsolete) — Splinter Review
Attachment #259772 - Flags: review?(roc)
We're relying on mClip.x/mClip.y being zero if they're 'auto' (which is true, see http://lxr.mozilla.org/seamonkey/source/layout/style/nsRuleNode.cpp#2776 ). So I think you could comment so in nsStyleStruct.h and then simplify the code by just setting aRect to mClip and then if (NS_STYLE_CLIP_RIGHT_AUTO & aDisp->mClipFlags) { aRect->width = GetSize().width - aRect->x; } and similarly for bottom.
Attached patch Patch v3Splinter Review
Okay; changed.
Attachment #259772 - Attachment is obsolete: true
Attachment #259889 - Flags: review?(roc)
Attachment #259772 - Flags: review?(roc)
Checked in with reftest made from the testcase in this bug.
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: