Web Inspector: Pseudo-element style ordering is wrong for pseudo-styles on unique...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 21:57:32 +0000 (21:57 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 21:57:32 +0000 (21:57 +0000)
commit6c67a61fca0c5ef2d61cf030b75e4f9354d478e8
tree23b0f649355f16137514cf8aec10f44ca6bae504
parent475dfadc66d556440a8cc890a587ea50e13ba96e
Web Inspector: Pseudo-element style ordering is wrong for pseudo-styles on unique selectors
https://bugs.webkit.org/show_bug.cgi?id=146804

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.selectorIsGreater):
Loops through the selectors in a rule to check if their specificity is greater than a given selector's specificity.
* UserInterface/Models/CSSSelector.js:
(WebInspector.CSSSelector.prototype.isGreaterThan):
Determines if the given selector's specificity is greater than this selector's specificity.
(WebInspector.CSSSelector):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
If the pseudo-element selector's specificity is greater than the current selector's
specificity, create the pseudo-element's section and add it before the current style.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/CSSRule.js
Source/WebInspectorUI/UserInterface/Models/CSSSelector.js
Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js