Changeset 181065 in webkit
- Timestamp:
- Mar 4, 2015 8:54:08 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r181062 r181065 1 2015-03-04 Alex Christensen <achristensen@webkit.org> 2 3 Optimize content extensions. 4 https://bugs.webkit.org/show_bug.cgi?id=142295 5 6 Reviewed by Benjamin Poulain. 7 8 * contentextensions/ContentExtensionCompiler.cpp: 9 (WebCore::ContentExtensions::serializeActions): 10 There is no need to add duplicate sequential actions. 11 * contentextensions/ContentExtensionRule.h: 12 (WebCore::ContentExtensions::Action::operator==): 13 Added to compare actions. 14 * contentextensions/ContentExtensionsBackend.cpp: 15 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): 16 Return early if a block action is found instead of moving to the next extension. 17 1 18 2015-03-04 Commit Queue <commit-queue@webkit.org> 2 19 -
trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp
r181000 r181065 53 53 for (unsigned ruleIndex = 0; ruleIndex < ruleList.size(); ++ruleIndex) { 54 54 const ContentExtensionRule& rule = ruleList[ruleIndex]; 55 56 // Identical sequential actions should not be rewritten. 57 if (ruleIndex && rule.action() == ruleList[ruleIndex - 1].action()) { 58 actionLocations.append(actionLocations[ruleIndex - 1]); 59 continue; 60 } 55 61 actionLocations.append(actions.size()); 56 62 -
trunk/Source/WebCore/contentextensions/ContentExtensionRule.h
r180978 r181065 62 62 ASSERT(type != ActionType::CSSDisplayNone); 63 63 } 64 bool operator==(const Action& other) const 65 { 66 return m_type == other.m_type 67 && m_cssSelector == other.m_cssSelector; 68 } 64 69 static Action deserialize(const Vector<SerializedActionByte>&, unsigned location); 65 70 -
trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
r181000 r181065 87 87 actions.append(action); 88 88 if (action.type() == ActionType::BlockLoad) 89 break;89 return actions; 90 90 } 91 91 }
Note: See TracChangeset
for help on using the changeset viewer.