Closed Bug 500630 Opened 15 years ago Closed 15 years ago

Cocoa plugins can draw outside their bounds

Categories

(Core Graveyard :: Plug-ins, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

References

Details

Attachments

(2 files)

Attached file testcase
Nothing clips Cocoa plugins to their bounds. In fact, our test plugin draws outside its bounds (the stroke is centered on the border box edge). This isn't normally noticeable because we only ask the plugin to paint when we're painting its view, and its view clips to its bounds, but in some situations the plugin is asked to paint in another view and bugs show up. Try loading the attached testcase on trunk and scrolling around, a thick border is drawn and scrolling artifacts appear.
Attached patch fixSplinter Review
Not really testable with the frameworks we have now, as far as I know. The fix removes some unused code that is confusing, and then adds code to clip the plugin when we draw it. The FIXME was correct, we were failing to put aDirtyRect in the right coordinate system, but fortunately we were ignoring it in Paint() anyway.
Attachment #385354 - Flags: review?(joshmoz)
Attachment #385354 - Flags: review?(joshmoz) → review+
http://hg.mozilla.org/mozilla-central/rev/17f15b4efdab
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 385435
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: