New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 715768 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
style-dev-current


Sign in to add a comment

Should not have hard coded pseudo classes in ElementRuleCollector

Project Member Reported by esprehn@chromium.org, Apr 26 2017

Issue description

These were added in:
https://chromium.googlesource.com/chromium/src/+/573cef7f96c99540bea732d3425f6fbc8938174f

if (pseudoId == "-webkit-input-placeholder") {
  collectMatchingRulesForList(
      matchRequest.ruleSet->placeholderPseudoRules(), cascadeOrder,
      matchRequest);
}

this means for every element that returns a pseudoId we check the -webkit- prefix which is slow, and also means we've hard coded the details of a specific element and pseudo into the core style engine.

This should be handled through the standard ruleset system like:

matchRequest.ruleSet->shadowPseudoElementRules(pseudoId)

instead. The core style engine shouldn't have any knowledge of specific pseudo elements or input types.
 
Owner: tkent@chromium.org
Status: Assigned (was: Untriaged)
Labels: Update-Monthly
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3e1cffdf55fcba33860b537fd860ba934283ae39

commit 3e1cffdf55fcba33860b537fd860ba934283ae39
Author: Kent Tamura <tkent@chromium.org>
Date: Tue Aug 29 09:05:09 2017

Remove hardcoded "-webkit-input-placeholder" from blink::ElementRuleCollector.

- Remove RuleSet::placeholder_pseudo_rules_.
- Use shadow_pseudo_element_rules for "-webkit-input-placeholder" instead.

Bug:  715768 
Change-Id: If6d277762c8dab918cb4563a563a3f0936bbac6f
Reviewed-on: https://chromium-review.googlesource.com/640330
Reviewed-by: Rune Lillesveen <rune@opera.com>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#498056}
[modify] https://crrev.com/3e1cffdf55fcba33860b537fd860ba934283ae39/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp
[modify] https://crrev.com/3e1cffdf55fcba33860b537fd860ba934283ae39/third_party/WebKit/Source/core/css/RuleSet.cpp
[modify] https://crrev.com/3e1cffdf55fcba33860b537fd860ba934283ae39/third_party/WebKit/Source/core/css/RuleSet.h
[modify] https://crrev.com/3e1cffdf55fcba33860b537fd860ba934283ae39/third_party/WebKit/Source/core/css/RuleSetTest.cpp

Comment 5 by tkent@chromium.org, Aug 29 2017

Status: Fixed (was: Assigned)

Sign in to add a comment