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

60 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack e82b3826f9 Bug 1553378 - Devirtualize calls to GetText() / TextLength() when we know we have a Text node. r=smaug,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D32100
2019-05-22 15:18:48 +10:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Jeff Gilbert 373563b0ec Bug 1540357 - Fix implicit int conversions in dom/canvas's layout/* includes. r=dholbert
nsUnicodeProperties.h includes into ICU, which has implicit int
truncation, so quarantine this include out of problematic headers.

Depends on D25498

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

--HG--
extra : moz-landing-system : lando
2019-04-02 17:00:49 +00:00
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
Andi-Bogdan Postelnicu 5e3e0d4498 Bug 1453795 - Layout - Initialize member fields in classes/ structures. r=dbaron 2018-07-12 09:42:14 +03:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02: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
Jonathan Kew c81dc5d879 Bug 1371564 - Remove the long-obsolete TEXT_WAS_TRANSFORMED flag, don't waste time setting it. r=mats 2017-06-24 09:53:12 +01:00
Sebastian Hengst 001bb41985 Backed out changeset 9c822d8aad22 (bug 1371564) for build bustage: unused variable outputStart at nsTextFrameUtils.cpp:212. r=backout 2017-06-24 11:28:34 +02:00
Jonathan Kew a63c6cab0b Bug 1371564 - Remove the long-obsolete TEXT_WAS_TRANSFORMED flag, don't waste time setting it. r=mats 2017-06-24 09:53:12 +01:00
Jonathan Kew 4b5525bbf7 Bug 1362167 - Use strongly-typed enum classes instead of generic uint16_t fields for the gfxShapedText and gfxTextRun flags. r=jrmuizel 2017-05-04 22:27:05 +01:00
Jonathan Kew 6fc5313103 Bug 1362167 - Split gfxShapedText.mFlags into two 16-bit flags fields, and arrange storage more compactly to reduce size of gfxShapedWord and gfxTextRun objects. r=jrmuizel 2017-05-04 22:25:16 +01:00
Cameron McCormack 4f17cad8f0 Bug 1330236 - Compute SVG getNumberOfChars() quicker in simple cases. r=longsonr+218550
MozReview-Commit-ID: FgwR9dxTefx

--HG--
extra : rebase_source : 5b1ba3aa727cdd278a4b40c24231ca446b8bc45d
2017-01-17 13:45:43 +08:00
Jeremy Chen 6d7e1d5777 Bug 1316482 - use the refactored TransformText as a template function for both char16_t and uint8_t text. r=xidorn
With this patch, we shall only maintain one version of the TransformText logic.

MozReview-Commit-ID: JAIksFVqvqf

--HG--
extra : rebase_source : 3187632d7162bba64994b793448314b8323e3d46
2017-01-12 09:27:02 +08:00
Jeremy Chen 526327d9d5 Bug 1316482 - remove collapsible white spaces according to the White Space Processing Rules. r=jfkthame
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
2017-01-12 09:27:01 +08:00
Wes Kocher b0c1453d57 Backed out 4 changesets (bug 1316482) for frequent reftest failures on win7vm a=backout
Backed out changeset ad208e73ab6c (bug 1316482)
Backed out changeset 2a28dc0a75d3 (bug 1316482)
Backed out changeset b54126cc63d4 (bug 1316482)
Backed out changeset ebd0c6c8b783 (bug 1316482)

MozReview-Commit-ID: IFpLJUjj8qH
2017-01-10 18:11:10 -08:00
Jeremy Chen f53d660a40 Bug 1316482 - use the refactored TransformText as a template function for both char16_t and uint8_t text. r=xidorn
With this patch, we shall only maintain one version of the TransformText logic.

MozReview-Commit-ID: JAIksFVqvqf

--HG--
extra : rebase_source : 49ec749ae74f872e9749e026affe7f2e22db71f9
2017-01-10 00:02:03 +08:00
Jeremy Chen 498b737c47 Bug 1316482 - remove collapsible white spaces according to the White Space Processing Rules. r=jfkthame
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
2017-01-10 00:02:02 +08:00
Jeremy Chen 9dca2c80ea (no bug) minor indentation cleanup in nsTextFrameUtils.h. whitespace-only, no review, DONTBUILD
MozReview-Commit-ID: FIN0Tif6JZQ
2016-11-28 20:45:37 +08:00
Jeremy Chen a09461846f (no bug) fix comment for nsTextFrameUtils::TransformText. comment-only, no review, DONTBUILD
MozReview-Commit-ID: Cu7zjjvOwQE
2016-11-28 20:45:37 +08:00
Emilio Cobos Álvarez e1e6b574d9 Bug 1288938: layout: Move the GlyphObserver to the text run instead of the frame. r=jfkthame
MozReview-Commit-ID: KphTCkcZeid
2016-08-03 10:53:37 -07:00
Jonathan Kew 832f6ddab2 Bug 1072106 - Be more careful about checking for spaces that should not have justification applied. r=roc 2014-09-24 18:10:56 +01:00
Cameron McCormack 8311e3a117 Bug 1019555 - Treat newlines and tabs as space characters in SVG xml:space="preserve" text. r=roc 2014-06-05 13:25:15 +10:00
James Kitchener 106ab919b6 Bug 953385 - Set math script flag on textruns belonging to MathML tokens. r=roc 2014-01-30 10:59:16 -05:00
Cameron McCormack 7f595ed104 Bug 960312 - Rename TEXT_IS_IN_SINGLE_CHAR_MI to NS_FRAME_IS_IN_SINGLE_CHAR_MI to make it clear it's global. r=roc 2014-01-16 16:10:09 +11:00
Jonathan Kew 2c2c332995 bug 955957 - pt 1 - reimplement gfxSkipChars and gfxSkipCharsIterator to perform better with huge text runs. r=roc 2014-01-10 09:42:05 +00:00
Carsten "Tomcat" Book 4054e1e107 Backed out changeset 4b54755de2a7 (bug 955957) for Build Bustage on a CLOSED TREE 2014-01-10 09:30:28 +01:00
Jonathan Kew a19636ff66 bug 955957 - pt 1 - reimplement gfxSkipChars and gfxSkipCharsIterator to perform better with huge text runs. r=roc 2014-01-10 07:48:01 +00:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -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 PRUnichar char16_t
2014-01-04 10:02:17 -05:00
James Kitchener 665c0d2ff1 Bug 114365 - Textrun transformations and TextFrame changes for mathvariant. r=roc 2013-12-02 11:49:27 -05:00
Simon Montagu f077892c45 Add new bidi control characters defined in Unicode 6.3. Bug 922530, r=jfkthame 2013-10-02 16:07:02 +03: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
Cameron McCormack 0306878c88 Bug 655877 - Part 23a: Add white-space:-moz-pre-discard-newlines value with white space collapsing behavior like SVG's xml:space="preserve". r=roc,dbaron 2012-09-07 15:42:19 +10:00
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01: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
Jonathan Kew fae89f9ba9 bug 703100 - pt 1 - eliminate gfxTextRunWordCache and gfxTextRunCache. r=roc 2011-12-06 12:39:18 +00:00
Ehsan Akhgari 92064e6d3f Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu d2b70213ac Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Robert O'Callahan fe457806bc Bug 430332. Defer nsTransformingTextRun::RebuildTextRun until the linebreaker has completely set up the break and capitalization data on the transformed text run. r=smontagu 2009-01-09 13:23:28 +13:00
Jonathan Kew 426355df9f Bug 470418 - Leak nsStyleContext with RTL, text-transform; r,sr=roc 2009-01-01 16:34:13 +03:30
Ehsan Akhgari c5ae2a1961 Bug 441782 - bidi.numerals == 4 does not switch numeric shapes in content; r,sr=roc 2008-12-18 23:42:53 +03:30
Robert O'Callahan baf3a54456 Backed out changeset dcd1ad7a918e 2008-12-18 16:05:16 +13:00
Robert O'Callahan 1994393d68 Bug 430332. Defer nsTransformingTextRun::RebuildTextRun until the linebreaker has completely set up the break and capitalization data on the transformed text run. r=smontagu 2008-12-18 14:13:23 +13:00
Robert O'Callahan 44b2c729e4 Backed out changeset 0cb24a4bcd9b 2008-12-13 00:09:56 +13:00
Robert O'Callahan 3eb7a5c205 Bug 430332. Defer nsTransformingTextRun::RebuildTextRun until the linebreaker has completely set up the break and capitalization data on the transformed text run. r=smontagu 2008-12-12 21:37:59 +13:00
Robert O'Callahan b2c0de7471 Bug 230555. Support white-space:pre-line. r+sr=dbaron 2008-08-12 20:31:56 +12:00
roc+@cs.cmu.edu b59ab6a038 Bug 403426. We should clear whitespace status when we reset the linebreaker. If a final break opportunity exists we should save it and forward it to the line layout. Relanding with a fix so hopefully we won't crash Tp this time. r=smontagu 2007-12-03 00:22:07 -08:00
roc+@cs.cmu.edu d6da6b5316 Backing out bug 403426 2007-11-30 12:52:24 -08:00