Added Gecko reftests because I don't know what the best place to put
them in WPT is, and caret rendering is kind of undefined, but...
Differential Revision: https://phabricator.services.mozilla.com/D229926
Added Gecko reftests because I don't know what the best place to put
them in WPT is, and caret rendering is kind of undefined, but...
Differential Revision: https://phabricator.services.mozilla.com/D229926
We were relying on editable text frames not being empty. We fixed that
on the previous patches but this caused editor d&d to break.
For now this preserves the selection behavior. In the future we should
look into removing the IsEmpty() condition or so, probably, or make it
more subtle.
Differential Revision: https://phabricator.services.mozilla.com/D229996
nsCSSPropertyIDSet::IsSubsetOf shows up as a significant chunk of painting. Turns out we can avoid that cost if MayHaveTransformAnimation is false, but its a little awkward because it's a bit seperated, so I included some asserts to make sure things stay in sync.
Differential Revision: https://phabricator.services.mozilla.com/D229284
In a lot of cases we go from frame/content, look up the id, then GetVisualToLayoutTransform looks up the content from the id. This is a waste. We should just pass in a content, and the one case that starts with an ViewID can look up the content to pass in since we were going to look up the content anyways.
The hashtable lookup of the content/id is showing up as biggest chunk the work in the event handling display list build that we do to handle synth mouse move events during sp3. And synth mouse moves have been identified as something we do that stands out as extra work.
Differential Revision: https://phabricator.services.mozilla.com/D228653
There are two tests;
helper_fission_empty_clip.html is for this bug (bug 1923513), there's an
element covering over an OOP iframe but it has an empty clip-path, thus any
input event is not interefered by the element.
helper_fission_unresolved_clip.html is to make sure that this code change
doesn't regress unresolved clip cases, it's similar to above case but with an
unresolved clip-path, thus the OOP iframe isn't rendered, any input element
isn't reached to the iframe.
Differential Revision: https://phabricator.services.mozilla.com/D228116
Seems like we should be doing this as a frame that is clipped out fully but requires two scroll frames to fully clip it is just as visible as a frame where one scroll frame fully clips it.
Differential Revision: https://phabricator.services.mozilla.com/D225442
I don't think this can happen, but if we hit the top of the in process frame tree here then we should check if it's visible cross process. This is what we do at the actual place where we can hit the top of the frame tree (just above here).
Differential Revision: https://phabricator.services.mozilla.com/D225441
We walk up the frame tree looking for scroll frames, and then transform from the initial frame to the currently found scroll frame. The problem is that doing that transform walks between the initial frame and the current scroll frame again to get the transform, each time, and that operation is kind of slow even if we weren't doing all this extra work.
So instead we use the transformed rect and the current scroll frame so we don't have to compute the transform over those frames again as we walk up the frame tree.
Differential Revision: https://phabricator.services.mozilla.com/D225440
When `PeekOffsetForCharacter` find a non-editable content, it should never
return the frame because user must want to move caret only in editable content
when the previous position is editable. Additionally, when a non-selectable
frame is skipped, caret will be moved enough, so it should not skip any editable
content. Finally, the found frame may cause a line break. Therefore, this
patch overwrites the result of `SelectablePeekReport::PeekOffsetForCharacter`
from `FOUND` to `CONTINUE_UNSELECTABLE` when non-editable content is found.
The remaining failures of the new WPT should be handled in bug 449685 because
they are caused by no frame for invisible preceding/trailing white spaces around
the block element boundary.
Depends on D223909
Differential Revision: https://phabricator.services.mozilla.com/D224183
We compute the size of non-replaced elements in `nsIFrame::ComputeSize()` and
replaced elements in `nsContainerFrame::ComputeSizeWithIntrinsicDimensions()`.
When computing a flex item's main-size, we need to skip applying min-main-size
and max-main-size at both functions.
While we still need to duplicate the code in both places, unifying the logic
should make the code easier to read and pave the way for unifying these
functions in the future.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D222905
Rename getCSSStyleRules now that it can return something else, and
change getCSSStyleRules_starting_style.html to cover this again.
Unfortunately the asserts in ServoStyleRuleMap.cpp no longer hold,
because the style attribute and other declarations are expected not to
show up there.
Differential Revision: https://phabricator.services.mozilla.com/D222856
That is, a definite max block-size and an auto block-size should not compute a
definite percentage basis in the block axis.
Note that we accidentally pass
`testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-017.html`.
After applying this patch, the test starts to fail, but it will be fixed in the
next part.
Differential Revision: https://phabricator.services.mozilla.com/D222230
Currently, only the grid container needs the containing block size to resolve
the transferred min and max sizes for `repeat()` function in
`nsGridContainerFrame::ComputeIntrinsicISize()`.
This patch is a preparation for Bug 1865438. `mContainingBlockSize` will be used
there, so it does not change any behavior yet.
Differential Revision: https://phabricator.services.mozilla.com/D221333
Rename `mPercentageBasis` to `mPercentageBasisForChildren` to clarify that the
percentage basis is intended for resolving the percentage sizes for child
frames.
Differential Revision: https://phabricator.services.mozilla.com/D221332
A percentage basis is needed to resolve percentage block size when computing
children's intrinsic inline size contributions. This is necessary for a child or
descendants with a preferred aspect-ratio so that the block size can transfer
through the aspect-ratio to become an intrinsic inline size.
The change in `nsFlexContainerFrame::ComputeIntrinsicISize()` is necessary to
keep us passing
`testing/web-platform/tests/css/css-flexbox/image-nested-within-definite-column-flexbox.html`.
The change in `nsPlaceholderFrame::AddFloatToIntrinsicISizeData()` is necessary
to keep us passing
`testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-dynamic-010.html`.
`GetISizeInfo()` in BasicTableLayoutStrategy.cpp is modified to pass table cell
frame's bsize as percentage basis. Otherwise,
`layout/reftests/bugs/522632-1.html` fails. This is our current behavior, but it
is bug 1461852.
Differential Revision: https://phabricator.services.mozilla.com/D219523
This patch changes the signature to `GetMinISize()`, `GetPrefISize()`,
`IntrinsicISize` by adding a helper struct as a preparation. Then we can just
add more data such as a percentage basis to the struct without altering the
signature in the future.
When passing `IntrinsicSizeInput` struct down to another helper method, we
generally just pass the original one if the method is computing the intrinsic
size of our own or our anonymous children. If the method is computing our
children's intrinsic contribution, we'll need to create a brand new
`IntrinsicSizeInput` for our children.
Differential Revision: https://phabricator.services.mozilla.com/D219521
A percentage basis is needed to resolve percentage block size when computing
children's intrinsic inline size contributions. This is necessary for a child or
descendants with a preferred aspect-ratio so that the block size can transfer
through the aspect-ratio to become an intrinsic inline size.
The change in `nsFlexContainerFrame::ComputeIntrinsicISize()` is necessary to
keep us passing
`testing/web-platform/tests/css/css-flexbox/image-nested-within-definite-column-flexbox.html`.
The change in `nsPlaceholderFrame::AddFloatToIntrinsicISizeData()` is necessary
to keep us passing
`testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-dynamic-010.html`.
`GetISizeInfo()` in BasicTableLayoutStrategy.cpp is modified to pass table cell
frame's bsize as percentage basis. Otherwise,
`layout/reftests/bugs/522632-1.html` fails. This is our current behavior, but it
is bug 1461852.
Differential Revision: https://phabricator.services.mozilla.com/D219523