⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176494 in webkit


Ignore:
Timestamp:
Nov 21, 2014, 6:06:47 PM (12 years ago)
Author:
benjamin@webkit.org
Message:

Start using the new :not() and :matches() in the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=138978

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-21
Reviewed by Joseph Pecoraro.

Source/WebCore:

There are only minor pending issues on :not() and :matches(). The feedback
has only been positive so far. It is time to move them out the experimental
flag.

  • css/CSSGrammar.y.in:
  • css/CSSParser.cpp:

(WebCore::CSSParser::detectFunctionTypeToken):

  • css/CSSSelector.cpp:

(WebCore::simpleSelectorSpecificityInternal):
(WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
(WebCore::appendSelectorList):
(WebCore::CSSSelector::selectorText):

  • css/CSSSelector.h:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::determineLinkMatchType):

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::addPseudoClassType):

Source/WebInspectorUI:

Start simpifying some definitions by using modern CSS.

  • UserInterface/Views/CSSStyleDeclarationSection.css:

(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:matches(.last-in-group, :last-child)):
(.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector):
(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:last-child): Deleted.
(.style-declaration-section.selector-locked > .header > .selector): Deleted.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.css:

(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.disabled, .invalid, .other-vendor, .not-inherited, .overridden)):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited)):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property:matches(.disabled, .other-vendor, .not-inherited, .overridden)):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.overridden): Deleted.

  • UserInterface/Views/ControlToolbarItem.css:

(.toolbar:matches(.icon-and-label-horizontal, .toolbar.icon-only) .item.control):
(.toolbar.icon-only .item.control): Deleted.

  • UserInterface/Views/DOMStorageContentView.css:
  • UserInterface/Views/DashboardContainerView.css:

(.toolbar.icon-and-label-vertical:matches(.small-size, .normal-size) .dashboard-container):
(.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard-container):
(.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container):
(.toolbar.normal-size.icon-and-label-vertical .dashboard-container): Deleted.
(.toolbar.small-size.icon-and-label-horizontal .dashboard-container): Deleted.
(.toolbar.normal-size.icon-and-label-horizontal .dashboard-container): Deleted.

  • UserInterface/Views/DataGrid.css:

(.data-grid :matches(th, td):not(:last-child)):
(.data-grid th:matches(.sort-ascending, .sort-descending)):
(.data-grid :matches(th, td) > div):
(.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child):
(.data-grid tr:matches(.selected, :hover) .go-to-arrow):
(.data-grid :-webkit-any(th, td):not(:last-child)): Deleted.
(.data-grid th:-webkit-any(.sort-ascending, .sort-descending)): Deleted.
(.data-grid :-webkit-any(th, td) > div): Deleted.
(.data-grid th:-webkit-any(.sort-ascending, .sort-descending) > div:first-child): Deleted.
(.data-grid tr:-webkit-any(.selected, :hover) .go-to-arrow): Deleted.

  • UserInterface/Views/DebuggerDashboardView.css:

(.toolbar.collapsed .dashboard.debugger > :not(.message, .navigation-bar )):
(.toolbar.collapsed .dashboard.debugger > :not(.message):not(.navigation-bar )): Deleted.

  • UserInterface/Views/DefaultDashboardView.css:

(body.web .toolbar.collapsed .dashboard.default > :matches(.time, .resourcesSize, .logs)):
(body.javascript .toolbar .dashboard.default > :matches(.time, .resourcesSize, .resourcesCount)):
(.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard.default > .item):
(.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item):
(body.web .toolbar.collapsed .dashboard.default > .logs): Deleted.
(body.javascript .toolbar .dashboard.default > .resourcesCount): Deleted.
(.toolbar.small-size.icon-and-label-horizontal .dashboard.default > .item): Deleted.
(.toolbar.normal-size.icon-and-label-horizontal .dashboard.default > .item): Deleted.

  • UserInterface/Views/DetailsSection.css:

(.details-section > .header > :matches(.node-link, .go-to-arrow)):
(.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child)):
(body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row.simple:last-child > *):
(.details-section > .content > .group > .row:matches(.empty, .text)):
(body.mac-platform.legacy .details-section > .content > .group > .row:matches(.empty, .text)):
(.details-section > .header > .go-to-arrow): Deleted.
(.details-section > .content > .group:nth-child(even) > .row.simple:first-child > *): Deleted.
(body.mac-platform.legacy .details-section > .content > .group:last-child > .row.simple:last-child > *): Deleted.
(.details-section > .content > .group > .row.text): Deleted.
(body.mac-platform.legacy .details-section > .content > .group > .row.text): Deleted.

  • UserInterface/Views/FindBanner.css:

(:matches(.find-banner, .supports-find-banner).no-find-banner-transition):
(.supports-find-banner.no-find-banner-transition): Deleted.

  • UserInterface/Views/FlexibleSpaceNavigationItem.css:

(:matches(.navigation-bar, .toolbar) .item.flexible-space):
(.toolbar .item.flexible-space): Deleted.

Location:
trunk/Source
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r176492 r176494  
     12014-11-21  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Start using the new :not() and :matches() in the Web Inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=138978
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        There are only minor pending issues on :not() and :matches(). The feedback
     9        has only been positive so far. It is time to move them out the experimental
     10        flag.
     11
     12        * css/CSSGrammar.y.in:
     13        * css/CSSParser.cpp:
     14        (WebCore::CSSParser::detectFunctionTypeToken):
     15        * css/CSSSelector.cpp:
     16        (WebCore::simpleSelectorSpecificityInternal):
     17        (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
     18        (WebCore::appendSelectorList):
     19        (WebCore::CSSSelector::selectorText):
     20        * css/CSSSelector.h:
     21        * css/SelectorChecker.cpp:
     22        (WebCore::SelectorChecker::checkOne):
     23        (WebCore::SelectorChecker::determineLinkMatchType):
     24        * css/SelectorPseudoClassAndCompatibilityElementMap.in:
     25        * cssjit/SelectorCompiler.cpp:
     26        (WebCore::SelectorCompiler::addPseudoClassType):
     27
    1282014-11-21  Chris Dumez  <cdumez@apple.com>
    229
  • trunk/Source/WebCore/css/CSSGrammar.y.in

    r176368 r176494  
    5858    case NOTFUNCTION:
    5959    case CALCFUNCTION:
     60    case MATCHESFUNCTION:
     61    case MAXFUNCTION:
    6062    case MINFUNCTION:
    61     case MAXFUNCTION:
    6263    case NTHCHILDFUNCTIONS:
    6364    case NTHCHILDSELECTORSEPARATOR:
    6465#if ENABLE_CSS_SELECTORS_LEVEL4
    6566    case LANGFUNCTION:
    66     case MATCHESFUNCTION:
    6767    case ROLEFUNCTION:
    6868#endif
     
    227227%token <string> NOTFUNCTION
    228228%token <string> CALCFUNCTION
     229%token <string> MATCHESFUNCTION
     230%token <string> MAXFUNCTION
    229231%token <string> MINFUNCTION
    230 %token <string> MAXFUNCTION
    231232%token <string> NTHCHILDFUNCTIONS
    232233
    233234#if ENABLE_CSS_SELECTORS_LEVEL4
    234235%token <string> LANGFUNCTION
    235 %token <string> MATCHESFUNCTION
    236236%token <string> ROLEFUNCTION
    237237#endif
     
    13641364        }
    13651365    }
     1366    | ':' MATCHESFUNCTION maybe_space nested_selector_list maybe_space ')' {
     1367        $$ = nullptr;
     1368        if ($4) {
     1369            auto selector = std::make_unique<CSSParserSelector>();
     1370            selector->setMatch(CSSSelector::PseudoClass);
     1371            selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
     1372            selector->setPseudoClassValue($2);
     1373            if (selector->pseudoClassType() == CSSSelector::PseudoClassMatches)
     1374                $$ = selector.release();
     1375        }
     1376    }
    13661377
    13671378#if ENABLE_CSS_SELECTORS_LEVEL4
     
    13751386          if (selector->pseudoClassType() == CSSSelector::PseudoClassLang)
    13761387              $$ = selector.release();
    1377         }
    1378     }
    1379 
    1380     | ':' MATCHESFUNCTION maybe_space nested_selector_list maybe_space ')' {
    1381         $$ = nullptr;
    1382         if ($4) {
    1383             auto selector = std::make_unique<CSSParserSelector>();
    1384             selector->setMatch(CSSSelector::PseudoClass);
    1385             selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
    1386             selector->setPseudoClassValue($2);
    1387             if (selector->pseudoClassType() == CSSSelector::PseudoClassMatches)
    1388                 $$ = selector.release();
    13891388        }
    13901389    }
     
    14841483        $$ = selector.release();
    14851484    }
    1486 
    14871485    // Definition of :not().
    1488 #if ENABLE_CSS_SELECTORS_LEVEL4
    14891486    | ':' NOTFUNCTION maybe_space nested_selector_list maybe_space ')' {
    14901487        $$ = nullptr;
     
    14981495        }
    14991496    }
    1500 #else
    1501     | ':' NOTFUNCTION maybe_space compound_selector maybe_space ')' {
    1502         std::unique_ptr<CSSParserSelector> selector($4);
    1503         $$ = nullptr;
    1504         if (selector && selector->isSimple()) {
    1505             $$ = new CSSParserSelector;
    1506             $$->setMatch(CSSSelector::PseudoClass);
    1507 
    1508             Vector<std::unique_ptr<CSSParserSelector>> selectorVector;
    1509             selectorVector.append(WTF::move(selector));
    1510             $$->adoptSelectorVector(selectorVector);
    1511             $$->setPseudoClassValue($2);
    1512         }
    1513     }
    1514 #endif
    15151497  ;
    15161498
     
    18901872
    18911873opening_parenthesis:
    1892     '(' | FUNCTION | CALCFUNCTION | MINFUNCTION | MAXFUNCTION | ANYFUNCTION | NOTFUNCTION
     1874    '(' | FUNCTION | CALCFUNCTION | MATCHESFUNCTION | MAXFUNCTION | MINFUNCTION | ANYFUNCTION | NOTFUNCTION
    18931875#if ENABLE_CSS_SELECTORS_LEVEL4
    1894     | LANGFUNCTION | MATCHESFUNCTION | ROLEFUNCTION
     1876    | LANGFUNCTION | ROLEFUNCTION
    18951877#endif
    18961878#if ENABLE_VIDEO_TRACK
  • trunk/Source/WebCore/css/CSSParser.cpp

    r176454 r176494  
    1071210712        return false;
    1071310713
    10714 #if ENABLE(CSS_SELECTORS_LEVEL4)
    1071510714    case 7:
    1071610715        if (isEqualToCSSIdentifier(name, "matches")) {
     
    1071910718        }
    1072010719        return false;
    10721 #endif
    1072210720
    1072310721    case 9:
  • trunk/Source/WebCore/css/CSSSelector.cpp

    r176436 r176494  
    9090        break;
    9191    case CSSSelector::PseudoClass:
    92 #if ENABLE(CSS_SELECTORS_LEVEL4)
    9392        if (simpleSelector.pseudoClassType() == CSSSelector::PseudoClassMatches) {
    9493            ASSERT_WITH_MESSAGE(simpleSelector.selectorList() && simpleSelector.selectorList()->first(), "The parser should never generate a valid selector for an empty :matches().");
     
    103102        }
    104103        FALLTHROUGH;
    105 #else
    106         if (simpleSelector.pseudoClassType() == CSSSelector::PseudoClassNot && simpleSelector.selectorList())
    107             return simpleSelector.selectorList()->first()->simpleSelectorSpecificity();
    108         FALLTHROUGH;
    109 #endif
    110104    case CSSSelector::Exact:
    111105    case CSSSelector::Class:
     
    137131static unsigned simpleSelectorFunctionalPseudoClassStaticSpecificity(const CSSSelector& simpleSelector, bool& ok)
    138132{
    139 #if ENABLE(CSS_SELECTORS_LEVEL4)
    140133    if (simpleSelector.match() == CSSSelector::PseudoClass) {
    141134        if (simpleSelector.pseudoClassType() == CSSSelector::PseudoClassMatches) {
     
    158151        }
    159152    }
    160 #endif
    161153    return 0;
    162154}
     
    355347    }
    356348}
     349#endif
    357350
    358351static void appendSelectorList(StringBuilder& str, const CSSSelectorList* selectorList)
     
    365358    }
    366359}
    367 #endif
    368360
    369361String CSSSelector::selectorText(const String& rightSide) const
     
    521513            case CSSSelector::PseudoClassNot:
    522514                str.appendLiteral(":not(");
    523 #if ENABLE(CSS_SELECTORS_LEVEL4)
    524515                appendSelectorList(str, cs->selectorList());
    525 #else
    526                 if (const CSSSelectorList* selectorList = cs->selectorList())
    527                     str.append(selectorList->first()->selectorText());
    528 #endif
    529516                str.append(')');
    530517                break;
     
    572559                str.appendLiteral(":optional");
    573560                break;
    574 #if ENABLE(CSS_SELECTORS_LEVEL4)
    575561            case CSSSelector::PseudoClassMatches: {
    576562                str.appendLiteral(":matches(");
     
    579565                break;
    580566            }
     567#if ENABLE(CSS_SELECTORS_LEVEL4)
    581568            case CSSSelector::PseudoClassPlaceholderShown:
    582569                str.appendLiteral(":placeholder-shown");
  • trunk/Source/WebCore/css/CSSSelector.h

    r176436 r176494  
    123123            PseudoClassOptional,
    124124#if ENABLE(CSS_SELECTORS_LEVEL4)
     125            PseudoClassPlaceholderShown,
     126#endif
    125127            PseudoClassMatches,
    126             PseudoClassPlaceholderShown,
    127 #endif
    128128            PseudoClassRequired,
    129129            PseudoClassReadOnly,
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r176313 r176494  
    577577            const CSSSelectorList* selectorList = selector->selectorList();
    578578
    579 #if !ENABLE(CSS_SELECTORS_LEVEL4)
    580             // FIXME: We probably should fix the parser and make it never produce :not rules with missing selector list.
    581             if (!selectorList)
    582                 return false;
    583 #endif
    584 
    585579            for (const CSSSelector* subselector = selectorList->first(); subselector; subselector = CSSSelectorList::next(subselector)) {
    586580                CheckingContextWithStatus subcontext(context);
     
    592586
    593587                unsigned ignoredSpecificity;
    594 #if ENABLE(CSS_SELECTORS_LEVEL4)
    595588                if (matchRecursively(subcontext, ignoreDynamicPseudo, ignoredSpecificity).match == Match::SelectorMatches) {
    596589                    ASSERT(!ignoreDynamicPseudo);
    597590                    return false;
    598591                }
    599 #else
    600                 if (subcontext.selector->match() == CSSSelector::PseudoClass) {
    601                     // :not cannot nest. I don't really know why this is a
    602                     // restriction in CSS3, but it is, so let's honor it.
    603                     // the parser enforces that this never occurs
    604                     ASSERT(subcontext.selector->pseudoClassType() != CSSSelector::PseudoClassNot);
    605                     // We select between :visited and :link when applying. We don't know which one applied (or not) yet.
    606                     if (subcontext.selector->pseudoClassType() == CSSSelector::PseudoClassVisited)
    607                         return true;
    608                 }
    609                 // Since :not cannot contain pseudo elements, there's no effect on matchType.
    610                 MatchType ignoreMatchType = MatchType::Element;
    611                 if (!checkOne(subcontext, ignoreDynamicPseudo, ignoreMatchType, ignoredSpecificity))
    612                     return true;
    613 #endif
    614             }
    615 #if ENABLE(CSS_SELECTORS_LEVEL4)
     592            }
    616593            return true;
    617 #endif
    618594        } else if (context.hasScrollbarPseudo) {
    619595            // CSS scrollbars match a specific subset of pseudo classes, and they have specialized rules for each
     
    723699            }
    724700            break;
    725 #if ENABLE(CSS_SELECTORS_LEVEL4)
    726701        case CSSSelector::PseudoClassMatches:
    727702            {
     
    755730                return hasMatchedAnything;
    756731            }
    757 
     732#if ENABLE(CSS_SELECTORS_LEVEL4)
    758733        case CSSSelector::PseudoClassPlaceholderShown:
    759734            if (is<HTMLTextFormControlElement>(*element)) {
     
    11211096        if (selector->match() == CSSSelector::PseudoClass) {
    11221097            switch (selector->pseudoClassType()) {
    1123 #if! ENABLE(CSS_SELECTORS_LEVEL4)
    1124             case CSSSelector::PseudoClassNot:
    1125                 {
    1126                     // :not(:visited) is equivalent to :link. Parser enforces that :not can't nest.
    1127                     const CSSSelectorList* selectorList = selector->selectorList();
    1128                     if (!selectorList)
    1129                         break;
    1130 
    1131                     for (const CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = subSelector->tagHistory()) {
    1132                         if (subSelector->match() == CSSSelector::PseudoClass) {
    1133                             CSSSelector::PseudoClassType subType = subSelector->pseudoClassType();
    1134                             if (subType == CSSSelector::PseudoClassVisited)
    1135                                 linkMatchType &= ~SelectorChecker::MatchVisited;
    1136                             else if (subType == CSSSelector::PseudoClassLink)
    1137                                 linkMatchType &= ~SelectorChecker::MatchLink;
    1138                         }
    1139                     }
    1140                 }
    1141                 break;
    1142 #endif
    11431098            case CSSSelector::PseudoClassLink:
    11441099                linkMatchType &= ~SelectorChecker::MatchVisited;
  • trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in

    r176241 r176494  
    3535last-of-type
    3636link
     37matches(
    3738no-button
    3839not(
     
    4748#if ENABLE(CSS_SELECTORS_LEVEL4)
    4849placeholder-shown
    49 matches(
    5050#endif
    5151read-only
  • trunk/Source/WebCore/cssjit/SelectorCompiler.cpp

    r176313 r176494  
    757757        }
    758758
    759 #if ENABLE(CSS_SELECTORS_LEVEL4)
    760759    case CSSSelector::PseudoClassMatches:
    761760        {
     
    805804            return functionType;
    806805        }
    807 #endif
    808806
    809807    case CSSSelector::PseudoClassUnknown:
  • trunk/Source/WebInspectorUI/ChangeLog

    r176376 r176494  
     12014-11-21  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Start using the new :not() and :matches() in the Web Inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=138978
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        Start simpifying some definitions by using modern CSS.
     9
     10        * UserInterface/Views/CSSStyleDeclarationSection.css:
     11        (body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:matches(.last-in-group, :last-child)):
     12        (.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector):
     13        (body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:last-child): Deleted.
     14        (.style-declaration-section.selector-locked > .header > .selector): Deleted.
     15        * UserInterface/Views/CSSStyleDeclarationTextEditor.css:
     16        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.disabled, .invalid, .other-vendor, .not-inherited, .overridden)):
     17        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited)):
     18        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property:matches(.disabled, .other-vendor, .not-inherited, .overridden)):
     19        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden): Deleted.
     20        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited): Deleted.
     21        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.overridden): Deleted.
     22        * UserInterface/Views/ControlToolbarItem.css:
     23        (.toolbar:matches(.icon-and-label-horizontal, .toolbar.icon-only) .item.control):
     24        (.toolbar.icon-only .item.control): Deleted.
     25        * UserInterface/Views/DOMStorageContentView.css:
     26        * UserInterface/Views/DashboardContainerView.css:
     27        (.toolbar.icon-and-label-vertical:matches(.small-size, .normal-size) .dashboard-container):
     28        (.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard-container):
     29        (.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container):
     30        (.toolbar.normal-size.icon-and-label-vertical .dashboard-container): Deleted.
     31        (.toolbar.small-size.icon-and-label-horizontal .dashboard-container): Deleted.
     32        (.toolbar.normal-size.icon-and-label-horizontal .dashboard-container): Deleted.
     33        * UserInterface/Views/DataGrid.css:
     34        (.data-grid :matches(th, td):not(:last-child)):
     35        (.data-grid th:matches(.sort-ascending, .sort-descending)):
     36        (.data-grid :matches(th, td) > div):
     37        (.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child):
     38        (.data-grid tr:matches(.selected, :hover) .go-to-arrow):
     39        (.data-grid :-webkit-any(th, td):not(:last-child)): Deleted.
     40        (.data-grid th:-webkit-any(.sort-ascending, .sort-descending)): Deleted.
     41        (.data-grid :-webkit-any(th, td) > div): Deleted.
     42        (.data-grid th:-webkit-any(.sort-ascending, .sort-descending) > div:first-child): Deleted.
     43        (.data-grid tr:-webkit-any(.selected, :hover) .go-to-arrow): Deleted.
     44        * UserInterface/Views/DebuggerDashboardView.css:
     45        (.toolbar.collapsed .dashboard.debugger > :not(.message, .navigation-bar )):
     46        (.toolbar.collapsed .dashboard.debugger > :not(.message):not(.navigation-bar )): Deleted.
     47        * UserInterface/Views/DefaultDashboardView.css:
     48        (body.web .toolbar.collapsed .dashboard.default > :matches(.time, .resourcesSize, .logs)):
     49        (body.javascript .toolbar .dashboard.default > :matches(.time, .resourcesSize, .resourcesCount)):
     50        (.toolbar:matches(.label-only, .small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal)) .dashboard.default > .item):
     51        (.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item):
     52        (body.web .toolbar.collapsed .dashboard.default > .logs): Deleted.
     53        (body.javascript .toolbar .dashboard.default > .resourcesCount): Deleted.
     54        (.toolbar.small-size.icon-and-label-horizontal .dashboard.default > .item): Deleted.
     55        (.toolbar.normal-size.icon-and-label-horizontal .dashboard.default > .item): Deleted.
     56        * UserInterface/Views/DetailsSection.css:
     57        (.details-section > .header > :matches(.node-link, .go-to-arrow)):
     58        (.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child)):
     59        (body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row.simple:last-child > *):
     60        (.details-section > .content > .group > .row:matches(.empty, .text)):
     61        (body.mac-platform.legacy .details-section > .content > .group > .row:matches(.empty, .text)):
     62        (.details-section > .header > .go-to-arrow): Deleted.
     63        (.details-section > .content > .group:nth-child(even) > .row.simple:first-child > *): Deleted.
     64        (body.mac-platform.legacy .details-section > .content > .group:last-child > .row.simple:last-child > *): Deleted.
     65        (.details-section > .content > .group > .row.text): Deleted.
     66        (body.mac-platform.legacy .details-section > .content > .group > .row.text): Deleted.
     67        * UserInterface/Views/FindBanner.css:
     68        (:matches(.find-banner, .supports-find-banner).no-find-banner-transition):
     69        (.supports-find-banner.no-find-banner-transition): Deleted.
     70        * UserInterface/Views/FlexibleSpaceNavigationItem.css:
     71        (:matches(.navigation-bar, .toolbar) .item.flexible-space):
     72        (.toolbar .item.flexible-space): Deleted.
     73
    1742014-11-19  Joseph Pecoraro  <pecoraro@apple.com>
    275
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.css

    r173707 r176494  
    6565body.mac-platform.legacy .style-declaration-section:first-child,
    6666body.mac-platform.legacy div:not(.style-declaration-section) + .style-declaration-section,
    67 body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section.last-in-group,
    68 body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:last-child {
     67body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:matches(.last-in-group, :last-child) {
    6968    box-shadow: rgba(0, 0, 0, 0.3) 0 1px 3px 1px;
    7069}
     
    122121}
    123122
    124 .style-declaration-section.locked > .header > .selector,
    125 .style-declaration-section.selector-locked > .header > .selector {
     123.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector {
    126124    -webkit-user-modify: read-only;
    127125}
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.css

    r174631 r176494  
    6161}
    6262
    63 .css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property):not(.CodeMirror-widget):not(.cm-comment):not(.cm-tab),
    64 .css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.disabled,
    65 .css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.invalid,
    66 .css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.other-vendor,
    67 .css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited,
    68 .css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden {
     63.css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property, .CodeMirror-widget, .cm-comment, .cm-tab),
     64.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.disabled, .invalid, .other-vendor, .not-inherited, .overridden) {
    6965    text-decoration: line-through;
    7066    -webkit-text-stroke-width: 0.000000000000001px; /* A hack to get a different line-through color. */
     
    7268}
    7369
    74 .css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property):not(.CodeMirror-widget):not(.cm-comment):not(.cm-tab),
     70.css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property, .CodeMirror-widget, .cm-comment, .cm-tab),
    7571.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.invalid {
    7672    -webkit-text-stroke-color: rgba(255, 0, 0, 0.6);
    7773}
    7874
    79 .css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.implicit,
    80 .css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited {
     75.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited) {
    8176    opacity: 0.5;
    8277}
    8378
    84 .css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.disabled,
    85 .css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.other-vendor,
    86 .css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.not-inherited,
    87 .css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.overridden {
     79.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property:matches(.disabled, .other-vendor, .not-inherited, .overridden) {
    8880    -webkit-text-stroke-color: rgba(0, 0, 0, 0.3);
    8981}
    9082
    91 .css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line span:not(.css-style-declaration-property):not(.CodeMirror-widget):not(.cm-comment):not(.cm-tab),
     83.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line span:not(.css-style-declaration-property, .CodeMirror-widget, .cm-comment, .cm-tab),
    9284.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.invalid {
    9385    text-decoration: none;
  • trunk/Source/WebInspectorUI/UserInterface/Views/ControlToolbarItem.css

    r173715 r176494  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4141}
    4242
    43 .toolbar.icon-and-label-horizontal .item.control,
    44 .toolbar.icon-only .item.control {
     43.toolbar:matches(.icon-and-label-horizontal, .icon-only) .item.control {
    4544    padding: 0 2px;
    4645}
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.css

    r172399 r176494  
    3232}
    3333
    34 .content-view.dom-storage > .data-grid tr.duplicate-key td.key-column,
    35 .content-view.dom-storage > .data-grid tr.missing-key td.key-column,
     34.content-view.dom-storage > .data-grid tr:matches(.duplicate-key, .missing-key) td.key-column,
    3635.content-view.dom-storage > .data-grid tr.missing-value td.value-column {
    3736    background-color: #fee;
    3837}
    3938
    40 .content-view.dom-storage > .data-grid:focus tr.selected.duplicate-key td.key-column,
    41 .content-view.dom-storage > .data-grid:focus tr.selected.missing-key td.key-column,
     39.content-view.dom-storage > .data-grid:focus tr.selected:matches(.duplicate-key, .missing-key) td.key-column,
    4240.content-view.dom-storage > .data-grid:focus tr.selected.missing-value td.value-column {
    4341    background-color: #daa;
  • trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css

    r172526 r176494  
    6464}
    6565
    66 .toolbar.small-size.icon-and-label-vertical .dashboard-container,
    67 .toolbar.normal-size.icon-and-label-vertical .dashboard-container {
     66.toolbar.icon-and-label-vertical:matches(.small-size, .normal-size) .dashboard-container {
    6867    margin-top: 6px;
    6968}
     
    7271
    7372.toolbar.label-only .dashboard-container,
    74 .toolbar.small-size.icon-only .dashboard-container,
    75 .toolbar.small-size.icon-and-label-vertical .dashboard-container,
    76 .toolbar.small-size.icon-and-label-horizontal .dashboard-container {
     73.toolbar.small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container {
    7774    height: 22px;
    7875}
     
    8077/* Styles for the fairly short style, one row with quite a bit of y-margin */
    8178
    82 .toolbar.normal-size.icon-only .dashboard-container,
    83 .toolbar.normal-size.icon-and-label-vertical .dashboard-container,
    84 .toolbar.normal-size.icon-and-label-horizontal .dashboard-container {
     79.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container {
    8580    height: 30px;
    8681}
  • trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css

    r172399 r176494  
    8787}
    8888
    89 .data-grid :-webkit-any(th, td):not(:last-child) {
     89.data-grid :matches(th, td):not(:last-child) {
    9090    border-right: 1px solid rgb(179, 179, 179);
    9191}
     
    9595}
    9696
    97 .data-grid th:-webkit-any(.sort-ascending, .sort-descending) {
     97.data-grid th:matches(.sort-ascending, .sort-descending) {
    9898    background-color: rgb(230, 230, 230);
    9999}
     
    151151}
    152152
    153 .data-grid :-webkit-any(th, td) > div {
     153.data-grid :matches(th, td) > div {
    154154    white-space: nowrap;
    155155    text-overflow: ellipsis;
     
    169169}
    170170
    171 .data-grid th:-webkit-any(.sort-ascending, .sort-descending) > div:first-child {
     171.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child {
    172172    padding-right: 12px;
    173173}
     
    299299}
    300300
    301 .data-grid tr:-webkit-any(.selected, :hover) .go-to-arrow {
     301.data-grid tr:matches(.selected, :hover) .go-to-arrow {
    302302    display: block;
    303303}
  • trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.css

    r173715 r176494  
    131131}
    132132
    133 .toolbar.collapsed .dashboard.debugger > :not(.message):not(.navigation-bar ) {
     133.toolbar.collapsed .dashboard.debugger > :not(.message, .navigation-bar) {
    134134    display: none;
    135135}
  • trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.css

    r173715 r176494  
    2424 */
    2525
    26 body.web .toolbar.collapsed .dashboard.default > .time,
    27 body.web .toolbar.collapsed .dashboard.default > .resourcesSize,
    28 body.web .toolbar.collapsed .dashboard.default > .logs {
     26body.web .toolbar.collapsed .dashboard.default > :matches(.time, .resourcesSize, .logs) {
    2927    display: none;
    3028}
    3129
    32 body.javascript .toolbar .dashboard.default > .time,
    33 body.javascript .toolbar .dashboard.default > .resourcesSize,
    34 body.javascript .toolbar .dashboard.default > .resourcesCount {
     30body.javascript .toolbar .dashboard.default > :matches(.time, .resourcesSize, .resourcesCount) {
    3531    display: none;
    3632}
     
    217213
    218214.toolbar.label-only .dashboard.default > .item,
    219 .toolbar.small-size.icon-only .dashboard.default > .item,
    220 .toolbar.small-size.icon-and-label-vertical .dashboard.default > .item,
    221 .toolbar.small-size.icon-and-label-horizontal .dashboard.default > .item {
     215.toolbar.small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item {
    222216    margin: 1px 0;
    223217}
     
    225219/* Styles for the fairly short style, one row with quite a bit of y-margin */
    226220
    227 .toolbar.normal-size.icon-only .dashboard.default > .item,
    228 .toolbar.normal-size.icon-and-label-vertical .dashboard.default > .item,
    229 .toolbar.normal-size.icon-and-label-horizontal .dashboard.default > .item {
     221.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item {
    230222    margin: 4px 0;
    231223}
  • trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css

    r175599 r176494  
    168168}
    169169
    170 .details-section > .header > .node-link,
    171 .details-section > .header > .go-to-arrow {
     170.details-section > .header > :matches(.node-link, .go-to-arrow) {
    172171    float: right;
    173172}
     
    211210}
    212211
    213 .details-section > .content > .group:nth-child(even) > .row:not(.simple):first-child,
    214 .details-section > .content > .group:nth-child(even) > .row.simple:first-child > * {
     212.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child) {
    215213    border-top: 1px solid rgb(179, 179, 179);
    216214}
    217215
    218 body.mac-platform.legacy .details-section > .content > .group:nth-child(even) > .row:not(.simple):last-child,
    219 body.mac-platform.legacy .details-section > .content > .group:last-child > .row:not(.simple):last-child,
    220 body.mac-platform.legacy .details-section > .content > .group:nth-child(even) > .row.simple:last-child > *,
    221 body.mac-platform.legacy .details-section > .content > .group:last-child > .row.simple:last-child > * {
     216body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row:not(.simple):last-child,
     217body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row.simple:last-child > * {
    222218    border-bottom: 1px solid rgb(179, 179, 179);
    223219}
     
    299295}
    300296
    301 .details-section > .content > .group > .row.empty,
    302 .details-section > .content > .group > .row.text {
     297.details-section > .content > .group > .row:matches(.empty, .text) {
    303298    padding: 0 6px 7px 6px;
    304299    text-align: center;
     
    306301}
    307302
    308 body.mac-platform.legacy .details-section > .content > .group > .row.empty,
    309 body.mac-platform.legacy .details-section > .content > .group > .row.text {
     303body.mac-platform.legacy .details-section > .content > .group > .row:matches(.empty, .text) {
    310304    padding: 6px;
    311305}
  • trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css

    r172241 r176494  
    5050}
    5151
    52 .find-banner.no-find-banner-transition,
    53 .supports-find-banner.no-find-banner-transition {
     52.no-find-banner-transition:matches(.find-banner, .supports-find-banner) {
    5453    transition-duration: 0 !important;
    5554}
  • trunk/Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css

    r173707 r176494  
    2424 */
    2525
    26 .navigation-bar .item.flexible-space,
    27 .toolbar .item.flexible-space {
     26:matches(.navigation-bar, .toolbar) .item.flexible-space {
    2827    flex: 1;
    2928}
Note: See TracChangeset for help on using the changeset viewer.