Commit Graph

210 Commits

Author SHA1 Message Date
Bobby Holley
4c9431ce8a Bug 1363375 - Add static assert for element sizes on 64-bit. r=smaug 2017-05-11 13:51:28 +02:00
Wes Kocher
8f6058b583 Backed out 3 changesets (bug 1344398) for assertion failures at Element.cpp a=backout
Backed out changeset d0e5a5ba01b5 (bug 1344398)
Backed out changeset d70f9de401d1 (bug 1344398)
Backed out changeset 647d0bb3714d (bug 1344398)

MozReview-Commit-ID: DTVWf28NcNb
2017-05-10 17:43:50 -07:00
Daniel Holbert
b216b7b0e8 Bug 1344398 part 2: React to some CSS 'overflow' changes on body/html by simply calling UpdateViewportScrollbarStylesOverride() instead of reframing. r=bz,tnikkel
MozReview-Commit-ID: Lpr9aNv9hAB

--HG--
extra : rebase_source : c8cccf8e6495ab1d57f9680c07b3e43a488e8691
2017-05-10 13:53:27 -07: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
Swapnesh Kumar Sahoo
c11cf34901 Bug 1354331 - Remove network.http.enablePerElementReferrer usages. r=valentin r=baku 2017-05-01 00:12:34 +05:30
Nicholas Hurley
4608c1dbd5 Bug 1348278 - Speculatively connect when mousedown happens on a link r=bz
Try to speed up perceived pageload by opening a connection as soon as the
user mouses down on a link, instead of waiting for the full click/AsyncOpen
process to get there.

MozReview-Commit-ID: 4g6mZXWt9H5

--HG--
extra : rebase_source : cf7b5628058c1a1bcadc8531f2da44d259c6fdaa
2017-04-27 14:35:09 -07:00
Emilio Cobos Álvarez
23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez
e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Olli Pettay
d401b45a1f Bug 1352898, add a cache for nsMappedAttributes to reduce malloc/free and bind nsMappedAttributes always to nsHTMLStyleSheet if owner document has such, r=bz
--HG--
extra : rebase_source : f5d0d17a7c4eb5244ebb993b6ed34ea048921366
2017-04-07 19:21:48 +03:00
Brian Birtles
33041d1214 Bug 1315874 - Drop 'ForElement' from GetStyleContextForElementXXX methods; r=heycam
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.

MozReview-Commit-ID: JQKaEuCKV2F

--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
2017-04-05 14:39:23 +09:00
bechen
268a2f5b7a Bug 1318542 - Label NODE_IS_NATIVE_ANONYMOUS on the elements from ::cue up to nsVideoFrame. r=bz,heycam
Since the ::cue div created by JS, it doesn't have the NODE_IS_NATIVE_ANONYMOUS flag.
We set the NODE_IS_NATIVE_ANONYMOUS when binding to domtree from the ::cue up to the RootOfAnonymousSubtree
so that GetClosestNonNativeAnonymousAncestor will return video element as style parent.

MozReview-Commit-ID: 3EiYOqnbY15

--HG--
extra : rebase_source : eedcd5948852c3405a719b9f3c3396ee009f7273
2017-04-05 10:48:52 +08:00
Olli Pettay
98fff73826 Bug 1351303, add main thread only cache for nsIAtoms to speed up atomization, r=froydnj
--HG--
extra : rebase_source : 9c67cd71c0721329eaeaaa96a295e90abc480042
2017-04-03 23:13:18 +03:00
Xidorn Quan
e3e4554871 Bug 1351957 - Create URLExtraData for holding base uri, referrer, and principal. r=heycam
MozReview-Commit-ID: 1wqTb3kvvWh

--HG--
extra : rebase_source : cae3dba21c916ab0f52056bd9db215249b650cd3
2017-03-30 18:54:48 +11:00
Olli Pettay
12316106ee Bug 1352389, don't push extra script blocker on stack when setting attributes, r=bz
--HG--
extra : rebase_source : 2571f3d502114b84f8b95bbb50c5a0707eb14298
2017-03-31 22:54:41 -04:00
Olli Pettay
5706cc683b backout Bug 1352389, r=backout 2017-03-31 16:59:06 -04:00
Olli Pettay
b86d26e216 Bug 1352389, don't push extra script blocker on stack when setting attributes, r=bz
--HG--
extra : rebase_source : 55820b78425fe7a64e77eaeb31f5093309f2d06c
2017-03-31 13:13:52 -04:00
Manish Goregaokar
b8c378e1a5 Bug 1330051; Reparse style attribute when adopting across style backends; r=bz
MozReview-Commit-ID: LWN57KApiMu

--HG--
extra : rebase_source : 20cfb66a8d6d5f88aa3db9cc6876f986d71290b4
2017-03-24 15:28:19 -07:00
Olli Pettay
92bb395acd Bug 1339758, click() and similar can return 0 from various coordinate properties, r=masayuki
--HG--
extra : rebase_source : 71547cc6655c39ffeba89676d315bdb9bacc5ff4
2017-03-23 12:57:44 +02:00
Edgar Chen
00f084fb1b Bug 1347634 - GetCustomElementData and SetCustomElementData don't need to be virtual; r=smaug 2017-03-16 12:21:12 +08:00
Boris Zbarsky
55cdc32c73 Bug 656197 part 4. Move calls to AfterSetAttr to before UpdateState when manipulating attributes. r=smaug
In particular, this lets us remove UpdateState() calls from AfterSetAttr.  That
change is next.

MozReview-Commit-ID: CFeft0E9o8m
2017-03-16 14:50:42 -04:00
Boris Zbarsky
33a3057732 Bug 656197 part 2. Move calls to BeforeSetAttr to after AttributeWillChange. r=smaug
This means that implementations of BeforeSetAttr no longer need to UpdateState.
Those UpdateState calls will be removed in a bit.

MozReview-Commit-ID: 1yEg5D4garD
2017-03-16 14:50:41 -04:00
Boris Zbarsky
f890715ffc Bug 656197 part 1. Remove the generic attr preparsing mechanism from BeforeSetAttr and just preparse class attributes directly in the one place that needs to do it. r=smaug
This removes the requirement that BeforeSetAttr comes before AttributeWillChange
(which needs the preparsed new value).

MozReview-Commit-ID: 87C6Mjc7ARh
2017-03-16 14:50:41 -04:00
Cameron McCormack
6e93d609a7 Bug 1341230 - Part 1: Rename ESM_MANAGED_STATES to EXTERNALLY_MANAGED_STATES. r=smaug
Since it's not just the EventStateManager that has access to modify
these EventStates bits.

MozReview-Commit-ID: 17EpfQT5M40

--HG--
extra : rebase_source : 6d5f7ecff2d41d66cbc23ea12e08dc6295e29875
2017-03-06 10:44:13 +08:00
Iris Hsiao
ddd2318db2 Backed out changeset 41bd2eefc823 (bug 1341230) 2017-03-06 11:48:58 +08:00
Cameron McCormack
fd0d68c179 Bug 1341230 - Part 1: Rename ESM_MANAGED_STATES to EXTERNALLY_MANAGED_STATES. r=smaug
Since it's not just the EventStateManager that has access to modify
these EventStates bits.

MozReview-Commit-ID: 17EpfQT5M40

--HG--
extra : rebase_source : 6d5f7ecff2d41d66cbc23ea12e08dc6295e29875
2017-03-06 10:44:13 +08:00
Mats Palmgren
d13aaf9ce0 Bug 1340771 part 1 - Rename nsWeakFrame to AutoWeakFrame (automated change). r=tn
MozReview-Commit-ID: 8pl4nyeGEkr
2017-03-01 18:03:14 +01:00
Tobias Schneider
5167bc2af8 Bug 1337936 - (intersection-observer) Revise lifetime management. r=smaug
MozReview-Commit-ID: 4pzm00igBLR

--HG--
extra : rebase_source : ad9c5581f991c392f431793fde289b8ca8245bd0
2017-02-22 10:45:13 -08:00
Sebastian Hengst
ae051c91a0 Backed out changeset 5f93d62d9229 (bug 1337936) for asserting in crashtest 869038.html. r=backout 2017-02-22 14:06:26 +01:00
Tobias Schneider
0da735fe74 Bug 1337936 - (intersection-observer) Revise lifetime management. r=smaug
MozReview-Commit-ID: AvdDJaRELXm

--HG--
extra : rebase_source : a3e8705822545fd4c1cee688939c617a419d3936
2017-02-21 03:13:39 -08:00
Tom Tromey
f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
Bobby Holley
b5ec1b1aa2 Bug 1331322 - Move MAY_HAVE_CLASS to mBoolFlags. r=bholley
This fits a bit better with the other stuff, and allows us to add our new NAC
bit with the other NAC related bits, which also happens to be a field that
Servo already has easy access to.

--HG--
extra : rebase_source : 52ef902eb3b23dc44cefec899b02c9180b76160c
2017-01-20 18:24:41 -08:00
Phil Ringnalda
d2fa909610 Backed out 4 changesets (bug 1331322) for Android reftest failures in 1169331-1.html and forced-bg-color-outside-visible-region.html
Backed out changeset 96c6b5a11284 (bug 1331322)
Backed out changeset 15877d32de7d (bug 1331322)
Backed out changeset 841d608704d7 (bug 1331322)
Backed out changeset 02096c5eb029 (bug 1331322)
2017-02-15 21:24:00 -08:00
Bobby Holley
a15ed0dd31 Bug 1331322 - Move MAY_HAVE_CLASS to mBoolFlags. r=bholley
This fits a bit better with the other stuff, and allows us to add our new NAC
bit with the other NAC related bits, which also happens to be a field that
Servo already has easy access to.

--HG--
extra : rebase_source : 52ef902eb3b23dc44cefec899b02c9180b76160c
2017-01-20 18:24:41 -08:00
Boris Zbarsky
d7e6d48b2f Bug 1338725 part 2. Move GetClasses/DoGetClasses from nsIContent to Element. r=baku 2017-02-13 16:06:45 -05:00
Boris Zbarsky
08d76ec702 Bug 1332812. Remove some more unused or nearly-unused nsIDOMElement bits. r=froydnj 2017-02-02 10:32:58 -05:00
Sebastian Hengst
4c5957bbd3 Backed out changeset c724fbd9c326 (bug 1332812) for build bustage. r=backout on a CLOSED TREE 2017-02-02 16:58:52 +01:00
Boris Zbarsky
b249de7c3a Bug 1332812. Remove some more unused or nearly-unused nsIDOMElement bits. r=froydnj 2017-02-02 10:32:58 -05:00
Wes Kocher
8d4bb91470 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Am6M5iHxmAr
2017-02-01 16:31:23 -08:00
Manish Goregaokar
5b55368eda Bug 1330041 - Basic handling framework for presentation attributes in Stylo, with handling for font-size and color; r=bz,emilio
This introduces a basic framework for servo's style system to be able
to query the style of presentation attributes which it can then insert
into the cascade. It uses that framework to implement the size and
color attributes on <font>.

There are a number of improvements that can be done on top of this:

 - Implement all other properties
 - Abstractify the ruledata parameter of the mappers using templates or virtual dispatch so that it can be a Servo decl block instead
 - Implement aforementiond abstraction over Servo decl blocks (this obsoletes the code in the first item above, so it might just be better to skip that and directly do this)
 - Replace uses of nsHTMLStyleSheet with an abstract base class containing common elements between Servo and Gecko

I'd prefer for these to be done in separate steps.

MozReview-Commit-ID: GO60qfeZOfl

--HG--
extra : rebase_source : 516d369a8627e413983361aaf85ccb7132b0a06c
2017-01-19 15:56:53 -08:00
Boris Zbarsky
4dafb92c93 Bug 1335368 part 4. Stop using IsCallerChrome in nsContentUtils::IsRequestFullScreenAllowed. r=bholley 2017-02-01 15:43:36 -05:00
Jared Wein
072c1a6ba3 Bug 1323618 - Allow locking off of psuedo-classes through inIDOMUtils. r=heycam
MozReview-Commit-ID: DppYTmILpwy

--HG--
extra : rebase_source : c0befc8f86b92cfc88b537e520c3aa032846ba6a
2017-01-12 12:10:07 -05:00
Sebastian Hengst
7e8e7b64ec Backed out changeset 6c4807171f00 (bug 1323618) on jaws' request. r=backout 2017-01-12 18:45:39 +01:00
Jared Wein
213d81f2f4 Bug 1323618 - Allow locking off of psuedo-classes through inIDOMUtils. r=heycam
This patch doesn't currently work. The test fails in two test cases. Right now the styles for a 'locked-off' psuedo class are still being applied.

MozReview-Commit-ID: DppYTmILpwy
* * *
[mq]: temp

MozReview-Commit-ID: 74iIOQumfrw

--HG--
extra : rebase_source : 276e694b61aaeb0cb55a963c793d58876a92546f
2017-01-12 12:10:07 -05:00
Boris Zbarsky
34c39939f2 Bug 1330060 part 1. Move GetInlineStyleDeclaration up to Element so it doesn't have to be virtual. r=bkelly 2017-01-11 19:03:16 -05:00
Cameron McCormack
babad063ff Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Cameron McCormack
cd875e79a6 Bug 1326023 - Make Element::GetBindingURL return a strong reference. r=smaug
MozReview-Commit-ID: 5QI6UuvwDrE
2016-12-28 17:50:44 +08:00
Ho-Pang
41adef3ae2 Bug 1299209 - Part 1: Passing PointerId when a new WidgetMouseEvent is created. h=sshih, r=smaug
--HG--
extra : rebase_source : b123e74425e56c09ab38f5916589abb84c3d5996
2016-12-20 22:53:00 -05:00
Masayuki Nakano
7436f01057 Bug 564411 Move all methods/attributes of nsIEditorIMESupport to nsIEditor r=smaug
Doing QI from nsIEditor to nsIEditorIMESupport doesn't make sense because editor should always support all methods and attributes of nsIEditorIMESupport (it does NOT mean that all nsIEditor implementation need to support IME).

This patch moves all of them to nsIEditor for avoiding redundant QIs.

MozReview-Commit-ID: DzIKuGHG4iy

--HG--
extra : rebase_source : cc5e9a6ae4572ebe461d9770ffa5c23d33dc8526
2016-12-20 21:47:31 +09:00
Tobias Schneider
eef5af1c91 Bug 1322717 - Disconnect/Unlink in the proper order to avoid crashes in mozilla::dom::DOMIntersectionObserver::UnlinkTarget. r=mrbkap 2016-12-08 18:54:07 -08:00
Bobby Holley
f8c9d884fc Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal. r=emilio
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-25 10:06:39 -08:00