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

67977 Коммитов

Автор SHA1 Сообщение Дата
Miko Mynttinen a44f50e1ed Bug 1534821 - Add early exit from CollectItemsWithOpacity() for large nsDisplayOpacities r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D23237

--HG--
extra : moz-landing-system : lando
2019-03-13 16:17:19 +00:00
Masayuki Nakano a5791dba14 Bug 1466208 - part 45: Rename `aFrame` of `HandleEvent()` to `aFrameForPresShell` r=smaug
Now, other methods taking `aFrame` of `HandleEvent()` names the argument as
`aFrameForPresShell`.  So, `HandleEvent()`'s `aFrame` should also be renamed.

This patch renames it and adds MOZ_CAN_RUN_SCRIPT and comment to
`nsIPresShell::HandleEvent()`.

This is the final patch for bug 1466208.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 10:32:36 +00:00
Boris Zbarsky 4ff91d4938 Bug 1506439 part 2. Stop creating a useless nsCOMPtr in DispatchInputEvent. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23068

--HG--
extra : moz-landing-system : lando
2019-03-13 02:34:48 +00:00
Boris Zbarsky ccfb4f16b1 Bug 1534370 part 1. Annotate doCommandWithParams as MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23036

--HG--
extra : moz-landing-system : lando
2019-03-13 00:43:48 +00:00
Boris Zbarsky 5bf2e408e6 Bug 1534608. MOZ_CAN_RUN_SCRIPT should disallow non-stack refptr arguments. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23217

--HG--
extra : moz-landing-system : lando
2019-03-13 00:30:11 +00:00
Jeff Muizelaar a00f951356 Bug 1534250. Always paint the entire mask. r=mattwoodrow
Previously we would only paint the building area but we
would not do anything to check that the building area had
changed. Since, we're already allocating a surface for the entire
item it's better to just paint it and not worry about doing extra
invalidations.

Originally, we used mVisibleRect here. That was changed to GetPaintRect()
in part 1 of 1460491 and then to GetBuildingRect in part 2. However,
I think the original code was always wrong and we should've been using
mBounds the whole time.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 15:43:56 +00:00
Emilio Cobos Álvarez 1daca69d91 Bug 1533424 - Don't allow InspectorUtils to mess up with our UA sheets. r=heycam
You can mess up stuff pretty badly if that happens, and we want to do this
anyway for the shared UA sheet stuff, so...

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

--HG--
extra : moz-landing-system : lando
2019-03-12 15:17:54 +00:00
Masayuki Nakano 229762b203 Bug 1466208 - part 44: Rename PresShell::EventHandler::HandleEventInternal() to HandleEventWithCurrentEventInfo() r=smaug
In my understanding, `PresShell::EventHandler::HandleEvent()` may redirect
the event to another class or PresShell first.  Otherwise, it computes
event target and sets current event info of mPresShell to it.  Then, calls
`HandleEventInternal()` to dispatch the event.  Then, `HandleEventInternal()`
may handle the event before dispatch, and/or prepare to dispatch, then,
finally dispatches the event and finalize the state of mPresShell and the
event.  Therefore, `HandleEventInternal()` actually handles the event, but
the word, "internal" is not explicitly explain its different points from
`HandleEvent()`.  Therefore, I think that `HandleEventWithCurrentEventInfo()`
is better name since `HandleEvent()` considers the current event info.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 04:25:13 +00:00
Cameron McCormack 082aab3aaf Bug 1534471 - Reformat a couple of layout/style/ files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23059

--HG--
extra : moz-landing-system : lando
2019-03-12 00:14:00 +00:00
Olli Pettay bc7cdf91ba Bug 1265104, paint dnd'ed content also when it is under non-displayed content (display: contents or ShadowRoot), r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23050

--HG--
extra : moz-landing-system : lando
2019-03-11 22:47:12 +00:00
Miko Mynttinen cbfb3b6b0b Bug 1534450 - Remove nsDisplayBackgroundColor::mBackgroundStyle r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D23055

--HG--
extra : moz-landing-system : lando
2019-03-11 23:03:09 +00:00
Masayuki Nakano 5c8444252b Bug 1466208 - part 43: Create PresShell::EventHandler::FinalizeHandlingEvent() r=smaug
Finally, we should move the last switch statement in `HandleEventInternal()`
to the new method.  Then, `HandleEventInternal() does nothing complicated
things by itself.

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

--HG--
extra : moz-landing-system : lando
2019-03-11 01:52:40 +00:00
Hiroyuki Ikezoe 5d075461ea Bug 1534158 - Drop InspectorUtils.scrollElementIntoView. r=emilio
This was introduced in bug 1018324 for the DOM Inspector addon but we no longer
support those kinds of addons.

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

--HG--
extra : moz-landing-system : lando
2019-03-11 19:23:29 +00:00
Henrik Skupin 4b889bad47 Bug 1533786 - [marionette] Add support for the WebDriver Actions API. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D22757

--HG--
extra : moz-landing-system : lando
2019-03-11 20:33:49 +00:00
Matt Woodrow c9e19a7db0 Bug 1529458 - Only create new hit test info for positioned frame if they might be sorted into a different location. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D22649

--HG--
extra : moz-landing-system : lando
2019-03-11 18:36:42 +00:00
Dorel Luca 57823a4f04 Backed out changeset e510d3ed595a (bug 1533786) for Marionette failures 2019-03-11 20:38:21 +02:00
Henrik Skupin c7b107e581 Bug 1533786 - [marionette] Add support for the WebDriver Actions API. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D22757

--HG--
extra : moz-landing-system : lando
2019-03-11 15:26:20 +00:00
Boris Zbarsky 68863e1004 Bug 1533617 part 4. Mark virtual methods with CAN_RUN_SCRIPT overrides as CAN_RUN_SCRIPT. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D22838

--HG--
extra : moz-landing-system : lando
2019-03-11 14:20:29 +00:00
Boris Zbarsky 6f2f3304b0 Bug 1533617 part 1. Improve MOZ_CAN_RUN_SCRIPT annotations around synth mouse events. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D22835

--HG--
extra : moz-landing-system : lando
2019-03-11 14:58:04 +00:00
Matt Woodrow 6ae273bc63 Bug 1518524 - Don't try to restore the previous FrameLayerBuilder after a transaction since it should always be nullptr anyway. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D21879

--HG--
extra : moz-landing-system : lando
2019-03-06 15:56:55 +00:00
Masayuki Nakano 60f9f583fc Bug 1466208 - part 42: Clean up PresShell::EventHandler::DispatchEvent() with using early-return style r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D22460

--HG--
extra : moz-landing-system : lando
2019-03-11 01:52:17 +00:00
Victor Porof 9783bee1be Bug 1529900 - Columnpicker restore column order doesn't work anymore, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D22094

--HG--
extra : moz-landing-system : lando
2019-03-05 16:35:01 +00:00
Matt Woodrow d9bacb3214 Bug 1533317 - Only invalidate items from the current frame, not descendants when we start needing a wrap list during a partial display list build. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D22636

--HG--
extra : moz-landing-system : lando
2019-03-11 02:35:32 +00:00
shindli 1c03485629 Backed out changeset 200ab1e8d571 (bug 1533317) for multiple reftest failures 2019-03-11 02:26:27 +02:00
Masayuki Nakano 2e39c4ee90 Bug 1466208 - part 41: Create PresShell::EventHandler::DispatchEvent() r=smaug
This is the part which actually handles the event.  The new method should
notify EventStateManager of dispatching event before and after that, and
actually dispatch the event into the DOM.

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

--HG--
extra : moz-landing-system : lando
2019-03-09 23:39:16 +00:00
Matt Woodrow fd0b75b269 Bug 1533317 - Only invalidate items from the current frame, not descendants when we start needing a wrap list during a partial display list build. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D22636

--HG--
extra : moz-landing-system : lando
2019-03-10 22:16:11 +00:00
Masayuki Nakano 930da74b1d Bug 1466208 - part 40: Create PresShell::EventHandler::PrepareToDispatchEvent() r=smaug
For making `PresShell::EventHandler::HandleEventInternal()` easier to read,
move the large switch statement for preparation into the new method.

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

--HG--
extra : moz-landing-system : lando
2019-03-09 23:38:38 +00:00
Masayuki Nakano 1b0e6d02fe Bug 1466208 - part 39: Create PresShell::EventHandler::MaybeHandleKeyboardEventBeforeDispatch() r=smaug
`PresShell::EventHandler::HandleEventInternal()` may handle `Escape` key before
dispatching it in some cases.  This requires too many lines for somebody who
investigate the method for the other events.  Therefore, this patch moves it
into the new method.

Additionally, this patch creates `WidgetKeyboardEvent::CanTreatAsUserInput()`
and `WidgetKeyboardEvent::ShouldInteractionTimeRecorded()` because we should
manage similar checks in one place (we already have
`WidgetKeyboardEvent::CanUserGestureActivateTarget()`).  Finally, their
conditions are not enough for what the comment wants to do there since they do
not check some modifier keys.  Therefore, this patch makes them check all
possible modifier keys too.

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

--HG--
extra : moz-landing-system : lando
2019-03-08 12:46:17 +00:00
Razvan Maries 87c4a3175f Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-03-09 23:55:26 +02:00
Henri Sivonen decc78f432 Bug 1530661 - Make APZ report the per LayersId layer-to-screen transform matrices to the chrome process. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D22082

--HG--
extra : moz-landing-system : lando
2019-03-09 20:33:17 +00:00
longsonr 1260feab53 Bug 1531578 - don't process nsChangeHint_UpdateSubtreeOverflow for nondisplay frames r=dholbert 2019-03-09 16:01:31 +00:00
longsonr 65caeb2944 Bug 1532444 - Go back to doing synchronous invalidation in ReflowSVGNonDisplayText as its invoked by ScheduleReflowSVGNonDisplayText so is already asynchronous r=dholbert 2019-03-09 14:14:33 +00:00
violet 7d525e84a8 Bug 1508028 - Change stroke-miterlimit restriction from GreaterThanOrEqualToOneNumber to NonNegativeNumber. r=longsonr,emilio 2019-03-09 13:05:56 +00:00
Masayuki Nakano cca9243a46 Bug 1466208 - part 38: Create PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
The first switch statement of `PresShell::EventHandler::HandleEventInternal()`
has 2 jobs:
- Prepare something for specific event type.
- Record the preparation time of some types of events to telemetry.

This intermixed code is not easy to understand and somebody may add new
preparation after recording them.  So, even though the preparation time
becomes worse a couple of nanoseconds, we should split those jobs.

The patch moves the latter job into the new method.

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

--HG--
extra : moz-landing-system : lando
2019-03-08 23:41:30 +00:00
Dorel Luca 23fb3d3791 Merge mozilla-inbound to mozilla-central. a=merge 2019-03-09 11:47:52 +02:00
Bogdan Tara e3008ee390 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-03-08 23:57:07 +02:00
Masayuki Nakano e43a1df256 Bug 1466208 - part 37: Move trusted eMouseMove event preparation into the previous switch-case block r=smaug
Oddly, there are two trusted eMouseMove preparation code in
`PresShell::EventHandler::HandleEventInternal()`.  One is in the `switch`
statement which is used only when `aEvent` is trusted.  The other is after
`TouchManager::PreHandleEvent()` is called and after
`AutoHandlingUserInputStatePusher` is created.  However, both of them do
nothing if the event is `eMouseMove`.  Therefore, we can move the latter
into the former.

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

--HG--
extra : moz-landing-system : lando
2019-03-08 23:37:34 +00:00
Csoregi Natalia afc7afdf16 Backed out 2 changesets (bug 1532850) for apilint failure. CLOSED TREE
Backed out changeset 8feadb1f48f2 (bug 1532850)
Backed out changeset d3eed8f55897 (bug 1532850)
2019-03-09 03:13:56 +02:00
Daniel Holbert 3f763b8af9 Bug 1533870: Preemptively fix unified build bustage in layout/style. r=boris
I wrote this patch by first removing UNIFIED_ from layout/style/moz.build, and
then rebuilding, and then addressing build errors one by one.

Nearly all of the build errors were for using the "Document" type without a
proper namespace, and I've addressed this by sprinkling "using namespace"
declarations in the affected .cpp files (and removing a few now-unnecessary
dom:: prefixes on types in those files).

The only other errors were for WorkletGlobalScope.h which needed an #include to
provide the type "DOMHighResTimeStamp", and nsHTMLStyleSheet.h which needed a
forward-declaration for the type "mozilla::dom::Document".

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

--HG--
extra : moz-landing-system : lando
2019-03-08 21:48:39 +00:00
Oana Pop Rus 672a921504 Backed out changeset b56791a96f96 (bug 1533424) for crashtest on test_parsingMode.html on a CLOSED TREE 2019-03-08 17:42:37 +02:00
Hiroyuki Ikezoe 3673780587 Bug 1532850 - Check the return value of LookAndFeel::GetInt() in case of the function failure. r=emilio
Actually the function will fail on Android since on xpcshell tests we don't
initialize AndroidBridge so that we can't query the corresponding system
settings.

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

--HG--
extra : moz-landing-system : lando
2019-03-09 00:17:19 +00:00
Emilio Cobos Álvarez ea424f0740 Bug 1533424 - Don't allow InspectorUtils to mess up with our UA sheets. r=heycam
You can mess up stuff pretty badly if that happens, and we want to do this
anyway for the shared UA sheet stuff, so...

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

--HG--
extra : moz-landing-system : lando
2019-03-08 13:54:11 +00:00
Ryan Hunt c39b1f89d0 Bug 1532725 - Rename PRemoteFrame to PBrowserBridge. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D22132

--HG--
rename : dom/ipc/RemoteFrameChild.cpp => dom/ipc/BrowserBridgeChild.cpp
rename : dom/ipc/RemoteFrameChild.h => dom/ipc/BrowserBridgeChild.h
rename : dom/ipc/RemoteFrameParent.cpp => dom/ipc/BrowserBridgeParent.cpp
rename : dom/ipc/RemoteFrameParent.h => dom/ipc/BrowserBridgeParent.h
rename : dom/ipc/PRemoteFrame.ipdl => dom/ipc/PBrowserBridge.ipdl
extra : rebase_source : d5ca117b96c0d266041d23d80f0f4ab9b0471fb6
2019-03-04 20:15:58 -06:00
Andrea Marchesini 8e20bbbc9a Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-08 09:04:11 +00:00
arthur.iakab 77aa564189 Merge mozilla-central to autoland 2019-03-08 06:41:04 +02:00
arthur.iakab 013bbfceb8 Merge inbound to mozilla-central a=merge 2019-03-08 06:39:50 +02:00
arthur.iakab 6ac3e940d9 Merge autoland to mozilla-central a=merge 2019-03-08 06:38:18 +02:00
Neil Deakin b1a0d8a2a9 Bug 1519960, add a previousColumn property for tree columns so that tree drag and drop will work without box objects, r=bzbarsky
--HG--
extra : rebase_source : 35a235ee1119308021685d173c6b6d7487481f5b
2019-03-07 17:57:18 -05:00
Neil Deakin bdd278ae2c Bug 1519956, remove box object related crashtests that will no longer be applicable with no box objects, r=bzbarsky
--HG--
extra : rebase_source : d5dc1a25a740f9d95d00b261873a150f657c05d5
2019-03-07 17:57:12 -05:00
arthur.iakab 85ad02d41a Merge inbound to mozilla-central a=merge 2019-03-07 23:58:42 +02:00
Emilio Cobos Álvarez 70d739d347 Bug 1215878 - Temporarily skip font-family subtest because of bug 1533392.
CLOSED TREE
2019-03-07 20:41:06 +01:00
Botond Ballo d1666c7f65 Bug 1158392 - Make sure the 113905-*-vh-*.html tests do not render as blank. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D19682

--HG--
extra : moz-landing-system : lando
2019-03-07 18:03:23 +00:00
Botond Ballo 3ddbc386e0 Bug 1158392 - Disable 1133905-*-vh-rtl reftests with zoom levels > 1. r=kats
These were rendering as blank with container scrolling, and their failure with
containerless scrolling is caused by an unrelated viewport bug, tracked in
bug 1527511.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 18:03:03 +00:00
Botond Ballo 0a8f586cc5 Bug 1158392 - Fix 1133905-*-vh-*.html reftests so they are valid in the presence of new viewport sizing rules. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D19680

--HG--
extra : moz-landing-system : lando
2019-03-07 18:02:48 +00:00
Botond Ballo 2412bb993a Bug 1158392 - Mark some more webm-video reftests as failing or random on Android. r=kats
Manual testing shows expected rendering of the pages in question. The tests
do not reproduce locally and are tricky to debug on Try. Moreover, most
other reftests in this directory are already marked as failing or random
on Android.

For these reasons, I don't want these failures to block the rollout of
containerless scrolling. Bug 1084564 tracks re-enabling them.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 18:02:34 +00:00
Ciure Andrei 712dd2bb8c Backed out 16 changesets (bug 1525245) for perma failing test_document_cookie.html CLOSED TREE
Backed out changeset 3fd27215698f (bug 1525245)
Backed out changeset d9a9e8e77873 (bug 1525245)
Backed out changeset 0e6f7be92e3f (bug 1525245)
Backed out changeset 6790802e2fa5 (bug 1525245)
Backed out changeset a5a9e01116ed (bug 1525245)
Backed out changeset 66e19a0c38dd (bug 1525245)
Backed out changeset fb90d51ba853 (bug 1525245)
Backed out changeset 4772db3625b3 (bug 1525245)
Backed out changeset 9affaf0cb998 (bug 1525245)
Backed out changeset a91b7ebe8bdd (bug 1525245)
Backed out changeset c2a13a7480e1 (bug 1525245)
Backed out changeset abe4482fa137 (bug 1525245)
Backed out changeset b3920c0bcf84 (bug 1525245)
Backed out changeset 0821b81f2724 (bug 1525245)
Backed out changeset 70bed2ad7899 (bug 1525245)
Backed out changeset 5f72ba232cc8 (bug 1525245)
2019-03-07 17:54:18 +02:00
Miko Mynttinen 8625692016 Bug 1526941 - Part 5: Rewrite nsDisplayTransform bounds calculations r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D22333

--HG--
extra : moz-landing-system : lando
2019-03-07 17:13:45 +00:00
Miko Mynttinen 2ab05c6458 Bug 1526941 - Part 4: Remove mStoredList from nsDisplayTransform r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D21187

--HG--
extra : moz-landing-system : lando
2019-03-07 17:13:17 +00:00
Miko Mynttinen dd22737962 Bug 1526941 - Part 3: Use mozilla::UniquePtr for mTransformPreserves3D r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D21186

--HG--
extra : moz-landing-system : lando
2019-03-07 17:12:59 +00:00
Miko Mynttinen 11e49ee34d Bug 1526941 - Part 2: Refactor nsDisplayWrapList::GetComponentAlphaBounds() and nsDisplayWrapList::GetOpaqueRegion() and move some of the logic to nsDisplayList r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D21185

--HG--
extra : moz-landing-system : lando
2019-03-07 17:12:44 +00:00
Miko Mynttinen d546ab5155 Bug 1526941 - Part 1: Simplify nsDisplayTransform constructors r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D21184

--HG--
extra : moz-landing-system : lando
2019-03-07 17:12:21 +00:00
Timothy Nikkel 7e07e94a56 Bug 1306896. Disable assert on 32-bit Windows. r=kats
The Timestamp implementation on Windows seems to be based off of two system APIs: GetTickCount64 and QueryPerformanceCounter. QPC seems to be preferred over GTC, unless a "failure" in QPC is detected.

There is code in the Timestamp implementation to detect if QPC "fails" be comparing elapsed time of QPC to elapsed time of GTC.

Through logging on try server I observed the following in different failures:

1) the QPC failure detection kicks in a lot and disables use of QPC
2) the QPC of the vsync timestamp was in the future compared to the QPC of TimeStamp::Now().
3) the QPC of TimeStamp::Now() was missing (presumably because it was disabled) and the GTC of the vsync timestamp was in the future compared to the GTC of TimeStamp::Now()
4) the vsync timestamp printf of raw GTC and QPC values matched at the source (SoftwareDisplay::NotifyVsync) and in the refresh driver, so the vsync timestamp wasn't getting messed up.

I guess we could spend more time on the error detection in our Windows TimeStamp code, but this failure is only happening on 32-bit machines.

Here's a patch to disable the assertions on 32-bit Windows. Depends how important we think this assertion is relative to the work to investigate more.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 14:24:23 +00:00
Emilio Cobos Álvarez 0b5807bc62 Bug 1215878 - Implement CSS revert keyword. r=heycam,birtles
The only fishy bit is the animation stuff. In particular, there are two places
where we just mint the revert behavior:

 * When serializing web-animations keyframes (the custom properties stuff in
   declaration_block.rs). That codepath is already not sound and I wanted to
   get rid of it in bug 1501530, but what do I know.

 * When getting an animation value from a property declaration. At that point
   we no longer have the CSS rules that apply to the element to compute the
   right revert value handy. It'd also use the wrong style anyway, I think,
   given the way StyleBuilder::for_animation works.

   We _could_ probably get them out of somewhere, but it seems like a whole lot
   of code reinventing the wheel which is probably not useful, and that Blink
   and WebKit just cannot implement either since they don't have a rule tree,
   so it just doesn't seem worth the churn.

The custom properties code looks a bit different in order to minimize hash
lookups in the common case. FWIW, `revert` for custom properties doesn't seem
very useful either, but oh well.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 11:59:36 +00:00
Masayuki Nakano 20dc75af80 Bug 1466208 - part 34: Create a helper class, PresShell::EventHandler::HandlingTimeAccumulator() r=smaug
`PresShell::EventHandler::HandleEventInternal()` needs to accumulate event
handling time per each event type.  The handling start time needs to be
recorded before sending EventStateManager.  Therefore, this patch makes the
helper class which is a stack class, records current time at construction
and calls `Telemetry::AccumulateTimeDelta()` at destruction automatically.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 06:30:08 +00:00
Andrea Marchesini 6856f88972 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-07 10:21:15 +00:00
Brian Birtles b956fdbf9f Bug 1532568 - Don't pass the display item types to FrameLayerBuilder::EnumerateGenerationForDedicatedLayers; r=hiro
We always pass the same set of types so it seems simpler to just look it up
within the function itself.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 05:40:24 +00:00
Brian Birtles 46f45a965b Bug 1532568 - Look up the animation generation on the primary frame for transform display items; r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D22443

--HG--
extra : moz-landing-system : lando
2019-03-07 05:40:51 +00:00
Masayuki Nakano 933d7866ff Bug 1466208 - part 35: Reduce one indent level in PresShell::EventHandler::HandleEventInternal() r=smaug
If `aEvent` requires frame but there is no event target,
`PresShell::EventHandler::HandleEventInternal()` just records the response
time.  So, we can reduce one indent level in the big method.

Note that I'm not sure recording the response time in such case because
the *good* values may make the average and median better.  But this is
out of scope of bug 1466208.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 06:30:36 +00:00
Emilio Cobos Álvarez 7c218f7b2a Bug 1533392 - followup: Remove ok() calls since we have testharness.js tests using this file.
CLOSED TREE
2019-03-08 00:47:19 +01:00
Hiroyuki Ikezoe af78a85968 Bug 1532443 - Drop clampScrollPoistion stuff. r=kats
This was introduced in bug 726817 for B2G stuff and there is no call site of
SetClampScrollPosition now and the only one entry point to call the function
was nsIFrameLoader.clampScrollPosition which was removed in
https://hg.mozilla.org/mozilla-central/rev/cd9aace7bb96 .

ScrollFrameHelper::ShouldClampScrollPosition() had always returned true in both
cases of root and non-root scrollable frames. (In the case of non-root
scrollable, nsFrameLoader.mClampScrollPosition is initially set to true and
nobody changes the value)

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

--HG--
extra : moz-landing-system : lando
2019-03-04 22:16:46 +00:00
Masayuki Nakano 6f89be791a Bug 1466208 - part 33: Create PresShell::EventHandler::RecordEventHandlingResponsePerformance() r=smaug
`PresShell::EventHandler::HandleEventInternal()` recodes event handling
response performance with telemetry after it dispatches the event.  We can move
it into new method simply.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 06:03:54 +00:00
Glenn Watson e920cc3f6a Bug 1533236 - Add a fast path to WR for common gradient types. r=kvark
The existing linear gradient shader is quite slow, especially
on very large gradients on integrated GPUs.

The vast majority of gradients in real content are very simple
(typically < 4 stops, no angle, no repeat). For these, we can
run a fast path to persist a small gradient in the texture cache
and draw the gradient via the image shader.

This is _much_ faster than the catch-all gradient shader, and also
results in better batching while drawing the main scene.

In future, we can expand the fast path to handle more cases, such
as angled gradients. For now, it takes a conservative approach,
but still seems to hit the fast path on most real content.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 21:20:40 +00:00
Emilio Cobos Álvarez 045148755c Bug 1533392 - Fix initial font-family detection in property-database.js. r=dholbert
Calling getComputedStyle on an element outside of the document always returns
the empty string since bug 1511138, so we were incorrectly thinking that the
initial font-family was serif when it was not.

I chose a <meta> element instead of a <div> because they're undisplayed and they
don't cause the <body> of the document to start (though I _think_ that only
happens from the parser).

In any case I'm pretty surprised this didn't cause issues in other tests...

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

--HG--
extra : moz-landing-system : lando
2019-03-07 21:27:23 +00:00
arthur.iakab 93997623bd Merge mozilla-central to autoland a=merge on a CLOSED TREE 2019-03-08 00:14:12 +02:00
Masayuki Nakano c59fa8ef73 Bug 1466208 - part 36: Create PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
If `Shift` state of `eContextMenu` event is active, we make it not fired on
web content.  Additionally, if it's not time to open context menu, we shouldn't
dispatch it into the DOM.  The new method prepare and check them.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 10:33:52 +00:00
Jan Varga 39748c637d Bug 1526891 - Part 6: Introduce InitializeQuotaManager and call it in nsLayoutStatics::Initialize; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20915
2019-02-23 17:08:42 +01:00
hrdktg 91e094a66a Bug 1532570 - nsDOMCSSDeclaration::SetProperty should check for the "important" string in a case-insensitive way. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D22423

--HG--
extra : moz-landing-system : lando
2019-03-06 23:36:23 +00:00
Daniel Holbert f5d7a9b940 Bug 1533088: Initialize member-var FlexItem::mAlignSelfFlags to zero, in the legacy-box and 'visibility:collapse' FlexItem scenarios. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22350

--HG--
extra : moz-landing-system : lando
2019-03-06 23:11:19 +00:00
Emilio Cobos Álvarez cb19991fd7 Bug 1533142 - Use more cbindgen features. r=kats
We can get back the fancy flag syntax as soon as we get C++17 inline variables,
which I sent an email to dev-platform@ about, with no reply.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 23:01:11 +00:00
Botond Ballo 5a7e4e2124 Bug 1528743 - Move the top-layer display items inside the async zoom container. r=mstange
This maintains the important invariant that layers that carry scroll metadata
for the RCD-RSF are inside the async zoom container.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 22:51:09 +00:00
Emilio Cobos Álvarez 2028cb1479 Bug 1530751 - Make the pres context optional in the style system. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D21239

--HG--
extra : moz-landing-system : lando
2019-03-06 21:36:12 +00:00
Emilio Cobos Álvarez 8c9a745531 Bug 1530193 - Refactor preference stylesheet prefs to not require a pres context. r=jwatt
We really only have two sets of prefs, one for chrome-like documents
(stuff in chrome docshells + chrome-origin images), and one for the rest.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 21:34:30 +00:00
Emilio Cobos Álvarez 136be39b83 Bug 1532768 - Don't crash when given bad types to cssPropertySupportsType. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22222

--HG--
extra : moz-landing-system : lando
2019-03-06 20:50:19 +00:00
Daniel Holbert 99a091abb7 Bug 1532833: Use servo code to serialize CSS 'contain' property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D22260

--HG--
extra : moz-landing-system : lando
2019-03-06 16:50:05 +00:00
Daniel Holbert 1467eb13b8 Bug 1530896: Drop css parser support for 'contain:style'. r=emilio
We're not sure we're going to ship support for this value, and it's been marked
as 'at-risk' in the spec, so let's stop pretending we support it in the parser.

Spec issue:
https://github.com/w3c/csswg-drafts/issues/3280

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

--HG--
extra : moz-landing-system : lando
2019-03-06 20:44:37 +00:00
Dorel Luca ac34e1d973 Backed out 16 changesets (bug 1525245) for Android failures. CLOSED TREE
Backed out changeset 9f8a1b410320 (bug 1525245)
Backed out changeset 0ef284a9a1d5 (bug 1525245)
Backed out changeset 835e5f642a03 (bug 1525245)
Backed out changeset 362f5a8d033c (bug 1525245)
Backed out changeset 9da3ab33cf67 (bug 1525245)
Backed out changeset 6aacd2d6e835 (bug 1525245)
Backed out changeset 8ff9e8f45e02 (bug 1525245)
Backed out changeset 2020227181cc (bug 1525245)
Backed out changeset fc3c64c330b9 (bug 1525245)
Backed out changeset 2762bf88e050 (bug 1525245)
Backed out changeset ffc10fdc50a6 (bug 1525245)
Backed out changeset bb6ade1207d7 (bug 1525245)
Backed out changeset 1875eb5085e4 (bug 1525245)
Backed out changeset 7e4f67a6d6f1 (bug 1525245)
Backed out changeset e671fc9581eb (bug 1525245)
Backed out changeset b89f5def8d0d (bug 1525245)
2019-03-06 21:07:49 +02:00
Jan Henning 50c69a3713 Bug 1529863 - Remove remnants of unused browser.firstrun and browser.snippets prefs. r=geckoview-reviewers,whimboo,esawin
"browser.firstrun.*" seems to have been unused since the end of XUL-based
Fennec, whereas the code referencing the "browser.snippets.*" prefs was removed
in bug 1482836.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 14:59:46 +00:00
Emilio Cobos Álvarez fdb4ec179c Bug 1533040 - Remove invalid NS_WARNING_ASSERTION. r=dholbert
We can totally get there with a negative percentage basis, see comment 0 for an
example.

We could keep the warning like:

  NS_WARNING_ASSERTION(clamping_mode == StyleAllowedNumericType::All ||
                       basis >= 0, "nscoord overflow?");

Which will catch cases where the style system would refuse to parse a negative
<length-percentage>, but we got a negative percent basis, which would be weird.

But that's a bit misleading since right now at least we rely on the caller to do
the appropriate clamping. I also think that NS_WARNING_ASSERTION is not very
useful, since we're not very likely to catch stuff with it. But anyhow, your
call.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 17:13:14 +00:00
Andrea Marchesini 4fabb4a2a8 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-06 17:04:06 +00:00
David Major dc3f107c67 Bug 1528071 - Re-unify some source files that had been de-unified for MSVC. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D22015

--HG--
extra : moz-landing-system : lando
2019-03-05 06:38:49 +00:00
Masayuki Nakano 90e0a6d2d9 Bug 1466208 - part 32: Create PresShell::EventHandler::HandleEventAtFocusedContent() and PresShell::EventHandler::HandleEventWithFrameForPresShell() r=smaug
The remaining part of `PresShell::EventHandler::HandleEvent()` does:
1. Handles the event at focused content.
2. Handles the event with given frame which is a frame for `mPresShell`.

For making them clearer, this patch moves them into new methods.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 06:03:31 +00:00
Emilio Cobos Álvarez f3861e094c Bug 1532856 - Serialize radii with servo. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22231

--HG--
extra : moz-landing-system : lando
2019-03-06 04:47:47 +00:00
David Major 2b024928d3 Bug 1528071 - Move `GetAtomBase`s into classes to avoid unified name conflict. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22013

--HG--
extra : moz-landing-system : lando
2019-03-06 04:41:13 +00:00
Csoregi Natalia 56c430aac5 Merge mozilla-central to autoland. CLOSED TREE
--HG--
extra : rebase_source : 10555d94c948e45e86188feff6153ac981879fcc
2019-03-06 12:39:05 +02:00
Gurzau Raul 0208b45a04 Backed out changeset 6878f6294d68 (bug 1519718) for bustages on a CLOSED TREE. 2019-03-06 12:34:28 +02:00
Csoregi Natalia fbb251448f Merge inbound to mozilla-central. a=merge 2019-03-06 11:56:17 +02:00
Gurzau Raul 0e6a425f79 Backed out 2 changesets (bug 1519718) for performance regression (bug 1530611) on a CLOSED TREE.
Backed out changeset 9bae35dc1471 (bug 1519718)
Backed out changeset 640e731ed52e (bug 1519718)

--HG--
extra : rebase_source : ee2bc4503c84e709f7cd2265b4b6286960c20d4a
2019-03-06 11:47:53 +02:00
Matt Woodrow f1c492571e Bug 1529831 - Don't create wrap lists for positioned frames that are leaves. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D20773

--HG--
extra : moz-landing-system : lando
2019-03-05 20:45:40 +00:00
Daniel Holbert afe37f4964 Bug 1532835: clang-format nsStyleConsts.h. r=emilio
There aren't any manual changes here; this is just from me running:
  ./mach clang-format  -p layout/style/nsStyleConsts.h

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

--HG--
extra : moz-landing-system : lando
2019-03-06 00:54:05 +00:00
Emilio Cobos Álvarez 87b3e6bbd3 Bug 1450652 - Remove platform support for display="" in XBL bindings. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D12586

--HG--
extra : moz-landing-system : lando
2019-03-06 00:47:13 +00:00
Masayuki Nakano 772c722daf Bug 1466208 - part 31: Create a PresShell::EventHandler::MaybeHandleEventWithAnotherPresShell() overload r=smaug
If focused element is in another document,
`PresShell::EventHandler::HandleEvent()` needs to retarget the event to another
`PresShell`.  This patch moves the case into new overload method,
`MaybeHandleEventWithAnotherPresShell()`.

Additionally, removes `PresShell::HandleRetargetedEvent()` and makes
`EventHandler::HandleRetargetedEvent()` non-public because the new method
is the only user of them.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 06:09:02 +00:00
shindli 1be0a5d3ce Merge inbound to mozilla-central. a=merge 2019-03-05 23:41:05 +02:00
Daniel Holbert e2f3884dca Bug 1530048 part 1: Remove quirks-mode-only UA stylesheet rule that made table borders gray. r=dbaron
This quirk was originally for compatibility with IE, but IE doesn't have this
special behavior anymore (in quirks-mode or in standards-mode).
And Blink/WebKit have yet another set of behaviors, which are also not
quirks-mode-dependent, and vary depending on the part of the table:
 https://bugs.chromium.org/p/chromium/issues/detail?id=935708
 https://bugs.chromium.org/p/chromium/issues/detail?id=935729

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

--HG--
extra : moz-landing-system : lando
2019-03-04 23:33:50 +00:00
Neil Deakin 68ec31a473 Bug 1530594, generate frames before setting the active child in a menulist, so that menulists with sizetopopup='none' will still allow keyboard navigation when the menulist has not yet been opened, updated to get popup type earlier to avoid possible crash, r=tnikkel
--HG--
extra : rebase_source : 953446ea44e48966fa41f8623aae259aed032ca0
2019-03-05 04:32:40 -05:00
Bogdan Tara 3e0f1d95fc Merge inbound to mozilla-central. a=merge 2019-03-05 11:27:18 +02:00
Matt Woodrow 7132aa2044 Bug 1531532: Remove incorrect reftest fuzzy annotation. r=bustage 2019-03-05 18:36:39 +13:00
Ciure Andrei 698d0759ec Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-03-05 06:24:16 +02:00
Jeff Muizelaar 4febae72fc Bug 1495170. Use CreateClippedDrawTarget more. r=mstange
This lets us restrict the size of the mask surface that we allocate
to the destination tile size. This gives a large performance
improvement.

It also includes some miscelanous fixes to the CreateClippedDrawTarget
code path.

Differential Revision: https://phabricator.services.mozilla.com/D21750
2019-03-04 22:30:09 -05:00
Jeff Muizelaar 967d03ef66 Bug 1531532. Use preTranslate instead of postTranslate when correcting for the mask offset. r=mattwoodrow
DTO = DrawTargetOffset = (-Origin.x, -Origin.y)
CTM = CurrentTransform
MASKT = MaskTransform = Inv(CurrentTransform)
MASKO = MaskOffset = (GetRect().x, GetRect().y)

The transform to device space is:

MASKT * CTM * DTO

Currently we do:
MASKT = MASKT * MASKO

Which gives us MASKT * MASKO * CTM * DTO. This works fine if there's no scale but
will not properly cancel out if there is.

I believe we want:
MASKO * MASKT * CTM * DTO

To get this we need to preTranslate instead of postTranslate.

Differential Revision: https://phabricator.services.mozilla.com/D21604
2019-03-04 22:30:06 -05:00
Hiroyuki Ikezoe 2fcc3c784e Bug 1532477 - Return BEnd() from LogicalRect::YMost() in the case of non vertical. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D22035

--HG--
extra : moz-landing-system : lando
2019-03-05 01:22:06 +00:00
Brian Birtles 8ed54f03c6 Bug 1527210 - Drop KeyframeEffect::MaybeUpdateFrameForCompositor; r=hiro
Since bug 1524480 we set the NS_FRAME_MAY_BE_TRANSFORMED frame bit when needed
in RestyleManager::ProcessRestyledFrames so that it is now redundant to also set
it from KeyframeEffect.

Furthermore, setting frame bits from KeyframeEffect is a little fragile since it
depends on the life cycle of the KeyframeEffect which is independent of the
nsFrame. If we can avoid doing that, we probably should.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 03:09:48 +00:00
Brian Birtles d83da99f63 Bug 1527210 - Fix handling of animation of opacity on display:table; r=hiro
As with the previous patch in this series, we need to pay particular attention
to how we handle display:table content when detecting animations on a element.
Please see the extended description in that patch for an explanation of
different frame types involved.

As with transforms, our handling of opacity is also inconsistent.  In
particular, we fail to return true from nsIFrame::HasOpacityInternal for
display:table content with opacity animations applied due to the conflicting
requirements for a primary frame and having opacity animations (which are stored
on the style frame).

Unlike transforms, however, we do not inherit the opacity to the table wrapper.
Instead we leave it on the inner table frame. As a result, we should not check
for a primary frame, but instead we should check for the style frame for the
primary frame.

This patch adjusts this handling to check instead for the appropriate style
frame as opposed to requiring a primary frame. It includes a reftest that fails
without the code changes in this patch.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 03:09:33 +00:00
Brian Birtles 4264e3210a Bug 1527210 - Be more consistent about only applying transforms to primary frames; r=hiro
For display:table content we generate two frames: a table wrapper frame and an
inner table frame. The styles are applied to the inner frame (referred to as the
style frame), whilst the wrapper frame is the primary frame for the content.

However, in order to make tables with transforms behave as a container for
abspos/fixed-pos content as required by the spec, we apply the transform to the
wrapper frame (bug 722777) by inheriting the transform from inner to wrapper and
then ignoring the transform on the inner frame (bug 722777 and bug 816458).

When handling animations on table elements we need to be careful of this
distinction. in particular, css animations[1] and web animations[2] require that
when we have an unfinished transform animation targetting an element, the
element acts as if it had `will-change: transform` applied and therefore
generates a stacking context. As a result we need to accurately detect when
a frame should be considered as having transform animations applied to it or not
for the purpose of creating a stacking context.

Previously our handling of display:table content was quite inconsistent and
contradictory. For example, `nsIFrame::HasAnimationOfTransform` would check for
a primary frame AND for animations on that frame, despite the fact that we only
ever store animations on the style frame. As a result it could never return true
for either a table wrapper or inner table frame.

This patch attempts to make this handling at least a little more consistent,
producing the following result:

Outer table frame (primary frame):

    nsIFrame::IsTransformed → true
    nsIFrame::IsCSSTransformed → true
    nsIFrame::HasAnimationOfTransform → true
    nsLayoutUtils::HasAnimationOfProperty(frame, eCSSProperty_transform) → false

Inner table frame (style frame):

    nsIFrame::IsTransformed → false
    nsIFrame::IsCSSTransformed → false
    nsIFrame::HasAnimationOfTransform → false
    nsLayoutUtils::HasAnimationOfProperty(frame, eCSSProperty_transform) → true

We maintain that the NS_FRAME_MAY_BE_TRANSFORMED bit is only set on the primary
frame whilst the mMayHaveTransformAnimation flag is only set on the style frame.

Note that we don't simply always put everything on the primary frame because for
other property types (e.g. opacity) the default setup of putting all styles and
animations on the style frame is simpler and correct. So far it is only
transforms that require special handling to apply the effect to the wrapper
frame.

This patch adds a reftest that fails without the code changes included in this
patch.


[1] https://drafts.csswg.org/css-animations/#animations
[2] https://drafts.csswg.org/web-animations-1/#side-effects-section

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

--HG--
extra : moz-landing-system : lando
2019-03-05 03:09:19 +00:00
Masayuki Nakano f410998652 Bug 1466208 - part 30: Create PresShell::EventHandler::AutoCurrentEventInfoSetter class r=smaug
With splitting `HandleEvent()` a lot, it becomes more difficult to keep
managing each set of calling `PushCurrentEventInfo()` and
`PopCurrentEventInfo()`.  So, `EventHandler` should have a helper class
to push and pop current event info into/from the stack.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 06:12:22 +00:00
Dan Glastonbury ff5c70a292 Bug 1530584 - Correct placeholder overflow calculation. r=miko,mattwoodrow
The calculation of aOverflow rect for a placeholder contained in a transformed
stacking context didn't take the transform into account, leading to an incorrect
rect which artificially inflated the calculated rebuild region.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 12:26:49 +00:00
Daniel Holbert f87df579d4 Bug 1531025 part 2: Skip an unnecessary border-radius calculation if the radii are 0 (to avoid division by 0). r=boris
This patch avoids a potential division by 0 (one that's unlikely to be
triggered by real content), for correctness and robustness.

This patch isn't really changing the logic, because the newly-guarded code is
already guarded by a "length < sum" check, and "length" is expected to be
nonnegative [1], which means "sum" would already have been nonzero in cases
where the existing strict less-than comparison returned true.

[1] One special case where we can have negative `length` values here:
if this is an outline with an `outline-offset` that is sufficiently negative
to entirely cancel out the outlined element's border-box size, then that can
produce a negative `length` (i.e. the outline box will have a negative size,
conceptually). In that scenario, we were previously dividing by 0 here and
working with bogus huge/infinite negative values as a result, but we should
not do that.

Depends on D21578

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

--HG--
extra : moz-landing-system : lando
2019-03-04 19:24:01 +00:00
Daniel Holbert 88cd5203ba Bug 1531025 part 1: Add braces around conditions in nsIFrame::ComputeBorderRadii(). r=boris
This patch doesn't change any logic/behavior -- it's just adding braces for clarity.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 19:23:56 +00:00
Kartikaya Gupta fecd1d365c Bug 1511740 - Use nsDisplayAsyncZoom items to insert zooming animations in WR. r=jrmuizel,botond
The way we control APZ zooming in WebRender is by inserting an animation
property placeholder on a WR stacking context, and then having APZ
update the animation transform value with the proper matrix at composite
time.

Previously, the stacking context being used was the rootmost
stacking context in the content process. However this doesn't work for
zoomable content in the UI process (e.g. about:support), and after
recent changes, also wraps display items that should not be affected by
zoom (e.g. scrollbars or the background color item).

This patch moves the animation property placeholder so that it
corresponds to the newly added nsDisplayAsyncZoom display item, which
corrects both of the above problems and is conceptually in line with the
desired behaviour.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 20:55:46 +00:00
Emilio Cobos Álvarez 25098daaaa Bug 1532122 - Make word-spacing, letter-spacing, and line-height use Rust lengths. r=boris
This also adopts the resolution from [1] while at it, making letter-spacing
compute to a length, serializing 0 to normal rather than keeping normal in the
computed value, which matches every other engine.

This removes the SMIL tests for percentages from letter-spacing since
letter-spacing does in fact not support percentages, so they were passing just
by chance.

[1]: https://github.com/w3c/csswg-drafts/issues/1484

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

--HG--
extra : moz-landing-system : lando
2019-03-04 18:19:40 +00:00
Geoff Brown a908bb5504 Bug 1531611 - Check for ANR and tombstone files in all android tests; r=bc
The existing ANR and tombstone checks in remoteautomation are used
by mochitests and reftests but are awkward for other harnesses like cppunit
that do not use remoteautomation...and easily missed. This patch moves that
code to the mozharness AndroidMixin, treating ANRs and tombstones like the
logcat: Make sure any old logs are deleted when the mozharness script starts,
then move any logs found at the end of the run to the upload directory.
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&revision=f3de1e9836da2b0c9232f5d92c751b979459e19b
demonstrates tombstone artifacts for the Android 7.0 cppunit tests.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 14:22:45 +00:00
Tim Nguyen fa021187df Bug 1513343 - Remove textarea binding and replace usages with html:textarea. r=bgrins,dao
Differential Revision: https://phabricator.services.mozilla.com/D15001

--HG--
extra : moz-landing-system : lando
2019-03-05 11:41:42 +00:00
Sam Sneddon f392bc3d20 Bug 1531740 - make reftest-analyzer.xhtml stricter finding images r=dbaron
Depends on D21688

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

--HG--
extra : moz-landing-system : lando
2019-03-05 00:23:49 +00:00
Sam Sneddon 565ef75673 Bug 1530008 - make reftest-analyzer.xhtml work with local WPT output r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D21688

--HG--
extra : moz-landing-system : lando
2019-03-05 10:03:52 +00:00
Bogdan Tara e264b82244 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-05 11:30:19 +02:00
Emilio Cobos Álvarez f1c235dc68 Bug 1512993 - Get rid of XBL display usage for buttons and toolbarbuttons. r=mats
This is the last use of them!

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

--HG--
extra : moz-landing-system : lando
2019-03-04 17:20:29 +00:00
Chris Peterson d51a0249ac Bug 1532128 - layout/build: #include nsLayoutModule.h in nsLayoutModule.cpp. r=dholbert
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

layout/build/nsLayoutModule.cpp:95:6 [-Wmissing-prototypes] no previous prototype for function 'nsLayoutModuleInitialize'
layout/build/nsLayoutModule.cpp:176:11 [-Wmissing-prototypes] no previous prototype for function 'CreateXMLContentSerializer'
layout/build/nsLayoutModule.cpp:178:11 [-Wmissing-prototypes] no previous prototype for function 'CreateHTMLContentSerializer'
layout/build/nsLayoutModule.cpp:180:11 [-Wmissing-prototypes] no previous prototype for function 'CreateXHTMLContentSerializer'
layout/build/nsLayoutModule.cpp:182:11 [-Wmissing-prototypes] no previous prototype for function 'CreatePlainTextSerializer'
layout/build/nsLayoutModule.cpp:184:11 [-Wmissing-prototypes] no previous prototype for function 'CreateContentPolicy'
layout/build/nsLayoutModule.cpp:188:11 [-Wmissing-prototypes] no previous prototype for function 'CreateGlobalMessageManager'
layout/build/nsLayoutModule.cpp:189:11 [-Wmissing-prototypes] no previous prototype for function 'CreateParentMessageManager'
layout/build/nsLayoutModule.cpp:191:11 [-Wmissing-prototypes] no previous prototype for function 'CreateChildMessageManager'
layout/build/nsLayoutModule.cpp:225:10 [-Wmissing-prototypes] no previous prototype for function 'Construct_nsIScriptSecurityManager'
layout/build/nsLayoutModule.cpp:237:10 [-Wmissing-prototypes] no previous prototype for function 'LocalStorageManagerConstructor'
layout/build/nsLayoutModule.cpp:255:6 [-Wmissing-prototypes] no previous prototype for function 'nsLayoutModuleDtor'

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

--HG--
extra : rebase_source : 000c6f3cc49acb942a84af13037f7854f14af5e4
extra : histedit_source : 997598f1d82099cc195fc1bff23ffad9ffff7fdb
2019-02-22 22:40:57 -08:00
Chris Peterson f582ab2be4 Bug 1532128 - layout: Move NS_NewLayoutDebugger() function prototype to a common header file. r=dholbert
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

NS_NewLayoutDebugger() is defined in nsLayoutDebugger.cpp.

layout/base/nsLayoutDebugger.cpp:44:10 [-Wmissing-prototypes] no previous prototype for function 'NS_NewLayoutDebugger'

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

--HG--
extra : rebase_source : d56bdbce2030fdd3d036493c32af69addc6d1b73
extra : histedit_source : 61343f17eb6d5a774c848b1694e6507b7c1239ed
2019-02-22 22:01:01 -08:00
Chris Peterson 38f4796563 Bug 1532128 - layout/style: Remove unused functions Gecko_AnnotateCrashReport() and Gecko_AddBufferToCrashReport(). r=heycam
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

The Gecko_*CrashReport() function definitions were added in bug 1407080. The function calls were removed in https://hg.mozilla.org/integration/autoland/rev/22f60f0b91ee. A clue that this function was no longer called: bug 1348273 changed the function prototype in GeckoBindings.h to take a uint32_t key parameter, but left the function definition in GeckoBindings.cpp taking a const char* key. And yet nothing blew up.

layout/style/GeckoBindings.cpp:2294:6 [-Wmissing-prototypes] no previous prototype for function 'Gecko_AnnotateCrashReport'

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

--HG--
extra : rebase_source : 1ca8100716900f4b39504b743f4b06a17f6be832
extra : histedit_source : d662b34fdc783abe95d56ea1d6033ccc34d2ae38
2019-03-02 21:31:23 -08:00
Chris Peterson 9b04fe7446 Bug 1532128 - layout: Make some global functions static. r=dholbert
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

layout/painting/FrameLayerBuilder.cpp:2593:6 [-Wmissing-prototypes] no previous prototype for function 'ReleaseLayerUserData'
layout/painting/RetainedDisplayListBuilder.cpp:1084:6 [-Wmissing-prototypes] no previous prototype for function 'FindContainingBlocks'
layout/style/FontFaceSet.cpp:423:6 [-Wmissing-prototypes] no previous prototype for function 'IsPdfJs'
layout/svg/SVGObserverUtils.cpp:969:6 [-Wmissing-prototypes] no previous prototype for function 'DestroyFilterProperty'

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

--HG--
extra : rebase_source : 7b876a976087eef710ff70ca0ae42abb3c505e49
extra : histedit_source : 4254fd49e36bef38bbb6197861a4a22e040d17e0
2019-02-22 20:33:01 -08:00
Botond Ballo 6dd772b9e2 Bug 1533796 - Always run 1133905-*-vh-*.html reftests with containerless scrolling enabled. r=kats
They were revised in bug 1158392 to work with containerless scrolling and
not with container scrolling.

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

--HG--
extra : moz-landing-system : lando
2019-03-08 19:36:39 +00:00
Botond Ballo d5b02efa59 Bug 1533803 - Mark webm-video reftests as only failing on Android nightly. r=kats
They are only failing with containerless scrolling, which is nightly-only
for now.

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

--HG--
extra : moz-landing-system : lando
2019-03-08 18:47:35 +00:00
Jan Varga de8bd6609d Bug 1517089 - Part 8: Add GetBaseDomainFromSchemeHost to ThirdPartyUtil and make ThirdPartyUtil ref counting thread safe; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19202
2019-02-08 21:01:46 +01:00
Emilio Cobos Álvarez 759875a3fe Bug 1530193 - followup: Fix default type and value of browser.display.focus_ring_style.
It warns on debug builds.
2019-03-07 15:06:35 +01:00
Masayuki Nakano 47ef72825f Bug 1466208 - part 29: Create PresShell::EventHandler::ComputeFocusedEventTargetElement() r=smaug
Most remaining code in `PresShell::EventHandler::HandleEvent()` is what computes
event target of the event which should be handled on focused content.  This
patch moves the part to the new method.

Additionally, moves `nsIPresShell::gKeyDownTarget` to
`EventHandler::sLastKeyDownEventTargetElement` and make it use `StaticRefPtr`.

Finally, for using `Element*` instead of `nsIContent*`, changes the result type
of `Document::GetUnfocusedKeyEventTarget()` to `Element*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 06:11:41 +00:00
Miko Mynttinen c0ca483df6 Bug 1526958 - Cache dom::TouchEvent::PrefEnabled in nsDisplayListBuilder r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D20326

--HG--
extra : moz-landing-system : lando
2019-03-04 13:22:05 +00:00
Makoto Kato a312b63f3e Bug 1212398 - Extend timeout value for test_parse_rule.html. r=emilio
Although debug build of Android/arm runs on emulator, test_parse_rule.html
sometimes runs over 5 min. So we should extend timeout value for this.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 06:12:50 +00:00
Emilio Cobos Álvarez 37d6170f7f Bug 1530177 - Downgrade an assertion to a diagnostic assert since it exposes pre-existing bugs. r=dholbert
nsIconChannel (for moz-icon:// images) is unsound, see bug 1438939.

nsMenuPopupFrame::Init is also unsound on mac, looks like...

I'll try to get them fixed on trunk, but it's not worth crashing release for
this IMO, given it's pre-existing. The assert in PresShell::~PresShell hopefully
avoids exploitable issues.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 23:37:44 +00:00
violet 3f63d086cd Bug 1528635 - Check urlExtraReferrer not null before dereference to avoid crash r=longsonr
urlExtraReferrer could be null, we should check before dereference.  Otherwise
it will cause crash when webrender is enabled by gfx.webrender.enabled=true
and gfx.webrender.all=true,

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

--HG--
extra : moz-landing-system : lando
2019-03-03 19:35:42 +00:00
Masayuki Nakano 3ea27c2fd8 Bug 1466208 - part 28: Make PresShell::EventHandler::HandleEvent() handle non-using-coordinates events without frame before with frame case r=smaug
When the event is not handled with coordinates and there is no frame for
`mPresShell`, `PresShell::EventHandler::HandleEvent()` handles the events
simpler than the case there is a frame.  Therefore, this patch moves the
`else` block of `if (aFrame)` and reduce the indent of `if (aFrame)` case.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 20:35:21 +00:00
Hiroyuki Ikezoe f0fc35f1b8 Bug 1531470 - Use nsLayoutUtils::GetNearestScrollableFrame with SAME_DOC and INCLUDE_HIDDEN flags to get position:sticky target scrollable frame. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21835

--HG--
extra : moz-landing-system : lando
2019-03-03 00:33:55 +00:00
Emilio Cobos Álvarez f02f6a3545 Bug 1218257 - Use rust lengths for the SVG lengths. r=boris
As it turns out we need this to avoid losing precision both during painting and
during serialization.

This patch also changes to serialize `context-value` if it's the computed value.

I could keep the previous behavior, but it makes no sense to serialize the
initial value. We're the only ones to support this value anyway, and I couldn't
find a definition or spec for this.

Also update tests and expectations for:

 * New unexpected passes.
 * Always serializing the unit in getComputedStyle.
 * Calc and interpolation support.

Chrome also always serializes the unit in getComputedStyle, so I'm pretty sure
this is compatible with them. Chrome is inconsistent and keeps numbers in
specified style, but that's inconsistent with itself and with other quirky
lengths, so I updated the tests instead.

Differential Revision: https://phabricator.services.mozilla.com/D21819
2019-03-03 00:16:24 +01:00
Emilio Cobos Álvarez 7e10c7b612 Bug 1218257 - Cleanup and fix interpolation of SVG lengths. r=boris
Instead of storing them as LengthPercentage | Number, always store as
LengthPercentage, and use the unitless length quirk to parse numbers instead.

Further cleanups to use the rust representation can happen as a followup, which
will also get rid of the boolean argument (since we can poke at the rust length
itself). That's why I didn't bother to convert it to an enum class yet.

Differential Revision: https://phabricator.services.mozilla.com/D21804
2019-03-03 00:16:13 +01:00
Jeff Muizelaar 70f8b5c221 Bug 1532088. Use ImageMask directly instead of duplicating it as WrImageMask. r=kats
WrImageMask is a relic from before we had good bindings generation.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 21:48:06 +00:00
Masayuki Nakano 291457b9da Bug 1466208 - part 27: Create PresShell::EventHandler::HandleEventUsingCoordinates() r=smaug
Now, the block in HandleEvent(), which handles event using coordinates is
less than 200 lines.  Perhaps, this is good amount to be split to a method.

This patch just moves the block to a new method.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 00:03:01 +00:00
Razvan Maries cfdc9fc660 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-03-02 12:06:27 +02:00
Razvan Maries c51046f730 Merge mozilla-inbound to mozilla-central a=merge 2019-03-02 11:41:18 +02:00
Daniel Varga 65ee224091 Backed out changeset 2e63fa41257b (bug 1530594) for mochitest failure use-after-poison /builds/worker/workspace/build/src/layout/xul/nsMenuPopupFrame.h:280:42 in PopupType 2019-03-02 06:45:31 +02:00
Dorel Luca db32a5e766 Bug 1456855 - Fix syntax for test layout/inspector/tests/chrome/test_fontVariationsAPI.xul r=aryx 2019-03-02 01:16:36 +02:00
Neil Deakin 986bb46eaa Bug 1530594, generate frames before setting the active child in a menulist, so that menulists with sizetopopup='none' will still allow keyboard navigation when the menulist has not yet been opened, r=tnikkel 2019-03-01 22:07:58 -05:00
Masayuki Nakano fcb0072133 Bug 1466208 - part 26: Create PresShell::EventHandler::EventTargetData::UpdateTouchEventTarget() r=smaug
After dispatching pointer events, `PresShell::EventHandler::HandleEvent()`
updates event target only when the event is a touch event.  We should do it in
a new method of `EventTargetData`.

Although I don't know why this is done in
`PresShell::EventHandler::DispatchPrecedingPointerEvent()`.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 00:02:10 +00:00