Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

block_break-before_bug44412.xml 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 Bugzilla #44412 where a break-before on the first child of an otherwise
  21. empty block is set. It is expected that the parent block creates two areas, the first with
  22. only border-before on the first page and zero bpd.
  23. </p>
  24. </info>
  25. <fo>
  26. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  27. <fo:layout-master-set>
  28. <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="20pt">
  29. <fo:region-body/>
  30. </fo:simple-page-master>
  31. </fo:layout-master-set>
  32. <fo:page-sequence master-reference="page">
  33. <fo:flow flow-name="xsl-region-body">
  34. <fo:block>Before the block</fo:block>
  35. <fo:block id="b1" border="4pt solid black">
  36. <fo:block break-before="page">The break-before set on this block causes the parent
  37. block to produce an empty block area with only a border before on the
  38. first page.</fo:block>
  39. </fo:block>
  40. </fo:flow>
  41. </fo:page-sequence>
  42. </fo:root>
  43. </fo>
  44. <checks>
  45. <eval expected="2" xpath="count(//block[@prod-id = 'b1'])"/>
  46. <eval expected="4000 4000 4000 0" xpath="(//block[@prod-id = 'b1'])[1]/@bap"/>
  47. <eval expected="4000 4000 0 4000" xpath="(//block[@prod-id = 'b1'])[2]/@bap"/>
  48. <eval expected="0" xpath="(//block[@prod-id = 'b1'])[1]/@bpd"/>
  49. <eval expected="43200" xpath="(//block[@prod-id = 'b1'])[2]/@bpd"/>
  50. <element-list category="breaker" index="0">
  51. <box w="14400"/>
  52. <penalty w="0" p="0"/>
  53. <box w="0" aux="true"/>
  54. <penalty w="0" p="INF"/>
  55. <glue w="4000"/> <!-- border-before -->
  56. <box w="0"/> <!-- first block area of the "b1" block with zero bpd -->
  57. <skip>3</skip>
  58. </element-list>
  59. </checks>
  60. </testcase>