author | Botond Ballo <botond@mozilla.com> |
Thu, 07 Nov 2013 19:36:59 -0500 | |
changeset 154620 | 57882166c5d4c3ae806b019f8c3e15b407500657 |
parent 154619 | 9f3212effb9f4519494bf94800f475e5e1157f3a |
child 154621 | 58605e9a6ea172088f4d14d7b5d6e887769a0c3a |
push id | 25650 |
push user | kwierso@gmail.com |
push date | Wed, 13 Nov 2013 00:34:32 +0000 |
treeherder | mozilla-central@777f73da73c7 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | tn |
bugs | 936277 |
milestone | 28.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -2306,16 +2306,32 @@ ScrollFrameHelper::BuildDisplayList(nsDi } nsDisplayListCollection scrolledContent; { DisplayListClipState::AutoSaveRestore clipState(aBuilder); if (usingDisplayport) { nsRect clip = displayPort + aBuilder->ToReferenceFrame(mOuter); + + // If we are using a display port, then ignore any pre-existing clip + // passed down from our parents, and use only the clip computed here + // based on the display port. The pre-existing clip would just defeat + // the purpose of a display port which is to paint regions that are not + // currently visible so that they can be brought into view asynchronously. + // Notes: + // - The pre-existing clip state will be restored when the + // AutoSaveRestore goes out of scope, so there is no permanent change + // to this clip state. + // - We still set a clip to the scroll port further below where we + // build the scroll wrapper. This doesn't prevent us from painting + // the entire displayport, but it lets the compositor know to + // clip to the scroll port after compositing. + clipState.Clear(); + if (mClipAllDescendants) { clipState.ClipContentDescendants(clip); } else { clipState.ClipContainingBlockDescendants(clip, nullptr); } } else { nsRect clip = mScrollPort + aBuilder->ToReferenceFrame(mOuter); nscoord radii[8];