Changeset 130557 in webkit


Ignore:
Timestamp:
Oct 5, 2012 3:01:04 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Exclusions] Add shape-inside tests for rounded rectangles
https://bugs.webkit.org/show_bug.cgi?id=96669

Patch by Bear Travis <betravis@adobe.com> on 2012-10-05
Reviewed by Levi Weintraub.

Adding multiple rounded rectangle tests. The more complex tests use float "sandbags"
to simulate the shape-inside area in the test expectations.
(See http://www.alistapart.com/articles/sandbags/)
In general, each line has its own pair of left and right floats (both lineHeight tall),
to position the text and appropriately limit its width. In the simple, 0 corner radius
cases, these floats can be merged because they all have the same width on the left and
right.

  • fast/exclusions/resources/rounded-rectangle.js: Contains functionality for generating

a shape-inside, simulating one, and generating content that should roughly fill the
shape-inside.
(xFromEllipseCenter): The x distance from the center of an ellipse, based on its y
distance from center.
(xInset): The inset of a rounded rectangle from its bounding box.
(generateString): Generate a string that roughly fills a shape-inside's content area.
(simulateShape): Create floats to simulate a shape-inside area.
(simulateShapeOutline): Create an outline for the rounded rectangle shape-inside.
(generateSimulatedShapeElement): Simulate a shape-inside and appropriately fill it
with content.
(generateShapeElement): Create a shape-inside and fill it with content.

  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-001-expected.html:

Renamed from LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle-expected.html.

  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-001.html:

Renamed from LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle.html.

  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-002-expected.html: Added.
  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-002.html: Added.
  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-003-expected.html: Added.
  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-003.html: Added.
  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-004-expected.html: Added.
  • fast/exclusions/shape-inside/shape-inside-rounded-rectangle-004.html: Added.
Location:
trunk/LayoutTests
Files:
8 added
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r130556 r130557  
     12012-10-05  Bear Travis  <betravis@adobe.com>
     2
     3        [CSS Exclusions] Add shape-inside tests for rounded rectangles
     4        https://bugs.webkit.org/show_bug.cgi?id=96669
     5
     6        Reviewed by Levi Weintraub.
     7
     8        Adding multiple rounded rectangle tests. The more complex tests use float "sandbags"
     9        to simulate the shape-inside area in the test expectations.
     10        (See http://www.alistapart.com/articles/sandbags/)
     11        In general, each line has its own pair of left and right floats (both lineHeight tall),
     12        to position the text and appropriately limit its width. In the simple, 0 corner radius
     13        cases, these floats can be merged because they all have the same width on the left and
     14        right.
     15
     16        * fast/exclusions/resources/rounded-rectangle.js: Contains functionality for generating
     17        a shape-inside, simulating one, and generating content that should roughly fill the
     18        shape-inside.
     19        (xFromEllipseCenter): The x distance from the center of an ellipse, based on its y
     20        distance from center.
     21        (xInset): The inset of a rounded rectangle from its bounding box.
     22        (generateString): Generate a string that roughly fills a shape-inside's content area.
     23        (simulateShape): Create floats to simulate a shape-inside area.
     24        (simulateShapeOutline): Create an outline for the rounded rectangle shape-inside.
     25        (generateSimulatedShapeElement): Simulate a shape-inside and appropriately fill it
     26        with content.
     27        (generateShapeElement): Create a shape-inside and fill it with content.
     28        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-001-expected.html:
     29        Renamed from LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle-expected.html.
     30        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-001.html:
     31        Renamed from LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle.html.
     32        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-002-expected.html: Added.
     33        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-002.html: Added.
     34        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-003-expected.html: Added.
     35        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-003.html: Added.
     36        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-004-expected.html: Added.
     37        * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-004.html: Added.
     38
     39
    1402012-10-04  Eric Carlson  <eric.carlson@apple.com>
    241
Note: See TracChangeset for help on using the changeset viewer.