Commit Graph

621 Commits

Author SHA1 Message Date
Ehsan Akhgari
ab106afc93 Bug 1352527 - Part 1: Add the nsPresContext::GetBidiEngine() API; r=jfkthame
The nsBidi API requires the consumer to first call SetPara()
in order to perform bidi resolution and that resets the data
members, so there is no need to recreate nsBidi objects from
scratch each time we need to perform bidi resolution.

Having this API allows us to reuse this object across the
calls to nsBidiPresUtils members.
2017-04-14 02:41:52 -04:00
Jan Henning
7ce23f0b71 Bug 1328868 - Part 2 - Apply the system font scale as an additional text zoom factor to all pages that are not font inflated. r=tnikkel
We want to use a similar model as Chrome on Android does for scaling our display of web content, that is use font inflation for desktop pages and plain text zooming for everything else.

Since we don't want to simply clobber any text zoom that might have been set by the user/front-end code, we allow setting and storing the system font scale separately on the PresContext. We then calculate the effective text zoom value as the product of the system font scale and the current text zoom value.

Any function that is using the PresContext's TextZoom value for layouting/rendering is switched over to this new EffectiveTextZoom value, whereas functions that are interested in the text zoom as actually set by the user/front-end (e.g. the nsDocumentViewer, or the code responsible for copying text and full zoom settings into the new PresContext on page navigation) continue using the plain TextZoom value.

As long as font inflation is enabled in principle (e.g. font.size.inflation.minTwips != 0), every page starts out as eligible for font inflation until the relevant meta viewport tags marking the page as "mobile friendly" have been detected. Since the PresShell caches the font inflation state and only recalculates it when necessary, we make use of that and set the PresContext's system font scale as necessary whenever the font inflation state has been refreshed.

MozReview-Commit-ID: 2InyE04wKAW
2017-02-25 13:22:52 +01:00
Ryan Hunt
393342a6be Bug 1340904 - Implement telemetry scroll tracking in C++ r=smaug 2017-03-02 00:51:40 -05:00
Matt Woodrow
e40a3c55b7 Bug 1302071 - Part 5: Bucket PresContext invalidations by transaction ID, and only deliver them when the associated composite has completed. r=tnikkel
This patch does a few things:
* Buckets invalidations by transaction ID, and sends MozAfterPaints events for them when the associated composite completes.
* Creates a separate EventualDidPaint timer for each transaction ID we have invalidations for rather than just using one.
* Removes NotifyDidPaintForSubtree(PAINT_LAYERS), as it was only necessary for the existing bucketing mechanism.

MozReview-Commit-ID: JERMsgxhPQd
2017-02-17 15:16:15 +13:00
Matt Woodrow
41d4c15ba3 Bug 1302071 - Part 4: Pass the current transaction ID to NotifyInvalidation. r=tnikkel
MozReview-Commit-ID: AMLjzElRp1l
2017-02-17 15:15:45 +13:00
Matt Woodrow
2cebc9affd Bug 1302071 - Part 3: Remove flags parameter to NotifyInvalidation since it's unused. r=tnikkel
MozReview-Commit-ID: 8hC1GglMhk2
2017-02-17 11:50:58 +13:00
Matt Woodrow
03b6309c72 Bug 1302071 - Part 2: Remove ClearMozAfterPaintEvents since it's unused. r=tnikkel
MozReview-Commit-ID: FCy5y6cDXrY
2017-02-17 11:50:28 +13:00
Matt Woodrow
96389b5cf7 Bug 1302071 - Part 1: Remove AddPresShellToInvalidateIfHidden since it doesn't appear to be necessary. r=tnikkel
We added this so that MozAfterPaint events would be delivered to hidden documents as part of bug 539356, but I don't remember what needed it.
It doesn't appear to be necessary for any tests any more, so let's just get rid of it

MozReview-Commit-ID: HcmIjstZyLQ
2017-02-17 11:49:29 +13:00
Wes Kocher
0e7757aeda Merge m-c to inbound a=merge
MozReview-Commit-ID: BemR756HJnR
2017-02-15 16:33:03 -08:00
Bill McCloskey
54da76be6b Bug 1339289 - Give names to a lot of common timers (r=ehsan)
MozReview-Commit-ID: IMsv5bkyjBL
2017-02-15 12:30:01 -08:00
Bill McCloskey
f79edeabc9 Bug 1339289 - Give names to a lot of common runnables (r=ehsan)
MozReview-Commit-ID: 5IdvK6kgoAW
2017-02-15 12:30:01 -08:00
Cameron McCormack
87f3ad6dfb Bug 1297899 - Part 6: Move RestyleManagerHandle functionality into RestyleManager. r=bholley
MozReview-Commit-ID: 7lsti0bGzNr
2017-02-13 11:21:33 +08:00
William Chen
ae6e16da55 Bug 1332511 - Adjust telemetry histograms for time to first input probes. r=jwatt, data=bsmedberg 2017-01-31 21:49:06 -07:00
Timothy Nikkel
4819cae08b Bug 1264798. Include the composite end time in the MozAfterPaint event. r=smaug r=mattwoodrow 2017-01-25 23:01:33 -06:00
Mats Palmgren
7b1c2b5cc8 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
Julian Seward
ce27f2a170 Bug 1232696 - Remove NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW as it causes segfaulting for GCC 6 builds (3 of 5, fixes for layout/). r=dholbert. 2017-01-24 17:11:13 +01:00
Markus Stange
96258d1927 Bug 1331402 - Update plugins' clipRects when hiding a tab. r=jimm,mattwoodrow
In non-e10s, all tabs of a window would share one nsRootPresContext. When
switching tabs, the tab switch paint would trigger a call to
nsRootPresContext::ComputePluginGeometryUpdates, which would call
SetEmptyWidgetConfiguration on all registered nsPluginFrames, notably also
those inside the tab that was hidden.

With e10s, every tab has its own nsRootPresContext, and paints in one tab do
not trigger calls to nsRootPresContext::ComputePluginGeometryUpdates on the
root pres contexts of other tabs. So when painting the new tab, the registered
plugin frames in the old tab were not notified that they were now hidden.
This patch now does that in TabChild::MakeHidden.

MozReview-Commit-ID: LlW9dKKFqZE
2017-01-17 18:07:05 +01:00
Emilio Cobos Álvarez
32ce34eedd Bug 1329200: Remove unused FrameManager global generation counter. r=xidorn
MozReview-Commit-ID: AXkaZYxpK2y
2017-01-06 16:03:41 +01:00
William Chen
8d80e9d577 Bug 1307675 - Part 1: Record time from first paint to time of first input. r=baku,jwatt 2016-11-08 17:39:28 -08:00
Boris Zbarsky
00cf855194 Bug 1298588 part 3, gecko piece. Add a default ComputedValues member to PerDocumentStyleData. r=bholley 2017-01-04 14:52:26 -05:00
Boris Zbarsky
d911bbc40d Bug 1298588 part 1. Make StyleStructContext work with a const nsPresContext. r=bholley 2017-01-04 14:52:26 -05:00
Boris Zbarsky
9cc72606d4 Bug 1321803 part 1. Add an API on nsPresContext to test whether the given element would have its scrollbar styles propagated to the viewport in non-paginated mode. r=dbaron 2016-12-22 16:52:12 -08:00
Vincent Lequertier
a15cfcd1f5 Bug 1312155 - Move border-width constants out of nsPresContext; r=heycam 2016-11-16 10:11:00 +01:00
Markus Stange
b9a18a1510 Bug 1307242 - Add infrastructure for measuring time to non-blank paint. r=bkelly
MozReview-Commit-ID: LZBQOvKZYes
2016-11-10 16:00:45 -05:00
Keshav Prasad
070a0f4619 Bug 1314158 - Remove declaration of IsChromeSlow in nsPresContext.h. r=mstange
MozReview-Commit-ID: MXq75nKDQM
2016-11-04 16:46:30 -04:00
Olli Pettay
fffb815d77 Bug 1308459 - Rename RefreshDriver::PresContext() to hint about its behavior, r=tnikkel 2016-10-12 14:27:38 +03:00
Joel Maher
dc82a36645 Backout 472858f465b0 (Bug 1290158) for perf regression.
MozReview-Commit-ID: 92eO5YtKLoj
2016-09-23 06:20:33 -04:00
Neil Rashbrook
64d79b3dcf Bug 1290158 Don't generate synthetic paint events for invisible documents r=mattwoodrow 2016-09-14 15:55:45 +01:00
Matteo Ferretti
69ce27db31 Bug 1241867 - override the DPR without affecting the rendering; r=dbaron
- added overrideDPPX to nsIContentViewer
- made CSSStyleSheet and GlobalWindow using the overrideDPPX value
- added unit test with frame check

MozReview-Commit-ID: AOWpGs4vb9H
2016-08-25 13:15:19 +02:00
Emilio Cobos Álvarez
9ae6da0cdd Bug 1292281: Devirtualize nsPresContext::HasAuthorSpecifiedRules. r=bholley
MozReview-Commit-ID: 4UF4vNaOCHz
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
2016-08-26 04:20:01 -07:00
Kartikaya Gupta
36f24c16c5 Bug 1292781 - Add a test. r=tnikkel
MozReview-Commit-ID: f0UvsKMwAL
2016-08-24 09:15:42 -04:00
Cameron McCormack
6cafbba024 Bug 1290013 - Add a pref to disable stylo. r=bholley
MozReview-Commit-ID: DG9Q61OYlvl
2016-08-05 17:45:58 +08:00
Bobby Holley
e9c11ed873 Bug 1289620 - Initialize the correct restyle manager when we attach the PresShell. r=heycam 2016-07-27 09:44:30 -07:00
Bobby Holley
b3e219a775 Bug 1289620 - Separate presshell attachment and detachment in nsPresContext. r=heycam 2016-07-27 09:44:29 -07:00
Tooru Fujisawa
3fe90003b9 Bug 382721 - Part 9: Warn about too large dotted/dashed corner. r=jrmuizel 2016-06-10 13:10:03 +09:00
Carsten "Tomcat" Book
fae8d4f944 Backed out changeset c3f66208fe85 (bug 382721) 2016-06-10 15:38:30 +02:00
Tooru Fujisawa
2df3dab24a Bug 382721 - Part 9: Warn about too large dotted/dashed corner. r=jrmuizel 2016-06-10 13:10:03 +09:00
Kan-Ru Chen
a15c58a1c5 Bug 1261612 - Remove TabChild::IsRootContentDocument and related methods. r=smaug
MozReview-Commit-ID: 2ms1lBfimfv
2016-05-16 10:56:07 +08:00
L. David Baron
dddcc1ccd1 Bug 1271015 patch 1 - Add mechanism for testing the number of elements restyled. r=heycam
This is useful for writing tests that test particular optimizations,
such as that a particular operation doesn't cause restyles.  It sits
next to similar counters for frames constructed and frames reflowed.

I also snuck in a preference for the less-expensive mPresContext over
the more expensive mFrame->PresContext() (which dereferences multiple
pointers).

(Originally written for work I planned to be part of bug 1189598.)

MozReview-Commit-ID: 8PN7nwLJG9r
2016-05-09 11:26:35 -07:00
Kyle Huey
a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Jeremy Chen
57063f1344 Bug 1248708 - Part2.2: render -webkit-text-stroke property. r=jfkthame 2016-04-23 01:40:39 +08:00
Mike Conley
d6ec983152 Bug 1264409 - Make last transaction ID available via nsIDOMWindowUtils, and pass transaction ID through MozAfterPaint. r=mattwoodrow,mrbkap
MozReview-Commit-ID: 7wCYif8F6ws
2016-04-13 16:59:15 -04:00
Jonathan Kew
58db1b6fce Bug 1249279 - Let subdocuments' presContexts inherit the DPI setting of their parent, instead of retrieving it from their widget, to avoid using stale values from a currently-hidden widget on a screen with a different DPI. r=bz 2016-04-07 10:01:30 +01:00
Bobby Holley
ef26e6262f Bug 1261552 - Introduce StaticPresData and hoist some shared functionality into it. r=heycam
The complexity around the font pref cache stuff is really annoying. If we
think it's unnecessary, we could remove it in a followup.
2016-04-04 23:14:27 -07:00
Edgar Chen
3e1bddbbe2 Bug 1257742 - Part 3: Support using floating point in sizes descriptor; r=jdm
MozReview-Commit-ID: ESTk2x2VqnD
2016-03-23 18:46:36 +08:00
Benoit Girard
958bd77f36 Bug 1259235 - Add IsScrollFrameWithSnapping to speed up event regions. r=mstange
MozReview-Commit-ID: KdWCkXHjHzZ
2016-03-23 17:16:38 -04:00
Bobby Holley
fe6becbefa Bug 1253078 - Switch MOZ_STYLO environmental variable to MOZ_DISABLE_STYLO. r=dholbert 2016-03-02 15:14:55 -08:00
Jamie Nicol
7c521f8574 Bug 1247098 - Mark nsIPresShell::GetResolution and nsPresContext::IsRootContentDocument as const. r=tnikkel
MozReview-Commit-ID: 5IXm4EUy7IN
2016-02-24 14:57:43 +00:00
Brendan Dahl
a193c3220e Bug 1104916 - Implement CSS media query display-mode. r=cam 2016-02-23 17:10:00 +01:00
Cameron McCormack
07af6335ac Bug 1250377 - Part 1: Use MOZ_STYLO environment variable to switch on Servo-backed style system. r=bholley 2016-02-24 18:01:12 +11:00