Auto merge of #20327 - kwonoj:fix-ignore, r=paulrouget
Auto merge of #20327 - kwonoj:fix-ignore, r=paulrouget

fix(keyevent): do not emit default ignorable codepoint

<!-- Please describe your changes on the following line: -->
This PR intends to update `KeyEvent` emit behavior around #18130. Issue https://github.com/servo/servo/issues/17146#issue-233361568 briefly explains what's happening in servo currently - there are KeyboardInput event emitted for separated key (modifier, and `V` in case of paste) and there are also `ReceivedCharacter` event corresponds to `\u{0016}`.

`0x0016` is unicode representation of `Synchronous Idle` (https://en.wikipedia.org/wiki/Synchronous_Idle), belong under category of `Default Ignorable` charater in unicode range doesn't have visual representation (http://www.unicode.org/L2/L2002/02368-default-ignorable.pdf). Currently servo forwards all of emitted event from `winit` including this, eventually leads into double execution of control event.

In this change try to omit default ignorable charater , if given char received is within range of ignorable do not dispatch `KeyEvent`. Once those are omitted, current event handling logic already takes care of key event with correct modifier state so duplicated event handling won't occur.

For implementation perspective, `std::char` in Rust doesn't seem to support `isIdentifierIgnorable` like other platform does (i.e: https://msdn.microsoft.com/en-us/library/aa285330(v=vs.60).aspx / https://docs.oracle.com/javase/7/docs/api/java/lang/Character.html) - so does quick, naïve range comparison check based on unicode range specified in spec, similar to halfbuzz and other does. (https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-unicode-private.hh#L134)

Lastly, this is indeed behavior of `winit` to emit all characters by default. *Why not try to make upstream changes instead?* While I've been reading through issues in `winit`, issue like https://github.com/tomaka/winit/issues/350 trying to emit ignorable character by its intention (delete key `ReceivedCharacter` is also under category of default ignorable) and let each consumer application handles it as needed. I assume it'll cause breaking changes in winit's design if it intends to omit those characters, instead tried to make application-level changes.

Couple of consideration for review

- Is it desired changes to not emit `KeyEvent` for default ignorable chars? Do we rather want mapping / or restoring back to original char as @paulrouget mentioned in https://github.com/servo/servo/issues/17146#issue-233361568?
- Any better, recommended approach to detect unicode char range?
- Maybe try to make upstream changes to `winit` still, like having configuratble way to opt-in(out) those char event?

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #18130 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
- This PR has been locally tested on Windows, Linux machines.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20327)
<!-- Reviewable:end -->

jimberlage/servo,mattnenterprise/servo,pyfisch/servo,DominoTree/servo,sadmansk/servo,dati91/servo,KiChjang/servo,SimonSapin/servo,anthgur/servo,larsbergstrom/servo,KiChjang/servo,canaltinova/servo,canaltinova/servo,sadmansk/servo,mattnenterprise/servo,canaltinova/servo,avadacatavra/servo,pyfisch/servo,SimonSapin/servo,emilio/servo,larsbergstrom/servo,saneyuki/servo,notriddle/servo,mattnenterprise/servo,DominoTree/servo,peterjoel/servo,nnethercote/servo,saneyuki/servo,peterjoel/servo,nnethercote/servo,KiChjang/servo,splav/servo,splav/servo,jimberlage/servo,notriddle/servo,splav/servo,upsuper/servo,paulrouget/servo,pyfisch/servo,larsbergstrom/servo,SimonSapin/servo,paulrouget/servo,mbrubeck/servo,larsbergstrom/servo,splav/servo,notriddle/servo,szeged/servo,jimberlage/servo,DominoTree/servo,anthgur/servo,splav/servo,emilio/servo,pyfisch/servo,peterjoel/servo,avadacatavra/servo,mattnenterprise/servo,szeged/servo,nnethercote/servo,ConnorGBrewster/servo,paulrouget/servo,szeged/servo,szeged/servo,jimberlage/servo,avadacatavra/servo,avadacatavra/servo,peterjoel/servo,dati91/servo,paulrouget/servo,anthgur/servo,emilio/servo,splav/servo,mbrubeck/servo,peterjoel/servo,canaltinova/servo,saneyuki/servo,cbrewster/servo,KiChjang/servo,ConnorGBrewster/servo,peterjoel/servo,emilio/servo,cbrewster/servo,anthgur/servo,jimberlage/servo,avadacatavra/servo,notriddle/servo,DominoTree/servo,ConnorGBrewster/servo,nnethercote/servo,larsbergstrom/servo,splav/servo,emilio/servo,anthgur/servo,cbrewster/servo,ConnorGBrewster/servo,pyfisch/servo,saneyuki/servo,SimonSapin/servo,mbrubeck/servo,avadacatavra/servo,KiChjang/servo,avadacatavra/servo,SimonSapin/servo,sadmansk/servo,pyfisch/servo,paulrouget/servo,saneyuki/servo,ConnorGBrewster/servo,pyfisch/servo,saneyuki/servo,mattnenterprise/servo,splav/servo,upsuper/servo,mbrubeck/servo,szeged/servo,DominoTree/servo,szeged/servo,pyfisch/servo,mbrubeck/servo,nnethercote/servo,peterjoel/servo,ConnorGBrewster/servo,DominoTree/servo,paulrouget/servo,SimonSapin/servo,szeged/servo,DominoTree/servo,cbrewster/servo,mbrubeck/servo,cbrewster/servo,cbrewster/servo,dati91/servo,peterjoel/servo,upsuper/servo,jimberlage/servo,emilio/servo,dati91/servo,upsuper/servo,peterjoel/servo,canaltinova/servo,notriddle/servo,ConnorGBrewster/servo,paulrouget/servo,sadmansk/servo,saneyuki/servo,mbrubeck/servo,sadmansk/servo,mbrubeck/servo,DominoTree/servo,nnethercote/servo,jimberlage/servo,anthgur/servo,dati91/servo,SimonSapin/servo,larsbergstrom/servo,cbrewster/servo,splav/servo,nnethercote/servo,sadmansk/servo,splav/servo,peterjoel/servo,szeged/servo,upsuper/servo,DominoTree/servo,KiChjang/servo,larsbergstrom/servo,emilio/servo,notriddle/servo,canaltinova/servo,canaltinova/servo,dati91/servo,emilio/servo,notriddle/servo,jimberlage/servo,szeged/servo,sadmansk/servo,upsuper/servo,dati91/servo,KiChjang/servo,paulrouget/servo,mattnenterprise/servo,nnethercote/servo,saneyuki/servo,notriddle/servo,ConnorGBrewster/servo,jimberlage/servo,SimonSapin/servo,saneyuki/servo,saneyuki/servo,canaltinova/servo,anthgur/servo,nnethercote/servo,dati91/servo,avadacatavra/servo,larsbergstrom/servo,mattnenterprise/servo,DominoTree/servo,paulrouget/servo,KiChjang/servo,larsbergstrom/servo,notriddle/servo,notriddle/servo,emilio/servo,pyfisch/servo,cbrewster/servo,szeged/servo,pyfisch/servo,sadmansk/servo,emilio/servo,mattnenterprise/servo,larsbergstrom/servo,upsuper/servo,KiChjang/servo,anthgur/servo,KiChjang/servo,upsuper/servo,paulrouget/servo,nnethercote/servo