Commit Graph

2663 Commits

Author SHA1 Message Date
Botond Ballo
69b3b241f8 Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-04-28 01:40:35 +00:00
Botond Ballo
a371a07def Bug 1556556 - Add a "relative to layout viewport" option for display list building. r=mstange,mattwoodrow
Use it in document.elementFromPoint().

Differential Revision: https://phabricator.services.mozilla.com/D68914
2020-04-28 01:37:47 +00:00
Botond Ballo
79ea91cf68 Bug 1556556 - Remove some cruft related to handling the resolution in non-e10s setups. r=tnikkel
Prior to this bug, it was necessary to handle non-e10s specially, because the
resolution was being unapplied at the process boundary, and in non-e10s there
was no process boundary.

The remaining patches in this bug move the resolution unapplication away from
the process boundary in all cases, making special handling for non-e10s
unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D68273
2020-04-28 02:03:18 +00:00
Sylvestre Ledru
3322a82478 Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Kagami Sascha Rosylight
052ab6a04a Bug 1630704 - Merge nsBox into nsIFrame r=emilio
We want to merge nsFrame into nsIFrame, so this patch merges nsBox first which is the superclass of nsFrame.

Differential Revision: https://phabricator.services.mozilla.com/D71161
2020-04-18 12:06:09 +00:00
Cameron McCormack
4dcefcaa81 Bug 1616411 - Part 6: When -moz-element references an image, use the target orientation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70276
2020-04-17 02:57:44 +00:00
Cameron McCormack
3d153d107b Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274
2020-04-17 02:57:32 +00:00
Csoregi Natalia
ee575ba419 Backed out 8 changesets (bug 1616411) for webgl failures on test_2_conformance__textures__misc__texture-upload-size.html. CLOSED TREE
Backed out changeset 03dd88d53439 (bug 1616411)
Backed out changeset cfee2ce9405d (bug 1616411)
Backed out changeset 0a323c33506f (bug 1616411)
Backed out changeset 1a25353a07b0 (bug 1616411)
Backed out changeset dc64af52b5f8 (bug 1616411)
Backed out changeset 0f54b1b12105 (bug 1616411)
Backed out changeset 4dee3e753e8e (bug 1616411)
Backed out changeset 034a30a6b088 (bug 1616411)
2020-04-16 05:43:16 +03:00
Cameron McCormack
b34f7525b7 Bug 1616411 - Part 6: When -moz-element references an image, use the target orientation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70276
2020-04-16 00:34:43 +00:00
Cameron McCormack
dacef64792 Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274
2020-04-16 00:34:31 +00:00
Timothy Nikkel
095c72865a Bug 1629466. Don't clear wasPainted on the display port data if we don't have a frame. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D70666
2020-04-13 19:14:14 +00:00
Cameron McCormack
d50887d77d Bug 1629451 - Return earlier from SetDisplayPortMargins to avoid a warning in the second GetHighResolutionDisplayPort call. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70662
2020-04-13 04:06:36 +00:00
Botond Ballo
e9713aee1e Bug 1628043 - Have GetFrameForPoint and GetFramesForArea take a const nsIFrame*. r=tnikkel
This allows us to have a single const_cast inside GetFramesForArea, and
avoid several callers of these functions (which, as of bug 1556556,
get a const nsIFrame* from RelativeTo inputs) having to const_cast.

Differential Revision: https://phabricator.services.mozilla.com/D70068
2020-04-07 18:27:38 +00:00
Jonathan Kew
902aa21fe9 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787
2020-04-02 01:38:18 +00:00
Ciure Andrei
9b6eb90683 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
Timothy Nikkel
03eedf84a9 Bug 1626155. nsLayoutUtils::TransformAncestorPointToFrame passes null for ancestor frame. r=botond
It probably doesn't case any problems because the two callers of the function don't hit the case with the bug.

nsLayoutUtils::TransformRootPointToFrame passes nullptr for the ancester frame.

nsIFrame::GetContentOffsetsFromPoint only calls this function if aFrame is in an svg text subtree, so it takes the other branch.

Looks like this was a simple oversight in this change

https://hg.mozilla.org/mozilla-central/rev/204b51a6c6458a30be158a3d1bdca8e9b4edfd67

where TransformRootPointToFrame was changed to TransformAncestorPointToFrame and it originally passed nullptr (which was correct to the Root version fo the function) but didn't get updated in the change.

Differential Revision: https://phabricator.services.mozilla.com/D68954
2020-04-02 00:38:46 +00:00
Jonathan Kew
f275b6005e Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787
2020-04-01 21:42:36 +00:00
Philipp Zech
912bb5248d Bug 1625699 - Convert control-character-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68705
2020-03-28 22:17:50 +00:00
Botond Ballo
0a55d35fb4 Bug 1623476 - Rename enum RelativeTo to DisplayportRelativeTo. r=tnikkel
This is in anticipation of introducing a struct named RelativeTo
in bug 1556556.

Differential Revision: https://phabricator.services.mozilla.com/D67515
2020-03-23 22:20:11 +00:00
Botond Ballo
800e8a79b9 Bug 1623476 - Some const-correctness improvements (nsIFrame* --> const nsIFrame*) in nsLayoutUtils functions. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D67514
2020-03-23 22:19:12 +00:00
Agi Sferro
2fc8d8abb4 Bug 1621966 - Don't crash when the dynamic toolbar is bigger than the screen. r=botond,snorp
There are cases when GV is being animated and it ends up being smaller than the
dynamic toolbar for a few frames. When that happens we really don't want to
crash and we can just ignore it.

Differential Revision: https://phabricator.services.mozilla.com/D67364
2020-03-18 20:29:27 +00:00
Chris Fronk
5f4d7b6abf Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-17 12:42:12 +00:00
Kartikaya Gupta
a3d08644f7 Bug 1617427 - Add a DOMWindowUtils API to disable APZ on a particular element. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D66424
2020-03-13 19:56:33 +00:00
shindli
acf53819f5 Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE 2020-03-11 14:30:54 +02:00
Chris Fronk
3949093799 Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-11 12:18:13 +00:00
Andrew Osmond
490ae875e7 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
2020-03-09 14:16:17 +00:00
Emilio Cobos Álvarez
7724dfa5be Bug 1619664 - Rename and don't null-check nsPresContext::GetTheme as it can't return null. r=dholbert
There were some callers in nsRangeFrame that were already not-null-checking.

All platforms have a native theme and should we add new ones they could use
nsBasicNativeTheme.

Differential Revision: https://phabricator.services.mozilla.com/D65169
2020-03-04 01:58:30 +00:00
Sylvestre Ledru
230ce836cb Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D63787
2020-02-24 15:33:38 +00:00
Jeff Gilbert
52fc47d548 Bug 1616715 - SurfaceFromElement gets alpha Premult unless opt-in to NonPremult. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D63421
2020-02-21 02:27:08 +00:00
Csoregi Natalia
df466483b7 Backed out changeset 5005fe56b7b0 (bug 1616715) for failures on test_2_conformance2__canvas__to-data-url-with-pack-params.html. CLOSED TREE 2020-02-21 01:33:48 +02:00
Jeff Gilbert
1e1b54eeec Bug 1616715 - SurfaceFromElement gets alpha Premult unless opt-in to NonPremult. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D63421
2020-02-20 20:52:10 +00:00
Simon Giesecke
9bcfd47601 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980
2020-02-13 14:38:48 +00:00
shindli
6bb3487209 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
d45525793f Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980
2020-02-12 17:24:41 +00:00
Emilio Cobos Álvarez
08cc931df3 Bug 1614510 - Use cbindgen for shape-outside and clip-path. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D62372
2020-02-11 22:03:53 +00:00
Hiroyuki Ikezoe
999ddf21ce Bug 1599795 - Rename BrowserChild::GetRemoteDocumentRect to GetTopLevelViewportVisibleRectInBrowserCoords. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62183
2020-02-11 03:35:56 +00:00
Emilio Cobos Álvarez
1c221fea7d Bug 1614208 - Stop including AccessibleCaretEventHub and PresShell.h from Selection.h. r=TYLin
And fix a bunch of fallout as we now don't include nsDocShell.h everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D62169
2020-02-11 01:22:29 +00:00
Botond Ballo
80ca2d1754 Bug 1612750 - Have the main thread always populate FrameMetrics::mVisualViewportOffset. r=tnikkel
APZ may want to know what the main thread's view of the visual viewport offset
was at the time of the last paint even if the main thread does not want APZ
to scroll to that visual viewport offset.

Differential Revision: https://phabricator.services.mozilla.com/D62093
2020-02-10 15:19:46 +00:00
Miko Mynttinen
7edd6dcbd1 Bug 1612895 - Rename nsDisplayHitTestInfoItem to nsDisplayHitTestInfoBase r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D61472
2020-02-04 22:01:48 +00:00
Thomas Dolezal
1d175a57fd Bug 1611733 - Bug 1611633 - convert ns style position defines to enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61958
2020-02-07 12:35:30 +00:00
Emilio Cobos Álvarez
fea80addd7 Bug 1613349 - Rename nsINode::DeleteProperty to RemoveProperty. r=smaug
And the related methods as well.

Differential Revision: https://phabricator.services.mozilla.com/D61768
2020-02-06 16:06:49 +00:00
Ting-Yu Lin
bc3ed57b49 Bug 1610670 - Add AllPhysicalHalfCorners() to support range-based for loops. r=mats
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.
3. Add brackets for the for loop in nsCSSRendering.cpp.

```

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "NS_FOR_CSS_HALF_CORNERS\(i\)" "for (const auto i : mozilla::AllPhysicalHalfCorners())"
rename "NS_FOR_CSS_HALF_CORNERS\(corner\)" "for (const auto corner : mozilla::AllPhysicalHalfCorners())"
```

Differential Revision: https://phabricator.services.mozilla.com/D61252
2020-02-04 03:28:47 +00:00
Miko Mynttinen
f77093bb29 Bug 1570363 - Do not discard width and height for empty SVG reference rects r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D61175
2020-01-30 15:06:29 +00:00
Thomas Dolezal
abe9d217e7 Bug 1611041 - Convert image-rendering #defines to an enum class. r=emilio
MANUAL PUSH: Contributor didn't use Phabricator and I don't want patch to rot
2020-01-30 04:50:24 +01:00
Emilio Cobos Álvarez
79768ff848 Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857
2020-01-24 11:46:14 +00:00
Nazım Can Altınova
6c84e9b60a Bug 1609708 - Rename PROFILER_TRACING to PROFILER_TRACING_MARKER. r=gerald
Depends on D60229

Differential Revision: https://phabricator.services.mozilla.com/D60231
2020-01-17 21:29:15 +00:00
Sylvestre Ledru
36a1079e0f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58175
2020-01-09 21:50:11 +00:00
Botond Ballo
18d58605dc Bug 1601568 - Only send a SetTargetAPZC notification right away if the target has a displayport and it has been painted. r=tnikkel
Merely checking for having a displayport isn't enough, because the paint to
tell APZ about the new scroll frame could still be pending.

Differential Revision: https://phabricator.services.mozilla.com/D56662
2019-12-16 19:45:02 +00:00
Emilio Cobos Álvarez
bdf1376152 Bug 1603313 - Remove some silly patterns. r=bzbarsky
foo ? true : false

or:

  foo ? false : true

Have always a nicer way to be written.

Differential Revision: https://phabricator.services.mozilla.com/D56842
2019-12-14 05:05:01 +00:00
Emilio Cobos Álvarez
1fccbabe09 Bug 1602317 - Switch style system to associated constants-in-body. r=heycam
This is closer to the equivalent Rust code.

Differential Revision: https://phabricator.services.mozilla.com/D56306
2019-12-09 03:32:28 +00:00