|
|
Created:
4 years, 11 months ago by nolan.robin.cao Modified:
4 years, 11 months ago CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1 Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionIncorrect element hit testing for inline elements containing children with transform applied
If the previous inline box has layer, we need to call |LayoutInline::hitTestCulledInline()|
on current inline box's parent.
BUG=576655
Committed: https://crrev.com/e7df09b4a3b1370dda95e11625d9dbdb1bfb99a4
Cr-Commit-Position: refs/heads/master@{#370072}
Patch Set 1 #
Total comments: 5
Patch Set 2 : Update code and comments #
Messages
Total messages: 21 (9 generated)
Description was changed from ========== Incorrect element hit testing for inline elements containing children with transform applied If the previous inline box has layer, we need to call |LayoutInline::hitTestCulledInline()| on current inline box's parent. BUG=576655 ========== to ========== Incorrect element hit testing for inline elements containing children with transform applied If the previous inline box has layer, we need to call |LayoutInline::hitTestCulledInline()| on current inline box's parent. BUG=576655 ==========
nolan.robin.cao@gmail.com changed reviewers: + wangxianzhu@chromium.org
nolan.robin.cao@gmail.com changed reviewers: + mstensho@opera.com
PTAL. Thanks!
https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp (right): https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp:1016: // we hit test it before we move the previous inline box. Can you also update the comments which seem inaccurate. It seems that we hit test the culled inline when the current inline box has no previous descendant under the culled inline. (I'm not super familiar with the code, so please correct me if I'm wrong.) https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp:1027: if (culledParent == lineLayoutItem() || (hasSibling && prev && prev->lineLayoutItem().isDescendantOf(culledParent) && !(prev->boxModelObject() && prev->boxModelObject().hasSelfPaintingLayer()))) I think this is to workaround the 'continue' at line 1003, so we should change that place instead of here: 1012 if (!curr->boxModelObject() || !curr->boxModelObject().hasSelfPaintingLayer()) { 1013 if (curr->nodeAtPoint(...) { ... } }
On 2016/01/14 21:45:26, Xianzhu wrote: > https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... > File third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp (right): > > https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... > third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp:1016: // we hit > test it before we move the previous inline box. > Can you also update the comments which seem inaccurate. It seems that we hit > test the culled inline when the current inline box has no previous descendant > under the culled inline. (I'm not super familiar with the code, so please > correct me if I'm wrong.) > > https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... > third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp:1027: if > (culledParent == lineLayoutItem() || (hasSibling && prev && > prev->lineLayoutItem().isDescendantOf(culledParent) && !(prev->boxModelObject() > && prev->boxModelObject().hasSelfPaintingLayer()))) > I think this is to workaround the 'continue' at line 1003, so we should change > that place instead of here: > > 1012 if (!curr->boxModelObject() || > !curr->boxModelObject().hasSelfPaintingLayer()) { > 1013 if (curr->nodeAtPoint(...) { > ... > } > } s/1012/1002/ s/1013/1003/
https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp (right): https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp:1016: // we hit test it before we move the previous inline box. On 2016/01/14 21:45:25, Xianzhu wrote: > Can you also update the comments which seem inaccurate. It seems that we hit > test the culled inline when the current inline box has no previous descendant > under the culled inline. (I'm not super familiar with the code, so please > correct me if I'm wrong.) Yes, it's not consistent with comments inside the while loop. I'd like to change it to: // Hit test the culled inline if necessary. https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp:1027: if (culledParent == lineLayoutItem() || (hasSibling && prev && prev->lineLayoutItem().isDescendantOf(culledParent) && !(prev->boxModelObject() && prev->boxModelObject().hasSelfPaintingLayer()))) On 2016/01/14 21:45:25, Xianzhu wrote: > I think this is to workaround the 'continue' at line 1003, so we should change > that place instead of here: > > 1012 if (!curr->boxModelObject() || > !curr->boxModelObject().hasSelfPaintingLayer()) { > 1013 if (curr->nodeAtPoint(...) { > ... > } > } Good point!
https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp (right): https://codereview.chromium.org/1588003003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp:1016: // we hit test it before we move the previous inline box. On 2016/01/15 03:25:33, nolan.robin.cao wrote: > On 2016/01/14 21:45:25, Xianzhu wrote: > > Can you also update the comments which seem inaccurate. It seems that we hit > > test the culled inline when the current inline box has no previous descendant > > under the culled inline. (I'm not super familiar with the code, so please > > correct me if I'm wrong.) > > Yes, it's not consistent with comments inside the while loop. I'd like to change > it to: > // Hit test the culled inline if necessary. This sgtm.
pdr@chromium.org changed reviewers: + myid.m.shin@gmail.com, myid.shin@samsung.com, pdr@chromium.org
PTAL
lgtm
The CQ bit was checked by nolan.robin.cao@gmail.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1588003003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1588003003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by nolan.robin.cao@gmail.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1588003003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1588003003/20001
Message was sent while issue was closed.
Description was changed from ========== Incorrect element hit testing for inline elements containing children with transform applied If the previous inline box has layer, we need to call |LayoutInline::hitTestCulledInline()| on current inline box's parent. BUG=576655 ========== to ========== Incorrect element hit testing for inline elements containing children with transform applied If the previous inline box has layer, we need to call |LayoutInline::hitTestCulledInline()| on current inline box's parent. BUG=576655 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Incorrect element hit testing for inline elements containing children with transform applied If the previous inline box has layer, we need to call |LayoutInline::hitTestCulledInline()| on current inline box's parent. BUG=576655 ========== to ========== Incorrect element hit testing for inline elements containing children with transform applied If the previous inline box has layer, we need to call |LayoutInline::hitTestCulledInline()| on current inline box's parent. BUG=576655 Committed: https://crrev.com/e7df09b4a3b1370dda95e11625d9dbdb1bfb99a4 Cr-Commit-Position: refs/heads/master@{#370072} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/e7df09b4a3b1370dda95e11625d9dbdb1bfb99a4 Cr-Commit-Position: refs/heads/master@{#370072} |