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

40 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 7e2171a18c Bug 924851 - patch 2 - When ENABLE_INTL_API is true, make nsBidi into a minimal wrapper around ICU's ubidi.h functions. r=xidorn
--HG--
rename : layout/base/nsBidi.cpp => layout/base/nsBidi_noICU.cpp
rename : layout/base/nsBidi.h => layout/base/nsBidi_noICU.h
2016-10-06 09:49:17 +01:00
Jonathan Kew 3cc319fde5 Bug 924851 - patch 1 - Move definition of nsBidiLevel/nsBidiDirection and frame bidi properties from nsBidi.h to nsIFrame.h, in preparation for removal of nsBidi. r=xidorn 2016-10-06 09:49:14 +01:00
Jonathan Kew ad335f5029 Bug 1307842 - Remove the nsBidi::GetCharTypeAt() method and use plain GetBidiCat() instead. r=xidorn
MozReview-Commit-ID: 7vZCiIBGxXJ

--HG--
extra : rebase_source : d7f336f299075531197baec5990161e18efed0ca
2016-10-05 17:58:00 +01:00
Jonathan Kew 594fdb205d Bug 1305700 - pt 3 & 4 - Clean up/simplify use of ENABLE_INTL_API conditionals in nsUnicodeProperties (code rearrangement, no change in behavior). r=m_kato 2016-09-28 10:52:51 +01:00
Xidorn Quan c353935ab6 Bug 1160847 part 3 - Restore virtual bidi control characters for reordering. r=jfkthame
This patch mainly consists of two parts, one for resolving and the other
for reordering.

In the resolving part, the added code stores the lowest embedding level
of all bidi formatting characters precede a frame to the bidi data of
that frame when necessary.

In the reordering part, virtual frame is restored from the information
stored above before asking the bidi engine to reorder frames

Collapsing a run of continuous virtual formatting characters into one
virtual character with the lowest embedding level among them should work
because a character with a higher embedding level than either of its
neighbors should not affect the reordering result of any other part of
the sequence. (No formal proof of this theorem, though)

MozReview-Commit-ID: LQjRu0mWsZP

--HG--
extra : source : 5d0cf1cbd270e9963d848a23b37528ed503ed6a0
2016-06-29 17:47:18 +10:00
Xidorn Quan 90c5357c7f Bug 1160847 part 2 - Add glue to nsBidiPresUtils to use support for bidi isolate in nsBidi. r=jfkthame
This patch is mainly based on smontagu's wip patch. Some non-trivial differences:

* BidiParagraphData.mIsolateCount and related code are not added in this patch.
  I investigated uses of this field in the wip patch, and it seems to me none of
  them makes sense:
  1. in the fast path of nsBidiPresUtils::ResolveParagraph, if there would be
     any isolate character in the surrounding text, there must exist more than
     one runs, which indicates the isolate count condition is redundant.
  2. in handle of br frame in nsBidiPresUtils::TraverseFrames, based on my
     understanding of "CSS Writing Modes Level 3" section "2.4.4. Paragraph
     Breaks Within Embeddings and Isolates", the resolving should happen
     unconditionally.

* {control,override}Char in nsBidiPresUtils::TraverseFrames are assigned
  unconditionally when in a bidi inline container, so that we can properly
  handle it when there are continuations. I suspect this was the reason of
  regressions in dynamic reftests from the wip patch mentioned in comment 1.

MozReview-Commit-ID: LUdBAapA48e

--HG--
extra : source : 28fa56b841de689691375e8e2d5e56014921b48e
2016-06-29 17:47:00 +10:00
Xidorn Quan 05dcd227c5 Bug 1281099 part 2 - Merge three bidi frame properties into one. r=jfkthame
MozReview-Commit-ID: CEJhM3c21KO

--HG--
extra : rebase_source : 9e21c098692429ad3b35b2230887faf85c967ce8
2016-06-21 17:53:10 +10:00
Xidorn Quan c81ed5494f Bug 1281099 part 1 - Convert some macros to functions to help later change. r=jfkthame
MozReview-Commit-ID: 2OS5eIsNAYN

--HG--
extra : rebase_source : 345e33f986aa950eb122c1cc7451c7a59a8f84cb
2016-06-21 17:21:09 +10:00
Xidorn Quan 072dccd81f Bug 1230034 part 6 - Convert all frame properties which do not hold pointer to be typed. r=dbaron
--HG--
extra : source : f95f143e0e521ad2f8726097a484de402c834620
2016-01-28 14:23:59 +11:00
Xidorn Quan 6ad1442a53 Bug 1230034 part 4 - Make FramePropertyDescriptor to be a template. r=froydnj,dbaron
This patch makes methods of FramePropertyTable and FrameProperties to be
simple template wrapper functions. Then it converts all references to
FramePropertyDescriptor to use "void" parameter to simulate the current
unsafe behavior.

SmallValueHolder is used for storing small values like int32_t, float,
which can fit in the size of a pointer directly, and thus no lifetime
management is needed.

--HG--
extra : source : 88b2723cddf119d73d8a442d8238b50406e9d604
2016-01-28 14:23:59 +11:00
Xidorn Quan 0b71314608 Bug 1230034 part 3 - Move some frame property declaration around. r=dbaron
--HG--
extra : source : d67dd26db9f0349d2e8ef71f8def9fad7856fe1e
2016-01-28 14:23:59 +11:00
Jonathan Kew dacfaeae8e Bug 1231175 - Missed change from Unicode 6.3 bidi algorithm update (ported from ICU's ubidi): include new ENL and ENR bidi pseudo-types in MASK_LTR. r=smontagu 2015-12-09 11:58:17 -05:00
Ted Clancy 67df511767 Bug 1157727 - Part 2: Update bidi algorithm for bracket matching (patch originally by :tedders1, updated by :jfkthame). r=jfkthame
* * *
Bug 1157727 - Part 2a: Mark bidi bracket tests as passing.
2015-10-27 13:41:39 -07:00
Jonathan Kew c871ee8560 Bug 1157727 - Part 0: Preliminary cleanup, remove a bunch of #ifdef'd dead code from nsBidi.cpp. r=smontagu 2015-11-25 12:01:03 +00:00
Carsten "Tomcat" Book 6c15811d8a Backed out changeset 00c2df3df22f (bug 1157727)
--HG--
extra : rebase_source : d717285c96315da10facb20b157b1a9fa4967b9a
2015-11-25 15:37:04 +01:00
Carsten "Tomcat" Book 906a075480 Backed out changeset 21730adb78b6 (bug 1157727)
--HG--
extra : rebase_source : 8dfb3a8fbba3fdc41815a872fad17e28e90468aa
2015-11-25 15:37:01 +01:00
Ted Clancy 4a082e1689 Bug 1157727 - Part 2: Update bidi algorithm for bracket matching (patch originally by :tedders1, updated by :jfkthame). r=jfkthame
* * *
Bug 1157727 - Part 2a: Mark bidi bracket tests as passing.
2015-10-27 13:41:39 -07:00
Jonathan Kew 65a70aed66 Bug 1157727 - Part 0: Preliminary cleanup, remove a bunch of #ifdef'd dead code from nsBidi.cpp. r=smontagu 2015-11-25 12:01:03 +00:00
Ted Clancy 1cde58afc9 Bug 1157726: Updated algorithm to match ICU implementation of support for bidi isolates. r=smontagu 2015-04-28 22:41:44 -04: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
Birunthan Mohanathas e3709383ec Bug 784739 - Switch from NULL to nullptr in layout/; r=ehsan
--HG--
extra : rebase_source : 0d0d9e11be9d39e4457bddd0bac7e19a50b91b0b
2013-10-08 14:47:21 -04:00
Ehsan Akhgari 2621b190f1 Bug 906790 - Minimize layout/base #includes; r=roc 2013-08-19 18:55:18 -04: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
Ms2ger 5f4593aa2e Bug 780387 - Part e: Stop using PRSize; r=bsmedberg 2012-08-09 09:10:11 +02:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Simon Montagu 23fcb4824f Implement unicode-bidi: -moz-plaintext in layout. Bug 662288, r=roc 2011-10-18 14:51:58 +02: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
Simon Montagu c5979d144a Make all nsBidiPresUtils methods static. Bug 624798, r=roc 2011-04-13 12:23:49 +03:00
Simon Montagu f213cf876f Back out bug 263359 and bug 624798 because of performance regressions (bug 650189) 2011-04-27 11:47:18 +03:00
Simon Montagu c808d636dc Make all nsBidiPresUtils methods static. Bug 624798, r=roc 2011-04-13 12:23:49 +03:00
Simon Montagu 3bd533614c Basic bidi support for SVG. Bug 620446, r=roc, a=roc 2011-01-04 00:52:17 -08:00
Vladimir Vukicevic 73cbd73f4a b=566447; add presshell memory reporter; r=bz 2010-05-31 19:19:35 -07:00
Ehren Metcalfe a791e19cc4 Bug 556446: Remove dead code in layout. r=roc,bz 2010-04-03 07:36:19 -04:00
smontagu@smontagu.org fa8e1fccff Move SymmSwap and other character-related Bidi utility methods from layout to intl/unicharutil. Bug 385539, r+sr=roc 2007-06-30 22:56:10 -07:00
smontagu%smontagu.org 781e83e333 Update bidi data tables to Unicode 4.0.1 and add surrogate handling. Bug 240943, r=jshin, sr=rbs. 2004-05-18 11:01:49 +00:00
gerv%gerv.net 708b56cff4 Bug 236613: change to MPL/LGPL/GPL tri-license. 2004-04-18 14:30:37 +00:00
smontagu%netscape.com b6780e6b5a Make Bidi symmetric swapping handle characters outside BMP. Bug 122800, r=mkaply, sr=darin 2002-11-22 23:49:29 +00:00
smontagu%netscape.com c5331b9f14 Correct handling of zero-width joiners and non-joiners. Bug 110497. r=ftang, sr=attinasi 2002-04-23 23:50:17 +00:00
smontagu%netscape.com 37ebf6848d Converting bidi utilities to non-XPCOM interfaces. Bug 120818; r=mkaply, nhotta; sr=attinasi 2002-02-19 20:41:32 +00:00