Bug 132753 - Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
Summary: Subpixel rendering: Empty rects should remain empty after integrally enclosin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2014-05-09 15:49 PDT by zalan
Modified: 2014-05-10 11:04 PDT (History)
14 users (show)

See Also:


Attachments
Patch (5.88 KB, patch)
2014-05-09 16:00 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion (649.62 KB, application/zip)
2014-05-09 17:18 PDT, Build Bot
no flags Details
Patch (57.63 KB, patch)
2014-05-09 17:53 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (605.64 KB, application/zip)
2014-05-09 18:56 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (638.31 KB, application/zip)
2014-05-09 19:24 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (636.46 KB, application/zip)
2014-05-09 20:17 PDT, Build Bot
no flags Details
Patch (60.93 KB, patch)
2014-05-09 21:11 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (61.18 KB, patch)
2014-05-09 22:52 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2014-05-09 15:49:10 PDT
When the full screen transition's final rect is empty, enclosingIntRect turns it into a 1px width/height non-empty rect and stretch occurs.
Comment 1 zalan 2014-05-09 15:49:47 PDT
<rdar://problem/16846801>
Comment 2 zalan 2014-05-09 16:00:25 PDT
Created attachment 231191 [details]
Patch
Comment 3 Simon Fraser (smfr) 2014-05-09 16:04:22 PDT
Comment on attachment 231191 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        Subpixel rendering: Empty rects should remain empty after integral enclosing them.

integrally?
Comment 4 Build Bot 2014-05-09 17:18:51 PDT
Comment on attachment 231191 [details]
Patch

Attachment 231191 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6214286661648384

New failing tests:
editing/selection/vertical-rl-rtl-extend-line-forward-br.html
fast/css/h1-in-section-elements.html
fast/forms/fieldset-align.html
tables/mozilla/other/wa_table_tr_align.html
fast/inline/continuation-outlines.html
fast/invalid/nestedh3s.html
editing/selection/vertical-rl-rtl-extend-line-backward-br.html
fast/multicol/client-rects-spanners-complex.html
fast/text/international/bidi-LDB-2-HTML.html
mathml/presentation/mo-stretch.html
editing/selection/vertical-rl-rtl-extend-line-backward-p.html
fast/encoding/utf-16-little-endian.html
fast/multicol/span/span-as-immediate-columns-child.html
fast/css/word-space-extra.html
fast/forms/textAreaLineHeight.html
fast/inline/outline-continuations.html
editing/selection/vertical-rl-rtl-extend-line-forward-p.html
fast/multicol/client-rects.html
fast/multicol/span/span-as-immediate-columns-child-dynamic.html
fast/css/css1_forward_compatible_parsing.html
svg/wicd/rightsizing-grid.xhtml
fast/inline/continuation-outlines-with-layers.html
fast/encoding/utf-16-big-endian.html
fast/css/first-line-text-decoration.html
fast/multicol/newmulticol/client-rects.html
fast/multicol/client-rects-spanners.html
tables/mozilla/other/wa_table_thtd_rowspan.html
fast/multicol/span/span-margin-collapsing.html
fast/overflow/clip-rects-fixed-ancestor.html
fast/table/014.html
Comment 5 Build Bot 2014-05-09 17:18:56 PDT
Created attachment 231198 [details]
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-02  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 6 zalan 2014-05-09 17:35:47 PDT
(In reply to comment #4)
> (From update of attachment 231191 [details])
> Attachment 231191 [details] did not pass mac-ews (mac):
> Output: http://webkit-queues.appspot.com/results/6214286661648384
> 
> New failing tests:
> editing/selection/vertical-rl-rtl-extend-line-forward-br.html
> fast/css/h1-in-section-elements.html
> fast/forms/fieldset-align.html
> tables/mozilla/other/wa_table_tr_align.html
> fast/inline/continuation-outlines.html
> fast/invalid/nestedh3s.html
> editing/selection/vertical-rl-rtl-extend-line-backward-br.html
> fast/multicol/client-rects-spanners-complex.html
> fast/text/international/bidi-LDB-2-HTML.html
> mathml/presentation/mo-stretch.html
> editing/selection/vertical-rl-rtl-extend-line-backward-p.html
> fast/encoding/utf-16-little-endian.html
> fast/multicol/span/span-as-immediate-columns-child.html
> fast/css/word-space-extra.html
> fast/forms/textAreaLineHeight.html
> fast/inline/outline-continuations.html
> editing/selection/vertical-rl-rtl-extend-line-forward-p.html
> fast/multicol/client-rects.html
> fast/multicol/span/span-as-immediate-columns-child-dynamic.html
> fast/css/css1_forward_compatible_parsing.html
> svg/wicd/rightsizing-grid.xhtml
> fast/inline/continuation-outlines-with-layers.html
> fast/encoding/utf-16-big-endian.html
> fast/css/first-line-text-decoration.html
> fast/multicol/newmulticol/client-rects.html
> fast/multicol/client-rects-spanners.html
> tables/mozilla/other/wa_table_thtd_rowspan.html
> fast/multicol/span/span-margin-collapsing.html
> fast/overflow/clip-rects-fixed-ancestor.html
> fast/table/014.html
These are all progressions (1px->0px). They need rebaselining.
Comment 7 zalan 2014-05-09 17:53:34 PDT
Created attachment 231200 [details]
Patch
Comment 8 zalan 2014-05-09 17:53:50 PDT
Comment on attachment 231200 [details]
Patch

EWS testing.
Comment 9 Build Bot 2014-05-09 18:56:45 PDT
Comment on attachment 231200 [details]
Patch

Attachment 231200 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5490639164669952

New failing tests:
fast/forms/fieldset-align.html
fast/forms/textAreaLineHeight.html
Comment 10 Build Bot 2014-05-09 18:56:50 PDT
Created attachment 231204 [details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 11 Build Bot 2014-05-09 19:24:42 PDT
Comment on attachment 231200 [details]
Patch

Attachment 231200 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5972646164430848

New failing tests:
fast/forms/fieldset-align.html
fast/forms/textAreaLineHeight.html
Comment 12 Build Bot 2014-05-09 19:24:46 PDT
Created attachment 231206 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 13 Build Bot 2014-05-09 20:17:42 PDT
Comment on attachment 231200 [details]
Patch

Attachment 231200 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5039919122612224

New failing tests:
fast/forms/fieldset-align.html
fast/forms/textAreaLineHeight.html
Comment 14 Build Bot 2014-05-09 20:17:48 PDT
Created attachment 231208 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 15 zalan 2014-05-09 21:11:17 PDT
Created attachment 231210 [details]
Patch
Comment 16 zalan 2014-05-09 22:52:39 PDT
Created attachment 231218 [details]
Patch
Comment 17 WebKit Commit Bot 2014-05-10 00:23:30 PDT
Comment on attachment 231218 [details]
Patch

Clearing flags on attachment: 231218

Committed r168575: <http://trac.webkit.org/changeset/168575>
Comment 18 WebKit Commit Bot 2014-05-10 00:23:37 PDT
All reviewed patches have been landed.  Closing bug.
Comment 19 Darin Adler 2014-05-10 11:04:36 PDT
Comment on attachment 231218 [details]
Patch

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

> Source/WebCore/platform/graphics/LayoutRect.cpp:136
> +    // Empty rects with fractional x, y values turn into non-empty rects when converting to enclosing.
> +    // We need to ensure that empty rects stay empty after the conversion, because the selection code expects them to be empty.
>      IntPoint location = flooredIntPoint(rect.minXMinYCorner());
> -    IntPoint maxPoint = ceiledIntPoint(rect.maxXMaxYCorner());
> -
> +    IntPoint maxPoint = IntPoint(rect.width() ? rect.maxX().ceil() : location.x(), rect.height() ? rect.maxY().ceil() : location.y());
>      return IntRect(location, maxPoint - location);

This defines an empty rect as "width or height is zero" and independently applies this rule to each dimension. That’s one way of doing it.

Another would be to use isEmpty() to define emptiness:

    IntPoint location = flooredIntPoint(rect.minXMinYCorner());
    if (rect.isEmpty())
        return IntRect(location, IntSize());
    return IntRect(location, ceiledIntPoint(rect.maxXMaxYCorner()) - location);