Граф коммитов

222 Коммитов

Автор SHA1 Сообщение Дата
Mats Palmgren 0fbbb43980 Bug 1431232 - Treat break-before status as Incomplete for abs.pos. frames for now. r=dholbert 2018-01-23 00:00:04 +01:00
Emilio Cobos Álvarez 54036c1eca Bug 1386654: Handle the special case of a flex frame being the absolute containing block correctly from the CSS align code. r=dholbert
MozReview-Commit-ID: 4fJtyX55Ig9

--HG--
extra : rebase_source : 83af05b1f55fdaed9323dd1e7cea1cf11f56160f
2018-01-09 23:50:47 +01:00
Mats Palmgren 60e745ae58 Bug 1424528 part 1 - Remove nsDidReflowStatus::FINISHED 3rd arg in DidReflow calls (automated change). r=dholbert
MozReview-Commit-ID: CiK7pV0OsGr
2017-12-14 16:21:49 +01:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Mats Palmgren 25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Ting-Yu Lin d96347edaf Bug 1341009 - Add nsReflowStatus::IsEmpty() assertion to nsAbsoluteContainingBlock::ReflowAbsoluteFrame(). r=dholbert
The only caller (nsAbsoluteContainingBlock::Reflow()) declares
nsReflowStatus before passing it in. Add an assertion to record this
knowledge.

MozReview-Commit-ID: 8M3Oi38nDyG

--HG--
extra : rebase_source : 296239e3cdbf74e9dc19d3c89e7ecdb68b13e4d4
2017-09-14 11:33:36 +08:00
Ya-Chieh Wu edb40ab2be Bug 1379306 - Fix the wrong position when we calculate the position for position:absolute child. r=dbaron
Use |GetUsedBorder| instead of |GetComputedBorder|
when we calculate the position for position:absolute child.

MozReview-Commit-ID: 75gq5SFOVqT

--HG--
extra : rebase_source : 3b22920300f1054d3d2738e42c0347032bd9cecb
2017-08-07 20:31:00 +02:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Mats Palmgren 26214cbd6f bug 1369015 - Remove a useless do_QueryFrame() call. r=jfkthame
GetParent() already returns a nsContainerFrame* so there's no need to
do_QueryFrame that to a nsContainerFrame* !

MozReview-Commit-ID: B8CwGkUWIoT
2017-05-31 21:29:49 +02:00
Mats Palmgren 357e4b9560 bug 1368547 part 2 - Remove nsFrameManager/PresShell methods dealing with placeholders and introduce a nsIFrame::GetPlaceholderFrame() convenience method. r=jfkthame
MozReview-Commit-ID: GBUiUBqJxhQ
2017-05-31 21:29:49 +02:00
L. David Baron 9d25ba2b78 Bug 1367413 - Fix assertion that can occur when paginating abs-pos elements with a transform. r=mats
I confirmed that the test crashes in the crashtest harness without the
patch (although the harness doesn't exit!), whereas it passes with the
patch.

MozReview-Commit-ID: 37S6i1kvw37

--HG--
extra : transplant_source : %9F%A91%90%3F%93%1F%E5%B3%ACHf%8C%BD%BA%C9%12%97%83I
2017-05-25 16:21:20 -04:00
L. David Baron 7fd8f7b188 Bug 1365449 - Reflow absolutely positioned children when they need to be repaginated. r=mats
This fixes the failure of
layout/reftests/pagination/dynamic-abspos-overflow-01-cols.xhtml with
the primary patch in bug 1308876.

Since it is an independently testable failure, I'm posting it as a
separate bug.

Without the patch, both reftests fail to rewrap in response to the
dynamic change, and the inner dark blue absolutely positioned element
remains wrapped at the wrong position when the inner light blue
relatively positioned element rewraps.  (I tested this only outside of
the reftest harness, but that should be sufficient.)

I verified manually that the height conditions were correct by modifying
both reftests to add some padding and border to #relpos and margin to
#abspos, changing the height of #abspos so that it was either exactly at
or just above the threshold where reflow was needed, and using
GECKO_DISPLAY_REFLOW_RULES_FILE debugging to verify that the reflow of
the absolutely positioned element did or didn't happen as expected.

MozReview-Commit-ID: 6ISgSEYyMiN

--HG--
extra : transplant_source : %93%86%8Csr_L%83%F2OJ%DC%7F%3D%7D%BC%9C%A6%1F0
2017-05-20 10:15:26 -07:00
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
L. David Baron 86687429ea Bug 1347759 - Fix conditions under which we reflow absolutely positioned element due to size change of its container for everything other than horizontal LTR. r=jfkthame
I found this problem because I was debugging the failure of
layout/reftests/w3c-css/received/css-writing-modes-3/clearance-calculations-vrl-008.xht
with my patch for bug 1308876.  It was failing because the red reference
box that was intended to be covered up was being mispositioned leftwards
by the width of the scrollbar, since we were not reflowing it when we
decided that the viewport did not need scrollbars.  This patch fixes
that failure.

This led me to this bug, where
nsAbsoluteContainingBlock::FrameDependsOnContainer was incorrectly
testing conditions for when the values of 'top', 'right', 'bottom', and
'left' require reflow due to changes in the size of the containing
block.

The old code is incorrect in a number of cases, such as:
1. in RTL, with 'right: 100px', it will say that the frame does not
   depend on its container's width since 'right' (offset-inline-start)
   is a fixed offset and 'left' is 'auto'.  However, since the
   positioning is relative to the right edge, a change in container size
   does require that the absolutely positioned element be repositioned
   relative to the container's left edge.
2. In vertical-rl, again with 'right: 100px', it will make the same
   mistake, since 'right' (now offset-block-start) is a fixed offset.
   This is the case from the test I was debugging.
3. In vertical-rl with rtl direction and 'bottom: 100px', we will make
   the same mistake because 'bottom' (inline-start) is fixed and 'top'
   is 'auto', and we use 'bottom' rather than 'top'.

However, in cases (1) and (3) we actually avoid hitting the bug in these
simple-ish cases because ReflowInput::ShouldReflowAllKids() returns true
whenever IsIResize() is true, which means that
nsAbsoluteContainingBlock::Reflow doesn't even call
FrameDependsOnContainer.  However, FrameDependsOnContainer should still
do the right thing because it's needed for
nsAbsoluteContainingBlock::MarkSizeDependentFramesDirty, which is only
used (from nsBlockFrame) when we reflow again for clearance or for
interruptible reflow.  I haven't attempted to write a testcase for that
because it seems likely to require spending hours in the debugger trying
to trigger the right code.

This means that the only test that fails prior to the patch is
dynamic-offset-vrl-001.html, which exercises case (2), and also happens
to be the most similar to problem in clearance-calculations-vrl-008.xht.

This patch also makes the tests stricter so that we do optimize away
resizes in some cases where we're able to do so, such as
'left: 100px; right: auto' in RTL.  (Or, rather, we would if it weren't
for the IsIResize() in ShouldReflowAllKids().)

MozReview-Commit-ID: 8xm1AHC21oh

--HG--
extra : transplant_source : %06%B4%40%EB%A9%C8M%F3%99%80%A9%DE%1F%1E%90%D3%F1%04W.
2017-03-16 09:39:19 -07:00
Ting-Yu Lin 8f840dc923 Bug 775624 Part 22 - Remove NS_FRAME_COMPLETE. r=dholbert
This patch is written by the following script with some manual adjustment to
the comment in nsRubyTextContainerFrame.cpp and nsRubyFrame.cpp, and
nsColumnSetFrame's constructor.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "nsReflowStatus *([a-zA-Z0-9]*) = NS_FRAME_COMPLETE" "nsReflowStatus \1"
rename "([a-zA-Z0-9.*]*) *= NS_FRAME_COMPLETE;" "\1.Reset();"
rename "([a-zA-Z0-9.*]*) == NS_FRAME_COMPLETE" "\1.IsEmpty()"

MozReview-Commit-ID: 9tqQAHvdQex

--HG--
extra : rebase_source : 3119776946dc2c8350098b7bf9f3ceff29bdffb5
2017-02-14 17:55:48 +08:00
Ting-Yu Lin 19a2af3275 Bug 775624 Part 11 - Convert NS_MergeReflowStatusInto() to a method. r=dholbert
Also, remove NS_FRAME_TRUNCATED and NS_FRAME_REFLOW_NEXTINFLOW because both
are used only by NS_MergeReflowStatusInto().

MozReview-Commit-ID: LsPOji9j2e

--HG--
extra : rebase_source : 7cf1421c066f0f8df3e8402b84ae0f584cad2d11
2017-02-13 17:15:01 +08:00
Ting-Yu Lin b7c479e1c2 Bug 775624 Part 8 - Remove NS_FRAME_SET_OVERFLOW_INCOMPLETE. r=dholbert
This patch is written by the help of the following script.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "NS_FRAME_SET_OVERFLOW_INCOMPLETE\(\*([a-zA-Z0-9.*]*)\)" "\1->SetOverflowIncomplete()"
rename "NS_FRAME_SET_OVERFLOW_INCOMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.SetOverflowIncomplete()"

MozReview-Commit-ID: EJOIs84vwev

--HG--
extra : rebase_source : 59a5ac827f57e7a0e50910f5a813c44560baeb00
2017-02-11 23:18:04 +08:00
Ting-Yu Lin 99ebdf6cf3 Bug 775624 Part 4 - Remove NS_FRAME_IS_FULLY_COMPLETE. r=dholbert
This patch is written by the help of the following script.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "NS_FRAME_IS_FULLY_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsFullyComplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : 200639e836cebe26fd77cde21f478fd027e1725f
2017-02-11 22:38:48 +08:00
Ting-Yu Lin b31150930a Bug 775624 Part 3 - Remove NS_FRAME_IS_NOT_COMPLETE. r=dholbert
This patch is written by the help of the following script.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "NS_FRAME_IS_NOT_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsIncomplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : 412b60e7954118d8443ebf2a786046d7cd38c516
2017-02-11 22:17:26 +08:00
Daniel Holbert b48516cdb2 Bug 1269017 part 3 - [css-grid] Reduce scope of a mStaticPosIsCBOrigin check to *just* cover hypothetical-position calculation, and update comments. r=mats
Previously, I'd thought the "mStaticPosIsCBOrigin" flag was going to become
obsolete -- but now I've realized it's quite useful to avert mixup between the
coordinate space of the grid vs. the coordinate space of
grid-areas-acting-as-abspos-containing-blocks.

So, this patch clarifies/removes some stale comments about this flag, and also
pulls out some code that was unnecessarily in an "else" clause, so that it
happens regardless of whether this flag is set.

(Note: the InitAbsoluteConstraints changes are basically just code-reordering & deindentation.)

MozReview-Commit-ID: 9TFrOuldVBe
2016-11-08 16:30:00 -08:00
Daniel Holbert df60393385 Bug 1269017 part 1 - [css-grid] Adjust OffsetToAlignedStaticPos() to use correct alignment container for abpsos children of grid containers. r=mats
MozReview-Commit-ID: LItIGLH5GJP
2016-11-08 16:30:00 -08:00
Mats Palmgren b1c4b6d89a Bug 1313254 part 2 - [css-align] Change "last-baseline" to "last baseline" in layout/ (scripted change). r=dholbert 2016-11-05 02:57:07 +01:00
Daniel Holbert f3a0064ac4 Bug 1269046 part 10: Skip the normal margin-adding codepath for abspos frames that undergo CSS Box Alignment (which takes care of margins). r=mats
MozReview-Commit-ID: Ha0o1rwFzE9
2016-10-31 08:59:40 -07:00
Daniel Holbert 0d6dda2ff4 Bug 1269046 part 9: Add a flag to control whether CSSAlignUtils::AlignJustifySelf() expands "auto" margins. r=mats
MozReview-Commit-ID: I0UdEIfiOqX
2016-10-31 08:59:40 -07:00
Daniel Holbert 8a46fab5d0 Bug 1269046 part 8: Rewrite CSSAlignUtils::AlignJustifySelf to use a single "flags" arg instead of boolean args. r=mats
MozReview-Commit-ID: 5loE21U7FF6
2016-10-31 08:59:40 -07:00
Daniel Holbert 4c7bd3c17e Bug 1269046 part 5: If an abspos child's offset depends on CSS Box Alignment, ask nsContainerFrame for the alignment enum to use, and align with CSSAlignUtils. r=mats
Right now, this method has only one stub impl, in nsContainerFrame; a later
patch will add a more interesting (overriding) impl in nsFlexContainerFrame.

MozReview-Commit-ID: 3U3vTTX4vdm
2016-10-31 08:58:18 -07:00
Daniel Holbert ac46282aec Bug 1269046 part 2: Spin out a helper function to hold nsAbsoluteContainingBlock's code for resolving abspos offsets. r=mats
MozReview-Commit-ID: 5tvCIEhAsPH
2016-10-31 08:58:18 -07:00
Igor 175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Ting-Yu Lin 40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin 4053c4c028 Bug 1277129 Part 5c - Rename nsHTMLReflowMetrics to ReflowOutput. r=dbaron
This patch is generated by 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 "nsHTMLReflowMetrics" "ReflowOutput"

MozReview-Commit-ID: 2HBb7DkooH5

--HG--
extra : rebase_source : acfa442a6483772fcb5748dc6f5e7072e599032a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState to ReflowInput. r=dbaron
This patch is generated by 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 nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
Ting-Yu Lin d444310eb1 Bug 1277129 Part 1b - Rename nsHTMLReflowState.h/cpp to ReflowInput.h/cpp and fix #includes. r=dbaron
The #includes are fixed by 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 "nsHTMLReflowState\.h" "mozilla\/ReflowInput\.h"

MozReview-Commit-ID: FjwHA4YRHNv

--HG--
rename : layout/generic/nsHTMLReflowState.cpp => layout/generic/ReflowInput.cpp
rename : layout/generic/nsHTMLReflowState.h => layout/generic/ReflowInput.h
extra : rebase_source : e4215620717df436a51243cee689286cfabc7c71
2016-07-21 18:36:34 +08:00
Bogdan Postelnicu 6a85225ba3 Bug 1236920 - remvoed usless null check on aKidFrame in order to silence Coveirty warning. r=mwoodrow 2016-01-05 06:20:00 +01:00
Mats Palmgren 1d8b5ec5e7 Bug 1151243 part 3 - [css-grid] Add a generic nsHTMLReflowState::STATIC_POS_IS_CB_ORIGIN flag to place the static-position at the CB origin, and make nsAbsoluteContainingBlock use it in Grid containers where the placeholder is a child too. r=dholbert 2015-12-22 23:03:16 +01:00
Mats Palmgren cb6c791e80 Bug 1151243 part 2 - [css-grid] Add a eIsGridContainerCB flag for nsAbsoluteContainingBlock::Reflow to trigger Grid specific code (rather than checking GetType()). r=dholbert 2015-12-22 23:03:16 +01:00
Mats Palmgren 953043bd52 Bug 1151243 part 1 - Replace three bool params for nsAbsoluteContainingBlock::Reflow with a flag param (idempotent patch). r=dholbert 2015-12-22 23:03:16 +01:00
Jonathan Kew 8ebb1db8e5 Bug 1131451 part 2 - Respect the container height when converting vertical-RTL inline-direction coordinates. r=dholbert
* * *
Bug 1131451 part 2a - Remove hack for rtl-in-vertical-mode from ReflowAbsoluteFrame. r=dholbert
* * *
Bug 1131451 part 2b - Mark relative-overconstrained tests that now pass in vertical mode with rtl. r=dholbert
* * *
Bug 1131451 part 2c - Mark vertical border-collapse bevel tests that now pass. r=dholbert
* * *
Bug 1131451 part 2d - Remove partial rtl-in-vertical support from nsBidiPresUtils now that logical-coordinate classes handle it better. r=dholbert
* * *
Bug 1131451 part 2e - Remove hack for float positioning in vertical mode with dir=rtl. r=dholbert
* * *
Bug 1131451 part 2f - Mark vertical-mode float-in-rtl reftests that are now passing. r=dholbert
* * *
Bug 1131451 part 2g - Compute both dimensions of containerSize in nsFlexContainerFrame::DoLayout. r=dholbert
* * *
Bug 1131451 part 2h - Mark flexbox writing-mode tests that are now passing. r=dholbert
2015-07-16 10:08:05 +01:00
Jonathan Kew 4e6c40d7ea Bug 1131451 part 1 - Replace containerWidth with containerSize in logical-coordinate classes and APIs, frame classes, etc. r=dholbert 2015-07-16 10:07:57 +01:00
Daniel Holbert cb57b1ad8c Bug 1177925: Use range-based "for" loops for nsFrameList iteration, in various places in layout. r=tn 2015-06-29 13:02:21 -07:00
Jonathan Kew 6dbc322879 Bug 1079151 - patch 2 - Convert nsAbsoluteContainingBlock to use logical coordinates. r=smontagu 2015-06-05 08:47:09 +01:00
Simon Montagu 7f1b0db94c Bug 1147834: Use abstract coordinates in nsHTMLReflowState, r=jfkthame 2015-06-04 03:43:02 -07:00
Botond Ballo 2e2a504271 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : source : 7468f9a3aa03520a29e138d4df431f0b5d90967c
2015-05-26 14:33:55 -04:00
Phil Ringnalda 49dd872168 Back out 3 changesets (bug 1119980) for emulator-l bustage
CLOSED TREE

Backed out changeset 12ce98475c6e (bug 1119980)
Backed out changeset bdb8d05f8870 (bug 1119980)
Backed out changeset a68a18840492 (bug 1119980)
2015-05-25 18:48:51 -07:00
Botond Ballo 9934d127c1 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : rebase_source : 4e915a12ba662ed45788238a5f0a45533888bd92
2015-05-25 20:45:17 -04:00
Mats Palmgren ed9ed2d61a Bug 1148833 part 3 - Remove nsIFrame::WillReflow and add a non-virtual MarkInReflow method instead that sets NS_FRAME_IN_REFLOW. Call it at the start of Reflow(). r=roc 2015-03-29 22:38:40 +00:00
Mats Palmgren 22055216dd Bug 1107783 - part 1, [css-grid] Implement abs.pos. grid item placement and reflow. r=dholbert 2015-03-26 18:57:39 +00:00
Mats Palmgren 98fa65732a Bug 1102791 - Always return NS_FRAME_COMPLETE status from nsHTMLButtonControlFrame::Reflow. Don't create overflow container continuations unless the delegating frame has eCanContainOverflowContainers. r=roc 2014-11-24 16:42:31 +00:00
Simon Montagu c3b44c4dad Bug 789096 patch 9: use logical coordinates in nsHTMLReflowState available size. r=jfkthame 2014-07-24 01:28:46 -07:00