Index: chrome/content/elemHideEmulation.js
===================================================================
--- a/chrome/content/elemHideEmulation.js
+++ b/chrome/content/elemHideEmulation.js
@@ -284,16 +284,22 @@
     let actualPrefix = (prefix && !incompletePrefixRegexp.test(prefix)) ?
         prefix + " " : prefix;
     for (let style of styles)
       if (regexp.test(style.style))
         for (let subSelector of style.subSelectors)
         {
           if (subSelector == "*")
             subSelector = "";
+          else
+          {
+            let idx = subSelector.lastIndexOf("::");
+            if (idx != -1)
+              subSelector = subSelector.substr(0, idx);
+          }
           yield actualPrefix + subSelector;
         }
   },
 
   *getSelectors(prefix, subtree, styles)
   {
     for (let selector of this.findPropsSelectors(styles, prefix, this._regexp))
       yield [selector, subtree];
Index: test/browser/elemHideEmulation.js
===================================================================
--- a/test/browser/elemHideEmulation.js
+++ b/test/browser/elemHideEmulation.js
@@ -270,16 +270,31 @@
       {
         expectHidden(test, toHide);
         resolve();
       }, 4000);
     });
   }).catch(unexpectedError.bind(test)).then(() => test.done());
 };
 
+exports.testPseudoClassWithPropBeforeSelector = function(test)
+{
+  let parent = createElementWithStyle("{}");
+  let child = createElementWithStyle("{background-color: #000}", parent);
+  insertStyleRule(`#${child.id}::before {content: "publicite"}`);
+
+  applyElemHideEmulation(
+    ["div:-abp-properties(content: \"publicite\")"]
+  ).then(() =>
+  {
+    expectHidden(test, child);
+    expectVisible(test, parent);
+  }).catch(unexpectedError.bind(test)).then(() => test.done());
+};
+
 exports.testPseudoClassHasSelector = function(test)
 {
   let toHide = createElementWithStyle("{}");
   applyElemHideEmulation(
     ["div:-abp-has(div)"]
   ).then(() =>
   {
     expectVisible(test, toHide);
