Delete the "or 0 for no movement in that direction" from the CanAdjustEdges
document in nsMenuPopupFrame.h because the only caller in nsResizerFrame.cpp
never passes 0 to it.
MozReview-Commit-ID: 3A5A8O4MDn1
--HG--
extra : rebase_source : 3a961f9195d7887f8abb5c31ae9ec088f78a2626
Instead of manually adding (aLineLeft, aBlockStart) when creating a shape,
add Translate() to let the shapes implement their only way to move their
origin. FloatInfo could then move the shapes after they're created.
MozReview-Commit-ID: ApZBHnkng74
--HG--
extra : rebase_source : 10da425372e4e26b0da506059befc99e1c47a39d
These were fixed by https://github.com/servo/servo/pull/14922.
MozReview-Commit-ID: 3Ypfq0BmkIY
--HG--
extra : rebase_source : c32e69303826b65059dcae963ddce94f5f4c40f8
These were fixed by https://github.com/servo/servo/pull/14922.
MozReview-Commit-ID: H7s2lGJ8QYU
--HG--
extra : rebase_source : ef104630c7715f2f95539a3bb65e46a480ff2bdb
With this patch, we shall only maintain one version of the TransformText logic.
MozReview-Commit-ID: JAIksFVqvqf
--HG--
extra : rebase_source : 49ec749ae74f872e9749e026affe7f2e22db71f9
This patch is an implementation of CSS Text 3 - 4.1.1 Phase 1 Step 1.
According to the specification, if white space characters are considered
collapsible, they should be removed before applying segment break transformation
rules during the text transform.
In this patch, a refactoring of text transformation logic has been made. Every
run of consecutive document white space characters (spaces/tabs/segment breaks)
is collected first. Then, we could apply the white space processing rules
accordingly.
MozReview-Commit-ID: 1JStjFk5TBs
--HG--
extra : rebase_source : 0c3cd845f12de407558aae4db3f3c75343da7050
With this patch, we shall only maintain one version of the TransformText logic.
MozReview-Commit-ID: JAIksFVqvqf
--HG--
extra : rebase_source : 3187632d7162bba64994b793448314b8323e3d46
This patch is an implementation of CSS Text 3 - 4.1.1 Phase 1 Step 1.
According to the specification, if white space characters are considered
collapsible, they should be removed before applying segment break transformation
rules during the text transform.
In this patch, a refactoring of text transformation logic has been made. Every
run of consecutive document white space characters (spaces/tabs/segment breaks)
is collected first. Then, we could apply the white space processing rules
accordingly.
MozReview-Commit-ID: 1JStjFk5TBs
--HG--
extra : rebase_source : b7a81e08c026d25482dc35994f4595989c8b09c0
Trim trailing whitespaces for files that are touched in this bug:
gfxTextRun.h
gfxTextRun.cpp
nsTextFrame.cpp
nsCSSProps.cpp
MozReview-Commit-ID: FmiW2QiCoFv
--HG--
extra : rebase_source : cbc9ae8c3c4410d1fe79c027d4ccf11b45c8bd19
We have added a test case in bug 1197620 that finished animation with
fill:forwards on hidden elements restarts when the element gets visible, but
it did not catch this bug. We should have added a case without fill:forwards.
MozReview-Commit-ID: 5lfJkO3i9ME
--HG--
extra : rebase_source : f3c1d28bd8e58b28f17ec927dae7be1372d9c18e
I think there are three advantages of this change:
1. removes some dependencies from layout / painting code to pre-computed
value stuff in the style system;
2. makes it easier to audit usage of specific fields in style structs
(which is probably a side effect of the first one);
3. potentially improves performance since it doesn't go through the
unnecessary general logic in ExtractComputedValue.
Also, combined with the part before, we get a unified list for visited-
dependent properties so that we can ensure the assertion here and the
style difference calc code are consistent.
MozReview-Commit-ID: 5B9aN7CfRgI
--HG--
extra : rebase_source : ac80eaea2474b9ec4b47b1cc9a5bdd2e61f6ec4d
Two changes:
In nsIFrame::GetFrameFromDirection, detect frames that are in
a different anonynous content tree than 'this' and then just keep
traversing frames until we get one that isn't.
In nsFrame::GetLastLeaf: the old code did allow the first child frame
to be IsRootOfNativeAnonymousSubtree (it just checked siblings).
I think this was unintentional and that we should check the first
child too (and return its parent in that case, i.e. never return
something that is IsRootOfNativeAnonymousSubtree here).
These asserts appeared during the window when reftest harness assert
count failures were not correctly detected by the CI system. They are
expected to be fixed in followup commits.
MozReview-Commit-ID: JoXtI4c0SSF
circle() allows the user to define an empty flow area, so IsEmpty() needs to
be overridden.
The flow area defined by a shape needs to be clipped to the margin-box per
https://drafts.csswg.org/css-shapes/#relation-to-box-model-and-float-behavior
In the reftests, both clip-path and shape-outside uses the same value so
that it's easier to debug visually.
Add LogicalPoint::LineRelative() because we need to convert a point's I() to
the line-axis in nsFloatManager. LineRelative() differs from I() in all
'rtl' direction per
https://drafts.csswg.org/css-writing-modes-3/#logical-to-physical
MozReview-Commit-ID: FxQaFPrEQ73
--HG--
extra : rebase_source : 0d768002a38adbded2a0caa6d3e001eaaca3313d
Create ShapeInfo as a base class for implementing all the shapes. In this
design, we only need to create the correct subclass in FloatInfo's
constructor whenever shape-outside is used rather than manually branching on
StyleShapeSourceType and StyleBasicShape in all the methods like
LineRight(), LineLeft(), etc.
The concrete subclass of ShapeInfo could focus on implementing how its shape
influence the flow area by overriding the needed methods in ShapeInfo.
Move ComputeEllipseLineInterceptDiff() and XInterceptAtY() under the scope
of ShapeInfo so that they could be used by BoxShapeInfo and all the other
ShpapeInfo subclasses yet to come.
MozReview-Commit-ID: ETVc5FdGNha
--HG--
extra : rebase_source : 9a083ccd95fd7565112a45e30c15a91b97c7290f
Use move constructor for two reasons. 1) The copy constructor is needed only
when appending FloatInfo to mFloats, so using move constructor will likely
be more efficient if some of the member variables support move constructor.
2) Part 6 will added a UniquePtr member to FloatInfo, so using move
constructor becomes necessary.
Also change the return value of AddFloat() to void to simplify the code,
since all the other callers do not check the return value, and
BlockReflowInput::FloatAndPlaceFloat() only asserts in debug mode. I assume
it's safe to omit the OOM check.
MozReview-Commit-ID: GVbbsdBjr7b
--HG--
extra : rebase_source : e0f647e029278a5033bb9d6d780e73e32de460d3
Also removed unused format selectors and removed option to pass in a locale. Changed all callers to use new version.
MozReview-Commit-ID: Gq0b1c3C1eO
--HG--
rename : intl/locale/unix/nsDateTimeFormatUnix.cpp => intl/locale/DateTimeFormatUnix.cpp
extra : source : 7e747433d1c9fae8a0acb4090f61335fcc165e4c
circle() allows the user to define an empty flow area, so IsEmpty() needs to
be overridden.
The flow area defined by a shape needs to be clipped to the margin-box per
https://drafts.csswg.org/css-shapes/#relation-to-box-model-and-float-behavior
In the reftests, both clip-path and shape-outside uses the same value so
that it's easier to debug visually.
Add LogicalPoint::LineRelative() because we need to convert a point's I() to
the line-axis in nsFloatManager. LineRelative() differs from I() in all
'rtl' direction per
https://drafts.csswg.org/css-writing-modes-3/#logical-to-physical
MozReview-Commit-ID: FxQaFPrEQ73
--HG--
extra : rebase_source : 0d768002a38adbded2a0caa6d3e001eaaca3313d
Create ShapeInfo as a base class for implementing all the shapes. In this
design, we only need to create the correct subclass in FloatInfo's
constructor whenever shape-outside is used rather than manually branching on
StyleShapeSourceType and StyleBasicShape in all the methods like
LineRight(), LineLeft(), etc.
The concrete subclass of ShapeInfo could focus on implementing how its shape
influence the flow area by overriding the needed methods in ShapeInfo.
Move ComputeEllipseLineInterceptDiff() and XInterceptAtY() under the scope
of ShapeInfo so that they could be used by BoxShapeInfo and all the other
ShpapeInfo subclasses yet to come.
MozReview-Commit-ID: ETVc5FdGNha
--HG--
extra : rebase_source : 9a083ccd95fd7565112a45e30c15a91b97c7290f
Use move constructor for two reasons. 1) The copy constructor is needed only
when appending FloatInfo to mFloats, so using move constructor will likely
be more efficient if some of the member variables support move constructor.
2) Part 6 will added a UniquePtr member to FloatInfo, so using move
constructor becomes necessary.
Also change the return value of AddFloat() to void to simplify the code,
since all the other callers do not check the return value, and
BlockReflowInput::FloatAndPlaceFloat() only asserts in debug mode. I assume
it's safe to omit the OOM check.
MozReview-Commit-ID: GVbbsdBjr7b
--HG--
extra : rebase_source : e0f647e029278a5033bb9d6d780e73e32de460d3
This patch makes ForceBreak() partially clear floats according to the
break type of the coming block.
MozReview-Commit-ID: 71Gl9lBoTJ5
--HG--
extra : rebase_source : 5ca01565f607241df0c63a7cd64c35ac7ff7648f
This patch is to prevent any new callers of this API, since we can now rely on
the new frame state bit (NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX) to test for this.
MozReview-Commit-ID: BONaqPC30Cn
--HG--
extra : rebase_source : 7e4bf712d6ebd23efae5495e4e6c130cd1dba8cb
Note that at the callsites in nsCSSFrameConstructor.cpp, we have to also check
the frame type (since the frame state bit is in a range of bits whose meaning
differs depending on frame type). The first change in this patch is the
addition of a convenience fucntion that checks both the frame type as well as
the frame state bit.
MozReview-Commit-ID: DEOThTX5NAO
--HG--
extra : rebase_source : 95e86eec663b3ef2e7bb86214871fcd3ea86057c
Notes:
* In CSSAlignUtils.h, I'm just adding a forward-decl for a type used there.
* RubyUtils.h needs to #include nsIFrame.h -- a forward-declare won't
suffice -- because it makes a nsIFrame method-call ("aFrame->GetType()").
* ScrollSnap.h uses the "Maybe" type and a unit defined in
nsIScrollableFrame.h; hence it needs both of those headers.
MozReview-Commit-ID: KuhJVh9RTjZ
--HG--
extra : rebase_source : 062c1abfe9a1efeb7e241f38302c140075d2ae88
These newly-included headers' types are all used directly in the affected files.
MozReview-Commit-ID: 5NEA1QhSJKN
--HG--
extra : rebase_source : 3a9244fcb2a074df1c929de800ddd6cbc1f730e8
(The only reason this isn't triggering a compile error is due to .cpp files'
"using namespace mozilla" getting haphazardly shared via unified builds.)
MozReview-Commit-ID: 1zhJueMWOav
--HG--
extra : rebase_source : d08f18573d823968f654491e61428aa70a4c217c
This adds 2 "using namespace mozilla" (to provide various types),
and 2 "using namespace mozilla::gfx" (to provide mozilla::gfx::DrawTarget).
MozReview-Commit-ID: 2bXbMlr4Dbn
--HG--
extra : rebase_source : 9884419f08529469f23e3fc306ce6e4c57640f0d
The class definition (in the header file) is already inside the namespace. But
the method implementations are not (until now), and they've only been compiling
successfully thanks to a "using namespace mozilla" that this file was picking
up from another .cpp file, via unified builds.
MozReview-Commit-ID: ImRBpAVA0en
--HG--
extra : rebase_source : 291e2777187ef9af17e17eecc5e48eb27dd111ec
circle() allows the user to define an empty flow area, so IsEmpty() needs to
be overridden.
The flow area defined by a shape needs to be clipped to the margin-box per
https://drafts.csswg.org/css-shapes/#relation-to-box-model-and-float-behavior
In the reftests, both clip-path and shape-outside uses the same value so
that it's easier to debug visually.
Add LogicalPoint::LineRelative() because we need to convert a point's I() to
the line-axis in nsFloatManager. LineRelative() differs from I() in all
'rtl' direction per
https://drafts.csswg.org/css-writing-modes-3/#logical-to-physical
MozReview-Commit-ID: FxQaFPrEQ73
--HG--
extra : rebase_source : 02b4eafdff42477ef2c69d604a1650db01f954e4
Create ShapeInfo as a base class for implementing all the shapes. In this
design, we only need to create the correct subclass in FloatInfo's
constructor whenever shape-outside is used rather than manually branching on
StyleShapeSourceType and StyleBasicShape in all the methods like
LineRight(), LineLeft(), etc.
The concrete subclass of ShapeInfo could focus on implementing how its shape
influence the flow area by overriding the needed methods in ShapeInfo.
Move ComputeEllipseLineInterceptDiff() and XInterceptAtY() under the scope
nsFloatManager so that they could be used by BoxShapeInfo and all the other
ShpapeInfo subclasses yet to come.
MozReview-Commit-ID: ETVc5FdGNha
--HG--
extra : rebase_source : c73b0d0be2350db3eedb61b565de194842352ba1
Use move constructor for two reasons. 1) The copy constructor is needed only
when appending FloatInfo to mFloats, so using move constructor will likely
be more efficient if some of the member variables support move constructor.
2) Part 6 will added a UniquePtr member to FloatInfo, so using move
constructor becomes necessary.
Also change the return value of AddFloat() to void to simplify the code,
since all the other callers do not check the return value, and
BlockReflowInput::FloatAndPlaceFloat() only asserts in debug mode. I assume
it's safe to omit the OOM check.
MozReview-Commit-ID: GVbbsdBjr7b
--HG--
extra : rebase_source : 4765bbcf5c2533845bd8f7fb00117983429a622e
This patch was written with the help of the following script. Also, manually
add mozilla qualifier to the enum values in nsStyleCoord.h, gfxRect.h, and
Types.h to make it build.
function rename() {
find .\
-type f\
! -path "./obj*"\
! -path "./.git"\
! -path "./.hg"\
\( -name "*.cpp" -or\
-name "*.h" \)\
-exec sed -i -e "s/$1/$2/g" "{}" \;
}
rename "NS_SIDE_TOP" "eSideTop"
rename "NS_SIDE_RIGHT" "eSideRight"
rename "NS_SIDE_BOTTOM" "eSideBottom"
rename "NS_SIDE_LEFT" "eSideLeft"
MozReview-Commit-ID: 9T0ORsqM6nP
--HG--
extra : rebase_source : 884ad96104c6e9cf6c8b3145d2d3a071ecccfe6a
This patch is written with the help of the following script.
function rename() {
find .\
-type f\
! -path "./obj*"\
! -path "./.git"\
! -path "./.hg"\
\( -name "*.cpp" -or\
-name "*.h" \)\
-exec sed -i -e "s/$1/$2/g" "{}" \;
}
rename "css::Side" "Side"
MozReview-Commit-ID: DPV6vivpPUp
--HG--
extra : rebase_source : 9c4f66dc9d2b26c89a4517fba4ff9c5db413411b
This patch is just renames. No logic change for the function.
MozReview-Commit-ID: K7w0YL3G3gu
--HG--
extra : rebase_source : d72ecdcb4d4455f4950c8673c81fbfc7c1b4f54c
The tests cases are designed based on the integer solution to the ellipse
equation (x/a)^2 + (y/b)^2 = 1, where x=36, y=32, a=60, b=40.
MozReview-Commit-ID: De2fXcb6ypP
--HG--
extra : rebase_source : a64f490ff41c020b84025266c0c255d93a158eea
We need to consider the case when only one of the four corner radius is
specified. The two reftests are added to test 'border-top-right-radius' and
'border-bottom-right-radius', respectively.
MozReview-Commit-ID: De2fXcb6ypP
--HG--
extra : rebase_source : 51da04a7a7d60d580b46d9ac8ed4bfd7e9666766
According to the spec, 6.4. Abstract-to-Physical Mappings,
line-left/line-right are equal to inline-start/inline-end when the direction
is the same. So we should use IsBlockLTR() instead of IsLineInverted().
https://drafts.csswg.org/css-writing-modes-3/#logical-to-physical
MozReview-Commit-ID: 7onE0SuHtdj
--HG--
extra : rebase_source : df0083ed7e28469a2343a8607840585e93502b80
This is behind a pref and not enabled by default yet.
MozReview-Commit-ID: HKbP02PkdI9
--HG--
extra : rebase_source : 3f724f12d467dfb6e3ac1c44841e8e452a7d4b7e
This is the bulk of the changes.
- DisplayItemScrollClip is removed. Instead, we will have 1) ActiveScrolledRoot
and 2) DisplayItemClipChain.
- ActiveScrolledRoot points to a scroll frame and allows traversing up the
scroll frame chain.
- DisplayItemClipChain is a linked list of clips, each clip being associated
with the ActiveScrolledRoot that moves this clip.
- Each display item has an ActiveScrolledRoot and a clip chain.
- nsDisplayItem::GetClip returns the item of the clip chain that scrolls with
the item's ASR. The separation between "regular clip" and "scroll clips"
mostly goes away.
- Tracking clips in the display list builder's clip state happens very
similarly to how regular clips used to be tracked - there's a clip chain for
content descendants and a clip chain for containing block descendants. These
clip chains are intersected to create the combined clip chain.
- There are strict rules for the ASR of a container item: A container item's
ASR should be the innermost ASR which the item has finite clipped bounds with
respect to.
- At some point in the future, ASRs and AGRs should be reunified, but I haven't
done that yet, because I needed to limit the scope of the change.
MozReview-Commit-ID: KYEpWY7qgf2
--HG--
extra : rebase_source : c727f6300a35463750639e165bfa37374c06b851
With the ActiveScrolledRoot changes, we will need to set up different state on
the display list builder prior to creating the nsDisplayBackgroundImage item.
MozReview-Commit-ID: CgeffVPccfj
--HG--
extra : rebase_source : e2e1481a2e9df8becf56b969f151915694d62a8d
The class ViewportFrame doesn't have ns-prefix, so it's better to drop the
ns-prefix in the file names to avoid confusion.
MozReview-Commit-ID: 8Jrmfzb3tVR
--HG--
rename : layout/generic/nsViewportFrame.cpp => layout/generic/ViewportFrame.cpp
rename : layout/generic/nsViewportFrame.h => layout/generic/ViewportFrame.h
extra : rebase_source : d2c6a80275d696a2886983a4bbb46821784c7fe6
The class PresShell doesn't have ns-prefix, so it's better to drop ns-prefix
in the file names to avoid confusion.
MozReview-Commit-ID: IljxsF5CVjh
--HG--
rename : layout/base/nsPresShell.cpp => layout/base/PresShell.cpp
rename : layout/base/nsPresShell.h => layout/base/PresShell.h
extra : rebase_source : e73a6873f360a7223d87bd22d9854fc9603c499f
Since the line direction affects the interpretation of float right or left,
we should check aWM has the same line direction as mWritingMode. And this
also guarantees that float added by AddFloat() has the same line direction
as when querying the available space via GetFlowArea().
MozReview-Commit-ID: FGxVFbo910g
--HG--
extra : rebase_source : 5bcf42fe88d3e03417f65565fa9252d6f1eb5acf
For some stretched items, we override the computed height of the input for
measuring reflows, which may change the ascent and height result.
Just use that as a key for the reflow result cache too.
MozReview-Commit-ID: 9NyObfVucnC