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

Side by Side Diff: third_party/WebKit/WebCore/css/CSSStyleSelector.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months 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) 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 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008 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 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 CSSRuleData* elt2 = m_matchedRules[mid]; 747 CSSRuleData* elt2 = m_matchedRules[mid];
748 748
749 // Handle the fast common case (of equal specificity). The list may already 749 // Handle the fast common case (of equal specificity). The list may already
750 // be completely sorted. 750 // be completely sorted.
751 if (*elt <= *elt2) 751 if (*elt <= *elt2)
752 return; 752 return;
753 753
754 // We have to merge sort. Ensure our merge buffer is big enough to hold 754 // We have to merge sort. Ensure our merge buffer is big enough to hold
755 // all the items. 755 // all the items.
756 Vector<CSSRuleData*> rulesMergeBuffer; 756 Vector<CSSRuleData*> rulesMergeBuffer;
757 rulesMergeBuffer.reserveCapacity(end - start); 757 rulesMergeBuffer.reserveInitialCapacity(end - start);
758 758
759 unsigned i1 = start; 759 unsigned i1 = start;
760 unsigned i2 = mid; 760 unsigned i2 = mid;
761 761
762 elt = m_matchedRules[i1]; 762 elt = m_matchedRules[i1];
763 elt2 = m_matchedRules[i2]; 763 elt2 = m_matchedRules[i2];
764 764
765 while (i1 < mid || i2 < end) { 765 while (i1 < mid || i2 < end) {
766 if (i1 < mid && (i2 == end || *elt <= *elt2)) { 766 if (i1 < mid && (i2 == end || *elt <= *elt2)) {
767 rulesMergeBuffer.append(elt); 767 rulesMergeBuffer.append(elt);
(...skipping 5240 matching lines...) Expand 10 before | Expand all | Expand 10 after
6008 ASSERT_NOT_REACHED(); 6008 ASSERT_NOT_REACHED();
6009 break; 6009 break;
6010 } 6010 }
6011 } 6011 }
6012 } 6012 }
6013 outOperations = operations; 6013 outOperations = operations;
6014 return true; 6014 return true;
6015 } 6015 }
6016 6016
6017 } // namespace WebCore 6017 } // namespace WebCore
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/css/CSSStyleDeclaration.cpp ('k') | third_party/WebKit/WebCore/dom/CrossThreadCopier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698