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

Issue 945693002: Move hit testing out of RenderLayer into RenderBox. (Closed)

Created:
5 years, 10 months ago by ojan
Modified:
5 years, 10 months ago
Reviewers:
abarth-chromium
CC:
abarth-chromium, esprehn, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Move hit testing out of RenderLayer into RenderBox. Change hit testing to walk over the render tree instead of the RenderLayer tree. This is a step in the direction of removing the RenderLayer tree entirely. For now, there's a few calls back into RenderLayer that will be removed in a followup patch. This patch also breaks hit testing on transformed inlines. I'll be removing the ability to transform inlines in a followup patch anyways, so it's ok for hit testing to give the wrong result temporarily here. Almost all of this patch is just moving code from RenderLayer to RenderBox. The primary substantive change is in RenderBox::hitTestLayer. Instead of having hitTestChildren calls, we call collectSelfPaintingLayers, reverse sort by z-index (so we start at the top), and then iterate over the result. The test-case also exposes that we don't correctly hit transformed elements inside inline-blocks. I went back as far as 4153b8a515d54275934d4244aaf2d5a7a8fe3333 and the bug still happened. R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/47eb802054ee5f6999af66f845dd068f96c8f7f8

Patch Set 1 #

Patch Set 2 : rename method #

Patch Set 3 : add to test case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -298 lines) Patch
M sky/engine/core/rendering/RenderBox.h View 1 2 3 chunks +13 lines, -0 lines 0 comments Download
M sky/engine/core/rendering/RenderBox.cpp View 1 2 3 chunks +255 lines, -2 lines 0 comments Download
M sky/engine/core/rendering/RenderLayer.h View 5 chunks +4 lines, -20 lines 0 comments Download
M sky/engine/core/rendering/RenderLayer.cpp View 1 chunk +0 lines, -275 lines 0 comments Download
M sky/engine/core/rendering/RenderLayerModelObject.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sky/engine/core/rendering/RenderLayerModelObject.cpp View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
M sky/engine/core/rendering/RenderView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M sky/tests/layout/document-elementFromPoint.sky View 1 2 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (1 generated)
abarth-chromium
lgtm
5 years, 10 months ago (2015-02-20 05:18:23 UTC) #2
ojan
5 years, 10 months ago (2015-02-20 05:31:47 UTC) #3
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
47eb802054ee5f6999af66f845dd068f96c8f7f8 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698