⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259831 in webkit


Ignore:
Timestamp:
Apr 9, 2020, 2:50:49 PM (6 years ago)
Author:
dbates@webkit.org
Message:

[iOS]: New test landed for r259762 landed broken: editing/editable-region/hit-test-overlap.html
https://bugs.webkit.org/show_bug.cgi?id=210305
<rdar://problem/61539886>

Fix up the test. All sub-tests are expected to find editable elements. This is a result
of a last minute realization that I need to iterate over all the hit views instead of just
the frontmost one because the search rect can overlap multiple layers: See "iterate over all
the hit views" in <https://bugs.webkit.org/show_bug.cgi?id=209888#c21>. It is because of this
requirement that WebKit::mayContainEditableElementsInRect() can return a false positive: return
true that the search rect contains an editable element even though that element may be occluded
by a higher z-order element (composited or not). False positives are acceptable. Thouhg false
negatives are not.

  • editing/editable-region/hit-test-overlap-expected.txt:
  • editing/editable-region/hit-test-overlap.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259830 r259831  
     12020-04-09  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS]: New test landed for r259762 landed broken: editing/editable-region/hit-test-overlap.html
     4        https://bugs.webkit.org/show_bug.cgi?id=210305
     5        <rdar://problem/61539886>
     6
     7        Fix up the test. All sub-tests are expected to find editable elements. This is a result
     8        of a last minute realization that I need to iterate over all the hit views instead of just
     9        the frontmost one because the search rect can overlap multiple layers: See "iterate over all
     10        the hit views" in <https://bugs.webkit.org/show_bug.cgi?id=209888#c21>. It is because of this
     11        requirement that WebKit::mayContainEditableElementsInRect() can return a false positive: return
     12        true that the search rect contains an editable element even though that element may be occluded
     13        by a higher z-order element (composited or not). False positives are acceptable. Thouhg false
     14        negatives are not.
     15
     16        * editing/editable-region/hit-test-overlap-expected.txt:
     17        * editing/editable-region/hit-test-overlap.html:
     18
    1192020-04-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
    220
  • trunk/LayoutTests/editing/editable-region/hit-test-overlap-expected.txt

    r259762 r259831  
    1010
    1111Composited overlap:
    12 PASS (x = 29, y = 343, width = 251, height = 201) does not contain editable elements.
    13 PASS (x = 270, y = 400, width = 10, height = 10) does not contain editable elements.
     12PASS (x = 29, y = 343, width = 251, height = 201) contains editable elements.
     13PASS (x = 270, y = 400, width = 10, height = 10) contains editable elements.
    1414PASS (x = 281, y = 343, width = 249, height = 201) contains editable elements.
    1515PASS successfullyParsed is true
  • trunk/LayoutTests/editing/editable-region/hit-test-overlap.html

    r259796 r259831  
    9191    overlapper = container.querySelector(".overlapper");
    9292    borderLength = parseInt(containerComputedStyle.borderLeftWidth, 10); // Assumes uniform border width
    93     await shouldNotHaveEditableElementsInRect(container.offsetLeft + borderLength, container.offsetTop + borderLength, overlapper.offsetWidth - borderLength, container.offsetHeight - borderLength);
    94     await shouldNotHaveEditableElementsInRectForElement(document.getElementById("second-tap-point"));
     93    await shouldHaveEditableElementsInRect(container.offsetLeft + borderLength, container.offsetTop + borderLength, overlapper.offsetWidth - borderLength, container.offsetHeight - borderLength);
     94    await shouldHaveEditableElementsInRectForElement(document.getElementById("second-tap-point"));
    9595    await shouldHaveEditableElementsInRect(container.offsetLeft + overlapper.offsetWidth + borderLength, container.offsetTop + borderLength, container.offsetWidth - overlapper.offsetWidth - borderLength, container.offsetHeight - borderLength);
    9696
Note: See TracChangeset for help on using the changeset viewer.