Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(711)

Issue 23819019: Refactor fixed layout mode (Closed)

Created:
7 years, 3 months ago by bokan
Modified:
7 years, 2 months ago
CC:
blink-reviews, kenneth.christiansen, caseq+blink_chromium.org, loislo+blink_chromium.org, abarth-chromium, eustas+blink_chromium.org, alph+blink_chromium.org, eae+blinkwatch, leviw+renderwatch, lushnikov+blink_chromium.org, yurys+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, adamk+blink_chromium.org, jchaffraix+rendering, devtools-reviews_chromium.org, aandrey+blink_chromium.org, jeez, jamesr, rune
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Refactor fixed layout mode Previously, the desktop browser would use FrameView's rect as the layout size while the mobile browser would enable "fixed layout mode" which then used a layoutSize variable that it could set instead. This CL removes "fixed layout mode" as a FrameView concept and makes the layout size always an explicitly set property of the main FrameView. Another way to think about it is that we're now always in a fixed-layout, only we keep the layout size pegged to the window size (if the --enable-viewport flag is set, the layout size is set from @viewport/viewport meta). Note: WebViewImpl still has a setFixedLayoutSize method that's used by Android WebView. BUG=285397 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=159039

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 13

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Total comments: 20

Patch Set 10 : #

Total comments: 5

Patch Set 11 : git rebase #

Total comments: 20

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : rebase #

Patch Set 15 : rebase to ToT #

Total comments: 6

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Total comments: 1

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -342 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -1 line 0 comments Download
M LayoutTests/css3/device-adapt/viewport-delete-rule.html View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -2 lines 0 comments Download
M LayoutTests/css3/device-adapt/viewport-invalid-values-001.html View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/css3/device-adapt/viewport-user-agent-style.html View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -2 lines 0 comments Download
M LayoutTests/fast/events/resize-events.html View 1 2 3 4 5 2 chunks +1 line, -6 lines 0 comments Download
M LayoutTests/fast/events/resize-events-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
D LayoutTests/fast/events/resize-events-fixed-layout.html View 1 2 3 4 5 1 chunk +0 lines, -64 lines 0 comments Download
D LayoutTests/fast/events/resize-events-fixed-layout-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -6 lines 0 comments Download
D LayoutTests/fast/repaint/fixed-layout-360x240.html View 1 2 3 4 5 1 chunk +0 lines, -14 lines 0 comments Download
D LayoutTests/fast/repaint/fixed-layout-360x240-expected.png View 1 2 3 4 5 Binary file 0 comments Download
D LayoutTests/fast/repaint/fixed-layout-360x240-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download
M LayoutTests/fast/viewport/viewport-enabled.html View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/viewport/viewport-legacy-ordering-10.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/page/Frame.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/Frame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -3 lines 0 comments Download
M Source/core/page/FrameView.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +15 lines, -1 line 0 comments Download
M Source/core/page/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 10 chunks +44 lines, -7 lines 0 comments Download
M Source/core/platform/ScrollView.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +5 lines, -15 lines 0 comments Download
M Source/core/platform/ScrollView.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +18 lines, -52 lines 0 comments Download
M Source/core/platform/ScrollableArea.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/platform/ScrollableArea.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M Source/core/platform/chromium/FramelessScrollView.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M Source/core/platform/chromium/FramelessScrollView.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderLayerCompositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderLayerCompositor.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderLayerScrollableArea.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderLayerScrollableArea.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderView.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/rendering/RenderView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +9 lines, -11 lines 0 comments Download
M Source/web/ChromeClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebDevToolsAgentImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -1 line 0 comments Download
M Source/web/WebFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebViewImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +10 lines, -4 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 9 chunks +32 lines, -54 lines 0 comments Download
M Source/web/tests/ScrollAnimatorNoneTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 83 chunks +52 lines, -72 lines 0 comments Download
M Source/web/tests/WebInputEventConversionTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 28 (0 generated)
bokan
I've split this into a separate CL from enabling viewport on desktop. There's still a ...
7 years, 3 months ago (2013-09-04 23:53:06 UTC) #1
kenneth.r.christiansen
https://codereview.chromium.org/23819019/diff/5001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/23819019/diff/5001/Source/web/WebViewImpl.cpp#newcode1665 Source/web/WebViewImpl.cpp:1665: if (page() && !page()->settings().layoutFallbackWidth()) With the move to using ...
7 years, 3 months ago (2013-09-05 07:54:23 UTC) #2
rune
Haven't looked at the details yet, but ... yay!
7 years, 3 months ago (2013-09-05 07:56:39 UTC) #3
kenneth.r.christiansen
https://codereview.chromium.org/23819019/diff/5001/Source/core/page/FrameView.cpp File Source/core/page/FrameView.cpp (right): https://codereview.chromium.org/23819019/diff/5001/Source/core/page/FrameView.cpp#newcode2591 Source/core/page/FrameView.cpp:2591: if (!isMainFrame()) Why don't you make this -> isMainFrame() ...
7 years, 3 months ago (2013-09-05 08:03:07 UTC) #4
bokan
https://codereview.chromium.org/23819019/diff/5001/Source/core/page/FrameView.cpp File Source/core/page/FrameView.cpp (right): https://codereview.chromium.org/23819019/diff/5001/Source/core/page/FrameView.cpp#newcode2591 Source/core/page/FrameView.cpp:2591: if (!isMainFrame()) On 2013/09/05 08:03:07, kenneth.r.christiansen wrote: > Why ...
7 years, 3 months ago (2013-09-05 20:03:35 UTC) #5
kenneth.r.christiansen
> So I'm actually unsure of how we typically deal with the situation where we ...
7 years, 3 months ago (2013-09-05 20:35:22 UTC) #6
bokan
On 2013/09/05 20:35:22, kenneth.r.christiansen wrote: > > So I'm actually unsure of how we typically ...
7 years, 3 months ago (2013-09-05 21:09:06 UTC) #7
kenneth.r.christiansen
> Sorry, I should have been more specific. We do still resize the layoutSize in ...
7 years, 3 months ago (2013-09-05 23:44:47 UTC) #8
rune
7 years, 3 months ago (2013-09-09 12:19:53 UTC) #9
bokan
I've cleaned up the unit and layout tests. I've also changed the WebViewImpl::resize method to ...
7 years, 3 months ago (2013-09-13 04:50:38 UTC) #10
aelias_OOO_until_Jul13
FYI, Android WebView turns out to still need WebView::setFixedLayoutSize(). When this is called from Chromium, ...
7 years, 3 months ago (2013-09-13 05:10:47 UTC) #11
aelias_OOO_until_Jul13
https://codereview.chromium.org/23819019/diff/41001/Source/core/page/FrameView.cpp File Source/core/page/FrameView.cpp (right): https://codereview.chromium.org/23819019/diff/41001/Source/core/page/FrameView.cpp#newcode1732 Source/core/page/FrameView.cpp:1732: layout(); The logical thing to do would be to ...
7 years, 3 months ago (2013-09-13 05:29:52 UTC) #12
bokan
I've rebased over mkosiba@'s CL and the setFixedLayoutSize method on WebViewImpl. Small note: I also ...
7 years, 3 months ago (2013-09-16 22:13:04 UTC) #13
aelias_OOO_until_Jul13
https://codereview.chromium.org/23819019/diff/5002/Source/core/page/FrameView.cpp File Source/core/page/FrameView.cpp (right): https://codereview.chromium.org/23819019/diff/5002/Source/core/page/FrameView.cpp#newcode1738 Source/core/page/FrameView.cpp:1738: void FrameView::visibleContentsResized() Hmm it looks like in today's Blink, ...
7 years, 3 months ago (2013-09-17 00:27:11 UTC) #14
kenneth.r.christiansen
https://codereview.chromium.org/23819019/diff/53001/Source/core/page/FrameView.cpp File Source/core/page/FrameView.cpp (right): https://codereview.chromium.org/23819019/diff/53001/Source/core/page/FrameView.cpp#newcode3433 Source/core/page/FrameView.cpp:3433: && doc && (doc->isHTMLDocument() || doc->isXHTMLDocument()); Why is this? ...
7 years, 3 months ago (2013-09-18 21:09:48 UTC) #15
bokan
I noticed that some layout tests were broken in the last patch so I've found ...
7 years, 3 months ago (2013-09-18 21:17:42 UTC) #16
bokan
https://codereview.chromium.org/23819019/diff/53001/Source/core/page/FrameView.cpp File Source/core/page/FrameView.cpp (right): https://codereview.chromium.org/23819019/diff/53001/Source/core/page/FrameView.cpp#newcode3433 Source/core/page/FrameView.cpp:3433: && doc && (doc->isHTMLDocument() || doc->isXHTMLDocument()); On 2013/09/18 21:09:49, ...
7 years, 3 months ago (2013-09-18 21:23:21 UTC) #17
bokan
aelias@, I've rebased and fixed to keep everything building and passing, PTAL when you have ...
7 years, 2 months ago (2013-09-30 19:05:30 UTC) #18
aelias_OOO_until_Jul13
https://chromiumcodereview.appspot.com/23819019/diff/65001/LayoutTests/TestExpectations File LayoutTests/TestExpectations (right): https://chromiumcodereview.appspot.com/23819019/diff/65001/LayoutTests/TestExpectations#newcode1298 LayoutTests/TestExpectations:1298: #Below test was broken but fixed with patch for ...
7 years, 2 months ago (2013-10-01 05:09:30 UTC) #19
bokan
https://codereview.chromium.org/23819019/diff/65001/LayoutTests/TestExpectations File LayoutTests/TestExpectations (right): https://codereview.chromium.org/23819019/diff/65001/LayoutTests/TestExpectations#newcode1298 LayoutTests/TestExpectations:1298: #Below test was broken but fixed with patch for ...
7 years, 2 months ago (2013-10-02 17:44:00 UTC) #20
aelias_OOO_until_Jul13
https://codereview.chromium.org/23819019/diff/65001/LayoutTests/TestExpectations File LayoutTests/TestExpectations (right): https://codereview.chromium.org/23819019/diff/65001/LayoutTests/TestExpectations#newcode1298 LayoutTests/TestExpectations:1298: #Below test was broken but fixed with patch for ...
7 years, 2 months ago (2013-10-02 18:59:58 UTC) #21
bokan
Done. If you're ok with this, please loop in an OWNER. https://codereview.chromium.org/23819019/diff/65001/LayoutTests/TestExpectations File LayoutTests/TestExpectations (right): ...
7 years, 2 months ago (2013-10-02 21:27:26 UTC) #22
aelias_OOO_until_Jul13
lgtm modulo comments below. Adding leviw@ for OWNERS. Please also edit your patch description not ...
7 years, 2 months ago (2013-10-03 00:35:16 UTC) #23
leviw_travelin_and_unemployed
LGTM. Great work!
7 years, 2 months ago (2013-10-03 00:46:09 UTC) #24
bokan
I added a frameViewScrollbarsExistenceDidChange method in RenderLayerCompositor that now gets called in the FrameView method ...
7 years, 2 months ago (2013-10-03 19:52:39 UTC) #25
aelias_OOO_until_Jul13
RenderLayerCompositor change looks good modulo one comment. https://codereview.chromium.org/23819019/diff/100001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/23819019/diff/100001/Source/core/rendering/RenderLayerCompositor.cpp#newcode1297 Source/core/rendering/RenderLayerCompositor.cpp:1297: updateOverflowControlsLayers(); Please ...
7 years, 2 months ago (2013-10-03 20:23:46 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bokan@chromium.org/23819019/116001
7 years, 2 months ago (2013-10-07 15:52:37 UTC) #27
commit-bot: I haz the power
7 years, 2 months ago (2013-10-07 19:26:03 UTC) #28
Message was sent while issue was closed.
Change committed as 159039

Powered by Google App Engine
This is Rietveld 408576698