aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/codegen/foproperties.xml9
-rw-r--r--src/codegen/properties.xsl5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/codegen/foproperties.xml b/src/codegen/foproperties.xml
index a2a3784f7..c8c7c1cae 100644
--- a/src/codegen/foproperties.xml
+++ b/src/codegen/foproperties.xml
@@ -844,10 +844,18 @@
<property>
<name>space-before</name>
<use-generic>GenericSpace</use-generic>
+ <!-- Get corresponding margin property using PARENT's writing-mode -->
+ <corresponding use-if-specified="true">
+ <propval>margin-<parwmrel2abs dir="BEFORE"/></propval>
+ </corresponding>
</property>
<property>
<name>space-after</name>
<use-generic>GenericSpace</use-generic>
+ <!-- Get corresponding margin property using PARENT's writing-mode -->
+ <corresponding use-if-specified="true">
+ <propval>margin-<parwmrel2abs dir="AFTER"/></propval>
+ </corresponding>
</property>
<property>
<name>start-indent</name>
@@ -860,6 +868,7 @@
<propval>margin-<wmrel2abs dir="START"/></propval>+
<propval>padding-<wmrel2abs dir="START"/></propval>+
<propval>border-<wmrel2abs dir="START"/>-width</propval>
+ <!-- + parent start-indent unless parent generates ref area (?) -->
</propexpr>
</corresponding>
</property>
diff --git a/src/codegen/properties.xsl b/src/codegen/properties.xsl
index 83ed9db75..83875597e 100644
--- a/src/codegen/properties.xsl
+++ b/src/codegen/properties.xsl
@@ -459,6 +459,7 @@ public class <xsl:value-of select="$classname"/> extends <xsl:value-of select="
<xsl:if test=".//corresponding">
<xsl:if test=".//corresponding/@use-if-specified='true'">
public boolean isCorrespondingForced(PropertyList propertyList) {
+ FObj parentFO = propertyList.getParentFObj();
StringBuffer sbExpr=new StringBuffer();
<xsl:for-each select=".//corresponding/propval">
sbExpr.setLength(0);
@@ -552,6 +553,10 @@ public class <xsl:value-of select="$classname"/> extends <xsl:value-of select="
sbExpr.append(propertyList.wmRelToAbs(PropertyList.<xsl:value-of select="@dir"/>));
</xsl:template>
+<xsl:template match="propval/parwmrel2abs">
+ sbExpr.append(parentFO.properties.wmRelToAbs(PropertyList.<xsl:value-of select="@dir"/>));
+</xsl:template>
+
<xsl:template match="propval/wmabs2rel">
sbExpr.append(propertyList.wmAbsToRel(PropertyList.<xsl:value-of select="@dir"/>));
</xsl:template>