Closed Bug 1412278 Opened 2 years ago Closed 2 years ago

Resizing shapes using CSS shapes editor doesn't work properly within iframes

Categories

(DevTools :: Inspector, defect)

defect
Not set

Tracking

(firefox58 verified)

VERIFIED FIXED
Firefox 58
Tracking Status
firefox58 --- verified

People

(Reporter: sebo, Assigned: mpark)

References

(Blocks 1 open bug)

Details

(Whiteboard: [designer-tools])

Attachments

(1 file)

Shapes used within the CSS clip-path property can't be properly resized using the CSS shapes editor when they are within an iframe.

Example:
1. Go to https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path
2. Inspect the HTML example for 'clip-path: circle(25%)'
3. Toggle the CSS shapes editor on
4. Try to resize the circle

=> The clipping circle resizes incorrectly. Afterwards the handler of the circle can't be dragged anymore.
Assignee: nobody → mpark
Status: NEW → ASSIGNED
Comment on attachment 8924704 [details]
Bug 1412278 - Fix CSS shapes editing for shapes in iframes where points are outside the frame.

https://reviewboard.mozilla.org/r/195926/#review201152

::: devtools/server/actors/highlighters/shapes.js:766
(Diff revision 1)
>     *          relative to the page
>     *
>     * @memberof ShapesHighlighter
>     */
>    convertPercentToPageCoords(x, y) {
> -    let { top, left, width, height } = this.zoomAdjustedDimensions;
> +    let dims = (this.highlighterEnv.window.document === this.currentNode.ownerDocument) ?

We can remove the brackets.
Attachment #8924704 - Flags: review?(gl) → review+
Keywords: checkin-needed
Autoland can't push this until all pending issues in MozReview are marked as resolved.
Keywords: checkin-needed
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c708d8efbaa3
Fix CSS shapes editing for shapes in iframes where points are outside the frame. r=gl
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c708d8efbaa3
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Works fine for me in Nightly 58.0a1 2017-11-08. Thank you for the quick fix!

Sebastian
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.