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

Side by Side Diff: Source/core/css/CSSSelector.cpp

Issue 218403012: Check for null selectors when looping in findBestRuleSetAndAdd (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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-2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * 1999 Waldo Bastian (bastian@kde.org) 3 * 1999 Waldo Bastian (bastian@kde.org)
4 * 2001 Andreas Schlapbach (schlpbch@iam.unibe.ch) 4 * 2001 Andreas Schlapbach (schlpbch@iam.unibe.ch)
5 * 2001-2003 Dirk Mueller (mueller@kde.org) 5 * 2001-2003 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2008 David Smith (catfish.man@gmail.com) 7 * Copyright (C) 2008 David Smith (catfish.man@gmail.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (m_match == Tag) 390 if (m_match == Tag)
391 printf("%*stagQName().localName: %s\n", indent, "", tagQName().localName ().ascii().data()); 391 printf("%*stagQName().localName: %s\n", indent, "", tagQName().localName ().ascii().data());
392 printf("%*sisAttributeSelector(): %d\n", indent, "", isAttributeSelector()); 392 printf("%*sisAttributeSelector(): %d\n", indent, "", isAttributeSelector());
393 if (isAttributeSelector()) 393 if (isAttributeSelector())
394 printf("%*sattribute(): %s\n", indent, "", attribute().localName().ascii ().data()); 394 printf("%*sattribute(): %s\n", indent, "", attribute().localName().ascii ().data());
395 printf("%*sargument(): %s\n", indent, "", argument().ascii().data()); 395 printf("%*sargument(): %s\n", indent, "", argument().ascii().data());
396 printf("%*sspecificity(): %u\n", indent, "", specificity()); 396 printf("%*sspecificity(): %u\n", indent, "", specificity());
397 if (tagHistory()) { 397 if (tagHistory()) {
398 printf("\n%*s--> (relation == %d)\n", indent, "", relation()); 398 printf("\n%*s--> (relation == %d)\n", indent, "", relation());
399 tagHistory()->show(indent + 2); 399 tagHistory()->show(indent + 2);
400 } else {
401 printf("\n%*s--> (relation == %d)\n", indent, "", relation());
400 } 402 }
401 } 403 }
402 404
403 void CSSSelector::show() const 405 void CSSSelector::show() const
404 { 406 {
405 printf("\n******* CSSSelector::show(\"%s\") *******\n", selectorText().ascii ().data()); 407 printf("\n******* CSSSelector::show(\"%s\") *******\n", selectorText().ascii ().data());
406 show(2); 408 show(2);
407 printf("******* end *******\n"); 409 printf("******* end *******\n");
408 } 410 }
409 #endif 411 #endif
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 return false; 878 return false;
877 return (count - m_b) % m_a == 0; 879 return (count - m_b) % m_a == 0;
878 } else { 880 } else {
879 if (count > m_b) 881 if (count > m_b)
880 return false; 882 return false;
881 return (m_b - count) % (-m_a) == 0; 883 return (m_b - count) % (-m_a) == 0;
882 } 884 }
883 } 885 }
884 886
885 } // namespace WebCore 887 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698