In an effort to ultimately eliminate DeprecatedPaintLayer I am moving HitTest functionality out of DeprecatedPaintLayer ...
4 years, 11 months ago
(2015-06-04 17:00:40 UTC)
#3
In an effort to ultimately eliminate DeprecatedPaintLayer I am moving HitTest
functionality out of DeprecatedPaintLayer into DeprecatedPaintLayerStackingNode.
I think it would ultimately be better design to have StackingNode return only an
ordered vector of stacking context roots and have LayoutView iterate over the
vector and traverse each stacking context tree for hit testing. That way
StackingNode would remain ignorant of painting/hit testing, and the LayoutView
could handle painting by just taking the same array and traversing it backwards.
For now, however, I am keeping the painting and hit testing code separate.
dsinclair
Can you add a BUG= link to the tracing bug? And expand the description a ...
4 years, 11 months ago
(2015-06-04 17:39:02 UTC)
#4
Can you add a BUG= link to the tracing bug? And expand the description a bit
with what you're doing in this CL?
chadarmstrong
On 2015/06/04 17:39:02, dsinclair wrote: > Can you add a BUG= link to the tracing ...
4 years, 11 months ago
(2015-06-04 18:11:41 UTC)
#5
On 2015/06/04 17:39:02, dsinclair wrote:
> Can you add a BUG= link to the tracing bug? And expand the description a bit
> with what you're doing in this CL?
Done
dsinclair
https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp File Source/core/paint/DeprecatedPaintLayerStackingNode.cpp (right): https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp#newcode341 Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:341: // I do believe it would be better to ...
4 years, 11 months ago
(2015-06-04 18:21:23 UTC)
#6
https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp File Source/core/paint/DeprecatedPaintLayerStackingNode.cpp (right): https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp#newcode341 Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:341: // I do believe it would be better to ...
4 years, 11 months ago
(2015-06-04 18:43:39 UTC)
#7
https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp File Source/core/paint/DeprecatedPaintLayerStackingNode.cpp (right): https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp#newcode343 Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:343: // and painting abstracted from this class. On 2015/06/04 ...
4 years, 11 months ago
(2015-06-05 00:46:55 UTC)
#8
https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/Depre...
File Source/core/paint/DeprecatedPaintLayerStackingNode.cpp (right):
https://codereview.chromium.org/1158673008/diff/20001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:343: // and painting
abstracted from this class.
On 2015/06/04 at 18:43:38, chadarmstrong wrote:
> On 2015/06/04 18:21:22, dsinclair wrote:
> > What's stopping us from doing this approach? Is it a lot more work?
>
> Julien believes that allocating an extra array and traversing the tree in two
steps might not be worth the code simplification. I left this comment here to
get other people's thoughts on this as well.
I strongly believe that this will lead to worse runtime and memory complexity
and unless the code simplification is significant (we discussed this with Chad
and I wasn't convinced in the end), no sane reviewer would accept the change. I
won't hold the change if you see something I missed.
Experimental alternative designs do not belong in a TODO IMHO: we should reserve
TODO for changes we have a high chance of pursuing. They do belong to a
crbug.com bug though.
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
File Source/core/paint/DeprecatedPaintLayer.h (right):
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayer.h:531: DeprecatedPaintLayer*
hitTestLayer(DeprecatedPaintLayer* rootLayer, DeprecatedPaintLayer*
containerLayer, HitTestResult&,
I would assume we would want to pass |const DeprecatedPaintLayer*| in this
function. Any reason why it's not the case? (this is a follow-up change btw)
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
File Source/core/paint/DeprecatedPaintLayerStackingNode.cpp (right):
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:343: // and painting
abstracted from this class.
This is better in a bug IMHO (see other comment).
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:351:
ASSERT(layer()->isSelfPaintingLayer() ||
layer()->hasSelfPaintingLayerDescendant());
The hit testing code only calls this function on LayoutView's layer so this
ASSERT is trivially true. Not sure about the accessibility code but I would
expect that they must be calling this on LayoutView or else it wouldn't be
correct.
If we assume this can only be called from LayoutView, then this code belongs to
LayoutView.
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
File Source/core/paint/DeprecatedPaintLayerStackingNode.h (right):
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayerStackingNode.h:100: // The hitTest()
method looks for mouse events by walking layers that intersect the point from
front to back.
This ancient comment could definitely be improved upon.
Chad, describing in more details what you've learned about hit testing here
would be super helpful. Especially since this is the actual starting point of
hit testing.
4 years, 11 months ago
(2015-06-05 17:24:35 UTC)
#9
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
File Source/core/paint/DeprecatedPaintLayer.h (right):
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayer.h:531: DeprecatedPaintLayer*
hitTestLayer(DeprecatedPaintLayer* rootLayer, DeprecatedPaintLayer*
containerLayer, HitTestResult&,
On 2015/06/05 00:46:54, Julien Chaffraix - PST wrote:
> I would assume we would want to pass |const DeprecatedPaintLayer*| in this
> function. Any reason why it's not the case? (this is a follow-up change btw)
Acknowledged.
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
File Source/core/paint/DeprecatedPaintLayerStackingNode.cpp (right):
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:343: // and painting
abstracted from this class.
On 2015/06/05 00:46:55, Julien Chaffraix - PST wrote:
> This is better in a bug IMHO (see other comment).
Added bug 497219
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayerStackingNode.cpp:351:
ASSERT(layer()->isSelfPaintingLayer() ||
layer()->hasSelfPaintingLayerDescendant());
On 2015/06/05 00:46:55, Julien Chaffraix - PST wrote:
> The hit testing code only calls this function on LayoutView's layer so this
> ASSERT is trivially true. Not sure about the accessibility code but I would
> expect that they must be calling this on LayoutView or else it wouldn't be
> correct.
>
> If we assume this can only be called from LayoutView, then this code belongs
to
> LayoutView.
That should be a different CL
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
File Source/core/paint/DeprecatedPaintLayerStackingNode.h (right):
https://codereview.chromium.org/1158673008/diff/40001/Source/core/paint/Depre...
Source/core/paint/DeprecatedPaintLayerStackingNode.h:100: // The hitTest()
method looks for mouse events by walking layers that intersect the point from
front to back.
On 2015/06/05 00:46:55, Julien Chaffraix - PST wrote:
> This ancient comment could definitely be improved upon.
>
> Chad, describing in more details what you've learned about hit testing here
> would be super helpful. Especially since this is the actual starting point of
> hit testing.
I was planning on it, but I would rather hold off until all the changes are
done.
Julien - ping for review
lgtm The description should follow git's - slightly modified - guidelines: - first line is ...
4 years, 11 months ago
(2015-06-05 20:19:28 UTC)
#10
lgtm
The description should follow git's - slightly modified - guidelines:
- first line is a short description, ideally less than 50 lines.
- one empty line.
- long description should wrap at 80 characters. I like to advise a 72
characters' limit (see the rationale here
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/rqGhY7PfkYY).
URLs longer than the limit ends up on their own line.
chadarmstrong
The CQ bit was checked by chadarmstrong@google.com
4 years, 11 months ago
(2015-06-05 22:47:30 UTC)
#11
Try jobs failed on following builders: blink_presubmit on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/34749)
4 years, 11 months ago
(2015-06-05 22:54:01 UTC)
#14
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/1175623002/ by chadarmstrong@google.com. ...
4 years, 10 months ago
(2015-06-09 16:56:10 UTC)
#21
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/1175623002/ by chadarmstrong@google.com.
The reason for reverting is: We just learned that Slimming Paint will also be
modifying the Hit Testing code, and it would therefore be better to leave the
code as is for now..
Issue 1158673008: Moving HitTest function to DeprecatedPaintLayerStackingNode.
(Closed)
Created 4 years, 11 months ago by chadarmstrong
Modified 4 years, 10 months ago
Reviewers: Julien - ping for review, dsinclair, dmazzoni
Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Comments: 15