haikuwebkit/Source/WebCore/contentextensions/DFANode.cpp

149 lines
5.3 KiB
C++
Raw Permalink Normal View History

[Content Extensions] Make the DFA transitions ranges instead of characters https://bugs.webkit.org/show_bug.cgi?id=146575 Patch by Benjamin Poulain <benjamin@webkit.org> on 2015-07-06 Reviewed by Alex Christensen. Source/WebCore: This patch changes the DFA and code using the DFA to use ranges to represent the transitions between any two nodes. This patch builds on top of the tools introduced in r186079. The DFA structure is basically the same as ImmutableNFA but without any epsilon transitions. This patch introduces a transition iterator to make the DFA compatible with the existing algorithms. --- The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions of two nodes is one by merging the range list of each not into a common MutableRangeList. The data converter takes care of creating the signature of the combination. The code got simpler since MutableRangeList does most of the work now. It is also much faster. --- The minimizer is more intersting. With the current algorithm, we cannot resolve overlaps between ranges. On the other hand, the minimizer does not care about the symbol of the transitions if we are careful to partition transitions of the same symbol together. What I did was to turn the minimizer into a pure transition based one, BUT each "symbol" is actually an unbreakable range. The first step is to go over all the transitions of all the nodes and find the largest ranges such that the alphabet of interest is covered but there is not a single intersection between any two nodes (what I called "singular transitions" in the code). This can be done efficiently with MutableRangeList. A little trick there is that I also used the converter to count how many real transition overlaps any singular transition. Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet is simply the position of the singular transition in the list. The partition of transition is created by populating each set with all the transition that overlaps the symbols. Note that since the partition is created on the fly, the Transition structure used for repartitioning only contains the source of the transitions. Once our transition parition has been carefuly created, we can completely forget about the symbols and only work with subsets. Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer will find the minimial solution for well formed input. * WebCore.xcodeproj/project.pbxproj: * contentextensions/DFA.cpp: (WebCore::ContentExtensions::DFA::memoryUsed): (WebCore::ContentExtensions::printTransitions): (WebCore::ContentExtensions::DFANode::actions): Deleted. (WebCore::ContentExtensions::DFANode::transitions): Deleted. (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted. (WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::containsTransition): Deleted. (WebCore::ContentExtensions::DFANode::kill): Deleted. (WebCore::ContentExtensions::DFA::debugPrintDot): Deleted. * contentextensions/DFA.h: (WebCore::ContentExtensions::DFANode::ConstRangeIterator::range): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::target): (WebCore::ContentExtensions::DFANode::RangeIterator::range): (WebCore::ContentExtensions::DFANode::RangeIterator::target): (WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget): * contentextensions/DFABytecodeCompiler.cpp: (WebCore::ContentExtensions::DFABytecodeCompiler::ranges): (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize): (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions): * contentextensions/DFACombiner.cpp: (WebCore::ContentExtensions::DFAMerger::TargetConverter::convert): (WebCore::ContentExtensions::DFAMerger::TargetConverter::extend): (WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature): (WebCore::ContentExtensions::DFAMerger::merge): (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode): (WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted. (WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted. * contentextensions/DFAMinimizer.cpp: (WebCore::ContentExtensions::DFAMinimizer::minimize): * contentextensions/DFANode.cpp: Added. (WebCore::ContentExtensions::DFANode::actions): (WebCore::ContentExtensions::DFANode::containsTransition): (WebCore::ContentExtensions::DFANode::kill): (WebCore::ContentExtensions::DFANode::canUseFallbackTransition): (WebCore::ContentExtensions::DFANode::bestFallbackTarget): * contentextensions/DFANode.h: (WebCore::ContentExtensions::CharRange::size): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::first): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::last): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::data): (WebCore::ContentExtensions::DFANode::IterableConstRange::begin): (WebCore::ContentExtensions::DFANode::IterableConstRange::end): (WebCore::ContentExtensions::DFANode::transitions): (WebCore::ContentExtensions::DFANode::RangeIterator::operator*): (WebCore::ContentExtensions::DFANode::RangeIterator::operator==): (WebCore::ContentExtensions::DFANode::RangeIterator::operator!=): (WebCore::ContentExtensions::DFANode::RangeIterator::operator++): (WebCore::ContentExtensions::DFANode::RangeIterator::first): (WebCore::ContentExtensions::DFANode::RangeIterator::last): (WebCore::ContentExtensions::DFANode::RangeIterator::data): (WebCore::ContentExtensions::DFANode::IterableRange::begin): (WebCore::ContentExtensions::DFANode::IterableRange::end): (WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::transitionsLength): Deleted. (WebCore::ContentExtensions::DFANode::transitionsStart): Deleted. (WebCore::ContentExtensions::DFANode::resetTransitions): Deleted. (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted. * contentextensions/ImmutableNFA.h: (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted. * contentextensions/ImmutableNFANodeBuilder.h: (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first): (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last): (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted. (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted. * contentextensions/MutableRange.h: (WebCore::ContentExtensions::MutableRange::size): Deleted. * contentextensions/MutableRangeList.h: (WebCore::ContentExtensions::MutableRangeList::ConstIterator::first): (WebCore::ContentExtensions::MutableRangeList::ConstIterator::last): (WebCore::ContentExtensions::MutableRangeList::ConstIterator::data): (WebCore::ContentExtensions::MutableRangeList::extend): (WebCore::ContentExtensions::MutableRangeList::size): (WebCore::ContentExtensions::MutableRangeList::initializeFrom): * contentextensions/NFAToDFA.cpp: (WebCore::ContentExtensions::NFAToDFA::convert): (WebCore::ContentExtensions::canUseFallbackTransition): Deleted. (WebCore::ContentExtensions::findBestFallbackTarget): Deleted. Tools: * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: * TestWebKitAPI/Tests/WebCore/DFAMinimizer.cpp: Since the minimizer is perfect, we get the minimal solution now, which is really cool! Canonical link: https://commits.webkit.org/164740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-07-06 21:06:30 +00:00
/*
* Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "DFANode.h"
#include "DFA.h"
Non-unified build fixes, late-ish May 2021 edition https://bugs.webkit.org/show_bug.cgi?id=225990 Unreviewed non-unified build fixes. Source/JavaScriptCore: * jit/CCallHelpers.cpp: Add missing LinkBuffer.h header. Source/WebCore: No new tests needed. * Modules/indexeddb/server/MemoryObjectStore.cpp: Add missing pal/SessioID.h header. * Modules/webaudio/OfflineAudioContext.cpp: Add missing OfflineAudioCompletionEvent.h header. * Modules/webaudio/OfflineAudioContext.h: Add missing wtf/UniqueRef.h header. * Modules/websockets/WebSocketDeflateFramer.h: Add missing WebSocketExtensionProcessor.h header, remove wtf/text/WTFString.h as it is already included by the former. * bindings/js/JSDOMConvertEnumeration.h: Add missing JSDOMGlobalObject.h header. * contentextensions/DFANode.cpp: Add missing wtf/HashMap.h header. * html/HTMLFrameElement.cpp: Add missing HTMLParserIdioms.h header. * html/HTMLHRElement.cpp: Ditto. * html/HTMLIFrameElement.cpp: Ditto. * html/HTMLLIElement.cpp: Ditto. * html/HTMLMetaElement.cpp: Add missing HTMLParserIdioms.h, Frame.h, and FrameView.h headers. * html/HTMLOutputElement.cpp: (WebCore::HTMLOutputElement::parseAttribute): Add missing HTMLNames:: namespace prefix in usage of HTMLNames::forAttr. (WebCore::HTMLOutputElement::htmlFor): Ditto. * html/OffscreenCanvas.cpp: Add missing RuntimeEnabledFeatures.h header. * layout/formattingContexts/FormattingGeometry.cpp: Add missing FormattingQuirks.h header. * layout/formattingContexts/FormattingQuirks.cpp: Add missing FormattingGeometry.h header. * layout/formattingContexts/block/BlockFormattingGeometry.cpp: Add missing BlockFormattingContext.h, BlockFormattingQuirks.h, and BlockMarginCollapse.h headers; remove unneeded BlockFormattingState.h and FormattingContext.h headers. * layout/formattingContexts/block/BlockFormattingGeometry.h: Add missing forward declaration for BlockFormattingContext. * layout/formattingContexts/block/BlockFormattingQuirks.cpp: Add missing BlockFormattingContext.h and BlockMarginCollapse.h headers, remove unneeded BlockFormattingState.h header. * layout/formattingContexts/block/PrecomputedBlockMarginCollapse.cpp: Add missing BlockFormattingContext.h and BlockFormattingQuirks.h headers, remove unneeded BlockFormattingState.h header. * layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp: Add missing BlockMarginCollapse.h header. * layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingQuirks.cpp: Add missing TableWrapperBlockFormattingContext.h header. * layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingQuirks.h: Add missing forward declaration for TableWrapperBlockFormattingContext. * layout/formattingContexts/flex/FlexFormattingGeometry.cpp: Add missing FlexFormattingContext.h header, remove unneeded FlexFormattingState.h and FormattingContext.h headers. * layout/formattingContexts/flex/FlexFormattingGeometry.h: Add missing forward declaration for FlexFormattingContext. * layout/formattingContexts/inline/InlineFormattingGeometry.cpp: Add missing InlineFormattingContext.h header, remove unneeded InlineLineBox.h header. * layout/formattingContexts/inline/InlineFormattingGeometry.h: Add missing InlineLineBox.h and InlineLineBuilder.h headers, add missing forward declaration for InlineFormattingContext. * layout/formattingContexts/inline/InlineFormattingQuirks.cpp: Add missing InlineFormattingContext.h header. * layout/formattingContexts/inline/InlineFormattingQuirks.h: Add missing InlineLineBox.h header, add missing forward declaration for InlineFormattingContext. * layout/formattingContexts/inline/InlineLineBuilder.cpp: Add missing InlineFormattingQuirks.h header. * layout/formattingContexts/table/TableFormattingGeometry.cpp: Add missing TableFormattingContext.h header, remove unneeded TableFormattingState.h header. * layout/formattingContexts/table/TableFormattingGeometry.h: Add missing TableGrid.h header, add missing forward declaration for TableFormattingContext. * layout/formattingContexts/table/TableFormattingQuirks.cpp: Add missing TableFormattingContext.h header. * layout/formattingContexts/table/TableFormattingQuirks.h: Add missing forward declaration for TableFormattingContext. * layout/formattingContexts/table/TableLayout.cpp: Add missing TableFormattingGeometry.h header. * page/FrameViewLayoutContext.cpp: Add missing StyleScope.h header. * page/ImageOverlayController.h: Add missing LayoutRect.h header. * page/PageConfiguration.h: Add missing wtf/HashSet.h header. * platform/network/soup/SoupNetworkSession.cpp: Add missing wtf/text/StringHash.h header. * style/StyleScopeRuleSets.cpp: Add missing StyleScope.h header. * style/Styleable.cpp: Ditto. * svg/SVGDocumentExtensions.cpp: Add missing SVGUseElement.h header. * svg/SVGDocumentExtensions.h: Add missing wtf/WeakHashSet.h header, add missing forward declaration for SVGUseElement. * workers/WorkerGlobalScope.cpp: Add missing FontCustomPlatformData.h header. Source/WebKit: * NetworkProcess/PreconnectTask.h: Add missing forward declaration for NetworkSession. * NetworkProcess/WebStorage/LocalStorageDatabase.h: Add missing wtf/HashMap.h header, remove unneeded wtf/RefCounted.h header. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::decode): Add missing WebCore:: namespace prefix to usage of WebCore::MediaProducer::MutedStateFlags. Canonical link: https://commits.webkit.org/238000@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-21 13:52:45 +00:00
#include <wtf/HashMap.h>
[Content Extensions] Make the DFA transitions ranges instead of characters https://bugs.webkit.org/show_bug.cgi?id=146575 Patch by Benjamin Poulain <benjamin@webkit.org> on 2015-07-06 Reviewed by Alex Christensen. Source/WebCore: This patch changes the DFA and code using the DFA to use ranges to represent the transitions between any two nodes. This patch builds on top of the tools introduced in r186079. The DFA structure is basically the same as ImmutableNFA but without any epsilon transitions. This patch introduces a transition iterator to make the DFA compatible with the existing algorithms. --- The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions of two nodes is one by merging the range list of each not into a common MutableRangeList. The data converter takes care of creating the signature of the combination. The code got simpler since MutableRangeList does most of the work now. It is also much faster. --- The minimizer is more intersting. With the current algorithm, we cannot resolve overlaps between ranges. On the other hand, the minimizer does not care about the symbol of the transitions if we are careful to partition transitions of the same symbol together. What I did was to turn the minimizer into a pure transition based one, BUT each "symbol" is actually an unbreakable range. The first step is to go over all the transitions of all the nodes and find the largest ranges such that the alphabet of interest is covered but there is not a single intersection between any two nodes (what I called "singular transitions" in the code). This can be done efficiently with MutableRangeList. A little trick there is that I also used the converter to count how many real transition overlaps any singular transition. Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet is simply the position of the singular transition in the list. The partition of transition is created by populating each set with all the transition that overlaps the symbols. Note that since the partition is created on the fly, the Transition structure used for repartitioning only contains the source of the transitions. Once our transition parition has been carefuly created, we can completely forget about the symbols and only work with subsets. Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer will find the minimial solution for well formed input. * WebCore.xcodeproj/project.pbxproj: * contentextensions/DFA.cpp: (WebCore::ContentExtensions::DFA::memoryUsed): (WebCore::ContentExtensions::printTransitions): (WebCore::ContentExtensions::DFANode::actions): Deleted. (WebCore::ContentExtensions::DFANode::transitions): Deleted. (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted. (WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::containsTransition): Deleted. (WebCore::ContentExtensions::DFANode::kill): Deleted. (WebCore::ContentExtensions::DFA::debugPrintDot): Deleted. * contentextensions/DFA.h: (WebCore::ContentExtensions::DFANode::ConstRangeIterator::range): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::target): (WebCore::ContentExtensions::DFANode::RangeIterator::range): (WebCore::ContentExtensions::DFANode::RangeIterator::target): (WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget): * contentextensions/DFABytecodeCompiler.cpp: (WebCore::ContentExtensions::DFABytecodeCompiler::ranges): (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize): (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions): * contentextensions/DFACombiner.cpp: (WebCore::ContentExtensions::DFAMerger::TargetConverter::convert): (WebCore::ContentExtensions::DFAMerger::TargetConverter::extend): (WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature): (WebCore::ContentExtensions::DFAMerger::merge): (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode): (WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted. (WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted. * contentextensions/DFAMinimizer.cpp: (WebCore::ContentExtensions::DFAMinimizer::minimize): * contentextensions/DFANode.cpp: Added. (WebCore::ContentExtensions::DFANode::actions): (WebCore::ContentExtensions::DFANode::containsTransition): (WebCore::ContentExtensions::DFANode::kill): (WebCore::ContentExtensions::DFANode::canUseFallbackTransition): (WebCore::ContentExtensions::DFANode::bestFallbackTarget): * contentextensions/DFANode.h: (WebCore::ContentExtensions::CharRange::size): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::first): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::last): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::data): (WebCore::ContentExtensions::DFANode::IterableConstRange::begin): (WebCore::ContentExtensions::DFANode::IterableConstRange::end): (WebCore::ContentExtensions::DFANode::transitions): (WebCore::ContentExtensions::DFANode::RangeIterator::operator*): (WebCore::ContentExtensions::DFANode::RangeIterator::operator==): (WebCore::ContentExtensions::DFANode::RangeIterator::operator!=): (WebCore::ContentExtensions::DFANode::RangeIterator::operator++): (WebCore::ContentExtensions::DFANode::RangeIterator::first): (WebCore::ContentExtensions::DFANode::RangeIterator::last): (WebCore::ContentExtensions::DFANode::RangeIterator::data): (WebCore::ContentExtensions::DFANode::IterableRange::begin): (WebCore::ContentExtensions::DFANode::IterableRange::end): (WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::transitionsLength): Deleted. (WebCore::ContentExtensions::DFANode::transitionsStart): Deleted. (WebCore::ContentExtensions::DFANode::resetTransitions): Deleted. (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted. * contentextensions/ImmutableNFA.h: (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted. * contentextensions/ImmutableNFANodeBuilder.h: (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first): (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last): (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted. (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted. * contentextensions/MutableRange.h: (WebCore::ContentExtensions::MutableRange::size): Deleted. * contentextensions/MutableRangeList.h: (WebCore::ContentExtensions::MutableRangeList::ConstIterator::first): (WebCore::ContentExtensions::MutableRangeList::ConstIterator::last): (WebCore::ContentExtensions::MutableRangeList::ConstIterator::data): (WebCore::ContentExtensions::MutableRangeList::extend): (WebCore::ContentExtensions::MutableRangeList::size): (WebCore::ContentExtensions::MutableRangeList::initializeFrom): * contentextensions/NFAToDFA.cpp: (WebCore::ContentExtensions::NFAToDFA::convert): (WebCore::ContentExtensions::canUseFallbackTransition): Deleted. (WebCore::ContentExtensions::findBestFallbackTarget): Deleted. Tools: * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: * TestWebKitAPI/Tests/WebCore/DFAMinimizer.cpp: Since the minimizer is perfect, we get the minimal solution now, which is really cool! Canonical link: https://commits.webkit.org/164740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-07-06 21:06:30 +00:00
#if ENABLE(CONTENT_EXTENSIONS)
namespace WebCore {
namespace ContentExtensions {
Vector<uint64_t> DFANode::actions(const DFA& dfa) const
{
// FIXME: Use iterators instead of copying the Vector elements.
Vector<uint64_t> vector;
vector.reserveInitialCapacity(m_actionsLength);
for (uint32_t i = m_actionsStart; i < m_actionsStart + m_actionsLength; ++i)
vector.uncheckedAppend(dfa.actions[i]);
return vector;
}
bool DFANode::containsTransition(char transition, const DFA& dfa) const
{
// Called from DFAMinimizer, this loops though a maximum of 128 transitions, so it's not too slow.
ASSERT(m_transitionsLength <= 128);
for (unsigned i = m_transitionsStart; i < m_transitionsStart + m_transitionsLength; ++i) {
if (dfa.transitionRanges[i].first <= transition
&& dfa.transitionRanges[i].last >= transition)
return true;
}
return false;
}
void DFANode::kill(DFA& dfa)
{
ASSERT(m_flags != IsKilled);
m_flags = IsKilled; // Killed nodes don't have any other flags.
// Invalidate the now-unused memory in the DFA to make finding bugs easier.
for (unsigned i = m_transitionsStart; i < m_transitionsStart + m_transitionsLength; ++i) {
dfa.transitionRanges[i] = { -1, -1 };
dfa.transitionDestinations[i] = std::numeric_limits<uint32_t>::max();
}
for (unsigned i = m_actionsStart; i < m_actionsStart + m_actionsLength; ++i)
dfa.actions[i] = std::numeric_limits<uint64_t>::max();
m_actionsStart = 0;
m_actionsLength = 0;
m_transitionsStart = 0;
m_transitionsLength = 0;
};
bool DFANode::canUseFallbackTransition(const DFA& dfa) const
{
// Transitions can contain '\0' if the expression has a end-of-line marker.
// Fallback transitions cover 1-127. We have to be careful with the first.
IterableConstRange iterableTransitions = transitions(dfa);
auto iterator = iterableTransitions.begin();
auto end = iterableTransitions.end();
if (iterator == end)
return false;
char lastSeenCharacter = 0;
if (!iterator.first()) {
lastSeenCharacter = iterator.last();
if (lastSeenCharacter == 127)
return true;
++iterator;
}
for (;iterator != end; ++iterator) {
ASSERT(iterator.first() > lastSeenCharacter);
if (iterator.first() != lastSeenCharacter + 1)
return false;
if (iterator.range().last == 127)
return true;
lastSeenCharacter = iterator.last();
}
return false;
}
uint32_t DFANode::bestFallbackTarget(const DFA& dfa) const
{
ASSERT(canUseFallbackTransition(dfa));
[WTF] Remove the unnecessary inner class DefaultHash<T>::Hash https://bugs.webkit.org/show_bug.cgi?id=214389 Reviewed by Darin Adler. Source/JavaScriptCore: * assembler/MacroAssemblerCodeRef.h: * b3/B3CheckSpecial.h: * b3/B3Kind.h: * b3/B3ValueKey.h: * b3/air/AirAllocateRegistersByGraphColoring.cpp: * b3/air/AirArg.h: * b3/air/AirTmp.h: * bytecode/BytecodeIndex.h: * bytecode/CallVariant.h: * bytecode/CodeOrigin.h: * bytecode/DFGExitProfile.h: * bytecode/LazyOperandValueProfile.h: * bytecode/ObjectPropertyCondition.h: * bytecode/PropertyCondition.h: * dfg/DFGAbstractHeap.h: * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: * dfg/DFGCSEPhase.cpp: * dfg/DFGCompilationKey.h: * dfg/DFGDesiredGlobalProperty.h: * dfg/DFGHeapLocation.h: * dfg/DFGLivenessAnalysisPhase.cpp: * dfg/DFGMinifiedID.h: * dfg/DFGNodeFlowProjection.h: * dfg/DFGPromotedHeapLocation.h: * dfg/DFGPropertyTypeKey.h: * dfg/DFGPureValue.h: * ftl/FTLLocation.h: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread): (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): * ftl/FTLSlowPathCallKey.h: * heap/MarkedBlock.h: * heap/VisitRaceKey.h: * inspector/scripts/codegen/generate_cpp_protocol_types_header.py: * inspector/scripts/tests/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/expected/enum-values.json-result: * inspector/scripts/tests/expected/type-declaration-array-type.json-result: * inspector/scripts/tests/expected/type-declaration-enum-type.json-result: * inspector/scripts/tests/expected/type-declaration-object-type.json-result: * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result: * jit/ICStats.h: * jit/JITThunks.h: * jit/Reg.h: * jit/RegisterSet.h: * parser/VariableEnvironment.h: * profiler/ProfilerOrigin.h: * profiler/ProfilerOriginStack.h: * profiler/ProfilerUID.h: * runtime/CachedTypes.cpp: * runtime/ControlFlowProfiler.h: * runtime/NativeFunction.h: * runtime/PrototypeKey.h: * runtime/RegExpKey.h: * runtime/TemplateObjectDescriptor.h: * runtime/TypeProfiler.h: * runtime/VarOffset.h: * runtime/WeakGCMap.h: * wasm/WasmBBQPlan.h: * wasm/WasmCodeBlock.h: * wasm/WasmEntryPlan.h: * wasm/WasmLLIntPlan.h: * wasm/WasmSignature.h: Source/WebCore: * Modules/indexeddb/IDBDatabaseIdentifier.h: * Modules/indexeddb/shared/IDBResourceIdentifier.h: * Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h: * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp: (WebCore::WHLSL::matchResources): (WebCore::WHLSL::matchVertexAttributes): (WebCore::WHLSL::matchColorAttachments): * accessibility/AccessibilityObject.cpp: * accessibility/AccessibilityObject.h: * contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::serializeActions): * contentextensions/ContentExtensionRule.h: (WebCore::ContentExtensions::TriggerHash::hash): * contentextensions/ContentExtensionStyleSheet.h: * contentextensions/DFA.cpp: (WebCore::ContentExtensions::printTransitions): * contentextensions/DFABytecodeInterpreter.h: * contentextensions/DFACombiner.cpp: (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode): * contentextensions/DFANode.cpp: (WebCore::ContentExtensions::DFANode::bestFallbackTarget const): * contentextensions/ImmutableNFANodeBuilder.h: * contentextensions/NFA.cpp: (WebCore::ContentExtensions::NFA::debugPrintDot const): * contentextensions/NFANode.h: * contentextensions/NFAToDFA.cpp: (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource): (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate): * css/makeprop.pl: * css/parser/CSSParserContext.h: * dom/GCReachableRef.h: * dom/MessagePortIdentifier.h: * dom/NodeRareData.h: (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash): (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal): * dom/QualifiedName.h: * history/BackForwardItemIdentifier.h: * html/canvas/WebGLRenderingContextBase.h: * layout/LayoutUnits.h: * loader/AdClickAttribution.h: * loader/ResourceCryptographicDigest.h: (WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::hash): (WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::equal): (WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::Hash::hash): Deleted. (WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::Hash::equal): Deleted. * page/ClientOrigin.h: * page/GlobalWindowIdentifier.h: * page/SecurityOriginData.h: * page/SecurityOriginHash.h: * platform/Cookie.h: * platform/RegistrableDomain.h: * platform/graphics/ColorHash.h: * platform/graphics/FloatSizeHash.h: (WTF::FloatHash<WebCore::FloatSize>::hash): * platform/graphics/FontGenericFamilies.h: * platform/graphics/IntPointHash.h: * platform/graphics/IntRectHash.h: (WTF::IntHash<WebCore::IntRect>::hash): (WTF::IntHash<WebCore::IntRect>::equal): * platform/graphics/IntSizeHash.h: * platform/graphics/WidthCache.h: * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FallbackFontDescriptionKey::computeHash const): * platform/network/HTTPParsers.h: * platform/network/ProtectionSpaceHash.h: * platform/win/COMPtr.h: * platform/win/WindowsKeyNames.h: * rendering/CSSValueKey.h: * rendering/GridBaselineAlignment.h: * rendering/GridTrackSizingAlgorithm.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid const): * rendering/RenderTheme.h: * style/RuleSet.cpp: (WebCore::Style::RuleSet::evaluateDynamicMediaQueryRules): * svg/SVGElement.h: (WebCore::SVGAttributeHashTranslator::hash): * workers/service/ServiceWorkerClientIdentifier.h: * workers/service/ServiceWorkerRegistrationKey.h: Source/WebCore/PAL: * pal/SessionID.h: Source/WebKit: * NetworkProcess/Downloads/DownloadID.h: * NetworkProcess/cache/NetworkCache.h: * NetworkProcess/cache/NetworkCacheKey.h: * Platform/IPC/MessageReceiverMap.h: * Platform/IPC/StringReference.h: * Shared/CallbackID.h: * UIProcess/API/cpp/WKRetainPtr.h: Source/WebKitLegacy/win: * COMPropertyBag.h: Source/WTF: DefaultHash<T> doesn't need to have a inner struct Hash. This can be a problem for forward declarations (Bug 214320 Comment 5). * wtf/BitVector.h: * wtf/Forward.h: * wtf/HashFunctions.h: (WTF::PairHash::hash): (WTF::PairHash::equal): (WTF::TupleHash::hash): (WTF::TupleHash::equal): * wtf/ListHashSet.h: * wtf/LoggingHashMap.h: * wtf/LoggingHashSet.h: * wtf/MetaAllocatorPtr.h: * wtf/ObjectIdentifier.h: * wtf/OptionSetHash.h: (WTF::DefaultHash<OptionSet<T>>::hash): (WTF::DefaultHash<OptionSet<T>>::equal): (WTF::DefaultHash<OptionSet<T>>::Hash::hash): Deleted. (WTF::DefaultHash<OptionSet<T>>::Hash::equal): Deleted. * wtf/Packed.h: * wtf/RetainPtr.h: * wtf/StackShot.h: * wtf/URLHash.h: * wtf/VectorHash.h: (WTF::VectorHash::hash): * wtf/text/AtomString.h: * wtf/text/AtomStringHash.h: * wtf/text/CString.h: * wtf/text/StringHash.h: * wtf/text/StringImpl.h: * wtf/text/SymbolRegistry.h: (WTF::DefaultHash<SymbolRegistryKey>::hash): (WTF::DefaultHash<SymbolRegistryKey>::equal): (WTF::DefaultHash<SymbolRegistryKey>::Hash::hash): Deleted. (WTF::DefaultHash<SymbolRegistryKey>::Hash::equal): Deleted. * wtf/text/WTFString.h: Tools: * TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h: (WTF::DefaultHash<DeletedAddressOfOperator>::hash): (WTF::DefaultHash<DeletedAddressOfOperator>::equal): (WTF::DefaultHash<DeletedAddressOfOperator>::Hash::hash): Deleted. (WTF::DefaultHash<DeletedAddressOfOperator>::Hash::equal): Deleted. * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::bucketForKey): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::bucketForKey): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::testInitialCapacity): * TestWebKitAPI/Tests/WTF/MoveOnly.h: (WTF::DefaultHash<MoveOnly>::hash): (WTF::DefaultHash<MoveOnly>::equal): (WTF::DefaultHash<MoveOnly>::Hash::hash): Deleted. (WTF::DefaultHash<MoveOnly>::Hash::equal): Deleted. Canonical link: https://commits.webkit.org/227236@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-17 00:33:37 +00:00
HashMap<uint32_t, unsigned, DefaultHash<uint32_t>, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> histogram;
[Content Extensions] Make the DFA transitions ranges instead of characters https://bugs.webkit.org/show_bug.cgi?id=146575 Patch by Benjamin Poulain <benjamin@webkit.org> on 2015-07-06 Reviewed by Alex Christensen. Source/WebCore: This patch changes the DFA and code using the DFA to use ranges to represent the transitions between any two nodes. This patch builds on top of the tools introduced in r186079. The DFA structure is basically the same as ImmutableNFA but without any epsilon transitions. This patch introduces a transition iterator to make the DFA compatible with the existing algorithms. --- The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions of two nodes is one by merging the range list of each not into a common MutableRangeList. The data converter takes care of creating the signature of the combination. The code got simpler since MutableRangeList does most of the work now. It is also much faster. --- The minimizer is more intersting. With the current algorithm, we cannot resolve overlaps between ranges. On the other hand, the minimizer does not care about the symbol of the transitions if we are careful to partition transitions of the same symbol together. What I did was to turn the minimizer into a pure transition based one, BUT each "symbol" is actually an unbreakable range. The first step is to go over all the transitions of all the nodes and find the largest ranges such that the alphabet of interest is covered but there is not a single intersection between any two nodes (what I called "singular transitions" in the code). This can be done efficiently with MutableRangeList. A little trick there is that I also used the converter to count how many real transition overlaps any singular transition. Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet is simply the position of the singular transition in the list. The partition of transition is created by populating each set with all the transition that overlaps the symbols. Note that since the partition is created on the fly, the Transition structure used for repartitioning only contains the source of the transitions. Once our transition parition has been carefuly created, we can completely forget about the symbols and only work with subsets. Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer will find the minimial solution for well formed input. * WebCore.xcodeproj/project.pbxproj: * contentextensions/DFA.cpp: (WebCore::ContentExtensions::DFA::memoryUsed): (WebCore::ContentExtensions::printTransitions): (WebCore::ContentExtensions::DFANode::actions): Deleted. (WebCore::ContentExtensions::DFANode::transitions): Deleted. (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted. (WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::containsTransition): Deleted. (WebCore::ContentExtensions::DFANode::kill): Deleted. (WebCore::ContentExtensions::DFA::debugPrintDot): Deleted. * contentextensions/DFA.h: (WebCore::ContentExtensions::DFANode::ConstRangeIterator::range): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::target): (WebCore::ContentExtensions::DFANode::RangeIterator::range): (WebCore::ContentExtensions::DFANode::RangeIterator::target): (WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget): * contentextensions/DFABytecodeCompiler.cpp: (WebCore::ContentExtensions::DFABytecodeCompiler::ranges): (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize): (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions): * contentextensions/DFACombiner.cpp: (WebCore::ContentExtensions::DFAMerger::TargetConverter::convert): (WebCore::ContentExtensions::DFAMerger::TargetConverter::extend): (WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature): (WebCore::ContentExtensions::DFAMerger::merge): (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode): (WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted. (WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted. (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted. * contentextensions/DFAMinimizer.cpp: (WebCore::ContentExtensions::DFAMinimizer::minimize): * contentextensions/DFANode.cpp: Added. (WebCore::ContentExtensions::DFANode::actions): (WebCore::ContentExtensions::DFANode::containsTransition): (WebCore::ContentExtensions::DFANode::kill): (WebCore::ContentExtensions::DFANode::canUseFallbackTransition): (WebCore::ContentExtensions::DFANode::bestFallbackTarget): * contentextensions/DFANode.h: (WebCore::ContentExtensions::CharRange::size): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::first): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::last): (WebCore::ContentExtensions::DFANode::ConstRangeIterator::data): (WebCore::ContentExtensions::DFANode::IterableConstRange::begin): (WebCore::ContentExtensions::DFANode::IterableConstRange::end): (WebCore::ContentExtensions::DFANode::transitions): (WebCore::ContentExtensions::DFANode::RangeIterator::operator*): (WebCore::ContentExtensions::DFANode::RangeIterator::operator==): (WebCore::ContentExtensions::DFANode::RangeIterator::operator!=): (WebCore::ContentExtensions::DFANode::RangeIterator::operator++): (WebCore::ContentExtensions::DFANode::RangeIterator::first): (WebCore::ContentExtensions::DFANode::RangeIterator::last): (WebCore::ContentExtensions::DFANode::RangeIterator::data): (WebCore::ContentExtensions::DFANode::IterableRange::begin): (WebCore::ContentExtensions::DFANode::IterableRange::end): (WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted. (WebCore::ContentExtensions::DFANode::transitionsLength): Deleted. (WebCore::ContentExtensions::DFANode::transitionsStart): Deleted. (WebCore::ContentExtensions::DFANode::resetTransitions): Deleted. (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted. * contentextensions/ImmutableNFA.h: (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range): (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted. (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted. * contentextensions/ImmutableNFANodeBuilder.h: (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first): (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last): (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted. (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted. * contentextensions/MutableRange.h: (WebCore::ContentExtensions::MutableRange::size): Deleted. * contentextensions/MutableRangeList.h: (WebCore::ContentExtensions::MutableRangeList::ConstIterator::first): (WebCore::ContentExtensions::MutableRangeList::ConstIterator::last): (WebCore::ContentExtensions::MutableRangeList::ConstIterator::data): (WebCore::ContentExtensions::MutableRangeList::extend): (WebCore::ContentExtensions::MutableRangeList::size): (WebCore::ContentExtensions::MutableRangeList::initializeFrom): * contentextensions/NFAToDFA.cpp: (WebCore::ContentExtensions::NFAToDFA::convert): (WebCore::ContentExtensions::canUseFallbackTransition): Deleted. (WebCore::ContentExtensions::findBestFallbackTarget): Deleted. Tools: * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: * TestWebKitAPI/Tests/WebCore/DFAMinimizer.cpp: Since the minimizer is perfect, we get the minimal solution now, which is really cool! Canonical link: https://commits.webkit.org/164740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-07-06 21:06:30 +00:00
IterableConstRange iterableTransitions = transitions(dfa);
auto iterator = iterableTransitions.begin();
auto end = iterableTransitions.end();
ASSERT_WITH_MESSAGE(iterator != end, "An empty range list cannot use a fallback transition.");
if (!iterator.first() && !iterator.last())
++iterator;
ASSERT_WITH_MESSAGE(iterator != end, "An empty range list matching only zero cannot use a fallback transition.");
uint32_t bestTarget = iterator.target();
unsigned bestTargetScore = !iterator.range().first ? iterator.range().size() - 1 : iterator.range().size();
histogram.add(bestTarget, bestTargetScore);
++iterator;
for (;iterator != end; ++iterator) {
unsigned rangeSize = iterator.range().size();
uint32_t target = iterator.target();
auto addResult = histogram.add(target, rangeSize);
if (!addResult.isNewEntry)
addResult.iterator->value += rangeSize;
if (addResult.iterator->value > bestTargetScore) {
bestTargetScore = addResult.iterator->value;
bestTarget = target;
}
}
return bestTarget;
}
} // namespace ContentExtensions
} // namespace WebCore
#endif // ENABLE(CONTENT_EXTENSIONS)