Commit Graph

1013 Commits

Author SHA1 Message Date
Sumit Tiwari
4a179064e0 Fix for bug 1142497 - change mDOMMediaQueryLists to use mozilla::LinkedList;r=erahm
MozReview-Commit-ID: G9RtgdYudqA
2017-04-06 20:45:16 -04:00
Masatoshi Kimura
c2c48aea55 Bug 1356565 - Use AddFloatVarCache to cache layout.css.devPixelsPerPx. r=kanru
MozReview-Commit-ID: HZ9pBiU17H3
2017-04-09 01:28:54 +09:00
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
Andrea Marchesini
5029e7e133 Bug 1354441 - Update MediaQueryList to the latest version of the spec, r=jwatt 2017-04-10 16:29:06 +02:00
Masatoshi Kimura
743b848027 Bug 1353493 - Cache the return value for nsIWidget::DefaultScaleOverride(). r=kanru
MozReview-Commit-ID: ExP179bxbHe
2017-04-06 23:30:09 +09: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
Carsten "Tomcat" Book
97bcba5d10 Merge mozilla-central to autoland 2017-03-23 13:59:20 +01:00
Jeff Muizelaar
6eb096b5f0 Bug 1285533. Remove non-fontconfig platform fontlist codepath. r=lsalzman
This has been disabled for two years. It's time for it to die.
2017-03-22 14:58:19 -04:00
Boris Zbarsky
96a1af8bdd Bug 1348331 part 2. Switch Preferences::RegisterCallback/RegisterCallbackAndCall consumers that want prefix matches to the new RefisterPrefixCallback(AndCall) APIs. r=froydnj,padenot
MozReview-Commit-ID: 2ebVZO4fN6i
2017-03-21 14:59:02 -04:00
KuoE0
63e021c8f5 Bug 1342863 - (Part 7) DocGroup labeling for timer callback in nsPresContext. r=dholbert
MozReview-Commit-ID: Jhl2FVc8PRd
2017-03-15 17:38:29 +08:00
KuoE0
f4727559de Bug 1342863 - (Part 2) DocGroup labeling for runnables dispatched by NS_DispatchTo(Main|Current)Thread in nsPresContext. r=dholbert
MozReview-Commit-ID: COWvfXRhPj7
2017-03-15 10:53:59 +08:00
Carsten "Tomcat" Book
8980b1b57b Backed out changeset b6422d885f48 (bug 1342863) 2017-03-23 08:41:38 +01:00
Carsten "Tomcat" Book
9c745bc4d6 Backed out changeset 581cfae86457 (bug 1342863) 2017-03-23 08:41:22 +01:00
KuoE0
2362e69a80 Bug 1342863 - (Part 7) DocGroup labeling for timer callback in nsPresContext. r=dholbert
MozReview-Commit-ID: Jhl2FVc8PRd
2017-03-15 17:38:29 +08:00
KuoE0
81c6b2a8c3 Bug 1342863 - (Part 2) DocGroup labeling for runnables dispatched by NS_DispatchTo(Main|Current)Thread in nsPresContext. r=dholbert
MozReview-Commit-ID: COWvfXRhPj7
2017-03-15 10:53:59 +08:00
Emilio Cobos Álvarez
601d7074ad Bug 1328652: Assume medium feature changes in nsPresContext::MediaFeatureValuesChanged. r=bz
This allows us to test our media query stuff at least, and works around the fact
that we don't set mUsesViewportUnits.

This will get us better test coverage, at the expense of more expensive window
resizes and similar, temporarily.

MozReview-Commit-ID: 7lgELz86lmW
2017-03-11 00:23:05 +01:00
Ryan Hunt
393342a6be Bug 1340904 - Implement telemetry scroll tracking in C++ r=smaug 2017-03-02 00:51:40 -05:00
Michael Layzell
f1b2fd2254 Bug 1343069 - Capture a strong reference to nsRootPresContext in EnsureEventualDidPaintEvent, r=mattwoodrow
MozReview-Commit-ID: GRi4afSovP4
2017-03-01 15:09:44 -05:00
Wes Kocher
64ccd9559b Merge inbound to m-c a=merge
MozReview-Commit-ID: DCUf7VEDrTt
2017-02-17 13:38:51 -08:00
Vedant Sareen
a85a2ad339 Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter
Changed |print("enum ID : uint32_t {", file=output)| to |print("enum HistogramID : uint32_t {", file=output)| at line 53 of the file |toolkit/components/telemetry/gen-histogram-enum.py|, and then replaced all the textual occurrences of |Telemetry::ID| to |Telemetry::HistogramID| and |ID| to |HistogramID| in 43 other files.
2017-02-16 00:45:15 +05:30
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
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
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
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
Cameron McCormack
34c943ee6e Bug 1297899 - Part 3: Rename RestyleManager to GeckoRestyleManager and RestyleManagerBase to RestyleManager. r=bholley
MozReview-Commit-ID: fFTZKwmGJm
2017-02-13 11:21:32 +08:00
Cameron McCormack
61f5edfdb9 Bug 1297899 - Part 1: Rename RestyleManager.{h,cpp} to GeckoRestyleManager.{h,cpp}. r=bholley
MozReview-Commit-ID: 1v0ufuGFtiD
2017-02-13 11:21:30 +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
Cameron McCormack
0eed7a7daf Bug 1331294 - Part 1: Make nsPresContext::HasPendingRestyleOrReflow check nsIPresShell::mNeedStyleFlush instead of asking the RestyleManager for its status. r=bholley
This might delay the resolution of FontFaceSet's ready promise in cases
where we don't delay it now, when we call nsIPresShell::SetNeedRestyle for
something other than posting a restyle.  But from the Font Loading API
spec's point of view, I think this is fine.

MozReview-Commit-ID: AnItzSPnIeB
2017-02-10 10:42:29 +08:00
Cameron McCormack
334e0fe231 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
Julian Seward
757449a31f Bug 1333094 - nsPresContext::nsPresContext: move assignments into initialiser list where possible. r=dholbert. 2017-01-27 19:18:05 +01: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
Bobby Holley
0aaca3b258 Bug 1325734 - Simplify ElementData and eliminate the concept of consuming styles. r=emilio 2017-01-09 11:50:16 -08:00
William Chen
8d983c9acc Bug 1307675 - Part 2: Record telemetry for time to first input. r=baku, data=bsmedberg 2016-11-08 11:30:57 -08: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
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
Cameron McCormack
a0875e2a06 Bug 1321284 - Part 5: Process document level NAC when restyling. r=bholley
MozReview-Commit-ID: GigSrTHXXte
2016-12-01 16:19:50 +08:00
Bobby Holley
3775205e64 Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal. r=emilio
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-25 10:06:39 -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
abbe5b208a Bug 1307242 - Add a non-blank paint telemetry probe for foreground root content documents. r=bkelly, f=bsmedberg
This adds a probe called TIME_TO_NON_BLANK_PAINT_MS which reports time to
non-blank paint for root content documents whose docshell was active for the
entire time between navigation start and first non-blank paint.

MozReview-Commit-ID: 7JQdk5vHr1O
2016-11-10 14:26:54 -05: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
Dhanesh B. Sabane
1b5581cb43 Bug 1308137 - Remove code around IBMBIDI_SUPPORTMODE_*. r=xidorn
MozReview-Commit-ID: 96g2DBfpfX9
2016-10-16 18:05:17 +05:30
Olli Pettay
fffb815d77 Bug 1308459 - Rename RefreshDriver::PresContext() to hint about its behavior, r=tnikkel 2016-10-12 14:27:38 +03:00
Xidorn Quan
7d6c4129ab Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam
This commit is generated by the following commands with some minor
manual adjustment:

find . \( -name '*.h' -or -name '*.cpp' \) -not -path './layout/style/StyleSheet*' -exec sed -i -b \
  -e '/^\(#include\|using\)/s/StyleSheetHandle/StyleSheet/g' \
  -e 's/\(mozilla::\)\?StyleSheetHandle::RefPtr/RefPtr<\1StyleSheet>/g' \
  -e 's/StyleSheetHandle()/nullptr/g' \
  -e 's/->AsStyleSheet()//g' \
  -e 's/StyleSheetHandle/StyleSheet*/g' {} +
sed -i -b 's/sheet->AsVoidPtr()/sheet.get()/' layout/style/Loader.cpp
sed -i -b 's/AsHandle()/this/' layout/style/StyleSheet.cpp

MozReview-Commit-ID: 7abdvlKHukd
2016-09-26 22:03:25 +10:00