blob: 770e782a36a442dbeff01924a758ea62142ab5ce [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<!-- $Id$ -->
This test checks floats.
<fo:root xmlns:fo="">
<fo:simple-page-master margin="50pt" master-name="page" page-height="800pt" page-width="600pt">
<fo:region-body background-color="yellow" />
<fo:page-sequence master-reference="page">
<fo:flow flow-name="xsl-region-body">
Put some content before the float but enough to make the float go to the third line of this block. Just enought content to place the float in the second line is not desirable. <fo:inline color="red">This is the last content before the float and the float is right now.</fo:inline>
<fo:float float="start">
<fo:block border="1pt solid red" padding="10pt" color="blue" end-indent="0pt" start-indent="0pt">
<fo:block-container inline-progression-dimension="110pt">
<fo:block background-color="green">
This is a normal block that is confined to the block container inside a side float. The background is green.
<fo:block>This line is not constrained by a width. xxx xxx xxx xxx xxx</fo:block>
<fo:inline color="blue">This is the first content after the float.</fo:inline> This paragraph contains a side float and the content of the paragraph needs to be wrapped around the float... this is very complicated but the current implementation can handle the simpler cases.
<!-- first float -->
<eval expected="11000" xpath="//pageViewport[1]/page/regionViewport[1]//flow[1]/block[2]/@left-offset" />
<eval expected="green." xpath="//pageViewport[1]/page/regionViewport[1]//flow[1]/block[2]/block[1]/block[1]/block[1]/block[1]/lineArea[7]" />
<eval expected="331432" xpath="//pageViewport[1]/page/regionViewport[1]//flow[1]/block[3]/@left-offset" />
<eval expected="last content before the float" xpath="//pageViewport[1]/page/regionViewport[1]//flow[1]/block[3]/lineArea[1]" />
<eval expected="handle the simpler cases." xpath="//pageViewport[1]/page/regionViewport[1]//flow[1]/block[3]/lineArea[10]" />