Blink has a similar bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1283709. The blink code is inherited from WebKit, so WebKit may have the same issue. Haven't directly verified this in WebKit. Also not sure if this causes any real-world issues in WebKit.
<rdar://problem/87431867>