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

69 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 011d524740 Bug 1646336 - Don't unnecessarily lose precision in nsComputedDOMStyle. r=hiro
We're converting to nscoord in some places unnecessarily, reducing the
precision of the computed value we return.

This makes some tests unnecessarily fail if we change the base of
nscoord.

Differential Revision: https://phabricator.services.mozilla.com/D79996
2020-06-18 00:42:47 +00:00
Brindusan Cristian f93d2c823e Backed out changeset 2011f0091ccf (bug 1646336) for dt failures at browser_accessibility_print_to_json.js. CLOSED TREE 2020-06-18 03:17:34 +03:00
Emilio Cobos Álvarez 24a7deb2a4 Bug 1646336 - Don't unnecessarily lose precision in nsComputedDOMStyle. r=hiro
We're converting to nscoord in some places unnecessarily, reducing the
precision of the computed value we return.

This makes some tests unnecessarily fail if we change the base of
nscoord.

Differential Revision: https://phabricator.services.mozilla.com/D79996
2020-06-17 22:30:14 +00:00
Emilio Cobos Álvarez 54cc92c94d Bug 1617472 - Remove nsCSSKeywords and related infrastructure. r=heycam
Seeya

Depends on D63795

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

--HG--
extra : moz-landing-system : lando
2020-02-24 13:30:48 +00:00
Boris Zbarsky 3d4c7db0aa Bug 1614165 part 2. Improve some error messages in style code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62155

--HG--
extra : moz-landing-system : lando
2020-02-09 03:40:48 +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
Emilio Cobos Álvarez 40b1e83d81 Bug 1498734 - Always compute angle values to degrees. r=xidorn
This matches the spec, https://drafts.csswg.org/css-values/#angles, which says:

> All <angle> units are compatible, and deg is their canonical unit.

And https://drafts.csswg.org/css-values/#compat, which says:

>When serializing computed values [...], compatible units [...] are converted into a single canonical unit.

And also other implementations (Blink always serializes angles as degrees in
computed style for example).

Also allows us to get rid of quite a bit of code, and makes computed angle value
representation just a number, which is nice.

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

--HG--
extra : moz-landing-system : lando
2018-10-13 00:41:03 +00:00
Emilio Cobos Álvarez 1b0a0261a1 Bug 1494622 - Simplify CSSValue and co a bit more. r=xidorn
Just remove the useless stuff.

Differential Revision: https://phabricator.services.mozilla.com/D7071
2018-09-27 16:11:45 +02:00
Emilio Cobos Álvarez b4bba4d593 Bug 1494622 - Remove nsDOMCSSRect. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D7070
2018-09-27 16:11:44 +02:00
Emilio Cobos Álvarez 864a303a8c Bug 1494622 - Remove nsDOMCSSRGBColor. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D7068
2018-09-27 16:11:42 +02:00
Emilio Cobos Álvarez b293adf1cf Bug 1459871: Remove other getPropertyCSSValue-related interfaces. r=bz
I can land the removal behind a pref first if you want and all that instead.

Again, this doesn't remove the internal usage for getComputedStyle (yet).

MozReview-Commit-ID: LA157ohfLhu
2018-05-15 14:05:13 +02:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson 0129d900f3 Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Cameron McCormack 6716a7e0eb Bug 1427512 - Part 28: Remove nsIDOMCSSValue. r=xidorn,bz
MozReview-Commit-ID: 6DasjoMa6C8
2018-01-11 16:17:57 +08:00
Cameron McCormack 66141a0c03 Bug 1427512 - Part 27: Remove nsIDOMCSSPrimitiveValue. r=xidorn,bz
MozReview-Commit-ID: IcGKAjPWacZ
2018-01-11 16:17:57 +08:00
Cameron McCormack eb5c3b0f3a Bug 1427512 - Part 23: Remove nsIDOMCounter. r=xidorn,bz
It's not actually implemented.  Since we never return any Counter
object, and to avoid exposing a Counter Web IDL interface object, we
declare getCounterValue() to return void (since it always throws).

MozReview-Commit-ID: JGvYtPmyeSp
2018-01-11 16:17:57 +08: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
Ehsan Akhgari 9a37d83f10 Bug 1156104 follow-up: forgot to actually include mURI 2015-04-19 15:05:57 -04:00
Ehsan Akhgari c8ee4d289f Bug 1156104 - Mark nsROCSSPrimitiveValue::m{Color,Value,URI} as MOZ_OWNING_REF; r=dbaron 2015-04-19 15:04:25 -04:00
Andrea Marchesini e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -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 MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Andrew McCreight cbe6fbf039 Bug 1029140 - Make the destructor of nsROCSSPrimitiveValue private. r=bz 2014-06-26 09:29:05 -07:00
Benoit Jacob e1b7dbca34 Bug 1028588 - Fix dangerous public destructors in layout/ - r=dbaron 2014-06-23 18:40:01 -04:00
Boris Zbarsky 79dab91ff6 Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00
L. David Baron ce2d7b005c Bug 470769 - Store computed styles of integer-valued properties as integers in nsROCSSPrimitiveValue, so they round-trip correctly. r=bzbarsky 2014-03-29 09:29:30 -07: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
Dirk Schulze 569ef7a7ef Bug 897392 - Implement parsing of filter:hue-rotate(). r=heycam 2013-07-26 16:02:33 +10:00
Boris Zbarsky b834439797 Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
Masatoshi Kimura 23ba391ec1 Bug 848339 - Remove the vestigial boolean outparam from nsWrapperCache::WrapObject. r=bz 2013-03-12 08:03:47 +09:00
David Zbarsky 3250bd906e [Bug 847110] Fix up includes in layout/style r=dbaron 2013-03-02 19:31:48 -05:00
Trevor Saunders e6efa7865a bug 824970 - nsROCSSPrimitiveValue::GetRectValue() should return nsDOMCSSRect* r=bz 2012-12-26 12:02:37 -05:00
Trevor Saunders fec9d2daa0 bug 824970 - use webidl for Rect r=bz 2012-12-26 07:26:36 -05:00
Trevor Saunders d36283408c bug 824970 - store nsDOMCSSRect* in nsROCSSPrimitiveValue r=bz 2012-12-25 22:01:06 -05:00
Trevor Saunders e422b99f91 bug 821593 - add downcasting from CSSValue to nsROCSSPrimitiveValue r=bz 2012-10-24 19:38:52 -04:00
Ms2ger 527b4acbd2 Backout bug 821593 for bustage. 2012-12-22 15:33:46 +01:00
Trevor Saunders 80e620d390 bug 821593 - add downcasting from CSSValue to nsROCSSPrimitiveValue r=bz 2012-10-24 19:38:52 -04:00
Trevor Saunders f66d567a5c bug 821593 - GetRGBColorValue() should return nsDOMCSSRGBColor* r=bz 2012-10-24 20:43:56 -04:00
Trevor Saunders 2d1d432957 bug 798567 - convert css values to webidl r=bz 2012-10-01 12:49:41 -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
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jonathan Watt f2f334fbe3 Bug 664130 - Add a documenting comment to nsROCSSPrimitiveValue. r=bz. 2011-09-08 12:15:00 +01:00
Robert O'Callahan 3133bff6c6 Bug 537890. Part 10: Fix nsPresContext and nsIDeviceContext unit-conversion methods to be explicit about using CSS logical units instead of physical units. r=dbaron 2010-08-13 21:58:04 +12:00
Craig Topper faba5a9415 Make some methods of nsROCSSPrimitiveValue non-inline, and remove two unneeded QueryInterface calls. (Bug 569529) r=dbaron 2010-06-03 13:11:34 -07:00
Jonathon Jongsma ext:(%2C%20L.%20David%20Baron%20%3Cdbaron%40dbaron.org%3E) b603ef9875 Implement CSS transitions: implement the parsing and computation of the transition properties. (Bug 435441) r=bzbarsky 2009-08-20 14:52:47 -07:00
L. David Baron 8bdcbd0b8d Quote and escape contents of url() when serializing. (Bug 478160) r+sr=bzbarsky 2009-03-06 13:05:01 +09:00
L. David Baron 3be38368d8 Make nsROCSSPrimitiveValue store ident values as nsCSSKeyword rather than nsIAtom*. (Bug 474712) r+sr=bzbarsky 2009-01-22 17:28:14 -08:00
reed@reedloden.com f9ee4eb39f Bug 105708 - "move nsUnitConversion.h" [p=reg@openpave.org (Jeremy Lea) r+sr+a1.9=roc] 2008-01-01 02:11:02 -08:00
dbaron@dbaron.org 16033c063e Implement remaining properties in computed style (with some hacks for counter() values for content), and fix some page-break-* bugs exposed by the added test coverage. b=316981 r+sr=bzbarsky 2007-07-22 10:58:37 -07:00
sharparrow1%yahoo.com 76a64e5c22 Bug 177805: Fix the use of units in Gecko. r+sr=roc 2007-02-07 07:46:44 +00:00