TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

WebKit Quirks

196 点作者 momonga超过 4 年前

18 条评论

tholman超过 4 年前
If I&#x27;m understanding L958+ [1] There&#x27;s a hyper specific css class browser quirk because the login button for gizmodo&#x2F;kotaku&#x2F;etc&#x27;s CMS&#x27;s svg icon click event wasn&#x27;t firing... and here I am fixing my day-to-day browser bugs like a chump<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;main&#x2F;Source&#x2F;WebCore&#x2F;page&#x2F;Quirks.cpp#L958" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;main&#x2F;Source&#x2F;WebCore&#x2F;pa...</a>
matsemann超过 4 年前
<p><pre><code> shouldBypassBackForwardCache() &#x2F;&#x2F; Google Docs used to bypass the back&#x2F;forward cache by serving &quot;Cache-Control: no-store&quot; over HTTPS. &#x2F;&#x2F; We started caching such content in r250437 but the Google Docs index page unfortunately is not currently compatible &#x2F;&#x2F; because it puts an overlay (with class &quot;docs-homescreen-freeze-el-full&quot;) over the page when navigating away and fails &#x2F;&#x2F; to remove it when coming back from the back&#x2F;forward cache </code></pre> Millions of pages have this bug, because of Safari&#x27;s broken navigation. Nice that the big players get the browser to fix it for them. For instance, a common issue is you click a button that becomes disabled and shows a spinner while working, before forwarding to a new page. If you click back from the new page, Safari will render the previous page <i>exactly</i> as it was when leaving, so in a broken loading state (instead of starting it from scratch).
评论 #26167355 未加载
评论 #26166057 未加载
评论 #26167731 未加载
评论 #26168399 未加载
jakub_g超过 4 年前
There was a viral tongue-in-cheek tweet this month &quot;how to prevent scrolling in Safari when...&quot;?<p>1. Buy Zillow. Destroy the company.<p>2. Redirect your website to zillow.com<p>(it was more fun that what I wrote)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;f43587ec2416b86eecef5091fe028a08e168f976&#x2F;Source&#x2F;WebCore&#x2F;page&#x2F;Quirks.cpp#L703-L709" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;f43587ec2416b86eecef50...</a>
TonyTrapp超过 4 年前
I really dislike this sort of quirk workarounds, not just in web browsers. It just makes everything complicated. Someone else using the exact same code will get different behaviour, just because they serve it from a different domain. I did similar workarounds before (not related to websites but to specific files), and I felt very bad about it even though it was clear that no more files in that specific format would ever be generated again.
duckerude超过 4 年前
&gt; domain.endsWith(&quot;hulu.com&quot;)<p>Huh, does that mean it would also apply on &quot;thisisnothulu.com&quot;?<p>Most other endsWith calls seem to do e.g. `domain.endsWith(&quot;.hulu.com&quot;)` to only match subdomains.
评论 #26168342 未加载
评论 #26173807 未加载
评论 #26186016 未加载
评论 #26166983 未加载
评论 #26171607 未加载
0x0超过 4 年前
I bet it&#x27;s fun being responsible for developing and deploying on those sites. Works in CI and dev, but deploying to production makes the browser behave differently! Nice surprise!
评论 #26166531 未加载
firloop超过 4 年前
Wow, there&#x27;s not only _domain_ specificity, but also HTML _element_ specificity in this quirks list.<p><pre><code> &#x2F;&#x2F; When panning on an Amazon product image, we&#x27;re either touching on the #magnifierLens element &#x2F;&#x2F; or its previous sibling. auto&amp; element = downcast&lt;Element&gt;(*target); if (element.getIdAttribute() == &quot;magnifierLens&quot;) return true; if (auto* sibling = element.nextElementSibling()) return sibling-&gt;getIdAttribute() == &quot;magnifierLens&quot;; </code></pre> <a href="https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;3def0062f77b82a46fc40c7154098b5fc0f12db9&#x2F;Source&#x2F;WebCore&#x2F;page&#x2F;Quirks.cpp#L416-L422" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;3def0062f77b82a46fc40c...</a>
评论 #26172121 未加载
kgin超过 4 年前
It&#x27;s like that saying about debt.<p>When a browser renders your 500 mau site badly it&#x27;s your problem.<p>When a browser renders your 50,000,000 mau site badly it&#x27;s the browser&#x27;s problem.
IMTDb超过 4 年前
That&#x27;s new &quot;you have made it when&quot;...they need to change the browser engine for your website.
评论 #26170144 未加载
sdflhasjd超过 4 年前
Domain name specific quirks?<p>What in the world...
评论 #26165631 未加载
评论 #26167992 未加载
评论 #26167436 未加载
评论 #26165679 未加载
TazeTSchnitzel超过 4 年前
Anyone who&#x27;s read a few Old New Thing posts would know that Windows must be full of similar checks.
评论 #26166582 未加载
评论 #26171946 未加载
throwaway744678超过 4 年前
Wow, there&#x27;s a nice 77 characters function name [1]! Yes, with a typo. Hard to keep the lines under 80 characters...<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;main&#x2F;Source&#x2F;WebCore&#x2F;page&#x2F;Quirks.cpp#L265" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WebKit&#x2F;WebKit&#x2F;blob&#x2F;main&#x2F;Source&#x2F;WebCore&#x2F;pa...</a>
评论 #26169070 未加载
shadowgovt超过 4 年前
The thing about network effects is this:<p>When you&#x27;re making a new technology to interact with existing technology, and following the specification results in your new technology failing to work with what&#x27;s already there, nobody will care if you blame the standard or everyone&#x27;s mis-implementation of the standard.<p>They&#x27;ll consider your malfunctioning tool as damage and route around it... Until you become big enough that you can <i>be</i> the existing implementation other people have to adapt to.<p>Every commonly-used browser either has something like this buried in its implementation or has a date-stamp of first release older than everything else out there.
saagarjha超过 4 年前
It&#x27;s fun (and a little depressing) to look at this list, but it exists is basically every popular project. Unfortunately, the incentives are set up for this to essentially be necessary: if something popular doesn&#x27;t work in your software, users are going to think your code is the one who is broken, not the thing they are trying to use. So you have a sort of a &quot;tragedy of the commons&quot; where if you keep a principled position a user is going to switch to your competitor that supports quirks to get the thing to work.
jaywalk超过 4 年前
Interesting to see www.icloud.com in there...
spectramax超过 4 年前
We need something new here. This is not scalable. If a group of engineers can&#x27;t write a new browser in sabbatical, then we need to change what a browser (and the spec) should be.<p>Access to internet should be simple, not complicated so many can participate and leave control out of big corp.
tabtab超过 4 年前
Web UI &quot;standards&quot; are a friggen mess. We really need to rethink it all. For one, if we had a standard state-ful GUI markup language, we wouldn&#x27;t need to reinvent so many common GUI widgets and idioms using bloated libraries based on JS + DOM.<p>Second, if web standards allowed true absolute positioning of vectors (as an option), then the layout engines could reside on servers, allowing us to choose a layout engine that best fits domain and need.<p>Note that while existing web standards do have some coordinate based features, they are too inconsistent to reply upon. If they were any good, we wouldn&#x27;t need PDF viewers.
评论 #26172971 未加载
lxe超过 4 年前
Wow, this is terrible. Either fix the bugs, introduce non-standard behavior for all sites, or expect these big players to fix their own problems.
评论 #26172909 未加载