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

44 Коммитов

Автор SHA1 Сообщение Дата
L. David Baron 82aa75776d Bug 1236745 - Fix infinite loop resulting from block formatting context entering resize oscillation due to considering floats over its whole height when sizing it. r=dholbert
What's happening here is that we enter an infinite loop by oscillating
between two states.  The code assumes that (a) the available space will
never grow, only stay the same or shrink, and (b) that we should break
out of the loop if it stays the same.  This also means we hit the
assertion about the available space growing every other time through the
loop.

This is in the inner loop in nsBlockFrame::ReflowBlockFrame that was
introduced in https://hg.mozilla.org/mozilla-central/rev/80ef9bb2c2e9 .

The problem is fundamentally a logic error in that code.  The makes the
assumption that if you reduce the width available to a block formatting
context or replaced block-level element, its height does not shrink.
(The "replaced block" (really block formatting context) in this case, as
in the original testcase, is a scroll frame.  I didn't debug the
original testcase enough to figure out what caused its sizing
characteristics, although a percentage-width image does seem like the
most likely candidate.)

Without the patch, the reftest test (but not reference) hangs, as does
the semi-simplified test in the bug (given a narrow window).

With the patch, neither the semi-simplified test in the bug nor the
reference hangs, and the reftest passes.

--HG--
extra : commitid : APy8PfXlvvz
2016-02-04 09:41:44 +11:00
Jonathan Kew e735d0520a Bug 1122918 - Put the logical values for 'float' and 'clear' behind a pref, and enable them only on nightly builds and for B2G. r=heycam 2015-11-10 09:07:01 +00:00
Jonathan Kew c4002c4144 Bug 1122918 - Add reftests using clear:inline-{start,end} values. r=heycam 2015-09-18 16:25:27 +01:00
Jonathan Kew 5cb2b4ceea Bug 1122918 - Part 3 - Use the resolved physical values of 'float' and 'clear' properties during layout. r=heycam 2015-09-18 16:25:21 +01:00
Jonathan Kew b2b40026ff Bug 1122918 - Reftest for inline-start/end values of the 'float' property. r=heycam 2015-09-18 16:25:02 +01:00
L. David Baron ad95cf903e Bug 1207157 patch 2 - Stop caring about a replaced element's margin-inline-end when determining whether it fits next to floats. r=jfkthame
The change to the 427129-table-caption test was just to make the
reference match the test.

The change to the other 427129 tests was duplicating the test that
failed, adjusting the reference for one version of it (no longer pushed
down), and testing an alternative pushed-down case for the other
version.

It's not clear to me how to test that that
1062963-floatmanager-reflow.html still tests what it originally tested,
given the code change that's happened since.

--HG--
extra : commitid : 178ok0G1NFo
2015-09-27 02:19:14 -07:00
L. David Baron f65fb08529 Bug 1207157 patch 1 - Add reftest. r=jfkthame
--HG--
extra : commitid : GiLfGyiuizo
2015-09-27 02:19:14 -07:00
Jonathan Kew 81bf9c5630 Bug 1193519 pt 9 - Reftests with floats in writing-mode: sideways-lr. r=dholbert
--HG--
rename : layout/reftests/floats/float-in-rtl-vlr-1-ref.html => layout/reftests/floats/float-in-rtl-slr-1-ref.html
rename : layout/reftests/floats/float-in-rtl-vlr-1a.html => layout/reftests/floats/float-in-rtl-slr-1a.html
rename : layout/reftests/floats/float-in-rtl-vlr-1b.html => layout/reftests/floats/float-in-rtl-slr-1b.html
rename : layout/reftests/floats/float-in-rtl-vlr-1c.html => layout/reftests/floats/float-in-rtl-slr-1c.html
rename : layout/reftests/floats/float-in-rtl-vlr-1d.html => layout/reftests/floats/float-in-rtl-slr-1d.html
rename : layout/reftests/floats/float-in-rtl-vlr-2-ref.html => layout/reftests/floats/float-in-rtl-slr-2-ref.html
rename : layout/reftests/floats/float-in-rtl-vlr-2a.html => layout/reftests/floats/float-in-rtl-slr-2a.html
rename : layout/reftests/floats/float-in-rtl-vlr-2b.html => layout/reftests/floats/float-in-rtl-slr-2b.html
rename : layout/reftests/floats/float-in-rtl-vlr-2c.html => layout/reftests/floats/float-in-rtl-slr-2c.html
rename : layout/reftests/floats/float-in-rtl-vlr-2d.html => layout/reftests/floats/float-in-rtl-slr-2d.html
rename : layout/reftests/floats/float-in-rtl-vlr-3-ref.html => layout/reftests/floats/float-in-rtl-slr-3-ref.html
rename : layout/reftests/floats/float-in-rtl-vlr-3a.html => layout/reftests/floats/float-in-rtl-slr-3a.html
rename : layout/reftests/floats/float-in-rtl-vlr-3b.html => layout/reftests/floats/float-in-rtl-slr-3b.html
rename : layout/reftests/floats/float-in-rtl-vlr-3c.html => layout/reftests/floats/float-in-rtl-slr-3c.html
rename : layout/reftests/floats/float-in-rtl-vlr-3d.html => layout/reftests/floats/float-in-rtl-slr-3d.html
rename : layout/reftests/floats/float-in-rtl-vlr-4-ref.html => layout/reftests/floats/float-in-rtl-slr-4-ref.html
rename : layout/reftests/floats/float-in-rtl-vlr-4a.html => layout/reftests/floats/float-in-rtl-slr-4a.html
rename : layout/reftests/floats/float-in-rtl-vlr-4b.html => layout/reftests/floats/float-in-rtl-slr-4b.html
rename : layout/reftests/floats/float-in-rtl-vlr-4c.html => layout/reftests/floats/float-in-rtl-slr-4c.html
rename : layout/reftests/floats/float-in-rtl-vlr-4d.html => layout/reftests/floats/float-in-rtl-slr-4d.html
2015-09-24 10:23:35 +01:00
L. David Baron 119b557460 Bug 538194 patch 2 - Redo block reflow below floats when the height of a block that does not intersect floats pushes it into the way of other floats. r=roc
This adds an additional retry loop in block reflow that we can only
trigger when reflowing a block formatting context (replacedBlock
non-null).  It can retry in two different ways, either with a narrower
width but at the same vertical position (when
ReplacedBlockFitsInAvailSpace is still true) or at a new vertical
position (which is treated as a form of clearance).

Fortunately we don't have to worry about margins collapsing *through*
such a boundary since we're dealing with a new block formatting context.

Note that Chromium passes all of the new bfc-displace-* tests, although
it moves the block formating context down unnecessarily in
bfc-shrink-1.html (which we do neither before nor after the patch),
though agrees with the width we have after the patch (but not before the
patch).

--HG--
extra : commitid : FgDc4hjTxHp
2015-08-02 21:03:09 -07:00
L. David Baron dc94df9c46 Bug 478834 - Record that we need to look for clearance if we encounter a block that might need to be pushed down for intersecting floats (i.e., one that establishes a BFC). r=roc
Without this change, nsBlockFrame::ReflowBlockFrame will fail to have
mayNeedRetry true, which means that it won't set
blockHTMLRS.mDiscoveredClearance, which means that on a descendant
replaced block we will fail to fall into any of the cases that call
ClearFloats.  This change will cause us to hit the first ClearFloats
call and discover the need for clearance.

I tested locally that the new reftest fails without the patch and passes
with the patch.
2015-07-27 20:23:56 -07: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 e4abf3e07a Bug 1182008 - Fix inconsistencies between testcases and reference files in (currently-failing) vertical float-in-rtl reftests. r=smontagu 2015-07-09 19:50:30 +01:00
Andrew Comminos 065394444c Bug 1170158 - Apply GTK2 reftest exceptions to GTK3. r=karlt 2015-06-02 13:47:00 -04:00
Jonathan Kew 412e118c03 Bug 1167930 - Handle direction:rtl in vertical modes when converting a LogicalMargin to physical. r=smontagu 2015-05-28 18:29:07 +01:00
Jonathan Kew cddb2c2354 Bug 1164852 patch 2 - Remove irrelevant position:relative from all the float-in-rtl-* testcases, too. rs=smontagu 2015-05-16 12:36:25 +01:00
Jonathan Kew 3ba85e992b Bug 1164852 patch 1 - Rewrite reference files for float-in-rtl-* reftests to avoid the use of position:relative. r=smontagu 2015-05-16 12:36:22 +01:00
Jonathan Kew a31e645b09 Bug 1162485 - Ensure the vertical-text.enabled pref is set for reftests that involve vertical writing modes. r=smontagu 2015-05-11 11:35:40 +01:00
Simon Montagu 38fee71eb0 Tests for bug 1150614, r=jfkthame 2015-05-03 01:33:31 -07:00
Jonathan Kew b52d9eb75f Bug 1157691 - Explicitly enable writing-mode support for reftests that require it. r=smontagu 2015-04-27 09:36:01 +01:00
Ryan VanderMeulen 8819aa2b6e Bug 1141867 - Add OSX 10.10 fuzz to the newly-added tests. a=merge
--HG--
extra : source : e96da160129953bebacc8e66bc8b6b178ab3fc09
extra : amend_source : ece231f919bf21cc4a3718b3066eebe868babb9b
2015-04-21 13:54:07 -04:00
Jonathan Kew 3c2c57d5cb Bug 1141867 - patch 3 - Reftests for contiguous orthogonal floats. r=smontagu 2015-04-09 14:40:54 +01:00
Wes Kocher 9becf2d33f Backed out 3 changesets (bug 1141867) for reftest orange CLOSED TREE
Backed out changeset 8dcfc3ace301 (bug 1141867)
Backed out changeset aeaa345b9aeb (bug 1141867)
Backed out changeset b1091955192c (bug 1141867)
2015-04-20 14:12:41 -07:00
Jonathan Kew 73be2c9a7d Bug 1141867 - patch 3 - Reftests for contiguous orthogonal floats. r=smontagu 2015-04-09 14:40:54 +01:00
L. David Baron 79853b7624 Bug 1146145 - Revert previous fix and give the tests position:relative so they have the same z-ordering as the references. 2015-03-22 12:53:09 -07:00
L. David Baron f3e1c17d82 Bug 1146145 - Give references z-index:-1 so that they have the same z-ordering characteristics as the tests, for the case when edges of the text overlap the floats.
--HG--
extra : transplant_source : %13%292G%E7%28%97%12%80%A4%EE%1E%9C%E9q%E9%0F%AEXW
2015-03-22 10:51:08 -07:00
Simon Montagu 28b9e2ff78 Mark the failing reftests from bug 1114329 as passing (fixed by bug 1143218). r=jfkthame 2015-03-22 11:44:48 +02:00
Jonathan Kew b42aa70b5d Bug 1114329 - Reftests for floats within blocks of varying width and directionality. r=smontagu 2015-02-18 12:25:46 +00:00
Jonathan Kew cb01fc326c Reftest for bug 1114329, r=smontagu 2014-12-22 02:28:20 -08:00
CJKu 9691cf3136 Bug 1000722 - Rollback close reftest in bug 981477. r=ahal 2014-06-24 10:20:00 -04:00
Vincent Chen c53b5f77a8 Bug 981477 - Disable B2G emulator reftests that fail oop, r=ahal 2014-05-23 15:56:15 -04:00
Corey Ford e7787542d4 Bug 898797 - Reftests for relatively positioned floats. r=dholbert 2013-07-29 18:34:05 -07:00
Phil Ringnalda 4a7994abd0 Bug 815612 - annotate Linux fuzziness of float-outside-block-push.html 2013-02-23 19:15:17 -08:00
Ehsan Akhgari 2ec85750e6 Bug 775350 - Update the overflow areas of the lines containing floats based on the overflow areas of the floats in the containing block; r=dbaron 2012-11-06 12:11:50 -05:00
Ehsan Akhgari 4b84fe41d5 Bug 659828 - Part 1: Apply table margins to the outer table frame instead of the inner table frame (also fixes bug 87277); r=dbaron
Outer table frames act as CSS2.1 table wrapper boxes.  We used to lay them out
without taking their margins into the account, which meant that their width was
always equal to the available width.  This breaks horizontal positioning of
absolutely positioned kids of a table frame.

The main purpose of this patch is to apply the margins of tables to their outer
frame, instead of the inner frame.  This means that the inner table frame will
always have a zero margin, which means that a lot of the stuff which used to
rely on the fact that table margins are applied to the inner frame need to
change.

In particular, in order to get the computed margins of a table, we used to query
the inner table frame, and this patch corrects that.  Also, when shrink wrapping
tables, we used to not take the margins of the inner table frame into account,
which is fixed by this patch too.  nsBlockReflowState::
ComputeReplacedBlockOffsetsForFloats also needed to be changed to read the
margin values from the outer frame too.

Also, as part of this patch, we start to respect the CSS2.1 margin model for
captions on all sides.  This means that in particular, the top/bottom margins on
the top-outside and bottom-outside captions will not be collapsed with the
top/bottom margins of the table, and that the margins of the caption element
contribute to the width and height of the outer table frame.  The
427129-table-caption reftest has been modified to match this new behavior.

Another side effect of this bug is fixing bug 87277, and the reftests for that
bug are marked as passing in this patch.
2011-05-31 19:02:56 -04:00
L. David Baron 8f57b82a3a Add bug number for some float test known failures. a2.0=tests 2010-12-03 12:31:24 -08:00
L. David Baron aaf94f0616 Add bug number for test failure. 2010-10-21 20:37:49 -07:00
L. David Baron 238beaa031 Subtract the correct border+padding. (Bug 546048) r=roc 2010-04-04 14:46:15 -07:00
L. David Baron 84b554e2fb Add comment to reftest manifest. CLOSED TREE 2010-03-24 16:03:53 -04:00
L. David Baron c74da7f268 Add CSS 2.1 test suite metadata for float reftests. 2010-01-27 15:46:48 -08:00
Jesse Ruderman 0152b9f7c9 Add reftests (bug 310451, bug 398681, bug 407419, bug 409125, bug 429974) 2009-08-27 13:50:58 -07:00
L. David Baron 803e2f944a Fix bug 25888 for inline frames other than bullets: redo line reflow when the line's height pushes it into the way of other floats. (Bug 25888) r+sr=roc 2009-05-20 07:21:34 -04:00
L. David Baron 32e1b73dbd More tests for outside cases for rule 3. 2009-01-10 08:28:15 -08:00
L. David Baron 03885eb173 Fix tests to match what they should have been testing, and fix nsFloatManager behavior to match what the old code actually did as far as considering floats at the side that did not protrude into the containing block. (Bug 472252) r+sr=roc 2009-01-06 15:21:00 -08:00
L. David Baron da31897066 Add some reftests for float behavior. 2009-01-04 14:52:38 -05:00