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

248 Коммитов

Автор SHA1 Сообщение Дата
Nicolas B. Pierron c64732dcc7 Bug 1362114 - JSBC: Add telemetry to later tune the heuristics. r=mrbkap,francois 2017-06-20 09:53:10 +00:00
Bill McCloskey 1158c7c282 Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly)
MozReview-Commit-ID: Kchg4kqBERt
2017-06-15 20:16:25 -07:00
Ben Kelly bd95903746 Bug 1197401 Remove the disabled HTML imports implementation. r=wchen 2017-06-12 07:36:02 -07:00
Boris Zbarsky 3119ff4e5e Bug 1364360 part 1. Make Element::GetScrollFrame follow the spec more closely in the quirks mode case. r=ehsan 2017-05-25 13:39:44 -04:00
Ting-Yu Lin 911f08dd7f Bug 1363640 Part 6 - Use bound document's style backend when creating an XBL document. r=heycam
The <content> in an XBL document could be injected into documents with
different style backend types. Therefore, we need to set the XBL document's
style backend to the same as the bound document's so that the style
attribute of the content can be processed by the correct backend. <marquee>
elements in xbl-marquee.xml is one such example.

MozReview-Commit-ID: 7M33zlbZqNF

--HG--
extra : rebase_source : 363fd7c2bc91e959fbcfb288bdc1b65cfd1bba97
2017-05-11 17:16:27 -07:00
Ting-Yu Lin bd80f687dc Bug 1363640 Part 1 - Move IsContentDocument() and IsTopLevelContentDocument() from nsDocument to nsIDocument. r=heycam
In this way, the callers who have nsIDocument don't need to cast to nsDocument.

MozReview-Commit-ID: 8zVUjkbrlaG

--HG--
extra : rebase_source : c444a103a430e3746508cc894902e677d58e65fe
2017-05-09 18:28:36 -07:00
Andrea Marchesini 1981f67eb3 Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book f0d6de60d7 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla'
--HG--
rename : dom/script/ScriptSettings.cpp => dom/base/ScriptSettings.cpp
rename : dom/script/ScriptSettings.h => dom/base/ScriptSettings.h
rename : dom/script/nsIScriptElement.h => dom/base/nsIScriptElement.h
rename : dom/script/nsIScriptLoaderObserver.idl => dom/base/nsIScriptLoaderObserver.idl
rename : dom/script/ScriptElement.cpp => dom/base/nsScriptElement.cpp
rename : dom/script/ScriptElement.h => dom/base/nsScriptElement.h
rename : dom/script/ScriptLoader.cpp => dom/base/nsScriptLoader.cpp
rename : dom/script/ScriptLoader.h => dom/base/nsScriptLoader.h
2017-05-08 09:54:38 +02:00
Andrea Marchesini 7a4ef797cb Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Boris Zbarsky f11ddd537b Bug 1361274. There's no need to update link :visited state when doing querySelectorAll, since querySelectorAll ignores that state anyway. r=smaug
In our current setup, in which links with an href attribute always match either
:link or :visited, no matter whether that attribute's value is a valid URI,
changes to the attribute always put the element into either the "match nothing"
state or the "match :link" state, via calls to Link::ResetLinkState.

The only thing FlushPendingLinkUpdates is needed for is (lazily, in case it
turns out to not be needed because the element got removed from the DOM anyway)
registering a history observer to switch the link state to :visited as needed.

This means that selector matching consumers that would never expose :visited
state to start with don't need to worry about calling FlushPendingLinkUpdates.
2017-05-03 16:54:25 -04:00
Brad Werth 0214fa7d70 Bug 1348481 Part 1b: Generalize FindDocStyleSheetInsertionPoint so it doesn't require an array of RefPtrs. r=heycam
MozReview-Commit-ID: Aqnow6hFw5i

--HG--
extra : rebase_source : 9fc2ecbd81eecf8e1d6cceb8e8fa4a4e44bbdac9
2017-05-01 16:12:04 -07:00
Aryeh Gregor af57d2df0f Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.

Notes on specific events:

CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).

DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.

ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.

SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.

TimeEvent: This is still in because it has no constructor, so there's no
other way to create it.  Ideally we'd update the SMIL spec to add a
constructor.  I did remove TimeEvents.

MozReview-Commit-ID: 7Yi2oCl9SM2

--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
2017-04-20 15:45:37 +03:00
Sumit Tiwari 9dc202c32f Fix for bug 1142497 - change mDOMMediaQueryLists to use mozilla::LinkedList;r=erahm
MozReview-Commit-ID: G9RtgdYudqA
2017-04-06 20:45:16 -04:00
Olli Pettay 27d9c5656a Bug 1355540, use SegmentedVector for pending links to avoid slow hashtable lookups in hot codepaths, r=bz 2017-04-15 18:55:05 +03:00
Xidorn Quan ea9834babb Bug 1343964 part 4 - Have document and svg:use element own URLExtraData. r=bholley,bz
MozReview-Commit-ID: 8451L5qJvEx

--HG--
extra : rebase_source : caa9b3ccd786563a59dc39fe7c23842928c173cc
2017-04-06 16:51:29 +10:00
Bevis Tseng aed6e0b19d Bug 1346145 - Label nsIDocument::SelectorCache. r=ehsan
SelectorCache::NotifyExpired() will be invoked by nsExpirationTracker::TimerCallback() from an unlabel runnable.
We adopt the change in nsExpirationTracker to provide a DocGroup EventTarget for the invocation of this callback.

--HG--
extra : rebase_source : 42626d5493efff4bc38fba418a4ac3a8b9ff6b6a
2017-03-13 14:49:28 +08:00
Xidorn Quan 082e026668 Bug 1345696 part 1 - Lots of fixup for the next patch. r=heycam
The next patch moves nsCSSFontFaceRule into a separate header, which
somehow affects lots of header dependencies. I'm not completely sure
why this happens, though.

MozReview-Commit-ID: KuXbsaX0NUd

--HG--
extra : rebase_source : cef91018964b5488c5031df8aada90aa7fa0ad51
2017-03-28 20:05:12 +11:00
Boris Zbarsky a71d5e3e25 Bug 1342823 part 2. Simplify the management of whether our document's frame request callbacks are scheduled. r=farre
MozReview-Commit-ID: 46oVKKbCLbn
2017-03-27 14:52:36 -04:00
Boris Zbarsky 41f3badc2e Bug 1342823 part 1. Move some one-bit booleans in nsIDocument next to all the other one-bit booleans. r=farre
MozReview-Commit-ID: 3FLVka93lCq
2017-03-27 14:51:55 -04:00
Alastor Wu 7c05349889 Bug 1347758 - part2 : remove add/removeMediaContent() and related codes. r=Ehsan
Since the window would know when need to resume the media, we don't need the
add/removeMediaContent() anymore.

MozReview-Commit-ID: F9MSiqqnOiV

--HG--
extra : rebase_source : fa86b3977e13d1f2a6b6233b6d608ccc331b5bf7
2017-03-24 14:43:40 +08:00
Alastor Wu aea1603b61 Bug 1347758 - part1 : window should know whehter there is any alive media component and decide to resume the tab or not. r=Ehsan
We should let window decide whether resume the media component, not document.
Because we might have media component which is not in DOM tree, but we still
want to play it.

Window should be resumed when all following conditions are true,
(1) the tab is in the foreground
(2) there is any alive media component (MediaElement/WebAudio/PlugIn...)
(3) the window is blocked (nsISuspendedTypes::SUSPENDED_BLOCK)

MozReview-Commit-ID: JXw5MA4FCxF

--HG--
extra : rebase_source : 953eed775637a19c6d5d323ab1549f6ed5f7ff31
2017-03-24 14:43:26 +08:00
Iris Hsiao 26a234de5d Backed out 6 changesets (bug 1347758) for eslint failure
Backed out changeset 9becd55242c1 (bug 1347758)
Backed out changeset 2abce19f5001 (bug 1347758)
Backed out changeset 80232d4c85d5 (bug 1347758)
Backed out changeset 1fd084ec34d4 (bug 1347758)
Backed out changeset cafb3c12027b (bug 1347758)
Backed out changeset 85846edfe957 (bug 1347758)
2017-03-24 16:58:08 +08:00
Alastor Wu 8591f98cad Bug 1347758 - part2 : remove add/removeMediaContent() and related codes. r=Ehsan
Since the window would know when need to resume the media, we don't need the
add/removeMediaContent() anymore.

MozReview-Commit-ID: F9MSiqqnOiV

--HG--
extra : rebase_source : 28a8312373054b8e29b93267677de99dd862a074
2017-03-24 12:01:46 +08:00
Alastor Wu 8b4c678479 Bug 1347758 - part1 : window should know whehter there is any alive media component and decide to resume the tab or not. r=Ehsan
We should let window decide whether resume the media component, not document.
Because we might have media component which is not in DOM tree, but we still
want to play it.

Window should be resumed when all following conditions are true,
(1) the tab is in the foreground
(2) there is any alive media component (MediaElement/WebAudio/PlugIn...)
(3) the window is blocked (nsISuspendedTypes::SUSPENDED_BLOCK)

MozReview-Commit-ID: JXw5MA4FCxF

--HG--
extra : rebase_source : 416113dd2282a979ea26c4694878c2f2db578274
2017-03-24 12:01:43 +08:00
Mantaroh Yoshinaga 90f3d3d4d0 Bug 1062106 part 2 - Remove unused SVG Attribute Animations cascade level. r=birtles,dbaron,xidorn
The previous patch in this series converted all uses of mapped attributes
for animation to be animated as CSS properties (that is, to be treated
as presentation hints in the cascade).

As result, we no longer need the SVG Animation presentation hints level
of the cascade, the corresponding rule processor(SVGAttrAnimationRuleProcessor),
or the corresponding eRestyle_SVGAttrAnimations restyle hint. So this patch
removes these unused rule processor and restyle hint.

MozReview-Commit-ID: Hm8IDaqc3ym

--HG--
extra : rebase_source : 339ad209f37ea84857577001c7385323f2187d46
2017-03-21 15:43:26 +09:00
Manish Goregaokar 681045b70e Bug 1341086 - Part 2: stylo: Support all non-ts pseudos with an argument; r=emilio,heycam
MozReview-Commit-ID: IHjX2Q3k8eD

--HG--
extra : rebase_source : 57df0f0e54fd1aa1ce4b304238c7070ef9af6dd4
2017-03-16 14:10:22 -07:00
Iris Hsiao 96c6ba3303 Backed out 4 changesets (bug 1062106) for build bustage
Backed out changeset 7ac1fffb6a87 (bug 1062106)
Backed out changeset 7682b2da0437 (bug 1062106)
Backed out changeset e77bfa57be61 (bug 1062106)
Backed out changeset a565aca3013c (bug 1062106)
2017-03-21 16:41:18 +08:00
Mantaroh Yoshinaga 11cf9c5a1d Bug 1062106 part 2 - Remove unused SVG Attribute Animations cascade level. r=birtles,dbaron
The previous patch in this series converted all uses of mapped attributes
for animation to be animated as CSS properties (that is, to be treated
as presentation hints in the cascade).

As result, we no longer need the SVG Animation presentation hints level
of the cascade, the corresponding rule processor(SVGAttrAnimationRuleProcessor),
or the corresponding eRestyle_SVGAttrAnimations restyle hint. So this patch
removes these unused rule processor and restyle hint.

MozReview-Commit-ID: Hm8IDaqc3ym

--HG--
extra : rebase_source : db5f467df198769474f0af6b6739d1b3cc957abc
2017-03-21 15:43:26 +09:00
Kris Maglione 4af9951cec Bug 1333990: Follow-up: Use Promise& rather than OwningNonNull<Promise> for binding arguments. r=bz
MozReview-Commit-ID: 23aYwjCPJ6l

--HG--
extra : rebase_source : ccaa13b20a2e7a52395ccee1bc2ef8bcb39448cf
2017-03-17 13:55:27 -07:00
Kris Maglione 8d2a5ab915 Bug 1333990: Part 2d - Add a utility to block HTML parsing until sandbox scripts are ready. r=hsivonen,billm
In order to asynchronously load content scripts that need to run very early in
the page load cycle, before any ordinary page scripts, we need to be able to
block parsing from the document-element-inserted listener. Since the script
loader operates by returning promises, blocking on promise resolution is the
simplest way to achieve this.

MozReview-Commit-ID: CTWlyrP6dqG

--HG--
extra : rebase_source : 28ce713a6450c223f9b2089e6c6e8c78284ef8af
2017-03-16 16:47:35 -07:00
Kris Maglione 9e1cbea297 Bug 1333990: Part 2b - Don't enable editor until layout has started. r=ehsan
In order to support asynchronous loading of extension content scripts, we need
to be able to exit the HTML parser flush loop immediately after inserting the
document element. Normally this doesn't cause problems, but when we enter edit
mode with an empty element selected, the editor inserts a <br> node, and a
<br> node at the start of the <html> element causes issues.

These changes solve that issue by putting off entering editor mode until we
begin laying out the document.

MozReview-Commit-ID: H2ksNz0jRxs

--HG--
extra : rebase_source : 26e0d254744363f5bd60f3b4f4df7b51c3dc446f
2017-03-14 21:22:06 -07:00
Kirk Steuber bae89898aa Bug 1345611 - Change behavior of subdocument Flash blocking to be Third-Party Flash blocking r=bsmedberg,qdot
The previous implementation regarding to the Flash Blocking Subdocument list blocked all subdocuments that matched the list. This patch changes that so that subdocuments are only blocked if they are on the Subdocument Block List and also are loaded in a Third-Party context.

The changes to cert8.db and key3.db add the https certificate for subdocument.example.com so that testing can verify that a scheme mismatch between the document and its parent results in a third-party classification.

MozReview-Commit-ID: IXnA4iPzB4y

--HG--
extra : rebase_source : 103c1e184d4219e6db9d00da1ea54674a0e216dd
2017-03-10 10:50:21 -08:00
Manish Goregaokar 7a6a00898d Bug 1329093 - Part 4: stylo: Delay SVG mapped attr resolution till later; r=bz
MozReview-Commit-ID: 2GvHPg1egjS
2017-03-09 17:46:26 -08:00
Alastor Wu 77053f1035 Bug 1338137 - part1 : ref media content when the media element bind to tree. r=baku
In bug1319771, we found that the tab would become visible unexpectly in short
period in some situations. We don't want to resume the tab in this kind of
situation, so we check whether there is any alive media component in the tab
using IsServiceStarted(). However, since we have lots different ways to create
the service, this function is not accurate at all.

Therefore, we can add media element directly to the document when it binds to
tree so that we can really know whether there is any alive media component.

MozReview-Commit-ID: FvZFg91IqgE

--HG--
extra : rebase_source : 43c2460f6e9a39d44bf2ca1638c992a0e27b196c
2017-03-04 01:14:24 +08:00
Ben Kelly 763b8b1bcd Bug 1266747 P1 Track the last focus time on the nsIDocument. r=smaug 2017-02-28 22:12:27 -05:00
Sebastian Hengst a0902d9855 Backed out changeset d19ad1c1c214 (bug 1266747) for failing dom/workers/test/serviceworkers/test_claim.html. r=backout 2017-02-28 18:56:14 +01:00
Ben Kelly bab13d406b Bug 1266747 P1 Track the last focus time on the nsIDocument. r=smaug 2017-02-28 10:48:51 -05:00
Jessica Jong cf17189117 Bug 1340086 - Remove uses of AnimationsPaused() since it is always false after bug 1316330. r=mrbkap 2017-02-22 01:00:00 -05:00
Emilio Cobos Álvarez b101b1ceff Bug 1340107: Remove obsolete bindgen-related comment. r=heycam
This bug was recently fixed and stylo updated to use a newer version.

MozReview-Commit-ID: K9qUnKXoDKU
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 1ff0c60205cc6c431bdc7a66d6ad91f000a4705d
2017-02-16 11:56:13 +01:00
John Dai e80c2fec57 Bug 1338889 - Part 2: Support DOMString as Argument 3 of Document.createElementNS. r=bz 2017-02-15 00:07:00 +08:00
John Dai b810f2855a Bug 1338889 - Part 1: Remove redundant trailing spaces. r=bz 2017-02-14 23:11:00 +08:00
Kirk Steuber c1a68c2b4c Bug 1338287 - Make nsIDocument::DocumentFlashClassification accessible from privileged JS r=bz
MozReview-Commit-ID: 1II2puZMub5

--HG--
extra : rebase_source : 2b806b4f1d4e51b72799d79126c402113d5b072e
2017-02-13 13:39:40 -08:00
Bill McCloskey 70d043f2ab Bug 1337537 - Workarounds to avoid TabGroup assertions in edge cases (r=smaug)
MozReview-Commit-ID: LVTgyivcA7V
2017-02-13 17:03:03 -08:00
Bill McCloskey bea9c4205c Bug 1337537 - Move Dispatcher.{cpp,h} to xpcom/threads (r=froydnj)
MozReview-Commit-ID: AYyKynUv4bX
2017-02-13 17:02:48 -08:00
Cameron McCormack b2ee81223c Bug 1334735 - Part 1: Move need style/flush flags from document to pres shell. r=bz
MozReview-Commit-ID: 2Amf9yGRiJA
2017-02-10 10:42:27 +08:00
Kirk Steuber 2844b8cf52 Bug 1336714 - Added a null check to the GetParentDocument call in nsDocument::ComputeFlashClassification. Change nsDocument::GetAllowPlugins to return result rather than using unnecessary outparam. nsPluginArray::AllowPlugins changed to call the GetAllowPlugins method on the inner window's document rather than on the docshell's mContentViewer's document. r=bsmedberg,bz
MozReview-Commit-ID: Crx9v8OBKKq

--HG--
extra : rebase_source : d1c117eb7129b19c72df109f43f129aebd691b30
2017-02-06 12:47:00 -08:00
Kirk Steuber 4d0c6c3e0b Bug 1307604 - Add allow and deny lists for Flash Blocking r=bsmedberg,bz,francois
MozReview-Commit-ID: H2dgJX6Hsz7

--HG--
extra : rebase_source : 7b56241fcaf5f99b64f6ad40a9dc2676692f70d2
2016-11-22 15:01:04 -08:00
Xidorn Quan a0cd4629d7 Bug 1334938 - Re-enable stylo in stylo builds. r=emilio
MozReview-Commit-ID: y7u7QNHYii

--HG--
extra : rebase_source : 31bc928249d80cdd56fd59bcaa04af54653f39b4
2017-01-30 12:09:25 +11:00
Bill McCloskey ec760e9fba Bug 1332494 - Move TaskCategory definition to xpcom/threads/TaskCategory.h (r=froydnj)
MozReview-Commit-ID: ET43PbGRgxl
2017-01-26 14:45:58 -08:00
Mats Palmgren bf382ceca8 Bug 1323777 part 3 - Ensure that collecting telemetry on user font usage don't have unwanted side effects. r=smaug 2017-01-25 23:34:22 +02:00