When the inspector is in landscape mode, it will first try to toggle on the 3 pane mode by
creating a middle/bottom-left panel with the same sidebar width, but if doubling the
original sidebar width will be bigger than half of the toolbox's width, we will instead
toggle on the 3 pane mode with all panels being of equal widths.
When the inspector is in portrait mode, it will just toggle on its T shape pane such that
the 2 bottom panes are equal widths.
We also increased the breakpoint width of the toolbox's side view to 1000px so that it
will keep its T shape in portrait mode until the toolbox's width is bigger than 1000px.
Use the getBoxQuads's relativeTo option to avoid having to calculate the offset
due to frames.
Also reduce the precision of numbers used when checking if the highlighter is
correctly displayed.
Finally, for some strange reasons, this patch seems to cause a totally unrelated
events mutation event to be sent during the test. This polutes the mutations
received and made the test fail. So I filtered the list of mutations to only
preserve the ones we care about here.
I could not reproduce this extra mutation when running Firefox. Only during the
test. So I did not investigate further.
MozReview-Commit-ID: 1ZQ6FGULjHG
--HG--
extra : rebase_source : 6406571849afb1d3dcec176f68ef4d3d122a1abf
This patch does the following things:
* Create a new class ServoFontFaceRule for CSSOM of @font-face rule
which mostly follows how nsCSSFontFaceRule was implemented.
* Remove the old nsCSSFontFaceRule and binding code to create it.
* Have FontFace backed by Servo data via making mRule and mDescriptors
of the class hold RawServoFontFaceRule like ServoFontFaceRule.
To keep this patch small, it effectively just delays the conversion
from Servo data to nsCSSValue from parsing to using. This may cause
worse performance if the font set is flushed repeatedly. Supposing we
don't flush font set very frequently, it may not be a big deal.
We may still want to remove the intermediate nsCSSValue conversion at
some point, and have everything converted to their final form directly
when used, but that can happen in followups.
There are some unfortunate bits from this change:
* We lose style sheet for logging in FontFaceSet. This is probably not
all that worse, because we wouldn't have that before either if the
page doesn't use CSSOM to visit it. But we should figure out some
approach to fix it anyway.
* InspectorFontFace no longer shares the same rule object as CSSOM.
This isn't really a problem if the @font-face rule isn't very mutable.
Unless we want to make the rule returned from InspectorFontFace to be
mutable (i.e. via inspector), not using the same object probably isn't
too bad.
This patch switches the code we use to serialize stuff in FontFace and
CSSFontFaceRule, which leads to some failures in tests. Specifically,
the expected changes including:
* Value of font-family now can be serialized to identifier sequence like
font-family property. The old code always serializes it to string,
but it doesn't seem to have different requirement than the property.
Blink can serialize to identifier as well.
* Family name inside local() is also changed to use the same way as
family names elsewhere (i.e. can be identifier sequence). Blink has
the same behavior as the old code, but I don't think it's a big deal.
* The order of descriptors serialized gets changed. I don't think it
matters at all.
* Empty string as font-family via using string syntax is no longer
considered invalid for FontFace. I don't find it is mentioned anywhere
that it should be specifically treated invalid.
MozReview-Commit-ID: 32Fk3Fi9uTs
--HG--
extra : rebase_source : 6221ec8fc56de357b06dd27e770fb175348a2f77
In this patch, modify the following things:
* Modify variable name of test data list to "TEST_DATA"
* Modify variable name of testing animation target class name to "targetClass"
* Some comments format
MozReview-Commit-ID: J33RRcm4chO
--HG--
extra : rebase_source : 6cfc7515faf587ee0dfe03377d9529c461ad4ae2
Add new container and editor dedicated to represent slotted nodes.
Add isSlotted to the interface of Container elements (returns false
everywhere except for slotted containers).
MozReview-Commit-ID: DRxyqThpegm
--HG--
extra : rebase_source : e01c7931e66fcecbeb14f8de9901add062df6b98
The markup-view forwards click events to container instance only if the Container
is a MarkupElementContainer, and assumes a _buildEventTooltipContent method will
be available. Here we switch to a public onContainerClick method that the markup
view will call as long as it is defined on the targeted container.
MozReview-Commit-ID: Kem0m57ECyE
--HG--
extra : rebase_source : b5ee2de3c22c0d6511c48ab5e4ceb64c6bd3143d
With shadowdom support, a single nodeFront can have several containers.
This will complexify the logic to manipulate the _containers map in
markup.js. Introducing basic getters and setters to interact with this
map will make the transition easier.
MozReview-Commit-ID: FTphQgCsHNL
--HG--
extra : rebase_source : e7db9cd73a0511c1728efa42899c74c0c6f9e7fe
With shadowdom support, the container will become more specific than the
nodeFront. Add a specific API to select directly a container rather than
having to use a nodeFront will make the transition easier.
MozReview-Commit-ID: DIiKJPsxEYZ
--HG--
extra : rebase_source : 091d67f68ac8ea89128dc2c5ae233a509a70a6a7
With shadowdom support, a single node-front can be represented by several
containers. Keeping track of the hovered container rather than the hovered
nodeFront will make the transition easier.
MozReview-Commit-ID: 2uiMRhp5ly1
--HG--
extra : rebase_source : 4ee3b857ee43ebe981b2148b0a6a1390c69669aa
Both reason and isSlotted arguments of setNodeFront are optional, switching to an
object argument avoids weird calls such as setNodeFront(front, null, true) in favor
of a more explicit setNodeFront(front, { isSlotted: true });
MozReview-Commit-ID: A6nziH3QQYe
--HG--
extra : rebase_source : e5bde9e74369e1b0fb2e1d1a0a2b31a0131caacd
Instead of filtering light DOM nodes in the actor, return enough information
for the markup-view to filter out the nodes itself. The nodes will be displayed
in a later changeset when the markup view can accommodate several containers
for a single nodeFront.
MozReview-Commit-ID: LFKYU24BLZB
--HG--
extra : rebase_source : 232795c1ee91a41ec667c8bcdc21eb73bcfcbf9a
When inspecting a node with the toolbox focused on an inner frame, we need to
adjust the selectors used to remove hidden parent frames.
MozReview-Commit-ID: CXwb3FmnJFO
--HG--
extra : rebase_source : df8b01286fe8ebe38cb93cfe05bbd24e7f97d40d
- Implement basic React component & Redux store and actions for font editor.
- Move font overview rendering from FontsApp into its own component: FontOverview. FontsApp remains just a wrapper for FontEditor and FontOverview.
- Listen to rule selection events to toggle the display of the font editor and font overview panels.
MozReview-Commit-ID: 496LHPqpnKL
To use, toggle pref to true: devtools.inspector.fonteditor.enabled
- Introduces the ability for tools to mark one or more rules as "selected". Store rule references for tools to know here to map changes.
- On mouse hover over any rule, show the font editor swatch.
- On click on the font editor swatch, toggle the rule as "selected" and toggle the font inspector panel.
MozReview-Commit-ID: 3eTzEOXkApl
devtools/shared/system is a complex module retrieving details device/platform
information. Modules that only need to get AppConstants should not pull down
such a complex dependency.
MozReview-Commit-ID: 2FmCO8nBSpP
--HG--
rename : devtools/client/shared/webpack/shims/system-stub.js => devtools/client/shared/webpack/shims/app-constants-stub.js
extra : rebase_source : 0ec5e4d320c8b1543d5fe579d8adf51c5fa4286d
In the fonts panel UI prior to Firefox 60, remote font URLs used to be
displayed in full in a text input field. It made it easy to copy them.
With the redesign that happened in 60 (bug 1437548 and 1442001), getting
the URL became harder. The URL isn't visible anymore easily. There's a link
that can be clicked to load the URL in the browser, or it can also be copied
from the @font-face CSS rule code section. But that's harder.
This change adds the beginning of the URL back (with an ellipsis) and a
simple button that copies the link.
Note that the new test failed intermittently on non e10s (took too long).
This was because of a react middleware which was logging all actions, which,
in non-e10s, ended up logging StyleRuleActors, which got serialized and caused
way too much logs to be printed, slowing the test down. So the test was
disabled on non-e10s.
MozReview-Commit-ID: 2oSMoWKYhTk
--HG--
extra : rebase_source : ac406d91c78e5222854b53f245ad2d93428bfc4d