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

25 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan Henning 5ced7d8244 Bug 1428670 - Part 3: Store the effective container ISize within the FontInflationData. r=dbaron
When one of the two factors governing the effective container width for font
inflation changes, we need to mark all affected frames as dirty.
While the visible area commonly changes because of viewport changes and we can
catch those through the check for ISize resizes of the top-level frame
("!mFrame->GetParent() && isIResize"), it still seems nicer to move calculation
of the effective container width into the FontInflationData itself, especially
since the effective container width calculation in nsLayoutUtils is the only
consumer of the NCAISize currently stored by the FontInflationData.

That way
- we can be sure that really all changes of the visible width will correctly
  mark all affected frames as dirty
- can avoid repeatedly recalculating the effective container width
- can also detect the cases where the effective container width actually remains
  the same after a change in one of its input factors and skip forcing a full
  dirty reflow for all descendants just because of font inflation.

While the code in nsLayoutUtils was technically always using the writing
mode (horizontal/vertical) of each individual frame for determining which
dimension of the visible size should be used for clamping, just using the
writing mode of the respective flow root should be enough, since each change in
the writing mode should create a new flow root.

This assumption should already hold today because
1. as per the Writing Modes CSS spec, a change in writing mode compared to its
   parent means that the affected block cannot be purely "inline", but at most
   "inline-block".
2. Generally, any non-inline frame will be marked as a font inflation container.
3. Any block frame whose writing direction doesn't match its parent will be a
   block formatting context, which implies NS_BLOCK_FLOAT_MGR.
4. Any block frame that has both NS_BLOCK_FLOAT_MGR set and is a font inflation
   container will also become a font inflation flow root.
but because this chain of reasoning is not the most direct, we also add a
corresponding assertion to better catch any potential bugs here.

Differential Revision: https://phabricator.services.mozilla.com/D5578

--HG--
extra : moz-landing-system : lando
2018-10-02 15:23:17 +00:00
Bogdan Tara 80119cd08f Backed out 5 changesets (bug 1428670, bug 1380830) for perma failing tests/layout/generic/crashtests/742602.html
Backed out changeset f38ac02fefac (bug 1380830)
Backed out changeset 1bf6b5fac1f9 (bug 1428670)
Backed out changeset faec1cb8ab5d (bug 1428670)
Backed out changeset 34736c8507e6 (bug 1428670)
Backed out changeset 6ecb75be4a61 (bug 1428670)
2018-09-29 23:51:23 +03:00
Jan Henning 6a39077166 Bug 1428670 - Part 3: Store the effective container ISize within the FontInflationData. r=dbaron
When one of the two factors governing the effective container width for font
inflation changes, we need to mark all affected frames as dirty.
While the visible area commonly changes because of viewport changes and we can
catch those through the check for ISize resizes of the top-level frame
("!mFrame->GetParent() && isIResize"), it still seems nicer to move calculation
of the effective container width into the FontInflationData itself, especially
since the effective container width calculation in nsLayoutUtils is the only
consumer of the NCAISize currently stored by the FontInflationData.

That way
- we can be sure that really all changes of the visible width will correctly
  mark all affected frames as dirty
- can avoid repeatedly recalculating the effective container width
- can also detect the cases where the effective container width actually remains
  the same after a change in one of its input factors and skip forcing a full
  dirty reflow for all descendants just because of font inflation.

While the code in nsLayoutUtils was technically always using the writing
direction of each individual frame for determining which dimension of the
visible size should be used for clamping, just using the writing direction of
the respective flow root should be enough, since each change in writing
direction should create a new flow root.

This assumption should already hold today because
1. as per the Writing Modes CSS spec, a change in writing mode compared to its
   parent means that the affected block cannot be purely "inline", but at most
   "inline-block".
2. Generally, any non-inline frame will be marked as a font inflation container.
3. Any block frame whose writing direction doesn't match its parent will be a
   block formatting context, which implies NS_BLOCK_FLOAT_MGR.
4. Any block frame that has both NS_BLOCK_FLOAT_MGR set and is a font inflation
   container will also become a font inflation flow root.
but because this chain of reasoning is not the most direct, we also add a
corresponding assertion to better catch any potential bugs here.

Differential Revision: https://phabricator.services.mozilla.com/D5578

--HG--
extra : moz-landing-system : lando
2018-09-29 15:55:21 +00: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 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 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 39dffbe21b Bug 1277129 Part 1a - Move nsHTMLReflowState and nsCSSOffsetState into mozilla namespace. r=dbaron
MozReview-Commit-ID: DJfEQRCgNo3

--HG--
extra : rebase_source : add4c7a843f956114b2b9dfe20fba1048139ca5f
2016-07-21 18:36:34 +08:00
Jonathan Kew eda6f033e5 Bug 1138495 - pt 3 - Compute font inflation based on inline-axis dimensions rather than always using physical width. r=smontagu 2015-03-10 14:28:23 +00:00
Ehsan Akhgari 4354953b4f Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Ehsan Akhgari 60360fc645 Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04:00
Mats Palmgren a6feda0f22 Bug 508665 - part 1, Change the signature of SetParent/GetParent from nsIFrame* to nsContainerFrame*. r=roc 2014-05-24 22:20:39 +00:00
Ehsan Akhgari baf3a129ad Bug 907883 - Minimize #includes in layout/generic; r=roc
--HG--
extra : rebase_source : 5e87b764a12b05aff477c71547e2131be67ca93b
2013-08-22 14:32:52 -04:00
L. David Baron 41b3a3b4ea Do the necessary reflow when our font inflation data changes. (Bug 759755, patch 2) r=roc/bzbarsky 2012-06-11 13:57:35 -07:00
L. David Baron 357e191b3a Back out patches 2 and 3 of bug 759755 for causing intermittent failures of layout/reftests/font-inflation/container-with-clamping.html . 2012-06-10 17:36:18 -07:00
Ryan VanderMeulen 5f2a19ee6e Revert c39d36167b99 due to a horribly munged backout. 2012-06-10 19:44:50 -04:00
Ryan VanderMeulen 6d6c4efbab Backout the bug 754202 backout due to orange. 2012-06-10 19:37:47 -04:00
L. David Baron d3fd87344e Do the necessary reflow when our font inflation data changes. (Bug 759755, patch 2) r=roc 2012-06-10 13:02:23 -07:00
Phil Ringnalda bda062fbe0 Back out 30e441f7ad9d (bug 759755) and 08286f4e696b (bug 760098) for orange 2012-06-06 22:51:58 -07:00
L. David Baron 3c2993c391 Do the necessary reflow when our font inflation data changes. (Bug 759755) r=roc 2012-06-06 22:11:42 -07:00
Ed Morley 83427f0fe0 Merge mozilla-central to mozilla-inbound 2012-05-21 13:19:38 +01:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
L. David Baron f07bd4e20e Save and expose on nsFontInflationData the width of the nearest common ancestor of the inflated descendants. (Bug 747720, patch 1) r=roc
This width will be used in patch 3.
2012-05-20 22:18:27 -07:00
L. David Baron 1f0b12c8b8 Build font data structure by walking the necessary text. (Bug 706193, patch 3) r=roc
Compute the amount of text in the scope of an nsFontInflationData
object.  This walks the text that's inside of the block formatting
context at which this object is rooted, excluding the text that's inside
any nested BFC.  Using the amount of text, the font sizes of the text,
and the line threshold preference, we compute whether to enable font
size inflation within that block formatting context.
2012-04-16 15:32:12 -07:00
L. David Baron 90733eea84 Add a font inflation data structure per block formatting context. (Bug 706193, patch 2) r=roc
This structure is per block formatting context because we have to make a
single inflation decision for things like consecutive runs of paragraphs
of text.  Inflating some paragraphs and not others (within the same
sequence of adjacent paragraphs) based on the amount of text in each one
would be disastrous.  Otherwise it's ideal for the units to be as small
as possible as long as they merge such sequences; therefore this uses a
definition corresponding to CSS's idea of elements that establish new
block formatting contexts.
2012-04-16 15:32:12 -07:00