|
|
Chromium Code Reviews|
Created:
4 years, 5 months ago by bokan Modified:
4 years, 5 months ago Reviewers:
tdresser CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMoved RootFrameViewport creation to happen after document attachment
I previously placed this to happen just before the first layout but that was
overly conservative; we really just need the document to be attached. This will
allow constructing a ViewportScrollCallback for a FrameView in just one place
for both root and nested frames. This will be needed in the setRootScroller
proposal in future patches.
BUG=505516
Committed: https://crrev.com/3efe8736a302182bff2e9101044fd8e15668bbb6
Cr-Commit-Position: refs/heads/master@{#403973}
Patch Set 1 #Patch Set 2 : Moved RootFrameViewport creation to happen after document attachment #Patch Set 3 : Moved RootFrameViewport creation to happen after document attachment #
Total comments: 2
Patch Set 4 : Moved RootFrameViewport creation to happen after document attachment #
Dependent Patchsets: Messages
Total messages: 33 (15 generated)
The CQ bit was checked by bokan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...)
The CQ bit was checked by bokan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by bokan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will make it easier to perform actions once we know the FrameView has initialized its ScrollableArea which will be needed for the setRootScroller proposal. BUG=505516 ========== to ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will make it easier to perform actions once we know the FrameView has initialized its ScrollableArea which will be needed for the setRootScroller proposal. BUG=505516 ==========
bokan@chromium.org changed reviewers: + tdresser@chromium.org
Tim, ptal. This is the first in a series of 3 patches to make the root scroller act as the layout viewport. The other two are up as well and marked as dependent patchsets. The overall motivation is in the last one but I split out the first two to make it easier to review.
On 2016/07/06 17:53:09, bokan wrote: > Tim, ptal. This is the first in a series of 3 patches to make the root scroller > act as the layout viewport. The other two are up as well and marked as dependent > patchsets. The overall motivation is in the last one but I split out the first > two to make it easier to review. "This will make it easier to perform actions once we know the FrameView has initialized its ScrollableArea which will be needed for the setRootScroller proposal." I find this sentence a bit confusing. Am I correct to interpret this as "This allows RootFrameViewport's constructor to depend on the FrameView having an attached document"? Code LGTM, just want to make sure I understand the purpose.
https://codereview.chromium.org/2123663003/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2123663003/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Document.cpp:2126: frameView->didAttachDocument(); I'd be just as happy with: if (view()) view()->didAttachDocument(). Either way.
Description was changed from ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will make it easier to perform actions once we know the FrameView has initialized its ScrollableArea which will be needed for the setRootScroller proposal. BUG=505516 ========== to ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will allow constructing a ViewportScrollCallback for a FrameView in just one place for both root and nested frames. This will be needed in the setRootScroller proposal in future patches. BUG=505516 ==========
On 2016/07/06 18:16:15, tdresser wrote: > On 2016/07/06 17:53:09, bokan wrote: > > Tim, ptal. This is the first in a series of 3 patches to make the root > scroller > > act as the layout viewport. The other two are up as well and marked as > dependent > > patchsets. The overall motivation is in the last one but I split out the first > > two to make it easier to review. > > "This will > make it easier to perform actions once we know the FrameView has initialized its > ScrollableArea which will be needed for the setRootScroller proposal." > > I find this sentence a bit confusing. > > Am I correct to interpret this as "This allows RootFrameViewport's constructor > to depend on the FrameView having an attached document"? That was already the case. The reason is that in the dependent patches the ViewportScrollCallback needs to be constructed after the FrameView has a document since in root-layer-scrolls the LayoutView provides the ScrollableArea. Before attachment happens FrameView won't have a ScrollableArea. The change to make this necessary is that the RootViewportScrollCallback now gets the RootFrameViewport pointer at construction. The old code also needed this for RootFrameViewport but it made this happen in prelayout and short circuited after it's happened once. This can't be easily used for child frames though without adding a flag in FrameView but this is a cleaner approach. > Code LGTM, just want to make sure I understand the purpose.
On 2016/07/06 18:41:04, bokan wrote: > On 2016/07/06 18:16:15, tdresser wrote: > > On 2016/07/06 17:53:09, bokan wrote: > > > Tim, ptal. This is the first in a series of 3 patches to make the root > > scroller > > > act as the layout viewport. The other two are up as well and marked as > > dependent > > > patchsets. The overall motivation is in the last one but I split out the > first > > > two to make it easier to review. > > > > "This will > > make it easier to perform actions once we know the FrameView has initialized > its > > ScrollableArea which will be needed for the setRootScroller proposal." > > > > I find this sentence a bit confusing. > > > > Am I correct to interpret this as "This allows RootFrameViewport's constructor > > to depend on the FrameView having an attached document"? > > That was already the case. > > The reason is that in the dependent patches the ViewportScrollCallback needs to > be constructed after the FrameView has a document since in root-layer-scrolls > the LayoutView provides the ScrollableArea. Before attachment happens FrameView > won't have a ScrollableArea. The change to make this necessary is that the > RootViewportScrollCallback now gets the RootFrameViewport pointer at > construction. > > The old code also needed this for RootFrameViewport but it made this happen in > prelayout and short circuited after it's happened once. This can't be easily > used for child frames though without adding a flag in FrameView but this is a > cleaner approach. > > > Code LGTM, just want to make sure I understand the purpose. Updated description to make this more clear.
https://codereview.chromium.org/2123663003/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2123663003/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Document.cpp:2126: frameView->didAttachDocument(); On 2016/07/06 18:28:33, tdresser wrote: > I'd be just as happy with: > if (view()) > view()->didAttachDocument(). > > Either way. Done.
The CQ bit was checked by bokan@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tdresser@chromium.org Link to the patchset: https://codereview.chromium.org/2123663003/#ps60001 (title: "Moved RootFrameViewport creation to happen after document attachment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by bokan@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will allow constructing a ViewportScrollCallback for a FrameView in just one place for both root and nested frames. This will be needed in the setRootScroller proposal in future patches. BUG=505516 ========== to ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will allow constructing a ViewportScrollCallback for a FrameView in just one place for both root and nested frames. This will be needed in the setRootScroller proposal in future patches. BUG=505516 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
CQ bit was unchecked.
Message was sent while issue was closed.
Description was changed from ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will allow constructing a ViewportScrollCallback for a FrameView in just one place for both root and nested frames. This will be needed in the setRootScroller proposal in future patches. BUG=505516 ========== to ========== Moved RootFrameViewport creation to happen after document attachment I previously placed this to happen just before the first layout but that was overly conservative; we really just need the document to be attached. This will allow constructing a ViewportScrollCallback for a FrameView in just one place for both root and nested frames. This will be needed in the setRootScroller proposal in future patches. BUG=505516 Committed: https://crrev.com/3efe8736a302182bff2e9101044fd8e15668bbb6 Cr-Commit-Position: refs/heads/master@{#403973} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/3efe8736a302182bff2e9101044fd8e15668bbb6 Cr-Commit-Position: refs/heads/master@{#403973} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
