Bug 114722

Summary: [CSS Regions] clip rectangles are incorrectly computed in some positioned elements
Product: WebKit Reporter: Mihai Balan <mibalan>
Component: CSSAssignee: Radu Stavila <stavila>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, johanneswilm, mvujovic, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 57312    
Attachments:
Description Flags
Test-case
none
Repaint test
mihnea: review-
Patch integrating reviewer feedback none

Description Mihai Balan 2013-04-17 01:05:52 PDT
Created attachment 198476 [details]
Test-case

Positioned content generated by MathJax gets clipped or rendered invisibly, depending on the position of the region against the viewport.

Reproduction
------------
- open attachment
- click on the button

Actual
------
For each click, the region moves down and some of the equation gets clipped (not all of it)

Expected
--------
For each click, the region moves down but the equation keeps showing
Comment 1 Max Vujovic 2013-06-07 11:36:33 PDT
This bug doesn't repro for me in today's nightly (r151260).
Comment 2 Johannes Wilm 2013-06-07 11:47:46 PDT
But does the formula renderer? I need to download the attachment and open it locally for the test to work. I can still reproduce this in Chrome Version 29.0.1530.2 dev.
Comment 3 Max Vujovic 2013-06-07 14:29:22 PDT
(In reply to comment #2)
> But does the formula renderer? I need to download the attachment and open it locally for the test to work. I can still reproduce this in Chrome Version 29.0.1530.2 dev.

It seems the bug repros in Chrome like you say, but not in Safari. I only tested Safari. Thanks for the info!
Comment 4 Michelangelo De Simone 2013-06-13 10:59:55 PDT
Works for me on today's nightly (r151543)
Comment 5 Max Vujovic 2013-06-13 11:02:57 PDT
(In reply to comment #4)
> Works for me on today's nightly (r151543)

Look at the above comments- We should post a Chromium bug for this issue since it doesn't repro in Safari.
Comment 6 Mihai Balan 2013-06-14 05:20:39 PDT
I've logged https://code.google.com/p/chromium/issues/detail?id=249715 for Blink.
Comment 7 Mihai Balan 2013-06-14 05:22:14 PDT
Keeping this open so that we don't forget to import the test when this gets fixed in Blink.
Comment 8 Radu Stavila 2013-11-12 07:35:13 PST
Created attachment 216672 [details]
Repaint test

This problem is already fixed in webkit. Added test in fast/repaint.
Comment 9 Mihnea Ovidenie 2013-11-12 08:35:06 PST
Comment on attachment 216672 [details]
Repaint test

View in context: https://bugs.webkit.org/attachment.cgi?id=216672&action=review

Looks good but you need to decide whether you want to use repaint.js or text-based-repaint.js for this test. If you want to use repaint.js you need to generate a png file too.

> LayoutTests/ChangeLog:3
> +        Created test for testing repaint rects for regions and some positioned elements.

Please clarify what you mean by "some positioned elements".

> LayoutTests/fast/repaint/increasing-region-content-height.html:4
> +		<script src="resources/repaint.js" type="text/javascript"></script>

If you use repaint.js then you should also have a png file for the mac platform and add lines to skip the test on other non-mac platforms where the test is run. If you decide to use the script resources/text-based-repaint.js, then you will have a text output file without the png. From looking at the comment inside repaint.js, text-based-repaint.js seems the preferred way.

> LayoutTests/fast/repaint/increasing-region-content-height.html:22
> +	<body onload="runRepaintTest();">

Can you add a comment telling what the success of this test looks like?

> LayoutTests/fast/repaint/increasing-region-content-height.html:24
> +		<div class="zang">

zang? :)
Comment 10 Radu Stavila 2013-11-12 09:32:28 PST
Created attachment 216686 [details]
Patch integrating reviewer feedback
Comment 11 Mihnea Ovidenie 2013-11-12 11:26:27 PST
Comment on attachment 216686 [details]
Patch integrating reviewer feedback

r=me
Comment 12 WebKit Commit Bot 2013-11-12 12:03:15 PST
Comment on attachment 216686 [details]
Patch integrating reviewer feedback

Clearing flags on attachment: 216686

Committed r159132: <http://trac.webkit.org/changeset/159132>
Comment 13 WebKit Commit Bot 2013-11-12 12:03:23 PST
All reviewed patches have been landed.  Closing bug.