RESOLVED INVALID28093
Inspector: May Be Showing The Wrong Inherited/Computed Styles
https://bugs.webkit.org/show_bug.cgi?id=28093
Summary Inspector: May Be Showing The Wrong Inherited/Computed Styles
Joseph Pecoraro
Reported 2009-08-07 21:22:05 PDT
The Inspector shows that the default (inherited) border color styles for an <input> is "black" (in the 4 longhand properties). However, attempting to actually use manual CSS styles "border-color: black" will look completely different. It seems as though the default color really is "none". The Inspector's computed styles come from the following: var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); Is getComputedStyle acting wonky in this case? Could there be other cases where it is acting incorrectly?
Attachments
Picture Showing Inspector Says "black" in Computed Styles (107.13 KB, image/png)
2009-08-07 21:23 PDT, Joseph Pecoraro
no flags
Simple Test Page (382 bytes, text/html)
2009-08-07 21:24 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2009-08-07 21:23:08 PDT
Created attachment 34357 [details] Picture Showing Inspector Says "black" in Computed Styles Here is an image showing that the Inspector currently says "black" under the computed styles for a default <input>.
Joseph Pecoraro
Comment 2 2009-08-07 21:24:30 PDT
Created attachment 34358 [details] Simple Test Page Basic test page with a few different styled textfields (default, border black, and border none). "2px inset" comes from WebCore/css/html.css.
Timothy Hatcher
Comment 3 2009-08-07 21:31:30 PDT
Well none isn't a valid color. So that property is ignored. border: none is valid since the none is the border-style not the color.
Joseph Pecoraro
Comment 4 2009-08-07 21:37:19 PDT
Ahh, you're correct. So what am I missing here? Is there a property that is superseding the supposed color "black" in the Computed Styles?
Timothy Hatcher
Comment 5 2009-08-07 21:43:17 PDT
// Test the style to see if the UA border and background match. return (style->border() != border || *style->backgroundLayers() != background || style->backgroundColor() != backgroundColor); I looks like we check if the border is different from the UA border. If it is, the control uses the author's border.
Alexander Pavlov (apavlov)
Comment 6 2011-11-22 07:50:28 PST
As of r101000, I can see that "border: 2px inset none" is crossed out and has an exclamation mark next to it, meaning that its value is invalid. The computed styles for the "default" and "none" inputs are absolutely the same, and this is the expected behavior.
Note You need to log in before you can comment on or make changes to this bug.