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

Changeset 279304 in webkit


Ignore:
Timestamp:
Jun 25, 2021, 5:49:17 PM (5 years ago)
Author:
Wenson Hsieh
Message:

[iOS] Web process sometimes crashes under findDataDetectionResultElementInImageOverlay
​https://bugs.webkit.org/show_bug.cgi?id=227412
rdar://79588091

Reviewed by Devin Rousso.

Speculatively fix the crash by ensuring that the hit-tested text node inside an image overlay is inside the
shadow root of the element responding to click events, and that the element responding to click events contains
an image overlay.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::elementPositionInformation):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r279295 r279304  
     12021-06-25  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [iOS] Web process sometimes crashes under findDataDetectionResultElementInImageOverlay
     4        https://bugs.webkit.org/show_bug.cgi?id=227412
     5        rdar://79588091
     6
     7        Reviewed by Devin Rousso.
     8
     9        Speculatively fix the crash by ensuring that the hit-tested text node inside an image overlay is inside the
     10        shadow root of the element responding to click events, and that the element responding to click events contains
     11        an image overlay.
     12
     13        * WebProcess/WebPage/ios/WebPageIOS.mm:
     14        (WebKit::elementPositionInformation):
     15
    1162021-06-25  Per Arne  <pvollan@apple.com>
    217
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r278712 r279304  
    28962896
    28972897#if ENABLE(DATA_DETECTION)
    2898     if (info.isImageOverlayText && is<HTMLElement>(element))
    2899         dataDetectorImageOverlayPositionInformation(downcast<HTMLElement>(element), request, info);
     2898    if (info.isImageOverlayText && innerNonSharedNode->shadowHost() == &element && is<HTMLElement>(element)) {
     2899        if (auto htmlElement = makeRef(downcast<HTMLElement>(element)); htmlElement->hasImageOverlay())
     2900            dataDetectorImageOverlayPositionInformation(htmlElement.get(), request, info);
     2901    }
    29002902#endif
    29012903
Note: See TracChangeset for help on using the changeset viewer.