New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 707627 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 691198



Sign in to add a comment

LayoutText::absoluteRectsForRange() may be broken

Project Member Reported by kojii@chromium.org, Apr 3 2017

Issue description

From https://codereview.chromium.org/2775663008/#msg59

The change to LayoutText::absoluteRectsForRange() in https://codereview.chromium.org/2763013002 may broke the expected behavior of a test being written in https://codereview.chromium.org/2775663008/.

tanvir, would it be possible to land a failing test with "Disabled_"? Or Wanchang, would it be possible for you to reproduce from the information in the CL?


 
I will try to reproduce it.

Comment 2 by kojii@chromium.org, Apr 3 2017

Superb, thank you.

Comment 3 Deleted

I synced source today and applied the patch of https://codereview.chromium.org/2775663008.

Then I ran the below test on the linux build 

out/Default/webkit_unit_tests --gtest_filter="TextFinderTest.*:VisibleUnitsTest.*"

tanvir, could you let me know which case is failed ?

thanks.

Comment 5 by kojii@chromium.org, Apr 3 2017

wanchang, I think it's not failing. Please refer to Patch Set 8, VisibleUnitsTest.cpp, VisibleUnitsTest::textQuadDOM. xiaochengh@ commented the expectation is wrong, because of the CL.

So I think what you can do is, to step through VisibleUnitsTest::textQuadDOM, and when it calls:
  textQuads(quadsStartToTwo, rangeStartToTwo);
why the result does not include quad for "00".
With Patch set 8-: The failures are observed in Mac and Windows, it will pass in Linux since I aligned the results of the Test case with your patch.

So you can refer my Patch set 7 in visibleUnitTests.cpp. (https://codereview.chromium.org/2775663008/diff/120001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp)

Here are the below failures:
VisibleUnitsTest.textQuadDOM.
VisibleUnitsTest.textQuadFlatTree.

So if you run, visibleUnitTest on Linux Build for Patch set 7, I Hope you will observe the failure cases.

You can also refer the try bot of patch set 7, which shows the failure results.

Let me know if you need any more details.




 
Okay, I see.
I will check the result of textQuads(quadsStartToTwo, rangeStartToTwo);

Thanks
Dear all,
I found a bug of the commit https://codereview.chromium.org/2763013002.
The patch clear textQuad passed by the argument before adding quad rect inside absoluteQuadsForRange unexpectedly.
The expected behavior was clearing quads which are added by non-overlapping inline box with range offset.
I upload new CL( https://codereview.chromium.org/2792953002 ) to fix this bug. New CL will just ignore non-overlapping inline box with range offset when the textquad argument is not empty. I think that non-overlapping will produce only empty rect so if textquad already has any rect, ignoring empty rect will be okay.

tanvir, could you check your patch with new CL ( https://codereview.chromium.org/2792953002 ). and thanks for helping me to find the bug.

kojii, please review new CL.

Thanks, all.

Thank you for checking.
I have verified with your patch, and text Quads works fine, with all the unit test cases passed. I have ran these tests on Linux Build.
 
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7aab680a20f88c816877a06dcfee33eadb732e1c

commit 7aab680a20f88c816877a06dcfee33eadb732e1c
Author: wanchang.ryu <wanchang.ryu@lge.com>
Date: Tue Apr 04 10:59:58 2017

Fix unexpected erasing textQuad

LayoutText::absoluteQuadsForRange erases quads which given by the
argument. This is unexpected behavior. To fix this issue when given
quads is not empty, just skip adding bounds of box which is not in
range offset without clearing previous quads.

BUG= 707627 

Review-Url: https://codereview.chromium.org/2792953002
Cr-Commit-Position: refs/heads/master@{#461681}

[modify] https://crrev.com/7aab680a20f88c816877a06dcfee33eadb732e1c/third_party/WebKit/Source/core/dom/RangeTest.cpp
[modify] https://crrev.com/7aab680a20f88c816877a06dcfee33eadb732e1c/third_party/WebKit/Source/core/layout/LayoutText.cpp

Labels: OS-All
Status: Fixed (was: Available)
Thank you wanchang.ryu@!

Sign in to add a comment