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

Side by Side Diff: Source/WebCore/css/SelectorChecker.cpp

Issue 8390051: Merge 98492 - REGRESSION (r94887): Scrolling the HTML spec is more jerky now than it was (regress... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/css/CSSStyleSelector.cpp ('k') | Source/WebCore/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 case CSSSelector::Child: 476 case CSSSelector::Child:
477 { 477 {
478 ContainerNode* n = e->parentNode(); 478 ContainerNode* n = e->parentNode();
479 if (!n || !n->isElementNode()) 479 if (!n || !n->isElementNode())
480 return SelectorFailsCompletely; 480 return SelectorFailsCompletely;
481 e = static_cast<Element*>(n); 481 e = static_cast<Element*>(n);
482 return checkSelector(sel, e, dynamicPseudo, false, visitedMatchType) ; 482 return checkSelector(sel, e, dynamicPseudo, false, visitedMatchType) ;
483 } 483 }
484 case CSSSelector::DirectAdjacent: 484 case CSSSelector::DirectAdjacent:
485 { 485 {
486 if (!m_isCollectingRulesOnly) { 486 if (!m_isCollectingRulesOnly && e->parentNode() && e->parentNode()-> isElementNode()) {
487 RenderStyle* currentStyle = elementStyle ? elementStyle : e->ren derStyle(); 487 RenderStyle* parentStyle = elementStyle ? elementParentStyle : e ->parentNode()->renderStyle();
488 if (currentStyle) 488 if (parentStyle)
489 currentStyle->setAffectedByDirectAdjacentRules(); 489 parentStyle->setChildrenAffectedByDirectAdjacentRules();
490 } 490 }
491 Node* n = e->previousSibling(); 491 Node* n = e->previousSibling();
492 while (n && !n->isElementNode()) 492 while (n && !n->isElementNode())
493 n = n->previousSibling(); 493 n = n->previousSibling();
494 if (!n) 494 if (!n)
495 return SelectorFailsLocally; 495 return SelectorFailsLocally;
496 e = static_cast<Element*>(n); 496 e = static_cast<Element*>(n);
497 return checkSelector(sel, e, dynamicPseudo, false, visitedMatchType) ; 497 return checkSelector(sel, e, dynamicPseudo, false, visitedMatchType) ;
498 } 498 }
499 case CSSSelector::IndirectAdjacent: 499 case CSSSelector::IndirectAdjacent:
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 } 1371 }
1372 return linkMatchType; 1372 return linkMatchType;
1373 } 1373 }
1374 1374
1375 bool SelectorChecker::isFrameFocused(const Element* element) 1375 bool SelectorChecker::isFrameFocused(const Element* element)
1376 { 1376 {
1377 return element->document()->frame() && element->document()->frame()->selecti on()->isFocusedAndActive(); 1377 return element->document()->frame() && element->document()->frame()->selecti on()->isFocusedAndActive();
1378 } 1378 }
1379 1379
1380 } 1380 }
OLDNEW
« no previous file with comments | « Source/WebCore/css/CSSStyleSelector.cpp ('k') | Source/WebCore/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698