Clean-up: RenderElement.h includes headers it doesn't use
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 17:44:45 +0000 (17:44 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 17:44:45 +0000 (17:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173046

Reviewed by Andy Estes.

Source/WebCore:

Remove a couple of unneeded includes from RenderElement.h, and then clean up all the
follow-on compile errors that causes. Mostly, these errors are fixed by including the
correct headers at the point of use; otherwise, they're solved by forward-declaring types
and in one case by moving default constructors implementation to the cpp file from the header.

* css/parser/SizesAttributeParser.cpp:
* editing/cocoa/EditorCocoa.mm:
* platform/mac/PasteboardMac.mm:
* rendering/InlineIterator.h:
(WebCore::embedCharFromDirection):
* rendering/RenderBoxModelObject.h:
* rendering/RenderElement.cpp:
* rendering/RenderElement.h:
* rendering/RenderIterator.h:
* rendering/RenderLineBreak.cpp:
* rendering/RenderQuote.cpp:
* rendering/RenderText.h:
* rendering/SimpleLineLayoutPagination.cpp:
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
* rendering/TextAutoSizing.cpp:
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
* style/RenderTreeUpdater.cpp:
* style/StyleResolveForDocument.cpp:
* style/StyleTreeResolver.cpp:

Source/WebKit/mac:

* WebView/WebImmediateActionController.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217893 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/parser/SizesAttributeParser.cpp
Source/WebCore/editing/cocoa/EditorCocoa.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/rendering/InlineIterator.h
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderElement.h
Source/WebCore/rendering/RenderIterator.h
Source/WebCore/rendering/RenderLineBreak.cpp
Source/WebCore/rendering/RenderQuote.cpp
Source/WebCore/rendering/RenderText.h
Source/WebCore/rendering/SimpleLineLayoutPagination.cpp
Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp
Source/WebCore/rendering/TextAutoSizing.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/style/RenderTreeUpdater.cpp
Source/WebCore/style/StyleResolveForDocument.cpp
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebImmediateActionController.mm

index 58fa4df..9baa65f 100644 (file)
@@ -1,3 +1,36 @@
+2017-06-07  Jer Noble  <jer.noble@apple.com>
+
+        Clean-up: RenderElement.h includes headers it doesn't use
+        https://bugs.webkit.org/show_bug.cgi?id=173046
+
+        Reviewed by Andy Estes.
+
+        Remove a couple of unneeded includes from RenderElement.h, and then clean up all the
+        follow-on compile errors that causes. Mostly, these errors are fixed by including the
+        correct headers at the point of use; otherwise, they're solved by forward-declaring types
+        and in one case by moving default constructors implementation to the cpp file from the header.
+
+        * css/parser/SizesAttributeParser.cpp:
+        * editing/cocoa/EditorCocoa.mm:
+        * platform/mac/PasteboardMac.mm:
+        * rendering/InlineIterator.h:
+        (WebCore::embedCharFromDirection):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderElement.cpp:
+        * rendering/RenderElement.h:
+        * rendering/RenderIterator.h:
+        * rendering/RenderLineBreak.cpp:
+        * rendering/RenderQuote.cpp:
+        * rendering/RenderText.h:
+        * rendering/SimpleLineLayoutPagination.cpp:
+        * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
+        * rendering/TextAutoSizing.cpp:
+        * rendering/style/RenderStyle.cpp:
+        * rendering/style/RenderStyle.h:
+        * style/RenderTreeUpdater.cpp:
+        * style/StyleResolveForDocument.cpp:
+        * style/StyleTreeResolver.cpp:
+
 2017-06-07  Youenn Fablet  <youenn@apple.com>
 
         Add WebRTC stats logging
index 7b7969b..cff47cf 100644 (file)
@@ -33,6 +33,7 @@
 #include "CSSPrimitiveValue.h"
 #include "CSSToLengthConversionData.h"
 #include "CSSTokenizer.h"
+#include "FontCascade.h"
 #include "MediaQueryEvaluator.h"
 #include "RenderView.h"
 #include "SizesCalcParser.h"
index 7be63bc..682a50d 100644 (file)
@@ -36,6 +36,7 @@
 #import "Editing.h"
 #import "EditingStyle.h"
 #import "EditorClient.h"
+#import "FontCascade.h"
 #import "Frame.h"
 #import "FrameSelection.h"
 #import "HTMLConverter.h"
index 8ad4758..cd8ffde 100644 (file)
@@ -48,6 +48,7 @@
 #import "Text.h"
 #import "URL.h"
 #import "WebCoreNSStringExtras.h"
+#import "WebCoreSystemInterface.h"
 #import "WebNSAttributedStringExtras.h"
 #import "markup.h"
 #import <wtf/RetainPtr.h>
index f366b3c..08eb2ab 100644 (file)
@@ -141,7 +141,6 @@ inline bool operator!=(const InlineIterator& it1, const InlineIterator& it2)
 
 static inline UCharDirection embedCharFromDirection(TextDirection direction, EUnicodeBidi unicodeBidi)
 {
-    using namespace WTF::Unicode;
     if (unicodeBidi == Embed)
         return direction == RTL ? U_RIGHT_TO_LEFT_EMBEDDING : U_LEFT_TO_RIGHT_EMBEDDING;
     return direction == RTL ? U_RIGHT_TO_LEFT_OVERRIDE : U_LEFT_TO_RIGHT_OVERRIDE;
index 31daedb..458d69f 100644 (file)
@@ -23,6 +23,7 @@
 
 #pragma once
 
+#include "FontBaseline.h"
 #include "LayoutRect.h"
 #include "RenderLayerModelObject.h"
 
index f0e2c35..c9dc5d6 100644 (file)
@@ -26,6 +26,7 @@
 #include "RenderElement.h"
 
 #include "AXObjectCache.h"
+#include "CSSAnimationController.h"
 #include "ContentData.h"
 #include "CursorList.h"
 #include "ElementChildIterator.h"
index 8067218..2eb2afc 100644 (file)
 
 #pragma once
 
-#include "CSSAnimationController.h"
 #include "LengthFunctions.h"
 #include "RenderObject.h"
-#include "StyleInheritedData.h"
 
 namespace WebCore {
 
index ba172e7..f055959 100644 (file)
@@ -29,6 +29,8 @@
 
 namespace WebCore {
 
+class RenderText;
+
 template <typename T>
 class RenderIterator {
 public:
index dced326..058b0fc 100644 (file)
@@ -23,6 +23,7 @@
 #include "RenderLineBreak.h"
 
 #include "Document.h"
+#include "FontMetrics.h"
 #include "HTMLElement.h"
 #include "HTMLWBRElement.h"
 #include "InlineElementBox.h"
index d7900df..2a83df7 100644 (file)
@@ -26,6 +26,7 @@
 #include "QuotesData.h"
 #include "RenderTextFragment.h"
 #include "RenderView.h"
+#include <wtf/unicode/CharacterNames.h>
 
 using namespace WTF::Unicode;
 
index 1411088..95340fb 100644 (file)
@@ -31,6 +31,7 @@
 
 namespace WebCore {
 
+class Font;
 class InlineTextBox;
 struct GlyphOverflow;
 
index 55f37cc..823e0c3 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "SimpleLineLayoutPagination.h"
 
+#include "FontCascade.h"
 #include "RenderBlockFlow.h"
 #include "SimpleLineLayout.h"
 #include "SimpleLineLayoutFunctions.h"
index cfd59c3..b9d0bb7 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "SimpleLineLayoutTextFragmentIterator.h"
 
+#include "FontCascade.h"
 #include "Hyphenation.h"
 #include "RenderBlockFlow.h"
 #include "RenderChildIterator.h"
index aaf71cb..2c1ed08 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "CSSFontSelector.h"
 #include "Document.h"
+#include "FontCascade.h"
 #include "Logging.h"
 #include "RenderListMarker.h"
 #include "RenderText.h"
index da17065..0be2d73 100644 (file)
@@ -127,6 +127,9 @@ RenderStyle RenderStyle::createStyleInheritingFromPseudoStyle(const RenderStyle&
     return style;
 }
 
+RenderStyle::RenderStyle(RenderStyle&&) = default;
+RenderStyle& RenderStyle::operator=(RenderStyle&&) = default;
+
 RenderStyle::RenderStyle(CreateDefaultStyleTag)
     : m_boxData(StyleBoxData::create())
     , m_visualData(StyleVisualData::create())
index e80f958..41fcb88 100644 (file)
@@ -129,8 +129,8 @@ private:
     enum CreateDefaultStyleTag { CreateDefaultStyle };
 
 public:
-    RenderStyle(RenderStyle&&) = default;
-    RenderStyle& operator=(RenderStyle&&) = default;
+    RenderStyle(RenderStyle&&);
+    RenderStyle& operator=(RenderStyle&&);
     ~RenderStyle();
 
     RenderStyle replace(RenderStyle&&) WARN_UNUSED_RETURN;
index 0835797..a24d0d2 100644 (file)
@@ -27,6 +27,7 @@
 #include "RenderTreeUpdater.h"
 
 #include "AXObjectCache.h"
+#include "CSSAnimationController.h"
 #include "ComposedTreeAncestorIterator.h"
 #include "ComposedTreeIterator.h"
 #include "Document.h"
index 6899e1d..d7a80a1 100644 (file)
@@ -32,6 +32,7 @@
 #include "CSSFontSelector.h"
 #include "ConstantPropertyMap.h"
 #include "Document.h"
+#include "FontCascade.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "HTMLIFrameElement.h"
index 72c7150..3a8a3d2 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "StyleTreeResolver.h"
 
+#include "CSSAnimationController.h"
 #include "CSSFontSelector.h"
 #include "ComposedTreeAncestorIterator.h"
 #include "ComposedTreeIterator.h"
index d9c01ed..8a27da4 100644 (file)
@@ -1,3 +1,12 @@
+2017-06-07  Jer Noble  <jer.noble@apple.com>
+
+        Clean-up: RenderElement.h includes headers it doesn't use
+        https://bugs.webkit.org/show_bug.cgi?id=173046
+
+        Reviewed by Andy Estes.
+
+        * WebView/WebImmediateActionController.mm:
+
 2017-06-07  Zalan Bujtas  <zalan@apple.com>
 
         [iOS WK1 WebThread] Do not call out to the main thread for device orientation.
index 8f3d9d7..2f31cd5 100644 (file)
@@ -42,6 +42,7 @@
 #import <WebCore/Editor.h>
 #import <WebCore/EventHandler.h>
 #import <WebCore/FocusController.h>
+#import <WebCore/FontMetrics.h>
 #import <WebCore/Frame.h>
 #import <WebCore/FrameView.h>
 #import <WebCore/GeometryUtilities.h>