RESOLVED FIXED 32717
Support frameset flattening
https://bugs.webkit.org/show_bug.cgi?id=32717
Summary Support frameset flattening
Kenneth Rohde Christiansen
Reported 2009-12-18 09:30:37 PST
PS: Another bug will track iframe flattening. Subframe flattening basically make framesets usable on touch devices by flattening the frames to the size of the contents. Some special case it done to obey the frameset rules as much as possible and thus not break the layout. The original patch was written for the S60, and later ported to the iPhone. I'm going to: 1) Extract the frameset flattening code done by Antti 1) Add supports to DRT for testing + add layout tests 2) Improve the code (there are some obvious areas of improvements) 3) Verify agains the patches in Android and (?) webOS. 4) Consider a better algorithm. before putting this up to review. Most of this is ongoing, but as I'm going on vacation for two weeks, I will attach the first patch, extracing the frameset flattening code by Antti, modified to work on top on trunk.
Attachments
Part 1 (14.06 KB, patch)
2009-12-18 09:32 PST, Kenneth Rohde Christiansen
no flags
Fix some issues that occurred while adding layout test (14.54 KB, patch)
2010-01-07 12:25 PST, Kenneth Rohde Christiansen
no flags
Work on adding layout tests (9.47 KB, patch)
2010-01-07 12:25 PST, Kenneth Rohde Christiansen
no flags
Add an additional test that currently fails (11.78 KB, patch)
2010-01-08 10:03 PST, Kenneth Rohde Christiansen
no flags
Frameset Flattening with layout tests (35.12 KB, patch)
2010-01-18 07:00 PST, Kenneth Rohde Christiansen
no flags
Change behaviour after discussion w/ Antti (35.17 KB, patch)
2010-01-18 07:52 PST, Kenneth Rohde Christiansen
no flags
Path with 5 test which all pass on Qt (47.25 KB, patch)
2010-01-19 06:28 PST, Kenneth Rohde Christiansen
kenneth: review-
Patch with 5 test which all pass on Qt (47.91 KB, patch)
2010-01-19 06:38 PST, Kenneth Rohde Christiansen
no flags
FrameSet Flattening enabling/disabling on Mac port. (6.46 KB, patch)
2010-02-10 05:34 PST, Jesus Sanchez-Palencia
kenneth: review-
FrameSet Flattening support on Mac DRT and expected files (22.75 KB, patch)
2010-02-10 05:35 PST, Jesus Sanchez-Palencia
no flags
FrameSet Flattening enabling/disabling on Win port (6.09 KB, patch)
2010-02-10 05:36 PST, Jesus Sanchez-Palencia
no flags
FrameSet Flattening enabling/disabling on Mac port - v2 (47.49 KB, patch)
2010-02-10 05:54 PST, Jesus Sanchez-Palencia
kenneth: review-
FrameSet Flattening enabling/disabling on Mac port - v3 (6.25 KB, patch)
2010-02-10 06:18 PST, Jesus Sanchez-Palencia
no flags
FrameSet Flattening support on Mac, Win, Gtk and Wx DRT and expected files for Mac (26.96 KB, patch)
2010-02-11 09:26 PST, Jesus Sanchez-Palencia
no flags
FrameSet Flattening support on Mac, Win, Gtk and Wx DRT and expected files for Mac - v2 (26.97 KB, patch)
2010-02-11 09:48 PST, Jesus Sanchez-Palencia
no flags
Kenneth Rohde Christiansen
Comment 1 2009-12-18 09:32:01 PST
Kenneth Rohde Christiansen
Comment 2 2010-01-07 12:25:08 PST
Created attachment 46072 [details] Fix some issues that occurred while adding layout test
Kenneth Rohde Christiansen
Comment 3 2010-01-07 12:25:33 PST
Created attachment 46073 [details] Work on adding layout tests
Antonio Gomes
Comment 4 2010-01-07 12:37:30 PST
(In reply to comment #3) > Created an attachment (id=46073) [details] > Work on adding layout tests should not this new test be in Skipped of other ports ?
Kenneth Rohde Christiansen
Comment 5 2010-01-08 10:03:34 PST
Created attachment 46142 [details] Add an additional test that currently fails
Kenneth Rohde Christiansen
Comment 6 2010-01-18 07:00:58 PST
Created attachment 46820 [details] Frameset Flattening with layout tests
Kenneth Rohde Christiansen
Comment 7 2010-01-18 07:52:27 PST
Created attachment 46825 [details] Change behaviour after discussion w/ Antti if scrollbars are off, and the width or height are fixed we obey them and do not expand. The reasoning is that with frame flattening no subframe much ever become scrollable, so either scrolling must be disabled or the frame must be expanded.
Kenneth Rohde Christiansen
Comment 8 2010-01-19 06:28:18 PST
Created attachment 46903 [details] Path with 5 test which all pass on Qt
Kenneth Rohde Christiansen
Comment 9 2010-01-19 06:29:22 PST
Comment on attachment 46903 [details] Path with 5 test which all pass on Qt Do not enable the setting by default, so r- myself
WebKit Review Bot
Comment 10 2010-01-19 06:33:24 PST
Attachment 46903 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 Ignoring WebKit/qt/Api/qwebpage_p.h; This file is exempt from the style guide. Ignoring WebKit/qt/Api/qwebpage.cpp; This file is exempt from the style guide. WebCore/page/Settings.cpp:97: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 1 If any of these errors are false positives, please file a bug against check-webkit-style.
Kenneth Rohde Christiansen
Comment 11 2010-01-19 06:38:34 PST
Created attachment 46904 [details] Patch with 5 test which all pass on Qt
Antti Koivisto
Comment 12 2010-01-19 07:11:15 PST
Thanks for cleaning this up, with nice test cases too! I wonder if we could come up with a better name for the feature than "frame flattening" (and as a result, for all names in the code that use it). It has been used for a long time but it is not very descriptive. "Expanding framesets to content" perhaps. How would Settings::expandsFramesetsToContent() for example sound? Since this patch does not handle iframes, are you planning to have a separate feature flag for those? Some high level comments on the algorithm would be nice in the code (since you have figured it out), RenderFrameSet::positionFramesWithFlattening() mostly.
Kenneth Rohde Christiansen
Comment 13 2010-01-20 03:06:46 PST
(In reply to comment #12) > Thanks for cleaning this up, with nice test cases too! > > I wonder if we could come up with a better name for the feature than "frame > flattening" (and as a result, for all names in the code that use it). It has > been used for a long time but it is not very descriptive. "Expanding framesets > to content" perhaps. How would > > Settings::expandsFramesetsToContent() > > for example sound? I don't think that makes it much clearer. Anyway, when we do a Qt API, we can always use another name, though I think FrameSet Flattening is sufficient as it's behaviour will have to be documented anyway. It is also easier to talk about frameset/iframe flattening as a technique instead of expanding framesets/iframes to their contents. > Since this patch does not handle iframes, are you planning to have a separate > feature flag for those? Yes > Some high level comments on the algorithm would be nice in the code (since you > have figured it out), RenderFrameSet::positionFramesWithFlattening() mostly. I can do that in a follow up patch if you would like.
Simon Hausmann
Comment 14 2010-01-21 04:02:12 PST
fast/frames/flattening/ should probably be added to the skiplists of the other ports, until their DRT supports toggling the setting.
Simon Hausmann
Comment 15 2010-01-25 06:32:18 PST
I think frame set flattening is a fairly descriptive name, I wouldn't even mind the attribute in QWebSettings :)
Antti Koivisto
Comment 16 2010-01-25 06:42:04 PST
Ok, ok. :)
Antti Koivisto
Comment 17 2010-01-27 02:12:10 PST
Comment on attachment 46904 [details] Patch with 5 test which all pass on Qt Looks good to me, but it would be good for someone else take a look too. Some this code was written by me so I'm not the ideal reviewer. I guess the new tests should go the skip lists of architectures that lack the DRT support. You should add appropriate copyright statements to the files.
Antti Koivisto
Comment 18 2010-01-27 02:19:46 PST
Comment on attachment 46904 [details] Patch with 5 test which all pass on Qt > + void layoutWithFlattening(bool fixedWidth, bool fixedHeight); It would be better to use enum here (as bit mask). Something like layoutWithFlattening(false, false) is pretty uninformative.
Kenneth Rohde Christiansen
Comment 19 2010-01-31 13:32:59 PST
Hyatt, do you have any comments?
Dave Hyatt
Comment 20 2010-02-05 12:10:08 PST
Comment on attachment 46904 [details] Patch with 5 test which all pass on Qt In the FrameView code: "/ In flat frame layout mode the content of frame affects layout of the parent frames." Change that to "the contents of the frame" "Invalidate also parent frame starting from" Change to: "Also invalidate the parent frame starting from" In RenderFrame: "NOTE: width and height has been set at this point by" Change to: "NOTE: The width and height have been set at this point by" I think this would be useful to test on Mac as well if you wanted to add the setting and patch more layout test controllers. That could happen in a followup though. r=me with those comments fixed up.
Kenneth Rohde Christiansen
Comment 21 2010-02-05 12:48:24 PST
Comment on attachment 46904 [details] Patch with 5 test which all pass on Qt Landed in r54440.
Kenneth Rohde Christiansen
Comment 22 2010-02-05 12:49:44 PST
I will do some follow up patches next week, so I'll leave this bug open now that we have so many cc'ed.
Eric Seidel (no email)
Comment 23 2010-02-08 15:12:01 PST
Comment on attachment 46904 [details] Patch with 5 test which all pass on Qt Cleared David Hyatt's review+ from obsolete attachment 46904 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Jesus Sanchez-Palencia
Comment 24 2010-02-10 05:34:39 PST
Created attachment 48489 [details] FrameSet Flattening enabling/disabling on Mac port.
Jesus Sanchez-Palencia
Comment 25 2010-02-10 05:35:31 PST
Created attachment 48490 [details] FrameSet Flattening support on Mac DRT and expected files
Jesus Sanchez-Palencia
Comment 26 2010-02-10 05:36:14 PST
Created attachment 48491 [details] FrameSet Flattening enabling/disabling on Win port
Jesus Sanchez-Palencia
Comment 27 2010-02-10 05:37:10 PST
Comment on attachment 48490 [details] FrameSet Flattening support on Mac DRT and expected files This patch depends on the previous one.
Kenneth Rohde Christiansen
Comment 28 2010-02-10 05:38:04 PST
Comment on attachment 48489 [details] FrameSet Flattening enabling/disabling on Mac port. Your entry in the changelog has to be the first, sorry
Kenneth Rohde Christiansen
Comment 29 2010-02-10 05:39:04 PST
Comment on attachment 48490 [details] FrameSet Flattening support on Mac DRT and expected files cq- as it depends on the former patch which was r-
Jesus Sanchez-Palencia
Comment 30 2010-02-10 05:54:28 PST
Created attachment 48493 [details] FrameSet Flattening enabling/disabling on Mac port - v2 fixed changelog entry
Kenneth Rohde Christiansen
Comment 31 2010-02-10 05:56:21 PST
Comment on attachment 48493 [details] FrameSet Flattening enabling/disabling on Mac port - v2 You are removing ChangeLog entries. r- for this reason
Jesus Sanchez-Palencia
Comment 32 2010-02-10 06:18:07 PST
Created attachment 48498 [details] FrameSet Flattening enabling/disabling on Mac port - v3 sorry for the previous ChangeLog madness
WebKit Commit Bot
Comment 33 2010-02-10 10:11:44 PST
Comment on attachment 48491 [details] FrameSet Flattening enabling/disabling on Win port Clearing flags on attachment: 48491 Committed r54606: <http://trac.webkit.org/changeset/54606>
WebKit Commit Bot
Comment 34 2010-02-10 11:44:13 PST
Comment on attachment 48498 [details] FrameSet Flattening enabling/disabling on Mac port - v3 Clearing flags on attachment: 48498 Committed r54613: <http://trac.webkit.org/changeset/54613>
WebKit Commit Bot
Comment 35 2010-02-10 15:23:12 PST
Comment on attachment 48490 [details] FrameSet Flattening support on Mac DRT and expected files Clearing flags on attachment: 48490 Committed r54626: <http://trac.webkit.org/changeset/54626>
WebKit Commit Bot
Comment 36 2010-02-10 15:23:28 PST
All reviewed patches have been landed. Closing bug.
Jesus Sanchez-Palencia
Comment 38 2010-02-11 09:26:34 PST
Created attachment 48573 [details] FrameSet Flattening support on Mac, Win, Gtk and Wx DRT and expected files for Mac This is the only patch missing review and commit, the others were landed. This shouldn't break Win and GTK ports anymore.
Jesus Sanchez-Palencia
Comment 39 2010-02-11 09:48:28 PST
Created attachment 48575 [details] FrameSet Flattening support on Mac, Win, Gtk and Wx DRT and expected files for Mac - v2
Kenneth Rohde Christiansen
Comment 40 2010-02-11 10:15:45 PST
Comment on attachment 48575 [details] FrameSet Flattening support on Mac, Win, Gtk and Wx DRT and expected files for Mac - v2 Will request review under my name, so that it is tested on the build bots. Jesus is not a committer and there for it doesn't run the tests.
WebKit Commit Bot
Comment 41 2010-02-12 04:56:00 PST
Comment on attachment 48575 [details] FrameSet Flattening support on Mac, Win, Gtk and Wx DRT and expected files for Mac - v2 Clearing flags on attachment: 48575 Committed r54719: <http://trac.webkit.org/changeset/54719>
WebKit Commit Bot
Comment 42 2010-02-12 04:56:12 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.