Bug 106125 - Make seamless iframes paginate properly in printing, columns and regions
Summary: Make seamless iframes paginate properly in printing, columns and regions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-04 12:33 PST by Dave Hyatt
Modified: 2013-02-18 13:22 PST (History)
6 users (show)

See Also:


Attachments
Patch (210.15 KB, patch)
2013-01-04 12:39 PST, Dave Hyatt
simon.fraser: review+
Details | Formatted Diff | Diff
Patch (210.29 KB, patch)
2013-01-04 14:56 PST, Dave Hyatt
simon.fraser: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2013-01-04 12:33:15 PST
Teach seamless iframes how to be paginated in their parent document.
Comment 1 Dave Hyatt 2013-01-04 12:39:39 PST
Created attachment 181361 [details]
Patch
Comment 2 Eric Seidel (no email) 2013-01-04 13:04:13 PST
Comment on attachment 181361 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181361&action=review

Thanks for the fix.

> Source/WebCore/rendering/RenderView.cpp:160
> +static RenderBox* enclosingSeamlessRenderer(Element* ownerElement)

I'm a little surprised you didn't use Document::seamlessParentIFrame() and just grab the renderer off of that?

> Source/WebCore/rendering/RenderView.cpp:201
> +    RenderBox* seamlessAncestor = enclosingSeamlessRenderer(document()->ownerElement());
> +    LayoutState* seamlessLayoutState = seamlessAncestor ? seamlessAncestor->view()->layoutState() : 0;
> +    bool shouldInheritPagination = seamlessLayoutState && !m_pageLogicalHeight && seamlessAncestor->style()->writingMode() == style()->writingMode();

It's unclear what properties seamless iframes should inherit or not.  You might want to take a peak at PassRefPtr<RenderStyle> StyleResolver::styleForDocument(Document* document, CSSFontSelector* fontSelector)'s handling of seamless if you haven't already.
Comment 3 WebKit Review Bot 2013-01-04 13:07:29 PST
Attachment 181361 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1
Source/WebCore/rendering/RenderObject.cpp:1301:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/rendering/RenderView.h:240:  The parameter name "state" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Dave Hyatt 2013-01-04 14:56:45 PST
Created attachment 181380 [details]
Patch

New patch to incorporate Eric's suggestions and fix style issues.
Comment 5 Build Bot 2013-01-04 19:20:03 PST
Comment on attachment 181380 [details]
Patch

Attachment 181380 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15703502

New failing tests:
fast/regions/seamless-iframe-flowed-into-regions.html
fast/multicol/seamless-flowed-through-columns.html
Comment 6 Dave Hyatt 2013-02-18 13:22:13 PST
Landed in r143256.