<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204754] trunk/Source/WebInspectorUI</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204754">204754</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-08-22 21:47:27 -0700 (Mon, 22 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Add indicator to matched selector being a pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=160893

Patch by Devin Rousso &lt;dcrousso+webkit@gmail.com&gt; on 2016-08-22
Reviewed by Joseph Pecoraro.

Instead of using &quot;{}&quot; icons for CSS rules, use a &quot;P&quot; icon with the same coloring to identify
that the rule contains a pseudo-selector that is currently being applied to the selected element.

* UserInterface/Base/Utilities.js:
(Array.prototype.toggleIncludes):
Toggles whether or not to include the given value in the array based on its existence or a
&quot;force&quot; flag parameter.

* UserInterface/Images/StyleRuleAuthorPseudo.svg:
* UserInterface/Images/StyleRuleInspectorPseudo.svg:
* UserInterface/Images/StyleRuleUserAgentPseudo.svg:
* UserInterface/Images/StyleRuleUserPseudo.svg:

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.hasMatchedPseudoElementSelector):

* UserInterface/Models/CSSSelector.js:
(WebInspector.CSSSelector.prototype.isPseudoElementSelector):

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):

* UserInterface/Views/StyleRuleIcons.css:
(.author-style-rule-icon.pseudo-element-selector .icon):
(.user-style-rule-icon.pseudo-element-selector .icon):
(.user-agent-style-rule-icon.pseudo-element-selector .icon):
(.inspector-style-rule-icon.pseudo-element-selector .icon):

 * UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
(WebInspector.VisualStyleSelectorTreeItem.prototype.get iconClassName):
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseUtilitiesjs">trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsCSSRulejs">trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsCSSSelectorjs">trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsCSSStyleDeclarationSectionjs">trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsStyleRuleIconscss">trunk/Source/WebInspectorUI/UserInterface/Views/StyleRuleIcons.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleSelectorTreeItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleAuthorPseudosvg">trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleAuthorPseudo.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleInspectorPseudosvg">trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleInspectorPseudo.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleUserAgentPseudosvg">trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserAgentPseudo.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleUserPseudosvg">trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserPseudo.svg</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (204753 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-08-23 01:49:58 UTC (rev 204753)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-08-22  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
+
+        Web Inspector: Add indicator to matched selector being a pseudo-element
+        https://bugs.webkit.org/show_bug.cgi?id=160893
+
+        Reviewed by Joseph Pecoraro.
+
+        Instead of using &quot;{}&quot; icons for CSS rules, use a &quot;P&quot; icon with the same coloring to identify
+        that the rule contains a pseudo-selector that is currently being applied to the selected element.
+
+        * UserInterface/Base/Utilities.js:
+        (Array.prototype.toggleIncludes):
+        Toggles whether or not to include the given value in the array based on its existence or a
+        &quot;force&quot; flag parameter.
+
+        * UserInterface/Images/StyleRuleAuthorPseudo.svg:
+        * UserInterface/Images/StyleRuleInspectorPseudo.svg:
+        * UserInterface/Images/StyleRuleUserAgentPseudo.svg:
+        * UserInterface/Images/StyleRuleUserPseudo.svg:
+
+        * UserInterface/Models/CSSRule.js:
+        (WebInspector.CSSRule.prototype.hasMatchedPseudoElementSelector):
+
+        * UserInterface/Models/CSSSelector.js:
+        (WebInspector.CSSSelector.prototype.isPseudoElementSelector):
+
+        * UserInterface/Views/CSSStyleDeclarationSection.js:
+        (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
+
+        * UserInterface/Views/StyleRuleIcons.css:
+        (.author-style-rule-icon.pseudo-element-selector .icon):
+        (.user-style-rule-icon.pseudo-element-selector .icon):
+        (.user-agent-style-rule-icon.pseudo-element-selector .icon):
+        (.inspector-style-rule-icon.pseudo-element-selector .icon):
+
+         * UserInterface/Views/VisualStyleSelectorTreeItem.js:
+        (WebInspector.VisualStyleSelectorTreeItem):
+        (WebInspector.VisualStyleSelectorTreeItem.prototype.get iconClassName):
+        (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
+
</ins><span class="cx"> 2016-08-19  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Make an icon for Code Coverage Profiler
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseUtilitiesjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js (204753 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js        2016-08-23 01:49:58 UTC (rev 204753)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -469,6 +469,21 @@
</span><span class="cx">     }
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+Object.defineProperty(Array.prototype, &quot;toggleIncludes&quot;,
+{
+    value: function(value, force)
+    {
+        let exists = this.includes(value);
+        if (exists === !!force)
+            return;
+
+        if (exists)
+            this.remove(value);
+        else
+            this.push(value);
+    }
+});
+
</ins><span class="cx"> Object.defineProperty(Array.prototype, &quot;insertAtIndex&quot;,
</span><span class="cx"> {
</span><span class="cx">     value: function(value, index)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleAuthorPseudosvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleAuthorPseudo.svg (0 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleAuthorPseudo.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleAuthorPseudo.svg        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright © 2016 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;rgb(148, 183, 219)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(106, 136, 170)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2&quot;/&gt;
+    &lt;path fill=&quot;white&quot; d=&quot;M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 Z M 5 12 L 5 4 L 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906 8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(113, 146, 184)&quot; d=&quot;M 7.78125 6.679688 L 7.78125 6.113281 C 8.019531 6.136719 8.117188 6.1875 8.144531 6.203125 C 8.140625 6.210938 8.148438 6.242188 8.148438 6.292969 C 8.148438 6.441406 8.105469 6.496094 8.015625 6.566406 C 7.953125 6.613281 7.875 6.648438 7.78125 6.679688 M 8.042969 3 L 4 3 L 4 13 L 7.78125 13 L 7.78125 9.863281 C 8.988281 9.824219 9.96875 9.507812 10.707031 8.925781 C 11.550781 8.257812 12 7.289062 12 6.125 C 12 4.753906 11.402344 4.035156 10.902344 3.675781 C 10.265625 3.222656 9.332031 3 8.042969 3 M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 L 6.78125 7.769531 M 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906
  8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 L 5 12 L 5 4 L 8.042969 4&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleInspectorPseudosvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleInspectorPseudo.svg (0 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleInspectorPseudo.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleInspectorPseudo.svg        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright © 2016 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;rgb(165, 202, 164)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(118, 153, 116)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2&quot;/&gt;
+    &lt;path fill=&quot;white&quot; d=&quot;M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 Z M 5 12 L 5 4 L 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906 8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(128, 166, 126)&quot; d=&quot;M 7.78125 6.679688 L 7.78125 6.113281 C 8.019531 6.136719 8.117188 6.1875 8.144531 6.203125 C 8.140625 6.210938 8.148438 6.242188 8.148438 6.292969 C 8.148438 6.441406 8.105469 6.496094 8.015625 6.566406 C 7.953125 6.613281 7.875 6.648438 7.78125 6.679688 M 8.042969 3 L 4 3 L 4 13 L 7.78125 13 L 7.78125 9.863281 C 8.988281 9.824219 9.96875 9.507812 10.707031 8.925781 C 11.550781 8.257812 12 7.289062 12 6.125 C 12 4.753906 11.402344 4.035156 10.902344 3.675781 C 10.265625 3.222656 9.332031 3 8.042969 3 M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 L 6.78125 7.769531 M 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906
  8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 L 5 12 L 5 4 L 8.042969 4&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleUserAgentPseudosvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserAgentPseudo.svg (0 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserAgentPseudo.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserAgentPseudo.svg        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright © 2016 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;rgb(236, 151, 153)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(191, 109, 113)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2&quot;/&gt;
+    &lt;path fill=&quot;white&quot; d=&quot;M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 Z M 5 12 L 5 4 L 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906 8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(204, 116, 121)&quot; d=&quot;M 7.78125 6.679688 L 7.78125 6.113281 C 8.019531 6.136719 8.117188 6.1875 8.144531 6.203125 C 8.140625 6.210938 8.148438 6.242188 8.148438 6.292969 C 8.148438 6.441406 8.105469 6.496094 8.015625 6.566406 C 7.953125 6.613281 7.875 6.648438 7.78125 6.679688 M 8.042969 3 L 4 3 L 4 13 L 7.78125 13 L 7.78125 9.863281 C 8.988281 9.824219 9.96875 9.507812 10.707031 8.925781 C 11.550781 8.257812 12 7.289062 12 6.125 C 12 4.753906 11.402344 4.035156 10.902344 3.675781 C 10.265625 3.222656 9.332031 3 8.042969 3 M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 L 6.78125 7.769531 M 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906
  8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 L 5 12 L 5 4 L 8.042969 4&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesStyleRuleUserPseudosvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserPseudo.svg (0 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserPseudo.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/StyleRuleUserPseudo.svg        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright © 2016 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;rgb(246, 222, 146)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(204, 181, 108)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2&quot;/&gt;
+    &lt;path fill=&quot;white&quot; d=&quot;M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 Z M 5 12 L 5 4 L 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906 8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(216, 193, 115)&quot; d=&quot;M 7.78125 6.679688 L 7.78125 6.113281 C 8.019531 6.136719 8.117188 6.1875 8.144531 6.203125 C 8.140625 6.210938 8.148438 6.242188 8.148438 6.292969 C 8.148438 6.441406 8.105469 6.496094 8.015625 6.566406 C 7.953125 6.613281 7.875 6.648438 7.78125 6.679688 M 8.042969 3 L 4 3 L 4 13 L 7.78125 13 L 7.78125 9.863281 C 8.988281 9.824219 9.96875 9.507812 10.707031 8.925781 C 11.550781 8.257812 12 7.289062 12 6.125 C 12 4.753906 11.402344 4.035156 10.902344 3.675781 C 10.265625 3.222656 9.332031 3 8.042969 3 M 6.78125 7.769531 L 7.136719 7.769531 C 7.757812 7.769531 8.246094 7.636719 8.605469 7.371094 C 8.96875 7.105469 9.148438 6.746094 9.148438 6.292969 C 9.148438 5.496094 8.59375 5.097656 7.488281 5.097656 L 6.78125 5.097656 L 6.78125 7.769531 M 8.042969 4 C 9.105469 4 9.863281 4.164062 10.316406 4.488281 C 10.773438 4.816406 11 5.359375 11 6.125 C 11 6.988281 10.695312 7.660156 10.085938 8.144531 C 9.480469 8.625 8.628906
  8.863281 7.535156 8.863281 L 6.78125 8.863281 L 6.78125 12 L 5 12 L 5 4 L 8.042969 4&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsCSSRulejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js (204753 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js        2016-08-23 01:49:58 UTC (rev 204753)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -155,6 +155,14 @@
</span><span class="cx">         return this._matchedSelectorText;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    hasMatchedPseudoElementSelector()
+    {
+        if (this.nodeStyles &amp;&amp; this.nodeStyles.node &amp;&amp; this.nodeStyles.node.isPseudoElement())
+            return true;
+
+        return this.matchedSelectors.some((selector) =&gt; selector.isPseudoElementSelector());
+    }
+
</ins><span class="cx">     get style()
</span><span class="cx">     {
</span><span class="cx">         return this._style;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsCSSSelectorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js (204753 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js        2016-08-23 01:49:58 UTC (rev 204753)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -56,4 +56,9 @@
</span><span class="cx"> 
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><ins>+
+    isPseudoElementSelector()
+    {
+        return WebInspector.CSSStyleManager.PseudoElementNames.some((name) =&gt; this._text.includes(`:${name}`));
+    }
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsCSSStyleDeclarationSectionjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (204753 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js        2016-08-23 01:49:58 UTC (rev 204753)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -217,11 +217,16 @@
</span><span class="cx">             var matchedSelectorIndices = this._style.ownerRule.matchedSelectorIndices;
</span><span class="cx">             var alwaysMatch = !matchedSelectorIndices.length;
</span><span class="cx">             if (selectors.length) {
</span><ins>+                var hasMatchingPseudoElementSelector = false;
</ins><span class="cx">                 for (var i = 0; i &lt; selectors.length; ++i) {
</span><span class="cx">                     appendSelector.call(this, selectors[i], alwaysMatch || matchedSelectorIndices.includes(i));
</span><span class="cx">                     if (i &lt; selectors.length - 1)
</span><span class="cx">                         this._selectorElement.append(&quot;, &quot;);
</span><ins>+
+                    if (matchedSelectorIndices.includes(i) &amp;&amp; selectors[i].isPseudoElementSelector())
+                        hasMatchingPseudoElementSelector = true;
</ins><span class="cx">                 }
</span><ins>+                this._element.classList.toggle(WebInspector.CSSStyleDeclarationSection.PseudoElementSelectorStyleClassName, hasMatchingPseudoElementSelector);
</ins><span class="cx">             } else
</span><span class="cx">                 appendSelectorTextKnownToMatch.call(this, this._style.ownerRule.selectorText);
</span><span class="cx"> 
</span><span class="lines">@@ -670,6 +675,7 @@
</span><span class="cx"> WebInspector.CSSStyleDeclarationSection.SelectorLockedStyleClassName = &quot;selector-locked&quot;;
</span><span class="cx"> WebInspector.CSSStyleDeclarationSection.LastInGroupStyleClassName = &quot;last-in-group&quot;;
</span><span class="cx"> WebInspector.CSSStyleDeclarationSection.MatchedSelectorElementStyleClassName = &quot;matched&quot;;
</span><ins>+WebInspector.CSSStyleDeclarationSection.PseudoElementSelectorStyleClassName = &quot;pseudo-element-selector&quot;;
</ins><span class="cx"> 
</span><span class="cx"> WebInspector.CSSStyleDeclarationSection.AuthorStyleRuleIconStyleClassName = &quot;author-style-rule-icon&quot;;
</span><span class="cx"> WebInspector.CSSStyleDeclarationSection.UserStyleRuleIconStyleClassName = &quot;user-style-rule-icon&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsStyleRuleIconscss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StyleRuleIcons.css (204753 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/StyleRuleIcons.css        2016-08-23 01:49:58 UTC (rev 204753)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StyleRuleIcons.css        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -27,18 +27,34 @@
</span><span class="cx">     content: url(../Images/StyleRuleAuthor.svg);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.author-style-rule-icon.pseudo-element-selector .icon {
+    content: url(../Images/StyleRuleAuthorPseudo.svg);
+}
+
</ins><span class="cx"> .user-style-rule-icon .icon {
</span><span class="cx">     content: url(../Images/StyleRuleUser.svg);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.user-style-rule-icon.pseudo-element-selector .icon {
+    content: url(../Images/StyleRuleUserPseudo.svg);
+}
+
</ins><span class="cx"> .user-agent-style-rule-icon .icon {
</span><span class="cx">     content: url(../Images/StyleRuleUserAgent.svg);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.user-agent-style-rule-icon.pseudo-element-selector .icon {
+    content: url(../Images/StyleRuleUserAgentPseudo.svg);
+}
+
</ins><span class="cx"> .inspector-style-rule-icon .icon {
</span><span class="cx">     content: url(../Images/StyleRuleInspector.svg);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.inspector-style-rule-icon.pseudo-element-selector .icon {
+    content: url(../Images/StyleRuleInspectorPseudo.svg);
+}
+
</ins><span class="cx"> .inherited-style-rule-icon .icon {
</span><span class="cx">     content: url(../Images/StyleRuleInherited.svg);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleSelectorTreeItemjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js (204753 => 204754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js        2016-08-23 01:49:58 UTC (rev 204753)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js        2016-08-23 04:47:27 UTC (rev 204754)
</span><span class="lines">@@ -53,13 +53,17 @@
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        let iconClasses = [iconClassName];
+        if (style.ownerRule &amp;&amp; style.ownerRule.hasMatchedPseudoElementSelector())
+            iconClasses.push(WebInspector.CSSStyleDeclarationSection.PseudoElementSelectorStyleClassName);
+
</ins><span class="cx">         title = title.trim();
</span><span class="cx"> 
</span><del>-        super([&quot;visual-style-selector-item&quot;, iconClassName], title, subtitle, style);
</del><ins>+        super([&quot;visual-style-selector-item&quot;, ...iconClasses], title, subtitle, style);
</ins><span class="cx"> 
</span><span class="cx">         this._delegate = delegate;
</span><span class="cx"> 
</span><del>-        this._iconClassName = iconClassName;
</del><ins>+        this._iconClasses = iconClasses;
</ins><span class="cx">         this._lastValue = title;
</span><span class="cx">         this._enableEditing = true;
</span><span class="cx">         this._hasInvalidSelector = false;
</span><span class="lines">@@ -69,7 +73,7 @@
</span><span class="cx"> 
</span><span class="cx">     get iconClassName()
</span><span class="cx">     {
</span><del>-        return this._iconClassName;
</del><ins>+        return this._iconClasses.join(&quot; &quot;);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     get selectorText()
</span><span class="lines">@@ -272,6 +276,9 @@
</span><span class="cx"> 
</span><span class="cx">         this._iconElement.title = null;
</span><span class="cx">         this.mainTitleElement.title = null;
</span><ins>+
+        let hasMatchedPseudoElementSelector = this.representedObject.ownerRule &amp;&amp; this.representedObject.ownerRule.hasMatchedPseudoElementSelector();
+        this._iconClasses.toggleIncludes(WebInspector.CSSStyleDeclarationSection.PseudoElementSelectorStyleClassName, hasMatchedPseudoElementSelector);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _handleIconElementClicked(event)
</span></span></pre>
</div>
</div>

</body>
</html>