Commit Graph
19463 Commits
Author SHA1 Message Date
Radu-Sebastian Amarie f85aadefc0 ADD: disablePictureInPicture attribute for HTML5 videos (#15334)
* ADD: disablePictureInPicture attribute for HTML5 videos

* ADD: disablePictureInPicture as DOMProperty and attribute

* Update: Replace camelCase with lowercase and vice-versa

* FIX: Missing comma on attribute (prettier)
2019-04-25 12:02:27 +01:00
FUJI Goro 1eb2b892df give canUseDOM with a possibility to be a constant (#14194)
https://webpack.js.org/plugins/define-plugin/

Webpack's DefinePlugin has the ability to replace `typeof expr` to a constant in compile-time, which should lead to better dead-code-elimination.
2019-04-25 11:28:53 +01:00
shubham de26d6dd36 typo fix (#15493)
changed ReactResponderContext.dispatchEvent otpions keys to options.
2019-04-25 09:37:35 +01:00
Dominic Gannaway 64e3da286f Event API: Add FocusScope surface (#15487) 2019-04-25 02:01:09 +01:00
Dan Abramov 80597a2377 Use a heuristic for locating roots 2019-04-24 23:02:41 +01:00
Dan Abramov 942f67c936 Merge pull request #220 from gaearon/removed-ids
Select parent node if selection is removed
2019-04-24 19:25:05 +01:00
Dominic Gannaway 3f058debc2 Event API: various bug fixes (#15485) 2019-04-24 17:56:21 +01:00
Brian Vaughn 7bae48f00c Fixed minor CSS overflow issue 2019-04-24 09:07:53 -07:00
Brian Vaughn c855a862c3 Merge pull request #218 from gaearon/bump-react
Bump React versions
2019-04-24 08:45:16 -07:00
Dan Abramov 949384f4ca Select parent node if selection is removed 2019-04-24 16:29:23 +01:00
Dan Abramov 52deada495 Bump React versions 2019-04-24 15:57:43 +01:00
Dan Abramov 54aecf487e Merge pull request #215 from bvaughn/persist-selection
Try to restore selection between reloads
2019-04-24 15:50:29 +01:00
Dan Abramov f123763fe1 Read index off the Fiber 2019-04-24 15:05:33 +01:00
Dan Abramov 5d2d4213ec Delete stale paths 2019-04-24 15:05:21 +01:00
Dan Abramov e050529c7d Read renderer ID from operations 2019-04-24 15:00:46 +01:00
Dan Abramov 26162988aa Fix tests 2019-04-24 14:37:46 +01:00
Dan Abramov 7eb7c5a350 Match Fibers to saved selection as they mount
This implements matching Fibers against the tracked selection path.

The algorithm is optimized to do as little checks as possible:

* When not trying to restore selection, we don't do anything
* When restoring selection, we only check .return pointers of new mounts
* Only when .return pointers match our current deepest match, we compare the frames
2019-04-24 14:37:46 +01:00
Dan Abramov 3bb837b683 Implement getPathForElement to serialize the selected path
Note this doesn't restore the selection yet.
2019-04-24 14:37:46 +01:00
Dan Abramov b1a7007cc5 Keep track of root insertion order in the renderer
Normally, Fibers have key or index which we'll use to match things up between reloads. However, roots don't have such a concept. We'll use their insertion order as an approximation. If it's consistent, we'll be able to restore the selection.
2019-04-24 14:37:46 +01:00
Dan Abramov d8abecdcf9 Persist and restore selection in agent
This implements the infrastructure for saving and restoring renderer-specific selection state in the session storage.

Note this doesn't actually implement the calculation and tracking of paths in the renderer. It only simulates that the renderer can do it. The actual implementation will come in a later commit.
2019-04-24 14:37:46 +01:00
Brendan McLoughlin fb28e90482 Add missing word to code comment for clarity (#15443) 2019-04-24 11:03:51 +01:00
Dominic Gannaway fa2fa3564d Experimental event API: adds context.isTargetDirectlyWithinEventComponent (#15481) 2019-04-24 11:02:47 +01:00
Dominic Gannaway d3af2f2a5d Experimental Event API: add event component mount phase callback (#15480) 2019-04-24 10:41:24 +01:00
Brian Vaughn 085d00e877 Merge pull request #196 from bvaughn/selected-element-suspense
Convert inspected element (right panel) to use Suspense
2019-04-23 18:33:05 -07:00
Brian Vaughn 7262a30cf3 Reverted optimization to avoid re-sending inspected fiber unless it committed 2019-04-23 18:04:25 -07:00
Andrew Clark ce126fbb23 Fix priority inference of next level of work (#15478)
Bugfix for `inferPriorityFromExpirationTime` function. It happened to
work in our existing tests because we use virtual time.

Flow would have caught this if expiration times were an opaque type. We
should consider that in the future. (The downside of opaque types is
that all operations would have to go through helper functions, which may
or may not get inlined by Closure.)
2019-04-23 16:41:05 -07:00
Andrew Clark 71c8759ceb Measure callback timeout relative to current time (#15479)
Fixes a bug where the timeout passed to `scheduleCallback` represented
an absolute timestamp, instead of the amount of time until that
timestamp is reached. The solution is to subtract the current time
from the expiration.

The bug wasn't caught by other tests because we use virtual times that
default to 0, and most tests don't advance time.

I also moved the `initialTimeMs` offset to the
`SchedulerWithReactIntegration` module so that we don't have to remember
to subtract the offset every time. (We should consider upstreaming this
to the Scheduler package.)
2019-04-23 16:40:55 -07:00
Andrew Clark 9c6ff136c7 Remove timeout from performance flamegraph (#15477)
The implementation is wrong, but also it's not that useful for
debugging. Implementing it properly would involve tracking more
information than we do currently. Perhaps including the priority
of the callback in the message would be helpful, but not sure. For now
I'll just remove it.
2019-04-23 15:42:25 -07:00
Dan Abramov 299a2714c3 Use stricter equality check (#15474) 2019-04-23 23:28:02 +01:00
Brian Vaughn 0aa7d2f800 Reverted optimization to avoid re-sending inspected fiber unless it committed 2019-04-23 14:03:58 -07:00
Brian Vaughn 1e5c0b7856 Re-added the selection message 2019-04-23 13:43:38 -07:00
Dominic Gannaway 017d6f14b7 Experimental Event API: add rootEventTypes support to event responders (#15475)
* Adds rootEventTypes
2019-04-23 19:55:50 +01:00
Brian Vaughn 4dcb34ea32 Fixed Flow error 2019-04-23 11:32:07 -07:00
Brian Vaughn 53c7338420 Updated flow-bin to attempt to fix the error 2019-04-23 09:00:25 -07:00
Brian Vaughn d85f566d66 Merged master (tooltip changes) 2019-04-23 08:49:40 -07:00
Brian Vaughn 8b33dd673d Added @reach/tooltip 2019-04-23 08:41:52 -07:00
Dominic Gannaway 784ebd8fa9 Experimental event API: rework the propagation system for event components (#15462) 2019-04-23 11:50:48 +01:00
Brian Vaughn ec7536704d Locked down canary versions 2019-04-22 19:32:16 -07:00
Brian Vaughn 7f1531044b Differentiate between no-change and no-element-found when inspecting element 2019-04-22 15:37:55 -07:00
Brian Vaughn 00872e2e51 Fixed suspense fallback issue by moving inspection message side effect before suspending render 2019-04-22 15:25:55 -07:00
Brian Vaughn 64bb2d31f9 Fixed bug with cache invalidation 2019-04-22 15:18:32 -07:00
Brian Vaughn 64bc49d523 Run first setState with explicit priority in case of non-React event handlers 2019-04-22 15:11:04 -07:00
Wellington Cordeiro 2d8c28733d fix: correct permissions for Firefox
remove the `background` permissions as it's not used by Firefox, but `activeTab` is and we needed
it.

fix #136
2019-04-22 15:12:33 -06:00
Brian Vaughn e31ae91023 Removed duplicate scheduler module 2019-04-22 13:10:47 -07:00
Brian Vaughn ba640df982 Merge branch 'master' into selected-element-suspense 2019-04-22 10:47:34 -07:00
Brian Vaughn 433934f55e Refactored TreeContext to use less memoization (based on feedback from Sebastian) 2019-04-22 10:39:21 -07:00
Brian Vaughn d53ae2ea8a Refactored TreeContext to use less memoization (based on feedback from Sebastian) 2019-04-22 10:19:59 -07:00
Brian Vaughn 70be637d48 Don't schedule an update with React unless the curent element was invalidated 2019-04-22 09:37:55 -07:00
Brian Vaughn 5970bf4b40 Changed polling approach. Fixed remove event typo. 2019-04-22 09:37:55 -07:00
Brian Vaughn 3de18de25e Tried to implement two setState pattern, but it does not feel right 2019-04-22 09:37:55 -07:00