Commit Graph

51026 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
2b220f490f Bug 1285407 - Part 3: Remove UpdateCascadeResults call because it's called against the same nsStyleContext from MaybeUpdateAnimationRule. r=birtles
MozReview-Commit-ID: FrrFLq9S2f4

--HG--
extra : rebase_source : 20d9329b0b801fa78cf8889f404a6cc0ac011a69
2016-07-11 17:28:17 +09:00
Hiroyuki Ikezoe
495f6aae06 Bug 1285407 - Part 1: Pass a newly created nsStyleContext to GetAnimationRule and MaybeUpdateAnimationRule. r=birtles
While resolving style context, the primary frame of the target element
has previous style context so if we don't pass the newly created nsStyleContext,
UpdateCascadeResults uses the previous style to get overridden properties, it
will result unexpected cascading results.

MozReview-Commit-ID: osqXQlP43X

--HG--
extra : rebase_source : 1b34f9245367c2613807156559f09f5f2943458c
2016-07-11 17:28:14 +09:00
Hiroyuki Ikezoe
d20c596b42 Bug 1279403 - Part 2: Set NS_FRAME_MAY_BE_TRANSFORMED bit if the target nsIFrame has transform when setting target or keyframes. r=birtles
MozReview-Commit-ID: InQyXpENsSY

--HG--
extra : rebase_source : f8eb4c9ea0495d60c92a214ab692df79cf428e85
2016-07-11 08:29:14 +09:00
Hiroyuki Ikezoe
685a35fbc5 Bug 1279403 - Part 1: Force to apply corresponding change hint if there is no corresponding layer to generate display item even if animation's segment is transform:none or 100% opacity. r=birtles
To create a stacking context for animations on transform:none segment,
we need to set NS_FRAME_MAY_BE_TRANSFORMED.  The fix is comming in part 2.

Note that in case of animations which has properties preventing running on
the compositor, e.g., width or height, corresponding layer is not created
at all, but even in such cases, we normally set valid change hint for such
animations in each tick, i.e. restyles in each tick. For example:

div.animate([{ opacity: 1, width: '100px' }, { opacity: 0, width: '200px' }], 1000);

This animation causes restyles in every ticks without this patch, this patch
does not affect such animations at all. The only animations which will be
affected by this patch are animations which has opacity/transform but
did not have those properies. e.g,  setting transform by setKeyframes or
changing target element from other target which prevents running on the
compositor, etc.

MozReview-Commit-ID: 78fYqyX8uDX

--HG--
extra : rebase_source : c4a6ef244f26f3d808fd2c6a5f80c1a15478ae31
2016-07-11 08:27:02 +09:00
Wes Kocher
65ebeb046e Backed out changeset e097b3f7f21b (bug 1283415) for reftest failures in poster-4.html a=backout 2016-07-09 23:37:08 -07:00
Jared Wein
1f1db1d20c Bug 1283415 - Only set the poster src on the anonymous content if the attribute is not empty. r=cpearce
MozReview-Commit-ID: 9217JCdS1yP

--HG--
extra : rebase_source : a78599a3e3f1c81bed329672d8c16485b4fe5f3d
2016-07-07 13:20:54 -04:00
Chris Peterson
43c2748f66 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Wes Kocher
2a800a6763 Merge fx-team to central, a=merge CLOSED TREE 2016-07-08 15:02:31 -07:00
Wes Kocher
473e642b9c Merge inbound to central, a=merge CLOSED TREE 2016-07-08 14:55:59 -07:00
Carsten "Tomcat" Book
37cacb6747 Merge mozilla-central to fx-team 2016-07-08 12:17:32 +02:00
Carsten "Tomcat" Book
838f21f656 merge mozilla-inbound to mozilla-central a=merge 2016-07-08 11:58:46 +02:00
Carsten "Tomcat" Book
75e7b5bab2 merge fx-team to mozilla-central a=merge 2016-07-08 11:57:15 +02:00
Timothy Nikkel
7220b22c54 Bug 1285409. Store out of flow data for frames we are going to descent into anyways (despite no intersection with the dirty rect) so we have the correct clip for them. r=mattwoodrow
If the frame already has the NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO bit we are going to descend into it anyways, so we may as well store the oof data so we can have the correct clip.

Sometimes we add the bit after this test though, so it doesn't allow us to have the proper clip in all cases.
2016-07-08 00:25:18 -05:00
Wes Kocher
86a74db006 Merge m-c to autoland, a=merge 2016-07-07 17:36:17 -07:00
Jonathan Chan
1a5bdaf720 Bug 1285365 - Part 2: Add missing includes and namespace qualifiers. r=dholbert
MozReview-Commit-ID: 5vDmc1yGe1P

--HG--
extra : rebase_source : 32900ffc0d09943f85bbe5c289f2ce6cede20c47
2016-07-07 14:05:28 -07:00
Jonathan Chan
50f570bb20 Bug 1285365 - Part 1: Remove trailing whitespace from nsCSSParser. r=dholbert
MozReview-Commit-ID: HNHfHK3d2BR

--HG--
extra : rebase_source : e105c292aa8a55c8a9fc068d548866241582e162
2016-07-07 14:05:23 -07:00
Xidorn Quan
a3fdca80b5 Bug 1283721 - Use block-size rather than height for computing float available space. r=jfkthame
MozReview-Commit-ID: HyGmoYJDOkd

--HG--
extra : transplant_source : %21G%83%7B%8E%B5%26%3EW%F41%23dBD%8F%3A%9D%1DM
2016-07-07 16:48:21 +10:00
Carsten "Tomcat" Book
79a926a3d8 Backed out changeset 24ec7aba60e7 (bug 1283302) for testfailures in 518172-1b.html 2016-07-07 08:20:32 +02:00
Brad Werth
e0d3269112 Bug 1241932 - Expose decoded CSS grid track properties in a Chrome API. r=heycam, r=khuey
--HG--
extra : rebase_source : 0c2a49236a2c71233a1ce6a92e50663b8a9f6238
2016-07-06 11:45:18 -07:00
Brad Werth
e3bcca28e9 Bug 1285062 - Change an improper warning in reftests into an info message. r=dbaron 2016-07-06 18:14:24 -07:00
Jet Villegas
b98f6dff7f Bug 1285317: Reftest 518172-1b.html and 518172-2b.html should be fuzzy== on e10s and non-e10s. r=mstange 2016-07-07 14:14:28 -07:00
Benjamin Smedberg
bf05496a83 Bug 1282866 - remove widget/qt and other supporting QT code, r=dougt. This patch does not remove all of the checks for MOZ_WIDGET_QT (which are dead code), but that will be a followup mentored bug.
MozReview-Commit-ID: EGqHHhCD7vD

--HG--
extra : rebase_source : a4b9593959dd3ba80189db47eabb056ea207490f
extra : amend_source : a744d833693f0fe7adbea961c00bb5fb55a91580
2016-07-07 12:14:25 -04:00
Jan Henning
47101d08ae Bug 1282902 - Part 3 - Let the MobileViewportManager recalculate the saved resolution if the display width changed before restoring. r=kats
The mobile session store saves the current document resolution in order to restore the previous zoom level when restoring a page. If the display width has changed since the session data was captured (e.g. because the device was rotated), the resolution might have to be scaled appropriately.
Currently, the session store does this scaling by itself by comparing the stored and current window widths, however this implementation is slightly simplified and doesn't cover all use cases, which means some pages can be restored at a wrong zoom level after rotation. To correctly cover all cases, the session store would have to compare viewport widths, too.

Because the MobileViewportManager doesn't wait for the session store to set the restore resolution, the latter has to call setRestoreResolution() as early as possible in order to guarantee that the restore resolution is set before the first paint of the document. Therefore the session store currently calls this after receiving a LocationChange notification. However at that time, the correct viewport for the current document is not yet available, which means the resolution cannot be recalculated by the session store at that point.

Therefore, this patch changes the approach taken and lets the MVM handle all resolution calculations instead. The session store now simply passes the stored previous display dimensions along with the previous document resolution to the MVM, which can then compare them to the current display and viewport widths and scale the resolution appropriately before using it during first paint.


MozReview-Commit-ID: IGxWw87yftK

--HG--
extra : transplant_source : e%8D%BD%26%D2%C3%8E5%E3%2B%C0t%BA%DB%C1%BBs%3F%13%1F
2016-07-01 21:23:25 +02:00
Jan Henning
070a561665 Bug 1282902 - Part 2 - Extract resolution scaling into separate function. r=kats
We'll want to use this during first-paint, too, in order to correctly scale the resolution as received by the session store if we're restoring a previous tab. Therefore we extract this code into a separate helper function.

MozReview-Commit-ID: KCdvmyrP4mJ

--HG--
extra : transplant_source : c%BD%99%9D%F8%9EW%D2%8B%BD%E0a%82%ED%3B%EE%EF%ACl%D6
2016-07-02 22:15:19 +02:00
Carsten "Tomcat" Book
c5e638ab8c Merge mozilla-central to mozilla-inbound 2016-07-08 12:16:57 +02:00
Brian Birtles
3dedc86d90 Bug 1277908 - Keep visited rule node alive while creating non-visited style context; r=dholbert
MozReview-Commit-ID: Eqti28E14Jp

--HG--
extra : rebase_source : b1ab439dd85e87c11dcc5a85b70fcc21a48e328e
2016-07-08 13:17:42 +09:00
Jet Villegas
838c4e24dc Bug 1283302: Sets the default value for nglayout.initialpaint.delay to 5ms (was 250 ms) per user research conclusions. r=mattwoodrow 2016-07-06 19:08:29 -07:00
Gregory Szorc
f21ec324a6 Merge mozilla-central to mozilla-inbound 2016-07-06 18:30:58 -07:00
Gregory Szorc
021d3fdfc7 Merge mozilla-central to mozilla-inbound 2016-07-06 18:26:17 -07:00
Carsten "Tomcat" Book
1a67b0a534 Backed out changeset 0f4e9c57ee8e (bug 906116) for bustage on a CLOSED TREE 2016-07-06 05:40:49 +02:00
Carsten "Tomcat" Book
de3628dc26 Backed out changeset d84c0edb6912 (bug 906116) 2016-07-06 05:40:08 +02:00
Carsten "Tomcat" Book
95bf0b9965 Backed out changeset 17d17aeec1fa (bug 906116) 2016-07-06 05:40:07 +02:00
Carsten "Tomcat" Book
cb8e0bf0b1 Backed out changeset 34c54dbb1b7d (bug 906116) 2016-07-06 05:40:07 +02:00
Carsten "Tomcat" Book
45017d7986 Backed out changeset 8c1f9996a7d6 (bug 906116) 2016-07-06 05:40:06 +02:00
Carsten "Tomcat" Book
c9dc6a368d Backed out changeset 1ec6e0357c42 (bug 906116) 2016-07-06 05:40:05 +02:00
Jeremy Chen
b915e25c11 Bug 906116 - part4: Remove NS_STYLE_HINT_FRAMECHANGE. r=dbaron
MozReview-Commit-ID: IXPWY2B6k48

--HG--
extra : rebase_source : 63c31419f19c6fdfaebab4947cb881fe9ed7a820
2016-07-06 09:59:56 +08:00
Jeremy Chen
160b96f9a4 Bug 906116 - part3.3: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron
Use ReconstructFrame to replace NS_STYLE_HINT_FRAMECHANGE in many places, such
as HTML*Element::GetAttributeChangeHint and HTMLFrameSetElement::SetAttr.

MozReview-Commit-ID: EHbc4RMeuu0

--HG--
extra : rebase_source : f5163608c88362595ef5af5fcd36fa64c9c79ce7
2016-07-06 09:59:56 +08:00
Jeremy Chen
4d805b1b21 Bug 906116 - part3.2: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron
Use ReconstructFrame | (any ther bits needed) to replace
NS_STYLE_HINT_FRAMECHANGE in nsStyle*::MaxDifference.

For those nsStyle* that do not have nsChangeHint_NeutralChange in their
CalcDifference, we should be able to elimate nsChangeHint_NeutralChange from
their MaxDifference as well.

MozReview-Commit-ID: B3VJWt6gKoL

--HG--
extra : rebase_source : 7b568b680be4ea108b08cc565f1651ded70d357d
2016-07-06 09:59:56 +08:00
Jeremy Chen
df7ed352fc Bug 906116 - part3.1: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron
Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame in
nsStyle*::CalcDifference.

MozReview-Commit-ID: 85WPCyYolal

--HG--
extra : rebase_source : 3a5e247fe38e0b75d9ea1826ce5758b5a5862675
2016-07-06 09:59:55 +08:00
Jeremy Chen
010cb33d92 Bug 906116 - part2: Fix comment for nsChangeHint_ReconstructFrame. r=dbaron
The comment for nsChangeHint_ReconstructFrame is out-of-date.

In RestyleManager::ProcessRestyledFrames, we actually ignore all of the other
hints if ReconstructFrame is set. The old version was written when
ReconstructFrame was listed last. So, update the comment.

MozReview-Commit-ID: 97wMrW6S6ID

--HG--
extra : rebase_source : f1556012073e088af96c2e389532f1ae04b165af
2016-07-06 09:59:55 +08:00
Jeremy Chen
b789d84b05 Bug 906116 - part1: Ensure bracing all controlled statements in nsStyleStruct.h and nsStyleStruct.cpp. r=dbaron
According to our coding style guide, we should always brace controlled
statements, even a single-line consequent of an if-else-statement. It avoids
dangling else bugs.

MozReview-Commit-ID: FT1AR5MqOGw

--HG--
extra : rebase_source : 111b4f70c83a59ee7dab8bf8adf60bc10916cc79
2016-07-06 09:59:55 +08:00
Xidorn Quan
f01d901ec8 Bug 1283106 - Put empty skip chars in gfxPlatform singleton rather than static local variable. r=jfkthame
MozReview-Commit-ID: 5SU6ewm5wbd

--HG--
extra : rebase_source : f522172d3ca191ba33c222c497e91bb718fda23e
2016-07-05 11:02:24 +10:00
Timothy Nikkel
2b21f8f65d Bug 1277123. Only clear the containing block clip when entering an out of flow with an unknown clip. r=mattwoodrow
The content clip is still valid, as we are only descending into content descendants.

The clip for content descendants that the root scroll frame creates so content doesn't overflow (visually or for event handling) the main scrollbar can get cleared otherwise.
2016-07-06 16:55:17 -05:00
Markus Stange
f8e66e0cdf Bug 1012752 - Snap scrolled area to layer pixels. r=tnikkel
We want the maximum scroll position to be aligned with layer pixels. That way
we don't have to re-rasterize the scrolled contents once scrolling hits the
edge of the scrollable area.

Here's how we determine the maximum scroll position: We get the scroll port
rect, snapped to layer pixels. Then we get the scrolled rect and also snap
that to layer pixels. The maximum scroll position is set to the difference
between right/bottom edges of these rectangles.
Now the scrollable area is computed by adding this maximum scroll position
to the unsnapped scroll port size.
The underlying idea here is: Pretend we have overflow:visible so that the
scrolled contents start at (0, 0) relative to the scroll port and spill over
the scroll port edges. When these contents are rendered, their rendering is
snapped to layer pixels. We want those exact pixels to be accessible by
scrolling.

This way of computing the snapped scrollable area ensures that, if you scroll
to the maximum scroll position, the right/bottom edges of the rendered
scrolled contents line up exactly with the right/bottom edges of the scroll
port. The scrolled contents are neither cut off nor are they moved too far.
(This is something that no other browser engine gets completely right, see the
testcase in bug 1012752.)

There are also a few disadvantages to this solution. We snap to layer pixels,
and the size of a layer pixel can depend on the zoom level, the document
resolution, the current screen's scale factor, and CSS transforms. The snap
origin is the position of the reference frame. So a change to any of these
things can influence the scrollable area and the maximum scroll position.
This patch does not make us adjust the current scroll position in the event
that the maximum scroll position changes such that the current scroll position
would be out of range, unless there's a reflow of the scrolled contents. This
means that we can sometimes render a slightly inconsistent state where the
current scroll position exceeds the maximum scroll position. We can fix this
once it turns out to be a problem; I doubt that it will be a problem because
none of the other browsers seems to prevent this problem either.

The size of the scrollable area is exposed through the DOM properties
scrollWidth and scrollHeight. At the moment, these are integer properties, so
their value is rounded to the nearest CSS pixel. Before this patch, the
returned value would always be within 0.5 CSS pixels of the value that layout
computed for the content's scrollable overflow based on the CSS styles of the
contents.
Now that scrollWidth and scrollHeight also depend on pixel snapping, their
values can deviate by up to one layer pixel from what the page might expect
based on the styles of the contents. This change requires a few changes to
existing tests.
The fact that scrollWidth and scrollHeight can change based on the position of
the scrollable element and the zoom level / resolution may surprise some web
pages. However, this also seems to happen in Edge. Edge seems to always round
scrollWidth and scrollHeight upwards, possibly to their equivalent of layout
device pixels.

MozReview-Commit-ID: 3LFV7Lio4tG

--HG--
extra : histedit_source : 5390eeebfe9a2791d9ac8e91ec1dfec4ec7b4118
2016-06-02 15:41:51 -04:00
Bobby Holley
91a48b929e Bug 1283620 - Implement attribute API for servo. r=mrbkap 2016-07-07 09:59:09 -07:00
Bobby Holley
23e90f9834 Bug 1283620 - Hoist ValueIncludes into nsStyleUtil. r=mrbkap 2016-07-07 09:59:07 -07:00
Olli Pettay
4aaedb4570 Bug 1277722, release touch objects even if dispatching touchend fails, r=masayuki
--HG--
extra : rebase_source : 33bf5c39621a6a3e82beccfb4f9d2a41aa2880aa
2016-07-07 15:43:23 +03:00
Jeremy Chen
9667904735 Bug 906116 - part3.2.1: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=me
Remove unnecessary nsChangeHints used in
nsStyle*:DifferenceAlwaysHandledForDescendants. Accordingly,
nsStyle*:MaxDifference can be simplified as well.

This is a followup patch for part3.2 in Bug 906116.

MozReview-Commit-ID: GgU9xgghCO7
2016-07-07 16:58:51 +08:00
Rex Lee
d807a8a63e Bug 1261133 - Use pseudoClass for style editor transition. r=dbaron, r=pbro
MozReview-Commit-ID: Ck5JTXRR0mp

--HG--
extra : transplant_source : %95%0CQ%14%20%F0f%B84%E2%82%82%AB%F51%87%29%9EqL
2016-05-23 19:55:54 +08:00
Khaled Hosny
76d9e4ca41 Bug 1283932 - reftests, r=jfkthame 2016-07-06 10:10:26 +01:00