Auto values for right and bottom in CSS clip rect broken

RESOLVED FIXED

Status

()

Core
Layout: R & A Pos
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Eli Friedman, Assigned: Eli Friedman)

Tracking

({testcase})

Trunk
x86
Windows XP
testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Assignee)

Description

12 years ago
Created attachment 256745 [details]
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.
(Assignee)

Comment 1

11 years ago
Created attachment 259771 [details] [diff] [review]
Patch
Attachment #259771 - Flags: review?(roc)
(Assignee)

Comment 2

11 years ago
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)
(Assignee)

Comment 3

11 years ago
Created attachment 259772 [details] [diff] [review]
Corrected patch
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.
(Assignee)

Comment 5

11 years ago
Created attachment 259889 [details] [diff] [review]
Patch v3

Okay; changed.
Attachment #259772 - Attachment is obsolete: true
Attachment #259889 - Flags: review?(roc)
Attachment #259772 - Flags: review?(roc)
Attachment #259889 - Flags: superreview+
Attachment #259889 - Flags: review?(roc)
Attachment #259889 - Flags: review+
(Assignee)

Comment 6

11 years ago
Checked in with reftest made from the testcase in this bug.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.