| Summary: | Change HitTestRequestType to an OptionSet | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||||||||||||||
| Component: | WebCore Misc. | Assignee: | Daniel Bates <dbates> | ||||||||||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||||||||||
| Severity: | Normal | CC: | aboxhall, apinheiro, cdumez, cfleizach, cgarcia, dino, dmazzoni, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, jcraig, jdiggs, jer.noble, kangil.han, kondapallykalyan, pdr, philipj, sabouhallawa, samuel_white, schenney, sergio, webkit-bug-importer, wenson_hsieh | ||||||||||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||||
| Version: | WebKit Local Build | ||||||||||||||||||||||||
| Hardware: | All | ||||||||||||||||||||||||
| OS: | All | ||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||
|
Description
Daniel Bates
2020-02-27 12:35:32 PST
Created attachment 391899 [details]
For the bots
🧨
Created attachment 391900 [details]
For the bots
Created attachment 391902 [details]
For the bots
Created attachment 391903 [details]
For the bots
Created attachment 391906 [details]
For the bots
Created attachment 391908 [details]
bots
Created attachment 391909 [details]
Bots
Created attachment 391913 [details]
Bots
Created attachment 391923 [details]
Patch
Comment on attachment 391923 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391923&action=review > Source/WebCore/rendering/HitTestRequest.h:55 > + ASSERT(!requestType.contains(IncludeAllElementsUnderPoint) || requestType.contains(CollectMultipleElements)); Nit - IMO, this assertion could be made clearer using ASSERT_IMPLIES. (In reply to Wenson Hsieh from comment #10) > Comment on attachment 391923 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=391923&action=review > > > Source/WebCore/rendering/HitTestRequest.h:55 > > + ASSERT(!requestType.contains(IncludeAllElementsUnderPoint) || requestType.contains(CollectMultipleElements)); > > Nit - IMO, this assertion could be made clearer using ASSERT_IMPLIES. how? Comment on attachment 391923 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391923&action=review >>> Source/WebCore/rendering/HitTestRequest.h:55 >>> + ASSERT(!requestType.contains(IncludeAllElementsUnderPoint) || requestType.contains(CollectMultipleElements)); >> >> Nit - IMO, this assertion could be made clearer using ASSERT_IMPLIES. > > how? oh, I got it: ASSERT_IMPLIES(requestType.contains(IncludeAllElementsUnderPoint), requestType.contains(CollectMultipleElements)); Created attachment 391928 [details]
To land
Comment on attachment 391928 [details] To land Clearing flags on attachment: 391928 Committed r257592: <https://trac.webkit.org/changeset/257592> All reviewed patches have been landed. Closing bug. Comment on attachment 391928 [details] To land View in context: https://bugs.webkit.org/attachment.cgi?id=391928&action=review > Source/WebCore/page/EventHandler.cpp:1986 > if (m_touchPressed) > - hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; > + hitType.add(HitTestRequest::Active); > + hitType.add(HitTestRequest::ReadOnly); This if needs braces now that is has two lines in the body. Committed r257625: <https://trac.webkit.org/changeset/257625> Comment on attachment 391928 [details] To land View in context: https://bugs.webkit.org/attachment.cgi?id=391928&action=review >> Source/WebCore/page/EventHandler.cpp:1986 >> + hitType.add(HitTestRequest::ReadOnly); > > This if needs braces now that is has two lines in the body. Or it can be written in one line like this: hitType.add({ HitTestRequest::Active, HitTestRequest::ReadOnly }); (In reply to Carlos Garcia Campos from comment #17) > Comment on attachment 391928 [details] > To land > > View in context: > https://bugs.webkit.org/attachment.cgi?id=391928&action=review > > > Source/WebCore/page/EventHandler.cpp:1986 > > if (m_touchPressed) > > - hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; > > + hitType.add(HitTestRequest::Active); > > + hitType.add(HitTestRequest::ReadOnly); > > This if needs braces now that is has two lines in the body. Yeah, I know, but it was fixed when I noticed. Thanks for fixign (In reply to Said Abou-Hallawa from comment #19) > Comment on attachment 391928 [details] > To land > > View in context: > https://bugs.webkit.org/attachment.cgi?id=391928&action=review > > >> Source/WebCore/page/EventHandler.cpp:1986 > >> + hitType.add(HitTestRequest::ReadOnly); > > > > This if needs braces now that is has two lines in the body. > > Or it can be written in one line like this: > > hitType.add({ HitTestRequest::Active, HitTestRequest::ReadOnly }); Yes, if I thought about doing that and wavered at the last minute...too bad could have avoided the missing brace. Anyway I would do the one line thing today |