Usability changes to the ruleview autocomplete:
- max suggestions is now capped to 500 to make sure as many suggestions as possible
as possible are displayed
- vendor-prefixed properties are moved to the end of the list
- !important is no longer the first suggested item
MozReview-Commit-ID: AOfHyqS3n8s
--HG--
extra : rebase_source : 5a4842974672bebc7427a546b4e4014201147465
extra : histedit_source : 0c008a8e7aedb60c2df0774977e54074702d555d
To create new rules, style elements are added to the content document.
For nodes located in an iframe, the style element should be added to the
ownerDocument of this particular node.
MozReview-Commit-ID: 7ynd7YU3WeL
--HG--
extra : rebase_source : 48e989e229b7972101c2761c881127244530273d
shared/test/head had custom methods to open the Computed & Rule view.
They did not register any test actor and could be called several times
in the same test.
In order to reuse the openInspector method from inspector/test/head, the
tests have been modified.
We are moving from
openRuleView() -> do rule view tests -> openComputedView() -> do computed view tests
to
openInspector() -> select rule view -> do rule view tests -> select computed view -> do computed view tests
A bit more verbose for the tests themselves, but this will be useful when
migrating the shared tests to using the testActor.
MozReview-Commit-ID: 94cOqhPICyI
--HG--
extra : rebase_source : f7892af19b78ecdbb759fb21d17920f0f6e0f4c6
Include inspector/test/head in shared/test/head and remove the redundant functions.
Comparing with markup/test/head and computed/test/head, some functions were also
duplicated and have been moved up to inspector/test/head or shared-head.
Logic for opening the inspector will be moved in part2.
MozReview-Commit-ID: 5EIalpbf3cf
--HG--
extra : rebase_source : 83fced672cf2da515b32fa5f1f85b3b12a4ffe5c
Devtools splitters now have a clickable area on both sides of the splitter.
The previous layout provided a 3px clickable area (2px empty content + 1px
visible border).
The new layout uses invisible borders on both sides and a visible (clipped)
content. New draggable areas:
- side splitters : 1px left + 1px splitter + 4px right
- horizontal splitters : 2 px top + 1px splitter + 2px bottom
Variables are defined in splitters.css to adjust these settings.
Modified two test helpers opening context menus: the click should be
performed with a slight offset in order to avoid clicking on the splitter.
MozReview-Commit-ID: 94uFZoIBL7B
--HG--
extra : rebase_source : 55e6cb0f8f2ecbe1ae27ef9490925edfab7d62ce
extra : source : 4d5b0cdb72fe52f843c61a5df8f6b8ed35758be8
Devtools splitters now have a clickable area on both sides of the splitter.
The previous layout provided a 3px clickable area (2px empty content + 1px
visible border).
The new layout uses invisible borders on both sides and a visible (clipped)
content. New draggable areas:
- side splitters : 1px left + 1px splitter + 4px right
- horizontal splitters : 2 px top + 1px splitter + 2px bottom
Variables are defined in splitters.css to adjust these settings.
Modified two test helpers opening context menus: the click should be
performed with a slight offset in order to avoid clicking on the splitter.
MozReview-Commit-ID: 94uFZoIBL7B
--HG--
extra : rebase_source : 8683e8700c83feae6bddc869cacda03b156a9f91
extra : amend_source : 10cdeed511c02a907e99b74295fe25a3ad623030
There was an error thrown in the stylesheet.js `dirname` function because of
`this.safeURL` being like "blob:XXX", and thus not being valid for `Services.io.newURI`.
Removing the "blob:" part of the safeUrl before calling the `dirname` function
resolves the bug.
MozReview-Commit-ID: 9uth6vyAR2u
--HG--
extra : transplant_source : %1F%14%BA%13%8A%FC9%22%E5%F4%F8%B7%E93%DF%24%88G7R
There was an error thrown in the stylesheet.js `dirname` function because of
`this.safeURL` being like "blob:XXX", and thus not being valid for `Services.io.newURI`.
Removing the "blob:" part of the safeUrl before calling the `dirname` function
resolves the bug.
MozReview-Commit-ID: 9uth6vyAR2u
--HG--
extra : transplant_source : %82%09%7D%9F%0E%8F%B4%BA%A6%22%E3%B1%98%ADN%22%5B%00q%B2
ESLint 2 now flags anonymous generator functions according to
generator-star-spacing. Most of the changes here are correcting that.
MozReview-Commit-ID: 9xg2Gmlaz94
--HG--
extra : rebase_source : e6db0fd0ef477cd4fd2196b1036783f0974c586b
extra : histedit_source : 03eea033884969cc2a340316377318b0487ebdf2
This test simulates a context click in the rule view and selects the
"add rule" item in order to add a new rule.
Adding a rule triggers a ruleview-changed event, and so this test should
start listening for this event before triggering the action, which it
did not do.
MozReview-Commit-ID: BPO8Fgwsq5M
--HG--
extra : rebase_source : e975e57148850c41cfae4d9748809d1f6672aa84
Check if the CSS inplace editor is currently using several lines
to display its value. When using several lines, prevent increment,
decrement and autocomplete features.
The autocomplete can still be triggered by typing a value at the end
of the input (or before a space). When the autocomplete popup is
opened, UP/DOWN still allow to cycle through the suggestions.
MozReview-Commit-ID: DapCdhjx444
--HG--
extra : rebase_source : e7c6e8a53d29b79174913c011e1ac07c39431238
Previously, every test and support file would be synced to the objdir
when running any test. Now that only those support files and tests requested
are synced, we note support files required beyond those in a test's
directory in ini manifests.
MozReview-Commit-ID: EmlDz9d4lqt
When opening the context menu (and displaying the "copy" menu entry)
or when receiving a copy event, we now check if the current target
is a textarea. (multiline inplace editor relies on textarea)
Modified existing test to check this new use case.
MozReview-Commit-ID: Cgm67JCdN4c
--HG--
extra : rebase_source : 4955f910e5428b92587b408ffd1b62cd668faf2a
The inplaceEditor now supports a maxWidth configuration option which can either
be a number or a method returning a number. This maxWidth will be applied to the
hidden element used in order to autosize the input.
MozReview-Commit-ID: JTiCQ3HK5bn
--HG--
extra : rebase_source : dcf7ba4a897cd77b43b333ec3b5633dc9043e51d
extra : source : a93558488cf7fc9f54165bd5f98055e8a3901dac
In preparation for using a multiline editor for property values, tests
need to be updated :
- some tests used the "input" selector, which will no longer work with a
textarea
- some tests are relying on EventUtils.sendChar to send keys such as
"VK_RETURN". Doing so also applies the shift key modifier, which has
a specific behavior with multiline editors
MozReview-Commit-ID: HkFxH3Go49E
--HG--
extra : rebase_source : 58ea640905b4acc2574c47b2bc87fcf0780db59b
Add an 'unit-change' event fired when shift+click on color and angle swatches.
Add a listener on this event in text-property-editor.js to call the same function
that's called when tooltip edit is commited to persist the new unit.
Edit some tests to adapt to this new behaviour and create some tests to make sure
the value obtained via shift+click are actually persisted.
MozReview-Commit-ID: CcF4oiBPEzT
--HG--
extra : transplant_source : %1B%40%A24%EDW.%C5%96%C8m%3C%1F4%DA%F78%D1%26%8B
Add a swatch before angle values in the rules panel and allow cycling
through angle units with shift+click (like we already do for color units).
MozReview-Commit-ID: CWhoUQTkP1G
--HG--
extra : transplant_source : %5B%E5%AD%22%D2%20uk%07%EE%A9%E4%91YS%B3R%C3%DF%21
As commented in the test, using createNewRuleViewProperty with "width:"
will actually trigger two ruleview-changed events :
- one when focusing the property-name input
- one when focusing the property value input (which is automatically done when hitting
return in this case, since we only entered a property name)
MozReview-Commit-ID: GjJnwDr3ON6
--HG--
extra : rebase_source : d4f22915dfdd65d55b23a09f797402944870f017