Chrome52-53: 无前缀的 CSS clip-path: url() 无效,但开发工具中显示已经生效
-webkit-clip-path 是有效的
Chrome52:CSS clip-path: url() 作用于 html 元素时,如果引用的 SVG clipPath 元素的 clipPathUnits = “userSpaceOnUse” (这是默认值),裁剪区的坐标原点是页面原点,
正确的应该是被裁剪的元素的原点。
53修复这个问题。注意 clipPathUnits = “objectBoundingBox” 时并没有问题。
Chrome52-53: CSS clip-path: url() 作用于 svg 元素时,不支持到外部文件的 url,裁剪完全被忽略
Chrome52-53: CSS clip-path: url() 作用于 html 元素时,不支持到外部文件的 url,而且如果使用外部文件的 url,片段部分(#xxx)被解释为本文件内的 id
Windows 长路径
经过测试,moz 平台对长路径(>260)的支持是不完全的:
- OS.File 支持,但需要自行添加 ”\?” 前缀
- File() 构造器不支持
- fetch 对 file-url 不支持
- file-url,img 标签不支持,video/script/link 等未测试
Chrome 也不支持 img 的长 file-url。
Firefox 的 bug: https://bugzilla.mozilla.org/buglist.cgi?quicksearch=long%20path&list_id=13154723 https://bugzilla.mozilla.org/show_bug.cgi?id=744413 https://bugzilla.mozilla.org/show_bug.cgi?id=422777
Firefox: Changing width/height of images continuously causes very high memory and CPU usage
https://bugzilla.mozilla.org/show_bug.cgi?id=1292446 简单地缩放图像就会导致很高的内存和处理器占用。这也是导致备课大师图像不显示、黑屏的诱因之一。 测试 image-scale.html Chrome 和 Edge 不存在这个问题。用 CSS transform 代替 style.width|height 也可以避免这个问题。
Firefox 在页面刷新时自动恢复表单字段的状态,包括 disabled 状态
if disabled state is changed with javascript, the normal state doesn’t return after refreshing the page https://bugzilla.mozilla.org/show_bug.cgi?id=654072
参考 form-restore-ff-test.htm
表单的恢复是在 DOMContentdLoaded 执行前,且不会产生 “change” 事件。
firefox 黑屏
备课大师1.0.90(使用xulrunner 45)出现在某些 dell 台式机上。 可能与显卡和硬件加速渲染有关。 关闭硬件加速渲染的选项: layers.acceleration.disabled;false
可能相关的bug: https://bugzilla.mozilla.org/show_bug.cgi?id=593858
更新:更可能的原因是 xulrunner-stub 没有用 /largememoryaware 编译,因此能使用的内存比 firefox 预期的要小一半, 导致一些模块出问题。改用 /largememoryaware 后似乎问题消失了。
xulrunner 45 远程调试崩溃
可能相关的bug: devtools.debugger.source-maps-enabled;false devtools.styleeditor.source-maps-enabled;true 在 46 或者用 FF 46 调试 xulrunner 45 似乎没问题了。
chrome-url 中不能有连续的 ’..’
chrome-url with contiguous dots (.) is not a valid url? https://bugzilla.mozilla.org/show_bug.cgi?id=1255687
chrome-url 中的 %2540 解释不正确
例如,在地址栏输入 chrome://myhtml/content/%2540 错误页面显示:Firefox 无法在 /D:/project/MyHTML/@ 找到该文件。 但实际上,%2540 应该解释为 %40。有类似错误的还有 “%2530” -> 0 ,“%2520a” -> ” a” 注意,只有该url映射到磁盘文件时才出现这个问题,映射到zip文件内的则不会;非windows系统未测试。
反复缩放较大的图片,会造成内存占用急剧升高,然后图片不显示
有时网页甚至变成黑屏,程序崩溃。
EventSource (Server Sent Event) doesn’t retry after OS suspend/resume
FF: https://bugzilla.mozilla.org/show_bug.cgi?id=1251117 Chrome: 存在,尚未报告。实际上更严重,resume 之后不发送 error 事件就中断了连接。
EventSource (Server Sent Event) doesn’t retry if the server is down during the first attempt to connect
FF: https://bugzilla.mozilla.org/show_bug.cgi?id=1251121 Chrome: 不存在。
Window.open() doesn’t resolve relative url correctly when iframe involved
FF: https://bugzilla.mozilla.org/show_bug.cgi?id=1044950 Chrome: 存在,尚未报告
object type=text/html 对错误的url仍然显示空白文档,而不是后备内容
Chrome: 存在,尚未报告 FF: 无此问题
file: 协议的 content-type
FF: https://bugzilla.mozilla.org/show_bug.cgi?id=1037762 XHR 设置 content-type 头为 application/xml,解释内容为 xml
Chrome: 尚未报告。XHR 没有设置 content-type 头,但正确解释了内容。
whatwg maillist: [whatwg] How to determine content-type of file: protocol
分离的 video 元素仍会导致视频加载和解码(除非设置preload=none),造成很大的内存占用
规范如此?
MutationObserver 在初始解析阶段不能及时发送事件
getComputedStyle 用于外部文档中的节点以及分离的节点
[cssom] getComputedStyle and elements outside the tree http://lists.w3.org/Archives/Public/www-style/2010Apr/0433.html
http://lists.w3.org/Archives/Public/www-style/2010Apr/0435.html Gecko’s behavior for win.getComputedStyle(elt) is to take the element elt and compute its style based on the styles of the current document of window |win|. This means that selector matching will be performed based on the DOM (fragment) the element is in, but using the list of rules from window |win|. This applies to not only document rules but UA rules too (so if the document in |win| is in quirks mode, quirks rules will be applied to the element).
This was a conscious design decision in an area where the spec was … somewhat underspecific. We did consider throwing in this situation, but decided against it because it was simpler to just write the code without assuming anything about window identity, etc.
My question is whether this is a bug in Firefox or a feature I should somehow (how?) keep.
There may be things that depend on the “element not in dom tree” behavior. At least I seem to recall seeing bugs on that. The other is mostly a source of developer confusion when they use the wrong window, I think… But all use of getComputedStyle I’ve encountered is conditioned on various browser sniffing, so changing this stuff is very likely to cause compat issues no matter what we do. :(
-Boris
http://lists.w3.org/Archives/Public/www-style/2010Jul/0252.html
A number of Google teams have come to us with bugs of their pages
working in Gecko, but not WebKit due to this issue. In practice, it’s
not too hard to work around, so changing WebKit hasn’t been a high
priority, but it’s pretty clear (anecdotally anyways) that developers
expect the Gecko behavior.
Thanks for this Ojan!
It should be possible for us (Opera) to change this as well so I have
attempted to align the specification with Gecko. I would very much
appreciate feedback.
多重组合键
多重组合键似乎不被支持,如 ctrl+shift+Z,在FF上的contenteditable中只能检测到ctrl+Z。
object 中的浏览器原生支持的内容
如果在 object 中引用 html、svg、xhtml、xml 等浏览器原生支持的内容,浏览器的行为并不一致: html svg xhtml FF31 y y y Cr36 y n y E y n n
embed 待查。
Mozilla/Firefox 的
iframe 的父元素上有滚动条,则用空格/page up/down 时导致滚动位置与滚动条位置不同步。
mbeditor,待确认
chrome-url 的 iframe 中的 html/xhtml 的事件监听器的 this 不正确
参考 D:\project\MyFirefoxAddon\xhtml-iframe-this 触发条件:
- 内外两个文档都是(x)html
- 内外两个文档都是通过 chrome-url 加载
- 在外层文档的脚本中注册事件监听器
- 通过 addEventListener 而不是 onclick 注册
注意 firefox 自带的 (x)html 文档作为外层文档时,不存在这个问题,不知道为什么。例如,外层文档是 chrome://devtools/content/framework/connect/connect.xhtml 内层文档是 chrome://devtools/content/layoutview/view.xhtml 或者 chrome://xhtml-iframe-this/content/inner.html
用这个方法加入 iframe:
(function () { var frame = document.createElement(‘iframe’); frame.style.cssText = ‘position:absolute;top:0;width:700px;height:400px;background-color:white’; //frame.src = ‘chrome://devtools/content/framework/connect/connect.xhtml’; //frame.src = ‘chrome://devtools/content/layoutview/view.xhtml’; //frame.src = ‘chrome://devtools/content/animationinspector/animation-inspector.xhtml’;
frame.src = ‘chrome://xhtml-iframe-this/content/inner.html’; document.body.appendChild(frame); frame.onload = function() { frame.contentDocument.addEventListener(“click”, function(ev) { alert(this.nodeName)}); }; })();
则不存在问题。 但如果把 firefox 自带的 (x)html 文档抽离出来,则没有这种效果,参考 chrome://myhtml/content/view.xhtml chrome://myhtml/content/animation-inspector.xhtml
解决办法:不使用 this 而是使用 ev.currentTarget。
FF 上 outline 会包围溢出的子元素。
参考 http://stackoverflow.com/questions/10662902/css-outline-different-behavior-behavior-on-webkit-gecko https://bugzilla.mozilla.org/show_bug.cgi?id=687311 https://bugzilla.mozilla.org/show_bug.cgi?id=480888
可以用伪元素实现多重 box-shadow 来代替 outline,或者在伪元素上用 outline。 这个行为似乎CSS规范没有明确定义。
视频元素导致大量的内存占用
Reduce resource consumption
FF 和 Chrome 都有此问题。即使是分离的 video 节点,也会开始加载视频,并消耗等量的内存。
windows 上视频文件没有及时关闭
On Windows, media file is locked for a long time after the web page referencing it has been unloaded https://bugzilla.mozilla.org/show_bug.cgi?id=1068596 destroying VIDEO element does not reduce memory usage https://bugzilla.mozilla.org/show_bug.cgi?id=962986
注意,即使是 detached, 不可达的 video元素,在页面unload后也是不会立即关闭相应文件的(尽管会停止播放)。 关闭文件的唯一方法似乎是给 src 设置不可用的 url,然后调用 load() 方法。
1068596 已经修复。不过这个修复并不彻底,有时候文件仍然被锁定。重现的方法: 在备课大师中尝试删除打开中的、含有视频的文档。
svg 元素的 ClientBox 与 transform
transform 属性与 CSS transform 属性对 getBoundingClientRect() 的影响不同。
getBoundingClientRect() doesn’t take CSS transform into account for SVG elements https://bugzilla.mozilla.org/show_bug.cgi?id=1066435
getBoundingClientRect differs from all other browsers for transformed SVG elements https://bugzilla.mozilla.org/show_bug.cgi?id=755947
[CSSOM] Revisiting transforms and getBoundingClientRect() http://lists.w3.org/Archives/Public/www-style/2011May/0385.html 没有明确结论。
[CSSOM] Interaction of getBoundingClientRect/getClientRects with transforms http://lists.w3.org/Archives/Public/www-style/2010Aug/0615.html
从XHR读取的xhtml document,无法设置 object/embed 元素的 data/src 属性
Modifying data attribute of