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

16 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 59cba95f7f (no bug) Drive-by ReflowInput whitespace fixup. r=dholbert
DONTBUILD because whitespace-only

MozReview-Commit-ID: GRIdsfVYsqD
2017-01-10 18:55:42 -08:00
Ting-Yu Lin e0ab7c2e17 Bug 1317203 - Change ReflowInputFlags to use bool : 1. r=mats
Based on bug 1294628 comment 8, I added spaces around the colon.

MozReview-Commit-ID: Dd4fvavMgmc

--HG--
extra : rebase_source : d99763461c764cc1a3c91c7c213bc8ac8c5cfbbc
2016-11-14 11:39:25 +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
Mats Palmgren d523cbcf73 Bug 1300369 part 1 - Add two new ComputeSizeFlags flags e{I,B}ClampMarginBoxMinSize and associated reflow state flags to indicate we want margin-box min-size clamping in the indicated axis. r=dholbert 2016-11-05 02:57:06 +01:00
Daniel Holbert 689d473b8d Bug 1269046 part 4: Set flags on nsPlaceholderFrame & ReflowInput to track abspos frames that need CSS Box Alignment to resolve static position. r=mats
(We'll react to the ReflowInput flags and do the actual CSS Box Alignment in a
later patch in this series.)

MozReview-Commit-ID: EZd7npWSzQI
2016-10-31 08:58:18 -07:00
Mats Palmgren 57faec6e4d Bug 1312295 - Change ReflowInputFlags to use uint32_t since we'll need more than 16 bits here. r=dholbert 2016-10-24 03:54:54 +02:00
Emilio Cobos Álvarez 619cb14d87 Bug 1299066: Make NS_STYLE_DISPLAY_* an enum class. Prefer indexing instead of linear search in the frame constructor r=heycam,bz
The main renaming was generated with the following python script:

```

import sys
import re

CAMEL_CASE_REGEX = re.compile(r"(^|_|-)([A-Z])([A-Z]+)")
DISPLAY_REGEX = re.compile(r"\bNS_STYLE_DISPLAY_([^M][A-Z_]+)\b")

def to_camel_case(ident):
  return re.sub(CAMEL_CASE_REGEX,
                lambda m: m.group(2) + m.group(3).lower(), ident)

def constant_to_enum(constant):
  return "StyleDisplay::" + to_camel_case(constant) + ("_" if constant == "NONE" else "")

def process_line(line):
  return re.sub(DISPLAY_REGEX,
                lambda m: constant_to_enum(m.group(1)), line)

lines = []
with open(sys.argv[1], "r") as f:
  for line in f:
    lines.append(process_line(line))

with open(sys.argv[1], "w") as f:
  for line in lines:
    f.write(line)
```

And the following shell commands:

```
find . -name '*.cpp' -exec python display.py {} \;
find . -name '*.h' -exec python display.py {} \;
```

MozReview-Commit-ID: 91xYCbLC2Vf
2016-09-01 20:41:17 -07:00
Andi-Bogdan Postelnicu 442f49348f Bug 1282408 - add ignore initialization check flag for some variables from ReflowInput. r=dbaron
MozReview-Commit-ID: 22VI0j7QWbL
2016-08-23 15:51:45 +03:00
Ting-Yu Lin d77152fcd0 Bug 1277129 Part 7c - Rename various RS variables to RI. r=dbaron
This patch is generated by the following script:

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

rename aChildRS aChildRI
rename aContainingBlockRS aContainingBlockRI
rename aFrameRS aFrameRI
rename aLastRS aLastRI
rename aOuterRS aOuterRI
rename aRS aRI
rename blockHtmlRS blockHtmlRI
rename captionRS captionRI
rename cellRS cellRI
rename childRS childRI
rename firstAncestorRS firstAncestorRI
rename flexContainerRS flexContainerRI
rename gridRS gridRI
rename innerRS innerRI
rename lastButOneRS lastButOneRI
rename LineContainerRS LineContainerRI
rename mBlockRS mBlockRI
rename parentRS parentRI
rename secondAncestorRS secondAncestorRI
rename lastRSSize lastRISize
rename lastRSPadding lastRIPadding

MozReview-Commit-ID: YEgZs3WMow

--HG--
extra : rebase_source : c26050c71a3a5b13ef46e6d3582e581702d49ee8
2016-07-21 18:36:39 +08: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 55cde36029 Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. r=dbaron
MozReview-Commit-ID: LczLJDtDncy

--HG--
extra : rebase_source : c32e928ae25f94305fb907db89278dce7304a903
2016-07-21 18:36:38 +08:00
Ting-Yu Lin cd13f0ea71 Bug 1277129 Part 6a - Rename frame to mFrame in SizeComputationInput. r=dbaron
MozReview-Commit-ID: 3SXZ4qEZJc

--HG--
extra : rebase_source : 577d48f047af163585acea95dda311358f5e8c25
2016-07-21 18:36:38 +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 154af05659 Bug 1277129 Part 1d - Rename nsCSSOffsetState to SizeComputationInput. 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 nsCSSOffsetState SizeComputationInput

MozReview-Commit-ID: GUJ99qNiSwD

--HG--
extra : rebase_source : cf4e6c35338e1e9d4ee106305548075b2c1bdcb1
2016-07-21 18:36:35 +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