Closed Bug 301478 Opened 19 years ago Closed 19 years ago

Scrollbar draws outside of content area

Categories

(Core Graveyard :: Widget: Mac, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jhpedemonte, Assigned: mark)

References

Details

To reproduce:

1) Open https://bugzilla.mozilla.org/attachment.cgi?id=189081&action=edit.
2) Scroll the page down so that the frame in the upper right that contains the
attachment text is only partially visible.
3) Click in "Comment" textarea in the lower left.
4) Now, drag scrollbar thumb of attachment frame.  You should see scrollbar draw
over the toolbar and tab bar.

I just updated to the very latest checkins in widget/src/mac.  I don't know if
any of the patches in other bugs that have yet to be checked in will fix this,
so I wanted to open this bug to see if it is a new issue or not.
Yes, I can reproduce. It's the caret messing with the port again  :(
Maybe we do need that carbon event handler after all.
It's the clipping this time, I guess.
If we toss the draw event handler back in and do this:

  if(wasDrawing=mDrawing)
    EndDraw();
  StartDraw();
  ::CallNextEventHandler();
  if(!wasDrawing)
    EndDraw();

then the world is happy, except that the moment we install the draw event
handler, even if it does nothing, we experience bug 300058.
I'm seeing (in the draw event handler) weird clipping region bounding rects
during scrollbar draws in a few cases: when scrolling an iframe, and when the
caret is going.  I don't know where these clips are coming from, because I've
set prints at every SetClip and ClipRect I found in mozilla, and nothing
corresponds to the weird regions I'm seeing.

Most of the weird clipping regions are sort of harmless, 1px wide or high
instead of 15.  The regions that are causing this bug are completely bogus.  For
example, when expecting bounding (t,l,b,r)=(73,0,385,15), I see (11,0,579,39)
with the most recent SetClip call having been in SetupPortState and bounded by
(0,0,579,614) (which would suck too).
If I click on a link and then start playing with the vertical scrollbar before
the page starts reloading, sometimes a scrollbar artefact draws over the
toolbar, but not in the same place the test case for this bug. It draws up in
the top, left corner, the same as in bug 298677. Unfortunately I can't reproduce
it all the time. Still trying to find conditions that will do that.

However, would that be something to report here, or should I open a new bug
about it?

cheers
Different bug.  This one's a clipping problem, you're seeing an origin problem.
 The draw event handler would solve both, at the cost of bug 300058.
Thanks Mark. FYI, I finally found a couple of pages where I can reproduce my bug
frequently, and opened it as bug 304607.
See attachment 193249 [details] [diff] [review] to bug 304607 for the infamous event handler.
Assignee: joshmoz → mark
This is fixed (trunk) by bug 311399.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Depends on: 311399
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.