Closed Bug 1175040 Opened 9 years ago Closed 9 years ago

Box-model view server-side code clean-up and getLayout should send more properties

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: pbro, Assigned: pbro)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

A lot of things I want to do in bug 1150496 require the pageStyleActor.getLayout method to send more data about the current node. Right now it basically only sends back the sizes of each of the box-model regions. I want it to also send the computed values of various css properties: box-sizing, display, position, z-index.

I'd also like to take this opportunity to do some eslint-related cleanup to styles.js
Blocks: 1150496, 1150499
Bug 1175040 - Eslint cleanups in styles.js and highlighter.js actor modules; r?bgrins
Attachment #8623563 - Flags: review?(bgrinstead)
Bug 1175040 - Add more layout-related properties to the output of getLayout; r?bgrins

The getLayout method of the PageStyleActor returns layout-related data about an element
but some information is missing. In particular, this patch adds data about the
box-sizing, display and z-index. All of which will be very useful when adding more
information to the layoutview panel in bug 1150496.
Attachment #8623564 - Flags: review?(bgrinstead)
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
(In reply to Patrick Brosset [:pbrosset] [:patrick] [:pbro] from comment #1)
> Created attachment 8623563 [details]
> MozReview Request: Bug 1175040 - Eslint cleanups in styles.js and
> highlighter.js actor modules; r?bgrins
> 
> Bug 1175040 - Eslint cleanups in styles.js and highlighter.js actor modules;
> r?bgrins
I got a bit carried away with this one and also ended up making eslint cleanups to highlighter.js (which I intend to work on in the scope of bug 1150496 anyway, namely to land the work we did earlier in bug 938188).
Blocks: 938188
Comment on attachment 8623563 [details]
MozReview Request: Bug 1175040 - Add more layout-related properties to the output of getLayout; r=bgrins

https://reviewboard.mozilla.org/r/11571/#review10001

Nice!  Looks mechanical enough, so assuming tests are all still passing let's ship it
Attachment #8623563 - Flags: review?(bgrinstead) → review+
Comment on attachment 8623564 [details]
MozReview Request: Bug 1175040 - Add more layout-related properties to the output of getLayout; r?bgrins

https://reviewboard.mozilla.org/r/11573/#review10005

Doesn't look like we have a server-side test for getLayout yet, this would be a great oppurtunity to add one (or modify one of the existing test_styles-* functions to include this function
Attachment #8623564 - Flags: review?(bgrinstead)
Keywords: leave-open
Comment on attachment 8623563 [details]
MozReview Request: Bug 1175040 - Add more layout-related properties to the output of getLayout; r=bgrins

Bug 1175040 - Add more layout-related properties to the output of getLayout; r=bgrins

The getLayout method of the PageStyleActor returns layout-related data about an element
but some information is missing. In particular, this patch adds data about the
box-sizing, display and z-index. All of which will be very useful when adding more
information to the layoutview panel in bug 1150496.
Attachment #8623563 - Attachment description: MozReview Request: Bug 1175040 - Eslint cleanups in styles.js and highlighter.js actor modules; r?bgrins → MozReview Request: Bug 1175040 - Add more layout-related properties to the output of getLayout; r=bgrins
Attachment #8623563 - Flags: review+ → review?(bgrinstead)
Attachment #8623564 - Attachment is obsolete: true
https://reviewboard.mozilla.org/r/11571/#review10073

::: toolkit/devtools/server/actors/styles.js
(Diff revision 2)
> -    if (options.margins) {

This looked like a leftover from ancient times I think. No-one uses this option, and it does the same as autoMargins (which on the contrary, is used).
The previous, more complete, try build was green. Here's one more just with chrome mochitests to make sure the new test I added works fine: https://treeherder.mozilla.org/#/jobs?repo=try&revision=384c56e5183e
Comment on attachment 8623563 [details]
MozReview Request: Bug 1175040 - Add more layout-related properties to the output of getLayout; r=bgrins

https://reviewboard.mozilla.org/r/11571/#review10175

Ship It!
Attachment #8623563 - Flags: review?(bgrinstead) → review+
Keywords: leave-open
https://hg.mozilla.org/mozilla-central/rev/cfdfff0c6963
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: