Bug 49997 - a:visited ignores padding, margin and width declarations
Summary: a:visited ignores padding, margin and width declarations
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL: http://dl.dropbox.com/u/74874/avisite...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 16:39 PST by Aditya Mukherjee
Modified: 2010-11-24 10:38 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Mukherjee 2010-11-23 16:39:16 PST
As shown in the example, "a:visited" completely ignores padding, margin and width declarations. The colour changes, so we can see that the pseudo-class is working, but it's ignoring those 3 declarations. It might be ignoring more declarations, but I didn't have time to extensively try out everything.
Comment 1 Alexey Proskuryakov 2010-11-23 22:48:15 PST
This is by design, see <http://dbaron.org/mozilla/visited-privacy>.
Comment 2 Aditya Mukherjee 2010-11-24 03:08:12 PST
I see.

But I still can't see why 'padding' and 'margin' would be disabled. You could disable padding/margin querying using Javascript to protect a user's history if you want. The privacy issue is about detection, not about presentation. We should be crippling JS' ability to detect certain things, not CSS' ability to show them.
Comment 3 Alexey Proskuryakov 2010-11-24 10:38:50 PST
You can't disable querying layout changes from JavaScript, because they affect layout of other elements, so the difference can be detected indirectly by querying their positions.

Besides the link I gave, you can read an 8 year long history of discussions at <https://bugzilla.mozilla.org/show_bug.cgi?id=147777>.