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

52 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 160ed71c4e Bug 1320014 Part 11 - Convert NS_FULL_TO_HALF_CORNER to a constexpr function. r=mats
Because the new function checks types, we need to change the fullCorner type
in nsComputedDOMStyle::GetEllipseRadii() and
StyleAnimationValue::ExtractComputedValue() from uint8_t to |Corner| to fix
build error.

MozReview-Commit-ID: 5NuFE3yA2QD

--HG--
extra : rebase_source : 8f94209b24bd909839358cd502f462edb9ce3116
2017-01-05 14:59:17 +08:00
Ting-Yu Lin cf828e1584 Bug 1320014 Part 10 - Convert NS_HALF_TO_FULL_CORNER to a constexpr function. r=mats
MozReview-Commit-ID: 1PECc7hm249

--HG--
extra : rebase_source : 7784720bb9ae061689cba0b30c0aebc779d818b1
2017-01-05 14:39:58 +08:00
Ting-Yu Lin 229d433359 Bug 1320014 Part 9 - Convert NS_HALF_CORNER_IS_X to a constexpr function. r=mats
MozReview-Commit-ID: 3d2opSIjAUc

--HG--
extra : rebase_source : 03e55f0458dd305fa782ca1e46c32069045e86e9
2017-01-05 14:30:14 +08:00
Ting-Yu Lin 797609894a Bug 1320014 Part 7 - Convert half corner indices #define to an enum. r=mats
MozReview-Commit-ID: 8lNtjV14WTN

--HG--
extra : rebase_source : dbfa992a2ee3cab2f639fb5a68463a673410ade6
2017-01-05 11:31:38 +08:00
Ting-Yu Lin 2dada2d6e0 Bug 1320014 Part 6 - Remove #define NS_CORNER_[TOP_LEFT/TOP_RIGHT/BOTTOM_RIGHT/BOTTOM_LEFT] r=mats
MozReview-Commit-ID: ERAwdxKZPf7

--HG--
extra : rebase_source : 53eb8d15ecd0d9d8fd0c7b88872b210b54104725
2017-01-04 18:15:30 +08:00
Daniel Holbert 14dede68ec Bug 1321495 part 2: Add needed "using namespace" declarations to several .cpp files in layout/style, to preemptively fix unified-build bustage. r=TYLin
MozReview-Commit-ID: 5p6DhiZ5YFg

--HG--
extra : rebase_source : 17a90dbe63af0b4e3a7c29881336fc31fbaf726d
2016-12-01 10:37:44 -08:00
Ting-Yu Lin 754b6c9659 Bug 1317588 Part 3 - Remove #define NS_SIDE_TOP/RIGHT/BOTTOM/LEFT. r=mats
This patch was written with the help of the following script. Also, manually
add mozilla qualifier to the enum values in nsStyleCoord.h, gfxRect.h, and
Types.h to make it build.

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 "NS_SIDE_TOP" "eSideTop"
rename "NS_SIDE_RIGHT" "eSideRight"
rename "NS_SIDE_BOTTOM" "eSideBottom"
rename "NS_SIDE_LEFT" "eSideLeft"

MozReview-Commit-ID: 9T0ORsqM6nP

--HG--
extra : rebase_source : 884ad96104c6e9cf6c8b3145d2d3a071ecccfe6a
2016-11-18 18:12:25 +08:00
Nicholas Nethercote 242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Max Vujovic 891ddf7cb3 Bug 948265 - Add CSS hue-rotate filter to nsCSSFilterInstance. r=mstange,dbaron 2014-08-20 15:46:59 -07:00
Cameron McCormack 5a3e19e62c Bug 1026344 - Part 4: Make nsStyleCoord::Calc refcounted and introduce a non-refcounted nsStyleCoord::CalcValue. r=dbaron
This means that style structs holding computed calc() values are now able to be
stored in the rule tree.
2014-06-19 13:18:03 +10:00
Simon Sapin 12935dcb17 Bug 976787 part 1: Add the grid-template-{columns,rows} properties to the style system. r=dholbert 2014-03-10 15:54:13 -07:00
Ehsan Akhgari 2824b29025 Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

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 "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
David Zbarsky 3250bd906e [Bug 847110] Fix up includes in layout/style r=dbaron 2013-03-02 19:31:48 -05:00
Paul Adenot 2ff8ad5b57 Bug 761393 - Add a method to hash an nsStyleCoord. r=dbaron 2012-08-26 21:08:32 -07: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
Matt Woodrow d6d762688c Bug 779010 - Use nsStyleCoord equality operator to compare nsStyleSides and nsStyleCorners. r=dbaron 2012-07-30 19:25:28 -07:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
L. David Baron a252d1e95b Depend on assignment and copy construction of unions in nsStyleCoord. (Bug 730240) r=bzbarsky 2012-02-24 21:23:14 -08:00
Zack Weinberg f4fb4a1991 Bug 729142 - Convert layout/style to MOZ_STATIC_ASSERT. r=dbaron 2012-02-23 08:19:00 -08:00
Boris Zbarsky e0c4316236 Bug 716628. Implement support for 'turn' unit in CSS. r=dbaron 2012-02-04 00:01:23 -05: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
L. David Baron 3d7d18c200 Simplify storage of computed calc() as a result of removing min() and max(). (Bug 363249) r=bzbarsky a2.0=blocking2.0:beta6 2010-09-11 09:27:13 -07:00
L. David Baron 8e923adf2c Remove support for min() and max() in calc(): remove support for parsing and storage. (Bug 363249) r=bzbarsky a2.0=blocking2.0:beta6 2010-09-11 09:27:12 -07:00
L. David Baron 089f0fbb38 Make nsStyleCoord::operator== check deep equality of calc() expressions rather than just doing pointer comparison. (Bug 585715) r=bzbarsky a2.0=blocking+ 2010-08-31 12:05:12 -04:00
L. David Baron 2a023744e6 Add support for calc() to the 'width' property. (Bug 585715) r=bzbarsky a2.0=blocking2.0+ 2010-08-11 12:32:53 -07:00
L. David Baron 2d6d3fc9eb Add storage for calc() expressions to nsStyleCoord. (Bug 363249) r=bzbarsky 2010-07-02 21:18:55 -07:00
L. David Baron fbdc2c3138 Add nsStyleCoord::Array type. (Bug 363249) r=bzbarsky 2010-07-02 21:18:55 -07:00
L. David Baron f67d8257ba Get rid of (void) C-isms in nsStyleCoord. (Bug 363249) r=bzbarsky 2010-05-11 08:49:44 -07:00
Zack Weinberg ext:(%2C%20Ms2ger%20%3Cms2ger%40gmail.com%3E) 5c26b37323 Bug 513395: Implement revised CSS gradient notation (1/2): parser and data structure changes 2009-11-02 11:36:43 -08:00
L. David Baron 8461beec27 Switch nsStyleAnimation from using nsStyleCoord to using its own nsStyleAnimation::Value, so we don't have to add nontrivial destructors to nsStyleCoord. (Bug 522852) r=dholbert,bzbarsky 2009-10-20 07:46:16 -04:00
L. David Baron a24f436459 Better disambiguate nsStyleCoord constructors taking nscoord and nscolor. (Bug 521352) r=bzbarsky 2009-10-13 19:38:20 -07:00
Daniel Holbert 176ee39664 Bug 474049: Add support for SMIL animation of CSS properties in SVG. r=birtles sr=roc 2009-10-02 14:37:25 -07:00
L. David Baron 587ac05e42 Add support for color values to nsStyleCoord so nsStyleAnimation can animate colors. (Bug 504652) r=bzbarsky 2009-09-11 06:46:36 -04:00
L. David Baron cb6012ec82 Remove nsStyleContext::DumpRegressionData, code that uses it, and code that exists only for it. (Bug 477522) r+sr=bzbarsky 2009-02-09 20:36:54 -08:00
Zack Weinberg f21ce60ac3 Bug 450652 – Style system changes to support CSS3 border-radius – data structures for elliptical borders (part 1) [r+sr=dbaron] 2008-10-01 00:50:52 -05:00
Zack Weinberg 28a8588125 Remove eStyleUnit_Chars and the special cases for it throughout layout, and make ch units go through the normal eStyleUnit_Coord cases. (Bug 363706) r+sr=dbaron 2008-07-15 14:31:36 -07:00
dbaron@dbaron.org 0d8b560733 Fix the weird Get* API on nsStyleSides in favor of returning structs by value, to avoid further occurrences of bug 420069. b=420069 r+sr=roc a=beltzner 2008-03-05 16:05:26 -08:00
dbaron@dbaron.org f4e95ca927 Add eStyleUnit_None so we don't have to use eStyleUnit_Null as a real value for max-width and max-height. b=379741 r+sr=bzbarsky 2007-05-10 23:01:31 -07:00
dbaron@dbaron.org 9920e003d3 Remove eCSSUnit_Proportional and eStyleUnit_Proportional, which were used only for a removed feature. b=333352 r+sr=bzbarsky 2007-05-10 23:00:26 -07:00
dbaron%dbaron.org 30f8db359a File comments that show up in LXR and provide a quick summary of what's in each file. 2006-03-25 05:47:31 +00:00
roc+%cs.cmu.edu 0f4150a4e5 Bug 226439. Convert codebase to use AppendLiteral/AssignLiteral/LowerCaseEqualsLiteral. r+sr=darin 2004-06-17 00:13:25 +00:00
gerv%gerv.net 9d2ee4928c Bug 236613: change to MPL/LGPL/GPL tri-license. 2004-04-17 21:52:36 +00:00
dbaron%dbaron.org a012b34247 Do inheritance without layout-dependent computations, per CSS2.1. Remove eStyleUnit_Inherit and nsStyleCoord::SetInheritValue. b=205790 r+sr=bzbarsky a=asa 2003-11-24 19:46:25 +00:00
dbaron%dbaron.org faa9a5b9f9 Reduce duplication of code between handling of top/right/bottom/left margin, border, and padding. b=189537 r+sr=bzbarsky 2003-01-18 15:58:49 +00:00
cathleen%netscape.com 740d95a0a9 eliminates 107 nsCRT::memset calls to use memset instead. removed nsCRT::memset() function. bug 118135 r=dp sr=brendan 2002-02-05 01:41:13 +00:00
cathleen%netscape.com 92d4fbf218 converted 271 references to nsCRT::memcpy to memcpy, bug 118135 r=dp 2002-01-12 03:18:55 +00:00
jaggernaut%netscape.com 97b0530073 Bug 104158: Use NS_LITERAL_STRING instead of XXXWithConversion("..."). r=bryner, rs=alecf 2001-12-16 11:58:03 +00:00