Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Repeat thead and tfoot when table contains page breaks #13331

Closed
wants to merge 5 commits into from

Conversation

trygveaa
Copy link

When a table breaks over multiple pages, the thead and tfoot blocks should be repeated on all pages. This issue has previously been addressed in #211 and #344, but seems to have reappeared. This uses the work from #344 to fix it again.

This fixes #13324.

This has been done a few times before[0][1], but seems to be broken
again as reported in [2].

This commit is only reinstating what's missing from [1]. This was done
by running:

    git log -p -1 2d778f6 | git apply -3 -p6 --directory=src/qt/qtwebkit

And resolving the conflicts. There are still some compile errors. These
will be fixed in the upcoming commits instead of in this one to clarify
the changes.

[0]: ariya#211
[1]: ariya#344
[2]: ariya#13324
Remove the ParentToChildFlippingAdjustment argument from
flipForWritingMode. This variable doesn't exist anymore. Instead, call
flipForWritingModeForChild instead of flipForWritingMode. This seems to
be what's done in the current code.

This fixes some errors after 218a937.
This fixes some errors after 218a937. tx/ty seems to have been replaced
by paintOffset other places. This replaces it in the code from 218a937
as well.
flipForWritingModeForChild returns a LayoutPoint. This changes the types
of some variables from IntPoint to LayoutPoint.

This fixes some errors after 218a937.
This fixes the last errors after 218a937.

I have confirmed that both the thead and the tfoot blocks are repeated
on the next pages when a table breaks over multiple pages. The other
content was already moved to take account of the size of thead and
tfoot, so this change doesn't affect any other content.

This fixes issue ariya#13324.
ariya#13324
@svvac
Copy link

svvac commented Oct 27, 2015

Hi. I've been testing your patch, and it almost works perfectly. One thing is that the repeated table header overlaps the page header if it exists.
screenshot from 2015-10-27 10-44-42

@vitallium
Copy link
Collaborator

Hi! Could you please file your pull request against this repo https://github.com/Vitallium/qtwebkit ?

@vitallium vitallium closed this Dec 2, 2015
svvac added a commit to svvac/qtwebkit that referenced this pull request Mar 7, 2016
This fix for ariya/phantomjs#13324 is an adaptation of ariya/phantomjs#13331
modified for the new submodule linking of QtWebKit used starting 2.1.0.

I am not the author of the original patch (@trigveaa is) nor am I competent
enough with the QtWebKit codebase to fully endorse it. All I know is that this
patch seems to fix the issue for my use-case (aside from the page header overlap
I reported in ariya/phantomjs#13331).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In V2.0.0 html table heading not repeated across pages in PDF
3 participants