Bug 28973 - REGRESSION: No margin shorthands showing
Summary: REGRESSION: No margin shorthands showing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks: 28972
  Show dependency treegraph
 
Reported: 2009-09-04 09:43 PDT by Timothy Hatcher
Modified: 2009-09-16 14:31 PDT (History)
7 users (show)

See Also:


Attachments
Bug (37.35 KB, image/png)
2009-09-04 09:44 PDT, Timothy Hatcher
no flags Details
Expected (30.06 KB, image/png)
2009-09-04 09:44 PDT, Timothy Hatcher
no flags Details
test page (229 bytes, text/html)
2009-09-09 06:14 PDT, Yury Semikhatsky
no flags Details
patch (1.58 KB, patch)
2009-09-09 06:27 PDT, Yury Semikhatsky
eric: review-
Details | Formatted Diff | Diff
patch with layout test (4.24 KB, patch)
2009-09-09 09:41 PDT, Yury Semikhatsky
timothy: review-
Details | Formatted Diff | Diff
patch with layout test (4.12 KB, patch)
2009-09-09 09:47 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
patch with pure js layout test (6.05 KB, patch)
2009-09-10 01:32 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2009-09-04 09:43:51 PDT
No margin shorthand is showing, when they should.

Steps:
1) Visit webkit.org
2) Inspect #icon
3) Look at the styles.

Results:
No margin shorthand showing.

Expected:
A margin shorthand of 0px.
Comment 1 Timothy Hatcher 2009-09-04 09:44:10 PDT
Created attachment 39068 [details]
Bug
Comment 2 Timothy Hatcher 2009-09-04 09:44:29 PDT
Created attachment 39069 [details]
Expected
Comment 3 Yury Semikhatsky 2009-09-09 06:14:37 PDT
Created attachment 39265 [details]
test page

This regression was introduced with the fix for https://bugs.webkit.org/show_bug.cgi?id=28635. I've attached a page where where margins shorthand is empty. If 'margin: 0px;' is moved to the top of the #icon style declaration block the margin shorthand becomes 0px in the Web Inspector.
Comment 4 Yury Semikhatsky 2009-09-09 06:27:34 PDT
Created attachment 39266 [details]
patch
Comment 5 Eric Seidel (no email) 2009-09-09 07:56:21 PDT
Comment on attachment 39266 [details]
patch

We can write a LayoutTest for this, no?
Comment 6 Yury Semikhatsky 2009-09-09 09:41:31 PDT
Created attachment 39273 [details]
patch with layout test
Comment 7 Timothy Hatcher 2009-09-09 09:44:19 PDT
Comment on attachment 39273 [details]
patch with layout test

You need to fill in the info in the LayoutTests ChangeLog.
Comment 8 Yury Semikhatsky 2009-09-09 09:47:22 PDT
Created attachment 39274 [details]
patch with layout test

Added LayoutTest/ChangeLog entry.
Comment 9 Yury Semikhatsky 2009-09-09 09:48:23 PDT
(In reply to comment #7)
> (From update of attachment 39273 [details])
> You need to fill in the info in the LayoutTests ChangeLog.

Done.
Comment 10 Eric Seidel (no email) 2009-09-09 10:56:34 PDT
Comment on attachment 39274 [details]
patch with layout test

Tests are better when they contain the expected results in them.  In this case, I don't know if your test results are correct or not, and new implementors woudl have to compare to the existing -expected.txt files to know if their implementations are failing or passing this.

javascript-only tests are also preferred in cases like this:
http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree

Numerous examples of js-only tests in resources/ directories containing a TEMPLATE.html file.

This is OK, but the test definitely could be slicker. :)
Comment 11 Yury Semikhatsky 2009-09-10 01:32:24 PDT
Created attachment 39328 [details]
patch with pure js layout test
Comment 12 Yury Semikhatsky 2009-09-10 01:37:16 PDT
(In reply to comment #10)
> (From update of attachment 39274 [details])
> Tests are better when they contain the expected results in them.  In this case,
> I don't know if your test results are correct or not, and new implementors
> woudl have to compare to the existing -expected.txt files to know if their
> implementations are failing or passing this.
> 
> javascript-only tests are also preferred in cases like this:
> http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree
> 
> Numerous examples of js-only tests in resources/ directories containing a
> TEMPLATE.html file.
> 
> This is OK, but the test definitely could be slicker. :)

Thanks for your suggestion. I'm new to the layout tests and it's not obvious which of them can be considered as reference implementation. I refactored the test so that it uses TEMPLATE.html.
Comment 13 WebKit Commit Bot 2009-09-16 13:41:22 PDT
Comment on attachment 39328 [details]
patch with pure js layout test

Rejecting patch 39328 from commit-queue.

('WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--quiet', '--exit-after-n-failures=1')
Running build-dumprendertree
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 11263 test cases.
(48)Address already in use: make_sock: could not bind to address 127.0.0.1:8080
no listening sockets available, shutting down
Unable to open logs
Timed out waiting for httpd to start at WebKitTools/Scripts/run-webkit-tests line 1466, <IN> line 20152.
Comment 14 Eric Seidel (no email) 2009-09-16 13:42:42 PDT
Comment on attachment 39328 [details]
patch with pure js layout test

Sorry, that's clearly not your fault. :)  I happen to be running another service on 8080 on the commit machine when your patch went through the queue.
Comment 15 WebKit Commit Bot 2009-09-16 14:31:48 PDT
Comment on attachment 39328 [details]
patch with pure js layout test

Clearing flags on attachment: 39328

Committed r48436: <http://trac.webkit.org/changeset/48436>
Comment 16 WebKit Commit Bot 2009-09-16 14:31:56 PDT
All reviewed patches have been landed.  Closing bug.