Changeset 168228 in webkit


Ignore:
Timestamp:
May 3, 2014 1:32:31 PM (10 years ago)
Author:
Simon Fraser
Message:

[UI-side compositing] Assertion in PlatformCAFilters::setFiltersOnLayer with animated reference filter
https://bugs.webkit.org/show_bug.cgi?id=132528
<rdar://problem/16671660>

Reviewed by Tim Horton.

Source/WebKit2:
Allow PASSTHROUGH filters to be encoded and sent to the UI process; they can be set
on layers as the result of a filter animation using a reference filter, and just get
ignored anyway, but encoding them maintains consistency of the filters list.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<FilterOperation>::encode): Assert during encoding if
we try to encode a NONE or REFERENCE filter (to match the decoding assertions).
(IPC::decodeFilterOperation): Allow decoding of PASSTHROUGH filters. Have
trying to decode a NONE or REFERENCE filter mark the message as invalid.
(IPC::ArgumentCoder<IDBKeyData>::decode): Mark the message invalid when receiving
unexpected key types.

  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTextStream::operator<<): Have the logging not crash if
a filter is null (should never happen).

LayoutTests:
Make the animation duration a little longer to cause bug 132528 to reproduce more
reliably. The test does notifyDone() from an animation start event, so this doesn't
increase test duration.

  • css3/filters/crash-filter-animation-invalid-url.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r168227 r168228  
     12014-05-03  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [UI-side compositing] Assertion in PlatformCAFilters::setFiltersOnLayer with animated reference filter
     4        https://bugs.webkit.org/show_bug.cgi?id=132528
     5        <rdar://problem/16671660>
     6
     7        Reviewed by Tim Horton.
     8       
     9        Make the animation duration a little longer to cause bug 132528 to reproduce more
     10        reliably. The test does notifyDone() from an animation start event, so this doesn't
     11        increase test duration.
     12
     13        * css3/filters/crash-filter-animation-invalid-url.html:
     14
    1152014-05-03  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/LayoutTests/css3/filters/crash-filter-animation-invalid-url.html

    r162643 r168228  
    44    a {
    55        -webkit-animation-name: n;
    6         -webkit-animation-duration: .01s;
     6        -webkit-animation-duration: 50ms;
    77    }
    88    @-webkit-keyframes n {
  • trunk/Source/WebKit2/ChangeLog

    r168213 r168228  
     12014-05-03  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [UI-side compositing] Assertion in PlatformCAFilters::setFiltersOnLayer with animated reference filter
     4        https://bugs.webkit.org/show_bug.cgi?id=132528
     5        <rdar://problem/16671660>
     6
     7        Reviewed by Tim Horton.
     8       
     9        Allow PASSTHROUGH filters to be encoded and sent to the UI process; they can be set
     10        on layers as the result of a filter animation using a reference filter, and just get
     11        ignored anyway, but encoding them maintains consistency of the filters list.
     12
     13        * Shared/WebCoreArgumentCoders.cpp:
     14        (IPC::ArgumentCoder<FilterOperation>::encode): Assert during encoding if
     15        we try to encode a NONE or REFERENCE filter (to match the decoding assertions).
     16        (IPC::decodeFilterOperation): Allow decoding of PASSTHROUGH filters. Have
     17        trying to decode a NONE or REFERENCE filter mark the message as invalid.
     18        (IPC::ArgumentCoder<IDBKeyData>::decode): Mark the message invalid when receiving
     19        unexpected key types.
     20        * Shared/mac/RemoteLayerTreeTransaction.mm:
     21        (WebKit::RemoteLayerTreeTextStream::operator<<): Have the logging not crash if
     22        a filter is null (should never happen).
     23
    1242014-05-02  Dan Bernstein  <mitz@apple.com>
    225
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

    r167360 r168228  
    15621562
    15631563    switch (filter.type()) {
    1564     case FilterOperation::REFERENCE: {
     1564    case FilterOperation::NONE:
     1565    case FilterOperation::REFERENCE:
    15651566        ASSERT_NOT_REACHED();
    15661567        break;
    1567     }
    15681568    case FilterOperation::GRAYSCALE:
    15691569    case FilterOperation::SEPIA:
     
    15921592        break;
    15931593    case FilterOperation::PASSTHROUGH:
    1594     case FilterOperation::NONE:
    15951594        break;
    15961595    }
     
    16041603
    16051604    switch (type) {
    1606     case FilterOperation::PASSTHROUGH:
    16071605    case FilterOperation::NONE:
    16081606    case FilterOperation::REFERENCE:
    16091607        ASSERT_NOT_REACHED();
    1610         break;
     1608        decoder.markInvalid();
     1609        return false;
    16111610    case FilterOperation::GRAYSCALE:
    16121611    case FilterOperation::SEPIA:
     
    16561655        break;
    16571656    }
     1657    case FilterOperation::PASSTHROUGH:
     1658        filter = PassthroughFilterOperation::create();
     1659        break;
    16581660    }
    16591661           
     
    18361838        // They should never be sent across the wire.
    18371839        ASSERT_NOT_REACHED();
     1840        decoder.markInvalid();
    18381841        return false;
    18391842    }
  • trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm

    r167749 r168228  
    647647    for (size_t i = 0; i < filters.size(); ++i) {
    648648        const auto filter = filters.at(i);
    649         ts << *filter;
     649        if (filter)
     650            ts << *filter;
     651        else
     652            ts << "(null)";
    650653        if (i < filters.size() - 1)
    651654            ts << " ";
Note: See TracChangeset for help on using the changeset viewer.