Implement Resize Observer API
Categories
(Core :: Layout, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | fixed |
People
(Reporter: dholbert, Assigned: boris)
References
()
Details
(Keywords: dev-doc-complete, DevAdvocacy, Whiteboard: [layout:backlog:2019q2:69][wptsync upstream])
Attachments
(6 files, 12 obsolete files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Updated•9 years ago
|
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 5•9 years ago
|
||
| Reporter | ||
Comment 6•9 years ago
|
||
| mozreview-review | ||
| Comment hidden (mozreview-request) |
Updated•9 years ago
|
Updated•9 years ago
|
Updated•9 years ago
|
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Updated•9 years ago
|
Updated•9 years ago
|
Updated•9 years ago
|
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 20•9 years ago
|
||
| Reporter | ||
Comment 21•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 22•9 years ago
|
||
| mozreview-review-reply | ||
| Reporter | ||
Comment 23•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 24•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Comment 25•9 years ago
|
||
| Reporter | ||
Comment 26•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 27•9 years ago
|
||
| mozreview-review | ||
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 34•9 years ago
|
||
| Reporter | ||
Comment 35•9 years ago
|
||
| Reporter | ||
Comment 36•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 37•9 years ago
|
||
| mozreview-review-reply | ||
| Reporter | ||
Comment 38•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 39•9 years ago
|
||
| mozreview-review | ||
Comment 40•9 years ago
|
||
| mozreview-review-reply | ||
Comment 41•9 years ago
|
||
| mozreview-review-reply | ||
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 47•9 years ago
|
||
| mozreview-review-reply | ||
| Reporter | ||
Comment 48•9 years ago
|
||
| Reporter | ||
Comment 49•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 50•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 51•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 52•9 years ago
|
||
| mozreview-review | ||
Comment 53•9 years ago
|
||
| mozreview-review-reply | ||
| Reporter | ||
Comment 54•9 years ago
|
||
| mozreview-review-reply | ||
| Reporter | ||
Comment 55•9 years ago
|
||
| mozreview-review | ||
| Reporter | ||
Comment 56•9 years ago
|
||
| mozreview-review-reply | ||
| Reporter | ||
Comment 57•9 years ago
|
||
| mozreview-review-reply | ||
Comment 58•9 years ago
|
||
| mozreview-review | ||
Comment 59•9 years ago
|
||
| Reporter | ||
Comment 60•9 years ago
|
||
Comment 61•8 years ago
|
||
Comment 63•8 years ago
|
||
Comment 64•8 years ago
|
||
Comment 65•7 years ago
|
||
| Reporter | ||
Comment 66•7 years ago
|
||
Comment 67•7 years ago
|
||
| Comment hidden (advocacy) |
Updated•7 years ago
|
Comment 69•6 years ago
|
||
Comment 70•6 years ago
|
||
Comment 71•6 years ago
|
||
As a result of developer feedback, there is work being done
on extending current ResizeObserver API.
The main change is that instead of always observing content-box, now you can also
observe more boxes:
border-box
scroll-box: for chat windows
device-pixel-border-box: for <canvas> developers, allows for HiDpi canvas without moire patterns.
https://drafts.csswg.org/resize-observer-1/
The rest of the API looks the same. We'd love to hear any thoughts you have.
We are planning on soliciting feedback in CSSWG February F2F.
I have a local working patch, no tests yet. If you are interested in developing
to the newer spec, I can prioritize creating tests.
Comment 72•6 years ago
|
||
These are great additions. But even having the "old" spec would be a huge help.
Updated•6 years ago
|
Comment 73•6 years ago
|
||
Safari/Webkit has now finished implementation of this feature:
https://bugs.webkit.org/show_bug.cgi?id=157743
With Edge moving to the Chromium codebase this year, Firefox will be the odd man out of the popular browsers here ;-).
As doa says above, even having support for the 'old' spec would be most helpful!
Thanks!
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 74•6 years ago
•
|
||
I'm looking at these old patches and trying to apply them. May update them based on the current spec [1].
Cancel the ni? for farislab and dholbert.
| Reporter | ||
Updated•6 years ago
|
| Assignee | ||
Comment 76•6 years ago
|
||
When rebasing these patches, I just noticed that part 5, Add wpt for ResizeObserver, is in the tree already. Thanks, Aleksandar. However, I saw some test failures based on the rebased patches. Still looking into them.
| Assignee | ||
Comment 77•6 years ago
|
||
| Assignee | ||
Comment 78•6 years ago
|
||
GetNodeDepth() will be used in the next patch.
Depends on D27614
| Assignee | ||
Comment 79•6 years ago
|
||
This implements the first version of spec, so the webidl file doesn't
match the current spec and we will fix them in the follow-up bugs.
i.e.
- The default observer box is content-box.
ResizeObserverBoxOptions,ResizeObserverOptions, andResizeObserverSize
are not included inResizeObserver.webidl.ResizeObserverEntrydoesn't haveborderBoxSizeandcontentBoxSize
attributes.
Depends on D27615
| Assignee | ||
Comment 80•6 years ago
|
||
Use ResizeObserverController to schedule the observers and manage them.
Document will hold this controller in the later patch.
Depends on D27616
| Assignee | ||
Comment 81•6 years ago
|
||
Depends on D27617
| Assignee | ||
Comment 82•6 years ago
|
||
Depends on D27618
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 83•6 years ago
|
||
Comment 84•6 years ago
|
||
Backed out 5 changesets (Bug 1272409) for build bustage at /builds/worker/workspace/build/src/dom/base/nsGlobalWindowCommands. On a CLOSED TREE
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=2ad8260489d690f7615abb7fe27890bdb430de9a
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=242741263&repo=autoland&lineNumber=17277
[task 2019-04-25T23:31:00.235Z] 23:31:00 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/bindings/test'
[task 2019-04-25T23:31:04.140Z] 23:31:04 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-04-25T23:31:04.163Z] 23:31:04 INFO - /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -isysroot /builds/worker/workspace/build/src/MacOSX10.11.sdk --target=x86_64-darwin11 -o Unified_cpp_dom_base8.o -c -fvisibility=hidden -fvisibility-inlines-hidden -DDEBUG=1 -DOS_POSIX=1 -DOS_MACOSX=1 -DHAVE_SIDEBAR -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/obj-firefox/dom/base -I/builds/worker/workspace/build/src/dom/battery -I/builds/worker/workspace/build/src/dom/events -I/builds/worker/workspace/build/src/dom/media -I/builds/worker/workspace/build/src/dom/network -I/builds/worker/workspace/build/src/caps -I/builds/worker/workspace/build/src/docshell/base -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/dom/file -I/builds/worker/workspace/build/src/dom/geolocation -I/builds/worker/workspace/build/src/dom/html -I/builds/worker/workspace/build/src/dom/ipc -I/builds/worker/workspace/build/src/dom/storage -I/builds/worker/workspace/build/src/dom/svg -I/builds/worker/workspace/build/src/dom/u2f -I/builds/worker/workspace/build/src/dom/xbl -I/builds/worker/workspace/build/src/dom/xml -I/builds/worker/workspace/build/src/dom/xslt/xpath -I/builds/worker/workspace/build/src/dom/xul -I/builds/worker/workspace/build/src/gfx/2d -I/builds/worker/workspace/build/src/image -I/builds/worker/workspace/build/src/js/xpconnect/loader -I/builds/worker/workspace/build/src/js/xpconnect/src -I/builds/worker/workspace/build/src/js/xpconnect/wrappers -I/builds/worker/workspace/build/src/layout/base -I/builds/worker/workspace/build/src/layout/forms -I/builds/worker/workspace/build/src/layout/generic -I/builds/worker/workspace/build/src/layout/style -I/builds/worker/workspace/build/src/layout/svg -I/builds/worker/workspace/build/src/layout/xul -I/builds/worker/workspace/build/src/netwerk/base -I/builds/worker/workspace/build/src/netwerk/url-classifier -I/builds/worker/workspace/build/src/security/manager/ssl -I/builds/worker/workspace/build/src/widget -I/builds/worker/workspace/build/src/xpcom/ds -I/builds/worker/workspace/build/src/netwerk/sctp/datachannel -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fcrash-diagnostics-dir=/builds/worker/artifacts -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror -fsanitize=fuzzer-no-link -Wno-error=shadow -MD -MP -MF .deps/Unified_cpp_dom_base8.o.pp /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base8.cpp
[task 2019-04-25T23:31:04.163Z] 23:31:04 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base8.cpp:2:
[task 2019-04-25T23:31:04.163Z] 23:31:04 ERROR - /builds/worker/workspace/build/src/dom/base/nsGlobalWindowCommands.cpp:487:10: error: unknown type name 'Document'; did you mean 'imgRequestProxyStatic::Document'?
[task 2019-04-25T23:31:04.163Z] 23:31:04 INFO - RefPtr<Document> doc = window->GetExtantDoc();
[task 2019-04-25T23:31:04.163Z] 23:31:04 INFO - ^~~~~~~~
[task 2019-04-25T23:31:04.163Z] 23:31:04 INFO - imgRequestProxyStatic::Document
[task 2019-04-25T23:31:04.163Z] 23:31:04 INFO - /builds/worker/workspace/build/src/image/imgRequestProxy.h:55:34: note: 'imgRequestProxyStatic::Document' declared here
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - typedef mozilla::dom::Document Document;
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - ^
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base8.cpp:137:
[task 2019-04-25T23:31:04.164Z] 23:31:04 ERROR - /builds/worker/workspace/build/src/dom/base/nsNodeUtils.cpp:214:11: error: reference to 'Animation' is ambiguous
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - const Animation* aAnimation) {
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - ^
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/Layers.h:78:7: note: candidate found by name lookup is 'mozilla::layers::Animation'
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - class Animation;
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - ^
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/KeyframeEffect.h:111:7: note: candidate found by name lookup is 'mozilla::dom::Animation'
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - class Animation;
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - ^
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base8.cpp:137:
[task 2019-04-25T23:31:04.164Z] 23:31:04 ERROR - /builds/worker/workspace/build/src/dom/base/nsNodeUtils.cpp:213:46: error: out-of-line definition of 'GetTargetForAnimation' does not match any declaration in 'nsNodeUtils'
[task 2019-04-25T23:31:04.164Z] 23:31:04 INFO - Maybe<NonOwningAnimationTarget> nsNodeUtils::GetTargetForAnimation(
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - ^~~~~~~~~~~~~~~~~~~~~
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - /builds/worker/workspace/build/src/dom/base/nsNodeUtils.h:141:31: note: type of 1st parameter of member declaration does not match definition ('const mozilla::dom::Animation ' vs 'const mozilla::layers::Animation ')
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - GetTargetForAnimation(const mozilla::dom::Animation aAnimation);
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - ^
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base8.cpp:137:
[task 2019-04-25T23:31:04.165Z] 23:31:04 ERROR - /builds/worker/workspace/build/src/dom/base/nsNodeUtils.cpp:215:39: error: member access into incomplete type 'const mozilla::layers::Animation'
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - AnimationEffect effect = aAnimation->GetEffect();
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - ^
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/layers/AnimationInfo.h:22:7: note: forward declaration of 'mozilla::layers::Animation'
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - class Animation;
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - ^
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base8.cpp:137:
[task 2019-04-25T23:31:04.165Z] 23:31:04 ERROR - /builds/worker/workspace/build/src/dom/base/nsNodeUtils.cpp:222:36: error: reference to 'Animation' is ambiguous
[task 2019-04-25T23:31:04.165Z] 23:31:04 INFO - void nsNodeUtils::AnimationMutated(Animation* aAnimation,
| Assignee | ||
Comment 85•6 years ago
•
|
||
hmm. Unified build failed. Too unlucky.
| Assignee | ||
Comment 86•6 years ago
|
||
Updated•6 years ago
|
Comment 87•6 years ago
|
||
Comment 88•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7b8695f2ca82
https://hg.mozilla.org/mozilla-central/rev/2f3cfdbcb900
https://hg.mozilla.org/mozilla-central/rev/b634a26d0c2e
https://hg.mozilla.org/mozilla-central/rev/0b7728e6fcda
https://hg.mozilla.org/mozilla-central/rev/87c7a189cbe0
https://hg.mozilla.org/mozilla-central/rev/b86894409b1b
Comment 90•6 years ago
|
||
Resize observer docs finished — see https://github.com/mdn/sprints/issues/1905#issuecomment-526296951
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
Description
•