Commit Graph

763 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
7e1330401f Bug 1355351: Simplify nsLayoutUtils callers, and make child iterators notice display: contents pseudos. r=heycam
This also happens to fix other bugs, like making display: contents pseudos
animatable, which weren't before.

MozReview-Commit-ID: LhwTPNbFvSZ
2017-04-19 12:53:57 +02:00
Jonathan Watt
cdd6a1c7e7 Bug 1358690, part 2 - Support context paint in SVG when drawn as a CSS background image. r=dholbert 2017-03-28 12:07:39 +01:00
Jeff Gilbert
ef8acdb9c3 Bug 1355763 - Add gfxAlphaType for specifying opaque/premult/non-premult. - r=daoshengmu
MozReview-Commit-ID: Jzr8aPYlEcO
2017-04-13 09:14:34 -07:00
Timothy Nikkel
203896ccec Bug 1355898. Rename flag SFE_WANT_FIRST_FRAME to SFE_WANT_FIRST_FRAME_IF_IMAGE to represent what it does better. r=jgilbert
We only pay attention to the flag for images.
2017-04-13 03:40:45 -05:00
Iris Hsiao
191fdd1b09 Backed out changeset f97fd860c168 (bug 1355763) 2017-04-13 14:46:43 +08:00
Jeff Gilbert
37d512e4b7 Bug 1355763 - Add gfxAlphaType for specifying opaque/premult/non-premult. - r=daoshengmu
MozReview-Commit-ID: Jzr8aPYlEcO
2017-04-12 22:03:43 -07:00
Carsten "Tomcat" Book
0175d8a0b6 Merge mozilla-central to mozilla-inbound 2017-04-07 15:33:03 +02:00
Mats Palmgren
baa2d27a7b Bug 1338108 - The result of adding any percentage factor to a size that is zero should also be zero. r=dholbert
MozReview-Commit-ID: ErkjtVZyFqV
2017-04-07 01:02:59 +02:00
Ting-Yu Lin
2c0ccc8249 Bug 1312328 - Remove CSS variables preference "layout.css.variables.enabled". r=xidorn
MozReview-Commit-ID: HwYpwbhQkZj
2017-04-07 00:29:39 +08:00
Sebastian Hengst
dfa9a2b84c Backed out changeset 4df8d4e384ef (bug 1338108) for unexpectedly passing 367185-1.xhtml. r=backout 2017-04-06 21:12:29 +02:00
Mats Palmgren
c1583928ed Bug 1338108 - The result of adding any percentage factor to a size that is zero should also be zero. r=dholbert
MozReview-Commit-ID: OzOCjvcz0A
2017-04-06 20:17:34 +02:00
Jan Henning
2b18d286ed Bug 1328868 - Part 1 - Allow setting a global zoom factor via nsLayoutUtils. r=tnikkel
For Android we want to be able to set a global zoom factor that will scale any page where font inflation is not turned on.

Android makes the system font scale available as a float factor. For our purposes, converting this to a percentage based value and rounding to an integer is accurate enough and enables us to pass this value as a standard Gecko int preference. This means we can make use of the standard infrastructure for setting and retrieving Gecko-side preferences both from Java and JS (the latter during testing), as opposed to having to write custom JNI and C++/IDL helper functions.

To that effect, we implement a method for retrieving that setting via nsLayoutUtils, analogous to the current font inflation settings. Since we later want to clamp the effective text zoom resulting from that setting by zoom.minPercent and maxPercent, we add var caches for them in nsLayoutUtils as well.

MozReview-Commit-ID: Ler2YmwzImE
2017-02-25 13:22:45 +01:00
Kartikaya Gupta
720d5fa9aa Bug 1316318 - Disable paint-skipping for elements where we disable APZ. r=mstange
If we disable APZ on an individual scrollable element by setting the "disable APZ"
flag on the ScrollMetadata, we should also disable paint-skipping for that element.
If we don't do this, we end up in a situation where the APZ code is not applying
the async transform but is sending repaint requests expecting the main thread to
do repaints. Meanwhile the main-thread thinks that it can send empty transactions
and have APZ update the async transform (a.k.a. paint-skipping). So visually
neither APZ nor main-thread have an effect and the element doesn't appear to
scroll except with the tile-aligned displayport shifts. Disabling paint-skipping
on the element fixes the issue.

MozReview-Commit-ID: H4wpVLw8r8X
2017-03-15 08:24:08 -04:00
Jonathan Watt
00d12b1b8c Bug 1345908 - Remove nsLayoutUtils::HasCSSBoxLayout. r=cjku 2017-02-07 21:11:53 +00:00
Timothy Nikkel
78536370b5 Bug 1346109. Add a function that returns if we need a displayport base rect for calculating a displayport. r=botond 2017-03-11 00:58:09 -06:00
Jonathan Watt
e84b0a4edc Bug 1345841 - Stop using Maybe<const T>. r=mats 2017-02-07 11:52:22 +00:00
Xidorn Quan
522b943280 Bug 1345343 - Add a pref to turn off effect of xml:base on style attribute. r=bz
MozReview-Commit-ID: EzNLxIW0OCv
2017-03-10 18:04:34 +11:00
Brad Werth
3c26028870 Bug 1343978 Part 1: Change ClientRectsAndTexts usage of DOMStringList to Sequence<DOMString>. r=smaug
MozReview-Commit-ID: 8mKxdPTq4Ej
2017-03-02 13:13:12 -08:00
Jonathan Watt
2a7bd2d507 Bug 1341174 - Bring the declarations of the four Draw*Image() methods in nsLayoutUtils.h back together. r=dholbert 2017-01-24 17:32:11 +00:00
cku
0846dd2a0a Bug 1287492 - Part 1. Implement nsLayoutUtils::HasCSSBoxLayout. r=mstange
There is no direct relation between this patch and the bug. Read through the code
and think we may reuse some logic.
MozReview-Commit-ID: HGEvDNGoIBS
2017-02-08 20:15:28 +08:00
Jonathan Watt
8b4dac7b4f Bug 1058040, part 11 - Convert DrawImage/DrawImageInternal's SVGImageContext param from pointer to Maybe<>. r=dholbert 2017-01-11 01:48:29 +00:00
Neerja Pancholi
d77826e76a Bug 1166147 - Part1: Ignore writing mode while printing header and footer r=dholbert
MozReview-Commit-ID: Kesy6LG2KNe
2017-01-19 11:45:30 -08:00
Ting-Yu Lin
e74fee8fd7 Bug 1333366 Part 1 - Update document related to Corner and HalfCorner. r=mats
MozReview-Commit-ID: 4wnjQOvploH
2017-01-24 18:37:05 +08:00
cku
45e5563bae Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange
Each concrete class of imgIContainer is able to handle opacity already. All we
need to do is pass opacity value to them.

MozReview-Commit-ID: EMkLnG3YXA1
2017-01-03 13:53:22 +08:00
Iris Hsiao
f05dc61a9f Backed out changeset c868ab532766 (bug 1323912) 2017-01-04 21:47:12 -05:00
cku
f1ffeaa1c2 Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange
Each concrete class of imgIContainer is able to handle opacity already. All we
need to do is pass opacity value to them.

MozReview-Commit-ID: EMkLnG3YXA1
2017-01-03 13:53:22 +08:00
Xidorn Quan
db94c3e82c Bug 1303241 part 2 - Make GetVisitedDependentColor use style structs directly. r=dbaron
I think there are three advantages of this change:
1. removes some dependencies from layout / painting code to pre-computed
   value stuff in the style system;
2. makes it easier to audit usage of specific fields in style structs
   (which is probably a side effect of the first one);
3. potentially improves performance since it doesn't go through the
   unnecessary general logic in ExtractComputedValue.

Also, combined with the part before, we get a unified list for visited-
dependent properties so that we can ensure the assertion here and the
style difference calc code are consistent.

MozReview-Commit-ID: 5B9aN7CfRgI
2016-12-31 00:57:37 +11:00
cku
c0fd83b73b Bug 1311270 - Part 2. Rename StyleClipPathGeometryBox to StyleGeometryBox and extend contained values.
MozReview-Commit-ID: 85zjcifAycX
2016-11-22 14:49:43 +08:00
cku
5e33d5d53f Bug 1311270 - Part 1. Move geomery box computing from nsCSSClipPathInstance to nsLayoutUtils.
Simply move ComputeHTMLReferenceRect and ComputeSVGReferenceRect from
nsCSSClipPathInstance to nsLayoutUtils to reuse the code in both clip-path and
mask.

MozReview-Commit-ID: 59LofAeEhKQ
2016-11-22 11:19:11 +08:00
Wes Kocher
e1b9233077 Backed out 5 changesets (bug 1302470) for causing bug 1323200 a=backout
Backed out changeset 005adbf78cd2 (bug 1302470)
Backed out changeset 113f7b13475c (bug 1302470)
Backed out changeset 3d2569996ebc (bug 1302470)
Backed out changeset b92b78271941 (bug 1302470)
Backed out changeset 5b92678afff8 (bug 1302470)


MozReview-Commit-ID: FgeA5OQV8WP
2016-12-16 16:45:09 -08:00
Mike de Boer
a8293a3ea3 Bug 1302470 Part 2: Use a hit-test method to determine if the rect of a range is visible on the page or not to the eye, for use in find-in-page. r=mstange,smaug
MozReview-Commit-ID: 9P7gf0GcREv
2016-11-09 15:09:36 -08:00
Brad Werth
0cf8efaa76 Bug 1319560 Part 2: Add a nsLayoutUtils::FrameForPointFlags value to only retrieve visible frames. r=mattwoodrow
MozReview-Commit-ID: 1mNIXdyBkw4
2016-11-28 14:50:34 -08:00
Ting-Yu Lin
03d0c3c4c4 Bug 1317588 Part 2 - Remove mozilla::css::Side typedef. r=mats
This patch is written with the help of the following script.

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "css::Side" "Side"

MozReview-Commit-ID: DPV6vivpPUp
2016-11-18 16:28:38 +08:00
Sebastian Hengst
1efa6af3c5 Backed out changeset cc04b61c9f23 (bug 1302470) 2016-11-20 20:31:31 +01:00
Mike de Boer
4a1caa283e Bug 1302470 Part 2: Use a hit-test method to determine if the rect of a range is visible on the page or not to the eye, for use in find-in-page. r=mstange,smaug
MozReview-Commit-ID: 9P7gf0GcREv
2016-11-09 15:09:36 -08:00
Sebastian Hengst
e1946ef759 Backed out changeset 8243da10a171 (bug 1302470) 2016-11-17 17:49:46 +01:00
Mike de Boer
f1cdd4359c Bug 1302470 Part 2: Use a hit-test method to determine if the rect of a range is visible on the page or not to the eye, for use in find-in-page. r=mstange,smaug
MozReview-Commit-ID: 9P7gf0GcREv
2016-11-09 15:09:36 -08:00
Brad Werth
6da307ad58 Bug 1314080 Part 4: Implement the new text retrieval behavior. r=smaug
MozReview-Commit-ID: 7j5BjruBNb9
2016-11-02 16:39:43 -07:00
Mats Palmgren
92710bc973 Bug 1300369 part 11 - Move nsLayoutUtils::ComputeISizeValue to a nsIFrame method (idempotent patch). r=dholbert 2016-11-05 02:57:07 +01:00
Mats Palmgren
f00cf4e1ad Bug 1300369 part 8 - Move nsLayoutUtils::ComputeSizeWithIntrinsicDimensions to a nsFrame method (idempotent patch). r=dholbert 2016-11-05 02:57:06 +01:00
Mats Palmgren
e92a1005c6 Bug 1300369 part 2 - Make nsLayoutUtils::IntrinsicForAxis handle margin-box min-size clamping. r=dholbert 2016-11-05 02:57:06 +01:00
Mats Palmgren
43c6c151b5 Bug 1218178 part 1 - [css-grid] Implement the transferred size part of Automatic Minimum Size for grid items. r=dholbert
https://drafts.csswg.org/css-grid/#min-size-auto
https://www.w3.org/TR/css-flexbox-1/#min-width-automatic-minimum-size
2016-11-05 02:57:05 +01:00
Andreas Farre
b6e8a0530c Bug 1198381 - Implement the requestIdleCallback feature, r=froydnj,mattwoodrow,smaug
Expose requestIdleCallback on Window and implement running callbacks
in idle periods by posting rICs to the main threads idle queue.

MozReview-Commit-ID: KSYQsyaZ6is
2016-08-22 14:52:45 +02:00
Carsten "Tomcat" Book
3fb3787b20 Backed out changeset eb2606332cb8 (bug 1198381) 2016-10-25 12:32:54 +02:00
Andreas Farre
a990fe8f33 Bug 1198381 - Implement the requestIdleCallback feature, r=froydnj,mattwoodrow,smaug
Expose requestIdleCallback on Window and implement running callbacks
in idle periods by posting rICs to the main threads idle queue.

MozReview-Commit-ID: KSYQsyaZ6is
2016-08-22 14:52:45 +02:00
Xidorn Quan
f2930fb5a2 Bug 1309868 part 2 - Use const nsIContent pointer in some layout utils. r=heycam
MozReview-Commit-ID: 5GMave4FS48
2016-10-18 15:29:03 +11:00
Jorg K
82d11230ae Bug 1263357 - When the caret is placed after visible line break, associate caret with frame on the next line instead. r=mats 2016-10-14 14:21:00 -04:00
Hiroyuki Ikezoe
74aa7d188c Bug 1223658 - Part 8: Drop nsLayoutUtils::HasActiveAnimationOfProperty. r=birtles
MozReview-Commit-ID: 3uI5wQoviqK
2016-10-14 19:14:12 +09:00
Hiroyuki Ikezoe
0d6fbdaea1 Bug 1278136 - Part 5: Create a stacking context for opacity/transform animations even if it's in delay phase and even if the property is overridden by !important rules. r=birtles
This patch introduces a new functions named HasEffectiveAnimationOfProperty.
This function checks that a given CSS property is overridden by !important
rules.
On the other hand, now KeyframeEffetReadOnly::HasAnimationOfProperty() does
just check that the effect has a given CSS property.  This is used to create
a stacking context because we should create a stacking context for opacity or
transform animations even if the property is overridden by !important rules.

Note about no-stacking-context-(opacity|transform)-removing-animation-in-delay.html
Before this patch we don't create any stacking context for animations overridden
by !important rules, but after this patch we do create a stacking context for
such animations.  As a result, in the test case we did paint a stacking context
in the first rAF callback and then in the second rAF callback we did clear the
painted stacking context. Unfortunately sometimes the second rAF callback was
called prior to clear the stacking context on the compositor because of
compositor delay. To avoid this situation, we have to wait for MozAfterPaint
instead of rAF callback.

MozReview-Commit-ID: AG1Y0IgoB3U
2016-10-13 16:54:25 +09:00
Phil Ringnalda
2ab744056c Backed out 2 changesets (bug 1278136) for failures in no-stacking-context-opacity-removing-animation-in-delay.html
Backed out changeset 62cf4a7d6007 (bug 1278136)
Backed out changeset 5f2db29e67ca (bug 1278136)

MozReview-Commit-ID: K9WcZFjL2XB
2016-10-11 20:40:36 -07:00