- Revision
- 176494
- Author
- benja...@webkit.org
- Date
- 2014-11-21 18:06:47 -0800 (Fri, 21 Nov 2014)
Log 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 <bpoul...@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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (176493 => 176494)
--- trunk/Source/WebCore/ChangeLog 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/ChangeLog 2014-11-22 02:06:47 UTC (rev 176494)
@@ -1,3 +1,30 @@
+2014-11-21 Benjamin Poulain <bpoul...@apple.com>
+
+ Start using the new :not() and :matches() in the Web Inspector
+ https://bugs.webkit.org/show_bug.cgi?id=138978
+
+ Reviewed by Joseph Pecoraro.
+
+ 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):
+
2014-11-21 Chris Dumez <cdu...@apple.com>
Unreviewed, iOS build fix after r176462.
Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (176493 => 176494)
--- trunk/Source/WebCore/css/CSSGrammar.y.in 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in 2014-11-22 02:06:47 UTC (rev 176494)
@@ -57,13 +57,13 @@
case ANYFUNCTION:
case NOTFUNCTION:
case CALCFUNCTION:
- case MINFUNCTION:
+ case MATCHESFUNCTION:
case MAXFUNCTION:
+ case MINFUNCTION:
case NTHCHILDFUNCTIONS:
case NTHCHILDSELECTORSEPARATOR:
#if ENABLE_CSS_SELECTORS_LEVEL4
case LANGFUNCTION:
- case MATCHESFUNCTION:
case ROLEFUNCTION:
#endif
case UNICODERANGE:
@@ -226,13 +226,13 @@
%token <string> ANYFUNCTION
%token <string> NOTFUNCTION
%token <string> CALCFUNCTION
-%token <string> MINFUNCTION
+%token <string> MATCHESFUNCTION
%token <string> MAXFUNCTION
+%token <string> MINFUNCTION
%token <string> NTHCHILDFUNCTIONS
#if ENABLE_CSS_SELECTORS_LEVEL4
%token <string> LANGFUNCTION
-%token <string> MATCHESFUNCTION
%token <string> ROLEFUNCTION
#endif
@@ -1363,6 +1363,17 @@
$$ = selector.release();
}
}
+ | ':' MATCHESFUNCTION maybe_space nested_selector_list maybe_space ')' {
+ $$ = nullptr;
+ if ($4) {
+ auto selector = std::make_unique<CSSParserSelector>();
+ selector->setMatch(CSSSelector::PseudoClass);
+ selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
+ selector->setPseudoClassValue($2);
+ if (selector->pseudoClassType() == CSSSelector::PseudoClassMatches)
+ $$ = selector.release();
+ }
+ }
#if ENABLE_CSS_SELECTORS_LEVEL4
| ':' LANGFUNCTION maybe_space comma_separated_identifiers maybe_space ')' {
@@ -1377,18 +1388,6 @@
}
}
- | ':' MATCHESFUNCTION maybe_space nested_selector_list maybe_space ')' {
- $$ = nullptr;
- if ($4) {
- auto selector = std::make_unique<CSSParserSelector>();
- selector->setMatch(CSSSelector::PseudoClass);
- selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
- selector->setPseudoClassValue($2);
- if (selector->pseudoClassType() == CSSSelector::PseudoClassMatches)
- $$ = selector.release();
- }
- }
-
| ':' ROLEFUNCTION maybe_space IDENT maybe_space ')' {
$$ = nullptr;
auto selector = std::make_unique<CSSParserSelector>();
@@ -1483,9 +1482,7 @@
}
$$ = selector.release();
}
-
// Definition of :not().
-#if ENABLE_CSS_SELECTORS_LEVEL4
| ':' NOTFUNCTION maybe_space nested_selector_list maybe_space ')' {
$$ = nullptr;
if ($4 && selectorListDoesNotMatchAnyPseudoElement($4)) {
@@ -1497,21 +1494,6 @@
$$ = selector.release();
}
}
-#else
- | ':' NOTFUNCTION maybe_space compound_selector maybe_space ')' {
- std::unique_ptr<CSSParserSelector> selector($4);
- $$ = nullptr;
- if (selector && selector->isSimple()) {
- $$ = new CSSParserSelector;
- $$->setMatch(CSSSelector::PseudoClass);
-
- Vector<std::unique_ptr<CSSParserSelector>> selectorVector;
- selectorVector.append(WTF::move(selector));
- $$->adoptSelectorVector(selectorVector);
- $$->setPseudoClassValue($2);
- }
- }
-#endif
;
declaration_list:
@@ -1889,9 +1871,9 @@
invalid_parentheses_block: opening_parenthesis error_recovery closing_parenthesis;
opening_parenthesis:
- '(' | FUNCTION | CALCFUNCTION | MINFUNCTION | MAXFUNCTION | ANYFUNCTION | NOTFUNCTION
+ '(' | FUNCTION | CALCFUNCTION | MATCHESFUNCTION | MAXFUNCTION | MINFUNCTION | ANYFUNCTION | NOTFUNCTION
#if ENABLE_CSS_SELECTORS_LEVEL4
- | LANGFUNCTION | MATCHESFUNCTION | ROLEFUNCTION
+ | LANGFUNCTION | ROLEFUNCTION
#endif
#if ENABLE_VIDEO_TRACK
| CUEFUNCTION
Modified: trunk/Source/WebCore/css/CSSParser.cpp (176493 => 176494)
--- trunk/Source/WebCore/css/CSSParser.cpp 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2014-11-22 02:06:47 UTC (rev 176494)
@@ -10711,14 +10711,12 @@
#endif
return false;
-#if ENABLE(CSS_SELECTORS_LEVEL4)
case 7:
if (isEqualToCSSIdentifier(name, "matches")) {
m_token = MATCHESFUNCTION;
return true;
}
return false;
-#endif
case 9:
if (isEqualToCSSIdentifier(name, "nth-child")) {
Modified: trunk/Source/WebCore/css/CSSSelector.cpp (176493 => 176494)
--- trunk/Source/WebCore/css/CSSSelector.cpp 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/css/CSSSelector.cpp 2014-11-22 02:06:47 UTC (rev 176494)
@@ -89,7 +89,6 @@
case CSSSelector::PagePseudoClass:
break;
case CSSSelector::PseudoClass:
-#if ENABLE(CSS_SELECTORS_LEVEL4)
if (simpleSelector.pseudoClassType() == CSSSelector::PseudoClassMatches) {
ASSERT_WITH_MESSAGE(simpleSelector.selectorList() && simpleSelector.selectorList()->first(), "The parser should never generate a valid selector for an empty :matches().");
if (!isComputingMaximumSpecificity)
@@ -102,11 +101,6 @@
return maxSpecificity(*simpleSelector.selectorList());
}
FALLTHROUGH;
-#else
- if (simpleSelector.pseudoClassType() == CSSSelector::PseudoClassNot && simpleSelector.selectorList())
- return simpleSelector.selectorList()->first()->simpleSelectorSpecificity();
- FALLTHROUGH;
-#endif
case CSSSelector::Exact:
case CSSSelector::Class:
case CSSSelector::Set:
@@ -136,7 +130,6 @@
static unsigned simpleSelectorFunctionalPseudoClassStaticSpecificity(const CSSSelector& simpleSelector, bool& ok)
{
-#if ENABLE(CSS_SELECTORS_LEVEL4)
if (simpleSelector.match() == CSSSelector::PseudoClass) {
if (simpleSelector.pseudoClassType() == CSSSelector::PseudoClassMatches) {
const CSSSelectorList& selectorList = *simpleSelector.selectorList();
@@ -157,7 +150,6 @@
return initialSpecificity;
}
}
-#endif
return 0;
}
@@ -354,6 +346,7 @@
str.appendLiteral(", ");
}
}
+#endif
static void appendSelectorList(StringBuilder& str, const CSSSelectorList* selectorList)
{
@@ -364,7 +357,6 @@
str.append(subSelector->selectorText());
}
}
-#endif
String CSSSelector::selectorText(const String& rightSide) const
{
@@ -520,12 +512,7 @@
break;
case CSSSelector::PseudoClassNot:
str.appendLiteral(":not(");
-#if ENABLE(CSS_SELECTORS_LEVEL4)
appendSelectorList(str, cs->selectorList());
-#else
- if (const CSSSelectorList* selectorList = cs->selectorList())
- str.append(selectorList->first()->selectorText());
-#endif
str.append(')');
break;
case CSSSelector::PseudoClassNthChild:
@@ -571,13 +558,13 @@
case CSSSelector::PseudoClassOptional:
str.appendLiteral(":optional");
break;
-#if ENABLE(CSS_SELECTORS_LEVEL4)
case CSSSelector::PseudoClassMatches: {
str.appendLiteral(":matches(");
appendSelectorList(str, cs->selectorList());
str.append(')');
break;
}
+#if ENABLE(CSS_SELECTORS_LEVEL4)
case CSSSelector::PseudoClassPlaceholderShown:
str.appendLiteral(":placeholder-shown");
break;
Modified: trunk/Source/WebCore/css/CSSSelector.h (176493 => 176494)
--- trunk/Source/WebCore/css/CSSSelector.h 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/css/CSSSelector.h 2014-11-22 02:06:47 UTC (rev 176494)
@@ -122,9 +122,9 @@
PseudoClassDisabled,
PseudoClassOptional,
#if ENABLE(CSS_SELECTORS_LEVEL4)
- PseudoClassMatches,
PseudoClassPlaceholderShown,
#endif
+ PseudoClassMatches,
PseudoClassRequired,
PseudoClassReadOnly,
PseudoClassReadWrite,
Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (176493 => 176494)
--- trunk/Source/WebCore/css/SelectorChecker.cpp 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp 2014-11-22 02:06:47 UTC (rev 176494)
@@ -576,12 +576,6 @@
if (selector->pseudoClassType() == CSSSelector::PseudoClassNot) {
const CSSSelectorList* selectorList = selector->selectorList();
-#if !ENABLE(CSS_SELECTORS_LEVEL4)
- // FIXME: We probably should fix the parser and make it never produce :not rules with missing selector list.
- if (!selectorList)
- return false;
-#endif
-
for (const CSSSelector* subselector = selectorList->first(); subselector; subselector = CSSSelectorList::next(subselector)) {
CheckingContextWithStatus subcontext(context);
subcontext.inFunctionalPseudoClass = true;
@@ -591,30 +585,12 @@
PseudoIdSet ignoreDynamicPseudo;
unsigned ignoredSpecificity;
-#if ENABLE(CSS_SELECTORS_LEVEL4)
if (matchRecursively(subcontext, ignoreDynamicPseudo, ignoredSpecificity).match == Match::SelectorMatches) {
ASSERT(!ignoreDynamicPseudo);
return false;
}
-#else
- if (subcontext.selector->match() == CSSSelector::PseudoClass) {
- // :not cannot nest. I don't really know why this is a
- // restriction in CSS3, but it is, so let's honor it.
- // the parser enforces that this never occurs
- ASSERT(subcontext.selector->pseudoClassType() != CSSSelector::PseudoClassNot);
- // We select between :visited and :link when applying. We don't know which one applied (or not) yet.
- if (subcontext.selector->pseudoClassType() == CSSSelector::PseudoClassVisited)
- return true;
- }
- // Since :not cannot contain pseudo elements, there's no effect on matchType.
- MatchType ignoreMatchType = MatchType::Element;
- if (!checkOne(subcontext, ignoreDynamicPseudo, ignoreMatchType, ignoredSpecificity))
- return true;
-#endif
}
-#if ENABLE(CSS_SELECTORS_LEVEL4)
return true;
-#endif
} else if (context.hasScrollbarPseudo) {
// CSS scrollbars match a specific subset of pseudo classes, and they have specialized rules for each
// (since there are no elements involved except with window-inactive).
@@ -722,7 +698,6 @@
return isFirstOfType(element, element->tagQName(), context.resolvingMode == Mode::ResolvingStyle) && isLastOfType(element, element->tagQName());
}
break;
-#if ENABLE(CSS_SELECTORS_LEVEL4)
case CSSSelector::PseudoClassMatches:
{
bool hasMatchedAnything = false;
@@ -754,7 +729,7 @@
}
return hasMatchedAnything;
}
-
+#if ENABLE(CSS_SELECTORS_LEVEL4)
case CSSSelector::PseudoClassPlaceholderShown:
if (is<HTMLTextFormControlElement>(*element)) {
if (context.resolvingMode == Mode::ResolvingStyle) {
@@ -1120,26 +1095,6 @@
for (; selector; selector = selector->tagHistory()) {
if (selector->match() == CSSSelector::PseudoClass) {
switch (selector->pseudoClassType()) {
-#if! ENABLE(CSS_SELECTORS_LEVEL4)
- case CSSSelector::PseudoClassNot:
- {
- // :not(:visited) is equivalent to :link. Parser enforces that :not can't nest.
- const CSSSelectorList* selectorList = selector->selectorList();
- if (!selectorList)
- break;
-
- for (const CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = subSelector->tagHistory()) {
- if (subSelector->match() == CSSSelector::PseudoClass) {
- CSSSelector::PseudoClassType subType = subSelector->pseudoClassType();
- if (subType == CSSSelector::PseudoClassVisited)
- linkMatchType &= ~SelectorChecker::MatchVisited;
- else if (subType == CSSSelector::PseudoClassLink)
- linkMatchType &= ~SelectorChecker::MatchLink;
- }
- }
- }
- break;
-#endif
case CSSSelector::PseudoClassLink:
linkMatchType &= ~SelectorChecker::MatchVisited;
break;
Modified: trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in (176493 => 176494)
--- trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in 2014-11-22 02:06:47 UTC (rev 176494)
@@ -34,6 +34,7 @@
last-child
last-of-type
link
+matches(
no-button
not(
nth-child(
@@ -46,7 +47,6 @@
out-of-range
#if ENABLE(CSS_SELECTORS_LEVEL4)
placeholder-shown
-matches(
#endif
read-only
read-write
Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (176493 => 176494)
--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2014-11-22 02:06:47 UTC (rev 176494)
@@ -756,7 +756,6 @@
#endif
}
-#if ENABLE(CSS_SELECTORS_LEVEL4)
case CSSSelector::PseudoClassMatches:
{
SelectorList matchesList;
@@ -804,7 +803,6 @@
return functionType;
}
-#endif
case CSSSelector::PseudoClassUnknown:
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebInspectorUI/ChangeLog (176493 => 176494)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-11-22 02:06:47 UTC (rev 176494)
@@ -1,3 +1,76 @@
+2014-11-21 Benjamin Poulain <bpoul...@apple.com>
+
+ Start using the new :not() and :matches() in the Web Inspector
+ https://bugs.webkit.org/show_bug.cgi?id=138978
+
+ Reviewed by Joseph Pecoraro.
+
+ 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.
+
2014-11-19 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: LayoutTests/inspector should not have localStorage side effects
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -64,8 +64,7 @@
body.mac-platform.legacy .style-declaration-section:first-child,
body.mac-platform.legacy div:not(.style-declaration-section) + .style-declaration-section,
-body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section.last-in-group,
-body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:last-child {
+body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:matches(.last-in-group, :last-child) {
box-shadow: rgba(0, 0, 0, 0.3) 0 1px 3px 1px;
}
@@ -121,8 +120,7 @@
color: black;
}
-.style-declaration-section.locked > .header > .selector,
-.style-declaration-section.selector-locked > .header > .selector {
+.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector {
-webkit-user-modify: read-only;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -60,35 +60,27 @@
display: none;
}
-.css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property):not(.CodeMirror-widget):not(.cm-comment):not(.cm-tab),
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.disabled,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.invalid,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.other-vendor,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden {
+.css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property, .CodeMirror-widget, .cm-comment, .cm-tab),
+.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.disabled, .invalid, .other-vendor, .not-inherited, .overridden) {
text-decoration: line-through;
-webkit-text-stroke-width: 0.000000000000001px; /* A hack to get a different line-through color. */
-webkit-text-stroke-color: rgba(0, 0, 0, 0.6);
}
-.css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property):not(.CodeMirror-widget):not(.cm-comment):not(.cm-tab),
+.css-style-text-editor > .CodeMirror .CodeMirror-lines pre > span span:not(.css-style-declaration-property, .CodeMirror-widget, .cm-comment, .cm-tab),
.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.invalid {
-webkit-text-stroke-color: rgba(255, 0, 0, 0.6);
}
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.implicit,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited {
+.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property:matches(.implicit, .not-inherited) {
opacity: 0.5;
}
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.disabled,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.other-vendor,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.not-inherited,
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.overridden {
+.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property:matches(.disabled, .other-vendor, .not-inherited, .overridden) {
-webkit-text-stroke-color: rgba(0, 0, 0, 0.3);
}
-.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line span:not(.css-style-declaration-property):not(.CodeMirror-widget):not(.cm-comment):not(.cm-tab),
+.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line span:not(.css-style-declaration-property, .CodeMirror-widget, .cm-comment, .cm-tab),
.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.invalid {
text-decoration: none;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ControlToolbarItem.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ControlToolbarItem.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ControlToolbarItem.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,8 +40,7 @@
padding: 2px;
}
-.toolbar.icon-and-label-horizontal .item.control,
-.toolbar.icon-only .item.control {
+.toolbar:matches(.icon-and-label-horizontal, .icon-only) .item.control {
padding: 0 2px;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -31,14 +31,12 @@
bottom: 0;
}
-.content-view.dom-storage > .data-grid tr.duplicate-key td.key-column,
-.content-view.dom-storage > .data-grid tr.missing-key td.key-column,
+.content-view.dom-storage > .data-grid tr:matches(.duplicate-key, .missing-key) td.key-column,
.content-view.dom-storage > .data-grid tr.missing-value td.value-column {
background-color: #fee;
}
-.content-view.dom-storage > .data-grid:focus tr.selected.duplicate-key td.key-column,
-.content-view.dom-storage > .data-grid:focus tr.selected.missing-key td.key-column,
+.content-view.dom-storage > .data-grid:focus tr.selected:matches(.duplicate-key, .missing-key) td.key-column,
.content-view.dom-storage > .data-grid:focus tr.selected.missing-value td.value-column {
background-color: #daa;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -63,25 +63,20 @@
width: 175px;
}
-.toolbar.small-size.icon-and-label-vertical .dashboard-container,
-.toolbar.normal-size.icon-and-label-vertical .dashboard-container {
+.toolbar.icon-and-label-vertical:matches(.small-size, .normal-size) .dashboard-container {
margin-top: 6px;
}
/* Styles for the extra short style, one row with quite a small y-margin */
.toolbar.label-only .dashboard-container,
-.toolbar.small-size.icon-only .dashboard-container,
-.toolbar.small-size.icon-and-label-vertical .dashboard-container,
-.toolbar.small-size.icon-and-label-horizontal .dashboard-container {
+.toolbar.small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container {
height: 22px;
}
/* Styles for the fairly short style, one row with quite a bit of y-margin */
-.toolbar.normal-size.icon-only .dashboard-container,
-.toolbar.normal-size.icon-and-label-vertical .dashboard-container,
-.toolbar.normal-size.icon-and-label-horizontal .dashboard-container {
+.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard-container {
height: 30px;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -86,7 +86,7 @@
overflow: hidden;
}
-.data-grid :-webkit-any(th, td):not(:last-child) {
+.data-grid :matches(th, td):not(:last-child) {
border-right: 1px solid rgb(179, 179, 179);
}
@@ -94,7 +94,7 @@
background-color: rgb(179, 179, 179);
}
-.data-grid th:-webkit-any(.sort-ascending, .sort-descending) {
+.data-grid th:matches(.sort-ascending, .sort-descending) {
background-color: rgb(230, 230, 230);
}
@@ -150,7 +150,7 @@
border-right-color: rgb(53, 109, 189);
}
-.data-grid :-webkit-any(th, td) > div {
+.data-grid :matches(th, td) > div {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
@@ -168,7 +168,7 @@
position: relative;
}
-.data-grid th:-webkit-any(.sort-ascending, .sort-descending) > div:first-child {
+.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child {
padding-right: 12px;
}
@@ -298,7 +298,7 @@
margin-left: 2px;
}
-.data-grid tr:-webkit-any(.selected, :hover) .go-to-arrow {
+.data-grid tr:matches(.selected, :hover) .go-to-arrow {
display: block;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -130,7 +130,7 @@
overflow: hidden;
}
-.toolbar.collapsed .dashboard.debugger > :not(.message):not(.navigation-bar ) {
+.toolbar.collapsed .dashboard.debugger > :not(.message, .navigation-bar) {
display: none;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -23,15 +23,11 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-body.web .toolbar.collapsed .dashboard.default > .time,
-body.web .toolbar.collapsed .dashboard.default > .resourcesSize,
-body.web .toolbar.collapsed .dashboard.default > .logs {
+body.web .toolbar.collapsed .dashboard.default > :matches(.time, .resourcesSize, .logs) {
display: none;
}
-body._javascript_ .toolbar .dashboard.default > .time,
-body._javascript_ .toolbar .dashboard.default > .resourcesSize,
-body._javascript_ .toolbar .dashboard.default > .resourcesCount {
+body._javascript_ .toolbar .dashboard.default > :matches(.time, .resourcesSize, .resourcesCount) {
display: none;
}
@@ -216,16 +212,12 @@
/* Styles for the extra short style, one row with quite a small y-margin */
.toolbar.label-only .dashboard.default > .item,
-.toolbar.small-size.icon-only .dashboard.default > .item,
-.toolbar.small-size.icon-and-label-vertical .dashboard.default > .item,
-.toolbar.small-size.icon-and-label-horizontal .dashboard.default > .item {
+.toolbar.small-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item {
margin: 1px 0;
}
/* Styles for the fairly short style, one row with quite a bit of y-margin */
-.toolbar.normal-size.icon-only .dashboard.default > .item,
-.toolbar.normal-size.icon-and-label-vertical .dashboard.default > .item,
-.toolbar.normal-size.icon-and-label-horizontal .dashboard.default > .item {
+.toolbar.normal-size:matches(.icon-only, .icon-and-label-vertical, .icon-and-label-horizontal) .dashboard.default > .item {
margin: 4px 0;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -167,8 +167,7 @@
font-size: 10px;
}
-.details-section > .header > .node-link,
-.details-section > .header > .go-to-arrow {
+.details-section > .header > :matches(.node-link, .go-to-arrow) {
float: right;
}
@@ -210,15 +209,12 @@
background-color: rgb(222, 222, 222);
}
-.details-section > .content > .group:nth-child(even) > .row:not(.simple):first-child,
-.details-section > .content > .group:nth-child(even) > .row.simple:first-child > * {
+.details-section > .content > .group:nth-child(even) > .row:matches(.simple:first-child > *, :not(.simple):first-child) {
border-top: 1px solid rgb(179, 179, 179);
}
-body.mac-platform.legacy .details-section > .content > .group:nth-child(even) > .row:not(.simple):last-child,
-body.mac-platform.legacy .details-section > .content > .group:last-child > .row:not(.simple):last-child,
-body.mac-platform.legacy .details-section > .content > .group:nth-child(even) > .row.simple:last-child > *,
-body.mac-platform.legacy .details-section > .content > .group:last-child > .row.simple:last-child > * {
+body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row:not(.simple):last-child,
+body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row.simple:last-child > * {
border-bottom: 1px solid rgb(179, 179, 179);
}
@@ -298,15 +294,13 @@
word-break: break-all;
}
-.details-section > .content > .group > .row.empty,
-.details-section > .content > .group > .row.text {
+.details-section > .content > .group > .row:matches(.empty, .text) {
padding: 0 6px 7px 6px;
text-align: center;
color: gray;
}
-body.mac-platform.legacy .details-section > .content > .group > .row.empty,
-body.mac-platform.legacy .details-section > .content > .group > .row.text {
+body.mac-platform.legacy .details-section > .content > .group > .row:matches(.empty, .text) {
padding: 6px;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -49,8 +49,7 @@
transition-timing-function: ease-out;
}
-.find-banner.no-find-banner-transition,
-.supports-find-banner.no-find-banner-transition {
+.no-find-banner-transition:matches(.find-banner, .supports-find-banner) {
transition-duration: 0 !important;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css (176493 => 176494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css 2014-11-22 02:06:00 UTC (rev 176493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css 2014-11-22 02:06:47 UTC (rev 176494)
@@ -23,7 +23,6 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-.navigation-bar .item.flexible-space,
-.toolbar .item.flexible-space {
+:matches(.navigation-bar, .toolbar) .item.flexible-space {
flex: 1;
}