<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>6790</bug_id>
          
          <creation_ts>2006-01-25 03:58:03 -0800</creation_ts>
          <short_desc>position:fixed elements depend on scrollbar position when printing</short_desc>
          <delta_ts>2017-07-06 12:09:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Printing</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Höpfl">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bdakin</cc>
    
    <cc>i93.borg</cc>
    
    <cc>info</cc>
    
    <cc>ktf.kim</cc>
    
    <cc>mackyle</cc>
    
    <cc>m.kurz+webkitbugs</cc>
    
    <cc>robburns1</cc>
    
    <cc>salzig</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>29826</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Höpfl">webkit</who>
    <bug_when>2006-01-25 03:58:03 -0800</bug_when>
    <thetext>I wanted to use a media=&quot;print&quot; CSS to position a logo on the left of every printed page. The code seems correct to me and works fine in Firefox but in Safari there are two errors:

- The logo does not appear on *every* page. It is printed only once. (&quot;For paged media, boxes with fixed positions are repeated on every page&quot;, http://www.w3.org/TR/CSS21/visuren.html#fixed-positioning) 

- If the viewport is scrolled when I print the page, the logo is printed at the wrong position.

Minimized example code:

&lt;html&gt;&lt;head&gt;&lt;title&gt;Test&lt;/title&gt;&lt;/head&gt;&lt;body&gt;
&lt;div style=&quot;background-color:#ddd; height:30cm;&quot;&gt;Make page big&lt;/div&gt;
&lt;div style=&quot;position:fixed; top:0px; left:0px;&quot;&gt;Should be on the upper left of all pages!&lt;/div&gt;
&lt;/body&gt;&lt;/html&gt;

How to reproduce:

- Save the example code to file.html
- Open file.html in Safari
- Print (Preview)
- Scroll to the end
- Print (Preview)

Expected result:

On screen the text &quot;Should be on the upper left of all pages!&quot; should be fixed on the upper left corner. When scrolling down the text is still there. This works fine.

When printed, the text should be on the upper left of *every* page. The text should *not* move down on the printout regardless where you scrolled to on screen. Both previews should be equal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32763</commentid>
    <comment_count>1</comment_count>
      <attachid>6510</attachid>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-02-15 14:12:11 -0800</bug_when>
    <thetext>Created attachment 6510
file.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32764</commentid>
    <comment_count>2</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-02-15 14:13:37 -0800</bug_when>
    <thetext>Confirmed.

Reporter, could you add the testcase to the bug next time? like i did now? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204863</commentid>
    <comment_count>3</comment_count>
    <who name="">mackyle</who>
    <bug_when>2010-03-26 16:50:04 -0700</bug_when>
    <thetext>Rather than opening another bug that would be very similar to this one, I&apos;m just going to add another attachment test case.

The pagestest.html attachment attempts to place a &quot;Page N&quot; footer at the bottom of every page when printed.  It uses a position: fixed element and a Content: counter to do this.  It fails miserably with WebKit.

The &quot;Page &quot; footer only appears once and it&apos;s usually at the top of the last page (although sometimes part of it is cutoff and appears partially on the next-to-last page as well).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204864</commentid>
    <comment_count>4</comment_count>
      <attachid>51797</attachid>
    <who name="">mackyle</who>
    <bug_when>2010-03-26 16:51:32 -0700</bug_when>
    <thetext>Created attachment 51797
Attempts to place &quot;Page N&quot; footer on bottom of each of 4 pages</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264377</commentid>
    <comment_count>5</comment_count>
    <who name="George">i93.borg</who>
    <bug_when>2010-08-13 08:33:14 -0700</bug_when>
    <thetext>This is also a problem for me - tested using Safari 5.0.1 (Windows)

I attach a test file. When correctly rendered (tested in Firefox and IE), &quot;print preview&quot; mode shows the tag text at the bottom of both pages.

Going to ask w3schools to mention that on their CSS compatibility table...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264378</commentid>
    <comment_count>6</comment_count>
      <attachid>64345</attachid>
    <who name="George">i93.borg</who>
    <bug_when>2010-08-13 08:34:19 -0700</bug_when>
    <thetext>Created attachment 64345
When rendered correctly, this should print 2 pages with a tag at the bottom of each page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>761151</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-11-07 16:17:36 -0800</bug_when>
    <thetext>Fixed elements not being on every page may be fixed by bug 100075.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>6510</attachid>
            <date>2006-02-15 14:12:11 -0800</date>
            <delta_ts>2006-02-15 14:12:11 -0800</delta_ts>
            <desc>file.html</desc>
            <filename>file.html</filename>
            <type>text/html</type>
            <size>224</size>
            <attacher name="Joost de Valk (AlthA)">joost</attacher>
            
              <data encoding="base64">PGh0bWw+PGhlYWQ+PHRpdGxlPlRlc3Q8L3RpdGxlPjwvaGVhZD48Ym9keT4KPGRpdiBzdHlsZT0i
YmFja2dyb3VuZC1jb2xvcjojZGRkOyBoZWlnaHQ6MzBjbTsiPk1ha2UgcGFnZSBiaWc8L2Rpdj4K
PGRpdiBzdHlsZT0icG9zaXRpb246Zml4ZWQ7IHRvcDowcHg7IGxlZnQ6MHB4OyI+U2hvdWxkIGJl
IG9uIHRoZSB1cHBlciBsZWZ0IG9mCmFsbCBwYWdlcyE8L2Rpdj4KPC9ib2R5PjwvaHRtbD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>51797</attachid>
            <date>2010-03-26 16:51:32 -0700</date>
            <delta_ts>2010-03-26 16:51:32 -0700</delta_ts>
            <desc>Attempts to place &quot;Page N&quot; footer on bottom of each of 4 pages</desc>
            <filename>pagestest.html</filename>
            <type>text/html</type>
            <size>1195</size>
            <attacher>mackyle</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPjxoZWFkPjx0aXRsZT5QYWdlcyBUZXN0PC90aXRsZT4KPHN0
eWxlIHR5cGU9InRleHQvY3NzIj4KCmJvZHkgewogIG1hcmdpbjogMDsKICBmb250LWZhbWlseTog
ZmFudGFzeTsKICBmb250LXNpemU6IHh4LWxhcmdlOwp9CgpkaXYgewogIHBhZGRpbmc6IDFlbSAx
ZW0gMDsKICBmb250LWZhbWlseTogc2Fucy1zZXJpZjsKICBmb250LXNpemU6IG1lZGl1bTsKfQoK
ZGl2ICsgZGl2IHsKICBwYWdlLWJyZWFrLWJlZm9yZTogYWx3YXlzOwp9CgojaGVhZGluZyB7CiAg
ZGlzcGxheTogYmxvY2s7CiAgcG9zaXRpb246IGZpeGVkOwogIHRvcDogYXV0bzsKICBib3R0b206
IDFleDsKICBoZWlnaHQ6IDFlbTsKICBjb3VudGVyLWluY3JlbWVudDogcGFnZW51bTsKICB0ZXh0
LWFsaWduOiBjZW50ZXI7CiAgd2lkdGg6IDEwMCU7Cn0KI2hlYWRpbmc6YWZ0ZXIgewogIENvbnRl
bnQ6IGNvdW50ZXIocGFnZW51bSk7Cn0KCiNub3RpY2UgewogIG1hcmdpbjogMWVtIDFlbSAwOwog
IGRpc3BsYXk6IGJsb2NrOwogIHBvc2l0aW9uOiBmbG9hdDsKICBiYWNrZ3JvdW5kLWNvbG9yOiAj
MjI4OwogIGNvbG9yOiAjZGRkOwogIGJvcmRlcjogbWVkaXVtIHNvbGlkIHJlZDsKICB3aWR0aDog
NjVleDsKICBwYWRkaW5nOiAwLjVleDsKICBmb250LWZhbWlseTogc2Fucy1zZXJpZjsKICBmb250
LXNpemU6IG1lZGl1bTsKfQoKQG1lZGlhIHNjcmVlbiB7CiAgI2hlYWRpbmcgewogICAgZGlzcGxh
eTogbm9uZTsKICB9Cn0KCkBtZWRpYSBwcmludCB7CiAgI25vdGljZSB7CiAgICBkaXNwbGF5OiBu
b25lOwogIH0KfQoKPC9zdHlsZT48L2hlYWQ+PGJvZHk+Cgo8c3BhbiBpZD0nbm90aWNlJz5UbyB0
ZXN0LCBwcmludCBtZSAocHJpbnQgcHJldmlldyBpcyBmaW5lKS48YnIgLz48YnIgLz4KT3V0cHV0
IHNob3VsZCBiZSBmb3VyIHBhZ2VzIHdpdGggYSBwYWdlIG51bWJlciBhdCB0aGUgYm90dG9tIG9m
IGVhY2ggb25lCihwcmVjZWRlZCBieSB0aGUgd29yZCA8ZW0+UGFnZTwvZW0+IGFuZCB3aXRoIHRo
aXMgbm90aWNlIG9taXR0ZWQpLjwvc3Bhbj4KPHNwYW4gaWQ9J2hlYWRpbmcnPlBhZ2UgPC9zcGFu
PgoKPGRpdj5GaXJzdCBwYWdlPC9kaXY+Cgo8ZGl2PlNlY29uZCBwYWdlPC9kaXY+Cgo8ZGl2PlRo
aXJkIHBhZ2U8L2Rpdj4KCjxkaXY+Rm91cnRoIHBhZ2U8L2Rpdj4KCjwvYm9keT48L2h0bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>64345</attachid>
            <date>2010-08-13 08:34:19 -0700</date>
            <delta_ts>2010-08-13 08:35:31 -0700</delta_ts>
            <desc>When rendered correctly, this should print 2 pages with a tag at the bottom of each page.</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>872</size>
            <attacher name="George">i93.borg</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjEvL0VOIiAiaHR0cDov
L3d3dy53My5vcmcvVFIveGh0bWwxMS9EVEQveGh0bWwxMS5kdGQiPgo8aHRtbCB4bWxucz0iaHR0
cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCIgeG1sOmxhbmc9ImVuIj4KCgk8aGVhZD4KCQk8dGl0
bGU+VGVzdCBQYWdlPC90aXRsZT4KCQk8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNv
bnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD11dGYtOCIgLz4KCQk8bGluayByZWw9InN0eWxlc2hl
ZXQiIHR5cGU9InRleHQvY3NzIiBocmVmPSJ0ZXN0LmNzcyIgbWVkaWE9InByaW50IiAvPgoJCgkJ
PHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCQkJZGl2LnBhZ2UtYnJlYWsgeyAKCQkJCWRpc3BsYXk6
YmxvY2s7CgkJCQlwYWdlLWJyZWFrLWJlZm9yZTphbHdheXM7CgkJCX0KCQkJCgkJCWRpdi50YWcg
ewoJCQkJZGlzcGxheTogYmxvY2s7CgkJCQlwb3NpdGlvbjogZml4ZWQ7CgkJCQlib3R0b206IDA7
CgkJCQlsZWZ0OiA1MCU7CgkJCX0KCQkJCgkJCWRpdi50YWcgcCB7CgkJCQl3aWR0aDogMjBlbTsK
CQkJCWZvbnQtc2l6ZTogMTJweDsKCQkJCXRleHQtYWxpZ246IGNlbnRlcjsKCQkJCW1hcmdpbi1s
ZWZ0OiAtMTBlbTsKCQkJfSAgIAoJCTwvc3R5bGU+CgkKCTwvaGVhZD4KCgk8Ym9keT4KCQoJCTxo
MT5QYWdlIDEgdGV4dDwvaDE+CgkJCgkJPGRpdiBjbGFzcz0ncGFnZS1icmVhayc+PC9kaXY+CgkJ
CgkJPGgxPlBhZ2UgMiB0ZXh0PC9oMT4KCQkKCQk8ZGl2IGNsYXNzPSd0YWcnPgoJCQk8cD5UYWcg
VGV4dCAtIHNob3VsZCBzaG93IG9uIGV2ZXJ5IHByaW50ZWQgcGFnZTwvcD4KCQk8L2Rpdj4KCQoJ
PC9ib2R5Pgo8L2h0bWw+Cgk=
</data>

          </attachment>
      

    </bug>

</bugzilla>