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

Side by Side Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 15660004: Reporing invalid CSS selectors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 return false; 626 return false;
627 627
628 static const char webkitPrefix[] = "-webkit-"; 628 static const char webkitPrefix[] = "-webkit-";
629 if (stringLength > 8 && string.startsWithIgnoringCase(webkitPrefix)) 629 if (stringLength > 8 && string.startsWithIgnoringCase(webkitPrefix))
630 return false; 630 return false;
631 631
632 return string.is8Bit() ? hasVendorSpecificPrefix(string.characters8(), strin gLength) : hasVendorSpecificPrefix(string.characters16(), stringLength); 632 return string.is8Bit() ? hasVendorSpecificPrefix(string.characters8(), strin gLength) : hasVendorSpecificPrefix(string.characters16(), stringLength);
633 } 633 }
634 634
635 // static 635 // static
636 bool InspectorCSSAgent::cssErrorFilter(const CSSParserLocation& location, int pr opertyId, int errorType) 636 bool InspectorCSSAgent::cssErrorFilter(const CSSParserString& content, int prope rtyId, int errorType)
637 { 637 {
638 const CSSParserString & content = location.content;
639 const size_t contentLength = content.length(); 638 const size_t contentLength = content.length();
640 639
641 switch (errorType) { 640 switch (errorType) {
642 case CSSParser::PropertyDeclarationError: 641 case CSSParser::PropertyDeclarationError:
643 // Ignore errors like "*property: value". This trick is used for IE7: ht tp://stackoverflow.com/questions/4563651/what-does-an-asterisk-do-in-a-css-prope rty-name 642 // Ignore errors like "*property: value". This trick is used for IE7: ht tp://stackoverflow.com/questions/4563651/what-does-an-asterisk-do-in-a-css-prope rty-name
644 if (contentLength && content[0] == '*') 643 if (contentLength && content[0] == '*')
645 return false; 644 return false;
646 645
647 // The "filter" property is commonly used instead of "opacity" for IE9. 646 // The "filter" property is commonly used instead of "opacity" for IE9.
648 if (propertyId == CSSPropertyFilter) 647 if (propertyId == CSSPropertyFilter)
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 documentsToChange.add(element->ownerDocument()); 1567 documentsToChange.add(element->ownerDocument());
1569 } 1568 }
1570 1569
1571 m_nodeIdToForcedPseudoState.clear(); 1570 m_nodeIdToForcedPseudoState.clear();
1572 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it) 1571 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it)
1573 (*it)->styleResolverChanged(RecalcStyleImmediately); 1572 (*it)->styleResolverChanged(RecalcStyleImmediately);
1574 } 1573 }
1575 1574
1576 } // namespace WebCore 1575 } // namespace WebCore
1577 1576
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.h ('k') | Source/core/inspector/InspectorInstrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698