Commit Graph

666 Commits

Author SHA1 Message Date
Xidorn Quan
833c3ca456 Bug 1363088 - Remove text-shadow handling from HasAuthorSpecifiedRules. r=heycam
After bug 1401825, we no longer need the code for text-shadow anymore,
so we can just remove it.

MozReview-Commit-ID: B2zpzetwW91
2017-10-12 11:13:07 +11:00
Nicholas Nethercote
7dbfdaf890 Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP
2017-10-03 09:05:19 +11:00
Brad Werth
8449663d7f Bug 1376931 Part 2: Extend ContentViewer to allow reporting of effective full zoom level as determined by the device context. r=bz,heycam
MozReview-Commit-ID: EoVp1DwAl0j
2017-09-27 14:06:37 -07:00
Sebastian Hengst
4411388d7a Backed out changeset 3adba9da5967 (bug 1376931) for bustage at layout/style/nsMediaFeatures.cpp:296: 'class nsPresContext' has no member named 'GetEffectiveFullZoom'; did you mean 'GetDeviceFullZoom'. r=backout on a CLOSED TREE 2017-10-05 00:15:51 +02:00
Brad Werth
272e1d58a9 Bug 1376931 Part 2: Extend ContentViewer to allow reporting of effective full zoom level as determined by the device context. r=bz,heycam
MozReview-Commit-ID: EoVp1DwAl0j
2017-09-27 14:06:37 -07:00
Nicholas Nethercote
9fda5528d2 Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ
2017-09-26 08:33:21 +10:00
Timothy Nikkel
cd721c7016 Bug 1402203 - Add a new layout phase for displaylist building. r=mstange 2017-09-26 15:57:57 +13:00
Sebastian Hengst
027dab5938 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1Wa3jV6n7Wj
2017-09-16 11:35:02 +02:00
Boris Zbarsky
c60153e7f7 Bug 1398500 part 1. Switch the viewport scrollbar override stuff to use Element, not nsIContent. r=dholbert
MozReview-Commit-ID: FU0Afemj4XD
2017-09-15 23:45:05 -04:00
Masatoshi Kimura
a4c148bf75 Bug 1400207 - Remove nsIDocument::AddCharSetObserver. r=hsivonen
MozReview-Commit-ID: 7uWDQvyz4yC
2017-09-14 23:19:22 +09:00
Daniel Holbert
5590031f7b Bug 1398376 part 3: Collapse formerly-MOZILLA_INTERNAL_API-guarded Foo()/FooInternal() functions together in nsIPresShell and nsPresContext. r=mats
This is just simplifying things by eliminating a layer of now-unnecessary
abstraction.

MozReview-Commit-ID: 1MBagjYXbCD
2017-09-08 16:25:03 -07:00
Daniel Holbert
9b4c18de30 Bug 1398376 part 2: Remove formerly-MOZILLA_INTERNAL_API-guarded FooExternal() functions from nsIPresShell and nsPresContext. r=mats
These functions are now dead code.  And really, they were already dead code
even before this patch-stack -- they were only called in never-evaluated
(and now-deleted) #else clauses.

MozReview-Commit-ID: AeY6Z3ybmsv
2017-09-08 16:25:01 -07:00
Daniel Holbert
32cdf9e38d Bug 1398376 part 1: Remove MOZILLA_INTERNAL_API guards from nsIPresShell.h and nsPresContext.h, since these headers are only used in libxul. r=mats
This patch drops all MOZILLA_INTERNAL_API checks (and the bodies of any
associated "#else" clauses) from these files.  The basic assumption here is
that MOZILLA_INTERNAL_API is #defined in all (supported) compilation units that
#include these files, so the checks are superfluous and the #else clauses are
dead code.

(If this assumption is mistaken and there is some .cpp file in our codebase
that #includes this header and yet does not have MOZILLA_INTERNAL_API, we will
find out via bustage on treeherder.)

MozReview-Commit-ID: 8dHJFBDVHwT
2017-09-08 16:24:59 -07:00
Bobby Holley
d41978678e Bug 1394987 - Remove dead codepath into PresShell::ReconstructFrames. r=emilio
MozReview-Commit-ID: 5ZqvGc2eTmJ
2017-08-29 17:40:56 -07:00
Nazım Can Altınova
5e5b68d3c7 Bug 1355721 - stylo: Implement font feature values lookup r=emilio,xidorn
MozReview-Commit-ID: 7wgQ1NCn7vL
2017-08-23 18:05:53 -07:00
Gregory Szorc
336b6b8347 Backed out changesets b749fc196a50, 2791eac8d760 (bug 1355721) for build bustage
CLOSED TREE
2017-08-24 20:30:17 -07:00
Nazım Can Altınova
639d0c6171 Bug 1355721 - stylo: Implement font feature values lookup r=emilio,xidorn
MozReview-Commit-ID: 7wgQ1NCn7vL
2017-08-23 18:05:53 -07:00
Eric Rahm
bf94c13168 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.
2017-08-16 16:48:52 -07:00
Milan Sreckovic
baffd719fa Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in layout/*. r=dholbert
MozReview-Commit-ID: AfAbr74e1Yh
2017-08-14 08:30:04 -04:00
David Anderson
5cbc12627e Change the subdoc invalidation callback to handle overflow. (bug 1345891 part 5, r=mattwoodrow) 2017-08-03 21:22:49 -07:00
Jonathan Watt
32406b4c7c Bug 1379269, part 2 - Invalidate and notify when clearing cached media features for Windows accent color changes. r=dholbert
MozReview-Commit-ID: 66tP4la4xy9
2017-07-24 15:57:29 +01:00
Xidorn Quan
7ecc3b6ca1 Bug 1382077 part 2 - Move mUsesViewportUnits into nsStyleSet. r=heycam
MozReview-Commit-ID: DQ4ZoLLNPeN
2017-07-24 11:51:32 +10:00
Carsten "Tomcat" Book
07d253a893 Backed out changeset 972821835d48 (bug 1382077) 2017-07-25 12:17:16 +02:00
Xidorn Quan
2798346a35 Bug 1382077 part 2 - Move mUsesViewportUnits into nsStyleSet. r=heycam
MozReview-Commit-ID: DQ4ZoLLNPeN
2017-07-24 11:51:32 +10:00
Wei-Cheng Pan
4c06965307 Bug 1366964 - Update style context generation after style resolved. r=heycam
Adds another restyle generation which represents the dirty state of raw
style changes, so that getComputedStyle() wont be confused by optimizations
made by style engines.

MozReview-Commit-ID: 7RYeNCzFygO
2017-05-23 14:13:47 +08:00
Kartikaya Gupta
b8b3120020 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3
2017-07-05 11:22:00 -04:00
Masatoshi Kimura
a725dc3e13 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14
2017-06-18 20:37:50 +09:00
Sebastian Hengst
9736fc0664 Backed out changeset 7235d05662b0 (bug 1373984) for Android bustage. r=backout on a CLOSED TREE 2017-06-25 18:30:13 +02:00
Masatoshi Kimura
cff1fdcb48 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14
2017-06-18 20:37:50 +09:00
Wes Kocher
d214d1f5fa Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE
MozReview-Commit-ID: 6kBmU71j2To
2017-06-25 05:10:14 -07:00
Masatoshi Kimura
d3e74dcb2d Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14
2017-06-18 20:37:50 +09:00
Emilio Cobos Álvarez
bd41711638 Bug 1373828: Work around servo/rust-bindgen#734. r=bholley
MozReview-Commit-ID: Fbng9a7MpDM
2017-06-17 00:17:35 +02:00
Emilio Cobos Álvarez
4d3cf46756 Bug 1347270: remove the nsIDOMWindowUtils::ElementsRestyled API. r=bholley
MozReview-Commit-ID: AKsEWc7Wpip
2017-05-30 11:38:53 +02:00
Ryan VanderMeulen
faca05b4d4 Backed out 2 changesets (bug 1347270) for browser_toolbariconcolor_restyles.js permafail on a CLOSED TREE.
Backed out changeset 445cb4d47d4f (bug 1347270)
Backed out changeset f2b7f1d599e3 (bug 1347270)
2017-05-30 18:11:02 -04:00
Emilio Cobos Álvarez
5b871805a8 Bug 1347270: remove the nsIDOMWindowUtils::ElementsRestyled API. r=bholley
MozReview-Commit-ID: AKsEWc7Wpip
2017-05-30 11:38:53 +02:00
Phil Ringnalda
36f5f49df7 Merge m-i to m-c, a=merge
MozReview-Commit-ID: CRhv88sOiOA
2017-05-27 21:29:31 -07:00
Jonathan Kew
4dcf0fe444 Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats 2017-05-27 12:36:00 +01:00
Manish Goregaokar
4b18020b43 Bug 1367275 - Part 5: stylo: Support -moz-min-font-size-ratio; r=xidorn
MozReview-Commit-ID: xRxkFJodeK
2017-05-27 13:23:15 -07:00
Manish Goregaokar
faf3e7c2b0 Bug 1367619 - Use RWLock when accessing font prefs service off main thread; r=heycam
MozReview-Commit-ID: Dxdq6Etbwxa
2017-05-25 15:04:13 -07:00
L. David Baron
cded99dedd Bug 1367190 patch 2 - Remove nsPresArena::AllocateBySize, nsIPresShell::AllocateMisc, and nsPresContext::AllocateFromShell. r=mats
MozReview-Commit-ID: l2UQC7qOQ0
2017-05-24 09:36:11 -04:00
Jonathan Kew
9cee45cb0c Bug 734008 - DeCOMtaminate nsILanguageAtomService, make it a non-refcounted singleton and clean up various call sites. r=m_kato 2015-04-03 21:39:23 +02:00
Manish Goregaokar
ecd90e3c8a Bug 1362599 - Remember which languages were used and force-cache when reset; r=heycam 2017-05-20 21:48:04 +02:00
Daniel Holbert
5066835c91 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
2017-05-10 13:53:27 -07:00
Wes Kocher
1be726284d 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
4fdbcddca9 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
2017-05-10 13:53:27 -07: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
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