Commit Graph

933 Commits

Author SHA1 Message Date
Jonathan Kew
0d6a32ee9b 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
479711a580 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
Nicholas Nethercote
d376f9f82e Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm.
do_GetAtom() is currently just a synonym for NS_NewAtom().

--HG--
extra : rebase_source : f4409784f931616cbc300591e6b843d30805c273
2016-03-29 10:09:43 +11:00
Timothy Nikkel
8d09d0af0a Bug 1259817. Always clear RefPtr to refresh driver in nsPresContext::Destroy. r=mats
nsPresContext::Destroy gets called from the desctructor and the cycle collector unlink phase. In the latter the prescontext may live for a while yet.
2016-03-26 00:35:15 -05:00
Brendan Dahl
3c24d63475 Bug 1256084 - Don't force reflow on size mode change. r=heycam 2016-03-23 17:56:00 -04:00
L. David Baron
fef3d844c0 Bug 1256745 - Cancel the DidPaint timer in SetShell(nullptr). r=mattwoodrow
MozReview-Commit-ID: KwtJD4AywX1
2016-03-16 13:47:41 -07:00
Jamie Nicol
4443e3c227 Bug 1247098 - Mark nsIPresShell::GetResolution and nsPresContext::IsRootContentDocument as const. r=tnikkel
MozReview-Commit-ID: 5IXm4EUy7IN

--HG--
extra : rebase_source : 7028a908adcb36828a58bb3ad7403559cfad9eb2
2016-02-24 14:57:43 +00:00
Brendan Dahl
1e077c8a5f Bug 1104916 - Implement CSS media query display-mode. r=cam 2016-02-23 17:10:00 +01:00
Cameron McCormack
89cac5abd1 Bug 1248864 - Part 3: Use RestyleManagerHandle instead of concrete restyle manager class. r=dholbert 2016-02-24 18:01:12 +11:00
Cameron McCormack
736a5f47e7 Bug 1248864 - Part 1: Move RestyleManager.h to EXPORTS.mozilla. r=dholbert 2016-02-24 18:01:12 +11:00
Cameron McCormack
0ecd5593cc Bug 1244074 - Part 4: Use StyleSheetHandle instead of concrete style sheet class in most places. r=dholbert 2016-02-24 18:01:12 +11:00
Cameron McCormack
7c95c39734 Bug 1244068 - Part 4: Use StyleSetHandle instead of concrete style set class in most places. r=dholbert 2016-02-24 18:01:11 +11:00
Xidorn Quan
61f1684757 Bug 743198 part 2 - Add unprefixed Fullscreen API to Document and Element. r=smaug
--HG--
extra : source : aaf4d12b511ba25ba93e6135cb849a3264435f7c
2016-02-17 08:47:11 +08:00
Matt Woodrow
2f1cbec9a2 Bug 1224433 - Part 2: Clamp the invalidation rect to values that fit within nscoord. r=roc
--HG--
extra : rebase_source : 0aaede54d8622786cddaf8365e6bf091d6bff8f8
2016-02-12 11:35:17 +13:00
Wes Kocher
ddcc30c564 Backed out changeset 4fa1296bd773 (bug 1104916) for win debug m(oth) permafails CLOSED TREE
--HG--
extra : commitid : HW3icAqLZUB
2016-02-05 11:42:55 -08:00
Brendan Dahl
b25b48552b Bug 1104916 - Implement CSS media query display-mode. r=cam 2016-02-04 13:34:00 +01:00
Birunthan Mohanathas
d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda
d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Nicholas Nethercote
26360d6c45 Bug 1239864 (part 9) - Use the new rect iterators in layout/ and ipc/. r=dholbert.
--HG--
extra : rebase_source : d5558c39bd3cfe85ee6f247eea8bab33f2f5027f
2016-01-18 17:20:59 -08:00
Timothy Nikkel
6cd0b6de0f Bug 1241651. Remove nsPresContext::GetDisplayRootPresContext. r=mattwoodrow
It should no longer serve any purpose different from nsPresContext::GetRootPresContext.
2016-01-21 19:09:04 -06:00
Brian Birtles
7a8bb45336 Bug 1232577 part 15 - Drop LastStyleUpdateForAllAnimations flag from pres context; r=heycam
nsPresContext contains a mLastStyleUpdateForAllAnimations flag which is simply
used to prevent unnecessarily posting restyles when throttled animations are
already up to date. Since part 13 we now accurately record whether we have
posted a restyle for each throttled animation and only post a restyle if we
have not done so already. As a result, this flag is no longer needed since
calling PostRestyleForThrottledAnimations is effectively a noop when throttled
animations are up-to-date.
2016-01-13 07:54:55 +09:00
Brian Birtles
641025e212 Bug 1232577 part 1 - Add EffectCompositor as a member of nsPresContext; r=heycam
Since we want to track elements needing a restyle on EffectCompositor we need
to scope it to an nsPresContext rather than just making if a collection of
static methods.
2016-01-13 07:54:53 +09:00
Tooru Fujisawa
4fac62d240 Bug 382721 - Part 0: Add missing includes and namespaces. r=jrmuizel 2015-09-10 19:24:34 +09:00
Boris Zbarsky
253dee13c4 Bug 1230466. Make sure to update our scrollbar styles when a <body> is removed from the DOM, since we might now need to propagate from some other element. r=roc 2015-12-08 14:55:50 -05:00
Nicholas Nethercote
5a37352d4a Bug 1229665 - Convert widget clip regions to LayoutDevicePixels. r=botond.
--HG--
extra : rebase_source : 315ac98884f84f3b5d53f156f3e02ddde3a57dbc
2015-12-02 14:32:55 -08:00
Nicholas Nethercote
e60696c015 Bug 1228125 (part 1) - Remove nsIWidget::GetBoundsUntyped(). r=botond.
This requires adding a new overloading of LayoutDevicePixel::ToAppUnits and a
new PixelCastJustification: LayoutDeviceIsParentLayerForRCDRSF.

--HG--
extra : rebase_source : b6d044619918818815b40c1173aa4e0551db28a1
2015-11-25 20:32:47 -08:00
Sunny Sidhu
cfa8942015 Bug 1220873 - Make Layer::mVisibleRegion a LayerIntRegion. r=botond
--HG--
extra : source : dc46048f7a9e9cc008c97e2d9e0a100944743055
extra : amend_source : 63783bc076e5969ebacdc8c74f9b5194a1891d9e
2015-11-29 02:07:55 -05:00
Xidorn Quan
ee559c1cab Bug 1040668 part 13 - Move first part of nsStyleFont::GetLanguage to nsPresContext::GetContentLanguage. r=dbaron
--HG--
extra : source : 2878e5e63e111995b4a67cd72b0df5a5a2b6531f
2015-11-28 11:56:33 +11:00
Jim Mathies
9eb83d5a42 Bug 1227666 - Insure that cached plugin geometry configuration cached in ShadowLayerForwarder gets cleared when we reflow and new content has no plugins. r=roc
--HG--
extra : transplant_source : %87%99%FBt%10%B9%24%8D%8B%1EJ%E2h%20%5EB%FA%3E%B2%FE
2015-11-25 12:11:00 -06:00
Chris Peterson
50912a55b9 Bug 1224951 - Part 1: Fix nsPresContext::SizeOfExcludingThis() size calculation. r=dholbert 2015-11-14 00:06:58 -08:00
Nicholas Nethercote
ff5231e6d2 Bug 1224403 (part 1) - Make Configuration::mBounds a LayoutDeviceIntRect. r=kats.
--HG--
extra : rebase_source : a0ae2779dfd9bc10730c8b38bc082453845daa1f
2015-11-10 16:27:26 -08:00
Nicholas Nethercote
ad0dd8414a Bug 1223310 (part 2) - Use LayoutDeviceIntRect for bounds-related functions in nsIWidget. r=kats.
The patch renames the existing functions (GetBounds(), GetClientBounds(), etc)
by adding an |Untyped| suffix. It then adds typed equivalents, and uses those
typed equivalents in all the call sites where it's easy to do so. The trickier
remaining call sites are converted to use the Untyped-suffix version.

--HG--
extra : rebase_source : 6bfb15bfc4698e2eba7d4db55497299d3dffcd51
2015-11-09 21:37:32 -08:00
Nicholas Nethercote
3d0821d5fd Bug 1219476 (part 5) - Replace PRLogModuleInfo usage with LazyLogModule in gfx/. r=erahm.
--HG--
extra : rebase_source : c39ecc84dbe9a0f94b42f1c78dabf346ce3a3b9e
2015-10-29 15:58:24 -07:00
Nathan Froyd
735e488da3 Bug 1217662 - part 2 - move mozilla::layers::LayerUserData to a separate header; r=mattwoodrow
Having to include all of Layers.h just to get at the definition of
LayerUserData is inconvenient, especially as most of the interesting
things in Layers.h can be forward-declared.  Let's move LayerUserData to
its own header, so clients can include a small header for that,
forward-declare anything else they need from Layers.h, and reduce header
bloat.
2015-10-22 16:04:35 -04:00
Robert Longson
51c57d84c3 Bug 1215484 - make SVG in an image context ignore author colours to match how we treat raster images, and in a non-image context respect them to match html. f=dao, r=roc 2015-10-20 13:12:36 +01:00
Cameron McCormack
2f1046d287 Bug 1216043 - Rename nsStyleSheet::sheetType and make it an enum class. r=dbaron
The only substantive change here, apart from a few variables changing in
size from uint16_t to uint8_t, is FontFaceSet's use of SheetType::Unknown
(0xFF) instead of 0 for FontFaceRecords for script-created FontFaces.
2015-10-20 10:16:20 +11:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Xidorn Quan
5d040064dc Bug 1201798 part 2 - Update viewport scrollbar override for fullscreen and remove the leagcy css rule. r=roc
--HG--
extra : source : 339b4099bd0fa78b54befdfb55bebfbb98a46c14
2015-09-30 10:48:41 +10:00
Xidorn Quan
0e00ba39ac Bug 1201798 part 1 - Move PropagateScrollToViewport() from nsCSSFrameConstructor to nsPresContext as a public method. r=roc
--HG--
extra : source : bfbd88293e3701653f3f7ab393239f69265561a8
2015-09-30 10:48:41 +10:00
Cameron McCormack
54e04d5eff Bug 1203766 - Part 4: Add a "restyle generation" counter, which increments whenever we process pending restyles. r=bzbarsky 2015-09-17 12:08:20 +10:00
Masayuki Nakano
e949683492 Bug 895274 part.160 Rename NS_AFTERPAINT to eAfterPaint r=smaug 2015-09-10 10:40:06 +09:00
Daniel Holbert
14faf6467e Bug 1195857: Make nsPresContext::HasAuthorSpecifiedRules()'s arg 'const', to remove need for const_cast in callers. r=jwatt 2015-08-18 15:41:24 -07:00
Aryeh Gregor
5aeef0231d Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
Brian Birtles
c2a72bf2cd Bug 1180125 part 1b - Hook nsAnimationManager's list of events up to the cycle collector; r=dbaron 2015-07-29 10:57:39 +09:00
Daniel Holbert
4c8b6a85e3 Bug 1183786 - Part 4: Drop unnecessary '!!' boolification. r=tn 2015-08-03 17:13:08 -07:00
Daniel Holbert
7f7ddf2033 Bug 1183786 - Part 3: Make nsPresContext helper-function return already_AddRefed instead of bool+outparam. r=tn 2015-08-03 17:13:07 -07:00
Eric Rahm
0a5b83be7b Bug 1183786 - Part 2: Delay updating after prefs changed if detached. r=tn r=dholbert 2015-07-30 20:47:26 -07:00
Eric Rahm
9287574901 Bug 1183786 - Part 1: Refactor timer setup code into a helper function. r=dholbert 2015-07-30 14:24:51 -07:00