You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inline_background-color.xml 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This test checks fo:inline with background-color properties.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt">
  27. <fo:region-body/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  31. <fo:flow flow-name="xsl-region-body" font-size="10pt">
  32. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt">
  33. To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it.
  34. </fo:block>
  35. <fo:block background-color="silver" text-align="end" margin="1pt 0pt 1pt 0pt">
  36. To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it with text-align="end".
  37. </fo:block>
  38. <fo:block background-color="silver" text-align="justify" margin="1pt 0pt 1pt 0pt">
  39. To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it with text-align="justify".
  40. </fo:block>
  41. <fo:block background-color="silver" text-align="center" margin="1pt 0pt 1pt 0pt">
  42. To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it with text-align="center".
  43. </fo:block>
  44. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt">
  45. This demonstrates a long inline
  46. <fo:inline background-color="yellow">which stretches over multiple lines to
  47. show how the highlight extends from line to line while
  48. correctly honouring the text-align (not specified) property</fo:inline>
  49. back to normal
  50. </fo:block>
  51. <fo:block background-color="silver" text-align="end" margin="1pt 0pt 1pt 0pt">
  52. This demonstrates a long inline
  53. <fo:inline background-color="yellow">which stretches over multiple lines to
  54. show how the highlight extends from line to line while
  55. correctly honouring the text-align="end" property</fo:inline>
  56. back to normal
  57. </fo:block>
  58. <fo:block background-color="silver" text-align="justify" margin="1pt 0pt 1pt 0pt">
  59. This demonstrates a long inline
  60. <fo:inline background-color="yellow">which stretches over multiple lines to
  61. show how the highlight extends from line to line while
  62. correctly honouring the text-align="justify" property</fo:inline>
  63. back to normal
  64. </fo:block>
  65. <fo:block background-color="silver" text-align="center" margin="1pt 0pt 1pt 0pt">
  66. This demonstrates a long inline
  67. <fo:inline background-color="yellow">which stretches over multiple lines to
  68. show how the highlight extends from line to line while
  69. correctly honouring the text-align="center" property</fo:inline>
  70. back to normal
  71. </fo:block>
  72. <fo:block background-color="silver" text-align="center" margin="1pt 0pt 1pt 0pt">
  73. Nested inline highlights
  74. <fo:inline background-color="yellow" font-size="10pt">this is 10pt text
  75. <fo:inline font-size="14pt">nested within is 14pt text</fo:inline>
  76. followed by 10pt text</fo:inline>
  77. back to normal
  78. </fo:block>
  79. </fo:flow>
  80. </fo:page-sequence>
  81. </fo:root>
  82. </fo>
  83. <checks>
  84. <eval expected="90040" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/>
  85. <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/inlineparent/@background"/>
  86. <eval expected="90040" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/>
  87. <eval expected="color=#ffff00" xpath="//flow/block[2]/lineArea/inlineparent/@background"/>
  88. <eval expected="90040" xpath="//flow/block[3]/lineArea/inlineparent/@ipd"/>
  89. <eval expected="color=#ffff00" xpath="//flow/block[3]/lineArea/inlineparent/@background"/>
  90. <eval expected="90040" xpath="//flow/block[4]/lineArea/inlineparent/@ipd"/>
  91. <eval expected="color=#ffff00" xpath="//flow/block[4]/lineArea/inlineparent/@background"/>
  92. <eval expected="188950" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
  93. <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea[1]/inlineparent/@background"/>
  94. <eval expected="335700" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/>
  95. <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea[2]/inlineparent/@background"/>
  96. <eval expected="126160" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/>
  97. <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea[3]/inlineparent/@background"/>
  98. <eval expected="188950" xpath="//flow/block[6]/lineArea[1]/inlineparent/@ipd"/>
  99. <eval expected="color=#ffff00" xpath="//flow/block[6]/lineArea[1]/inlineparent/@background"/>
  100. <eval expected="335700" xpath="//flow/block[6]/lineArea[2]/inlineparent/@ipd"/>
  101. <eval expected="color=#ffff00" xpath="//flow/block[6]/lineArea[2]/inlineparent/@background"/>
  102. <eval expected="90200" xpath="//flow/block[6]/lineArea[3]/inlineparent/@ipd"/>
  103. <eval expected="color=#ffff00" xpath="//flow/block[6]/lineArea[3]/inlineparent/@background"/>
  104. <eval expected="199793" xpath="//flow/block[7]/lineArea[1]/inlineparent/@ipd"/>
  105. <eval expected="color=#ffff00" xpath="//flow/block[7]/lineArea[1]/inlineparent/@background"/>
  106. <eval expected="350000" xpath="//flow/block[7]/lineArea[2]/inlineparent/@ipd"/>
  107. <eval expected="color=#ffff00" xpath="//flow/block[7]/lineArea[2]/inlineparent/@background"/>
  108. <eval expected="99080" xpath="//flow/block[7]/lineArea[3]/inlineparent/@ipd"/>
  109. <eval expected="color=#ffff00" xpath="//flow/block[7]/lineArea[3]/inlineparent/@background"/>
  110. <eval expected="128370" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
  111. <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea[1]/inlineparent/@background"/>
  112. <eval expected="269560" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/>
  113. <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea[2]/inlineparent/@background"/>
  114. <eval expected="225250" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
  115. <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea[3]/inlineparent/@background"/>
  116. <eval expected="151184" xpath="//flow/block[9]/lineArea[1]/inlineparent/@ipd"/>
  117. <eval expected="color=#ffff00" xpath="//flow/block[9]/lineArea[1]/inlineparent/@background"/>
  118. <eval expected="81704" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/@ipd"/>
  119. <eval expected="161644" xpath="//flow/block[9]/lineArea[2]/inlineparent/@ipd"/>
  120. <eval expected="color=#ffff00" xpath="//flow/block[9]/lineArea[2]/inlineparent/@background"/>
  121. <eval expected="67704" xpath="//flow/block[9]/lineArea[2]/inlineparent/inlineparent/@ipd"/>
  122. </checks>
  123. </testcase>