Open Bug 1047151 Opened 11 years ago Updated 3 years ago

Attempting to set a negative border width in the box model view should be ignored

Categories

(DevTools :: Inspector, defect, P3)

34 Branch
defect

Tracking

(Not tracked)

People

(Reporter: sys.sgx, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:34.0) Gecko/20100101 Firefox/34.0 (Beta/Release) Build ID: 20140731030206 Steps to reproduce: This is on FF 34a1. Click to inspect an element, and then click on the Box Model. Click to edit ie border-top: enter "-10" as value. For some reason, anything that is negative value will end up "auto-changing" to value "3" in the Box Model. You can continue doing this in all Box Model value modifications. Expected results: There should be a default handling for all possible values.
Component: Untriaged → Developer Tools: Inspector
OS: Windows 7 → All
Hardware: x86 → All
Was the value 3 to start with before you changed it? For border and padding negative values are illegal so attempts to set them negative are just ignored. Margins can be negative and I seem to be able to set them so just fine.
Dave, this seems to exist only for borders. If for example all border values are "0" and you try to set them to a negative value, they automatically change upon clicking to "3". Are you refering to something other than this?..
(In reply to sys.sgx from comment #2) > Dave, this seems to exist only for borders. If for example all border values > are "0" and you try to set them to a negative value, they automatically > change upon clicking to "3". Are you refering to something other than this?.. Can you give me an example page where this happens?
It happens in all pages, and there should be a default behavour for borders neg values (should accept only real pixel values). Take for example the bugzilla.mozilla.org page, and check the attachment where the border is modified.
Attached image Box Model.gif
Ok this is coming from the default border styles I think. When setting a border on an element that does not already have a border the box model also sets the border style to solid. The attempt to set the width to a negative value fails but setting the style succeeds, at which point the default border width from the browser styles comes into play. Apparently that's three pixels. We need to check if the attempt to set the width succeeded and if not remove the change to the border style.
Summary: DevTools: Box Model should handle correctly all possible values → Attempting to set a negative border width in the box model view should be ignored
LGTM. Setting the style should be conditional based on whether the width for the border has been successfully set.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Inspector Bugs Triage - Filter on CLIMBING SHOES
Priority: -- → P3
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: