Explorar el Código

LibWeb: Remove a whole bunch of unnecessary #includes

Andreas Kling hace 4 años
padre
commit
9de1253f44
Se han modificado 31 ficheros con 3 adiciones y 68 borrados
  1. 0 7
      Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
  2. 0 1
      Userland/Libraries/LibWeb/CSS/Parser/CSSParser.cpp
  3. 0 1
      Userland/Libraries/LibWeb/CSS/StyleValue.cpp
  4. 0 1
      Userland/Libraries/LibWeb/DOM/Document.cpp
  5. 0 2
      Userland/Libraries/LibWeb/DOM/Element.cpp
  6. 0 5
      Userland/Libraries/LibWeb/DOM/Node.cpp
  7. 0 1
      Userland/Libraries/LibWeb/DumpLayoutTree/main.cpp
  8. 0 1
      Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
  9. 0 2
      Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp
  10. 0 1
      Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
  11. 0 1
      Userland/Libraries/LibWeb/HTML/Parser/Entities.cpp
  12. 0 10
      Userland/Libraries/LibWeb/InProcessWebView.cpp
  13. 0 4
      Userland/Libraries/LibWeb/Layout/BlockBox.cpp
  14. 0 1
      Userland/Libraries/LibWeb/Layout/CanvasBox.cpp
  15. 0 2
      Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
  16. 0 1
      Userland/Libraries/LibWeb/Layout/FrameBox.cpp
  17. 0 2
      Userland/Libraries/LibWeb/Layout/ImageBox.cpp
  18. 0 1
      Userland/Libraries/LibWeb/Layout/InitialContainingBlockBox.cpp
  19. 0 1
      Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp
  20. 0 1
      Userland/Libraries/LibWeb/Layout/LayoutPosition.cpp
  21. 0 1
      Userland/Libraries/LibWeb/Layout/LineBoxFragment.cpp
  22. 0 3
      Userland/Libraries/LibWeb/Layout/Node.cpp
  23. 0 1
      Userland/Libraries/LibWeb/Layout/SVGBox.cpp
  24. 0 2
      Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp
  25. 0 2
      Userland/Libraries/LibWeb/Layout/TextNode.cpp
  26. 0 2
      Userland/Libraries/LibWeb/Layout/WidgetBox.cpp
  27. 0 1
      Userland/Libraries/LibWeb/Loader/ImageLoader.cpp
  28. 0 1
      Userland/Libraries/LibWeb/Loader/ImageResource.cpp
  29. 3 6
      Userland/Libraries/LibWeb/Page/EditEventHandler.cpp
  30. 0 2
      Userland/Libraries/LibWeb/Page/EventHandler.cpp
  31. 0 1
      Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp

+ 0 - 7
Userland/Libraries/LibWeb/Bindings/WindowObject.cpp

@@ -25,9 +25,6 @@
  */
 
 #include <AK/Base64.h>
-#include <AK/ByteBuffer.h>
-#include <AK/FlyString.h>
-#include <AK/Function.h>
 #include <AK/String.h>
 #include <AK/Utf8View.h>
 #include <LibJS/Runtime/Error.h>
@@ -43,11 +40,7 @@
 #include <LibWeb/Bindings/NavigatorObject.h>
 #include <LibWeb/Bindings/NodeWrapperFactory.h>
 #include <LibWeb/Bindings/PerformanceWrapper.h>
-#include <LibWeb/Bindings/RangeConstructor.h>
-#include <LibWeb/Bindings/RangePrototype.h>
 #include <LibWeb/Bindings/WindowObject.h>
-#include <LibWeb/Bindings/XMLHttpRequestConstructor.h>
-#include <LibWeb/Bindings/XMLHttpRequestPrototype.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Window.h>

+ 0 - 1
Userland/Libraries/LibWeb/CSS/Parser/CSSParser.cpp

@@ -30,7 +30,6 @@
 #include <LibWeb/CSS/StyleSheet.h>
 #include <LibWeb/DOM/Document.h>
 #include <ctype.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 

+ 0 - 1
Userland/Libraries/LibWeb/CSS/StyleValue.cpp

@@ -25,7 +25,6 @@
  */
 
 #include <AK/ByteBuffer.h>
-#include <LibGfx/PNGLoader.h>
 #include <LibGfx/Palette.h>
 #include <LibWeb/CSS/StyleValue.h>
 #include <LibWeb/DOM/Document.h>

+ 0 - 1
Userland/Libraries/LibWeb/DOM/Document.cpp

@@ -63,7 +63,6 @@
 #include <LibWeb/Page/Frame.h>
 #include <LibWeb/SVG/TagNames.h>
 #include <ctype.h>
-#include <stdio.h>
 
 namespace Web::DOM {
 

+ 0 - 2
Userland/Libraries/LibWeb/DOM/Element.cpp

@@ -26,7 +26,6 @@
 
 #include <AK/AnyOf.h>
 #include <AK/StringBuilder.h>
-#include <LibWeb/CSS/Length.h>
 #include <LibWeb/CSS/Parser/CSSParser.h>
 #include <LibWeb/CSS/PropertyID.h>
 #include <LibWeb/CSS/StyleInvalidator.h>
@@ -35,7 +34,6 @@
 #include <LibWeb/DOM/DocumentFragment.h>
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/DOM/Text.h>
-#include <LibWeb/Dump.h>
 #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
 #include <LibWeb/Layout/BlockBox.h>
 #include <LibWeb/Layout/InlineNode.h>

+ 0 - 5
Userland/Libraries/LibWeb/DOM/Node.cpp

@@ -27,12 +27,9 @@
 #include <AK/StringBuilder.h>
 #include <LibJS/AST.h>
 #include <LibJS/Runtime/Function.h>
-#include <LibJS/Runtime/ScriptFunction.h>
 #include <LibWeb/Bindings/EventWrapper.h>
-#include <LibWeb/Bindings/EventWrapperFactory.h>
 #include <LibWeb/Bindings/NodeWrapper.h>
 #include <LibWeb/Bindings/NodeWrapperFactory.h>
-#include <LibWeb/CSS/StyleResolver.h>
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/EventDispatcher.h>
@@ -40,9 +37,7 @@
 #include <LibWeb/DOM/Node.h>
 #include <LibWeb/DOM/ShadowRoot.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
-#include <LibWeb/Layout/BlockBox.h>
 #include <LibWeb/Layout/InitialContainingBlockBox.h>
-#include <LibWeb/Layout/InlineNode.h>
 #include <LibWeb/Layout/Node.h>
 #include <LibWeb/Layout/TextNode.h>
 

+ 0 - 1
Userland/Libraries/LibWeb/DumpLayoutTree/main.cpp

@@ -29,7 +29,6 @@
 #include <LibWeb/Dump.h>
 #include <LibWeb/InProcessWebView.h>
 #include <LibWeb/Layout/InitialContainingBlockBox.h>
-#include <stdlib.h>
 
 int main(int argc, char** argv)
 {

+ 0 - 1
Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp

@@ -24,7 +24,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <AK/Debug.h>
 #include <LibGUI/Button.h>
 #include <LibGUI/TextBox.h>
 #include <LibWeb/Bindings/WindowObject.h>

+ 0 - 2
Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp

@@ -25,9 +25,7 @@
  */
 
 #include <AK/ByteBuffer.h>
-#include <AK/Debug.h>
 #include <AK/URL.h>
-#include <LibCore/File.h>
 #include <LibWeb/CSS/Parser/CSSParser.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/HTML/HTMLLinkElement.h>

+ 0 - 1
Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp

@@ -25,7 +25,6 @@
  */
 
 #include <LibGfx/Bitmap.h>
-#include <LibGfx/ImageDecoder.h>
 #include <LibWeb/CSS/StyleResolver.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Event.h>

+ 0 - 1
Userland/Libraries/LibWeb/HTML/Parser/Entities.cpp

@@ -24,7 +24,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <AK/LogStream.h>
 #include <AK/StringView.h>
 #include <LibWeb/HTML/Parser/Entities.h>
 

+ 0 - 10
Userland/Libraries/LibWeb/InProcessWebView.cpp

@@ -24,7 +24,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <AK/LexicalPath.h>
 #include <AK/URL.h>
 #include <LibCore/File.h>
 #include <LibCore/MimeData.h>
@@ -35,18 +34,10 @@
 #include <LibGUI/Painter.h>
 #include <LibGUI/ScrollBar.h>
 #include <LibGUI/Window.h>
-#include <LibGfx/ImageDecoder.h>
 #include <LibGfx/ShareableBitmap.h>
-#include <LibJS/Runtime/Value.h>
-#include <LibWeb/DOM/Element.h>
-#include <LibWeb/DOM/ElementFactory.h>
-#include <LibWeb/DOM/Text.h>
-#include <LibWeb/Dump.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
-#include <LibWeb/HTML/HTMLImageElement.h>
 #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
 #include <LibWeb/InProcessWebView.h>
-#include <LibWeb/Layout/BreakNode.h>
 #include <LibWeb/Layout/InitialContainingBlockBox.h>
 #include <LibWeb/Layout/Node.h>
 #include <LibWeb/Layout/TextNode.h>
@@ -55,7 +46,6 @@
 #include <LibWeb/Page/Frame.h>
 #include <LibWeb/Painting/PaintContext.h>
 #include <LibWeb/UIEvents/MouseEvent.h>
-#include <stdio.h>
 
 REGISTER_WIDGET(Web, InProcessWebView)
 

+ 0 - 4
Userland/Libraries/LibWeb/Layout/BlockBox.cpp

@@ -26,16 +26,12 @@
 
 #include <LibGUI/Painter.h>
 #include <LibWeb/CSS/StyleResolver.h>
-#include <LibWeb/DOM/Element.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Layout/BlockBox.h>
 #include <LibWeb/Layout/InitialContainingBlockBox.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>
-#include <LibWeb/Layout/InlineNode.h>
 #include <LibWeb/Layout/ReplacedBox.h>
 #include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Layout/WidgetBox.h>
-#include <math.h>
 
 namespace Web::Layout {
 

+ 0 - 1
Userland/Libraries/LibWeb/Layout/CanvasBox.cpp

@@ -25,7 +25,6 @@
  */
 
 #include <LibGUI/Painter.h>
-#include <LibGfx/Font.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/Layout/CanvasBox.h>
 

+ 0 - 2
Userland/Libraries/LibWeb/Layout/FormattingContext.cpp

@@ -25,7 +25,6 @@
  */
 
 #include <LibWeb/Dump.h>
-#include <LibWeb/Layout/BlockBox.h>
 #include <LibWeb/Layout/BlockFormattingContext.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/FlexFormattingContext.h>
@@ -35,7 +34,6 @@
 #include <LibWeb/Layout/TableBox.h>
 #include <LibWeb/Layout/TableCellBox.h>
 #include <LibWeb/Layout/TableFormattingContext.h>
-#include <LibWeb/Layout/TableRowBox.h>
 
 namespace Web::Layout {
 

+ 0 - 1
Userland/Libraries/LibWeb/Layout/FrameBox.cpp

@@ -28,7 +28,6 @@
 #include <LibGUI/Painter.h>
 #include <LibGUI/ScrollBar.h>
 #include <LibGUI/Widget.h>
-#include <LibGfx/Font.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/InProcessWebView.h>

+ 0 - 2
Userland/Libraries/LibWeb/Layout/ImageBox.cpp

@@ -25,9 +25,7 @@
  */
 
 #include <LibGUI/Painter.h>
-#include <LibGfx/Font.h>
 #include <LibGfx/FontDatabase.h>
-#include <LibGfx/ImageDecoder.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/Layout/ImageBox.h>
 #include <LibWeb/Page/Frame.h>

+ 0 - 1
Userland/Libraries/LibWeb/Layout/InitialContainingBlockBox.cpp

@@ -25,7 +25,6 @@
  */
 
 #include <LibWeb/Dump.h>
-#include <LibWeb/Layout/ImageBox.h>
 #include <LibWeb/Layout/InitialContainingBlockBox.h>
 #include <LibWeb/Layout/WidgetBox.h>
 #include <LibWeb/Page/Frame.h>

+ 0 - 1
Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp

@@ -31,7 +31,6 @@
 #include <LibWeb/Layout/BlockFormattingContext.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>
-#include <LibWeb/Layout/InlineNode.h>
 #include <LibWeb/Layout/ReplacedBox.h>
 
 namespace Web::Layout {

+ 0 - 1
Userland/Libraries/LibWeb/Layout/LayoutPosition.cpp

@@ -27,7 +27,6 @@
 #include <LibWeb/DOM/Position.h>
 #include <LibWeb/DOM/Range.h>
 #include <LibWeb/Layout/LayoutPosition.h>
-#include <LibWeb/Layout/Node.h>
 
 namespace Web::Layout {
 

+ 0 - 1
Userland/Libraries/LibWeb/Layout/LineBoxFragment.cpp

@@ -29,7 +29,6 @@
 #include <LibWeb/Layout/InitialContainingBlockBox.h>
 #include <LibWeb/Layout/LineBoxFragment.h>
 #include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Painting/BorderPainting.h>
 #include <LibWeb/Painting/PaintContext.h>
 #include <ctype.h>
 

+ 0 - 3
Userland/Libraries/LibWeb/Layout/Node.cpp

@@ -28,17 +28,14 @@
 #include <LibGUI/Painter.h>
 #include <LibGfx/FontDatabase.h>
 #include <LibWeb/DOM/Document.h>
-#include <LibWeb/DOM/Element.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
 #include <LibWeb/Layout/BlockBox.h>
 #include <LibWeb/Layout/FormattingContext.h>
 #include <LibWeb/Layout/InitialContainingBlockBox.h>
 #include <LibWeb/Layout/Node.h>
-#include <LibWeb/Layout/ReplacedBox.h>
 #include <LibWeb/Layout/TextNode.h>
 #include <LibWeb/Page/Frame.h>
-#include <typeinfo>
 
 namespace Web::Layout {
 

+ 0 - 1
Userland/Libraries/LibWeb/Layout/SVGBox.cpp

@@ -25,7 +25,6 @@
  */
 
 #include <LibGUI/Painter.h>
-#include <LibGfx/Font.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/Layout/SVGBox.h>
 

+ 0 - 2
Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp

@@ -24,9 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <LibWeb/CSS/Length.h>
 #include <LibWeb/DOM/Node.h>
-#include <LibWeb/Layout/BlockBox.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>
 #include <LibWeb/Layout/TableBox.h>

+ 0 - 2
Userland/Libraries/LibWeb/Layout/TextNode.cpp

@@ -26,9 +26,7 @@
 
 #include <AK/StringBuilder.h>
 #include <AK/Utf8View.h>
-#include <LibCore/DirIterator.h>
 #include <LibGUI/Painter.h>
-#include <LibGfx/Font.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/Layout/BlockBox.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>

+ 0 - 2
Userland/Libraries/LibWeb/Layout/WidgetBox.cpp

@@ -27,8 +27,6 @@
 #include <LibGUI/Painter.h>
 #include <LibGUI/ScrollBar.h>
 #include <LibGUI/Widget.h>
-#include <LibGfx/Font.h>
-#include <LibGfx/StylePainter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/InProcessWebView.h>
 #include <LibWeb/Layout/WidgetBox.h>

+ 0 - 1
Userland/Libraries/LibWeb/Loader/ImageLoader.cpp

@@ -27,7 +27,6 @@
 #include <AK/Debug.h>
 #include <LibCore/Timer.h>
 #include <LibGfx/Bitmap.h>
-#include <LibGfx/ImageDecoder.h>
 #include <LibWeb/Loader/ImageLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 

+ 0 - 1
Userland/Libraries/LibWeb/Loader/ImageResource.cpp

@@ -26,7 +26,6 @@
 
 #include <AK/Function.h>
 #include <LibGfx/Bitmap.h>
-#include <LibGfx/ImageDecoder.h>
 #include <LibImageDecoderClient/Client.h>
 #include <LibWeb/Loader/ImageResource.h>
 

+ 3 - 6
Userland/Libraries/LibWeb/Page/EditEventHandler.cpp

@@ -24,19 +24,16 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "EditEventHandler.h"
 #include <AK/StringBuilder.h>
+#include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Position.h>
 #include <LibWeb/DOM/Range.h>
 #include <LibWeb/DOM/Text.h>
+#include <LibWeb/Layout/InitialContainingBlockBox.h>
 #include <LibWeb/Layout/LayoutPosition.h>
 #include <LibWeb/Page/Frame.h>
 
-#include <LibWeb/DOM/Document.h>
-#include <LibWeb/Dump.h>
-#include <LibWeb/Layout/InitialContainingBlockBox.h>
-
-#include "EditEventHandler.h"
-
 namespace Web {
 
 // This method is quite convoluted but this is necessary to make editing feel intuitive.

+ 0 - 2
Userland/Libraries/LibWeb/Page/EventHandler.cpp

@@ -26,8 +26,6 @@
 
 #include <LibGUI/Event.h>
 #include <LibGUI/Window.h>
-#include <LibJS/Runtime/Value.h>
-#include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Range.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>

+ 0 - 1
Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp

@@ -26,7 +26,6 @@
 
 #include <LibJS/Runtime/Function.h>
 #include <LibWeb/Bindings/EventWrapper.h>
-#include <LibWeb/Bindings/EventWrapperFactory.h>
 #include <LibWeb/Bindings/XMLHttpRequestWrapper.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Event.h>