Граф коммитов

130 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez fcff6b1a69 Bug 1624829 - Use FunctionRef for various Enumerate* callbacks. r=edgar
This avoids a bunch of ugly casts and void pointers, without much overhead
(unlike std::function or such).

Differential Revision: https://phabricator.services.mozilla.com/D68182

--HG--
extra : moz-landing-system : lando
2020-03-26 12:44:47 +00:00
Masatoshi Kimura 3df19bc1d4 Bug 1623222 - Remove the charset parameter from nsITextToSubURI::UnEscapeURIForUI. r=hsivonen
Only 3 callers are using a non-UTF-8 charset as the first parameter.
* MediaDocument.cpp: This does not make sense because the "filename" part of
  URLs will always be encoded with UTF-8.
* nsContextMenu.js: This is wrong because "mailto:" URLs don't care about the
  document charset.
* Finder.jsm: This caused bug 1623222.

Differential Revision: https://phabricator.services.mozilla.com/D67386

--HG--
extra : moz-landing-system : lando
2020-03-19 10:45:28 +00:00
Marco Bonardo 2dc20c6432 Bug 1621328 - Move CreateExposableURI into nsIOService. r=Gijs,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D66269

--HG--
extra : moz-landing-system : lando
2020-03-13 12:44:36 +00:00
Mirko Brodesser ec9cb4d8ef Bug 1622199: annotate `Selection::AddRangeAndSelectFramesAndNotifyListeners` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D66759

--HG--
extra : moz-landing-system : lando
2020-03-13 15:46:13 +00:00
Jonathan Watt 56e18a7319 Bug 1619403. Merge nsPrintJob's GetDisplayTitleAndURL and GetDocumentTitleAndURL. r=nordzilla
This also removes nsPrintJob::mFallbackDocTitle since there really is no point
in blindly calculating it ahead of time when we will virtually never use it,
and even if there was there's no reason to store in on the nsPrintJob given
that we create a new nsPrintJob every time we print!

Differential Revision: https://phabricator.services.mozilla.com/D65014

--HG--
extra : moz-landing-system : lando
2020-03-03 20:08:53 +00:00
Jonathan Watt df7370bda4 Bug 1618909. Remove nsIWebBrowserPrint.documentName. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D64774

--HG--
extra : moz-landing-system : lando
2020-03-02 20:10:10 +00:00
Jonathan Watt a149392cbb Bug 1552966. Convert the printing code to stop using DocShellTree* classes. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D56830

--HG--
extra : moz-landing-system : lando
2020-02-14 16:31:01 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Emilio Cobos Álvarez 69c87f6cb2 Bug 1613349 - Rename nsINode::DeleteProperty to RemoveProperty. r=smaug
And the related methods as well.

Differential Revision: https://phabricator.services.mozilla.com/D61768

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Hiroyuki Ikezoe 04b4206ae2 Bug 1596317 - Use CallState for SubDocEnumFunc. r=smaug
`true` -> `CallState::Continue`
`false` -> `CallState::Stop`

Differential Revision: https://phabricator.services.mozilla.com/D57437

--HG--
extra : moz-landing-system : lando
2019-12-19 07:58:45 +00:00
Bogdan Tara a96ffb25c5 Backed out 7 changesets (bug 1596317) for causing build bustages CLOSED TREE
Backed out changeset 0d3208fcb948 (bug 1596317)
Backed out changeset fe5554dc4115 (bug 1596317)
Backed out changeset 019de59cbc93 (bug 1596317)
Backed out changeset f4851472b087 (bug 1596317)
Backed out changeset a984cf515db8 (bug 1596317)
Backed out changeset d0da5bf9b4d4 (bug 1596317)
Backed out changeset abe5f2030dd9 (bug 1596317)
2019-12-19 06:49:39 +02:00
Hiroyuki Ikezoe 9e4bf031ae Bug 1596317 - Use CallState for SubDocEnumFunc. r=smaug
`true` -> `CallState::Continue`
`false` -> `CallState::Stop`

Differential Revision: https://phabricator.services.mozilla.com/D57437

--HG--
extra : moz-landing-system : lando
2019-12-19 04:16:10 +00:00
Ciure Andrei 4a058d35be Backed out changeset fd383a15ed4e (bug 1552966) for causing browser_printpreview.js to permafail CLOSED TREE 2019-12-14 17:45:23 +02:00
Jonathan Watt 5096a4a025 Bug 1552966. Convert the printing code to stop using DocShellTree* classes. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D56830

--HG--
extra : moz-landing-system : lando
2019-12-13 14:16:15 +00:00
Emilio Cobos Álvarez 3ccc6c30ab Bug 1603313 - Subdocument enum callbacks should take a reference. r=bzbarsky
As they can never take null.

Differential Revision: https://phabricator.services.mozilla.com/D56843

--HG--
extra : moz-landing-system : lando
2019-12-14 05:08:39 +00:00
Emilio Cobos Álvarez 4d2b2ec8ce Bug 1601983 - Fix print preview ICB size. r=jwatt
When print previewing, use the content-viewer bounds as the visible area of the
document.

We used to get this fixed up via BrowserChild::RecvUpdateDimensions, but no
longer do.

Setting the page size without pixel scaling as the visible size makes no sense.
This code is generally pretty messy, it'd be good to try to unify it somehow
with the non-printing code.

Differential Revision: https://phabricator.services.mozilla.com/D57154

--HG--
extra : moz-landing-system : lando
2019-12-13 21:03:30 +00:00
Masayuki Nakano d586d5dc73 Bug 1543315 - part 19: Mark `PresShell::ReconstructFrames()` as `MOZ_CAN_RUN_SCRIPT` r=smaug
It calls `Document::FlushPendingNotification()` so that we should mark it
as `MOZ_CAN_RUN_SCRIPT`.

And the method calls it of `mDocument` and `mDocument` is never modified
after it's initialized.  Therefore, we can move the initializer to the
constructor and make `RefPtr<Document>` to `RefPtr<Document> const`.  Thus,
we can avoid unnecessary auto `RefPtr`.

Differential Revision: https://phabricator.services.mozilla.com/D55803

--HG--
extra : moz-landing-system : lando
2019-12-11 12:18:00 +00:00
Jonathan Watt 212f106dcf Bug 1486968. Remove nsPrintJob::mOldPrtPreview. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D56205

--HG--
extra : moz-landing-system : lando
2019-12-09 13:36:55 +00:00
Jonathan Watt 2f4b27a303 Bug 1602125. Remove nsIPrintingPromptService.showPrintDialog's nsIWebBrowserPrint parameter and MockWebBrowserPrint. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D56249

--HG--
extra : moz-landing-system : lando
2019-12-09 09:04:29 +00:00
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Jonathan Watt fc659ffc6a Bug 1601800. Remove nsIPrintingPromptService.showPrintProgressDialog's nsIWebBrowserPrint parameter. r=bobowen
Now dead code.

Differential Revision: https://phabricator.services.mozilla.com/D56101

--HG--
extra : moz-landing-system : lando
2019-12-06 09:46:03 +00:00
Emilio Cobos Álvarez 0eb000c3ae Bug 1599161 - Rename nsLayoutStylesheetCache to GlobalStyleSheetCache. r=boris
It's a better name, and will avoid confusion when I add other stylesheet caches
outside of the CSS loader.

Depends on D54556

Differential Revision: https://phabricator.services.mozilla.com/D54557

--HG--
rename : layout/style/nsLayoutStylesheetCache.cpp => layout/style/GlobalStyleSheetCache.cpp
rename : layout/style/nsLayoutStylesheetCache.h => layout/style/GlobalStyleSheetCache.h
extra : moz-landing-system : lando
2019-11-25 22:08:43 +00:00
Jonathan Watt db9b9ed1af Bug 1593793. Move and rename nsPrintData::mBrandName to nsPrintJob::mFallbackDocTitle. r=bobowen
nsPrintData::mBrandName never changes over the lifetime of a Firefox instance.
It is wasteful to have nsPrintData obtain and store it, since we can replace
an nsPrintJob's nsPrintData object multiple times over the lifetime of the
nsPrintJob and nsPrintJob is the only consumer.

Differential Revision: https://phabricator.services.mozilla.com/D51689

--HG--
extra : moz-landing-system : lando
2019-11-04 20:02:03 +00:00
Nika Layzell 0354cad681 Bug 1577711 - Part 2: Perform frame static clone after parent static clone, r=smaug
This is done by delaying the code within nsFrameLoader::CreateStaticClone until
after the document has been created. The nsFrameLoader is re-discovered using
the subframe BrowsingContext's mEmbedderElement.

Differential Revision: https://phabricator.services.mozilla.com/D44586

--HG--
extra : moz-landing-system : lando
2019-09-05 14:55:19 +00:00
Kris Maglione 64c062d570 Bug 1570773: Move browsingContext getter to nsIDocShellTreeItem and add notxpcom variant. r=nika
This also renames the existing infallible nsDocShell:GetBrowsingContext()
getter to BrowsingContextRef(), and changes the return type, since several
callers rely on it returning a raw pointer rather than an already_AddRefed.

Differential Revision: https://phabricator.services.mozilla.com/D40312

--HG--
extra : moz-landing-system : lando
2019-08-07 16:59:30 +00:00
Mirko Brodesser 63b4627d28 Bug 1562876: rename `Selection::AddRange` to `Selection::AddRangeAndSelectFramesAndNotifyListeners`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D36602
2019-07-03 13:26:13 +02:00
Masayuki Nakano 2a450c5196 Bug 1444847 - part 2: Sort out basic API of `nsRange` for consistency with coming `StaticRange` r=smaug
For avoiding confusion between API of `nsRange` and `StaticRange`, I'd like to
rename `nsRange::CreateRange()` to `nsRange::Create()` because
`StaticRange::CreateStaticRange()` is too long name and
`StaticRange::CreateRange()` sounds odd.  This patch renames it and changes
related methods to template methods to avoid runtime cost of temporary
`RawRangeBoundary` instance creation.

Differential Revision: https://phabricator.services.mozilla.com/D35141

--HG--
extra : moz-landing-system : lando
2019-06-28 07:47:29 +00:00
Jonathan Watt 88e7ba6db9 Bug 1558180. Comment the mysterious OnPageHide() call in nsPrintJob and move it somewhere that makes sense. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34347

--HG--
extra : rebase_source : 4799985e94b29c2ef522d2d0ea69009fd72473ec
extra : amend_source : 5700597b2644267a6fecbd7e654e6162f3862bea
2019-06-04 16:01:33 +01:00
Jonathan Watt 79cd40383d Bug 1558057. Remove nsPrintJob::CleanupDocTitleArray. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34289

--HG--
extra : rebase_source : 0f65d809f1946fa1f555d24d364d49e294657ffb
extra : amend_source : 08fcb1420e8083573f7d783005eabbb7cc75dfd5
2019-05-30 14:03:36 +01:00
Jonathan Watt 88526e9eac Bug 1557878. Replace nsIWebBrowserPrint::enumerateDocumentNames with a getter for the top document's name. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34260

--HG--
extra : rebase_source : cbac94e78d57371ec1f4bdfcd1739367fb79f864
2019-05-30 11:43:16 +01:00
Jonathan Watt 913d6b76ee Bug 1557687. Remove nsPrintData::mDocWasToBeDestroyed. r=bobowen
This shows that this variable has never been read going back all the way to
the original Mercurial import in 2007:

  hg grep -f --diff mDocWasToBeDestroyed layout/printing/ns*

Differential Revision: https://phabricator.services.mozilla.com/D34143

--HG--
extra : rebase_source : c14a51dab1825e26fb8031d291d2c69e78931c84
extra : amend_source : 73794b07d703987db8d2eb49dd97d74b1a9be325
2019-05-29 10:42:14 +01:00
Jonathan Watt 09d6c311f9 Bug 1557681. Rename nsPrintJob::Cancelled() to Cancel(). r=bobowen
"Cancelled" sounds like it's a query and should return a bool.  In fact this
method sets state in response to a nsIWebBrowserPrint.cancel() being called.

Differential Revision: https://phabricator.services.mozilla.com/D34137

--HG--
extra : rebase_source : 97797d906b84ed18a258881a31722179d50943f7
extra : amend_source : c0e1b61f13b2a8ccaec7cc995841948deabbe041
2019-05-29 07:14:46 +01:00
Jonathan Watt 4a0c9a9c7e Bug 1557434. Remove nsPrintObject::mPrintPreview. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34134

--HG--
extra : rebase_source : b02b90a21ed16fce0189b0aa317743f01570f57a
extra : amend_source : ad608df1346b8ce0bd2ef43305764407008e8e5f
2019-05-28 15:26:59 +01:00
Jonathan Watt 1972449751 Bug 1557434. Rename nsPrintJob::BuildDocTree to BuildNestedPrintObjects. r=bobowen
The previous splitting of nsPrintObject::Init made clear that in fact this
method does not create documents at all!  This new name better describes what
it does.

Differential Revision: https://phabricator.services.mozilla.com/D34118

--HG--
extra : rebase_source : 143812a4b5438dff24a7f38b07f0a95660e139ce
extra : amend_source : 209937ec2d638bcd60929c6ac3840ee7e0209b73
2019-05-28 14:16:49 +01:00
Jonathan Watt 47ed611600 Bug 1557434. Split nsPrintObject::Init into separate root-object and nested-object init methods. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34006

--HG--
extra : rebase_source : cb246f4b1686d2e7634715b7cea657f762bbca58
extra : amend_source : 3de6ae30fa2156bd38cdea347a77d667c1d65581
2019-05-28 12:48:21 +01:00
Jonathan Watt 02975bf7d4 Bug 1557033. Stop using nsIDocShellTreeItem in nsPrintJob. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33793

--HG--
extra : rebase_source : f12820b3cd6a5539e79abdcf51945fcd4eef47a8
2019-05-24 10:50:22 +01:00
Jonathan Watt 5cd2b5b11e Bug 1557104. Merge nsIPageSequenceFrame and nsSimplePageSequenceFrame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D33817

--HG--
rename : layout/generic/nsSimplePageSequenceFrame.cpp => layout/generic/nsPageSequenceFrame.cpp
rename : layout/generic/nsSimplePageSequenceFrame.h => layout/generic/nsPageSequenceFrame.h
extra : rebase_source : e75b043af4dbfe4c108f2bfc0e234fd20c5af315
2019-05-22 13:01:33 +01:00
Jonathan Watt 39945059b3 Bug 1552785. Remove printing related isFramesetDocument and isFramesetFrameSelected code. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33696

--HG--
extra : rebase_source : 2e7f854a808059b4955ffaad425fe8b68263883e
2019-05-21 23:25:57 +01:00
Jonathan Watt 098392f093 Bug 1552785. Remove internal code for various frameset printing behaviors. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33624

--HG--
extra : rebase_source : 336e87a05970895684602c9db3e5222918f861c8
extra : source : 98fbf1ed617549496036099b5aee333aa6b29925
2019-05-21 16:01:34 +01:00
Jonathan Watt 83558018e6 Bug 1552785. Reduce code duplication in nsPrintJob::EnablePOsForPrinting. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33686

--HG--
extra : rebase_source : c1c0d1712f10b6de417046f517e171f45a6822b3
2019-05-20 15:29:01 +01:00
Jonathan Watt 659bdf822a Bug 1552785. Stop using GetHowToEnableFrameUI in nsPrintJob::EnablePOsForPrinting. r=bobowen
kFrameEnableNone is synonymous with having a non-frameset document.  This makes
what is going on here explicit.  It also gets rid of the kRangeSelection based
override and makes that explicit too.

Differential Revision: https://phabricator.services.mozilla.com/D33684

--HG--
extra : rebase_source : 7cb1c4be168816f13f01189f672c43b80ab9bbe0
2019-05-17 16:38:10 +01:00
Jonathan Watt 266860bac6 Bug 1552785. Stop setting frameset printing behavior for nsIPrintSettings::kRangeSelection. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33623

--HG--
extra : rebase_source : 8f1cb0aadd99501ea54c566d8ef437898fb90bd9
2019-05-17 14:52:25 +01:00
Jonathan Watt cb54619aa0 Bug 1553324. Remove nsIPrintSettings.printFrameTypeUsage. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D32068

--HG--
extra : rebase_source : 939cce38c90a39bd002f95e71e1de94a62f895e1
extra : amend_source : 1be783028096f61145727492fa3c3f41e363c205
2019-05-13 16:30:20 +01:00
Jonathan Watt c1abf2081c Bug 1553318. Remove nsIPrintSettings.kRangeFocus. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D32064

--HG--
extra : rebase_source : 396f01bc0f4401bdb6cdc094890751d4f0cbf45c
extra : amend_source : 5cd92d2a76b7053861f8af9e6d65ab2feb6cc1c0
2019-05-13 14:52:25 +01:00
Jonathan Watt a7b3640083 Bug 1553081. Set nsPrintJob::mDisallowSelectionPrint during Initialize(). r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31975

--HG--
extra : rebase_source : 57b72312d1c25b62b3c5ebd6818f2010eddfefec
extra : amend_source : 9f8a0f0e30fefccd3a9296b6d91e74f7b6589676
2019-05-10 16:01:33 +01:00
Jonathan Watt e8b9c5bc5d Bug 1553080. Have nsPrintJob record modality and mozPrintCallback presence during initialization. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31974

--HG--
extra : rebase_source : 4e5319b1f6b3b7a70dd79d8c9538300ca1ccd581
extra : amend_source : a4510ba02336f5464463fec3ccd320296d74df92
2019-05-10 14:52:25 +01:00
Jonathan Watt e0e310caed Bug 1552969. Pass the document to print through to nsPrintJob::Print. r=bobowen
...and have nsPrintJob::Print use that instead of mOriginalDoc, which we want
to get rid of.

When nsPrintJob::Print is called and mPrtPreview is nullptr, we know that we
have been called to print a page directly without print preview.  In that case
we know that we're printing the nsPrintJob's docViewer's document.  I.e. the
document of the caller of nsPrintJob::Print.  So in this case mOriginalDoc and
the passed doc are always the same thing.

Differential Revision: https://phabricator.services.mozilla.com/D31874

--HG--
extra : rebase_source : 54f3afd8dc51d02ccd19436d39b570f66fa242d7
extra : amend_source : 49fa445dff1d19eb4faee868ddacda76916af778
2019-05-10 09:38:11 +01:00
Jonathan Watt ab59fdb945 Bug 1552880 p2. Document nsPritJob's Initialize, Print and PrintPreview and rename their document params. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D31812

--HG--
extra : rebase_source : efec6fb9c74212ff615510ec743870bed2e03f38
extra : amend_source : 61944f4a34d531a333f77403ed7e9ea23e0e0d24
extra : source : c5ee693121dd2e614dd801f6301d8da5b3f43935
2019-05-09 23:26:59 +01:00