Changeset 196575 in webkit


Ignore:
Timestamp:
Feb 15, 2016 2:30:36 AM (8 years ago)
Author:
Antti Koivisto
Message:

Add test for class change style invalidation optimization
https://bugs.webkit.org/show_bug.cgi?id=154226

Reviewed by Myles Maxfield.

Test for https://trac.webkit.org/r196383

Source/WebCore:

Add internals.styleChangeType function.

Test: fast/css/style-invalidation-class-change-descendants.html

  • testing/Internals.cpp:

(WebCore::Internals::nodeNeedsStyleRecalc):
(WebCore::asString):
(WebCore::Internals::styleChangeType):
(WebCore::Internals::description):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • fast/css/style-invalidation-class-change-descendants-expected.txt: Added.
  • fast/css/style-invalidation-class-change-descendants.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r196574 r196575  
     12016-02-14  Antti Koivisto  <antti@apple.com>
     2
     3        Add test for class change style invalidation optimization
     4        https://bugs.webkit.org/show_bug.cgi?id=154226
     5
     6        Reviewed by Myles Maxfield.
     7
     8        Test for https://trac.webkit.org/r196383
     9
     10        * fast/css/style-invalidation-class-change-descendants-expected.txt: Added.
     11        * fast/css/style-invalidation-class-change-descendants.html: Added.
     12
    1132016-02-15  Hunseop Jeong  <hs85.jeong@samsung.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r196571 r196575  
     12016-02-14  Antti Koivisto  <antti@apple.com>
     2
     3        Add test for class change style invalidation optimization
     4        https://bugs.webkit.org/show_bug.cgi?id=154226
     5
     6        Reviewed by Myles Maxfield.
     7
     8        Test for https://trac.webkit.org/r196383
     9
     10        Add internals.styleChangeType function.
     11
     12        Test: fast/css/style-invalidation-class-change-descendants.html
     13
     14        * testing/Internals.cpp:
     15        (WebCore::Internals::nodeNeedsStyleRecalc):
     16        (WebCore::asString):
     17        (WebCore::Internals::styleChangeType):
     18        (WebCore::Internals::description):
     19        * testing/Internals.h:
     20        * testing/Internals.idl:
     21
    1222016-02-14  Simon Fraser  <simon.fraser@apple.com>
    223
  • trunk/Source/WebCore/testing/Internals.cpp

    r196165 r196575  
    465465}
    466466
     467static String styleChangeTypeToString(StyleChangeType type)
     468{
     469    switch (type) {
     470    case NoStyleChange:
     471        return "NoStyleChange";
     472    case InlineStyleChange:
     473        return "InlineStyleChange";
     474    case FullStyleChange:
     475        return "FullStyleChange";
     476    case SyntheticStyleChange:
     477        return "SyntheticStyleChange";
     478    case ReconstructRenderTree:
     479        return "ReconstructRenderTree";
     480    }
     481    ASSERT_NOT_REACHED();
     482    return "";
     483}
     484
     485String Internals::styleChangeType(Node* node, ExceptionCode& exception)
     486{
     487    if (!node) {
     488        exception = INVALID_ACCESS_ERR;
     489        return { };
     490    }
     491
     492    return styleChangeTypeToString(node->styleChangeType());
     493}
     494
    467495String Internals::description(Deprecated::ScriptValue value)
    468496{
  • trunk/Source/WebCore/testing/Internals.h

    r196165 r196575  
    9090    String address(Node*);
    9191    bool nodeNeedsStyleRecalc(Node*, ExceptionCode&);
     92    String styleChangeType(Node*, ExceptionCode&);
    9293    String description(Deprecated::ScriptValue);
    9394
  • trunk/Source/WebCore/testing/Internals.idl

    r196165 r196575  
    6969    DOMString address(Node node);
    7070    [RaisesException] boolean nodeNeedsStyleRecalc(Node node);
     71    [RaisesException] DOMString styleChangeType(Node node);
    7172    DOMString description(any value);
    7273
Note: See TracChangeset for help on using the changeset viewer.