Opened 20 months ago
Closed 20 months ago
#18395 closed bug (fixed)
Clipping to region completely outside of display does not work
Reported by: | pulkomandy | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | Kits/Web Kit | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Open https://monotech.fwscart.com/details/p6083514_19777986.aspx
Initially the page looks normal
Scroll down until the sliding picture preview on the left is completely offscreen. The clipping stops woking and all the pictures are displayed further down the page.
It seems we're missing a check to see if the thing we're trying to draw is on-screen at all?
Attachments (1)
Change History (5)
by , 20 months ago
Attachment: | test2.html added |
---|
comment:1 by , 20 months ago
Without the transform function in the slick-track item you get the expected result. Comparing the logs, the differences seem to be preceded by a clip to a zero-size rect. Not reducing width and height by 1 solves the issue:
--- a/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp +++ b/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp @@ -341,7 +341,8 @@ void GraphicsContextHaiku::clip(const FloatRect& rect) { HGTRACE(("clip: [%f:%f] [%f:%f]\n", rect.x(), rect.y(), rect.width(), rect.height())); - m_view->ClipToRect(rect); + BRect r(BPoint(rect.x(), rect.y()), BSize(rect.width(), rect.height())); + m_view->ClipToRect(r); } void GraphicsContextHaiku::clipPath(const Path& path, WindRule windRule)
But I don't know if that's just serendipity and breaks something else or if it should always be the conversion for FloatRects and be in FloatRectHaiku.cpp, though 5d76f59a75e325e7443f980e8bc6b9bc68f30a1a implies otherwise.
comment:2 by , 20 months ago
The clip to an empty rect should completely disable drawing, right? If instead it is ignored, would that explain the problem?
comment:3 by , 20 months ago
So it seems. All the way to app_server DrawState::ClipToRect where for invalid rects we do nothing and keep the current clipping.
comment:4 by , 20 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in hrev56968.
Reduced testcase