From 1d9ff983e123a7872c8f64b0c31939c2d906308e Mon Sep 17 00:00:00 2001 From: danfickle Date: Mon, 9 Mar 2020 18:30:13 +1100 Subject: [PATCH] Fixes #211 - Images in content property now work as inline-blocks. With test proof. --- .../com/openhtmltopdf/layout/BoxBuilder.java | 24 ++++++++---------- .../content-property-capabilities.pdf | Bin 0 -> 16842 bytes .../html/content-property-capabilities.html | 12 ++++++--- .../VisualRegressionTest.java | 1 - 4 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 openhtmltopdf-examples/src/main/resources/visualtest/expected/content-property-capabilities.pdf diff --git a/openhtmltopdf-core/src/main/java/com/openhtmltopdf/layout/BoxBuilder.java b/openhtmltopdf-core/src/main/java/com/openhtmltopdf/layout/BoxBuilder.java index f774afee3..31f5c39d0 100644 --- a/openhtmltopdf-core/src/main/java/com/openhtmltopdf/layout/BoxBuilder.java +++ b/openhtmltopdf-core/src/main/java/com/openhtmltopdf/layout/BoxBuilder.java @@ -813,8 +813,8 @@ private static List createGeneratedContentList( BlockBox iB = new BlockBox(); iB.setElement(img); - iB.setPseudoElementOrClass(peName); - iB.setStyle(style.createAnonymousStyle(IdentValue.INLINE_BLOCK)); + CalculatedStyle anon = new EmptyStyle().createAnonymousStyle(IdentValue.INLINE_BLOCK); + iB.setStyle(anon); info.setContainsBlockLevelContent(true); @@ -955,36 +955,34 @@ private static List createGeneratedContent( if (childInfo.isContainsBlockLevelContent()) { List inlines = new ArrayList<>(); - BlockBox result = createBlockBox(style.createAnonymousStyle(IdentValue.INLINE_BLOCK), info, true); + CalculatedStyle anonStyle = style.isInlineBlock() || style.isInline() ? + style : style.createAnonymousStyle(IdentValue.INLINE_BLOCK); - result.setStyle(style.createAnonymousStyle(IdentValue.INLINE_BLOCK)); + BlockBox result = createBlockBox(style, info, true); + result.setStyle(anonStyle); result.setElement(element); - result.setChildrenContentType(BlockBox.CONTENT_BLOCK); + result.setChildrenContentType(BlockBox.CONTENT_INLINE); result.setPseudoElementOrClass(peName); CalculatedStyle anon = style.createAnonymousStyle(IdentValue.INLINE); - for (Iterator i = inlineBoxes.iterator(); i.hasNext();) { - Styleable b = (Styleable) i.next(); + Styleable b = i.next(); if (b instanceof BlockBox) { - if (!inlines.isEmpty()) { - createAnonymousInlineBlock(c.getSharedContext(), result, inlines, null); - inlines.clear(); - } - result.addChild((BlockBox) b); + inlines.add(b); } else { InlineBox iB = (InlineBox) b; iB.setStyle(anon); iB.applyTextTransform(); + iB.setElement(null); inlines.add(iB); } } if (!inlines.isEmpty()) { - createAnonymousInlineBlock(c.getSharedContext(), result, inlines, null); + result.setInlineContent(inlines); } return Collections.singletonList(result); } else if (style.isInline()) { diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/expected/content-property-capabilities.pdf b/openhtmltopdf-examples/src/main/resources/visualtest/expected/content-property-capabilities.pdf new file mode 100644 index 0000000000000000000000000000000000000000..df6fd38451d4d96ef2764311db674c36f5c8346e GIT binary patch literal 16842 zcmch<1zc2J_b5zvD_w(h&kP;XEl5ZSsB}q52qGXI($b(H-HOr;(k&^VG}6rjNPlO* z;PLVQyzjl=z4!2Q=Iq7lz4luB9QKl4MM{Pp!oiI}zdwI6g#iJ9LAHjL7{bCBoa#^P zOhBBH295?+wq_WdnkM!R7PdAZP6!7d2B(UFnTZ1k3ZScDh=^dA*cijexUP^(+M5_S z0t8Y9jwT=`DM2V03I=n51t9!TUI-T}1i}agGcp65>}`#mj7;o7Oty9=Hs+4jR*trI z#-cP` zQ^~~G!a%~-1*8k+0E1xvxWGR@0Zu9g_9g(UOLGCfHjcp10mKIrgu$t1;$Z7!Zv^;* z{}Lc>V`B^aT2}xz1VI3fFnxZx38v=%K{X(-S^JwFkl!Z;=92%D5@8elcZnAhaK%QL zZ+=KrG_f&rGzUSTJlrr02S*?@tg$fw4|DPHfSfU)AO#FC$PxqaloE#SJ%G{}7=u9& zki8iOgau3d~XgD9jQr z-U~axP!2vQw}1f1$QpxF-Wmduvc*una0nRY5D9e*P8kT`O^`aE@dY_B;^y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@)P@YHJR&^RYu^Zn56d-U$bmE4rYg>zV{_4W5LdchN$Japys{2udjZ)Ay1Gs*E{c>xxB>|)qqBOYLQvq zO)W_4IQ&BjoUElotvySY?$n%g8?HzE>>7;QZGkq+_KIuAp(|bi+^6|B0@RbreIyo@ za}znLOx3sXDSLI?)gH*U5$LFe5q3u}d8R7F<#)!saitozbLaM2MixvHd?MaPrLJ&B z9p1>E^oM?@iyo$*=lFp(nx8#R-+P)aI+cDPd~a$pf;A5VCuTvMvbO5Bz?oK%?gbf$ zQ~RzC$i~Ua>Z0WXc5}72_M(gF2P-WQ_=3Y7*zwjMvi{IO^}i|WqJQb%WL>l?{6GMD zHveHb^lDr49}%uLG5qOZu!=p-r6k=O6xq@bH3xRr4DjFW>Kef$;Fb8W?}W5AI4J@oo>@WVO1T|Y*;5`0iv!%R^sVxY$Xo2>4c_3#A zb4h@?WcZ{3PeZ^`(qJBLJ_#^boL5>vLP~%~K!#rg^q*0Hp2<5Ft|qYf0}`2oqk+BS TMMOe)A-sGT^z_ooG8q3Ktx9UU literal 0 HcmV?d00001 diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/html/content-property-capabilities.html b/openhtmltopdf-examples/src/main/resources/visualtest/html/content-property-capabilities.html index 3f05b0b3f..bb94cc79b 100644 --- a/openhtmltopdf-examples/src/main/resources/visualtest/html/content-property-capabilities.html +++ b/openhtmltopdf-examples/src/main/resources/visualtest/html/content-property-capabilities.html @@ -11,9 +11,10 @@ } } @page:first { - margin-top: 100px; + margin-top: 140px; @top-center { - content: url(../../demos/images/flyingsaucer.png); + border: 1px solid blue; + content: url(../../demos/images/flyingsaucer.png) "..." url(../../demos/images/flyingsaucer.png); } } body { @@ -31,7 +32,10 @@ content: attr(data-msg); } #three::after { - content: url(../../demos/images/flyingsaucer.png); + display: inline-block; + border: 2px solid pink; + background-color: orange; + content: url(../../demos/images/flyingsaucer.png) "..." url(../../demos/images/flyingsaucer.png); } @@ -39,6 +43,6 @@
ONE
WORLD
-
With images:
+
With images:
diff --git a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java index e648cbec1..8e55da7fb 100644 --- a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java +++ b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java @@ -1011,7 +1011,6 @@ public void testIssue446LangSelector() throws IOException { * Tests what the CSS content property is capable of. */ @Test - @Ignore // Working but with content images behaving as blocks rather than inline-blocks. public void testContentPropertyCapabilities() throws IOException { assertTrue(vt.runTest("content-property-capabilities")); }