Changeset 142187 in webkit


Ignore:
Timestamp:
Feb 7, 2013 3:20:27 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop
https://bugs.webkit.org/show_bug.cgi?id=107566

Patch by Hans Muller <hmuller@adobe.com> on 2013-02-07
Reviewed by David Hyatt.

Source/WebCore:

Improve ExclusionPolygon::firstIncludedIntervalLogicalTop() performance by only
creating offset edges for polygon edges that are below the horizontal minLogicalIntervalTop
line. In other words, don't bother creating offset edges that can't define the polygon's
first fit location.

Test: fast/exclusions/shape-inside/shape-inside-first-fit-004.html

  • rendering/ExclusionPolygon.cpp:

(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Don't create offset edges for polygon edges above minLogicalIntervalTop.

LayoutTests:

Added a simple polygonal shape-inside test where only a subset of the polygon edges
should contribute to each line's offset edges.

  • fast/exclusions/shape-inside/shape-inside-first-fit-004-expected.html: Added.
  • fast/exclusions/shape-inside/shape-inside-first-fit-004.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r142185 r142187  
     12013-02-07  Hans Muller  <hmuller@adobe.com>
     2
     3        [CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop
     4        https://bugs.webkit.org/show_bug.cgi?id=107566
     5
     6        Reviewed by David Hyatt.
     7
     8        Added a simple polygonal shape-inside test where only a subset of the polygon edges
     9        should contribute to each line's offset edges.
     10
     11        * fast/exclusions/shape-inside/shape-inside-first-fit-004-expected.html: Added.
     12        * fast/exclusions/shape-inside/shape-inside-first-fit-004.html: Added.
     13
    1142013-02-07  James Craig  <jcraig@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r142186 r142187  
     12013-02-07  Hans Muller  <hmuller@adobe.com>
     2
     3        [CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop
     4        https://bugs.webkit.org/show_bug.cgi?id=107566
     5
     6        Reviewed by David Hyatt.
     7
     8        Improve ExclusionPolygon::firstIncludedIntervalLogicalTop() performance by only
     9        creating offset edges for polygon edges that are below the horizontal minLogicalIntervalTop
     10        line. In other words, don't bother creating offset edges that can't define the polygon's
     11        first fit location.
     12
     13        Test: fast/exclusions/shape-inside/shape-inside-first-fit-004.html
     14
     15        * rendering/ExclusionPolygon.cpp:
     16        (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Don't create offset edges for polygon edges above minLogicalIntervalTop.
     17
    1182013-02-07  Jer Noble  <jer.noble@apple.com>
    219
  • trunk/Source/WebCore/rendering/ExclusionPolygon.cpp

    r140606 r142187  
    498498        return false;
    499499
     500    Vector<ExclusionPolygon::EdgeInterval> overlappingEdges;
     501    m_edgeTree.allOverlaps(ExclusionPolygon::EdgeInterval(minLogicalIntervalTop, m_boundingBox.maxY(), 0), overlappingEdges);
     502
    500503    float dx = minLogicalIntervalSize.width() / 2;
    501504    float dy = minLogicalIntervalSize.height() / 2;
    502505    Vector<OffsetPolygonEdge> offsetEdges;
    503506
    504     for (unsigned i = 0; i < numberOfEdges(); ++i) {
    505         const ExclusionPolygonEdge& edge = edgeAt(i);
     507    for (unsigned i = 0; i < overlappingEdges.size(); ++i) {
     508        const ExclusionPolygonEdge& edge = *static_cast<ExclusionPolygonEdge*>(overlappingEdges[i].data());
    506509        const FloatPoint& vertex1 = edge.vertex1();
    507510        const FloatPoint& vertex2 = edge.vertex2();
Note: See TracChangeset for help on using the changeset viewer.