Commit Graph

524 Commits

Author SHA1 Message Date
Kartikaya Gupta
0611166ee2 Bug 918288 - Ensure we set a displayport on elements that we get touch-start events for. r=botond 2014-11-21 21:36:25 -05:00
Kartikaya Gupta
911702f6c3 Bug 918288 - Add code to TabChild to dispatch the SetTargetAPZC notification. r=roc,botond 2014-11-21 21:36:25 -05:00
David Anderson
0965889407 Cache the current animated geometry root in nsDisplayListBuilder. (bug 1101260 part 1, r=roc) 2014-11-20 16:58:18 -08:00
Mats Palmgren
b0f013a10d Bug 907396 - Make RestyleManager::RestyleElement and nsCSSFrameConstructor::MaybeRecreateFramesForElement deal with display:contents elements. r=bzbarsky 2014-11-20 18:24:10 +00:00
Daniel Holbert
9f4cb9be39 Bug 624647 part 1: Add utility method nsLayoutUtils::ComputeObjectDestRect() to handle object-fit/object-position. r=seth 2014-11-14 16:45:23 -08:00
Benoit Girard
aa2eeb8ec1 Bug 1094442 - Part 1: Refactor how tile w/h is queried r=kats
--HG--
extra : rebase_source : 70ef00318a718e2ce3149955d2908615d6125cf3
2014-11-12 17:54:29 -05:00
Botond Ballo
c854025367 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
8894f4319e Backed out changeset fbb9dc943109 (bug 1076163) for Android 4.0 Crashes on a CLOSED TREE 2014-11-13 11:47:57 +01:00
Jonathan Kew
34fea182cd Bug 1093553 - Improve handling of line-height metrics, block ascent, etc., in vertical writing mode. r=smontagu 2014-11-13 08:58:06 +00:00
Botond Ballo
57adf459d4 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
Morris Tseng
8733cb18e1 Bug 1094056 - Use nsCaret::GetGeometryForFrame to determine position of selection carets. r=roc 2014-11-11 22:54:00 +01:00
Kartikaya Gupta
7644286079 Bug 1078029 - Add code to reposition input event coordinates into the target frame. r=roc
The PositionedEventTargeting code allows input events to be dispatched to a
target not directly under the input event point. However, the coordinates of the
input event can then end up outside the bounding rect of the event target. This
state is generally unexpected by web content and may cause compatibility issues.
Fennec's front-end code used to deal with this by repositioning the input event
coordinates to be inside the bounding rect; now that Fennec is using the shared
C++ code we need to have that code here. This behaviour is guarded by a pref and
disabled by default (but enabled on Fennec).
2014-11-04 09:52:16 -05:00
Jonathan Watt
f6f8d40041 Bug 1091794 - Replace gfxCornerSizes with Moz2D's RectCornerRadii. r=mattwoodrow 2014-11-01 10:45:10 +00:00
Jonathan Watt
53f338200b Bug 1091323 - Convert the nsLayoutUtils helpers that paint images and take an nsRenderingContext to take a gfxContext instead. r=seth 2014-11-01 10:45:09 +00:00
Jonathan Watt
1d2c31c63d Bug 1088781 - Rename nsLayoutUtils::GetStringWidth to nsLayoutUtils::AppUnitWidthOfStringBidi. r=dholbert 2014-10-26 17:57:49 +00:00
Botond Ballo
eea9473d65 Bug 1085569 - When calculating the composition bounds based on the frame size, use the cumulative resolution rather than the parent resolution everywhere. r=tn
--HG--
extra : amend_source : c72888ce19795e203e5dafa7d0b68065d6b668eb
2014-10-20 15:53:29 -04:00
Jonathan Watt
1c3326bede Bug 1088625, part 2 - Pass nsFontMetrics objects through to code that needs it instead of storing it on the nsRenderingContext. r=mstange 2014-10-24 16:28:14 +01:00
Jonathan Watt
35505a8b96 Bug 1088599 - Move nsRenderingContext::GetBoundingMetrics to nsLayoutUtils. r=mstange 2014-10-24 16:28:14 +01:00
Jonathan Watt
08ae0a017c Bug 1088550 - Move nsRenderingContext's remaining GetWidth methods to nsLayoutUtils. r=mstange 2014-10-24 16:28:13 +01:00
Jonathan Watt
2994c1b237 Bug 1088071, part 2 - Move the nsRenderingContext::DrawString code to nsLayoutUtils::DrawUniDirString. r=jfkthame 2014-10-24 11:00:23 +01:00
Jonathan Watt
0e920978be Bug 1088071, part 1 - Wrap the callers of the final nsRenderingContext::DrawString method up in a new nsLayoutUtils::DrawUniDirString method. r=jfkthame 2014-10-24 11:00:23 +01:00
Matt Woodrow
93f050183f Bug 1078337 - Correctly respect the source rect in DrawSingleImage. r=seth
--HG--
extra : rebase_source : c00951d46388585731340cf41c15520fc0592800
2014-10-23 11:41:14 +13:00
Jonathan Watt
09f54bbbb9 Bug 1086708 - Rename the snapping variant of NSRectToRect to NSRectToSnappedRect. r=mattwoodrow 2014-10-22 12:29:06 +01:00
Benoit Girard
4f2c7cdb80 Bug 961871 - Part 2: Refactor will-change scroll, pass through a nsDisplayListBuilder. r=mattwoodrow 2014-10-21 21:54:06 -04:00
Jonathan Watt
c972886b3e Bug 1085159 - Port the code that uses nsRenderingContext::DrawLine() to Moz2D. r=mattwoodrow
--HG--
extra : rebase_source : 70553292850517d695994c0a3422fab8ea0b760a
2014-10-20 10:55:48 +01:00
Jonathan Watt
9e43325322 Bug 1083597, part 2 - Add a variant of NSRectToRect that snaps to device pixels, and have nsTableCellFrame::DecorateForSelection use it to restore its snapping behavior. 2014-10-19 11:47:22 +01:00
Jonathan Watt
e20775a0d6 Bug 1083557 - Port the code that uses nsRenderingContext::FillPolygon() to Moz2D. r=mattwoodrow 2014-10-17 15:06:34 +01:00
Jonathan Watt
4c7c510aca Bug 1083761 - Use Color::FromABGR in more places that to the conversion by hand and remove nsLayoutUtils::NSColorToColor(). r=mstange 2014-10-17 12:53:16 +01:00
Jonathan Watt
3a8b0e745a Bug 1083215, part 2 - Convert drawing of HTML image map area focus to Moz2D. r=mattwoodrow 2014-10-16 10:51:14 +01:00
Michael Wu
71bba5063f Bug 1083393 - Remove unused thebes things in nsLayoutUtils, r=mattwoodrow 2014-10-15 17:13:14 -04:00
Brian Birtles
d77b5db74f Bug 1046055 part 4 - Add HasCurrentAnimationsForProperty to nsLayoutUtils; r=dbaron
This patch adds a method to nsLayoutUtils, alongside the existing
HasCurrentAnimations, that returns true if there exists an unfinished animation
on the element for the specified property.
2014-10-02 15:14:14 +09:00
Brian Birtles
2bfde3e79a Bug 1046055 part 1 - Remove nsPresContext parameter from nsLayoutUtils::HasCurrentAnimations; r=dbaron 2014-10-02 15:14:13 +09:00
Dirk Schulze
a028173cff Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Markus Stange
7d5a3be591 Bug 1073103 - Rename ThebesLayer to PaintedLayer. r=roc
--HG--
rename : gfx/layers/basic/BasicThebesLayer.cpp => gfx/layers/basic/BasicPaintedLayer.cpp
rename : gfx/layers/basic/BasicThebesLayer.h => gfx/layers/basic/BasicPaintedLayer.h
rename : gfx/layers/client/ClientThebesLayer.cpp => gfx/layers/client/ClientPaintedLayer.cpp
rename : gfx/layers/client/ClientThebesLayer.h => gfx/layers/client/ClientPaintedLayer.h
rename : gfx/layers/client/ClientTiledThebesLayer.cpp => gfx/layers/client/ClientTiledPaintedLayer.cpp
rename : gfx/layers/client/ClientTiledThebesLayer.h => gfx/layers/client/ClientTiledPaintedLayer.h
rename : gfx/layers/composite/ThebesLayerComposite.cpp => gfx/layers/composite/PaintedLayerComposite.cpp
rename : gfx/layers/composite/ThebesLayerComposite.h => gfx/layers/composite/PaintedLayerComposite.h
rename : gfx/layers/d3d10/ThebesLayerD3D10.cpp => gfx/layers/d3d10/PaintedLayerD3D10.cpp
rename : gfx/layers/d3d10/ThebesLayerD3D10.h => gfx/layers/d3d10/PaintedLayerD3D10.h
rename : gfx/layers/d3d9/ThebesLayerD3D9.cpp => gfx/layers/d3d9/PaintedLayerD3D9.cpp
rename : gfx/layers/d3d9/ThebesLayerD3D9.h => gfx/layers/d3d9/PaintedLayerD3D9.h
2014-09-26 13:06:08 -04:00
Kartikaya Gupta
c34ad0fe01 Bug 1071367 - Fix the composition bounds for the root content document on OS X. r=tn
According to roc the content viewer position doesn't mean much; only the size is
set to anything meaningful. Therefore using the position from the content viewer
bounds is not a good idea, and we should use the position from the frame bounds
instead. This patch also changes GetContentViewerBounds to GetContentViewerSize
so that it's harder to accidentally use the position in other places.
2014-09-23 12:17:36 -04:00
Ting-Yu Lin
e3debbffab Bug 1065244 - Part 2 - Refactor event point on frame logic for SelectionCarets. f=mtseng, r=roc 2014-09-15 02:57:00 +02:00
Ting-Yu Lin
fc63f147e7 Bug 1065244 - Part 1 - Add GetRectRelativeToFrame to nsLayoutUtils. f=mtseng, r=roc 2014-09-15 17:07:00 +02:00
Daniel Holbert
23f4653cb5 (no bug) Some comment-only cleanup in nsLayoutUtils.h. (no review, comment-only)
DONTBUILD

In particular:
 - Rewrapped a few lines to 80 characters.
 - Fixed a few typos.
 - Added a terminal period character at the end of @param/@return lines, in cases where the rest of the function's documentation follows that convention.
2014-09-09 16:12:13 -07:00
Jonathan Watt
7b475bb2b2 Bug 932771, part 2 - Add an inline nsLayoutUtils::PointToGfxPoint helper method. r=longsonr 2014-08-19 22:17:49 +01:00
Jonathan Kew
50cb6e6264 bug 1046950 pt 4 - convert ComputeSizeWithIntrinsicDimensions to logical-coord parameters. r=smontagu 2014-08-24 15:34:57 +01:00
Seth Fowler
4cd9e3e8e6 Bug 1043560 - Refactor the imgIContainer::Draw API. r=tn,dholbert,jwatt,mwu,mattwoodrow,roc sr=jrmuizel
--HG--
extra : rebase_source : b5ed02cb200ece12a07328613dca217e9d975703
2014-08-22 13:12:38 -07:00
David Zbarsky
1b247e50b6 Bug 952977: Switch some uses of gfx3DMatrix in nsLayoutUtils to Matrix4x4 r=nical 2014-08-22 09:40:02 -04:00
Matt Woodrow
c2d79a26ff Bug 1056427 - Stop PRenderFrame from managing PLayerTransaction since it hasn't worked since the layers refactoring. r=roc
--HG--
extra : rebase_source : 38c86648bb8e59a6b992bd377acb9aacb418c98b
2014-08-22 12:16:44 +12:00
Susanna Bowen
779f8cef59 Bug 1030993 - Basic reflow implementation for ruby frame classes. r=dbaron
To account for spacing between bases or text boxes during reflow, the line
layout which manages the bases updates its inline direction coordinate based on
the preferred inline size for the corresponding text boxes. Next, the base is
reflowed at the correct inline coordinate. Each paired text box is then also
reflowed at the proper inline position determined by (1) the current position of
its corresponding base and (2) its own preferred width.

In computing intrinsic widths, accounting for spacing is less complicated. The
minimum intrinsic width is the width of the widest ruby column, and the
preferred intrinsic width is the sum of all the ruby column widths. Each ruby
column width is the maximum width of its base box and text boxes. These
individual widths are determined using GetPrefISize on the base and text boxes.

Ruby base container frames store a list of pointers to the ruby text container
frames in the segment they denote. This list of pointers is created in the ruby
frame reflow method before calling the reflow method for the ruby base
container. The list exists and is used only during reflow of the main ruby frame
and is cleared before returning from reflow.
2014-08-15 10:34:20 -07:00
Ehsan Akhgari
2b84010cb8 Bug 1048246 - Fix more bad implicit constructors in layout; r=roc
--HG--
extra : rebase_source : ed828993139bc70232508364a9f046e38b7d3e06
2014-08-07 19:48:38 -04:00
Matt Woodrow
cfce6663f6 Bug 1045864 - Disable layerized background-attachment:fixed when we're using a software compositor. r=roc 2014-08-05 15:25:00 +12:00
Kartikaya Gupta
917e8cd729 Bug 1043644 - Use the content viewer bounds instead of the view bounds if available. r=tn 2014-07-29 14:50:48 -04:00
Matt Woodrow
bf15ddaf06 Bug 1039020 - Layerize background-attachment:fixed for all elements, not just the root one. r=roc 2014-07-25 20:37:50 +12:00
Jonathan Kew
76bdb9472c bug 1031241 pt 4 - Rename the {MIN,PREF}_WIDTH constants used to identify the type of intrinsic inline-size. r=smontagu 2014-07-24 18:03:26 +01:00
Jonathan Kew
55170c430a bug 1031241 pt 3 - Also rename Intrinsic{Width,Height} to Intrinsic{I,B}Size. r=smontagu 2014-07-24 18:03:26 +01:00