Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Issue 228673002: DevTools: matched styles respect :visited/:link pseudo classes (Closed)

Created:
6 years, 8 months ago by lushnikov
Modified:
6 years, 7 months ago
Reviewers:
apavlov, vsevik
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, aandrey+blink_chromium.org
Visibility:
Public.

Description

DevTools: matched styles respect :visited/:link pseudo classes Method StyleResolver::pseudoCSSRulesForElement is used from both WebPlatform (via window.getMatchedCSSRules) and inspector in its styles sidebar pane. Due to security reasons, this method "lies" about css rules applied for visited and unvisited links so that it is impossible to sniff user history. This patch makes inspector to adjust method results so that it knows which rules are actually applied and which are not. BUG=356999 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171074

Patch Set 1 #

Total comments: 6

Patch Set 2 : add shadow dom testcase #

Patch Set 3 : do not skip non-matched rules for pseudo elements matches #

Total comments: 1

Patch Set 4 : rebaseline test #

Patch Set 5 : do not regress tree-boundary crossing rules #

Patch Set 6 : add test to verify :host rules #

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -16 lines) Patch
M LayoutTests/inspector-protocol/css/css-protocol-test.js View 1 2 3 2 chunks +12 lines, -7 lines 0 comments Download
A LayoutTests/inspector-protocol/css/css-shadow-host-rule.html View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
A LayoutTests/inspector-protocol/css/css-shadow-host-rule-expected.txt View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html View 1 2 3 4 5 1 chunk +121 lines, -0 lines 0 comments Download
A LayoutTests/inspector-protocol/css/css-visited-link-matched-styles-expected.txt View 1 2 3 1 chunk +34 lines, -0 lines 0 comments Download
M Source/core/inspector/InspectorCSSAgent.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/inspector/InspectorCSSAgent.cpp View 1 2 3 4 7 chunks +49 lines, -8 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
lushnikov
Please take a look
6 years, 8 months ago (2014-04-08 13:59:25 UTC) #1
apavlov
lgtm with comments https://codereview.chromium.org/228673002/diff/1/LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html File LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html (right): https://codereview.chromium.org/228673002/diff/1/LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html#newcode6 LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html:6: function test() we might want to ...
6 years, 8 months ago (2014-04-08 14:19:46 UTC) #2
lushnikov
https://codereview.chromium.org/228673002/diff/1/LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html File LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html (right): https://codereview.chromium.org/228673002/diff/1/LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html#newcode6 LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html:6: function test() On 2014/04/08 14:19:46, apavlov wrote: > we ...
6 years, 8 months ago (2014-04-08 15:28:32 UTC) #3
lushnikov
The CQ bit was checked by lushnikov@chromium.org
6 years, 8 months ago (2014-04-08 15:28:59 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lushnikov@chromium.org/228673002/20001
6 years, 8 months ago (2014-04-08 15:29:01 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-08 16:00:35 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 8 months ago (2014-04-08 16:00:36 UTC) #7
apavlov
lgtm https://codereview.chromium.org/228673002/diff/40001/Source/core/inspector/InspectorCSSAgent.cpp File Source/core/inspector/InspectorCSSAgent.cpp (right): https://codereview.chromium.org/228673002/diff/40001/Source/core/inspector/InspectorCSSAgent.cpp#newcode1321 Source/core/inspector/InspectorCSSAgent.cpp:1321: PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch> > InspectorCSSAgent::buildArrayForMatchedRuleList(CSSRuleList* ruleList, Element* element, bool skipRulesWithoutMatchedSelectors) ...
6 years, 8 months ago (2014-04-08 16:59:51 UTC) #8
lushnikov
The CQ bit was checked by lushnikov@chromium.org
6 years, 8 months ago (2014-04-08 17:33:06 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lushnikov@chromium.org/228673002/60001
6 years, 8 months ago (2014-04-08 17:33:12 UTC) #10
commit-bot: I haz the power
Change committed as 171074
6 years, 8 months ago (2014-04-08 18:35:52 UTC) #11
pfeldman
A revert of this CL has been created in https://codereview.chromium.org/251733003/ by pfeldman@chromium.org. The reason for ...
6 years, 8 months ago (2014-04-25 05:42:16 UTC) #12
lushnikov
@apavlov, please take another look. Fixed the initial patch and added testcase to avoid future ...
6 years, 7 months ago (2014-05-26 13:54:30 UTC) #13
lushnikov
6 years, 7 months ago (2014-05-26 13:59:32 UTC) #14
Message was sent while issue was closed.
follow-up in a separate issue: https://codereview.chromium.org/300693004/

Powered by Google App Engine
This is Rietveld 408576698