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

625 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke ea103d9ab4 Bug 1626570 - Improve handling of copying arrays in dom/canvas/. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D73657
2020-05-05 14:15:22 +00:00
Eric Rahm cbe7fbed12 Bug 1626444 - Remove nsAutoPtr usage from dom/canvas. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D69115

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:21 +00:00
Jonathan Kew 9ae6c0bed1 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787

--HG--
extra : moz-landing-system : lando
2020-04-02 01:38:18 +00:00
Ciure Andrei e1cb0f1e21 Backed out 4 changesets (bug 1619349, bug 1619350) for causing test_font_whitelist.html to fail CLOSED TREE
Backed out changeset ba16b09b5da0 (bug 1619349)
Backed out changeset f8ca02252dfc (bug 1619349)
Backed out changeset 01a2a527aa1a (bug 1619350)
Backed out changeset 67ee13868a44 (bug 1619350)
2020-04-02 04:34:31 +03:00
Jonathan Kew 82984492e6 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787

--HG--
extra : moz-landing-system : lando
2020-04-01 21:42:36 +00:00
sotaro b7a705dcef Bug 1623254 - Re-create DrawTarget of CanvasRenderingContext2D when the DrawTarget becomes invalid r=nical
Differential Revision: https://phabricator.services.mozilla.com/D67274

--HG--
extra : moz-landing-system : lando
2020-03-18 10:38:32 +00:00
Emilio Cobos Álvarez d35fad8391 Bug 1623147 - Don't flush style/frames unconditionally in CanvasRenderingContext2D::UpdateFilter(). r=mstange
I saw this in profiles.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 22:14:43 +00:00
adroitwhiz ec26b3fc27 Bug 1567544 - set composite op in DrawDirectlyToCanvas r=jrmuizel
When drawing an SVG image onto a `CanvasRenderingContext2D`, a different code path is taken which calls `DrawDirectlyToCanvas`. Previously, that function always used the default composite operation when drawing. Now it will use the canvas context's current `globalCompositeOperation`.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 13:42:06 +00:00
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Emilio Cobos Álvarez de54b68ce7 Bug 1617600 - Prototype :focus-visible behind a flag. r=smaug
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.

This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.

Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 14:16:20 +00:00
Noemi Erli 4fb19079c8 Backed out 3 changesets (bug 1617600) for causing wpt failures in focus-visible-009.html CLOSED TREE
Backed out changeset 73d1a5e10337 (bug 1617600)
Backed out changeset b722714830cd (bug 1617600)
Backed out changeset 45464d926bf0 (bug 1617600)
2020-02-26 01:46:31 +02:00
Emilio Cobos Álvarez 490c70ecc0 Bug 1617600 - Prototype :focus-visible behind a flag. r=smaug
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.

This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.

Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 17:58:28 +00:00
Boris Zbarsky 0223215a5b Bug 1614225. Fix validity checks in createPattern to follow the spec. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D63409

--HG--
extra : moz-landing-system : lando
2020-02-21 18:36:01 +00:00
Simon Giesecke 723b05dfb6 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/canvas. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D63142

--HG--
extra : moz-landing-system : lando
2020-02-18 21:08:00 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Emilio Cobos Álvarez a25126cd0d Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857

--HG--
extra : moz-landing-system : lando
2020-01-24 11:46:14 +00:00
Edgar Chen 9e846bd48a bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514

--HG--
extra : moz-landing-system : lando
2020-01-23 03:22:06 +00:00
Jonathan Kew 908689bbe1 Bug 1102584 - patch 2 - Implement extended attributes of the TextMetrics object (preffed off by default). r=lsalzman,bzbarsky
This is the main work of Richard Matheson's original patch, updated to current trunk code
and with the new attributes put behind prefs. Because some of the attributes may be more
stable than others (there was a move by Google to change how baselines are represented,
but then this was retracted because Safari is already shipping per the existing spec; and
we have some differences in how we handle font metrics between platforms which may affect
the font ascent/descent values), I've split this into several prefs so that we have the
possibility of enabling just the more stable (and/or more urgently requested) attributes.

(Note that this echos Google's approach per comment 30 of initially shipping part of the API.)

Depends on D59678

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

--HG--
extra : moz-landing-system : lando
2020-01-18 19:51:04 +00:00
Jonathan Kew 71b03a3108 Bug 1102584 - patch 1 - Provide somewhat better defaults for hanging and ideographic baseline alignment of canvas text. r=lsalzman
This is extracted from the original patch by Richard Matheson; it's not strictly necessary
to implementing the additional TextMetrics attributes, but OTOH if we're going to potentially
expose baseline attributes, it seems sensible to make them somewhat more meaningful than the
fallbacks in the current code.

Eventually we should use baseline tables from the font, but (a) we don't have support for
that in the back-end font code, and (b) very few fonts provide the data anyway, so while this
isn't perfect, for now it's the best we can do.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:44:29 +00:00
Andreea Pavel 10a5ef8799 Backed out 3 changesets (bug 1102584) for failing wpt at 2d.text.measure.actualBoundingBox.html
Backed out changeset 947829830dd5 (bug 1102584)
Backed out changeset 967170ab891c (bug 1102584)
Backed out changeset 59069d4514d0 (bug 1102584)
2020-01-18 21:47:49 +02:00
Jonathan Kew 7bb62c5559 Bug 1102584 - patch 2 - Implement extended attributes of the TextMetrics object (preffed off by default). r=lsalzman,bzbarsky
This is the main work of Richard Matheson's original patch, updated to current trunk code
and with the new attributes put behind prefs. Because some of the attributes may be more
stable than others (there was a move by Google to change how baselines are represented,
but then this was retracted because Safari is already shipping per the existing spec; and
we have some differences in how we handle font metrics between platforms which may affect
the font ascent/descent values), I've split this into several prefs so that we have the
possibility of enabling just the more stable (and/or more urgently requested) attributes.

(Note that this echos Google's approach per comment 30 of initially shipping part of the API.)

Depends on D59678

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

--HG--
extra : moz-landing-system : lando
2020-01-18 05:01:14 +00:00
Jonathan Kew 44024bcdad Bug 1102584 - patch 1 - Provide somewhat better defaults for hanging and ideographic baseline alignment of canvas text. r=lsalzman
This is extracted from the original patch by Richard Matheson; it's not strictly necessary
to implementing the additional TextMetrics attributes, but OTOH if we're going to potentially
expose baseline attributes, it seems sensible to make them somewhat more meaningful than the
fallbacks in the current code.

Eventually we should use baseline tables from the font, but (a) we don't have support for
that in the back-end font code, and (b) very few fonts provide the data anyway, so while this
isn't perfect, for now it's the best we can do.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 03:46:44 +00:00
Emilio Cobos Álvarez 86a70df5d7 Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

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

--HG--
extra : moz-landing-system : lando
2020-01-08 01:21:30 +00:00
Jeff Walden 62a130ba0a Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595

--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +00:00
Bob Owen 9fa23d568b Bug 1572415: Convert clip paths when potentially changing canvas backend in CanvasRenderingContext2D. r=jrmuizel
The clip Paths in mStyleStack might not be compatible with the new mTarget, so
this converts them to make sure they are.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 21:55:04 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Jonathan Kew 1598ebe8a8 Bug 1598063 - Don't hide text styled with a pending user font when drawing canvas text, just draw with fallback instead. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D55707

--HG--
extra : moz-landing-system : lando
2019-12-03 21:14:52 +00:00
Jonathan Kew e317a07882 Bug 1554819 - Ensure fontgroups attached to CanvasRenderingContext2D get reset after a shared-fontlist rebuild. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D53264

--HG--
extra : moz-landing-system : lando
2019-11-17 11:49:20 +00:00
Gabriele Svelto 10d41866a5 Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678

--HG--
extra : moz-landing-system : lando
2019-09-30 22:06:47 +00:00
Bogdan Tara 3d6971412d Backed out changeset f2530502f6c4 (bug 1266808) for test_imagebitmap_close.html&/test_imagebitmap_cropping.html failures 2019-09-27 12:14:29 +03:00
aardgoose 9d3085776e Bug 1266808 - throw exception when canvas.drawImage passed closed ImageBitmap r=baku
Differential Revision: https://phabricator.services.mozilla.com/D31048

--HG--
extra : moz-landing-system : lando
2019-09-26 21:54:06 +00:00
Kris Taeleman 9b105034a9 Bug 1565991 - Make createpattern return null instead of throw. r=jrmuizel
* Deleted test_createPattern_broken.html as it is now irrelevant as this was testing for the broken behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 15:28:54 +00:00
Boris Zbarsky 1128b8dee8 Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D45394

--HG--
extra : moz-landing-system : lando
2019-09-12 11:01:17 +00:00
Bob Owen 2bee21f74c Bug 1575838: Check that we can create a similar DrawTarget first in canvas Adjusted targets. r=mattwoodrow
This also fixes DrawTargetSkia::CanCreateSimilarDrawTarget because currently
if only one of the height or width is negative then it doesn't get caught.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 17:14:44 +00:00
Noemi Erli 907fe70a3f Backed out changeset f69e1e9da360 (bug 1565991) for failing in test_createPattern_broken.html
--HG--
extra : rebase_source : d62dd3af0147b294668b60ae3c041e1d30b4a044
2019-08-27 19:23:31 +03:00
Kris Taeleman bd77bd2e32 Bug 1565991 - Ensure calling createPattern with `new Image()` returns null. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D42038

--HG--
extra : moz-landing-system : lando
2019-08-27 15:27:42 +00:00
Bob Owen 0514fa184b Bug 1567054: Always call EnsureTarget in CanvasRenderingContext2D::GetSurfaceSnapshot. r=jrmuizel
This reverts to the previous behavior when the function was defined in the
header file, where we always called EnsureTarget first. Not doing this
introduces an as yet unexplained performance issue in certain circumstances.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 17:41:39 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Kagami Sascha Rosylight 8f29f2145b Bug 1514538 - Support DOMMatrix2DInit for addPath r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38054

--HG--
extra : moz-landing-system : lando
2019-07-16 16:35:26 +00:00
Thomas Nguyen fc05893051 Bug 1546334 - Use referrerInfo in style system. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D36478

--HG--
extra : moz-landing-system : lando
2019-07-16 11:43:56 +00:00
Mirko Brodesser 2f40f072ab Bug 1565584: move `nsIContentUtils::ContentIsDescendantOf` to `nsINode::IsInclusiveDescendantOf`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37880
2019-07-15 10:02:21 +02:00
Andreas Pehrson 8a56ba7a99 Bug 1560979 - Account for video element's intrinsic size in CanvasRenderingContext2D::DrawImage. r=jib,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D35782

--HG--
extra : moz-landing-system : lando
2019-07-12 12:46:03 +00:00
Kagami Sascha Rosylight 8d91017fdb Bug 928150: Implement canvas getTransform() and setTransform() r=bzbarsky
Adds getTransform() and setTransform() to CanvasRenderingContext2D.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 06:14:58 +00:00
arthur.iakab 973b98aac6 Backed out changeset 0aea246d01bb (bug 928150) for causing build bustages on DOMMatrix.h CLOSED TREEE 2019-07-11 06:31:59 +03:00
Kagami Sascha Rosylight b65864cf84 Bug 928150: Implement canvas getTransform() and setTransform() r=bzbarsky
Adds getTransform() and setTransform() to CanvasRenderingContext2D.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 02:43:46 +00:00
Nicholas Nethercote ca8e78069d Bug 1561491 - Make gfx.* static prefs follow the naming convention. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D35975

--HG--
extra : rebase_source : 9090ac828f1da9582510975047d5ad59a228dda5
2019-06-26 10:38:09 +10:00