Bug 28972 - REGRESSION: Styles showing as implicit when they shouldn't
Summary: REGRESSION: Styles showing as implicit when they shouldn't
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: 28973
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-04 09:41 PDT by Timothy Hatcher
Modified: 2009-10-15 02:41 PDT (History)
6 users (show)

See Also:


Attachments
Bug (37.35 KB, image/png)
2009-09-04 09:42 PDT, Timothy Hatcher
no flags Details
Expected (30.06 KB, image/png)
2009-09-04 09:42 PDT, Timothy Hatcher
no flags Details
patch and test (9.59 KB, patch)
2009-09-22 05:32 PDT, Yury Semikhatsky
hyatt: review+
abarth: commit-queue-
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:41:41 PDT
Styles are showing as implicit (dimmed) when they shouldn't.

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

Results:
Multiple things are dimmed.

Expected:
Nothing should be dimmed here.
Comment 1 Timothy Hatcher 2009-09-04 09:42:08 PDT
Created attachment 39066 [details]
Bug
Comment 2 Timothy Hatcher 2009-09-04 09:42:29 PDT
Created attachment 39067 [details]
Expected
Comment 3 Yury Semikhatsky 2009-09-09 07:14:49 PDT
This regression was introduced with the fix for
https://bugs.webkit.org/show_bug.cgi?id=28635.
Comment 4 Yury Semikhatsky 2009-09-22 05:32:35 PDT
Created attachment 39914 [details]
patch and test
Comment 5 Timothy Hatcher 2009-09-22 09:20:20 PDT
Comment on attachment 39914 [details]
patch and test

Looks OK to me, but Hyatt, Beth or Mitz should review.
Comment 6 Timothy Hatcher 2009-09-22 09:24:17 PDT
I still wonder why the Inspector shows them as implicit (dim), when they should show as normal properties. Fixing the shorthand is correct. But they should be black despite fixing the shorthand.
Comment 7 Yury Semikhatsky 2009-09-22 09:41:47 PDT
(In reply to comment #6)
> I still wonder why the Inspector shows them as implicit (dim), when they should
> show as normal properties. Fixing the shorthand is correct. But they should be
> black despite fixing the shorthand.
With the patch applied  only background-repeat-x and background-repeat-y are dimmed for the icon at webkit.org while background-repeat is shown as explicit style. It seems to be correct representation since http://webkit.org/css/main.css declares  background-repeat: no-repeat; (shorthand property).
Comment 8 Timothy Hatcher 2009-09-22 09:56:33 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > I still wonder why the Inspector shows them as implicit (dim), when they should
> > show as normal properties. Fixing the shorthand is correct. But they should be
> > black despite fixing the shorthand.
>
> With the patch applied  only background-repeat-x and background-repeat-y are
> dimmed for the icon at webkit.org while background-repeat is shown as explicit
> style. It seems to be correct representation since
> http://webkit.org/css/main.css declares  background-repeat: no-repeat;
> (shorthand property).

OK, I see.

Actually background-repeat-x should be black, since it is the first in the shorthand. Like what you see with margin: 0, margin-top: 0 will be black and the rest are implicit (dim).

So I think there is more that needs fixed here, but I don't know what to suggest.
Comment 9 Adam Barth 2009-10-13 14:48:41 PDT
Timothy, what's the status of this patch?  Should we land this one and then fix the remaining cases in another bug?  Discussion seems to have stagnated.
Comment 10 Dave Hyatt 2009-10-13 21:22:04 PDT
Comment on attachment 39914 [details]
patch and test

Fix the ChangeLog typo... "correct" not "cirrect".
Comment 11 Yury Semikhatsky 2009-10-13 23:26:43 PDT
(In reply to comment #9)
> Timothy, what's the status of this patch?  Should we land this one and then fix
> the remaining cases in another bug?  Discussion seems to have stagnated.

Sorry, I was distracted by other issues and didn't have time to work on this one.

(In reply to comment #8)
> Actually background-repeat-x should be black, since it is the first in the
> shorthand. Like what you see with margin: 0, margin-top: 0 will be black and
> the rest are implicit (dim).
> 
> So I think there is more that needs fixed here, but I don't know what to
> suggest.
I don't know whether the difference in handling background-repeat and other properties affected by this patch and those whose values are parsed by CSSParser::parse4Values (margin, padding, color, border-style, border-width) is intentional or not but it is parse4Values that makes first longhand property explicit in some cases. I could support similar behavior for background-repeat and others but it's going to be a bit trickier since they are handled in several places in CSSParser.
Comment 12 Adam Barth 2009-10-14 22:55:42 PDT
Comment on attachment 39914 [details]
patch and test

Hyatt asked for some minor changes to this patch, so we can't land it automatically.
Comment 13 Pavel Feldman 2009-10-15 02:41:17 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	A	LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand-expected.txt
	A	LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand.html
	A	LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.css
	A	LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js
	M	WebCore/ChangeLog
	M	WebCore/css/CSSParser.cpp
Committed r49616