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

Issue 1236913004: Expose scroll customization for touch to JS (behind REF). (Closed)

Created:
5 years, 5 months ago by tdresser
Modified:
5 years, 3 months ago
Reviewers:
haraken, Rick Byers
CC:
blink-reviews, kenneth.christiansen, vivekg, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, vivekg_samsung, Inactive, rwlbuis, oilpan-reviews, jochen (gone - plz use gerrit)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Expose scroll customization for touch to JS (behind REF). This is a reland of https://codereview.chromium.org/1209183004/, which was reverted because it caused both a memory leak and a sizes regression. This enables scroll customization of touch scrolls for JS. See http://goo.gl/xCBm7L for details. This is a followup to https://codereview.chromium.org/988823003, and completes landing https://codereview.chromium.org/850443002/. This approach replaces the previous approach, from https://codereview.chromium.org/1057603002. BUG=410974 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201736

Patch Set 1 : Reverted Patch #

Patch Set 2 : Remove callbacks in Document::dispatchUnloadEvents. #

Patch Set 3 : Fix test expectations. #

Total comments: 1

Patch Set 4 : Change map value to WeakMember, remove Document hack. #

Total comments: 16

Patch Set 5 : Address haraken@'s comments. #

Total comments: 4

Patch Set 6 : Return to clearing in Document::detach, add gc to layout tests. #

Patch Set 7 : Leak memory. #

Patch Set 8 : Add to leak expectations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+719 lines, -93 lines) Patch
M LayoutTests/LeakExpectations View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-basic.html View 6 1 chunk +45 lines, -45 lines 0 comments Download
M LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas.html View 6 2 chunks +12 lines, -12 lines 0 comments Download
M LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas-throw.html View 6 2 chunks +15 lines, -15 lines 0 comments Download
A LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-distribute-to-scroll-chain-descendant.html View 6 1 chunk +55 lines, -0 lines 0 comments Download
A LayoutTests/fast/scroll-behavior/scroll-customization/touch-scroll-customization.html View 1 2 3 4 5 6 1 chunk +255 lines, -0 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 3 4 6 3 chunks +10 lines, -3 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 7 chunks +76 lines, -5 lines 0 comments Download
M Source/core/dom/Element.idl View 1 6 2 chunks +9 lines, -0 lines 0 comments Download
M Source/core/input/EventHandler.cpp View 1 2 3 4 5 6 7 2 chunks +14 lines, -8 lines 0 comments Download
A Source/core/page/scrolling/ScrollCustomizationCallbacks.h View 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A Source/core/page/scrolling/ScrollCustomizationCallbacks.cpp View 1 2 3 4 6 1 chunk +47 lines, -0 lines 0 comments Download
M Source/core/page/scrolling/ScrollState.h View 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/page/scrolling/ScrollState.cpp View 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/scrolling/ScrollState.idl View 6 2 chunks +2 lines, -2 lines 0 comments Download
A Source/core/page/scrolling/ScrollStateCallback.h View 6 1 chunk +52 lines, -0 lines 0 comments Download
A Source/core/page/scrolling/ScrollStateCallback.cpp View 6 1 chunk +27 lines, -0 lines 0 comments Download
A Source/core/page/scrolling/ScrollStateCallback.idl View 6 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.idl View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 63 (8 generated)
tdresser
The previous implementation used a map from RawPtrWillBeWeakMember<Element> to Member<ScrollStateCallback>. However, the ScrollStateCallback may have ...
5 years, 4 months ago (2015-07-28 19:23:34 UTC) #2
tdresser
+jochen, who might have some thoughts on the right way to solve this problem.
5 years, 4 months ago (2015-07-29 13:40:30 UTC) #3
Rick Byers
On 2015/07/29 13:40:30, tdresser wrote: > +jochen, who might have some thoughts on the right ...
5 years, 4 months ago (2015-07-29 14:45:50 UTC) #4
haraken
On 2015/07/29 14:45:50, Rick Byers wrote: > On 2015/07/29 13:40:30, tdresser wrote: > > +jochen, ...
5 years, 4 months ago (2015-07-29 14:58:27 UTC) #5
tdresser
On 2015/07/29 14:58:27, haraken wrote: > On 2015/07/29 14:45:50, Rick Byers wrote: > > On ...
5 years, 4 months ago (2015-07-29 15:27:47 UTC) #6
haraken
On 2015/07/29 15:27:47, tdresser wrote: > On 2015/07/29 14:58:27, haraken wrote: > > On 2015/07/29 ...
5 years, 4 months ago (2015-07-29 16:41:55 UTC) #7
tdresser
On 2015/07/29 16:41:55, haraken wrote: > On 2015/07/29 15:27:47, tdresser wrote: > > On 2015/07/29 ...
5 years, 4 months ago (2015-07-29 17:08:02 UTC) #8
haraken
On 2015/07/29 17:08:02, tdresser wrote: > On 2015/07/29 16:41:55, haraken wrote: > > On 2015/07/29 ...
5 years, 4 months ago (2015-07-29 17:43:31 UTC) #9
haraken
On 2015/07/29 17:43:31, haraken wrote: > On 2015/07/29 17:08:02, tdresser wrote: > > On 2015/07/29 ...
5 years, 4 months ago (2015-07-29 17:46:48 UTC) #10
haraken
On 2015/07/29 17:46:48, haraken wrote: > On 2015/07/29 17:43:31, haraken wrote: > > On 2015/07/29 ...
5 years, 4 months ago (2015-07-29 17:48:09 UTC) #11
tdresser
Thanks for your help here! > So the problem is that you want to have ...
5 years, 4 months ago (2015-07-29 19:32:08 UTC) #12
haraken
On 2015/07/29 19:32:08, tdresser wrote: > Thanks for your help here! > > > So ...
5 years, 4 months ago (2015-07-29 19:40:22 UTC) #13
Rick Byers
On 2015/07/29 19:40:22, haraken wrote: > On 2015/07/29 19:32:08, tdresser wrote: > > Thanks for ...
5 years, 4 months ago (2015-07-29 23:45:39 UTC) #14
haraken
On 2015/07/29 23:45:39, Rick Byers (Out until Aug 4th) wrote: > On 2015/07/29 19:40:22, haraken ...
5 years, 4 months ago (2015-07-30 08:42:23 UTC) #15
tdresser
On 2015/07/30 08:42:23, haraken wrote: > On 2015/07/29 23:45:39, Rick Byers (Out until Aug 4th) ...
5 years, 4 months ago (2015-07-30 14:04:45 UTC) #16
haraken
On 2015/07/30 14:04:45, tdresser wrote: > On 2015/07/30 08:42:23, haraken wrote: > > On 2015/07/29 ...
5 years, 4 months ago (2015-07-30 14:17:20 UTC) #17
tdresser
> Just want to confirm, but our problem boils down to the following problem, > ...
5 years, 4 months ago (2015-07-30 14:25:16 UTC) #18
haraken
On 2015/07/30 14:25:16, tdresser wrote: > > Just want to confirm, but our problem boils ...
5 years, 4 months ago (2015-07-30 14:32:36 UTC) #19
tdresser
On 2015/07/30 14:32:36, haraken wrote: > On 2015/07/30 14:25:16, tdresser wrote: > > > Just ...
5 years, 4 months ago (2015-07-30 14:44:50 UTC) #20
haraken
On 2015/07/30 14:44:50, tdresser wrote: > On 2015/07/30 14:32:36, haraken wrote: > > On 2015/07/30 ...
5 years, 4 months ago (2015-07-30 14:58:08 UTC) #21
tdresser
On 2015/07/30 14:58:08, haraken wrote: > On 2015/07/30 14:44:50, tdresser wrote: > > On 2015/07/30 ...
5 years, 4 months ago (2015-07-31 14:47:11 UTC) #22
haraken
On 2015/07/31 14:47:11, tdresser wrote: > On 2015/07/30 14:58:08, haraken wrote: > > On 2015/07/30 ...
5 years, 4 months ago (2015-07-31 15:01:25 UTC) #23
tdresser
On 2015/07/31 15:01:25, haraken wrote: > On 2015/07/31 14:47:11, tdresser wrote: > > On 2015/07/30 ...
5 years, 4 months ago (2015-07-31 15:27:17 UTC) #24
haraken
On 2015/07/31 15:27:17, tdresser wrote: > On 2015/07/31 15:01:25, haraken wrote: > > On 2015/07/31 ...
5 years, 4 months ago (2015-07-31 15:49:17 UTC) #25
tdresser
What do you think of this approach? Event listeners require being explicitly removed as well. ...
5 years, 4 months ago (2015-08-13 17:20:23 UTC) #29
haraken
The approach looks good to me. https://codereview.chromium.org/1236913004/diff/100001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1236913004/diff/100001/Source/core/dom/Document.cpp#newcode2696 Source/core/dom/Document.cpp:2696: Element::removeScrollCustomizationCallbacksForDocument(this); Why do ...
5 years, 4 months ago (2015-08-13 23:42:05 UTC) #30
tdresser
On 2015/08/13 23:42:05, haraken wrote: > The approach looks good to me. > > https://codereview.chromium.org/1236913004/diff/100001/Source/core/dom/Document.cpp ...
5 years, 4 months ago (2015-08-14 13:07:18 UTC) #31
tdresser
On 2015/08/14 13:07:18, tdresser wrote: > On 2015/08/13 23:42:05, haraken wrote: > > The approach ...
5 years, 4 months ago (2015-08-19 12:35:16 UTC) #32
haraken
On 2015/08/19 12:35:16, tdresser wrote: > On 2015/08/14 13:07:18, tdresser wrote: > > On 2015/08/13 ...
5 years, 4 months ago (2015-08-19 14:13:20 UTC) #33
tdresser
On 2015/08/19 14:13:20, haraken wrote: > On 2015/08/19 12:35:16, tdresser wrote: > > On 2015/08/14 ...
5 years, 4 months ago (2015-08-19 17:22:19 UTC) #34
haraken
On 2015/08/19 17:22:19, tdresser wrote: > On 2015/08/19 14:13:20, haraken wrote: > > On 2015/08/19 ...
5 years, 4 months ago (2015-08-20 00:47:31 UTC) #35
tdresser
Thanks so much for sticking with this patch. I was misunderstanding the behavior of HeapHashMap<WeakMember<T>, ...
5 years, 3 months ago (2015-08-26 15:21:40 UTC) #36
haraken
https://codereview.chromium.org/1236913004/diff/120001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1236913004/diff/120001/Source/core/dom/Element.cpp#newcode498 Source/core/dom/Element.cpp:498: void Element::removeScrollCustomizationCallbacksForDocument(Document* document) Can we remove this? https://codereview.chromium.org/1236913004/diff/120001/Source/core/dom/Element.cpp#newcode547 Source/core/dom/Element.cpp:547: ...
5 years, 3 months ago (2015-08-27 00:49:41 UTC) #37
tdresser
Thanks for catching that cruft. https://codereview.chromium.org/1236913004/diff/120001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1236913004/diff/120001/Source/core/dom/Element.cpp#newcode498 Source/core/dom/Element.cpp:498: void Element::removeScrollCustomizationCallbacksForDocument(Document* document) On ...
5 years, 3 months ago (2015-08-27 20:48:40 UTC) #39
haraken
LGTM! I want to have Rick take a final look from the perspective of the ...
5 years, 3 months ago (2015-08-28 00:14:13 UTC) #40
tdresser
We're fine landing (behind the flag) with this behavior for now, but we definitely will ...
5 years, 3 months ago (2015-08-28 12:18:02 UTC) #42
Rick Byers
Nice, LGTM! Thanks tdresser@ and haraken@ for all the patience in coming up with something ...
5 years, 3 months ago (2015-08-30 20:57:50 UTC) #43
haraken
https://codereview.chromium.org/1236913004/diff/160001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1236913004/diff/160001/Source/core/dom/Element.cpp#newcode181 Source/core/dom/Element.cpp:181: scrollCustomizationCallbacks().removeCallbacksForElement(this); On 2015/08/30 20:57:50, Rick Byers (Out until 9-4) ...
5 years, 3 months ago (2015-08-30 22:21:38 UTC) #44
tdresser
Sorry, this solution doesn't work, as nothing has a strong reference to the callback. I've ...
5 years, 3 months ago (2015-08-31 14:01:56 UTC) #45
haraken
On 2015/08/31 14:01:56, tdresser wrote: > Sorry, this solution doesn't work, as nothing has a ...
5 years, 3 months ago (2015-08-31 23:49:10 UTC) #46
haraken
On 2015/08/31 23:49:10, haraken wrote: > On 2015/08/31 14:01:56, tdresser wrote: > > Sorry, this ...
5 years, 3 months ago (2015-08-31 23:49:58 UTC) #47
tdresser
> > It is wrong to do this kind of lifetime management in Document::detach(). Some ...
5 years, 3 months ago (2015-09-01 13:23:54 UTC) #48
haraken
On 2015/09/01 13:23:54, tdresser wrote: > > > It is wrong to do this kind ...
5 years, 3 months ago (2015-09-01 13:41:37 UTC) #49
tdresser
> I said that in a sense that "if you really have to remove the ...
5 years, 3 months ago (2015-09-01 14:17:28 UTC) #50
tdresser
kouhei@, is there any way to add a leak suppression for a testharness.js test? The ...
5 years, 3 months ago (2015-09-01 14:19:16 UTC) #51
haraken
On 2015/09/01 14:17:28, tdresser wrote: > > I said that in a sense that "if ...
5 years, 3 months ago (2015-09-01 14:34:36 UTC) #52
tdresser
On 2015/09/01 14:34:36, haraken wrote: > On 2015/09/01 14:17:28, tdresser wrote: > > > I ...
5 years, 3 months ago (2015-09-01 14:40:09 UTC) #53
haraken
On 2015/09/01 14:40:09, tdresser wrote: > On 2015/09/01 14:34:36, haraken wrote: > > On 2015/09/01 ...
5 years, 3 months ago (2015-09-01 14:43:57 UTC) #54
kouhei (in TOK)
> kouhei@, is there any way to add a leak suppression for a testharness.js test? ...
5 years, 3 months ago (2015-09-02 22:05:16 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1236913004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1236913004/220001
5 years, 3 months ago (2015-09-03 19:14:20 UTC) #58
commit-bot: I haz the power
Committed patchset #8 (id:220001) as https://src.chromium.org/viewvc/blink?view=rev&revision=201736
5 years, 3 months ago (2015-09-03 19:19:33 UTC) #59
haraken
On 2015/09/03 19:19:33, commit-bot: I haz the power wrote: > Committed patchset #8 (id:220001) as ...
5 years, 3 months ago (2015-09-04 00:17:49 UTC) #60
tdresser1
On 2015/09/04 00:17:49, haraken wrote: > On 2015/09/03 19:19:33, commit-bot: I haz the power wrote: ...
5 years, 3 months ago (2015-09-04 00:42:43 UTC) #61
tdresser1
On 2015/09/04 00:42:43, tdresser-g wrote: > On 2015/09/04 00:17:49, haraken wrote: > > On 2015/09/03 ...
5 years, 3 months ago (2015-09-04 01:47:47 UTC) #62
tdresser
5 years, 3 months ago (2015-09-04 12:51:52 UTC) #63
Message was sent while issue was closed.
On 2015/09/04 01:47:47, tdresser-g wrote:
> On 2015/09/04 00:42:43, tdresser-g wrote:
> > On 2015/09/04 00:17:49, haraken wrote:
> > > On 2015/09/03 19:19:33, commit-bot: I haz the power wrote:
> > > > Committed patchset #8 (id:220001) as
> > > > https://src.chromium.org/viewvc/blink?view=rev&revision=201736
> > > 
> > > This caused leaks:
> > > http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak
> > 
> > I'll add the suppression first thing tomorrow morning.
> 
> Assuming this is the same leak as the one I've already suppressed.

Suppression added here:
https://codereview.chromium.org/1326083003/

I've verified this leak is expected.

Powered by Google App Engine
This is Rietveld 408576698