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

19868 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 97109f9916 Bug 1529492 - Disable caret clamping if transforms are present. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D25194

--HG--
extra : moz-landing-system : lando
2019-03-28 23:33:40 +00:00
Emilio Cobos Álvarez c752cecc84 Bug 1538589 - Fix ::marker invalidation when we need to potentially insert a marker as a result of a style change. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D24888

--HG--
extra : moz-landing-system : lando
2019-03-28 13:50:13 +00:00
Hiroyuki Ikezoe 9db5bc51b8 Bug 1519013 - Shrink the content to display size if user has never changed the site resolution. r=botond
elementFromPoint-002.html, elementFromPoint-003.html and dialog-showModal.html
use document.elementFromPoint with a given point which is calculated from the
value returned by getBoundingClientRect() for a 100% width element.  Before
this change, the given point is outside of view because there is no viewport
meta tag in the documents so that elementFromPoint fails.  After this change, the
documents fit to the visual viewport so that elementFromPoint works as expected.

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

--HG--
extra : moz-landing-system : lando
2019-03-28 03:04:59 +00:00
Hiroyuki Ikezoe c0d7962f08 Bug 1519013 - Introduce nsIPresShell::IsResolutionUpdatedByApz to tell whether the resolution has never been changed by APZ. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D16154

--HG--
extra : moz-landing-system : lando
2019-03-28 03:04:59 +00:00
Cameron McCormack e90bcb5786 Bug 1535874 - Don't clear out nsStyleSheetService::gInstance when random other nsStyleSheetService objects are destroyed. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D23815

--HG--
extra : moz-landing-system : lando
2019-03-27 22:40:14 +00:00
Botond Ballo 2b2dd7dac6 Bug 1538511 - Get rid of nsIPresShell::ScrollMode (use mozilla::ScrollMode instead). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D24797

--HG--
extra : moz-landing-system : lando
2019-03-26 00:51:57 +00:00
Botond Ballo 573a6eaafa Bug 1538511 - Move nsIScrollableFrame::ScrollMode into a separate file. r=kats
This allows this enumeration to be used from nsIPresShell.h without introducing
a circular dependency.

Its new home in layout/base/ScrollTypes.h, included as mozilla/ScrollTypes.h.
Others similar enums can be added to that file if desired.

This patch also makes ScrollMode an enum class (as it's no longer nested
inside a class) and switches its enumerators to the |eName| naming convention.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 23:17:20 +00:00
Ciure Andrei 289f67a603 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-27 18:40:06 +02:00
Ciure Andrei daa05061c1 Merge inbound to mozilla-central. a=merge 2019-03-27 18:36:44 +02:00
Emilio Cobos Álvarez 992c298f60 Bug 1539267 - Bug 1539171 - Follow the list-item definition from the spec a bit more closely. r=mats
The HTML restriction doesn't match any browser.

This matches Edge, though I filed
https://github.com/w3c/csswg-drafts/issues/3766 about the pseudo-element
condition.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 15:03:20 +00:00
Cosmin Sabou ef5fea1c75 Merge mozilla-central to mozilla-inbound. 2019-03-27 07:00:56 +02:00
Cosmin Sabou 3d469329a4 Merge mozilla-inbound to mozilla-central. a=merge 2019-03-27 06:45:13 +02:00
Masayuki Nakano db43e47173 Bug 1536366 - Make PresShell::EventHandler::PrepareToDispatchEvent() call TouchManager::PreHandleEvent() instead of PresShell::EventHandler::HandleEventWithCurrentEventInfo() r=smaug
The only caller of `TouchManager::PreHandleEvent()` is
`PresShell::EventHandler::HandleEventWithCurrentEventInfo()` which is guaranteed
that it never handles untrused event by bug 1536353.  Therefore, we can make
`PresShell::EventHandler::PrepareToDispatchEvent()` call it instead.  That's
better place from the point of view of semantics and making
`PresShell::EventHandler::PrepareToDispatchEvent()` simpler.

Note that this may cause changing the score of a telemetry probe,
"INPUT_EVENT_QUEUED_APZ_TOUCH_MOVE_MS" because it will include the time of
the runtime cost of `TouchManager::PreHandleEvent()` when the event is an
`eTouchMove` event and handled by APZ.  However, this was expired in 60.
So, we don't meet any changes with this patch actually.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 01:08:23 +00:00
Timothy Nikkel 48fc672a73 Bug 1539391. Invalidate when the display items that nsSubDocumentFrame creates will change. r=mattwoodrow
As this will cause merging failures.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 10:11:33 +00:00
Mats Palmgren 9e5f85edc2 Bug 1538618 - [css-pseudo] implement animation support for ::marker pseudos. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D25003

--HG--
extra : rebase_source : 999373f16c816cdd0dd64b1cc3f9f3f30bb12003
extra : amend_source : 829c0fc25afc55d50b70aebc1f3b9f0e8f06c458
2019-03-26 05:48:26 +01:00
Olli Pettay ac08265665 Bug 1538517, use higher frame rate right after first contentful paint, r=farre
fcp is often almost blank paint, but the next couple paints have more content.
But in order to not regress page load time, reduce frame rate later during the page load.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 20:47:50 +00:00
Emilio Cobos Álvarez 300bf233c5 Bug 1536718 - Honor browser.display.use_document_fonts again. r=manishearth,jwatt
Differential Revision: https://phabricator.services.mozilla.com/D24218

--HG--
extra : moz-landing-system : lando
2019-03-26 18:42:27 +00:00
Csoregi Natalia d105b005e8 Merge inbound to mozilla-central. a=merge 2019-03-26 19:43:22 +02:00
Masayuki Nakano e35cfd926c Bug 1536353 - part 3: Make nsIDOMWindowUtils.dispatchDOMEventViaPresShell() dispatch only trusted event r=smaug
In normal cases, `PresShell::EventHandler` won't receive untrusted event.
However, only `nsIDOMWindowUtils.dispatchDOMEventViaPresShell()` may send
untrusted event if its `aTrusted` is false.  Currently, this is not used by
chrome so that we don't need to keep supporting it for dispatching untrusted
events.

This patch removes `aTrusted` argument from it.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:10:22 +00:00
Masayuki Nakano dbf37b7d62 Bug 1536353 - part 2: Merge PresShell::EventHandler::PrepareToDispatchEvent() and PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
`PresShell::EventHandler::PrepareToDispatchEvent()` checked whether the
given event is a trusted event or an untrusted event, but
`PresShell::EventHandler::PrepareToDispatchOntextMenuEvent()` didn't so.
However, now, both of them don't need to check it.  Therefore, we can merge
them.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:04:43 +00:00
Masayuki Nakano f371fabc1b Bug 1536353 - part 1: Make PresShell::EventHandler stop checking WidgetEvent::IsTrusted() at runtime in release channel r=smaug
`PresShell::EventHandler` shouldn't be used to dispatch untrusted event.
However, it checks whether the given event is trusted or untrusted somewhere
and that makes the code harder to understand.  So, it should check each event
only with `MOZ_ASSERT()` or `MOZ_DIAGNOSTIC_ASSERT()` instead.  Then,
developers can trust the event is always a trusted event.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:02:06 +00:00
Ting-Yu Lin 8c2d94e52d Bug 1534584 Part 2 - Remove legacy_actions from AccessibleCaret tests. r=whimboo
- Re-implement flick() and send_keys() required by AccessibleCaret tests.

- Delete skip_if_not_rotatable() because it's unused.

- Change the dragging distance from 50px to 40px in
  test_carets_not_jump_when_dragging_to_editable_content_boundary and
  test_caret_not_jump_to_front_when_dragging_up_to_editable_content_boundary
  to avoid MoveTargetOutOfBoundsException. Changing the distance doesn't
  alter the meaning of the tests.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 20:28:44 +00:00
Ting-Yu Lin f7c9612d2e Bug 1534584 Part 1 - Move selection.py to layout/base/tests/marionette/. r=whimboo
selection.py is used only by AccessibleCaret tests.

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

--HG--
rename : testing/marionette/client/marionette_driver/selection.py => layout/base/tests/marionette/selection.py
extra : moz-landing-system : lando
2019-03-25 20:28:37 +00:00
Edwin Gao 139cb1eebf Bug 1536284 - Bug 1536278, 1536369 - disable various tests in marionette test suites tha fail for windows10-aarch64 r=jmaher,whimboo
Several tests in marionette are failing in `Mn`, `MnH`, `MG` for windows10-aarch64.

This patch disables the tests that are failing.

Individual issues are recorded in:
- 1536278
- 1536369

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

--HG--
extra : moz-landing-system : lando
2019-03-25 16:16:56 +00:00
Olli Pettay 6143d2b90d Bug 1536781, use the same paint suppression delay on mobile and desktop, r=emilio
Differential Revision: https://phabricator.services.mozilla.com//D24804

--HG--
extra : rebase_source : 5fcdd643e253dcad6ab2f0c94ed3addd48724249
2019-03-25 14:44:56 +02:00
Oana Pop Rus b01d230f27 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-25 12:04:50 +02:00
Brad Werth 5a6a418623 Bug 1536755 Part 1: Enforce viewport zoom constraints when the content size changes. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D24424

--HG--
extra : moz-landing-system : lando
2019-03-22 21:01:26 +00:00
Botond Ballo e6c2c99584 Bug 1531535 - Add visual smooth scroll support to nsIPresShell. r=kats
This patch renames nsIPresShell::SetPendingVisualScrollUpdate() to
ScrollToVisual(), and adds an instant vs. smooth option.

SetPendingVisualScrollUpdate() still exists, as a helper for the instant case.

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

--HG--
extra : moz-landing-system : lando
2019-03-23 20:23:35 +00:00
Ting-Yu Lin 0e0ec3037e Bug 1534146 - Do not call NS_RemoveSubsumedHints if the frame is a column-span. r=emilio
We avoid removing subsumed hints for out-of-flow and column-span frames
in RestyleManager::ProcessPostTraversal(). We should do something
similar here.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 23:36:59 +00:00
Ting-Yu Lin 5bef4c66dd Bug 1489295 Part 4 - Remove InitAndWrapInColumnSetFrameIfNeeded(). r=dbaron
The last consumer of the method is removed in Part 3.

Depends on D24396

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

--HG--
extra : moz-landing-system : lando
2019-03-22 02:47:32 +00:00
Ting-Yu Lin 11a3e0712a Bug 1489295 Part 3 - Implement column-span:all for <button>. r=dbaron
We need to pull outerFrame one level up to the outer scope because it's
needed when calling FinishBuildingColumns().

The patch is very similar to implementing column-span:all for <fieldset>
in bug 1535200.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 02:50:34 +00:00
Ting-Yu Lin 822925bcd6 Bug 1489295 Part 2 - Clean up the naming of a 'nsStyleContext' variable in ConstructFrameFromItemInternal(). r=dbaron
Rename outerSC to outerStyle because nsStyleContext was gone.

Depends on D24394

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

--HG--
extra : moz-landing-system : lando
2019-03-21 18:27:39 +00:00
Ting-Yu Lin 5a67c61b32 Bug 1489295 Part 1 - Rename frame construction data bit that creates flex/grid/column. r=dbaron
After supporting column-span, the top-level container for multicol
layout is no longer the ColumnSetFrame, so remove the "SET" suffix from
FCDATA_ALLOW_GRID_FLEX_COLUMNSET bit to make it sound more general.

Also, update the document and add an assertion.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 02:39:16 +00:00
Andreea Pavel dc97e0be51 Merge mozilla-central to autoland. on a CLOSED TREE 2019-03-22 18:50:13 +02:00
Emilio Cobos Álvarez cc4fab743c Bug 1470499 - Crashtest. r=test-only 2019-03-22 15:10:10 +01:00
Emilio Cobos Álvarez 3ef54dcb35 Bug 1428892 - Crashtest. r=test-only 2019-03-22 15:09:55 +01:00
Daniel Holbert c3b4d76ce6 Bug 1535388: Don't fire PageShow from nsDocumentViewer::LoadComplete, if onload caused a new viewer to replace us. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D24112

--HG--
extra : moz-landing-system : lando
2019-03-22 06:16:14 +00:00
Timothy Nikkel cdeb7dab27 Bug 1537667. Allow the 'layout.display-list.retain' pref to work on android. r=mattwoodrow
Fennec isn't e10s, so neither existing check worked.

https://phabricator.services.mozilla.com/D24310

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

--HG--
extra : moz-landing-system : lando
2019-03-21 20:59:11 +00:00
Botond Ballo 2ce3d47ca0 Bug 1536157 - Make sure we repaint after accepting a visual scroll update. r=kats
A possible alternative would be to have the main thread already paint a
displayport at the target position of a requested visual update as part of
the same transaction that requests the update.

There are a couple of reasons we may not want to do that:

 1) APZ could reject the requested visual update under certain conditions,
    e.g. if there is a higher-priority layout update.

 2) It would break the property that the displayport in the main thread's
    scroll metadata is relative to the scroll offset in said metadata.
    Various places assume this and untangling that seems tricky.

This does mean that if the main thread requests a visual update to "far away"
(outside the existing displayport), we can get temporary checkerboarding
before the content at the target position is painted. However, it's
straightforward for callers to work around that, by changing the layout scroll
offset _and_ scheduling a visual update if they wish to visual-scroll far
away.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 05:20:31 +00:00
Botond Ballo 531d381209 Bug 1536157 - Schedule a paint when setting a pending visual scroll update. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D23901

--HG--
extra : moz-landing-system : lando
2019-03-21 23:44:09 +00:00
violet 0a0bd52597 Bug 1537708 - Clean up NS_STATE_IS_OUTER_SVG flag in favor of IsSVGOuterSVGFrame r=longsonr
NS_STATE_IS_OUTER_SVG is redundant, we clean it up and use
nsIFrame::IsSVGOuterSVGFrame() instead.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 02:23:35 +00:00
Oana Pop Rus 90e63da7c3 Backed out 2 changesets (bug 1536353) for failing in 1397711.html on a CLOSED TREE
Backed out changeset 6ef59933242a (bug 1536353)
Backed out changeset 64a815f04641 (bug 1536353)
2019-03-22 05:29:03 +02:00
Masayuki Nakano 34f7f05430 Bug 1536353 - part 2: Merge PresShell::EventHandler::PrepareToDispatchEvent() and PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
`PresShell::EventHandler::PrepareToDispatchEvent()` checked whether the
given event is a trusted event or an untrusted event, but
`PresShell::EventHandler::PrepareToDispatchOntextMenuEvent()` didn't so.
However, now, both of them don't need to check it.  Therefore, we can merge
them.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 14:03:21 +00:00
Masayuki Nakano 0bb5218dd8 Bug 1536353 - part 1: Make PresShell::EventHandler stop checking WidgetEvent::IsTrusted() at runtime in release channel r=smaug
`PresShell::EventHandler` shouldn't be used to dispatch untrusted event.
However, it checks whether the given event is trusted or untrusted somewhere
and that makes the code harder to understand.  So, it should check each event
only with `MOZ_ASSERT()` or `MOZ_DIAGNOSTIC_ASSERT()` instead.  Then,
developers can trust the event is always a trusted event.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 13:58:55 +00:00
Mats Palmgren be049c79d6 Bug 205202 part 4 - [css-lists][css-pseudo] Rename various uses of bullet with marker to avoid any misleading association with nsBulletFrame (idempotent patch). r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren 4b5f164752 Bug 205202 part 3 - [css-lists][css-pseudo] Add support for the 'content' CSS property on ::marker pseudo elements. r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren 53f517142f Bug 205202 part 1 - [css-lists][css-pseudo] Add support for the ::marker pseudo element on list items. Alias :-moz-list-bullet/number to that in the parser. r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren bff6f8a4d5 Bug 288704 part 3 - Make nsBulletFrame use the built-in 'list-item' CSS counter and remove the old implementation. r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren c750eaac07 Bug 288704 part 2 - [css-lists] Implement display:list-item counters using a built-in 'list-item' CSS counter. r=emilio 2019-03-24 23:13:52 +01:00
Mats Palmgren 426b73e37a Bug 1518201 - [css-lists] Implement the counter-set property. r=emilio 2019-03-24 23:13:52 +01:00
Csoregi Natalia e45afa4e50 Merge mozilla-central to autoland. CLOSED TREE 2019-03-21 12:51:33 +02:00
Csoregi Natalia 486b64e4bf Merge inbound to mozilla-central. a=merge 2019-03-21 12:41:13 +02:00
Ting-Yu Lin ab1b0c6153 Bug 1535200 Part 2 - Implement column-span:all for fieldset elements. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D23618

--HG--
extra : moz-landing-system : lando
2019-03-21 06:02:02 +00:00
violet 2c538f0dfe Bug 1536892 - Check a frame does maintain overflow before adding to OverflowChangedTracker. r=longsonr CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D24305

--HG--
extra : rebase_source : 90f906520cd20d22276dfa14c51d8f45fa1549c0
extra : amend_source : 84015fc7ebe2db6d8d30d65468deca469ae9bc8f
2019-03-19 20:33:36 +01:00
Ting-Yu Lin cd5719b6d9 Bug 1535200 Part 1 - In fieldset, make absolute positioned frames relative to multicol container, not the column content frames. r=mats
Per spec, "Note: Column boxes do not become the containing block for
elements with position: fixed or position: absolute. The containing
block is the multicol container, it being the principal box."

https://drafts.csswg.org/css-multicol-1/#the-multi-column-model

contentFrame and contentFrameTop are different only if fieldset has
multicol layout. In that case, contentFrameTop is nsColumnSetFrame (or
ColumnSetWrapperFrame after applying Part 2 with
layout.css.column-span.enabled=true).

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

--HG--
extra : moz-landing-system : lando
2019-03-18 05:47:53 +00:00
Masayuki Nakano 485f19597b Bug 1536351 - Make PresShell::EventHandler::HandleEvent() push current event info as nullptr before calling HandleEventWithCurrentEventInfo() r=smaug
Oddly, when there is no frame and the handling event does not require a frame,
`PresShell::EventHandler::HandleEvent()` just clears
`mPresShell->mCurrentEventFrame` with nullptr before calling
`HandleEventWithCurrentEventInfo()`.  This means that if event handler is
nested, old `mPresShell->mCurrentEventContent` is reused and
`mPresShell->mCurrentEventFrame` is forgotten.  Therefore, it should push
nullptr as current event info instead.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 14:05:31 +00:00
Boris Zbarsky 9c586db495 Bug 1535384 part 12. Remove MOZ_CAN_RUN_SCRIPT_BOUNDARY from FrameRequestCallback. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23783

--HG--
extra : moz-landing-system : lando
2019-03-19 16:02:12 +00:00
Oana Pop Rus 6693375a16 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-20 13:12:03 +02:00
Mats Palmgren 177befdf47 Bug 1535986 - Skip recomputing the position for frames that have a pending reflow. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D23971

--HG--
extra : rebase_source : b366cc1fcf0d0a2919bf22e9d7931a0fa930fe98
2019-03-18 16:25:28 +01:00
Henri Sivonen 976ad7e3a6 Bug 1524242 - Capture TabParent of out-of-process iframe when creating TextComposition. r=masayuki
Depends on D23641

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

--HG--
extra : moz-landing-system : lando
2019-03-19 13:37:20 +00:00
Emilio Cobos Álvarez 0a3856aa9c Bug 1516780 - Optimize restyles when a font is loaded. r=heycam
Depends on D20729

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

--HG--
extra : moz-landing-system : lando
2019-03-19 21:10:41 +00:00
Emilio Cobos Álvarez 12cbe02f9a Bug 1536176 - Share font preferences across documents. r=jfkthame
And also don't blow the preferences away unless they actually change. We were
blowing them away whenever the document language changed or what not, that's not
good.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 16:40:01 +00:00
Emilio Cobos Álvarez 3fa7faebf8 Bug 1536176 - Use nsStaticAtom in nsLanguageAtomService. r=jfkthame
All lang groups are static, no point in doing refcounting.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 12:48:31 +00:00
Emilio Cobos Álvarez 70e3f8ffcd Bug 1535165 - Use cbindgen for touch-action. r=dholbert
And rename the constants to not be prefixed by TOUCH_ACTION_, since that's part
of the type name anyway.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 18:01:55 +00:00
Brad Werth 9a86c02a44 Bug 1501665 Part 10: Modify viewport resize zoom scaling to account for clamped zoom levels. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21291

--HG--
extra : source : 520dd24a73fc1a224c38c93ab91d36eecce727ed
2019-03-18 14:59:12 +00:00
Brad Werth 1f70e7449b Bug 1501665 Part 9: Early exit around an unnecessary call to UpdateVisualViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21287

--HG--
extra : source : 3542bf2b89ddf170efe6c723a64f297868bc7db1
2019-03-18 14:58:49 +00:00
Brad Werth 16be774e5b Bug 1501665 Part 8: Allow MVM::RequestReflow to adjust resolution, and do so when destroying the MVM. r=botond
Currently the MobileViewportManager leaves somethings permanently changed
even after it is destroyed: it may have changed the resolution of
the Document, and it may have set a fixed size for the visual viewport.
Both of these changes need to be un-done to return to normal display of
the Document.

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

--HG--
extra : source : 088dc24eabc75eea96301d50550e0a8817f5f809
2019-03-18 14:58:31 +00:00
Brad Werth ba8e9742ef Bug 1501665 Part 7: Add a new function to allow visual viewport size to be un-set. r=smaug
Once nsIPresShell::SetVisualViewportSize is called, we currently have
no way to restore the default viewport sizing behavior. This corrects that.
We need the default behavior to get correctly-placed scrollbars when
turning off meta viewport handling in Responsive Design Mode panes.

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

--HG--
extra : source : 178210eb72baa05f877b3a35e0c94d0b23880d13
2019-03-18 14:58:07 +00:00
Brad Werth 7fc19a53b5 Bug 1501665 Part 4: Use the new function as a replacement for APZAllowZooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19239

--HG--
extra : source : cf42ea4e8443cdcb5f446dfb95d92d5998f55f24
2019-03-18 14:56:55 +00:00
Brad Werth 83ef115c9e Bug 1501665 Part 3: Add a new function to determine if a document can use resolution zooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19238

--HG--
extra : source : 731d7ee06d86794fb9ec58b32f1495ad11205a1c
2019-03-18 14:56:32 +00:00
shindli b7de66af4f Backed out 13 changesets (bug 1501665) for failing a11y tests in accessible/tests/mochitest/relations/test_tabbrowser.xul CLOSED TREE
Backed out changeset 2fa518cb0dfc (bug 1501665)
Backed out changeset afaf26d7df42 (bug 1501665)
Backed out changeset 5bdf0ad9dc66 (bug 1501665)
Backed out changeset 520dd24a73fc (bug 1501665)
Backed out changeset 3542bf2b89dd (bug 1501665)
Backed out changeset 088dc24eabc7 (bug 1501665)
Backed out changeset 178210eb72ba (bug 1501665)
Backed out changeset 9eebe767ef20 (bug 1501665)
Backed out changeset 6a84e97d0e62 (bug 1501665)
Backed out changeset cf42ea4e8443 (bug 1501665)
Backed out changeset 731d7ee06d86 (bug 1501665)
Backed out changeset 8e0afe4a041a (bug 1501665)
Backed out changeset be1026de486b (bug 1501665)
2019-03-18 18:08:58 +02:00
Emilio Cobos Álvarez ac54c9333b Bug 1534494 - Try to bring some more sanity into our font code. r=manishearth
It's not very easy to understand on its current state, and it causes subtle bugs
like bug 1533654.

It could be simpler if we centralized where the interactions between properties
are handled. This patch does this.

This patch also changes how MathML script sizes are tracked when scriptlevel
changes and they have relative fonts in between.

With this patch, any explicitly specified font-size is treated the same (being a
scriptlevel boundary), regardless of whether it's either an absolute size, a
relative size, or a wide keyword.

Relative lengths always resolve relative to the constrained size, which allows
us to avoid the double font-size computation, and not give up on sanity with
keyword font-sizes.

I think given no other browser supports scriptlevel it seems like the right
trade-off.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 15:37:03 +00:00
Emilio Cobos Álvarez 2884637218 Bug 1395964 - Make image loading changes not reframe. r=tnikkel
Bug 1472637 makes the decision of whether to construct an image frame not depend
on this, so this is sound.

We need to avoid reframing to fix this bug because otherwise we lose track of
the previously painted image.

Differential Revision: https://phabricator.services.mozilla.com/D23127
2019-03-18 16:18:52 +01:00
Emilio Cobos Álvarez 59c8f44032 Bug 1472637 - Don't display alt text while loading, to match other UAs. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D18518

--HG--
extra : moz-landing-system : lando
2019-03-18 15:15:13 +00:00
Brad Werth e77eba40ba Bug 1501665 Part 10: Modify viewport resize zoom scaling to account for clamped zoom levels. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21291

--HG--
extra : moz-landing-system : lando
2019-03-18 14:59:12 +00:00
Brad Werth 217c46ca45 Bug 1501665 Part 9: Early exit around an unnecessary call to UpdateVisualViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21287

--HG--
extra : moz-landing-system : lando
2019-03-18 14:58:49 +00:00
Brad Werth a4eaa45fd4 Bug 1501665 Part 8: Allow MVM::RequestReflow to adjust resolution, and do so when destroying the MVM. r=botond
Currently the MobileViewportManager leaves somethings permanently changed
even after it is destroyed: it may have changed the resolution of
the Document, and it may have set a fixed size for the visual viewport.
Both of these changes need to be un-done to return to normal display of
the Document.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 14:58:31 +00:00
Brad Werth 1e6b91bfc7 Bug 1501665 Part 7: Add a new function to allow visual viewport size to be un-set. r=smaug
Once nsIPresShell::SetVisualViewportSize is called, we currently have
no way to restore the default viewport sizing behavior. This corrects that.
We need the default behavior to get correctly-placed scrollbars when
turning off meta viewport handling in Responsive Design Mode panes.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 14:58:07 +00:00
Brad Werth b43c639430 Bug 1501665 Part 4: Use the new function as a replacement for APZAllowZooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19239

--HG--
extra : moz-landing-system : lando
2019-03-18 14:56:55 +00:00
Brad Werth e0fb57be15 Bug 1501665 Part 3: Add a new function to determine if a document can use resolution zooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19238

--HG--
extra : moz-landing-system : lando
2019-03-18 14:56:32 +00:00
Brian Birtles 76cea81357 Bug 1518816 - Set the "may have transform animations" flag on the primary frame; r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D23635

--HG--
extra : moz-landing-system : lando
2019-03-18 04:12:23 +00:00
Brian Birtles 75b97de014 Bug 1518816 - Rename EffectSet::GetEffectSet(const nsIFrame*) to make it more clear what it does; r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D23286

--HG--
extra : moz-landing-system : lando
2019-03-18 04:12:14 +00:00
Brian Birtles f9f6d9275c Bug 1518816 - Make nsLayoutUtils utility functions for getting animations use the EffectSet::GetEffectSetForFrame; r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D23285

--HG--
extra : moz-landing-system : lando
2019-03-18 04:12:12 +00:00
Brian Birtles 8e3d3cbf03 Bug 1518816 - Clarify when and why KeyframeEffect::HasEffectiveAnimationOfPropertySet might return false even when there are effective animations in a property set; r=boris
It took me a long time to understand why
KeyframeEffect::HasEffectiveAnimationOfPropertySet behaved so differently to
KeyframeEffect::HasAnimationOfPropertySet. This patch attempts to clarify that
while making KeyframeEffect::HasEffectiveAnimationOnPropertySet a little more
generally useful. This will allow us to tidy up the various animation checks in
nsLayoutUtils later in this patch series.

Ultimately, however, we should make this check part of the regular compositor
animation vetting machinery in bug 1534884. That should remove a number of
inconsistencies such that we don't need the extended comments added in this
patch.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 04:10:10 +00:00
Brian Birtles fb706f4828 Bug 1518816 - Replace nsLayoutUtils::HasCurrentTransition with something that takes an element/pseudo pair; r=hiro
The trouble with utility functions that take an nsIFrame is it's not clear what
the caller's intention is. For example, with
nsLayoutUtils::HasCurrentTransition, is the caller asking for transitions on
that frame? Or animations on _both_ that frame and its corresponding
style/primary frame?

Probably the caller hasn't even thought about it and there are likely to be bugs
when display:table content is encountered.

Where practical it's much better to take an element/pseudo pair since it's clear
that the caller is concerned with all animations (or transitions in this case)
on the element regardless of how it is represented in the frame tree.

This patch updates nsLayoutUtils::HasCurrentTransition to take an element/pseudo
pair and moves it to mozilla::AnimationUtils at the same time.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 04:09:55 +00:00
Ting-Yu Lin 7f6824aa03 Bug 1493317 Part 2 - Enable AccessibleCaret in unit tests. r=jchen
And use correct AccessibleCaret preference to disable it individually in tests.

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

--HG--
extra : moz-landing-system : lando
2019-03-16 07:38:34 +00:00
Ting-Yu Lin 2fac17be1a Bug 1493317 Part 1 - Fix pending popup group assertion after enabling AccessibleCaret in unittest. r=mats
The assertion can be reproduced locally by running
"./mach test dom/canvas/test/chrome/test_drawWindow_widget_layers.html"
with layout.accessiblecaret.enabled=true.

When AccessibleCaret is enabled, caret elements will be inserted into
nsCanvasFrame::mCustomContentContainer, thus it recursively invokes
ConstructFramesFromItemList() to construct frames for carets before it had a
chance to construct popup group.

I feel it's too strict to assume that ConstructFramesFromItemList() cannot be
invoke recursively whenever there's a popup group item. I move the assertion to
the end of ConstructDocElementFrame() to ensure the popup group is processed by
then.

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

--HG--
extra : moz-landing-system : lando
2019-03-16 07:29:11 +00:00
Dorel Luca 0e9ffb4c4f Merge mozilla-inbound to mozilla-central. a=merge 2019-03-14 18:25:40 +02:00
Emilio Cobos Álvarez 5aa8533517 Bug 1533963 - Use a single RestyleHint representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22828

--HG--
extra : moz-landing-system : lando
2019-03-14 11:47:50 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Chris Peterson 2b18063c04 Bug 1534467 - Fix layout debugger build in non-DEBUG builds. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23397

--HG--
extra : moz-landing-system : lando
2019-03-13 21:36:00 +00:00
Csoregi Natalia d6418fe8b9 Merge mozilla-central to autoland. CLOSED TREE 2019-03-13 23:47:01 +02:00
David Major e5773183d6 Bug 1528074 - Remove MSVC warning flags that clang-cl doesn't understand r=chmanchester
Per the previous patch, clang-cl only understands five MSVC-style warning flags: 7219c7e9af/clang/include/clang/Driver/CLCompatOptions.td (L188-L197)

This patch removes the flags that clang-cl doesn't understand.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 20:19:08 +00:00
Emilio Cobos Álvarez 32f44a84cd Bug 1533085 - Fix some usage of display in XBL bindings in thunderbird. r=npotb 2019-03-13 19:00:08 +01: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
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
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
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
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
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
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
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
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
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
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
Ting-Yu Lin 0ac3561306 Bug 1533885 - Bail out from MaybeRecreateForColumnSpan if aFrameList is empty. r=dbaron
The test case triggers MOZ_ASSERT(!IsFramePartOfIBSplit(aParentFrame))
in MaybeRecreateForColumnSpan() because WipeContainingBlock() returns
early when the FrameConstructionItemList is empty. Thus, it doesn't wipe
the aParentFrame even if it's part of an IB split.

An empty FrameConstructionItemList constructs no frames. Therefore,
MaybeRecreateForColumnSpan() doesn't need to do anything if aFrameList is empty
since an empty frame list cannot contain any column-span.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 21:17:38 +00:00
Brian Birtles 7ecb9753b5 Bug 1509466 - Make cancelAnimationFrame cancel a pending request frame callback scheduled in the same frame; r=farre
As per the following change to the HTML spec:

  86b05f8a07

when running a requestAnimationFrame callback it should be possible to cancel
another requestAnimationFrame callback scheduled to run in the same frame by
using cancelAnimationFrame.

See issue:

  https://github.com/whatwg/html/issues/4359

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

--HG--
extra : rebase_source : 696dde4f205f2d12a67a4e9649d629a0f4e7de27
2019-02-25 15:15:56 +09:00
Brian Birtles 80fb21495c Bug 1509466 - Pass frame request callbacks along with their handles to nsRefreshDriver; r=farre
In the next patch in this series we want to compare the handle of frame
callbacks we are about to run,  with a set of canceled handles stored on the
document. This patch makes us pass the handles along with the callbacks so we
can do that.

Incidentally doing this allows us to just swap array elements when building up
the refresh driver's set of callbacks to run. That is hopefully a little more
efficient than running the implicit conversion operator on each item and then
appending to an array.

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

--HG--
extra : rebase_source : f014605ece1c8e3495b2927621fb9f72ff8e57d7
2019-02-25 15:02:12 +09: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
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
arthur.iakab 93997623bd Merge mozilla-central to autoland a=merge on a CLOSED TREE 2019-03-08 00:14:12 +02:00
arthur.iakab 85ad02d41a Merge inbound to mozilla-central a=merge 2019-03-07 23:58:42 +02: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
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
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 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
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
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
Csoregi Natalia 56c430aac5 Merge mozilla-central to autoland. CLOSED TREE
--HG--
extra : rebase_source : 10555d94c948e45e86188feff6153ac981879fcc
2019-03-06 12:39:05 +02: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
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
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
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
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
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
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
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
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
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
Boris Chiou a47dc39197 Bug 1526850 - Part 3: Use DisplayItemType as the input of AddTransitionsAndAnimationsToLayer. r=hiro
Transform display item may have multiple properties, so it's better to
use display item type as the input.

Also, factor some code out of AddAnimationsForProperty, so we can easier
to extend this for multiple properties.

We will pass a list of layers::Animation to the compositor thread. In
this list, the animations belonging to the same property are grouped together,
so we can easily separate the animations by property and sample the animations
for each property on the compositor thread. (Will do this in Bug 1425837.)

Depends on D19628

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

--HG--
extra : moz-landing-system : lando
2019-03-01 21:13:05 +00:00
Boris Chiou 97ae508f2d Bug 1526850 - Part 2: Let FindAnimationsForCompositor take nsCSSPropertyIDSet. r=hiro
We use DisplayItemType as the input of HasAnimationsForCompositor, and
nsCSSPropertyIDSet as the input of GetAnimationsForCompositor.

The caller of HasAnimationsForCompositor just wants to check if there is
any compositor animation for a display item, so we can replace it by the
display item, and get the properties from this display item.

However, the caller of GetAnimationsForCompositor may use a subset of
transform-like properties for getting scale factors, or use all the
transform-like properties for sending all transform animations to the
compositor thread.

Depends on D19630

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

--HG--
extra : moz-landing-system : lando
2019-03-01 21:13:03 +00:00