WICG / eyedropper-api

Other
69 stars 7 forks source link

It might be good to mention whether the screen under eyedropper is live or not #8

Open ipopescu93 opened 3 years ago

ipopescu93 commented 3 years ago

On MicrosoftEdge/MSEdgeExplainers#503, @upsuper said:

I can see there to be at least two possible strategies to implement the eyedropper:

  1. the eyedropper floats over a live screen, and it's capturing the color of the live screen
  2. a screenshot is taken, and the eyedropper would just capture color inside that screenshot.

I can see that current Blink implementation is mostly based on the first strategy, but it might be good to mention whether the second strategy could be valid. If it could, web apps may need to take extra steps to ensure UI they don't want to be displayed while eyedropper is open need to be removed first. Maybe it's just easier to say that it shouldn't be, and screen should be live?

@ipopescu93 said:

Thanks for the issue! I don't think this is something that needs to be called out since due to possible platform limitations the user agent should have the flexibility to choose either approach.

@upsuper added:

I fully understand that the user agent should have the flexibility, but as I mentioned in the op, if we want to allow such flexibility, it should be explicitly called out, because

web apps may need to take extra steps to ensure UI they don't want to be displayed while eyedropper is open need to be removed first

Kilian commented 3 years ago

On Linux I observe Blink using the seconds strategy. Once in eyedropper mode any screen updates are not reflected in the visual eyedropper itself and the actual color under cursor is not copied, but the one as visible in the visual eyedropper is.