Closed Bug 1549560 Opened 4 years ago Closed 4 years ago

Consider moving document.open/write/close from HTMLDocument to Document

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: bzbarsky, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(2 files)

Pretty sure that's where they are in other browsers....

Not offhand. It just came up in something else I was looking at and I wanted to get it on file. Feel free to take!

OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Assignee: nobody → ehsan

(FWIW I also have a half-done patch for HTMLDocument.domain lying somewhere which I should revive...)

Blocks: 897815
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c352b73db92b
Move HTMLDocument.open/close/write/writeln to Document; r=farre

Backed out changeset c352b73db92b (Bug 1549560) for dom/base/Document.cpp related build bustages

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=c352b73db92bd0eee049ce6808b0e947e1eb1167&selectedJob=248619561

Backout link: https://hg.mozilla.org/integration/autoland/rev/c37c85af0fb0baad7fa25a177f2db8bcafbf6dc4

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=248619561&repo=autoland&lineNumber=20004

[task 2019-05-27T20:51:07.191Z] 20:51:07 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/bindings'
[task 2019-05-27T20:51:07.777Z] 20:51:07 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-05-27T20:51:07.777Z] 20:51:07 INFO - /builds/worker/workspace/build/src/sccache/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -o Unified_cpp_dom_base2.o -c -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=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 -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fcrash-diagnostics-dir=/builds/worker/artifacts -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -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 -O2 -fno-omit-frame-pointer -funwind-tables -Werror -I/builds/worker/workspace/build/src/widget/gtk/compat-gtk3 -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gtk-3.0/unix-print -Wno-error=shadow -MD -MP -MF .deps/Unified_cpp_dom_base2.o.pp /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base2.cpp
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base2.cpp:11:
[task 2019-05-27T20:51:07.778Z] 20:51:07 ERROR - /builds/worker/workspace/build/src/dom/base/Document.cpp:6985:23: error: must use 'enum' tag to refer to type 'ReferrerPolicy' in this scope
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - static_cast<ReferrerPolicy>(mReferrerPolicy));
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - enum
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/Document.h:738:12: note: enum 'ReferrerPolicy' is hidden by a non-type declaration of 'ReferrerPolicy' here
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - uint32_t ReferrerPolicy() const { return GetReferrerPolicy(); }
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base2.cpp:11:
[task 2019-05-27T20:51:07.778Z] 20:51:07 ERROR - /builds/worker/workspace/build/src/dom/base/Document.cpp:6984:17: error: no matching member function for call to 'SetSpeculationReferrerPolicy'
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - executor->SetSpeculationReferrerPolicy(
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsHtml5TreeOpExecutor.h:262:8: note: candidate function not viable: no known conversion from 'enum ReferrerPolicy' to 'nsHtml5TreeOpExecutor::ReferrerPolicy' (aka 'mozilla::net::ReferrerPolicy') for 1st argument
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - void SetSpeculationReferrerPolicy(ReferrerPolicy aReferrerPolicy);
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsHtml5TreeOpExecutor.h:263:8: note: candidate function not viable: no known conversion from 'enum ReferrerPolicy' to 'const nsAString' (aka 'const nsTSubstring<char16_t>') for 1st argument
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - void SetSpeculationReferrerPolicy(const nsAString& aReferrerPolicy);
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/dom/base/Unified_cpp_dom_base2.cpp:11:
[task 2019-05-27T20:51:07.778Z] 20:51:07 ERROR - /builds/worker/workspace/build/src/dom/base/Document.cpp:7035:44: error: use of undeclared identifier 'mContentTypeForWriteCalls'
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ->Parse(EmptyString(), nullptr, mContentTypeForWriteCalls, true);
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 ERROR - /builds/worker/workspace/build/src/dom/base/Document.cpp:7166:46: error: use of undeclared identifier 'mContentTypeForWriteCalls'
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ->Parse(aText + new_line, key, mContentTypeForWriteCalls, false);
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 ERROR - /builds/worker/workspace/build/src/dom/base/Document.cpp:7169:35: error: use of undeclared identifier 'mContentTypeForWriteCalls'
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ->Parse(aText, key, mContentTypeForWriteCalls, false);
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - ^
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - 5 errors generated.
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - /builds/worker/workspace/build/src/config/rules.mk:810: recipe for target 'Unified_cpp_dom_base2.o' failed
[task 2019-05-27T20:51:07.778Z] 20:51:07 ERROR - make[4]: *** [Unified_cpp_dom_base2.o] Error 1
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - make[4]: *** Waiting for unfinished jobs....
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/dom/bindings'
[task 2019-05-27T20:51:07.778Z] 20:51:07 INFO - dom/bindings/UnifiedBindings14.o

Flags: needinfo?(ehsan)

Another failure introduced by the same changes:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=248619513&repo=autoland&lineNumber=19333

21:03:11 INFO - In file included from z:/task_1558989662/build/src/obj-firefox/dom/base/Unified_cpp_dom_base2.cpp:11:
21:03:11 INFO - z:/task_1558989662/build/src/dom/base/Document.cpp(6985,23): error: must use 'enum' tag to refer to type 'ReferrerPolicy' in this scope
21:03:11 INFO - static_cast<ReferrerPolicy>(mReferrerPolicy));
21:03:11 INFO - ^
21:03:11 INFO - enum
21:03:11 INFO - z:/task_1558989662/build/src/obj-firefox/dist/include/mozilla/dom/Document.h(738,12): note: enum 'ReferrerPolicy' is hidden by a non-type declaration of 'ReferrerPolicy' here
21:03:11 INFO - uint32_t ReferrerPolicy() const { return GetReferrerPolicy(); }
21:03:11 INFO - ^
21:03:11 INFO - In file included from z:/task_1558989662/build/src/obj-firefox/dom/base/Unified_cpp_dom_base2.cpp:11:
21:03:11 INFO - z:/task_1558989662/build/src/dom/base/Document.cpp(6984,17): error: no matching member function for call to 'SetSpeculationReferrerPolicy'
21:03:11 INFO - executor->SetSpeculationReferrerPolicy(
21:03:11 INFO - ^
21:03:11 INFO - z:/task_1558989662/build/src/obj-firefox/dist/include/nsHtml5TreeOpExecutor.h(262,8): note: candidate function not viable: no known conversion from 'enum ReferrerPolicy' to 'nsHtml5TreeOpExecutor::ReferrerPolicy' (aka 'mozilla::net::ReferrerPolicy') for 1st argument
21:03:11 INFO - void SetSpeculationReferrerPolicy(ReferrerPolicy aReferrerPolicy);
21:03:11 INFO - ^
21:03:11 INFO - z:/task_1558989662/build/src/obj-firefox/dist/include/nsHtml5TreeOpExecutor.h(263,8): note: candidate function not viable: no known conversion from 'enum ReferrerPolicy' to 'const nsAString' (aka 'const nsTSubstring<char16_t>') for 1st argument
21:03:11 INFO - void SetSpeculationReferrerPolicy(const nsAString& aReferrerPolicy);
21:03:11 INFO - ^
21:03:11 INFO - In file included from z:/task_1558989662/build/src/obj-firefox/dom/base/Unified_cpp_dom_base2.cpp:11:
21:03:11 INFO - z:/task_1558989662/build/src/dom/base/Document.cpp(7035,44): error: use of undeclared identifier 'mContentTypeForWriteCalls'
21:03:11 INFO - ->Parse(EmptyString(), nullptr, mContentTypeForWriteCalls, true);
21:03:11 INFO - ^
21:03:11 INFO - z:/task_1558989662/build/src/dom/base/Document.cpp(7166,46): error: use of undeclared identifier 'mContentTypeForWriteCalls'
21:03:11 INFO - ->Parse(aText + new_line, key, mContentTypeForWriteCalls, false);
21:03:11 INFO - ^
21:03:11 INFO - z:/task_1558989662/build/src/dom/base/Document.cpp(7169,35): error: use of undeclared identifier 'mContentTypeForWriteCalls'
21:03:11 INFO - ->Parse(aText, key, mContentTypeForWriteCalls, false);
21:03:11 INFO - ^
21:03:11 INFO - 5 errors generated.
21:03:11 INFO - z:/task_1558989662/build/src/config/rules.mk:810: recipe for target 'Unified_cpp_dom_base2.obj' failed
21:03:11 INFO - mozmake.EXE[4]: *** [Unified_cpp_dom_base2.obj] Error 1
21:03:11 INFO - mozmake.EXE[4]: Leaving directory 'z:/task_1558989662/build/src/obj-firefox/dom/base'
21:03:11 INFO - mozmake.EXE[4]: *** Waiting for unfinished jobs....
21:03:11 INFO - mozmake.EXE[4]: Entering directory 'z:/task_1558989662/build/src/obj-firefox/gfx/skia'
21:03:11 INFO - gfx/skia/Unified_cpp_gfx_skia6.obj
21:03:11 INFO - mozmake.EXE[4]: Leaving directory 'z:/task_1558989662/build/src/obj-firefox/gfx/skia'

Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9b24ae04ca3
Move HTMLDocument.open/close/write/writeln to Document; r=farre
Flags: needinfo?(ehsan)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

mozregression bring me here, because something is broken in Firefox 69.0a1 (2019-05-28) (64-bit) on Gentoo Linux.

When I click close button on find panel (ctrl+f) it closes whole browser, not just find panel.

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0765f0fa75605655beb1eb98afc7584364efb846&tochange=a9b24ae04ca3684c286b4c8504d694b2426f255c

Regressions: 1555020

(In reply to drJeckyll from comment #11)

mozregression bring me here, because something is broken in Firefox 69.0a1 (2019-05-28) (64-bit) on Gentoo Linux.

When I click close button on find panel (ctrl+f) it closes whole browser, not just find panel.

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0765f0fa75605655beb1eb98afc7584364efb846&tochange=a9b24ae04ca3684c286b4c8504d694b2426f255c

See bug 1555020. It should hopefully be fixed in the next Nightly. My apologies for the regression!

Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c22d5fec8627
Part 2: Switch the loop variable to a size_t type
Keywords: site-compat

Our documentation already refers to the Document page for everything under HTMLDocument anyway.

You need to log in before you can comment on or make changes to this bug.