Diff
Modified: trunk/Source/WebCore/ChangeLog (127299 => 127300)
--- trunk/Source/WebCore/ChangeLog 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/ChangeLog 2012-08-31 19:11:32 UTC (rev 127300)
@@ -1,3 +1,92 @@
+2012-08-31 Nikhil Bhargava <[email protected]>
+
+ Remove extraneous includes (Node.h, Document.h, Element.h, RenderObject.h)
+ https://bugs.webkit.org/show_bug.cgi?id=95259
+
+ Reviewed by Sam Weinig.
+
+ Node.h, Document.h, Element.h, and RenderObject.h are four of the most
+ expensive headers to include. This patch removes them from many of the
+ places they are not needed. There is a minor compile-time performance
+ boost.
+
+ * dom/ElementShadow.h:
+ * dom/Range.h:
+ (WebCore):
+ * dom/TreeScopeAdopter.h:
+ (WebCore):
+ * editing/VisiblePosition.h:
+ (WebCore):
+ * html/HTMLCollection.h:
+ (WebCore):
+ * html/parser/HTMLElementStack.h:
+ * html/parser/HTMLTreeBuilder.h:
+ (WebCore):
+ * html/track/WebVTTParser.h:
+ (WebCore):
+ * inspector/InspectorCSSAgent.h:
+ (WebCore):
+ * inspector/InspectorInstrumentation.h:
+ (WebCore):
+ * inspector/InspectorOverlay.h:
+ * loader/ImageLoader.h:
+ * loader/TextTrackLoader.h:
+ (WebCore):
+ * platform/chromium/PopupListBox.cpp:
+ * platform/chromium/PopupListBox.h:
+ (WebCore):
+ * platform/graphics/MediaPlayer.h:
+ (WebCore):
+ * rendering/FilterEffectRenderer.h:
+ * rendering/InlineFlowBox.cpp:
+ * rendering/RenderCounter.cpp:
+ * rendering/RenderGeometryMap.h:
+ (WebCore):
+ * rendering/RenderInputSpeech.h:
+ (WebCore):
+ * rendering/RenderMediaControls.h:
+ (WebCore):
+ * rendering/RenderMediaControlsChromium.h:
+ (WebCore):
+ * rendering/RenderQuote.cpp:
+ * rendering/RenderQuote.h:
+ (WebCore):
+ * rendering/RenderScrollbar.h:
+ (WebCore):
+ * rendering/RenderText.h:
+ (WebCore):
+ * rendering/RenderTheme.h:
+ (WebCore):
+ * rendering/RenderThemeChromiumSkia.h:
+ (WebCore):
+ * rendering/svg/RenderSVGResourceMarker.h:
+ (WebCore):
+ * svg/graphics/filters/SVGFilterBuilder.h:
+ (WebCore):
+ * xml/NativeXPathNSResolver.h:
+ (WebCore):
+ (NativeXPathNSResolver):
+ (WebCore::NativeXPathNSResolver::create):
+ * xml/XPathStep.h:
+ (WebCore):
+ (XPath):
+ (Step):
+ (NodeTest):
+ (WebCore::XPath::Step::NodeTest::NodeTest):
+ (WebCore::XPath::Step::NodeTest::kind):
+ (WebCore::XPath::Step::NodeTest::data):
+ (WebCore::XPath::Step::NodeTest::namespaceURI):
+ (WebCore::XPath::Step::NodeTest::mergedPredicates):
+ (WebCore::XPath::Step::axis):
+ (WebCore::XPath::Step::nodeTest):
+ * xml/parser/NewXMLDocumentParser.cpp:
+ * xml/parser/NewXMLDocumentParser.h:
+ (WebCore):
+ * xml/parser/XMLToken.h:
+ * xml/parser/XMLTreeBuilder.cpp:
+ * xml/parser/XMLTreeBuilder.h:
+ (WebCore):
+
2012-08-31 David Hyatt <[email protected]>
[New Multicolumn] Implement column repainting.
Modified: trunk/Source/WebCore/dom/ElementShadow.h (127299 => 127300)
--- trunk/Source/WebCore/dom/ElementShadow.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/dom/ElementShadow.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -28,7 +28,6 @@
#define ElementShadow_h
#include "ContentDistributor.h"
-#include "Element.h"
#include "ExceptionCode.h"
#include "ShadowRoot.h"
#include <wtf/DoublyLinkedList.h>
Modified: trunk/Source/WebCore/dom/Range.h (127299 => 127300)
--- trunk/Source/WebCore/dom/Range.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/dom/Range.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -29,7 +29,6 @@
#include "FloatRect.h"
#include "FragmentScriptingPermission.h"
#include "IntRect.h"
-#include "Node.h"
#include "RangeBoundaryPoint.h"
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
@@ -43,6 +42,7 @@
class Document;
class DocumentFragment;
class FloatQuad;
+class Node;
class NodeWithIndex;
class Text;
Modified: trunk/Source/WebCore/dom/TreeScopeAdopter.h (127299 => 127300)
--- trunk/Source/WebCore/dom/TreeScopeAdopter.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/dom/TreeScopeAdopter.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -25,10 +25,12 @@
#ifndef TreeScopeAdopter_h
#define TreeScopeAdopter_h
-#include "Element.h"
+#include "Node.h"
namespace WebCore {
+class TreeScope;
+
class TreeScopeAdopter {
public:
explicit TreeScopeAdopter(Node* toAdopt, TreeScope* newScope);
Modified: trunk/Source/WebCore/editing/VisiblePosition.h (127299 => 127300)
--- trunk/Source/WebCore/editing/VisiblePosition.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/editing/VisiblePosition.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,7 +27,6 @@
#define VisiblePosition_h
#include "EditingBoundary.h"
-#include "Node.h"
#include "Position.h"
#include "TextDirection.h"
@@ -47,6 +46,7 @@
#define VP_UPSTREAM_IF_POSSIBLE UPSTREAM
class InlineBox;
+class Node;
class VisiblePosition {
public:
Modified: trunk/Source/WebCore/html/HTMLCollection.h (127299 => 127300)
--- trunk/Source/WebCore/html/HTMLCollection.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/html/HTMLCollection.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -23,7 +23,6 @@
#ifndef HTMLCollection_h
#define HTMLCollection_h
-#include "Node.h"
#include "CollectionType.h"
#include "DynamicNodeList.h"
#include <wtf/Forward.h>
@@ -35,6 +34,7 @@
class Document;
class Element;
+class Node;
class NodeList;
class HTMLCollectionCacheBase : public DynamicNodeListCacheBase {
Modified: trunk/Source/WebCore/html/parser/HTMLElementStack.h (127299 => 127300)
--- trunk/Source/WebCore/html/parser/HTMLElementStack.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/html/parser/HTMLElementStack.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,7 +27,6 @@
#ifndef HTMLElementStack_h
#define HTMLElementStack_h
-#include "Element.h"
#include "HTMLNames.h"
#include "HTMLStackItem.h"
#include <wtf/Forward.h>
Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h (127299 => 127300)
--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,7 +27,6 @@
#ifndef HTMLTreeBuilder_h
#define HTMLTreeBuilder_h
-#include "Element.h"
#include "FragmentScriptingPermission.h"
#include "HTMLConstructionSite.h"
#include "HTMLElementStack.h"
@@ -47,6 +46,7 @@
class AtomicHTMLToken;
class Document;
class DocumentFragment;
+class Element;
class Frame;
class HTMLToken;
class HTMLDocument;
Modified: trunk/Source/WebCore/html/track/WebVTTParser.h (127299 => 127300)
--- trunk/Source/WebCore/html/track/WebVTTParser.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/html/track/WebVTTParser.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -33,7 +33,6 @@
#if ENABLE(VIDEO_TRACK)
-#include "Document.h"
#include "DocumentFragment.h"
#include "HTMLNames.h"
#include "TextTrackCue.h"
@@ -45,6 +44,8 @@
using namespace HTMLNames;
+class Document;
+
class WebVTTParserClient {
public:
virtual ~WebVTTParserClient() { }
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.h (127299 => 127300)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,7 +27,6 @@
#include "CSSSelector.h"
#include "ContentSecurityPolicy.h"
-#include "Document.h"
#include "InspectorBaseAgent.h"
#include "InspectorDOMAgent.h"
#include "InspectorStyleSheet.h"
@@ -53,7 +52,9 @@
class InstrumentingAgents;
class NameNodeMap;
class Node;
+class NodeList;
class SelectorProfile;
+class StyleResolver;
#if ENABLE(INSPECTOR)
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (127299 => 127300)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -33,7 +33,6 @@
#include "CSSSelector.h"
#include "ConsoleTypes.h"
-#include "Document.h"
#include "Element.h"
#include "Frame.h"
#include "Page.h"
@@ -53,6 +52,7 @@
class DOMWindow;
class DOMWrapperWorld;
class Database;
+class Document;
class Element;
class EventContext;
class DocumentLoader;
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.h (127299 => 127300)
--- trunk/Source/WebCore/inspector/InspectorOverlay.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -32,12 +32,12 @@
#include "Color.h"
#include "FloatQuad.h"
#include "LayoutTypes.h"
-#include "Node.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
Modified: trunk/Source/WebCore/loader/ImageLoader.h (127299 => 127300)
--- trunk/Source/WebCore/loader/ImageLoader.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/loader/ImageLoader.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -26,7 +26,6 @@
#include "CachedImage.h"
#include "CachedImageClient.h"
#include "CachedResourceHandle.h"
-#include "Element.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/text/AtomicString.h>
Modified: trunk/Source/WebCore/loader/TextTrackLoader.h (127299 => 127300)
--- trunk/Source/WebCore/loader/TextTrackLoader.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/loader/TextTrackLoader.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -31,13 +31,13 @@
#include "CachedResourceClient.h"
#include "CachedResourceHandle.h"
#include "CachedTextTrack.h"
-#include "Document.h"
#include "Timer.h"
#include "WebVTTParser.h"
#include <wtf/OwnPtr.h>
namespace WebCore {
+class Document;
class TextTrackLoader;
class ScriptExecutionContext;
Modified: trunk/Source/WebCore/platform/chromium/PopupListBox.h (127299 => 127300)
--- trunk/Source/WebCore/platform/chromium/PopupListBox.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/platform/chromium/PopupListBox.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -30,11 +30,10 @@
#ifndef PopupListBox_h
#define PopupListBox_h
-#include "Font.h"
-#include "FontSelector.h"
#include "FramelessScrollView.h"
-#include "IntRect.h"
#include "Node.h"
+#include "TextDirection.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -48,7 +47,9 @@
static const int kTextToLabelPadding = 10;
static const TimeStamp kTypeAheadTimeoutMs = 1000;
+class Font;
class GraphicsContext;
+class IntRect;
class PlatformKeyboardEvent;
class PlatformMouseEvent;
#if ENABLE(GESTURE_EVENTS)
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (127299 => 127300)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -32,9 +32,10 @@
#include "MediaPlayerProxy.h"
#endif
-#include "Document.h"
#include "IntRect.h"
#include "KURL.h"
+#include "LayoutTypesInlineMethods.h"
+#include "Timer.h"
#include <wtf/Forward.h>
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
@@ -56,8 +57,10 @@
namespace WebCore {
class AudioSourceProvider;
+class Document;
class GStreamerGWorld;
class MediaPlayerPrivateInterface;
+class MediaSource;
// Structure that will hold every native
// types supported by the current media player.
Modified: trunk/Source/WebCore/rendering/FilterEffectRenderer.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/FilterEffectRenderer.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/FilterEffectRenderer.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -35,6 +35,7 @@
#include "FractionalLayoutRect.h"
#include "GraphicsContext.h"
#include "ImageBuffer.h"
+#include "LayoutTypesInlineMethods.h"
#include "SVGFilterBuilder.h"
#include "SourceGraphic.h"
Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (127299 => 127300)
--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2012-08-31 19:11:32 UTC (rev 127300)
@@ -36,6 +36,7 @@
#include "RenderRubyRun.h"
#include "RenderRubyText.h"
#include "RenderTableCell.h"
+#include "RenderView.h"
#include "RootInlineBox.h"
#include "Text.h"
Modified: trunk/Source/WebCore/rendering/RenderCounter.cpp (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderCounter.cpp 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderCounter.cpp 2012-08-31 19:11:32 UTC (rev 127300)
@@ -30,6 +30,7 @@
#include "RenderListItem.h"
#include "RenderListMarker.h"
#include "RenderStyle.h"
+#include "RenderView.h"
#include <wtf/StdLibExtras.h>
#ifndef NDEBUG
Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderGeometryMap.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -29,13 +29,17 @@
#include "FloatPoint.h"
#include "FloatQuad.h"
#include "IntSize.h"
-#include "RenderObject.h"
+#include "LayoutTypesInlineMethods.h"
#include "TransformationMatrix.h"
#include <wtf/OwnPtr.h>
namespace WebCore {
+class RenderBoxModelObject;
class RenderLayer;
+class RenderObject;
+class RenderView;
+class TransformState;
// Stores data about how to map from one renderer to its container.
struct RenderGeometryMapStep {
Modified: trunk/Source/WebCore/rendering/RenderInputSpeech.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderInputSpeech.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderInputSpeech.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -31,12 +31,18 @@
#ifndef RenderInputSpeech_h
#define RenderInputSpeech_h
-#include "RenderObject.h"
-
#if ENABLE(INPUT_SPEECH)
namespace WebCore {
+struct PaintInfo;
+
+class Element;
+class IntRect;
+class RenderObject;
+class RenderStyle;
+class StyleResolver;
+
class RenderInputSpeech {
public:
static void adjustInputFieldSpeechButtonStyle(StyleResolver*, RenderStyle*, Element*);
Modified: trunk/Source/WebCore/rendering/RenderMediaControls.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderMediaControls.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderMediaControls.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -28,12 +28,18 @@
#if ENABLE(VIDEO)
-#include "RenderObject.h"
#include "MediaControlElements.h"
namespace WebCore {
+struct PaintInfo;
+
class HTMLMediaElement;
+class IntRect;
+class IntSize;
+class RenderBox;
+class RenderObject;
+class RenderStyle;
class RenderMediaControls {
public:
Modified: trunk/Source/WebCore/rendering/RenderMediaControlsChromium.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderMediaControlsChromium.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderMediaControlsChromium.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -28,12 +28,16 @@
#ifndef RenderMediaControlsChromium_h
#define RenderMediaControlsChromium_h
-#include "RenderObject.h"
#include "MediaControlElements.h"
namespace WebCore {
+struct PaintInfo;
+
class HTMLMediaElement;
+class IntRect;
+class RenderObject;
+
class RenderMediaControlsChromium {
public:
static bool paintMediaControlsPart(MediaControlElementType, RenderObject*, const PaintInfo&, const IntRect&);
Modified: trunk/Source/WebCore/rendering/RenderQuote.cpp (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderQuote.cpp 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderQuote.cpp 2012-08-31 19:11:32 UTC (rev 127300)
@@ -22,6 +22,7 @@
#include "config.h"
#include "RenderQuote.h"
+#include "RenderView.h"
#include <wtf/text/AtomicString.h>
#define U(x) ((const UChar*)L##x)
Modified: trunk/Source/WebCore/rendering/RenderQuote.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderQuote.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderQuote.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -22,7 +22,6 @@
#ifndef RenderQuote_h
#define RenderQuote_h
-#include "Document.h"
#include "QuotesData.h"
#include "RenderStyle.h"
#include "RenderStyleConstants.h"
@@ -30,6 +29,8 @@
namespace WebCore {
+class Document;
+
class RenderQuote : public RenderText {
public:
RenderQuote(Document*, const QuoteType);
Modified: trunk/Source/WebCore/rendering/RenderScrollbar.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/RenderScrollbar.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/RenderScrollbar.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -26,7 +26,6 @@
#ifndef RenderScrollbar_h
#define RenderScrollbar_h
-#include "Node.h"
#include "RenderStyleConstants.h"
#include "Scrollbar.h"
#include <wtf/HashMap.h>
@@ -34,6 +33,7 @@
namespace WebCore {
class Frame;
+class Node;
class RenderBox;
class RenderScrollbarPart;
class RenderStyle;
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h (127299 => 127300)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -22,7 +22,6 @@
#if ENABLE(SVG)
#include "FloatRect.h"
-#include "RenderObject.h"
#include "RenderSVGResourceContainer.h"
#include "SVGMarkerElement.h"
#include "SVGStyledElement.h"
@@ -32,6 +31,7 @@
namespace WebCore {
class AffineTransform;
+class RenderObject;
class RenderSVGResourceMarker : public RenderSVGResourceContainer {
public:
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h (127299 => 127300)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -24,7 +24,6 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "FilterEffect.h"
#include "PlatformString.h"
-#include "RenderObject.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
@@ -33,6 +32,8 @@
namespace WebCore {
+class RenderObject;
+
class SVGFilterBuilder : public RefCounted<SVGFilterBuilder> {
public:
typedef HashSet<FilterEffect*> FilterEffectSet;
Modified: trunk/Source/WebCore/xml/NativeXPathNSResolver.h (127299 => 127300)
--- trunk/Source/WebCore/xml/NativeXPathNSResolver.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/xml/NativeXPathNSResolver.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,23 +27,24 @@
#define NativeXPathNSResolver_h
#include "XPathNSResolver.h"
-#include "Node.h"
#include <wtf/RefPtr.h>
namespace WebCore {
- class NativeXPathNSResolver : public XPathNSResolver {
- public:
- static PassRefPtr<NativeXPathNSResolver> create(PassRefPtr<Node> node) { return adoptRef(new NativeXPathNSResolver(node)); }
- virtual ~NativeXPathNSResolver();
+class Node;
- virtual String lookupNamespaceURI(const String& prefix);
+class NativeXPathNSResolver : public XPathNSResolver {
+public:
+ static PassRefPtr<NativeXPathNSResolver> create(PassRefPtr<Node> node) { return adoptRef(new NativeXPathNSResolver(node)); }
+ virtual ~NativeXPathNSResolver();
- private:
- NativeXPathNSResolver(PassRefPtr<Node>);
- RefPtr<Node> m_node;
- };
+ virtual String lookupNamespaceURI(const String& prefix);
+private:
+ NativeXPathNSResolver(PassRefPtr<Node>);
+ RefPtr<Node> m_node;
+};
+
} // namespace WebCore
#endif // NativeXPathNSResolver_h
Modified: trunk/Source/WebCore/xml/XPathStep.h (127299 => 127300)
--- trunk/Source/WebCore/xml/XPathStep.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/xml/XPathStep.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,79 +27,82 @@
#ifndef XPathStep_h
#define XPathStep_h
-#include "Node.h"
#include "XPathExpressionNode.h"
#include "XPathNodeSet.h"
namespace WebCore {
- namespace XPath {
+class Node;
- class Predicate;
+namespace XPath {
+
+class Predicate;
- class Step : public ParseNode {
- WTF_MAKE_NONCOPYABLE(Step); WTF_MAKE_FAST_ALLOCATED;
- public:
- enum Axis {
- AncestorAxis, AncestorOrSelfAxis, AttributeAxis,
- ChildAxis, DescendantAxis, DescendantOrSelfAxis,
- FollowingAxis, FollowingSiblingAxis, NamespaceAxis,
- ParentAxis, PrecedingAxis, PrecedingSiblingAxis,
- SelfAxis
- };
-
- class NodeTest {
- WTF_MAKE_FAST_ALLOCATED;
- public:
- enum Kind {
- TextNodeTest, CommentNodeTest, ProcessingInstructionNodeTest, AnyNodeTest, NameTest
- };
+class Step : public ParseNode {
+ WTF_MAKE_NONCOPYABLE(Step);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ enum Axis {
+ AncestorAxis, AncestorOrSelfAxis, AttributeAxis,
+ ChildAxis, DescendantAxis, DescendantOrSelfAxis,
+ FollowingAxis, FollowingSiblingAxis, NamespaceAxis,
+ ParentAxis, PrecedingAxis, PrecedingSiblingAxis,
+ SelfAxis
+ };
+
+ class NodeTest {
+ WTF_MAKE_FAST_ALLOCATED;
+ public:
+ enum Kind {
+ TextNodeTest, CommentNodeTest, ProcessingInstructionNodeTest, AnyNodeTest, NameTest
+ };
+
+ NodeTest(Kind kind) : m_kind(kind) { }
+ NodeTest(Kind kind, const String& data) : m_kind(kind), m_data(data) { }
+ NodeTest(Kind kind, const String& data, const String& namespaceURI) : m_kind(kind), m_data(data), m_namespaceURI(namespaceURI) { }
- NodeTest(Kind kind) : m_kind(kind) {}
- NodeTest(Kind kind, const String& data) : m_kind(kind), m_data(data) {}
- NodeTest(Kind kind, const String& data, const String& namespaceURI) : m_kind(kind), m_data(data), m_namespaceURI(namespaceURI) {}
+ Kind kind() const { return m_kind; }
+ const AtomicString& data() const { return m_data; }
+ const AtomicString& namespaceURI() const { return m_namespaceURI; }
+ Vector<Predicate*>& mergedPredicates() { return m_mergedPredicates; }
+ const Vector<Predicate*>& mergedPredicates() const { return m_mergedPredicates; }
- Kind kind() const { return m_kind; }
- const AtomicString& data() const { return m_data; }
- const AtomicString& namespaceURI() const { return m_namespaceURI; }
- Vector<Predicate*>& mergedPredicates() { return m_mergedPredicates; }
- const Vector<Predicate*>& mergedPredicates() const { return m_mergedPredicates; }
-
- private:
- Kind m_kind;
- AtomicString m_data;
- AtomicString m_namespaceURI;
+ private:
+ Kind m_kind;
+ AtomicString m_data;
+ AtomicString m_namespaceURI;
- // When possible, we merge some or all predicates with node test for better performance.
- Vector<Predicate*> m_mergedPredicates;
- };
+ // When possible, we merge some or all predicates with node test for better performance.
+ Vector<Predicate*> m_mergedPredicates;
+ };
- Step(Axis, const NodeTest& nodeTest, const Vector<Predicate*>& predicates = Vector<Predicate*>());
- ~Step();
+ Step(Axis, const NodeTest&, const Vector<Predicate*>& predicates = Vector<Predicate*>());
+ ~Step();
- void optimize();
+ void optimize();
- void evaluate(Node* context, NodeSet&) const;
+ void evaluate(Node* context, NodeSet&) const;
- Axis axis() const { return m_axis; }
- const NodeTest& nodeTest() const { return m_nodeTest; }
+ Axis axis() const { return m_axis; }
+ const NodeTest& nodeTest() const { return m_nodeTest; }
- private:
- friend void optimizeStepPair(Step*, Step*, bool&);
- bool predicatesAreContextListInsensitive() const;
+private:
+ friend void optimizeStepPair(Step*, Step*, bool&);
+ bool predicatesAreContextListInsensitive() const;
- void parseNodeTest(const String&);
- void nodesInAxis(Node* context, NodeSet&) const;
- String namespaceFromNodetest(const String& nodeTest) const;
+ void parseNodeTest(const String&);
+ void nodesInAxis(Node* context, NodeSet&) const;
+ String namespaceFromNodetest(const String& nodeTest) const;
- Axis m_axis;
- NodeTest m_nodeTest;
- Vector<Predicate*> m_predicates;
- };
+ Axis m_axis;
+ NodeTest m_nodeTest;
+ Vector<Predicate*> m_predicates;
+};
- void optimizeStepPair(Step*, Step*, bool& dropSecondStep);
- }
+void optimizeStepPair(Step*, Step*, bool& dropSecondStep);
-}
+} // namespace XPath
+} // namespace WebCore
+
#endif // XPathStep_h
Modified: trunk/Source/WebCore/xml/parser/NewXMLDocumentParser.cpp (127299 => 127300)
--- trunk/Source/WebCore/xml/parser/NewXMLDocumentParser.cpp 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/xml/parser/NewXMLDocumentParser.cpp 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,6 +27,7 @@
#include "NewXMLDocumentParser.h"
#include "DocumentFragment.h"
+#include "Element.h"
#include "ScriptElement.h"
#include "ScriptSourceCode.h"
#include "SegmentedString.h"
Modified: trunk/Source/WebCore/xml/parser/NewXMLDocumentParser.h (127299 => 127300)
--- trunk/Source/WebCore/xml/parser/NewXMLDocumentParser.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/xml/parser/NewXMLDocumentParser.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -29,6 +29,7 @@
#include "CachedResourceClient.h"
#include "CachedResourceHandle.h"
#include "CachedScript.h"
+#include "FragmentScriptingPermission.h"
#include "ScriptableDocumentParser.h"
#include "XMLToken.h"
#include "XMLTokenizer.h"
@@ -39,6 +40,7 @@
class ContainerNode;
class Document;
+class DocumentFragment;
class ScriptElement;
class XMLTreeBuilder;
Modified: trunk/Source/WebCore/xml/parser/XMLToken.h (127299 => 127300)
--- trunk/Source/WebCore/xml/parser/XMLToken.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/xml/parser/XMLToken.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -27,7 +27,6 @@
#ifndef XMLToken_h
#define XMLToken_h
-#include "Element.h"
#include "MarkupTokenBase.h"
namespace WebCore {
Modified: trunk/Source/WebCore/xml/parser/XMLTreeBuilder.cpp (127299 => 127300)
--- trunk/Source/WebCore/xml/parser/XMLTreeBuilder.cpp 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/xml/parser/XMLTreeBuilder.cpp 2012-08-31 19:11:32 UTC (rev 127300)
@@ -32,6 +32,7 @@
#include "Document.h"
#include "DocumentFragment.h"
#include "DocumentType.h"
+#include "Element.h"
#include "Frame.h"
// FIXME: Why are we including HTML entity information in the XML parser?
#include "HTMLEntitySearch.h"
Modified: trunk/Source/WebCore/xml/parser/XMLTreeBuilder.h (127299 => 127300)
--- trunk/Source/WebCore/xml/parser/XMLTreeBuilder.h 2012-08-31 19:08:50 UTC (rev 127299)
+++ trunk/Source/WebCore/xml/parser/XMLTreeBuilder.h 2012-08-31 19:11:32 UTC (rev 127300)
@@ -36,6 +36,7 @@
class ContainerNode;
class Document;
+class DocumentFragment;
class NewXMLDocumentParser;
class XMLTreeBuilder {