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

Issue 1319863006: (blink) Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed)

Created:
5 years, 3 months ago by lazyboy
Modified:
5 years, 1 month ago
Reviewers:
alexmos
CC:
dcheng, blink-reviews, blink-reviews-html_chromium.org, dglazkov+blink, mlamouri+watch-blink_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

(blink) Propagate scrolling/marginwidth/marginheight property values to child frame. We send these values in two cases: 1) Initally when we're creating a frame (by sending FrameHostMsg_CreateChildFrame), we send all of these properties in a WebFrameOwnerProperties struct. 2) Once the parent frame dynamically changes any of these properties. For the tree properties we have: didChangeSrollingMode() didChangeMarginWidth() didChangeMarginHeight() BUG=524725

Patch Set 1 #

Patch Set 2 : try 2 #

Patch Set 3 : Update. #

Total comments: 6

Patch Set 4 : address comments + static_cast for enum conversion #

Patch Set 5 : address comments + static_cast for enum conversion #

Total comments: 29

Patch Set 6 : add a null check #

Patch Set 7 : address comments from Alex #

Total comments: 12

Patch Set 8 : address comments #

Patch Set 9 : address comments from Alex #

Patch Set 10 : Add WebFrameTest #

Patch Set 11 : add a TODO from chromium CLs review comment #

Total comments: 6

Patch Set 12 : Sync #

Patch Set 13 : address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -97 lines) Patch
M Source/core/frame/FrameOwner.h View 2 chunks +5 lines, -0 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -10 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLBodyElement.cpp View 1 2 3 4 5 6 1 chunk +8 lines, -10 lines 0 comments Download
M Source/core/html/HTMLFrameElementBase.h View 1 2 3 4 2 chunks +0 lines, -11 lines 0 comments Download
M Source/core/html/HTMLFrameElementBase.cpp View 1 2 3 2 chunks +4 lines, -7 lines 0 comments Download
M Source/core/html/HTMLFrameOwnerElement.h View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -2 lines 0 comments Download
M Source/core/html/HTMLFrameOwnerElement.cpp View 1 2 3 4 5 6 7 8 2 chunks +38 lines, -0 lines 0 comments Download
M Source/core/loader/FrameFetchContextTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/loader/FrameLoaderClient.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M Source/web/AssertMatchingEnums.cpp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/web/FrameLoaderClientImpl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/FrameLoaderClientImpl.cpp View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M Source/web/RemoteBridgeFrameOwner.h View 1 2 3 4 5 6 3 chunks +15 lines, -3 lines 0 comments Download
M Source/web/RemoteBridgeFrameOwner.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M Source/web/WebFrame.cpp View 1 2 3 4 5 6 2 chunks +13 lines, -0 lines 0 comments Download
M Source/web/WebLocalFrameImpl.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -5 lines 0 comments Download
M Source/web/WebRemoteFrameImpl.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebRemoteFrameImpl.cpp View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M Source/web/tests/FrameTestHelpers.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/FrameTestHelpers.cpp View 1 2 3 4 5 6 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 21 chunks +85 lines, -24 lines 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
A Source/web/tests/data/frame_owner_properties.html View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
M public/blink_headers.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M public/web/WebFrame.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -0 lines 0 comments Download
M public/web/WebFrameClient.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
A + public/web/WebFrameOwnerProperties.h View 1 2 3 4 5 6 1 chunk +26 lines, -9 lines 0 comments Download
M public/web/WebLocalFrame.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M public/web/WebRemoteFrame.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (3 generated)
lazyboy
Alex, can you check the overall structure of the CL? The chromium side CL is ...
5 years, 3 months ago (2015-09-01 18:58:54 UTC) #2
dcheng
Some initial thoughts. https://codereview.chromium.org/1319863006/diff/40001/Source/core/html/HTMLIFrameElement.cpp File Source/core/html/HTMLIFrameElement.cpp (right): https://codereview.chromium.org/1319863006/diff/40001/Source/core/html/HTMLIFrameElement.cpp#newcode123 Source/core/html/HTMLIFrameElement.cpp:123: } else if (name == marginwidthAttr) ...
5 years, 3 months ago (2015-09-02 06:38:26 UTC) #4
lazyboy
https://chromiumcodereview.appspot.com/1319863006/diff/40001/Source/core/html/HTMLIFrameElement.cpp File Source/core/html/HTMLIFrameElement.cpp (right): https://chromiumcodereview.appspot.com/1319863006/diff/40001/Source/core/html/HTMLIFrameElement.cpp#newcode123 Source/core/html/HTMLIFrameElement.cpp:123: } else if (name == marginwidthAttr) { On 2015/09/02 ...
5 years, 3 months ago (2015-09-02 16:56:30 UTC) #5
alexmos
+site-isolation-reviews Thanks for taking this on, some more comments below. The overall structure looks good. ...
5 years, 3 months ago (2015-09-02 21:37:06 UTC) #6
lazyboy
Hi Alex, Sorry for the delay here. I've updated the CL making same-site subframe navigations ...
5 years, 3 months ago (2015-09-15 01:40:33 UTC) #7
dcheng
https://codereview.chromium.org/1319863006/diff/120001/public/web/WebFrame.h File public/web/WebFrame.h (right): https://codereview.chromium.org/1319863006/diff/120001/public/web/WebFrame.h#newcode181 public/web/WebFrame.h:181: BLINK_EXPORT void setFrameOwnerProperties(const WebFrameOwnerProperties&); Like sandbox, these are properties ...
5 years, 3 months ago (2015-09-15 21:52:47 UTC) #8
lazyboy
https://codereview.chromium.org/1319863006/diff/120001/public/web/WebFrame.h File public/web/WebFrame.h (right): https://codereview.chromium.org/1319863006/diff/120001/public/web/WebFrame.h#newcode181 public/web/WebFrame.h:181: BLINK_EXPORT void setFrameOwnerProperties(const WebFrameOwnerProperties&); On 2015/09/15 21:52:47, dcheng wrote: ...
5 years, 3 months ago (2015-09-15 23:50:31 UTC) #9
alexmos
https://codereview.chromium.org/1319863006/diff/80001/Source/core/html/HTMLFrameOwnerElement.cpp File Source/core/html/HTMLFrameOwnerElement.cpp (right): https://codereview.chromium.org/1319863006/diff/80001/Source/core/html/HTMLFrameOwnerElement.cpp#newcode202 Source/core/html/HTMLFrameOwnerElement.cpp:202: document().frame()->loader().client()->didChangeScrollingMode(contentFrame(), scrollbarMode); On 2015/09/15 01:40:32, lazyboy wrote: > On ...
5 years, 3 months ago (2015-09-16 00:36:47 UTC) #10
lazyboy
https://chromiumcodereview.appspot.com/1319863006/diff/120001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (left): https://chromiumcodereview.appspot.com/1319863006/diff/120001/Source/core/frame/FrameView.cpp#oldcode596 Source/core/frame/FrameView.cpp:596: return; On 2015/09/16 00:36:47, alexmos wrote: > Was losing ...
5 years, 3 months ago (2015-09-17 20:48:39 UTC) #11
alexmos
LGTM - a couple of questions below, but I think this is ready for a ...
5 years, 3 months ago (2015-09-21 16:58:08 UTC) #12
lazyboy
Addressed comments in patch set #9. Any test ideas in blink? Or is browsertest in ...
5 years, 3 months ago (2015-09-21 18:04:51 UTC) #13
alexmos
On 2015/09/21 18:04:51, lazyboy wrote: > Addressed comments in patch set #9. Thanks! > Any ...
5 years, 3 months ago (2015-09-21 18:18:09 UTC) #14
lazyboy
I've added two blink tests in WebFrameTest in patch set #10
5 years, 3 months ago (2015-09-21 20:58:30 UTC) #15
alexmos
Tests LGTM with nits, thanks for adding! https://codereview.chromium.org/1319863006/diff/200001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (right): https://codereview.chromium.org/1319863006/diff/200001/Source/web/tests/WebFrameTest.cpp#newcode1629 Source/web/tests/WebFrameTest.cpp:1629: FrameView* frameView ...
5 years, 3 months ago (2015-09-22 16:48:23 UTC) #16
lazyboy
5 years, 3 months ago (2015-09-22 22:02:43 UTC) #17
https://codereview.chromium.org/1319863006/diff/200001/Source/web/tests/WebFr...
File Source/web/tests/WebFrameTest.cpp (right):

https://codereview.chromium.org/1319863006/diff/200001/Source/web/tests/WebFr...
Source/web/tests/WebFrameTest.cpp:1629: FrameView* frameView =
static_cast<WebLocalFrameImpl*>(localFrame)->frameView();
On 2015/09/22 16:48:23, alexmos wrote:
> nit: maybe add a comment about what this is checking? (that scrollbars are
> enabled by default)

Done.

https://codereview.chromium.org/1319863006/diff/200001/Source/web/tests/WebFr...
Source/web/tests/WebFrameTest.cpp:1647: // Turn of scrolling in the subframe.
On 2015/09/22 16:48:23, alexmos wrote:
> nit: s/of/off/

Done.

https://codereview.chromium.org/1319863006/diff/200001/public/web/WebFrame.h
File public/web/WebFrame.h (right):

https://codereview.chromium.org/1319863006/diff/200001/public/web/WebFrame.h#...
public/web/WebFrame.h:175: // FIXME: Currently, the update only takes effect on
next frame navigation.
On 2015/09/22 16:48:23, alexmos wrote:
> We don't need this FIXME on sandbox flags, as this is intentional for them
(this
> is what the spec says).  Did you mean to put this on setFrameOwnerProperties
> below?
Yes.
> 
> Also, Blink now uses TODO(someone) instead of FIXME.

Done.

Powered by Google App Engine
This is Rietveld 408576698