Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 13093)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 13094)
@@ -508,4 +508,16 @@
 
         /**
+         * Returns the OSM id of the object's parent.
+         * <p>
+         * Parent must be matched by parent selector.
+         * @param env the environment
+         * @return the OSM id of the object's parent, if available, or {@code null}
+         * @see OsmPrimitive#getUniqueId()
+         */
+        public static long parent_osm_id(final Environment env) { // NO_UCD (unused code)
+            return env.parent == null ? null : env.parent.getUniqueId();
+        }
+
+        /**
          * Determines whether the object has a tag with the given key.
          * @param env the environment
