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

4018 Коммитов

Автор SHA1 Сообщение Дата
Yaroslav Taben 9460881a14 Bug 619092 - Refactor code for removing wyciwyg scheme from URL into util method r=bz
MozReview-Commit-ID: 3eSJJDMDKfE

--HG--
extra : rebase_source : a55ff32e3435f15bbe325b92f4f0a33a22afd679
2018-02-16 16:52:50 -05:00
Hiroyuki Ikezoe 7034a44b02 Bug 1432396 - Add assertions that we don't allow reinitialization of variables that were reset in nsDocShell::Destroy(). r=bz
Here is the list of variables which are reset in nsDocShell::Destroy().
The right column shows the function where the variable is set.  In this patch
all the functions other than SetTreeOwner(*1) have an assertion that we don't
allow the function to be called or bail out during destroying the docshell.

It is possible that SetTreeOwner() is called in script through
`browser.setAttribute("primary", "true")`.  So we can't assert there, we just
bail out from SetTreeOwner when the docshell is being destroyed.

mInitialClientSource              MaybeCreateInitialClientSource()
mObserveErrorPages:               Initially true, never sets true again
mLoadingURI:                      CreateContentViewer()
mOSHE->SetEditorData(nullptr):    DetachEditorFromWindow()
mLSHE->SetEditorData(nullptr):    Setting again in RestoreFromHistory() after bailing out if mIsBeingDestroyed is true
mContentListener:                 Init()
Stop(nsIWebNavigation::STOP_ALL)
  mRestorePresentationEvent:      RestorePresentation()
  mFailedChannel:                 LoadErrorPage()
  mFailedURI:                     LoadErrorPage()
  mRefreshURIList:                RefreshURI()
mEditorData:                      ReattachEditorToWindow() and EnsureEditorData()
mTransferableHookData:            EnsureTransferableHookData()
mContentViewer:                   SetupNewViewer()
mParentWidget:                    SetParentWidget()
mCurrentURI:                      SetCurrentURI()
mScriptGlobal:                    EnsureScriptEnvironment()
mSessionHistory                   SetSessionHistory()
SetTreeOwner():                   SetTreeOwner() *1
mOnePermittedSandboxedNavigator:  SetOnePermittedSandboxedNavigator()
mSecurityUI:                      SetSecurityUI()
CancelRefreshURITimers()
  mRefreshURIList:                RefreshURI()
  mSavedRefreshURIList:           RefreshURI()
mPrivateBrowsingId:               SetPrivateBrowsing()
mOriginAttributes:                SetOriginAttributes()
DecreasePrivateDocShellCount:     SetAffectPrivateSessionLifetime()

MozReview-Commit-ID: G5d941R9K8V

--HG--
extra : rebase_source : 978e5b232e76a803c104c030bbeb91315d886491
2018-02-16 06:29:59 +09:00
Hiroyuki Ikezoe fbdb88bdd8 Bug 1432396 - Do not process nsDocShell::Destroy() if the docshell is already being destroyed. r=bz
The test case in this patch is harmless without this fix, no assertion happens,
no failure happens in the test, but nsDocShell::Destroy() is processed twice.

MozReview-Commit-ID: 2g949emc7at

--HG--
extra : rebase_source : 34209e5cd5310521b2eec4d4f67f355bfdae5d8d
2018-02-16 06:15:04 +09:00
Hiroyuki Ikezoe 74793b07f2 Bug 1432396 - Stop the newly create orphaned viewer when the docshell is destroyed in nsDocShell::CreateContentViewer(). r=bz
Normally the docshell stops the content viewer in nsDocShell::Stop(), but in this
case it won't be stopped in that function since the new content viewer has never
been associated with this docshell.

dom/base/test/test_bug1126851.html is a test case that we bail out
from CreateContentViewer() due to win.close() in an unload event callback.

MozReview-Commit-ID: 7O7TmwHN9re

--HG--
extra : rebase_source : 8f50efd4b582d3283ad482fd896b5d558c0e8269
2018-02-16 06:15:03 +09:00
Hiroyuki Ikezoe cb1555c1b4 Bug 1432396 - Bail out if the docshell is being destroyed due to pagehide notification. r=bz
There are four call sites of FirePageHideNotification().  Two of them are
handled in this patch.  The other two will be taken care of in the subsequent
patches in this patch series respectively.

Without this fix, the test case in this patch causes assertions when
cycle collection happens.

MozReview-Commit-ID: 6GSxjdfXGcY

--HG--
extra : rebase_source : 998b95ae90a1ad80dc177d5eecf1a592ba375116
2018-02-16 06:15:03 +09:00
Hiroyuki Ikezoe a337532619 Bug 1432396 - Check the docshell is being destroyed along with the tree owner at the top of nsDocShell::CreateContentViewer(). r=bz
We bail out the function to make sure we don't process CreateContentViewer
and mLoadingURI is not re-initialized in the function while destroying the
docshell.

MozReview-Commit-ID: AYJ1t2N786N

--HG--
extra : rebase_source : b02c6a061a8938936b40195e166ac2b6c187406d
2018-02-16 06:15:02 +09:00
Kirk Steuber 04e4231688 Bug 1421707 - Implement a system for disabling about: pages via Policy r=bz,Felipe
Additionally adds the enterprise policy for disabling about:config.

MozReview-Commit-ID: 7bT8eV3tRnN

--HG--
extra : rebase_source : a54cc94ea9dbecdfd37a17c96e5048a5d20c6411
2018-02-06 10:00:56 -08:00
Adrian Wielgosik 1bc4558c83 Bug 1437300 - Remove nsIDocCharset. r=bz
MozReview-Commit-ID: Ldl4utK3JKr

--HG--
extra : rebase_source : 7009469dd13e16d43fcdba7549ad88ccf3eb3552
2018-02-10 19:12:42 +01:00
Nathan Froyd 0f56acaf26 Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor
This macro is identical to NS_INTERFACE_MAP_END and encourages the
reader to think that there's something extra-special threadsafe about QI
implementations that use the macro, when in reality there's nothing of
the sort.
2018-02-12 14:36:46 -05:00
Josh Matthews 19738f789f Bug 1436743 - Dispatch events via the docgroup rather than the tabgroup when possible. r=mystor 2018-02-08 15:54:00 -05:00
Emilio Cobos Álvarez e6314d1382 Bug 1435939: Make media feature changes always async. r=bz
Much in the spirit of bug 1434474.

We right now call MediaFeatureChanges sync or async pretty randomly. This has
caused bugs in the past like bug 1413143.

Unify media feature changes, and only post them async, and flush them from
FlushPendingNotifications.

This also fixes a pre-existing problem where style wasn't flushed correctly from
getComputedStyle when there were pending media feature values.

MozReview-Commit-ID: H9S1M8fk5H4
2018-02-07 15:27:30 +01:00
Samael Wang 3fdff5f7c9 Bug 1416307 - Set triggeringPrincipal to current document's principal, if aPrincipal is not given. r=bz
MozReview-Commit-ID: 8lxKFeUlyzq
2018-02-06 13:28:30 -05:00
Boris Zbarsky 29c18cd07f Bug 1434318 part 4. Remove nsIDOMDocument's documentElement attribute. r=mystor
MozReview-Commit-ID: 2FUstFDF2lF
2018-01-31 15:18:10 -05:00
Boris Zbarsky c62e23596a Bug 1434318 part 2. Stop using nsIContentViewer::GetDOMDocument in C++. r=mystor
MozReview-Commit-ID: FoMoVgCngGR
2018-01-31 15:18:09 -05:00
Boris Zbarsky 45afd61f33 Bug 1434318 part 1. Make nsIContentViewer's DOMDocument readonly. r=mystor
No one ever assigns to it in JS anyway.

MozReview-Commit-ID: EAoOXSFnwtl
2018-01-31 15:18:09 -05:00
Boris Zbarsky 7c392f077e Bug 1418085 part 6. Remove nsIDOMHTMLElement. r=mystor
MozReview-Commit-ID: 5QUyFeAQYZQ
2018-01-30 00:25:36 -05:00
Boris Zbarsky 9da3878bc9 Bug 1418076 part 11. Eliminate the nsIDOMHTMLDocument interface. r=mystor
MozReview-Commit-ID: 4lEcUeenbg3
2018-01-26 01:03:25 -05:00
Ben Kelly e71d8db226 Bug 1430139 P3 Remove workers namespace from service worker code. r=asuth 2018-01-26 13:08:59 -08:00
Andrea Marchesini c6da271117 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Brindusan Cristian 368c3d5b6b Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Ben Kelly 81f9741573 Bug 1431847 P5 Perform service worker interception in the parent if ServiceWorkerParentInterceptEnable() returns true. r=asuth 2018-01-24 12:47:16 -05:00
Andrea Marchesini 6480b95ba3 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Nika Layzell c33284aec0 Bug 1293362 - Part 4: Generate runtime bindings for calling xpcom methods from rust, r=froydnj
MozReview-Commit-ID: K37KyHkKsSl
2018-01-23 17:27:26 -05:00
Ben Kelly 70f338b679 Bug 1231211 P10 Move nsDocShell logic into separate ServiceWorkerInterceptController. r=asuth 2018-01-23 10:38:53 -05:00
Ben Kelly 1d94a9ebaa Bug 1231211 P9 Move logic out of nsDocShell::ChannelControlled() and into ServiceWorkerManager::DispatchFetchEvent(). r=asuth 2018-01-23 10:38:53 -05:00
Ben Kelly bcb92a3fdd Bug 1231211 P8 Make nsDocShell::ShouldPrepareForIntercept() only depend on channel data. r=asuth 2018-01-23 10:38:53 -05:00
Ben Kelly 2dc82400a7 Bug 1231211 P7 Pass the nsIChannel to ShouldPrepareForIntercept(). r=asuth 2018-01-23 10:38:53 -05:00
Ben Kelly 5a5a70b6f5 Bug 1231211 P4 Set isReload on LoadInfo in docshell. r=asuth 2018-01-23 10:38:52 -05:00
Jonathan Watt d80eff51f9 Bug 1430619 part 3 - Remove nsIContentViewerContainer. r=smaug
MozReview-Commit-ID: BxpgH0DPKQw
2018-01-11 12:27:00 +00:00
Jonathan Watt b7e7d82901 Bug 1430619 part 2 - Move nsIContentViewerContainer::setIsPrinting to nsIDocShell. r=smaug
MozReview-Commit-ID: LJrZbDAilnW
2018-01-11 12:05:37 +00:00
Jonathan Watt e0fb07c39d Bug 1430619 part 1 - Make nsIContentViewerContainer::embed non-IDL. r=smaug
MozReview-Commit-ID: 5yw90tgFCGz
2018-01-11 11:42:15 +00:00
Mike Conley b9592e87ec Bug 1423200 - When setting up a new content viewer, if the previous PresShell was active, make the new one active too. r=mystor
It's possible to RenderLayers for a top-level content process DocShell without that DocShell being
active. When we do this, the PresShell for that DocShell becomes active, but the DocShell stays
inactive (to avoid accidentally playing paused video or clearing notifications in that DocShell).

If a DocShell is inactive but rendering its layers, it's possible for that DocShell to navigate.
When this occurs, a new PresShell can be created, which normally reads its active state off of
the DocShell. This means that the PresShell will become inactive even though the tab is supposed
to continue rendering its layers.

This patch checks for PresShell active state when setting up a new content viewer after a navigation,
and if the previous PresShell was active, makes the new PresShell active too.

MozReview-Commit-ID: KX9HvZJKqg2

--HG--
extra : rebase_source : aac1710a64b6e5f93b9874b2a15637d94a8ce5b6
2018-01-17 14:36:08 -08:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Nika Layzell a0d1f16079 Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug
MozReview-Commit-ID: 2aHA6NcQPGk
2018-01-12 17:52:52 -05:00
Ciure Andrei f7400ad72e Merge inbound to mozilla-central r=merge a=merge 2018-01-11 11:54:56 +02:00
Kate McKinley e97980a95e Bug 1424917 - Remove support for HSTS Priming. r=mayhemer, r=ckerschb
This patch removes support and tests for HSTS priming from the tree.
2018-01-10 11:07:00 -05:00
Andrew Swan 63c732760f Bug 1396399 - Clarify rules for applying activeTab permission to content scripts. r=kmag, r=bz
MozReview-Commit-ID: 9xPDX8Qk2iR
2017-11-04 21:06:20 -07:00
Milan Sreckovic 2413f473dd Bug 1423558: Use BaseRect access methods instead of member variables in docshell r=freesamael
MozReview-Commit-ID: CrdXCQkKdnh

--HG--
extra : rebase_source : dda614844fdf4c894aafc8736458616ef208bea1
2018-01-10 10:46:57 -05:00
Margareta Eliza Balazs fe2caaa266 Merge inbound to mozilla-central r=merge a=merge 2018-01-09 11:52:55 +02:00
Alphan Chen 87bb85b91b Bug 1421214 - Try GoToAnchor() with unescaped string before using document's charset. r=smaug 2018-01-05 15:12:16 +08:00
Ben Kelly 11f4db4683 Bug 1426977 P3 Use StorageAllowedForNewWindow() in nsDocShell::ServiceWorkerAllowedToControlWindow(). r=mystor 2018-01-08 20:25:53 -05:00
Sebastian Hengst dfcbe8d912 merge central to autoland. r=merge a=merge 2018-01-06 01:54:50 +02:00
Sebastian Hengst 2928d8ae82 Bug 1425975 - Follow-up: Move method to correct position. r=merge-fix a=merge-fix 2018-01-06 01:51:46 +02:00
Sebastian Hengst a149c84834 Bug 1425975 - Fix merge bustage. r=bustage-fix a=bustage-fix 2018-01-06 01:10:52 +02:00
Sebastian Hengst d52c7b3231 merge inbound to central. r=merge a=merge 2018-01-06 00:27:10 +02:00
Ben Kelly 7f0e026bcb Bug 1425975 P16 Make nsDocShell check for session cookie lifetime policy before allowing service worker intercept. r=asuth 2018-01-05 12:10:22 -05:00
Ben Kelly ddc8898fc1 Bug 1425975 P12 Don't mark an initial about:blank client as controlled if its sandboxed. r=asuth 2018-01-05 12:10:22 -05:00
Ben Kelly c67746c9b2 Bug 1425975 P7 Use the mControlledClients list to drive controller start and stop logic. r=asuth 2018-01-05 12:10:21 -05:00
Samael Wang 112d2693c3 Bug 1406161 - Part 6: Move shistory related static functions to nsSHistory. r=smaug
MozReview-Commit-ID: 7rqo2rISCB5

--HG--
extra : rebase_source : 3de7a21b24ce526f45424a2f1aad4329a8758f78
2017-12-19 18:26:36 +08:00
Samael Wang 3899149f41 Bug 1406161 - Part 5: Move LoadType convertion functions to nsDocShellLoadTypes.h. r=smaug
MozReview-Commit-ID: Ccw7cDE20m3

--HG--
extra : rebase_source : 950eee87d0c02a82aa5e0c62f8f1e0fa5e2cb72d
2017-12-19 15:13:02 +08:00