Don't include ComputedStyle.h where not needed.

Also removed unnecessary inclusions of core/dom/NodeComputedStyle.h

Because of this change, 13 more compilation units no longer include ComputedStyle.h

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I2a647d891c7e0957e7ee0f96ebc6e2face6e0c14
Reviewed-on: https://chromium-review.googlesource.com/553259
Reviewed-by: Rune Lillesveen <rune@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#483324}
diff --git a/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp b/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
index f477e8b..1c2a0e6 100644
--- a/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
@@ -36,7 +36,6 @@
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/dom/Node.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/frame/LocalFrame.h"
 #include "core/frame/LocalFrameView.h"
 
diff --git a/third_party/WebKit/Source/core/animation/EffectInput.cpp b/third_party/WebKit/Source/core/animation/EffectInput.cpp
index cdf120e..67067a33 100644
--- a/third_party/WebKit/Source/core/animation/EffectInput.cpp
+++ b/third_party/WebKit/Source/core/animation/EffectInput.cpp
@@ -41,7 +41,6 @@
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/dom/ExceptionCode.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/frame/FrameConsole.h"
 #include "core/frame/LocalFrame.h"
 #include "core/inspector/ConsoleMessage.h"
diff --git a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
index cbf1578..90503cb 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -9,7 +9,6 @@
 #include "core/css/CSSCustomPropertyDeclaration.h"
 #include "core/css/CSSPropertyMetadata.h"
 #include "core/css/resolver/StyleResolver.h"
-#include "core/style/ComputedStyle.h"
 #include "core/svg/SVGElement.h"
 #include "platform/RuntimeEnabledFeatures.h"
 
diff --git a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
index 625c78bc..7238df68 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
@@ -41,13 +41,11 @@
 #include "core/css/MediaValuesDynamic.h"
 #include "core/css/MediaValuesInitialViewport.h"
 #include "core/css/resolver/MediaQueryResult.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/frame/LocalFrame.h"
 #include "core/frame/LocalFrameView.h"
 #include "core/frame/Settings.h"
 #include "core/frame/UseCounter.h"
 #include "core/probe/CoreProbes.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/geometry/FloatRect.h"
 #include "platform/graphics/ColorSpaceGamut.h"
diff --git a/third_party/WebKit/Source/core/css/MediaValues.cpp b/third_party/WebKit/Source/core/css/MediaValues.cpp
index 125bc46e..1f7d4ee 100644
--- a/third_party/WebKit/Source/core/css/MediaValues.cpp
+++ b/third_party/WebKit/Source/core/css/MediaValues.cpp
@@ -18,7 +18,6 @@
 #include "core/layout/compositing/PaintLayerCompositor.h"
 #include "core/page/ChromeClient.h"
 #include "core/page/Page.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/graphics/ColorSpaceGamut.h"
 #include "public/platform/WebScreenInfo.h"
 
diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.cpp b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
index a5ea8092..f67ca38 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.cpp
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
@@ -33,7 +33,6 @@
 #include "core/css/cssom/InlineStylePropertyMap.h"
 #include "core/dom/ResizeObservation.h"
 #include "core/dom/ResizeObserver.h"
-#include "core/style/ComputedStyle.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversalTest.cpp b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversalTest.cpp
index ca2ca56..70b26e1 100644
--- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversalTest.cpp
+++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversalTest.cpp
@@ -7,7 +7,6 @@
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/dom/Node.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/dom/PseudoElement.h"
 #include "core/layout/LayoutTestHelper.h"
 #include "core/layout/LayoutText.h"
diff --git a/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp b/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp
index 68ebc47..83d5208f 100644
--- a/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp
+++ b/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp
@@ -39,7 +39,6 @@
 #include "core/layout/LayoutEmbeddedContent.h"
 #include "core/layout/LayoutObject.h"
 #include "core/layout/LayoutView.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/geometry/FloatPoint.h"
 #include "platform/geometry/FloatQuad.h"
 #include "platform/geometry/IntPoint.h"
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
index aa32140..5ec4a201 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -35,7 +35,6 @@
 #include "core/dom/Document.h"
 #include "core/dom/DocumentFragment.h"
 #include "core/dom/Element.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/dom/Text.h"
 #include "core/editing/EditingStyle.h"
 #include "core/editing/EditingUtilities.h"
diff --git a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
index 22a2799..1fad4a3 100644
--- a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
@@ -35,7 +35,6 @@
 #include "core/frame/UseCounter.h"
 #include "core/html/HTMLFormControlElement.h"
 #include "core/html/HTMLFrameOwnerElement.h"
-#include "core/style/ComputedStyle.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
index 4f1149f..3a4be52 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
@@ -26,14 +26,12 @@
 #include "core/html/HTMLOptGroupElement.h"
 
 #include "core/HTMLNames.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/dom/Text.h"
 #include "core/editing/EditingUtilities.h"
 #include "core/html/HTMLContentElement.h"
 #include "core/html/HTMLDivElement.h"
 #include "core/html/HTMLSelectElement.h"
 #include "core/html/shadow/ShadowElementNames.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/wtf/StdLibExtras.h"
 #include "platform/wtf/text/CharacterNames.h"
 
diff --git a/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp b/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp
index f3450db..40e74a2 100644
--- a/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp
@@ -27,7 +27,6 @@
 #include "core/dom/ChildListMutationScope.h"
 #include "core/dom/Document.h"
 #include "core/dom/Text.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/wtf/AutoReset.h"
 #include "platform/wtf/text/StringBuilder.h"
 
diff --git a/third_party/WebKit/Source/core/html/forms/ExternalPopupMenuTest.cpp b/third_party/WebKit/Source/core/html/forms/ExternalPopupMenuTest.cpp
index 87cec8fb..d3a098f2 100644
--- a/third_party/WebKit/Source/core/html/forms/ExternalPopupMenuTest.cpp
+++ b/third_party/WebKit/Source/core/html/forms/ExternalPopupMenuTest.cpp
@@ -6,7 +6,6 @@
 
 #include <memory>
 #include "core/HTMLNames.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/frame/FrameTestHelpers.h"
 #include "core/frame/VisualViewport.h"
 #include "core/frame/WebLocalFrameBase.h"
diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
index cf5fc5a..5298f3e 100644
--- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
@@ -33,7 +33,6 @@
 
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/HTMLNames.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/editing/FrameSelection.h"
 #include "core/events/BeforeTextInsertedEvent.h"
diff --git a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
index c0a70f3..8d2ea53 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
@@ -21,7 +21,6 @@
 #include "core/css/CSSStyleRule.h"
 #include "core/css/resolver/StyleResolver.h"
 #include "core/dom/DOMNodeIds.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/frame/LocalFrame.h"
 #include "core/inspector/InspectedFrames.h"
 #include "core/inspector/InspectorCSSAgent.h"
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h
index 712af18b..d5ae7a3 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h
@@ -6,12 +6,13 @@
 #define NGLayoutInputNode_h
 
 #include "core/CoreExport.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/heap/Handle.h"
 
 namespace blink {
 
+class ComputedStyle;
 class LayoutObject;
+class LayoutBox;
 class NGBreakToken;
 class NGConstraintSpace;
 class NGLayoutResult;
diff --git a/third_party/WebKit/Source/core/layout/shapes/Shape.cpp b/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
index e8fe5da..e092280 100644
--- a/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
+++ b/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
@@ -37,7 +37,6 @@
 #include "core/layout/shapes/PolygonShape.h"
 #include "core/layout/shapes/RasterShape.h"
 #include "core/layout/shapes/RectangleShape.h"
-#include "core/style/ComputedStyle.h"
 #include "core/svg/graphics/SVGImage.h"
 #include "platform/LengthFunctions.h"
 #include "platform/geometry/FloatRoundedRect.h"
diff --git a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
index b39e900..7559406 100644
--- a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
@@ -6,11 +6,9 @@
 
 #include "core/dom/Element.h"
 #include "core/dom/Node.h"
-#include "core/dom/NodeComputedStyle.h"
 #include "core/layout/LayoutBlock.h"
 #include "core/layout/LayoutBox.h"
 #include "core/layout/LayoutView.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/LengthFunctions.h"
 
 namespace blink {
diff --git a/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp b/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
index 437e8d21..7367e716 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
@@ -4,7 +4,6 @@
 
 #include "core/paint/NinePieceImageGrid.h"
 
-#include "core/style/ComputedStyle.h"
 #include "core/style/NinePieceImage.h"
 #include "platform/LengthFunctions.h"
 #include "platform/geometry/FloatSize.h"
diff --git a/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp b/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
index 0a41f77..55a49445 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
@@ -6,7 +6,6 @@
 
 #include "core/css/CSSGradientValue.h"
 #include "core/layout/LayoutTestHelper.h"
-#include "core/style/ComputedStyle.h"
 #include "core/style/NinePieceImage.h"
 #include "core/style/StyleGeneratedImage.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/third_party/WebKit/Source/core/style/BasicShapes.cpp b/third_party/WebKit/Source/core/style/BasicShapes.cpp
index c4124aea..7481d3e 100644
--- a/third_party/WebKit/Source/core/style/BasicShapes.cpp
+++ b/third_party/WebKit/Source/core/style/BasicShapes.cpp
@@ -30,7 +30,6 @@
 #include "core/style/BasicShapes.h"
 
 #include "core/css/BasicShapeFunctions.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/CalculationValue.h"
 #include "platform/LengthFunctions.h"
 #include "platform/geometry/FloatRect.h"