Commit Graph

1216 Commits

Author SHA1 Message Date
Bob Owen
4d92ace334 Bug 1252877 Part 4: Remove notification of plugins about scrolling from child. r=jimm
MozReview-Commit-ID: 2tHtOxx7jKa
2016-07-18 09:54:02 +01:00
Kartikaya Gupta
503c54171c Bug 1287185 - Disable paint skipping for scrollframes with background-attachment:local. r=mstange
MozReview-Commit-ID: GMgIyxUd20c
2016-07-15 15:56:39 -04:00
Kartikaya Gupta
352c02a130 Bug 1284586 - Disable paint-skipping for scrollframes that we detect as having a CSS-clipped descendant. r=mstange
MozReview-Commit-ID: AvjokFZMwdd
2016-07-13 16:05:53 -04:00
Markus Stange
9fa9a9399b Bug 1012752 - Snap scrolled area to layer pixels. r=tnikkel
We want the maximum scroll position to be aligned with layer pixels. That way
we don't have to re-rasterize the scrolled contents once scrolling hits the
edge of the scrollable area.

Here's how we determine the maximum scroll position: We get the scroll port
rect, snapped to layer pixels. Then we get the scrolled rect and also snap
that to layer pixels. The maximum scroll position is set to the difference
between right/bottom edges of these rectangles.
Now the scrollable area is computed by adding this maximum scroll position
to the unsnapped scroll port size.
The underlying idea here is: Pretend we have overflow:visible so that the
scrolled contents start at (0, 0) relative to the scroll port and spill over
the scroll port edges. When these contents are rendered, their rendering is
snapped to layer pixels. We want those exact pixels to be accessible by
scrolling.

This way of computing the snapped scrollable area ensures that, if you scroll
to the maximum scroll position, the right/bottom edges of the rendered
scrolled contents line up exactly with the right/bottom edges of the scroll
port. The scrolled contents are neither cut off nor are they moved too far.
(This is something that no other browser engine gets completely right, see the
testcase in bug 1012752.)

There are also a few disadvantages to this solution. We snap to layer pixels,
and the size of a layer pixel can depend on the zoom level, the document
resolution, the current screen's scale factor, and CSS transforms. The snap
origin is the position of the reference frame. So a change to any of these
things can influence the scrollable area and the maximum scroll position.
This patch does not make us adjust the current scroll position in the event
that the maximum scroll position changes such that the current scroll position
would be out of range, unless there's a reflow of the scrolled contents. This
means that we can sometimes render a slightly inconsistent state where the
current scroll position exceeds the maximum scroll position. We can fix this
once it turns out to be a problem; I doubt that it will be a problem because
none of the other browsers seems to prevent this problem either.

The size of the scrollable area is exposed through the DOM properties
scrollWidth and scrollHeight. At the moment, these are integer properties, so
their value is rounded to the nearest CSS pixel. Before this patch, the
returned value would always be within 0.5 CSS pixels of the value that layout
computed for the content's scrollable overflow based on the CSS styles of the
contents.
Now that scrollWidth and scrollHeight also depend on pixel snapping, their
values can deviate by up to one layer pixel from what the page might expect
based on the styles of the contents. This change requires a few changes to
existing tests.
The fact that scrollWidth and scrollHeight can change based on the position of
the scrollable element and the zoom level / resolution may surprise some web
pages. However, this also seems to happen in Edge. Edge seems to always round
scrollWidth and scrollHeight upwards, possibly to their equivalent of layout
device pixels.

MozReview-Commit-ID: 3LFV7Lio4tG
2016-06-02 15:41:51 -04:00
Carsten "Tomcat" Book
877d717533 merge mozilla-inbound to mozilla-central a=merge 2016-06-30 12:33:41 +02:00
Kartikaya Gupta
ce31f500a1 Bug 1253683 - Don't layerize scrollframes which are overflow:scroll but not actually scrollable. r=tnikkel
MozReview-Commit-ID: 6DUE3PB2hLI
2016-06-29 14:29:40 -04:00
Jonathan Watt
9c5b8de022 Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Jonathan Chan
be8882874b Bug 1043537 - Don't show resize handle for generated content. r=Enn
MozReview-Commit-ID: IZHqb9IwaAl
2016-06-07 10:22:04 -07:00
Botond Ballo
a868a0adaf Bug 1276107 - Ensure sorting display items by z-order doesn't cause event-regions items to end up below items they are supposed to cover. r=mattwoodrow
MozReview-Commit-ID: BxnshG9TgRb
2016-05-30 20:01:04 -04:00
Botond Ballo
f8d1f6aed4 Bug 1276107 - Ensure that the event-regions display item for a scrollable subframe ends up on top of perspective child items. r=mattwoodrow
MozReview-Commit-ID: 8nyeZb7g8Po
2016-05-30 18:56:32 -04:00
Wes Kocher
f5fc4c4717 Backed out 6 changesets (bug 1276107) for windows apz test bustage CLOSED TREE
Backed out changeset acd104ba0e8d (bug 1276107)
Backed out changeset f15df83c29a6 (bug 1276107)
Backed out changeset cd06b8e0f6dc (bug 1276107)
Backed out changeset e8361d5c43d2 (bug 1276107)
Backed out changeset 6f03149a7565 (bug 1276107)
Backed out changeset 7658c369fd33 (bug 1276107)
2016-06-06 12:16:52 -07:00
Botond Ballo
ea221f913f Bug 1276107 - Ensure sorting display items by z-order doesn't cause event-regions items to end up below items they are supposed to cover. r=mattwoodrow
MozReview-Commit-ID: BxnshG9TgRb
2016-05-30 20:01:04 -04:00
Botond Ballo
a8336249a5 Bug 1276107 - Ensure that the event-regions display item for a scrollable subframe ends up on top of perspective child items. r=mattwoodrow
MozReview-Commit-ID: 8nyeZb7g8Po
2016-05-30 18:56:32 -04:00
Matt Woodrow
227ddd2150 Bug 1274962 - Part 7: Clean up unecessary parameter for RecomputePerspectiveChildrenOverflow. r=dbaron 2016-06-03 14:26:40 +12:00
Phil Ringnalda
0d09f3f26a Back out 7 changesets (bug 1274962) for timeouts in browser_tableWidget_mouse_interaction.js
CLOSED TREE

Backed out changeset c5c9bc65a408 (bug 1274962)
Backed out changeset 15b5f8019521 (bug 1274962)
Backed out changeset 9ac50a46557b (bug 1274962)
Backed out changeset 9cda37e5a581 (bug 1274962)
Backed out changeset bb0230c4bb6d (bug 1274962)
Backed out changeset 56ededfbdee6 (bug 1274962)
Backed out changeset e081fc6f3f90 (bug 1274962)
2016-06-02 20:37:31 -07:00
Matt Woodrow
ae8236c0a6 Bug 1274962 - Part 7: Clean up unecessary parameter for RecomputePerspectiveChildrenOverflow. r=dbaron 2016-06-03 14:26:40 +12:00
Sebastian Hengst
47033228c3 Backed out changeset e79968b5fd84 (bug 1276107) for often failing test_group_wheelevents.html with e10s. r=backout 2016-06-02 22:54:31 +02:00
Sebastian Hengst
c41460eca6 Backed out changeset 8df1bde7eafd (bug 1276107) 2016-06-02 22:54:31 +02:00
Botond Ballo
7cbc11afea Bug 1276107 - Ensure sorting display items by z-order doesn't cause event-regions items to end up below items they are supposed to cover. r=mattwoodrow
MozReview-Commit-ID: BxnshG9TgRb
2016-05-30 20:01:04 -04:00
Botond Ballo
a5b2d02fd1 Bug 1276107 - Ensure that the event-regions display item for a scrollable subframe ends up on top of perspective child items. r=mattwoodrow
MozReview-Commit-ID: 8nyeZb7g8Po
2016-05-30 18:56:32 -04:00
Kartikaya Gupta
fbb4a92809 Bug 1280013 - Incorporate the APZ callback transforms when using the root composition bounds to clip the displayport base. r=botond,tnikkel
MozReview-Commit-ID: 1HOGQnCjIMt
2016-06-29 08:50:20 -04:00
Carsten "Tomcat" Book
4e27c39420 Backed out changeset 4cfdd1649464 (bug 1263349) 2016-05-24 11:13:59 +02:00
Seth Fowler
f7770de059 Bug 1263349 (Part 2) - Cache the current scroll parent and information about scrollports and displayports on nsDisplayListBuilder. r=botond,mstange 2016-05-24 01:12:48 -07:00
Jonathan Kew
f2339fac78 Bug 1272997 - followup 1 - Check for orthogonal writing modes when propagating (logical) resize flags from parent to child. r=dholbert 2016-05-18 21:07:54 +01:00
Kartikaya Gupta
8d6a07d7d4 Bug 1264297 - Don't do paint-skipping for elements with perspective, until we can properly populate the displayport. r=mstange
MozReview-Commit-ID: D3wKzWU72yi
2016-05-16 12:07:01 -04:00
Markus Stange
8d2eead121 Bug 1263192 - Clip scrolled contents to the display port. r=mattwoodrow
MozReview-Commit-ID: 4Uut8OAmCAd
2016-05-12 18:56:24 -04:00
Matt Woodrow
61200a9c5c Bug 1243610 - Refactor UpdateOverflow to separate out local overflow from that contributed by descendants. r=dbaron 2016-05-04 12:27:43 +12:00
Kartikaya Gupta
830f272650 Bug 1269539 - Ensure that the scroll position is restored properly on reloading a page which loads incrementally. r=tnikkel
MozReview-Commit-ID: 1qVA5yU7a7g
2016-05-03 10:40:20 -04:00
Kartikaya Gupta
d848d64c69 Bug 1266833 - When the scroll position is clamped during a frame reconstruction, send a scroll offset update to APZ. r=tnikkel
MozReview-Commit-ID: 2UBM4AWWIVI
2016-05-02 15:44:29 -04:00
Kartikaya Gupta
ec78701cab Bug 1268195 - When restoring a scroll position outside of incremental load, don't keep trying in a loop - just do it once and stop. r=tnikkel
It may be that when the frame is reconstructed after load, the frame gets shorter,
and the old scroll position cannot be restored, because it is out of bounds. In
such a case, we don't want to keep mRestorePos tracking the old scroll position,
because it can get incorrectly applied on a future frame reconstruction. Instead,
for scroll position restorations during frame reconstructions, we just try the
restore once and then clear mRestorePos.

MozReview-Commit-ID: BHoJHz0mGmf
2016-04-29 23:06:18 -04:00
Botond Ballo
278b10cbaa Bug 1268009 - If APZ is force-disabled, disable paint skipping even for apz-originated scrolls. r=kats
MozReview-Commit-ID: 2HgM5XiTcgA
2016-04-27 16:55:34 -04:00
L. David Baron
6fb63a21d2 Bug 1053986 - Rename nsBox::DoLayout to DoXULLayout. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

(While this wasn't explicitly reviewed, I'm considering it as r=dholbert
based on the request in comment 47 in the bug.)

MozReview-Commit-ID: 6Q0F4ViOyjJ
2016-04-20 21:28:35 -07:00
L. David Baron
678819f59f Bug 1053986 - Rename nsIFrame::AddCSSPrefSize, AddCSSMinSize, AddCSSMaxSize, and AddCSSFlex by replacing CSS with XUL. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: BTsQw1EMqvY
2016-04-20 21:28:34 -07:00
L. David Baron
73681d08ee Bug 1053986 - Rename nsIFrame::IsHorizontal to IsXULHorizontal, and related methods. r=dholbert
This is a manual subset of changes written with sed, over .h and .cpp
files in layout/.

This also renames a static method on nsSprocketLayout.

Note that nsFlexContainerFrame and nsRangeFrame also have IsHorizontal
methods that are not renamed here, but this can be found to be
relatively safe because none of the IsHorizontal methods are virtual.

MozReview-Commit-ID: Jsdy7I4Q7mX
2016-04-20 21:28:34 -07:00
L. David Baron
6230207f72 Bug 1053986 - Rename nsIFrame::GetClientRect to GetXULClientRect. r=dholbert
This is a manual subset of changes written with sed, over .h and .cpp
files in layout/.

MozReview-Commit-ID: 2F7Bt3i4ogu
2016-04-20 21:28:33 -07:00
L. David Baron
76ca2b695c Bug 1053986 - Rename nsIFrame::SetLayoutManager to SetXULLayoutManager. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: FuOaNWfROKV
2016-04-20 21:28:33 -07:00
L. David Baron
6d08aa5a6b Bug 1053986 - Rename nsIFrame::GetMargin to GetXULMargin. r=dholbert
This is a manual subset of changes written with sed, over .h and .cpp
files in layout/.

MozReview-Commit-ID: GqAa9wyb8z3
2016-04-20 21:28:33 -07:00
L. David Baron
132277cf57 Bug 1053986 - Rename nsIFrame::GetPadding to GetXULPadding. r=dholbert
This is a manual subset of changes written with sed, over .h and .cpp
files in layout/.

MozReview-Commit-ID: ENHslSI6hch
2016-04-20 21:28:33 -07:00
L. David Baron
b94d981327 Bug 1053986 - Rename nsIFrame::GetBorderAndPadding to GetXULBorderAndPadding. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: A8rWLW213Uo
2016-04-20 21:28:32 -07:00
L. David Baron
80e1129c37 Bug 1053986 - Rename nsIFrame::Layout to XULLayout, and related methods with the same name. r=dholbert
This is a manual subset of changes written with sed, over .h and .cpp
files in layout/.

MozReview-Commit-ID: 9NNnNw6ClGq
2016-04-20 21:28:32 -07:00
L. David Baron
a66b07471f Bug 1053986 - Rename nsIFrame::IsCollapsed to IsXULCollapsed, and related methods. r=dholbert
This is a manual subset of changes written with sed, over .h and .cpp
files in layout/.  It's a subset because there is also a Selection
method called IsCollapsed, which is not changed here.

MozReview-Commit-ID: 9JgnPv0Hkff
2016-04-20 21:28:32 -07:00
L. David Baron
15df9934a9 Bug 1053986 - Rename nsIFrame::GetBoxAscent to GetXULBoxAscent. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: EDkbMQKqPg6
2016-04-20 21:28:32 -07:00
L. David Baron
d6cac87778 Bug 1053986 - Rename nsIFrame::GetMinSizeForScrollArea to GetXULMinSizeForScrollArea. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: EkHfWG4QQrE
2016-04-20 21:28:31 -07:00
L. David Baron
8f4665f9af Bug 1053986 - Rename nsIFrame::GetMaxSize to GetXULMaxSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: 39fYXMz7kqR
2016-04-20 21:28:31 -07:00
L. David Baron
0527201e1d Bug 1053986 - Rename nsIFrame::GetPrefSize to GetXULPrefSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: yvcAZ8rndu
2016-04-20 21:28:31 -07:00
L. David Baron
4419f3e86b Bug 1053986 - Rename nsIFrame::GetMinSize to GetXULMinSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: Jhe3o3kIOe0
2016-04-20 21:28:31 -07:00
L. David Baron
7511e4ea42 Bug 1053986 - Rename nsIFrame::IsBoxFrame to IsXULBoxFrame. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

But with additional manual changes in accessible/.

MozReview-Commit-ID: W0wUPoQsVH
2016-04-20 21:28:30 -07:00
Kartikaya Gupta
d568ab3f2c Bug 1256727 - Back out the functional parts of cset 59a1ca7d784c now that we have a better fix using empty transactions. r=me
MozReview-Commit-ID: 7RmSyu9k64T
2016-04-18 17:21:17 -04:00
Kartikaya Gupta
1bb3da941b Bug 1263347 - When checking if displayport changes should schedule a paint, make sure to use the proper displayport. r=mstange
MozReview-Commit-ID: IVcNSbEiESa
2016-04-18 17:00:52 -04:00
Markus Stange
655c53f569 Back out bug 1164227, because bug 1236043 fixes the original problem in a better way.
MozReview-Commit-ID: F4bD1MvOWDR
2016-03-28 18:37:07 -04:00