Commit Graph

67 Commits

Author SHA1 Message Date
Seth Fowler
c6767a6dc0 Bug 1150774 (Part 1) - Add helpers to simplify using typed units in ConfigureLayer. r=botond 2015-04-07 18:55:28 -07:00
Daniel Holbert
e4d13d4630 Bug 1149222 part 2 - Make nsSVGImageFrame::PaintSVG use LayoutDeviceSize & LayoutDevicePixel::ToAppUnits, when setting up its dest-rect. r=mats 2015-04-03 19:48:12 +00:00
Mats Palmgren
5bab4f44d4 Bug 1149215 - Remove nsLayoutUtils::GetWholeImageDestination that use unitless nsIntSize. r=dholbert 2015-04-03 19:48:12 +00:00
Botond Ballo
824de31a1b Bug 1043013 - Introduce IntRegionTyped. r=jrmuizel 2015-03-16 13:42:15 -04:00
Botond Ballo
46d1e4aa8c Bug 1036967 - Introduce ScaleFactors2D. r=kats,Bas 2015-03-06 13:53:47 -05:00
Daniel Holbert
d1e970a727 (no bug) fix typo ('decleration') in a comment in Units.h. comment-only, DONTBUILD 2014-12-05 11:00:43 -08:00
David Anderson
ec1f0caf28 Add APZ handling for desktop scroll wheel events. (bug 1086162 part 1, r=kats) 2014-11-17 20:56:18 -08:00
Kartikaya Gupta
ef3e0582eb Bug 1090398 - Small refactoring that adds ParentLayerPixel::ToUntyped. r=botond 2014-11-14 07:40:14 -05:00
Botond Ballo
27647aabec Bug 1055741 - Unify the 'local Screen' and 'ParentLayer' coordinate systems. r=kats 2014-11-10 14:35:11 -05:00
Botond Ballo
08963b106d Bug 1076163 - Basic APZ support for css-driven resolution. r=kats,tn
This makes APZ behave nicely with most uses of a css transform:scale.

Summary of changes:
  - FrameMetrics::mCumulativeResolution now includes the css-driven resolution
    in addition to the pres-shell resolution.
  - Displayports are now stored in Screen pixels rather than Layer pixels.
    This is what we want anyways (as we'd like the displayport size to remain
    constant as a fraction of the screen size), but it was necessary to make
    this change as part of this patch because continuing to store them in
    Layer pixels in the presence of a css-driven resolution would have
    required a bunch of infrastructure to implement correctly.

Remaining work:
  - Layout painting a scrollable layer at a resolution different from the
    scale induced by the css transform causes problems. These will go away
    with bug 1076192.
  - Different resolutions on the x and y axes are not supported. This is
    tracked by bug 1039967.
2014-10-24 15:49:38 -04:00
Carsten "Tomcat" Book
f8a9a0cf8d Backed out changeset fbb9dc943109 (bug 1076163) for Android 4.0 Crashes on a CLOSED TREE 2014-11-13 11:47:57 +01:00
Carsten "Tomcat" Book
5b163a6b8b Backed out changeset a96930f1e26b (bug 1055741) 2014-11-13 11:47:31 +01:00
Botond Ballo
c54c9d42eb Bug 1055741 - Unify the 'local Screen' and 'ParentLayer' coordinate systems. r=kats
--HG--
extra : rebase_source : af7323668fb54079e121755660da2121bec3d76b
2014-11-10 14:35:11 -05:00
Botond Ballo
df8b0f8a7a Bug 1076163 - Basic APZ support for css-driven resolution. r=kats,tn
This makes APZ behave nicely with most uses of a css transform:scale.

Summary of changes:
  - FrameMetrics::mCumulativeResolution now includes the css-driven resolution
    in addition to the pres-shell resolution.
  - Displayports are now stored in Screen pixels rather than Layer pixels.
    This is what we want anyways (as we'd like the displayport size to remain
    constant as a fraction of the screen size), but it was necessary to make
    this change as part of this patch because continuing to store them in
    Layer pixels in the presence of a css-driven resolution would have
    required a bunch of infrastructure to implement correctly.

Remaining work:
  - Layout painting a scrollable layer at a resolution different from the
    scale induced by the css transform causes problems. These will go away
    with bug 1076192.
  - Different resolutions on the x and y axes are not supported. This is
    tracked by bug 1039967.
2014-10-24 15:49:38 -04:00
Karl Tomlinson
8395221632 bug 1096131 clarify docs for LayoutDevicePixels and LayerPixels r=kats f=tn
--HG--
extra : rebase_source : c2e854a7af06abbfcd9bb95fef3ac241472b88b5
2014-11-08 12:39:42 +13:00
Botond Ballo
fa7ad63cbf Bug 1066259 - Fix operators for multiplying/dividing a Coord by a Scale. r=kats
--HG--
extra : rebase_source : e6efebeac8b6628b24e1596fb5dc78187c64e325
2014-09-12 17:46:05 -04:00
Botond Ballo
6f99a3e02e Bug 1057528 - Allow multiplying/dividing CoordTyped by ScaleFactor. r=kats 2014-08-22 17:26:46 -04:00
Benoit Girard
dd68564fab Bug 1010584 - Part 1: Introduce RenderTargetPixel. r=mwoodrow 2014-07-30 14:36:15 -04:00
Botond Ballo
1d16def11d Bug 923512 - Introduce strongly-typed coordinate classes. r=kats,Bas
--HG--
extra : rebase_source : 22e5fe577ea503aede765c70e16c0bf875c4a9fd
2014-08-19 13:08:16 -04:00
Kartikaya Gupta
1f2a2b20a4 Bug 1043644 - Use the content viewer bounds instead of the view bounds if available. r=tn 2014-07-29 14:50:48 -04:00
Botond Ballo
c16d71e95b Bug 1022381 - Enforce that strongly-typed geometric classes are used with a proper coordinate system tag type. r=kats 2014-06-10 12:43:52 -04:00
Kartikaya Gupta
a7844bf3d0 Bug 1018387 - Update various variables and comments to reflect the fact that the values are in layer pixels and not layout device pixels. r=Cwiiis 2014-06-09 14:02:39 -04:00
Markus Stange
8f35b18308 Bug 944938 - Pass scroll events to the APZC tree manager on the async event thread. r=smichaud 2014-06-07 00:49:59 +02:00
Kartikaya Gupta
31afc0a194 Bug 948377 - Remove unwanted rounding in CalculateCompositedRectInCssPixels; add a CalculateCompositedSizeInCssPixels also. r=botond 2014-03-28 10:36:47 -04:00
Botond Ballo
70dfe7ab91 Bug 935219 - Fix composition bounds calculation and APZC hit testing (again). r=kats,tn
--HG--
extra : amend_source : 06c6bb658dfead6907250831bbe73fae6c20b45c
2014-03-10 17:56:59 -04:00
Chris Lord
62fe777b60 Bug 931823 - Fix calculation of tiled update data and convert to typed units. r=kats,botond
Various changes to FrameMetrics and such have causes the tile coherency checks
to end up with nonsense values, meaning updates are always happening a tile at
a time.

This fixes the calculation of those values, adds some documentation and
converts a large part of it to using typed units, to make it easier to
understand what's happening.
2013-11-27 17:33:27 +00:00
Kartikaya Gupta
ceced543c6 Bug 923431 - Kill ScreenToScreenScale. r=botond 2013-10-10 12:21:55 -04:00
Ehsan Akhgari
37bbcfc9c9 Bug 919355 - Part 2: Don't #include nsDeviceContext.h in Units.h; r=roc 2013-09-23 07:55:35 -04:00
Kartikaya Gupta
9f0a4def20 Bug 909281 - Add some strongly-typed conversion functions for margins and use them in RecordFrameMetrics. r=BenWa 2013-09-11 13:20:43 -04:00
Jeff Muizelaar
47d842d503 Bug 908726. Add AppUnits.h so we don't need nsDeviceContext.h for AppUnitsPerCSSPixel(). r=ehsan 2013-09-06 16:15:04 -04:00
Botond Ballo
2eaf03fbf6 Bug 904533 - Compute FrameMetrics::mCompositionBounds correctly for subframes. r=tn 2013-08-30 13:22:33 -04:00
Kartikaya Gupta
b77f1bc2b4 Bug 910322 - Strongly type the viewport size in nsViewportInfo. r=mbrubeck, Ms2ger 2013-09-03 15:12:24 -04:00
Kartikaya Gupta
e28825b675 Bug 907906 - Finish templating the gfx::Margin type, and add a gfx::IntMargin type to go with it. r=Cwiiis 2013-08-22 12:41:51 -04:00
Kartikaya Gupta
c76864b5fc Bug 902888 - Fix coordinate system mismatch with pre-Honeycomb plugins on Android. r=snorp
The plugin code was returning a rect in LayoutDevicePixels whereas Java
was treating it as a CSS-pixel rect. This patch makes the types more
explicit and adds a conversion in AndroidBridge to convert from the
LayoutDevicePixels to CSSPixel rects.
2013-08-13 11:49:21 -04:00
Karl Tomlinson
5059c69222 b=893523 clamp CSS pixel to nscoord conversion to nscoord_MIN,MAX r=roc
--HG--
extra : transplant_source : P%87%C2l%86%9AWu%CD%06%E5%22%D3%88/%80a%CE%80p
2013-08-05 14:58:41 +12:00
Ms2ger
78f9e66db8 Bug 896251 - Make nsEvent::{refPoint, lastRefPoint} LayoutDeviceIntPoints; r=smaug+kats 2013-08-02 09:05:16 +02:00
Ms2ger
ea4299c3b1 Bug 897540 - Reduce includes in nsDeviceContext.h; r=roc 2013-08-02 09:04:22 +02:00
Chris Lord
3404ab9f9d Bug 886298 - Add a typed-units Margin. r=kats 2013-07-22 09:50:11 +01:00
Botond Ballo
3d283a5a5d Bug 891468 - Convert nsEventStateManager::GetChildProcessOffset to return a LayoutDeviceIntPoint instead of an nsIntPoint. r=smaug 2013-07-11 10:43:35 -04:00
Ms2ger
4019955ea2 Bug 888235 - Use CSSIntSize for nsGlobalWindow::GetInnerWidth/Height; f=kats r=mrbkap 2013-07-01 09:14:24 +02:00
Kartikaya Gupta
f39a3aa067 Bug 883646 - Update the ViewTransform class to have a LayoutToScreen scale factor. r=kentuckyfriedtakahe, BenWa 2013-06-21 17:03:57 -04:00
Kartikaya Gupta
e6d307eeca Bug 883646 - Propagate the ScaleFactor classes far and wide. r=kentuckyfriedtakahe 2013-06-21 17:03:56 -04:00
Kartikaya Gupta
c6b20af712 Bug 883646 - Add the LayoutDevicePixel type. r=kentuckyfriedtakahe 2013-06-21 17:03:56 -04:00
Ryan VanderMeulen
89cd9674cd Backed out 7 changesets (bug 883646) for reftest-ipc failures.
Backed out changeset 2272804a8e71 (bug 883646)
Backed out changeset e39d3bdf847a (bug 883646)
Backed out changeset bf46fc332efe (bug 883646)
Backed out changeset 6bb558c3136f (bug 883646)
Backed out changeset d7d5d16e27e0 (bug 883646)
Backed out changeset 14c73096a132 (bug 883646)
Backed out changeset 89f6185a271b (bug 883646)
2013-06-20 17:36:39 -04:00
Kartikaya Gupta
f1493d9dae Bug 883646 - Update the ViewTransform class to have a LayoutToScreen scale factor. r=kentuckyfriedtakahe, BenWa 2013-06-20 16:10:58 -04:00
Kartikaya Gupta
bc7a93a250 Bug 883646 - Propagate the ScaleFactor classes far and wide. r=kentuckyfriedtakahe 2013-06-20 16:10:58 -04:00
Kartikaya Gupta
b32755d0f5 Bug 883646 - Add the LayoutDevicePixel type. r=kentuckyfriedtakahe 2013-06-20 16:10:58 -04:00
Kartikaya Gupta
a53496f124 Bug 880676 - Remove ToCSSIntRectRoundIn and convert APZC::CalculateResolution to return a ScaleFactor. r=kentuckyfriedtakahe 2013-06-14 16:11:44 -04:00
Kartikaya Gupta
94dd1b2c73 Bug 880676 - Replace a couple of Rect scaling functions with strongly typed operators. r=BenWa 2013-06-14 16:11:31 -04:00
Kartikaya Gupta
3c498464ed Bug 880676 - Introduce a ScaleFactor struct and use it to type conversions between units. r=BenWa,kentuckyfriedtakahe 2013-06-14 16:11:31 -04:00