Changeset 140331 in webkit
- Timestamp:
- Jan 21, 2013 6:57:19 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140329 r140331 1 2013-01-21 Alexander Pavlov <apavlov@chromium.org> 2 3 Web Inspector: [REGRESSION] Forced :visited pseudoclass has no effect on A elements 4 https://bugs.webkit.org/show_bug.cgi?id=107448 5 6 Reviewed by Antti Koivisto. 7 8 * css/StyleResolver.cpp: 9 (WebCore::StyleResolver::sortAndTransferMatchedRules): Remove totally bad code. 10 (WebCore::StyleResolver::styleForElement): 11 Use InsideVisitedLink if PseudoVisited has been forced by Inspector. 12 1 13 2013-01-18 Andrey Adaikin <aandrey@chromium.org> 2 14 -
trunk/Source/WebCore/css/StyleResolver.cpp
r140231 r140331 723 723 724 724 // Now transfer the set of matched rules over to our list of declarations. 725 // FIXME: This sucks, the inspector should get the style from the visited style itself.726 bool swapVisitedUnvisited = InspectorInstrumentation::forcePseudoState(m_element, CSSSelector::PseudoVisited);727 725 for (unsigned i = 0; i < m_matchedRules.size(); i++) { 728 726 if (m_style && m_matchedRules[i]->containsUncommonAttributeSelector()) 729 727 m_style->setUnique(); 730 unsigned linkMatchType = m_matchedRules[i]->linkMatchType(); 731 if (swapVisitedUnvisited && linkMatchType && linkMatchType != SelectorChecker::MatchAll) 732 linkMatchType = (linkMatchType == SelectorChecker::MatchVisited) ? SelectorChecker::MatchLink : SelectorChecker::MatchVisited; 733 addMatchedProperties(result, m_matchedRules[i]->rule()->properties(), m_matchedRules[i]->rule(), linkMatchType, m_matchedRules[i]->propertyWhitelistType()); 728 addMatchedProperties(result, m_matchedRules[i]->rule()->properties(), m_matchedRules[i]->rule(), m_matchedRules[i]->linkMatchType(), m_matchedRules[i]->propertyWhitelistType()); 734 729 } 735 730 } … … 1589 1584 if (element->isLink()) { 1590 1585 m_style->setIsLink(true); 1591 m_style->setInsideLink(m_elementLinkState); 1586 EInsideLink linkState = m_elementLinkState; 1587 if (m_elementLinkState != NotInsideLink) { 1588 bool forceVisited = InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoVisited); 1589 if (forceVisited) 1590 linkState = InsideVisitedLink; 1591 } 1592 1593 m_style->setInsideLink(linkState); 1592 1594 } 1593 1595
Note: See TracChangeset
for help on using the changeset viewer.