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

Side by Side Diff: Source/core/frame/DOMWindow.cpp

Issue 42543007: StyleResolver should update RuleSets lazily. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoType(AtomicStri ng(pseudoElement.substring(colonStart))); 1335 CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoType(AtomicStri ng(pseudoElement.substring(colonStart)));
1336 if (pseudoType == CSSSelector::PseudoUnknown && !pseudoElement.isEmpty()) 1336 if (pseudoType == CSSSelector::PseudoUnknown && !pseudoElement.isEmpty())
1337 return 0; 1337 return 0;
1338 1338
1339 unsigned rulesToInclude = StyleResolver::AuthorCSSRules; 1339 unsigned rulesToInclude = StyleResolver::AuthorCSSRules;
1340 if (!authorOnly) 1340 if (!authorOnly)
1341 rulesToInclude |= StyleResolver::UAAndUserCSSRules; 1341 rulesToInclude |= StyleResolver::UAAndUserCSSRules;
1342 1342
1343 PseudoId pseudoId = CSSSelector::pseudoId(pseudoType); 1343 PseudoId pseudoId = CSSSelector::pseudoId(pseudoType);
1344 1344
1345 return m_frame->document()->styleResolver()->pseudoCSSRulesForElement(elemen t, pseudoId, rulesToInclude); 1345 StyleResolver* styleResolver = m_frame->document()->styleResolver();
1346 appendPendingStyleSheetsIfNeeded(styleResolver);
1347 return styleResolver->pseudoCSSRulesForElement(element, pseudoId, rulesToInc lude);
1346 } 1348 }
1347 1349
1348 PassRefPtr<DOMPoint> DOMWindow::webkitConvertPointFromNodeToPage(Node* node, con st DOMPoint* p) const 1350 PassRefPtr<DOMPoint> DOMWindow::webkitConvertPointFromNodeToPage(Node* node, con st DOMPoint* p) const
1349 { 1351 {
1350 if (!node || !p) 1352 if (!node || !p)
1351 return 0; 1353 return 0;
1352 1354
1353 if (!document()) 1355 if (!document())
1354 return 0; 1356 return 0;
1355 1357
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext::lifecycleN otifier()); 1870 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext::lifecycleN otifier());
1869 } 1871 }
1870 1872
1871 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() 1873 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier()
1872 { 1874 {
1873 return DOMWindowLifecycleNotifier::create(this); 1875 return DOMWindowLifecycleNotifier::create(this);
1874 } 1876 }
1875 1877
1876 1878
1877 } // namespace WebCore 1879 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698