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

672 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 32f7c8fec3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02:00
Kris Maglione 663e9cb7fa Bug 1404198: Part 2e - Switch to NS_NewTimer* in layout. r=njn
MozReview-Commit-ID: 2WxyAXpJ3Fg

--HG--
extra : rebase_source : 4166c82c86558f79a4b41566a9997584e5fc94cf
2017-10-15 23:13:31 -07:00
Alex Gaynor e6c660f838 Bug 1319423 - Part 3 - Change the print IPC to not require the content process to create a temporary file; r=bobowen
MozReview-Commit-ID: GLhTbfREk0n

--HG--
extra : rebase_source : f8f94b222fffa16ab973d07c940bfd64b5407440
2017-10-03 16:34:18 -04:00
Alex Gaynor b00c32c807 Bug 1319423 - Part 2 - Switch away from std::ifstream to PRFileDesc in PrintTranslator; r=jrmuizel
MozReview-Commit-ID: 6ucwbGkqOQ0

--HG--
extra : rebase_source : ab0540e2b7d61108c8c550d8bf8b8a594364f90a
2017-10-03 13:23:57 -04:00
Alex Gaynor 41d8032290 Bug 1319423 - Part 1 - Introduce DrawEventRecorderPRFileDesc to allow switching away from std::ofstream in printing; r=jrmuizel
MozReview-Commit-ID: 1gn8J2fhejS

--HG--
extra : rebase_source : 02b6224c2788964c375092e58174efbacfdbdba5
2017-10-03 12:29:15 -04:00
Kyle Machulis 1cc8b01353 Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz
MozReview-Commit-ID: GCATWRt6qMo

--HG--
extra : rebase_source : 29854f1374c6ad318da0b5b68be23507667c3be4
2017-10-06 13:27:23 -07:00
Nicholas Nethercote c0a1cf9b49 Bug 1407103 - Convert wstring attributes to AString in widget/nsIPrint*.idl. r=bobowen.
This avoids a lot of mismatches between nsAString and char16_t*, thus removing
many getter_Copies() and ToNewUnicode() and get() calls, and generally making
things simpler.

Note: the patch removes GetDefaultPrinterNameFromGlobalPrinters() by simply
inlining it at its two callsites, which is easy with the changed types.

--HG--
extra : rebase_source : 9ab9b3694f093fc9b22c7f8e2394a98674d76c11
2017-10-09 10:08:09 +11:00
Kyle Machulis 669ff05b49 Bug 1406525 - Remove nsIDOMHTMLLinkElement; r=bz
MozReview-Commit-ID: 4xUSQ8SiIqX
2017-10-09 16:09:38 -07:00
Sebastian Hengst b834f0d177 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Kyle Machulis 2090426dc0 Bug 1405792 - Remove nsIDOMHTMLIFrameElement r=bz
MozReview-Commit-ID: 1u9C66X8j59

--HG--
extra : rebase_source : 5d87fe933170e32fbb44e24ec843623e143164d2
2017-10-04 20:41:24 -07:00
Kyle Machulis e54a4653ba Bug 1404079 - Remove nsIDOMHTMLFrameElement; r=bz
MozReview-Commit-ID: GSvMwRpl7g4

--HG--
extra : rebase_source : a5e8ee45bae90eaa9ecdcc6f0bac0c9dac0ce2c8
2017-09-28 19:06:14 -07:00
Kyle Machulis e6d0a7ad13 Bug 1402180 - Remove nsIDOMHTMLAreaElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAreaElement, replacing it
with binding class usage.

MozReview-Commit-ID: IaX4JFTPZn6

--HG--
extra : rebase_source : 79f9200c6ff9e081a5d9bc21eaa605f88caa99e9
2017-09-21 17:52:28 -07:00
Kyle Machulis a3876f104a Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-26 11:41:28 -07:00
Sebastian Hengst 5ed0b93c50 Backed out changeset 26805294a547 (bug 1389650) 2017-09-26 10:47:41 +02:00
Kyle Machulis e2ace7d91f Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-25 23:12:44 -07:00
Kyle Machulis 9b4ac7e03f Bug 1402102 - Remove nsIDOMHTMLObjectElement; r=bz
Removes the nsIDOMHTMLObjectElement XPCOM interface, replacing it with
HTMLObjectElement and FromContent conversion usage.

MozReview-Commit-ID: dmsjSO97uh

--HG--
extra : rebase_source : 9b2c25b8681f754bc34233afccdb6fc5d38f0804
2017-09-22 17:05:12 -07:00
L. David Baron 98d3342e92 Bug 1405875 - Remove unneeded QueryInterface to nsIContentViewerFile. r=mats
nsDocumentViewer is the only implementation of both nsIContentViewer and
of nsIContentViewerFile.

This helps to make nsIContentViewerFile unused so that we can remove it
later in this patch series.

MozReview-Commit-ID: EgsgrXfTmx1
2017-10-05 11:15:57 -07:00
L. David Baron 70c24e3e54 Bug 1405875 - Remove debug file mechanism from printing. r=mats
This was used only by nsRegressionTester::DumpFrameModel, which was
removed in the previous patch.

MozReview-Commit-ID: I8fS7vzlFQw
2017-10-05 11:15:57 -07:00
Makoto Kato 6454f3ca73 Bug 1263503 - memory leak of filename into layout/printing/nsPrintEngine.cpp. r=mantaroh
"fileNameStr = fileName;" will be fileNameStr.Assign(fileName), so this causes small memory leak.  We should use Adopt, getter_copies, or AString parameter instead.

MozReview-Commit-ID: 5VTgttj2LdK

--HG--
extra : rebase_source : b372f04b210655e754b35fe4ebb2b8a32a19d6bf
2017-09-11 10:42:22 +09:00
Masayuki Nakano 4ce89d8f61 Bug 1369072 - part3: nsXBLPrototypeHandler::DispatchXBLCommand() should use controller of visible window r=smaug
With previous change, KeyboardEvent is dispatched even when invisible window
has focus.  However, nsRootWindow::GetControllerForCommand() returns controller
for focused window even when the window is invisible because it uses
nsFocusManager::GetFocusedDescendant() to retrieve focused window.

Perhaps, we can assume that users won't expect to do something with invisible
window when they type some keys.  Then, nsRootWindow::GetControllerForCommand()
should return controller for visible ancestor window if focused window is
invisible.

This patch makes nsFocusManager::GetFocusedDescendant() can return only visible
descendants.  However, it already has a bool argument.  Therefore, it should
have a flag instead of adding new flag.  Most changes of this patch is replacing
its callers.

Then, nsRootWindow::GetControllerForCommand() and nsRootWindow::GetControllers()
should have a bool flag if it should return controller(s) for visible window.
This patch adds a bool flag for it.  Fortunately, the interface isn't scriptable.

Finally, this patch makes nsXBLPrototypeHandler::DispatchXBLCommand() and
EventStateManager::DoContentCommandEvent() retrieve controller for visible
window since they are always handles user input.

MozReview-Commit-ID: GygttTHuKRm

--HG--
extra : rebase_source : 1341273c4606298cb9b890b9312d9f5c8a75d144
2017-09-07 22:54:49 +09:00
Masayuki Nakano b3926cc517 Bug 1391645 - Make nsPrintEngine::SetupToPrintContent() proceed with the print even when mPrt->mPrintObject->mPresShell and mPrt->mPrintObject->mPresContext are nullptr but mIsCreatingPrintPreview is false r=dholbert
Bug 1376693 added a null-check to bail from print operations if
mPresShell/mPresContext are null, to avoid some null-deref crashes.  However,
it turns out it's possible for these variables to be null under normal
conditions -- for example, when nsPrintEngine is printing documents,
mPrt->mPrintObject->mPresShell and mPrt->mPrintObject->mPresShell can be nullptr
if the document has <frameset> element and it's printing only content of a
<frame> element or all <frame> elements separately.

This special frameset-printing mode can cause these variables to be null;
however, the crash occurred only when mIsCreatingPrintPreview is true.  So,
we should check the variables only when it's true.

Fortunately:
    * the null-deref crashes that Bug 1376693 wanted to avoid were all in code
      that we only visit when mIsCreatingPrintPreview is true (i.e. during print
      preview).
    * this special frameset-printing mode (which causes these variables to be
      null) _cannot be used during print preview_.

So, we can avoid the print-preview-specific crashes without breaking
frameset-printing by simply making our null-check bail-out conditional on
mIsCreatingPrintPreview.

MozReview-Commit-ID: FJ3ynrXTxnI

--HG--
extra : rebase_source : 788ab55840c725dc401007b605c035c053049edf
2017-08-21 14:56:07 +09:00
Masatoshi Kimura 5f035965ac Bug 1390209 - Remove unused nsIDOMHTML*Element interfaces. r=qdot
MozReview-Commit-ID: DagD3IHhRZy

--HG--
extra : rebase_source : 2add5ad8e9181ba9bf29f53a6df75b730ab5ea78
2017-08-15 01:31:47 +09:00
Kyle Machulis 649634a721 Bug 1387184 - Remove nsIDOMHTMLEmbedElement; r=bz
Removes nsIDOMHTMLEmbedElement and all references. HTML elements are
now handled by WebIDL. With the deprecation of extensions, XPCOM
interfaces to HTML elements are no longer needed.

MozReview-Commit-ID: DI4XVvdgPDI

--HG--
extra : rebase_source : 74bd92619e3d1db04c3dd40ec3022474fe1d647c
2017-08-09 12:05:08 -07:00
Nicholas Nethercote 1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Tobias Schneider 3880ddff03 Bug 1382327 - (reftest) Rename reftest-print to reftest-paged. r=dbaron
--HG--
extra : rebase_source : c4e47e2de8d615c77e7e9ce88f6b21c9d15c92e4
2017-07-26 22:53:46 -07:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Masayuki Nakano 8661a7547b Bug 1382118 - Make nsPrintEngine::AfterNetworkPrint() do nothing if mPtr is nullptr r=dholbert
According to the crash reports, nsPrintEngine::AfterNetworkPrint() may be called after nsPrintEngine::Destroy() is called.  In this case, the method should do nothing because it's already been destroyed.

MozReview-Commit-ID: IwY9fR1OUwU

--HG--
extra : rebase_source : 6fb2e23a1e30da59c4c8823e72b8a4460c8adb28
2017-07-22 00:43:38 +09:00
Masayuki Nakano 80bbd2acaf Bug 1376693 - part3: Make callers of nsPrintEngine::Print() and nsPrintEngine::PrintPreview() guarantee that instance of nsPrintEngine won't be deleted during the calls r=dholbert
This patch makes callers of nsPrintEngine::Print() and
nsPrintEngine::PrintPreview() grab the nsPrintEngine instance with local
variable before calling them.  That guarantees that instance of nPrintEngine
won't be deleted during the calls.  (We already had a RefPtr in CommonPrint
that basically did this.  This patch moves it out to the callers to strengthen
its guarantee.)

MozReview-Commit-ID: 2jlYC4RKAg6

--HG--
extra : rebase_source : e6eac8df88e1d81d67a879786a2403ca00e84036
2017-07-19 14:06:04 +09:00
Masayuki Nakano 70f0bb4639 Bug 1376693 - part2: Make nsPrintEngine::DoCommonPrint() stop initializing the instance when the owner stops using the instance r=dholbert
nsPrintEngine::FinishPrintPreview() may be called when nsAutoScriptBlocker is destroyed in nsPrintEngine::DoCommonPrint().  That means that the owner stopped print preview with the instance.  In this case, nsPrintEngine::DoCommonPrint() doesn't need to keep initializing the instance anymore.

MozReview-Commit-ID: DRQfmyW9FEL

--HG--
extra : rebase_source : a49c0f5c74c24710334559496d173c3bae08db01
2017-07-18 19:03:36 +09:00
Masayuki Nakano cf239d5fa0 Bug 1376693 - part1: Make nsPrintEngine::SetupToPrintContent() return early if mPrt->mPrintObject isn't initialized r=dholbert
nsPrintObject::mPresShell and nsPrintObject::mPresContext are initialized by
nsPrintEngine::ReflowPrintObject().  However, while
nsPrintEngine::DoCommonPrint() is initializing mPrt and mPrintObject,
destroying nsAutoScriptBlocker may cause calling nsDocumentViewer::Destroy()
or nsPrintEngine::FinishPrintPreview() directly.  Then,
nsPrintEngine::SetupToPrintContent() will be called.  Therefore,
nsPrintEngine::SetupToPrintContent() sometimes see uninitialized mPrt, or
mPrt->mPrintObject->mPresShell and mPrt->mPrintObject->mPresContext.

Therefore, this patch makes nsPrintEngine::SetupToPrintContent() check whether
the necessary objects are already initialized.  When one of them is not
initialized as expected, it won't to do anything.

Note that mPrt->mPrintObject is never nullptr with current design, but this
patch makes the method check it for preventing similar crash which might be
regressed with other bug fix in the future.

MozReview-Commit-ID: JKfObRm5enm

--HG--
extra : rebase_source : 977e9ffd7fc43fbeb3fac7dbd640df5a426a7427
2017-07-19 13:50:35 +09:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Lee Salzman 2d696d5c34 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Sebastian Hengst 522fc18c93 Backed out changeset 24421d72ba08 (bug 1376026) 2017-07-07 21:42:09 +02:00
Lee Salzman ab6885d706 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Masayuki Nakano 61af94acbd Bug 1367683 Optimize initializing nsRange r=smaug
nsRange::DoSetRange() adds/remove its root to/from mutation observer, initializes common ancestor, registers itself to the common ancestor, unregisters itself from old common ancestor, and notifies selection listeners of selection change.

However, those runtime cost is expensive but on the other hand, a lot of callers set both start and end of the range and that causes calling DoSetRange() twice.

This patch renames Set() to SetStartAndEnd() for easier to understand the meaning and make it call DoSetRange() only once.

MozReview-Commit-ID: FRV55tuBAgg

--HG--
extra : rebase_source : 67adf929cf119e2425f7d3741651217522094590
2017-05-30 13:18:25 +09:00
Masayuki Nakano 3def411e37 Bug 1360135 Get rid of nsPrintData::mSelectedPO because it's unused r=dholbert
MozReview-Commit-ID: 3nG5ZPXOsvq

--HG--
extra : rebase_source : cc01c2a44d458f59d595cba95e5b2bd45cd9061f
2017-05-10 17:25:56 +09:00
Masayuki Nakano d11d55f55f Bug 1354443 part.4 nsPrintData should guarantee that object which has nsIWebProgressListener interface won't be released during calling a method of it r=dholbert
Although, this should be rewritten with range-based for loop, this patch just making them use nsCOMPtr to refer the objects.

MozReview-Commit-ID: IJBWs8CTyCF
2017-05-02 17:07:45 +09:00
Masayuki Nakano be2208abd2 Bug 1354443 part.2 nsPrintEngine::Disconnect() should clear mPrintObj r=dholbert
MozReview-Commit-ID: 1fUZ8YJCvxh
2017-04-27 17:17:20 +09:00
Masayuki Nakano 27a786a810 Bug 1354443 part.1-2 Methods of nsPrintEngine should guarantee that objects owned by nsPrintData won't be released when they're referred by calling methods via their arguments r=dholbert
For example, mPrt->mPrintObject is owned by mPrt.  When nsPrintEngine needs to
call a method which takes a reference to mPrt->mPrintObject, the caller should
grab the mPrt instance for guaranteeing that mPrt->mPrintObject won't be deleted
during the method-call.

MozReview-Commit-ID: BiOQwVKdWM1
2017-05-12 13:43:31 +09:00
Masayuki Nakano 3fd5206e5b Bug 1354443 part.1-1 Make nsPrintData refcountable r=dholbert
MozReview-Commit-ID: 78azPbH9S9x
2017-05-09 17:08:20 +09:00