Title: [278534] trunk/Source/WebCore
Revision
278534
Author
[email protected]
Date
2021-06-06 07:41:05 -0700 (Sun, 06 Jun 2021)

Log Message

Rename InlineElementBox to LegacyInlineElementBox
https://bugs.webkit.org/show_bug.cgi?id=226695

Reviewed by Sam Weinig.

Also EllipsisBox -> LegacyEllipsisBox.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
* dom/Position.cpp:
* layout/integration/LayoutIntegrationRunIterator.h:
* rendering/LegacyEllipsisBox.cpp: Renamed from Source/WebCore/rendering/EllipsisBox.cpp.
(WebCore::LegacyEllipsisBox::LegacyEllipsisBox):
(WebCore::LegacyEllipsisBox::paint):
(WebCore::LegacyEllipsisBox::markupBox const):
(WebCore::LegacyEllipsisBox::paintMarkupBox):
(WebCore::LegacyEllipsisBox::selectionRect):
(WebCore::LegacyEllipsisBox::paintSelection):
(WebCore::LegacyEllipsisBox::nodeAtPoint):
* rendering/LegacyEllipsisBox.h: Renamed from Source/WebCore/rendering/EllipsisBox.h.
* rendering/LegacyInlineElementBox.cpp: Renamed from Source/WebCore/rendering/InlineElementBox.cpp.
(WebCore::LegacyInlineElementBox::deleteLine):
(WebCore::LegacyInlineElementBox::extractLine):
(WebCore::LegacyInlineElementBox::attachLine):
(WebCore::LegacyInlineElementBox::paint):
(WebCore::LegacyInlineElementBox::nodeAtPoint):
* rendering/LegacyInlineElementBox.h: Renamed from Source/WebCore/rendering/InlineElementBox.h.
(WebCore::LegacyInlineElementBox::LegacyInlineElementBox):
* rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::nodeAtPoint):
* rendering/LegacyInlineTextBox.cpp:
(WebCore::LegacyInlineTextBox::selectionState):
* rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):
* rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::placeEllipsis):
(WebCore::LegacyRootInlineBox::ellipsisBox const):
* rendering/LegacyRootInlineBox.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::createInlineBox):
(WebCore::RenderBox::positionLineBox):
* rendering/RenderBox.h:
(WebCore::RenderBox::inlineBoxWrapper const):
(WebCore::RenderBox::setInlineBoxWrapper):
* rendering/RenderFragmentedFlow.cpp:
(WebCore::RenderFragmentedFlow::computedFragmentRangeForBox const):
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLineBoxList.cpp:
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::createInlineBox):
(WebCore::RenderLineBreak::setInlineBoxWrapper):
(WebCore::RenderLineBreak::replaceInlineBoxWrapper):
* rendering/RenderLineBreak.h:
* rendering/RenderListItem.cpp:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::createInlineBox):
* rendering/RenderListMarker.h:
* rendering/RenderReplaced.cpp:
* rendering/RenderText.cpp:
* rendering/RenderTextLineBoxes.cpp:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (278533 => 278534)


--- trunk/Source/WebCore/ChangeLog	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/ChangeLog	2021-06-06 14:41:05 UTC (rev 278534)
@@ -1,3 +1,70 @@
+2021-06-06  Antti Koivisto  <[email protected]>
+
+        Rename InlineElementBox to LegacyInlineElementBox
+        https://bugs.webkit.org/show_bug.cgi?id=226695
+
+        Reviewed by Sam Weinig.
+
+        Also EllipsisBox -> LegacyEllipsisBox.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * accessibility/AXObjectCache.cpp:
+        * dom/Position.cpp:
+        * layout/integration/LayoutIntegrationRunIterator.h:
+        * rendering/LegacyEllipsisBox.cpp: Renamed from Source/WebCore/rendering/EllipsisBox.cpp.
+        (WebCore::LegacyEllipsisBox::LegacyEllipsisBox):
+        (WebCore::LegacyEllipsisBox::paint):
+        (WebCore::LegacyEllipsisBox::markupBox const):
+        (WebCore::LegacyEllipsisBox::paintMarkupBox):
+        (WebCore::LegacyEllipsisBox::selectionRect):
+        (WebCore::LegacyEllipsisBox::paintSelection):
+        (WebCore::LegacyEllipsisBox::nodeAtPoint):
+        * rendering/LegacyEllipsisBox.h: Renamed from Source/WebCore/rendering/EllipsisBox.h.
+        * rendering/LegacyInlineElementBox.cpp: Renamed from Source/WebCore/rendering/InlineElementBox.cpp.
+        (WebCore::LegacyInlineElementBox::deleteLine):
+        (WebCore::LegacyInlineElementBox::extractLine):
+        (WebCore::LegacyInlineElementBox::attachLine):
+        (WebCore::LegacyInlineElementBox::paint):
+        (WebCore::LegacyInlineElementBox::nodeAtPoint):
+        * rendering/LegacyInlineElementBox.h: Renamed from Source/WebCore/rendering/InlineElementBox.h.
+        (WebCore::LegacyInlineElementBox::LegacyInlineElementBox):
+        * rendering/LegacyInlineFlowBox.cpp:
+        (WebCore::LegacyInlineFlowBox::nodeAtPoint):
+        * rendering/LegacyInlineTextBox.cpp:
+        (WebCore::LegacyInlineTextBox::selectionState):
+        * rendering/LegacyLineLayout.cpp:
+        (WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):
+        * rendering/LegacyRootInlineBox.cpp:
+        (WebCore::LegacyRootInlineBox::placeEllipsis):
+        (WebCore::LegacyRootInlineBox::ellipsisBox const):
+        * rendering/LegacyRootInlineBox.h:
+        * rendering/RenderBlock.cpp:
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::createInlineBox):
+        (WebCore::RenderBox::positionLineBox):
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::inlineBoxWrapper const):
+        (WebCore::RenderBox::setInlineBoxWrapper):
+        * rendering/RenderFragmentedFlow.cpp:
+        (WebCore::RenderFragmentedFlow::computedFragmentRangeForBox const):
+        * rendering/RenderImage.cpp:
+        * rendering/RenderInline.cpp:
+        * rendering/RenderLineBoxList.cpp:
+        * rendering/RenderLineBreak.cpp:
+        (WebCore::RenderLineBreak::createInlineBox):
+        (WebCore::RenderLineBreak::setInlineBoxWrapper):
+        (WebCore::RenderLineBreak::replaceInlineBoxWrapper):
+        * rendering/RenderLineBreak.h:
+        * rendering/RenderListItem.cpp:
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::createInlineBox):
+        * rendering/RenderListMarker.h:
+        * rendering/RenderReplaced.cpp:
+        * rendering/RenderText.cpp:
+        * rendering/RenderTextLineBoxes.cpp:
+
 2021-06-05  Chris Dumez  <[email protected]>
 
         Fix repeated call to String::utf8() in SQLiteFileSystem::computeHashForFileName()

Modified: trunk/Source/WebCore/Headers.cmake (278533 => 278534)


--- trunk/Source/WebCore/Headers.cmake	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/Headers.cmake	2021-06-06 14:41:05 UTC (rev 278534)
@@ -1525,10 +1525,10 @@
     rendering/HitTestLocation.h
     rendering/HitTestRequest.h
     rendering/HitTestResult.h
-    rendering/InlineElementBox.h
     rendering/LayerAncestorClippingStack.h
     rendering/LayerFragment.h
     rendering/LegacyInlineBox.h
+    rendering/LegacyInlineElementBox.h
     rendering/LegacyInlineFlowBox.h
     rendering/LegacyInlineTextBox.h
     rendering/LegacyLineLayout.h

Modified: trunk/Source/WebCore/Sources.txt (278533 => 278534)


--- trunk/Source/WebCore/Sources.txt	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/Sources.txt	2021-06-06 14:41:05 UTC (rev 278534)
@@ -2240,7 +2240,6 @@
 rendering/ClipRect.cpp
 rendering/ContentfulPaintChecker.cpp
 rendering/CounterNode.cpp
-rendering/EllipsisBox.cpp
 rendering/EventRegion.cpp
 rendering/FixedTableLayout.cpp
 rendering/FlexibleBoxAlgorithm.cpp
@@ -2254,13 +2253,14 @@
 rendering/HitTestResult.cpp
 rendering/HitTestingTransformState.cpp
 rendering/ImageQualityController.cpp
-rendering/InlineElementBox.cpp
 rendering/InlineIterator.cpp
 rendering/LayerAncestorClippingStack.cpp
 rendering/LayerOverlapMap.cpp
 rendering/LayoutDisallowedScope.cpp
 rendering/LayoutRepainter.cpp
+rendering/LegacyEllipsisBox.cpp
 rendering/LegacyInlineBox.cpp
+rendering/LegacyInlineElementBox.cpp
 rendering/LegacyInlineFlowBox.cpp
 rendering/LegacyLineLayout.cpp
 rendering/LegacyRootInlineBox.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (278533 => 278534)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-06-06 14:41:05 UTC (rev 278534)
@@ -3576,7 +3576,7 @@
 		A8CFF5E10A155A05000A4234 /* LegacyRootInlineBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF5DA0A155A05000A4234 /* LegacyRootInlineBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A8CFF5E30A155A05000A4234 /* LegacyInlineFlowBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF5DC0A155A05000A4234 /* LegacyInlineFlowBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A8CFF5E50A155A05000A4234 /* LegacyInlineBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF5DE0A155A05000A4234 /* LegacyInlineBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		A8CFF6BE0A156118000A4234 /* EllipsisBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF6BD0A156118000A4234 /* EllipsisBox.h */; };
+		A8CFF6BE0A156118000A4234 /* LegacyEllipsisBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF6BD0A156118000A4234 /* LegacyEllipsisBox.h */; };
 		A8CFF7A30A156978000A4234 /* HTMLQuoteElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF7990A156978000A4234 /* HTMLQuoteElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A8CFF7A60A156978000A4234 /* HTMLFontElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF79C0A156978000A4234 /* HTMLFontElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A8CFF7A70A156978000A4234 /* HTMLModElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF79D0A156978000A4234 /* HTMLModElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3952,7 +3952,7 @@
 		B562DB6017D3CD630010AF96 /* HTMLElementTypeHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = B562DB5E17D3CD560010AF96 /* HTMLElementTypeHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B562DB6117D3CD660010AF96 /* SVGElementTypeHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = B562DB5F17D3CD560010AF96 /* SVGElementTypeHelpers.h */; };
 		B56579B51824D12A00E79F23 /* RenderChildIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = B56579B41824D12A00E79F23 /* RenderChildIterator.h */; };
-		B57CB52E182A3EFC0079A647 /* InlineElementBox.h in Headers */ = {isa = PBXBuildFile; fileRef = B57CB52B182A37F60079A647 /* InlineElementBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		B57CB52E182A3EFC0079A647 /* LegacyInlineElementBox.h in Headers */ = {isa = PBXBuildFile; fileRef = B57CB52B182A37F60079A647 /* LegacyInlineElementBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B595FF471824CEE300FF51CD /* RenderIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = B595FF461824CEE300FF51CD /* RenderIterator.h */; };
 		B59DD699119029E5007E9684 /* JSDatabaseCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B59DD697119029E5007E9684 /* JSDatabaseCallback.h */; };
 		B59DD69D11902A42007E9684 /* JSSQLTransactionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B59DD69B11902A42007E9684 /* JSSQLTransactionCallback.h */; };
@@ -13164,8 +13164,8 @@
 		A8CFF5DE0A155A05000A4234 /* LegacyInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LegacyInlineBox.h; sourceTree = "<group>"; };
 		A8CFF5DF0A155A05000A4234 /* LegacyInlineBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyInlineBox.cpp; sourceTree = "<group>"; };
 		A8CFF5E00A155A05000A4234 /* LegacyRootInlineBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyRootInlineBox.cpp; sourceTree = "<group>"; };
-		A8CFF6BD0A156118000A4234 /* EllipsisBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EllipsisBox.h; sourceTree = "<group>"; };
-		A8CFF6CA0A1561CD000A4234 /* EllipsisBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EllipsisBox.cpp; sourceTree = "<group>"; };
+		A8CFF6BD0A156118000A4234 /* LegacyEllipsisBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LegacyEllipsisBox.h; sourceTree = "<group>"; };
+		A8CFF6CA0A1561CD000A4234 /* LegacyEllipsisBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyEllipsisBox.cpp; sourceTree = "<group>"; };
 		A8CFF7980A156978000A4234 /* HTMLFontElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFontElement.cpp; sourceTree = "<group>"; };
 		A8CFF7990A156978000A4234 /* HTMLQuoteElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLQuoteElement.h; sourceTree = "<group>"; };
 		A8CFF79A0A156978000A4234 /* HTMLAnchorElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLAnchorElement.cpp; sourceTree = "<group>"; };
@@ -14064,8 +14064,8 @@
 		B562DB5F17D3CD560010AF96 /* SVGElementTypeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SVGElementTypeHelpers.h; path = DerivedSources/WebCore/SVGElementTypeHelpers.h; sourceTree = BUILT_PRODUCTS_DIR; };
 		B56576E417DA599F00A56BDC /* JSExecStateInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExecStateInstrumentation.h; sourceTree = "<group>"; };
 		B56579B41824D12A00E79F23 /* RenderChildIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderChildIterator.h; sourceTree = "<group>"; };
-		B57CB52B182A37F60079A647 /* InlineElementBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineElementBox.h; sourceTree = "<group>"; };
-		B57CB52C182A3EED0079A647 /* InlineElementBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineElementBox.cpp; sourceTree = "<group>"; };
+		B57CB52B182A37F60079A647 /* LegacyInlineElementBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyInlineElementBox.h; sourceTree = "<group>"; };
+		B57CB52C182A3EED0079A647 /* LegacyInlineElementBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyInlineElementBox.cpp; sourceTree = "<group>"; };
 		B595FF461824CEE300FF51CD /* RenderIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderIterator.h; sourceTree = "<group>"; };
 		B59CA59AF170D8FAA5B8C9AD /* MathMLScriptsElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLScriptsElement.cpp; sourceTree = "<group>"; };
 		B59CA59AF170D8FAA5B8CABE /* MathMLPaddedElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLPaddedElement.cpp; sourceTree = "<group>"; };
@@ -30155,8 +30155,6 @@
 				0F53FB81213B1BB800C40D34 /* CSSFilter.cpp */,
 				0F53FB83213B1BB800C40D34 /* CSSFilter.h */,
 				E3BBC2452383551A006EC39F /* CSSValueKey.h */,
-				A8CFF6CA0A1561CD000A4234 /* EllipsisBox.cpp */,
-				A8CFF6BD0A156118000A4234 /* EllipsisBox.h */,
 				E4A8D21522578DA000A8463C /* EventRegion.cpp */,
 				E4A8D21422578DA000A8463C /* EventRegion.h */,
 				A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */,
@@ -30186,8 +30184,6 @@
 				9307F1D60AF2D59000DBA31A /* HitTestResult.h */,
 				B51A2F4017D7D5DA0072517A /* ImageQualityController.cpp */,
 				B51A2F3E17D7D3A40072517A /* ImageQualityController.h */,
-				B57CB52C182A3EED0079A647 /* InlineElementBox.cpp */,
-				B57CB52B182A37F60079A647 /* InlineElementBox.h */,
 				930C90DC19CF965300D6C21A /* InlineIterator.cpp */,
 				BCE789151120D6080060ECE5 /* InlineIterator.h */,
 				0FEC120B22BF2CC7004E9D35 /* LayerAncestorClippingStack.cpp */,
@@ -30199,8 +30195,12 @@
 				9BD1F6801F0462B8001C9CDD /* LayoutDisallowedScope.h */,
 				A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */,
 				A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */,
+				A8CFF6CA0A1561CD000A4234 /* LegacyEllipsisBox.cpp */,
+				A8CFF6BD0A156118000A4234 /* LegacyEllipsisBox.h */,
 				A8CFF5DF0A155A05000A4234 /* LegacyInlineBox.cpp */,
 				A8CFF5DE0A155A05000A4234 /* LegacyInlineBox.h */,
+				B57CB52C182A3EED0079A647 /* LegacyInlineElementBox.cpp */,
+				B57CB52B182A37F60079A647 /* LegacyInlineElementBox.h */,
 				A8CFF5DD0A155A05000A4234 /* LegacyInlineFlowBox.cpp */,
 				A8CFF5DC0A155A05000A4234 /* LegacyInlineFlowBox.h */,
 				BCEA481A097D93020094C9E4 /* LegacyInlineTextBox.cpp */,
@@ -32564,7 +32564,7 @@
 				63F5D4F70E8C4B7100C0BD04 /* ElementRareData.h in Headers */,
 				FBDB619F16D6036500BB3394 /* ElementRuleCollector.h in Headers */,
 				E4D58EBB17B8F12800CBDCA8 /* ElementTraversal.h in Headers */,
-				A8CFF6BE0A156118000A4234 /* EllipsisBox.h in Headers */,
+				A8CFF6BE0A156118000A4234 /* LegacyEllipsisBox.h in Headers */,
 				F55B3DBC1251F12D003EF269 /* EmailInputType.h in Headers */,
 				B25599A50D00D8BA00BB825C /* EmptyClients.h in Headers */,
 				414DEDE71F9FE91E0047C40D /* EmptyFrameLoaderClient.h in Headers */,
@@ -33139,7 +33139,7 @@
 				CD063F831E23FA8900812BE3 /* InitDataRegistry.h in Headers */,
 				E30592641E27A3AD00D57C98 /* InlineClassicScript.h in Headers */,
 				6FE198172178397C00446F08 /* InlineContentBreaker.h in Headers */,
-				B57CB52E182A3EFC0079A647 /* InlineElementBox.h in Headers */,
+				B57CB52E182A3EFC0079A647 /* LegacyInlineElementBox.h in Headers */,
 				6F7CA3CA208C2B2E002F29AB /* InlineFormattingContext.h in Headers */,
 				47C4D57D26508BCB00C7AB1F /* InlineFormattingGeometry.h in Headers */,
 				6FE636E82647962900F0951E /* InlineFormattingQuirks.h in Headers */,

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (278533 => 278534)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -84,7 +84,6 @@
 #include "HTMLParserIdioms.h"
 #include "HTMLSelectElement.h"
 #include "HTMLTextFormControlElement.h"
-#include "InlineElementBox.h"
 #include "InlineRunAndOffset.h"
 #include "MathMLElement.h"
 #include "Page.h"

Modified: trunk/Source/WebCore/dom/Position.cpp (278533 => 278534)


--- trunk/Source/WebCore/dom/Position.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/dom/Position.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -35,7 +35,6 @@
 #include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
 #include "HTMLTableElement.h"
-#include "InlineElementBox.h"
 #include "InlineIterator.h"
 #include "InlineRunAndOffset.h"
 #include "LayoutIntegrationLineIterator.h"

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.h (278533 => 278534)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -25,9 +25,9 @@
 
 #pragma once
 
-#include "InlineElementBox.h"
 #include "LayoutIntegrationRunIteratorLegacyPath.h"
 #include "LayoutIntegrationRunIteratorModernPath.h"
+#include "LegacyInlineElementBox.h"
 #include <wtf/Variant.h>
 
 namespace WebCore {

Deleted: trunk/Source/WebCore/rendering/EllipsisBox.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/EllipsisBox.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/EllipsisBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -1,173 +0,0 @@
-/**
- * Copyright (C) 2003, 2006 Apple Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "EllipsisBox.h"
-
-#include "Document.h"
-#include "FontCascade.h"
-#include "GraphicsContext.h"
-#include "HitTestResult.h"
-#include "LegacyInlineTextBox.h"
-#include "LegacyRootInlineBox.h"
-#include "PaintInfo.h"
-#include "TextRun.h"
-#include <wtf/IsoMallocInlines.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(EllipsisBox);
-
-EllipsisBox::EllipsisBox(RenderBlockFlow& renderer, const AtomString& ellipsisStr, LegacyInlineFlowBox* parent, int width, int height, int y, bool firstLine, bool isHorizontal, LegacyInlineBox* markupBox)
-    : InlineElementBox(renderer, FloatPoint(0, y), width, firstLine, true, false, false, isHorizontal, 0, 0, parent)
-    , m_shouldPaintMarkupBox(markupBox)
-    , m_height(height)
-    , m_str(ellipsisStr)
-{
-#if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
-    m_isEverInChildList = false;
-#endif
-}
-
-void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
-{
-    GraphicsContext& context = paintInfo.context();
-    const RenderStyle& lineStyle = this->lineStyle();
-    Color textColor = lineStyle.visitedDependentColorWithColorFilter(CSSPropertyWebkitTextFillColor);
-    if (textColor != context.fillColor())
-        context.setFillColor(textColor);
-    bool setShadow = false;
-    if (lineStyle.textShadow()) {
-        Color shadowColor = lineStyle.colorByApplyingColorFilter(lineStyle.textShadow()->color());
-        context.setShadow(LayoutSize(lineStyle.textShadow()->x(), lineStyle.textShadow()->y()), lineStyle.textShadow()->radius(), shadowColor);
-        setShadow = true;
-    }
-
-    const FontCascade& font = lineStyle.fontCascade();
-    if (selectionState() != RenderObject::HighlightState::None) {
-        paintSelection(context, paintOffset, lineStyle, font);
-
-        // Select the correct color for painting the text.
-        Color foreground = paintInfo.forceTextColor() ? paintInfo.forcedTextColor() : blockFlow().selectionForegroundColor();
-        if (foreground.isValid() && foreground != textColor)
-            context.setFillColor(foreground);
-    }
-
-    // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
-    context.drawText(font, RenderBlock::constructTextRun(m_str, lineStyle, AllowRightExpansion), LayoutPoint(x() + paintOffset.x(), y() + paintOffset.y() + lineStyle.fontMetrics().ascent()));
-
-    // Restore the regular fill color.
-    if (textColor != context.fillColor())
-        context.setFillColor(textColor);
-
-    if (setShadow)
-        context.clearShadow();
-
-    paintMarkupBox(paintInfo, paintOffset, lineTop, lineBottom, lineStyle);
-}
-
-LegacyInlineBox* EllipsisBox::markupBox() const
-{
-    if (!m_shouldPaintMarkupBox)
-        return 0;
-
-    LegacyRootInlineBox* lastLine = blockFlow().lastRootBox();
-    if (!lastLine)
-        return 0;
-
-    // If the last line-box on the last line of a block is a link, -webkit-line-clamp paints that box after the ellipsis.
-    // It does not actually move the link.
-    LegacyInlineBox* anchorBox = lastLine->lastChild();
-    if (!anchorBox || !anchorBox->renderer().style().isLink())
-        return 0;
-
-    return anchorBox;
-}
-
-void EllipsisBox::paintMarkupBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, const RenderStyle& style)
-{
-    LegacyInlineBox* markupBox = this->markupBox();
-    if (!markupBox)
-        return;
-
-    LayoutPoint adjustedPaintOffset = paintOffset;
-    adjustedPaintOffset.move(x() + logicalWidth() - markupBox->x(),
-        y() + style.fontMetrics().ascent() - (markupBox->y() + markupBox->lineStyle().fontMetrics().ascent()));
-    markupBox->paint(paintInfo, adjustedPaintOffset, lineTop, lineBottom);
-}
-
-IntRect EllipsisBox::selectionRect()
-{
-    const RenderStyle& lineStyle = this->lineStyle();
-    const FontCascade& font = lineStyle.fontCascade();
-    const LegacyRootInlineBox& rootBox = root();
-    // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
-    LayoutRect selectionRect { LayoutUnit(x()), LayoutUnit(y() + rootBox.selectionTopAdjustedForPrecedingBlock()), 0_lu, rootBox.selectionHeightAdjustedForPrecedingBlock() };
-    font.adjustSelectionRectForText(RenderBlock::constructTextRun(m_str, lineStyle, AllowRightExpansion), selectionRect);
-    // FIXME: use directional pixel snapping instead.
-    return enclosingIntRect(selectionRect);
-}
-
-void EllipsisBox::paintSelection(GraphicsContext& context, const LayoutPoint& paintOffset, const RenderStyle& style, const FontCascade& font)
-{
-    Color textColor = style.visitedDependentColorWithColorFilter(CSSPropertyColor);
-    Color c = blockFlow().selectionBackgroundColor();
-    if (!c.isVisible())
-        return;
-
-    // If the text color ends up being the same as the selection background, invert the selection
-    // background.
-    if (textColor == c)
-        c = c.invertedColorWithAlpha(1.0);
-
-    const LegacyRootInlineBox& rootBox = root();
-    GraphicsContextStateSaver stateSaver(context);
-    // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
-    LayoutRect selectionRect { LayoutUnit(x() + paintOffset.x()), LayoutUnit(y() + paintOffset.y() + rootBox.selectionTop()), 0_lu, rootBox.selectionHeight() };
-    TextRun run = RenderBlock::constructTextRun(m_str, style, AllowRightExpansion);
-    font.adjustSelectionRectForText(run, selectionRect);
-    context.fillRect(snapRectToDevicePixelsWithWritingDirection(selectionRect, renderer().document().deviceScaleFactor(), run.ltr()), c);
-}
-
-bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction hitTestAction)
-{
-    LayoutPoint adjustedLocation = accumulatedOffset + LayoutPoint(topLeft());
-
-    // Hit test the markup box.
-    if (LegacyInlineBox* markupBox = this->markupBox()) {
-        const RenderStyle& lineStyle = this->lineStyle();
-        LayoutUnit mtx { adjustedLocation.x() + logicalWidth() - markupBox->x() };
-        LayoutUnit mty { adjustedLocation.y() + lineStyle.fontMetrics().ascent() - (markupBox->y() + markupBox->lineStyle().fontMetrics().ascent()) };
-        if (markupBox->nodeAtPoint(request, result, locationInContainer, LayoutPoint(mtx, mty), lineTop, lineBottom, hitTestAction)) {
-            blockFlow().updateHitTestResult(result, locationInContainer.point() - LayoutSize(mtx, mty));
-            return true;
-        }
-    }
-
-    LayoutRect boundsRect { adjustedLocation, LayoutSize(LayoutUnit(logicalWidth()), m_height) };
-    if (visibleToHitTesting(request) && boundsRect.intersects(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0))) {
-        blockFlow().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
-        if (result.addNodeToListBasedTestResult(blockFlow().nodeForHitTest(), request, locationInContainer, boundsRect) == HitTestProgress::Stop)
-            return true;
-    }
-
-    return false;
-}
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/rendering/EllipsisBox.h (278533 => 278534)


--- trunk/Source/WebCore/rendering/EllipsisBox.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/EllipsisBox.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -1,54 +0,0 @@
-/**
- * Copyright (C) 2003, 2006 Apple Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "InlineElementBox.h"
-#include "RenderBlockFlow.h"
-
-namespace WebCore {
-
-class HitTestRequest;
-class HitTestResult;
-
-class EllipsisBox final : public InlineElementBox {
-    WTF_MAKE_ISO_ALLOCATED(EllipsisBox);
-public:
-    EllipsisBox(RenderBlockFlow&, const AtomString& ellipsisStr, LegacyInlineFlowBox* parent, int width, int height, int y, bool firstLine, bool isHorizontal, LegacyInlineBox* markupBox);
-    void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
-    bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) final;
-    void setSelectionState(RenderObject::HighlightState s) { m_selectionState = s; }
-    IntRect selectionRect();
-
-    RenderBlockFlow& blockFlow() const { return downcast<RenderBlockFlow>(LegacyInlineBox::renderer()); }
-
-private:
-    void paintMarkupBox(PaintInfo&, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, const RenderStyle&);
-    int height() const { return m_height; }
-    RenderObject::HighlightState selectionState() override { return m_selectionState; }
-    void paintSelection(GraphicsContext&, const LayoutPoint&, const RenderStyle&, const FontCascade&);
-    LegacyInlineBox* markupBox() const;
-
-    bool m_shouldPaintMarkupBox;
-    RenderObject::HighlightState m_selectionState { RenderObject::HighlightState::None };
-    int m_height;
-    AtomString m_str;
-};
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/rendering/InlineElementBox.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/InlineElementBox.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/InlineElementBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2013 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 "InlineElementBox.h"
-
-#include "LegacyInlineFlowBox.h"
-#include "PaintInfo.h"
-#include "RenderBlock.h"
-#include "RenderBox.h"
-#include "RenderLineBreak.h"
-#include <wtf/IsoMallocInlines.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(InlineElementBox);
-
-void InlineElementBox::deleteLine()
-{
-    if (!extracted()) {
-        if (is<RenderBox>(renderer()))
-            downcast<RenderBox>(renderer()).setInlineBoxWrapper(nullptr);
-        else if (is<RenderLineBreak>(renderer()))
-            downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(nullptr);
-    }
-    delete this;
-}
-
-void InlineElementBox::extractLine()
-{
-    setExtracted(true);
-    if (is<RenderBox>(renderer()))
-        downcast<RenderBox>(renderer()).setInlineBoxWrapper(nullptr);
-    else if (is<RenderLineBreak>(renderer()))
-        downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(nullptr);
-}
-
-void InlineElementBox::attachLine()
-{
-    setExtracted(false);
-    if (is<RenderBox>(renderer()))
-        downcast<RenderBox>(renderer()).setInlineBoxWrapper(this);
-    else if (is<RenderLineBreak>(renderer()))
-        downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(this);
-}
-
-void InlineElementBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
-{
-    if (!paintInfo.shouldPaintWithinRoot(renderer()))
-        return;
-
-    if (paintInfo.phase != PaintPhase::Foreground && paintInfo.phase != PaintPhase::Selection && paintInfo.phase != PaintPhase::EventRegion)
-        return;
-
-    LayoutPoint childPoint = paintOffset;
-    if (is<RenderBox>(renderer()) && parent()->renderer().style().isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
-        childPoint = renderer().containingBlock()->flipForWritingModeForChild(&downcast<RenderBox>(renderer()), childPoint);
-
-    renderer().paintAsInlineBlock(paintInfo, childPoint);
-}
-
-bool InlineElementBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/,
-    HitTestAction)
-{
-    // Hit test all phases of replaced elements atomically, as though the replaced element established its
-    // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
-    // specification.)
-    LayoutPoint childPoint = accumulatedOffset;
-    if (is<RenderBox>(renderer()) && parent()->renderer().style().isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
-        childPoint = renderer().containingBlock()->flipForWritingModeForChild(&downcast<RenderBox>(renderer()), childPoint);
-
-    return renderer().hitTest(request, result, locationInContainer, childPoint);
-}
-
-}

Deleted: trunk/Source/WebCore/rendering/InlineElementBox.h (278533 => 278534)


--- trunk/Source/WebCore/rendering/InlineElementBox.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/InlineElementBox.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2013 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.
- */
-
-#pragma once
-
-#include "LegacyInlineBox.h"
-
-namespace WebCore {
-
-class InlineElementBox : public LegacyInlineBox {
-    WTF_MAKE_ISO_ALLOCATED(InlineElementBox);
-public:
-    explicit InlineElementBox(RenderBoxModelObject& renderer)
-        : LegacyInlineBox(renderer)
-    {
-    }
-
-    InlineElementBox(RenderObject& renderer, FloatPoint topLeft, float logicalWidth, bool firstLine, bool constructed, bool dirty, bool extracted, bool isHorizontal, LegacyInlineBox* next, LegacyInlineBox* prev, LegacyInlineFlowBox* parent)
-        : LegacyInlineBox(renderer, topLeft, logicalWidth, firstLine, constructed, dirty, extracted, isHorizontal, next, prev, parent)
-    {
-    }
-
-    RenderBoxModelObject& renderer() const { return downcast<RenderBoxModelObject>(LegacyInlineBox::renderer()); }
-
-    void deleteLine() final;
-    void extractLine() final;
-    void attachLine() final;
-
-    void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
-    bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) override;
-
-private:
-    bool isInlineElementBox() const final { return true; }
-};
-
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_INLINE_BOX(InlineElementBox, isInlineElementBox())

Copied: trunk/Source/WebCore/rendering/LegacyEllipsisBox.cpp (from rev 278533, trunk/Source/WebCore/rendering/EllipsisBox.cpp) (0 => 278534)


--- trunk/Source/WebCore/rendering/LegacyEllipsisBox.cpp	                        (rev 0)
+++ trunk/Source/WebCore/rendering/LegacyEllipsisBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -0,0 +1,173 @@
+/**
+ * Copyright (C) 2003, 2006 Apple Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "LegacyEllipsisBox.h"
+
+#include "Document.h"
+#include "FontCascade.h"
+#include "GraphicsContext.h"
+#include "HitTestResult.h"
+#include "LegacyInlineTextBox.h"
+#include "LegacyRootInlineBox.h"
+#include "PaintInfo.h"
+#include "TextRun.h"
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(LegacyEllipsisBox);
+
+LegacyEllipsisBox::LegacyEllipsisBox(RenderBlockFlow& renderer, const AtomString& ellipsisStr, LegacyInlineFlowBox* parent, int width, int height, int y, bool firstLine, bool isHorizontal, LegacyInlineBox* markupBox)
+    : LegacyInlineElementBox(renderer, FloatPoint(0, y), width, firstLine, true, false, false, isHorizontal, 0, 0, parent)
+    , m_shouldPaintMarkupBox(markupBox)
+    , m_height(height)
+    , m_str(ellipsisStr)
+{
+#if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
+    m_isEverInChildList = false;
+#endif
+}
+
+void LegacyEllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
+{
+    GraphicsContext& context = paintInfo.context();
+    const RenderStyle& lineStyle = this->lineStyle();
+    Color textColor = lineStyle.visitedDependentColorWithColorFilter(CSSPropertyWebkitTextFillColor);
+    if (textColor != context.fillColor())
+        context.setFillColor(textColor);
+    bool setShadow = false;
+    if (lineStyle.textShadow()) {
+        Color shadowColor = lineStyle.colorByApplyingColorFilter(lineStyle.textShadow()->color());
+        context.setShadow(LayoutSize(lineStyle.textShadow()->x(), lineStyle.textShadow()->y()), lineStyle.textShadow()->radius(), shadowColor);
+        setShadow = true;
+    }
+
+    const FontCascade& font = lineStyle.fontCascade();
+    if (selectionState() != RenderObject::HighlightState::None) {
+        paintSelection(context, paintOffset, lineStyle, font);
+
+        // Select the correct color for painting the text.
+        Color foreground = paintInfo.forceTextColor() ? paintInfo.forcedTextColor() : blockFlow().selectionForegroundColor();
+        if (foreground.isValid() && foreground != textColor)
+            context.setFillColor(foreground);
+    }
+
+    // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
+    context.drawText(font, RenderBlock::constructTextRun(m_str, lineStyle, AllowRightExpansion), LayoutPoint(x() + paintOffset.x(), y() + paintOffset.y() + lineStyle.fontMetrics().ascent()));
+
+    // Restore the regular fill color.
+    if (textColor != context.fillColor())
+        context.setFillColor(textColor);
+
+    if (setShadow)
+        context.clearShadow();
+
+    paintMarkupBox(paintInfo, paintOffset, lineTop, lineBottom, lineStyle);
+}
+
+LegacyInlineBox* LegacyEllipsisBox::markupBox() const
+{
+    if (!m_shouldPaintMarkupBox)
+        return 0;
+
+    LegacyRootInlineBox* lastLine = blockFlow().lastRootBox();
+    if (!lastLine)
+        return 0;
+
+    // If the last line-box on the last line of a block is a link, -webkit-line-clamp paints that box after the ellipsis.
+    // It does not actually move the link.
+    LegacyInlineBox* anchorBox = lastLine->lastChild();
+    if (!anchorBox || !anchorBox->renderer().style().isLink())
+        return 0;
+
+    return anchorBox;
+}
+
+void LegacyEllipsisBox::paintMarkupBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, const RenderStyle& style)
+{
+    LegacyInlineBox* markupBox = this->markupBox();
+    if (!markupBox)
+        return;
+
+    LayoutPoint adjustedPaintOffset = paintOffset;
+    adjustedPaintOffset.move(x() + logicalWidth() - markupBox->x(),
+        y() + style.fontMetrics().ascent() - (markupBox->y() + markupBox->lineStyle().fontMetrics().ascent()));
+    markupBox->paint(paintInfo, adjustedPaintOffset, lineTop, lineBottom);
+}
+
+IntRect LegacyEllipsisBox::selectionRect()
+{
+    const RenderStyle& lineStyle = this->lineStyle();
+    const FontCascade& font = lineStyle.fontCascade();
+    const LegacyRootInlineBox& rootBox = root();
+    // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
+    LayoutRect selectionRect { LayoutUnit(x()), LayoutUnit(y() + rootBox.selectionTopAdjustedForPrecedingBlock()), 0_lu, rootBox.selectionHeightAdjustedForPrecedingBlock() };
+    font.adjustSelectionRectForText(RenderBlock::constructTextRun(m_str, lineStyle, AllowRightExpansion), selectionRect);
+    // FIXME: use directional pixel snapping instead.
+    return enclosingIntRect(selectionRect);
+}
+
+void LegacyEllipsisBox::paintSelection(GraphicsContext& context, const LayoutPoint& paintOffset, const RenderStyle& style, const FontCascade& font)
+{
+    Color textColor = style.visitedDependentColorWithColorFilter(CSSPropertyColor);
+    Color c = blockFlow().selectionBackgroundColor();
+    if (!c.isVisible())
+        return;
+
+    // If the text color ends up being the same as the selection background, invert the selection
+    // background.
+    if (textColor == c)
+        c = c.invertedColorWithAlpha(1.0);
+
+    const LegacyRootInlineBox& rootBox = root();
+    GraphicsContextStateSaver stateSaver(context);
+    // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
+    LayoutRect selectionRect { LayoutUnit(x() + paintOffset.x()), LayoutUnit(y() + paintOffset.y() + rootBox.selectionTop()), 0_lu, rootBox.selectionHeight() };
+    TextRun run = RenderBlock::constructTextRun(m_str, style, AllowRightExpansion);
+    font.adjustSelectionRectForText(run, selectionRect);
+    context.fillRect(snapRectToDevicePixelsWithWritingDirection(selectionRect, renderer().document().deviceScaleFactor(), run.ltr()), c);
+}
+
+bool LegacyEllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction hitTestAction)
+{
+    LayoutPoint adjustedLocation = accumulatedOffset + LayoutPoint(topLeft());
+
+    // Hit test the markup box.
+    if (LegacyInlineBox* markupBox = this->markupBox()) {
+        const RenderStyle& lineStyle = this->lineStyle();
+        LayoutUnit mtx { adjustedLocation.x() + logicalWidth() - markupBox->x() };
+        LayoutUnit mty { adjustedLocation.y() + lineStyle.fontMetrics().ascent() - (markupBox->y() + markupBox->lineStyle().fontMetrics().ascent()) };
+        if (markupBox->nodeAtPoint(request, result, locationInContainer, LayoutPoint(mtx, mty), lineTop, lineBottom, hitTestAction)) {
+            blockFlow().updateHitTestResult(result, locationInContainer.point() - LayoutSize(mtx, mty));
+            return true;
+        }
+    }
+
+    LayoutRect boundsRect { adjustedLocation, LayoutSize(LayoutUnit(logicalWidth()), m_height) };
+    if (visibleToHitTesting(request) && boundsRect.intersects(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0))) {
+        blockFlow().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
+        if (result.addNodeToListBasedTestResult(blockFlow().nodeForHitTest(), request, locationInContainer, boundsRect) == HitTestProgress::Stop)
+            return true;
+    }
+
+    return false;
+}
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/rendering/LegacyEllipsisBox.h (from rev 278533, trunk/Source/WebCore/rendering/EllipsisBox.h) (0 => 278534)


--- trunk/Source/WebCore/rendering/LegacyEllipsisBox.h	                        (rev 0)
+++ trunk/Source/WebCore/rendering/LegacyEllipsisBox.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -0,0 +1,54 @@
+/**
+ * Copyright (C) 2003, 2006 Apple Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include "LegacyInlineElementBox.h"
+#include "RenderBlockFlow.h"
+
+namespace WebCore {
+
+class HitTestRequest;
+class HitTestResult;
+
+class LegacyEllipsisBox final : public LegacyInlineElementBox {
+    WTF_MAKE_ISO_ALLOCATED(LegacyEllipsisBox);
+public:
+    LegacyEllipsisBox(RenderBlockFlow&, const AtomString& ellipsisStr, LegacyInlineFlowBox* parent, int width, int height, int y, bool firstLine, bool isHorizontal, LegacyInlineBox* markupBox);
+    void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
+    bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) final;
+    void setSelectionState(RenderObject::HighlightState s) { m_selectionState = s; }
+    IntRect selectionRect();
+
+    RenderBlockFlow& blockFlow() const { return downcast<RenderBlockFlow>(LegacyInlineBox::renderer()); }
+
+private:
+    void paintMarkupBox(PaintInfo&, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, const RenderStyle&);
+    int height() const { return m_height; }
+    RenderObject::HighlightState selectionState() override { return m_selectionState; }
+    void paintSelection(GraphicsContext&, const LayoutPoint&, const RenderStyle&, const FontCascade&);
+    LegacyInlineBox* markupBox() const;
+
+    bool m_shouldPaintMarkupBox;
+    RenderObject::HighlightState m_selectionState { RenderObject::HighlightState::None };
+    int m_height;
+    AtomString m_str;
+};
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/rendering/LegacyInlineElementBox.cpp (from rev 278533, trunk/Source/WebCore/rendering/InlineElementBox.cpp) (0 => 278534)


--- trunk/Source/WebCore/rendering/LegacyInlineElementBox.cpp	                        (rev 0)
+++ trunk/Source/WebCore/rendering/LegacyInlineElementBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2013 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 "LegacyInlineElementBox.h"
+
+#include "LegacyInlineFlowBox.h"
+#include "PaintInfo.h"
+#include "RenderBlock.h"
+#include "RenderBox.h"
+#include "RenderLineBreak.h"
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(LegacyInlineElementBox);
+
+void LegacyInlineElementBox::deleteLine()
+{
+    if (!extracted()) {
+        if (is<RenderBox>(renderer()))
+            downcast<RenderBox>(renderer()).setInlineBoxWrapper(nullptr);
+        else if (is<RenderLineBreak>(renderer()))
+            downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(nullptr);
+    }
+    delete this;
+}
+
+void LegacyInlineElementBox::extractLine()
+{
+    setExtracted(true);
+    if (is<RenderBox>(renderer()))
+        downcast<RenderBox>(renderer()).setInlineBoxWrapper(nullptr);
+    else if (is<RenderLineBreak>(renderer()))
+        downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(nullptr);
+}
+
+void LegacyInlineElementBox::attachLine()
+{
+    setExtracted(false);
+    if (is<RenderBox>(renderer()))
+        downcast<RenderBox>(renderer()).setInlineBoxWrapper(this);
+    else if (is<RenderLineBreak>(renderer()))
+        downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(this);
+}
+
+void LegacyInlineElementBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
+{
+    if (!paintInfo.shouldPaintWithinRoot(renderer()))
+        return;
+
+    if (paintInfo.phase != PaintPhase::Foreground && paintInfo.phase != PaintPhase::Selection && paintInfo.phase != PaintPhase::EventRegion)
+        return;
+
+    LayoutPoint childPoint = paintOffset;
+    if (is<RenderBox>(renderer()) && parent()->renderer().style().isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
+        childPoint = renderer().containingBlock()->flipForWritingModeForChild(&downcast<RenderBox>(renderer()), childPoint);
+
+    renderer().paintAsInlineBlock(paintInfo, childPoint);
+}
+
+bool LegacyInlineElementBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/,
+    HitTestAction)
+{
+    // Hit test all phases of replaced elements atomically, as though the replaced element established its
+    // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
+    // specification.)
+    LayoutPoint childPoint = accumulatedOffset;
+    if (is<RenderBox>(renderer()) && parent()->renderer().style().isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
+        childPoint = renderer().containingBlock()->flipForWritingModeForChild(&downcast<RenderBox>(renderer()), childPoint);
+
+    return renderer().hitTest(request, result, locationInContainer, childPoint);
+}
+
+}

Copied: trunk/Source/WebCore/rendering/LegacyInlineElementBox.h (from rev 278533, trunk/Source/WebCore/rendering/InlineElementBox.h) (0 => 278534)


--- trunk/Source/WebCore/rendering/LegacyInlineElementBox.h	                        (rev 0)
+++ trunk/Source/WebCore/rendering/LegacyInlineElementBox.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2013 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.
+ */
+
+#pragma once
+
+#include "LegacyInlineBox.h"
+
+namespace WebCore {
+
+class LegacyInlineElementBox : public LegacyInlineBox {
+    WTF_MAKE_ISO_ALLOCATED(LegacyInlineElementBox);
+public:
+    explicit LegacyInlineElementBox(RenderBoxModelObject& renderer)
+        : LegacyInlineBox(renderer)
+    {
+    }
+
+    LegacyInlineElementBox(RenderObject& renderer, FloatPoint topLeft, float logicalWidth, bool firstLine, bool constructed, bool dirty, bool extracted, bool isHorizontal, LegacyInlineBox* next, LegacyInlineBox* prev, LegacyInlineFlowBox* parent)
+        : LegacyInlineBox(renderer, topLeft, logicalWidth, firstLine, constructed, dirty, extracted, isHorizontal, next, prev, parent)
+    {
+    }
+
+    RenderBoxModelObject& renderer() const { return downcast<RenderBoxModelObject>(LegacyInlineBox::renderer()); }
+
+    void deleteLine() final;
+    void extractLine() final;
+    void attachLine() final;
+
+    void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
+    bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) override;
+
+private:
+    bool isInlineElementBox() const final { return true; }
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_INLINE_BOX(LegacyInlineElementBox, isInlineElementBox())

Modified: trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -22,10 +22,10 @@
 
 #include "CSSPropertyNames.h"
 #include "Document.h"
-#include "EllipsisBox.h"
 #include "FontCascade.h"
 #include "GraphicsContext.h"
 #include "HitTestResult.h"
+#include "LegacyEllipsisBox.h"
 #include "LegacyInlineTextBox.h"
 #include "LegacyRootInlineBox.h"
 #include "RenderBlock.h"
@@ -1136,7 +1136,7 @@
 
     // Do not hittest content beyond the ellipsis box.
     if (isRootInlineBox() && hasEllipsisBox()) {
-        const EllipsisBox* ellipsisBox = root().ellipsisBox();
+        const LegacyEllipsisBox* ellipsisBox = root().ellipsisBox();
         FloatRect boundsRect(frameRect());
 
         if (isHorizontal())

Modified: trunk/Source/WebCore/rendering/LegacyInlineTextBox.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/LegacyInlineTextBox.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/LegacyInlineTextBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -30,16 +30,17 @@
 #include "DocumentMarkerController.h"
 #include "Editor.h"
 #include "ElementRuleCollector.h"
-#include "EllipsisBox.h"
 #include "EventRegion.h"
 #include "FloatRoundedRect.h"
 #include "Frame.h"
 #include "GraphicsContext.h"
+
 #include "HighlightData.h"
 #include "HighlightRegister.h"
 #include "HitTestResult.h"
 #include "ImageBuffer.h"
 #include "InlineTextBoxStyle.h"
+#include "LegacyEllipsisBox.h"
 #include "MarkedTextStyle.h"
 #include "Page.h"
 #include "PaintInfo.h"
@@ -167,7 +168,7 @@
     // https://bugs.webkit.org/show_bug.cgi?id=205528
     // If there are ellipsis following, make sure their selection is updated.
     if (m_truncation != cNoTruncation && root().ellipsisBox()) {
-        EllipsisBox* ellipsis = root().ellipsisBox();
+        LegacyEllipsisBox* ellipsis = root().ellipsisBox();
         if (state != RenderObject::HighlightState::None) {
             auto [selectionStart, selectionEnd] = selectionStartEnd();
             // The ellipsis should be considered to be selected if the end of

Modified: trunk/Source/WebCore/rendering/LegacyLineLayout.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/LegacyLineLayout.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/LegacyLineLayout.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -30,9 +30,9 @@
 #include "BreakingContext.h"
 #include "FloatingObjects.h"
 #include "HTMLParserIdioms.h"
-#include "InlineElementBox.h"
 #include "InlineIterator.h"
 #include "InlineTextBoxStyle.h"
+#include "LegacyInlineElementBox.h"
 #include "LegacyInlineTextBox.h"
 #include "LineLayoutState.h"
 #include "Logging.h"
@@ -1054,10 +1054,10 @@
             downcast<RenderText>(renderer).positionLineBox(inlineTextBox);
             inlineBoxIsRedundant = !inlineTextBox.hasTextContent();
         } else if (is<RenderBox>(renderer)) {
-            downcast<RenderBox>(renderer).positionLineBox(downcast<InlineElementBox>(*run->box()));
+            downcast<RenderBox>(renderer).positionLineBox(downcast<LegacyInlineElementBox>(*run->box()));
             inlineBoxIsRedundant = renderer.isOutOfFlowPositioned();
         } else if (is<RenderLineBreak>(renderer))
-            downcast<RenderLineBreak>(renderer).replaceInlineBoxWrapper(downcast<InlineElementBox>(*run->box()));
+            downcast<RenderLineBreak>(renderer).replaceInlineBoxWrapper(downcast<LegacyInlineElementBox>(*run->box()));
         // Check if we need to keep this box on the line at all.
         if (inlineBoxIsRedundant)
             removeInlineBox(*run, *lineBox);

Modified: trunk/Source/WebCore/rendering/LegacyRootInlineBox.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/LegacyRootInlineBox.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/LegacyRootInlineBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -24,10 +24,10 @@
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "Document.h"
-#include "EllipsisBox.h"
 #include "Frame.h"
 #include "GraphicsContext.h"
 #include "HitTestResult.h"
+#include "LegacyEllipsisBox.h"
 #include "LegacyInlineTextBox.h"
 #include "LogicalSelectionOffsetCaches.h"
 #include "PaintInfo.h"
@@ -56,7 +56,7 @@
 COMPILE_ASSERT(sizeof(WeakPtr<RenderObject>) == sizeof(void*), WeakPtr_should_be_same_size_as_raw_pointer);
 #endif
 
-typedef WTF::HashMap<const LegacyRootInlineBox*, std::unique_ptr<EllipsisBox>> EllipsisBoxMap;
+typedef WTF::HashMap<const LegacyRootInlineBox*, std::unique_ptr<LegacyEllipsisBox>> EllipsisBoxMap;
 static EllipsisBoxMap* gEllipsisBoxMap;
 
 static ContainingFragmentMap& containingFragmentMap(RenderBlockFlow& block)
@@ -133,7 +133,7 @@
         gEllipsisBoxMap = new EllipsisBoxMap();
 
     ASSERT(!hasEllipsisBox());
-    auto* ellipsisBox = gEllipsisBoxMap->set(this, makeUnique<EllipsisBox>(blockFlow(), ellipsisStr, this, ellipsisWidth - (markupBox ? markupBox->logicalWidth() : 0), logicalHeight(), y(), !prevRootBox(), isHorizontal(), markupBox)).iterator->value.get();
+    auto* ellipsisBox = gEllipsisBoxMap->set(this, makeUnique<LegacyEllipsisBox>(blockFlow(), ellipsisStr, this, ellipsisWidth - (markupBox ? markupBox->logicalWidth() : 0), logicalHeight(), y(), !prevRootBox(), isHorizontal(), markupBox)).iterator->value.get();
     setHasEllipsisBox(true);
     // FIXME: Do we need an RTL version of this?
     if (ltr && (x() + logicalWidth() + ellipsisWidth) <= blockRightEdge) {
@@ -725,7 +725,7 @@
     m_lineBreakContext = status.context;
 }
 
-EllipsisBox* LegacyRootInlineBox::ellipsisBox() const
+LegacyEllipsisBox* LegacyRootInlineBox::ellipsisBox() const
 {
     if (!hasEllipsisBox())
         return nullptr;

Modified: trunk/Source/WebCore/rendering/LegacyRootInlineBox.h (278533 => 278534)


--- trunk/Source/WebCore/rendering/LegacyRootInlineBox.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/LegacyRootInlineBox.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -27,8 +27,8 @@
 
 namespace WebCore {
 
-class EllipsisBox;
 class HitTestResult;
+class LegacyEllipsisBox;
 class LogicalSelectionOffsetCaches;
 class RenderBlockFlow;
 class RenderFragmentContainer;
@@ -108,11 +108,11 @@
     bool lineCanAccommodateEllipsis(bool ltr, int blockEdge, int lineBoxEdge, int ellipsisWidth);
     // Return the truncatedWidth, the width of the truncated text + ellipsis.
     float placeEllipsis(const AtomString& ellipsisStr, bool ltr, float blockLeftEdge, float blockRightEdge, float ellipsisWidth, LegacyInlineBox* markupBox = nullptr);
-    // Return the position of the EllipsisBox or -1.
+    // Return the position of the LegacyEllipsisBox or -1.
     float placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRightEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) final;
 
     using LegacyInlineBox::hasEllipsisBox;
-    EllipsisBox* ellipsisBox() const;
+    LegacyEllipsisBox* ellipsisBox() const;
 
     void paintEllipsisBox(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) const;
 

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -39,9 +39,9 @@
 #include "HitTestLocation.h"
 #include "HitTestResult.h"
 #include "ImageBuffer.h"
-#include "InlineElementBox.h"
 #include "InlineIterator.h"
 #include "LayoutRepainter.h"
+#include "LegacyInlineElementBox.h"
 #include "LegacyInlineTextBox.h"
 #include "Logging.h"
 #include "LogicalSelectionOffsetCaches.h"

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -399,7 +399,7 @@
     void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
     void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
 
-    // Public for EllipsisBox
+    // Public for LegacyEllipsisBox
     Node* nodeForHitTest() const override;
 
 protected:

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -47,10 +47,10 @@
 #include "HTMLSelectElement.h"
 #include "HTMLTextAreaElement.h"
 #include "HitTestResult.h"
-#include "InlineElementBox.h"
 #include "InlineRunAndOffset.h"
 #include "LayoutIntegrationLineIterator.h"
 #include "LayoutIntegrationLineLayout.h"
+#include "LegacyInlineElementBox.h"
 #include "Page.h"
 #include "PaintInfo.h"
 #include "RenderBoxFragmentInfo.h"
@@ -2345,9 +2345,9 @@
     return offset;
 }
 
-std::unique_ptr<InlineElementBox> RenderBox::createInlineBox()
+std::unique_ptr<LegacyInlineElementBox> RenderBox::createInlineBox()
 {
-    return makeUnique<InlineElementBox>(*this);
+    return makeUnique<LegacyInlineElementBox>(*this);
 }
 
 void RenderBox::dirtyLineBoxes(bool fullLayout)
@@ -2362,7 +2362,7 @@
         m_inlineBoxWrapper->dirtyLineBoxes();
 }
 
-void RenderBox::positionLineBox(InlineElementBox& box)
+void RenderBox::positionLineBox(LegacyInlineElementBox& box)
 {
     if (isOutOfFlowPositioned()) {
         // Cache the x position only if we were an DisplayType::Inline type originally.

Modified: trunk/Source/WebCore/rendering/RenderBox.h (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderBox.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -31,7 +31,7 @@
 
 namespace WebCore {
 
-class InlineElementBox;
+class LegacyInlineElementBox;
 class RenderBlockFlow;
 class RenderBoxFragmentInfo;
 class RenderFragmentContainer;
@@ -380,16 +380,16 @@
     bool hasFragmentRangeInFragmentedFlow() const;
     virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const;
     
-    void positionLineBox(InlineElementBox&);
+    void positionLineBox(LegacyInlineElementBox&);
 
-    virtual std::unique_ptr<InlineElementBox> createInlineBox();
+    virtual std::unique_ptr<LegacyInlineElementBox> createInlineBox();
     void dirtyLineBoxes(bool fullLayout);
 
     // For inline replaced elements, this function returns the inline box that owns us.  Enables
     // the replaced RenderObject to quickly determine what line it is contained on and to easily
     // iterate over structures on the line.
-    InlineElementBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; }
-    void setInlineBoxWrapper(InlineElementBox*);
+    LegacyInlineElementBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; }
+    void setInlineBoxWrapper(LegacyInlineElementBox*);
     void deleteLineBoxWrapper();
 
     LayoutRect clippedOverflowRect(const RenderLayerModelObject* repaintContainer, VisibleRectContext) const override;
@@ -784,7 +784,7 @@
     LayoutUnit m_maxPreferredLogicalWidth;
 
     // For inline replaced elements, the inline box that owns us.
-    InlineElementBox* m_inlineBoxWrapper { nullptr };
+    LegacyInlineElementBox* m_inlineBoxWrapper { nullptr };
 
     // Our overflow information.
     RefPtr<RenderOverflow> m_overflow;
@@ -839,7 +839,7 @@
     return nullptr;
 }
 
-inline void RenderBox::setInlineBoxWrapper(InlineElementBox* boxWrapper)
+inline void RenderBox::setInlineBoxWrapper(LegacyInlineElementBox* boxWrapper)
 {
     if (boxWrapper) {
         ASSERT(!m_inlineBoxWrapper);

Modified: trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -32,7 +32,7 @@
 
 #include "HitTestRequest.h"
 #include "HitTestResult.h"
-#include "InlineElementBox.h"
+#include "LegacyInlineElementBox.h"
 #include "Node.h"
 #include "RenderBoxFragmentInfo.h"
 #include "RenderFragmentContainer.h"
@@ -647,7 +647,7 @@
     // Search the fragment range using the information provided by the containing block chain.
     auto* containingBlock = const_cast<RenderBox*>(box);
     while (!containingBlock->isRenderFragmentedFlow()) {
-        InlineElementBox* boxWrapper = containingBlock->inlineBoxWrapper();
+        LegacyInlineElementBox* boxWrapper = containingBlock->inlineBoxWrapper();
         if (boxWrapper && boxWrapper->root().containingFragment()) {
             startFragment = endFragment = boxWrapper->root().containingFragment();
             ASSERT(m_fragmentList.contains(startFragment));

Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderImage.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -44,7 +44,6 @@
 #include "HTMLMapElement.h"
 #include "HTMLNames.h"
 #include "HitTestResult.h"
-#include "InlineElementBox.h"
 #include "LayoutIntegrationLineIterator.h"
 #include "LayoutIntegrationRunIterator.h"
 #include "Page.h"

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -28,8 +28,8 @@
 #include "FrameSelection.h"
 #include "GraphicsContext.h"
 #include "HitTestResult.h"
-#include "InlineElementBox.h"
 #include "LayoutIntegrationLineLayout.h"
+#include "LegacyInlineElementBox.h"
 #include "LegacyInlineTextBox.h"
 #include "RenderBlock.h"
 #include "RenderChildIterator.h"

Modified: trunk/Source/WebCore/rendering/RenderLineBoxList.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderLineBoxList.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderLineBoxList.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -30,7 +30,6 @@
 #include "RenderLineBoxList.h"
 
 #include "HitTestResult.h"
-#include "InlineElementBox.h"
 #include "LegacyInlineTextBox.h"
 #include "LegacyRootInlineBox.h"
 #include "PaintInfo.h"

Modified: trunk/Source/WebCore/rendering/RenderLineBreak.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderLineBreak.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -26,10 +26,10 @@
 #include "FontMetrics.h"
 #include "HTMLElement.h"
 #include "HTMLWBRElement.h"
-#include "InlineElementBox.h"
 #include "InlineRunAndOffset.h"
 #include "LayoutIntegrationLineIterator.h"
 #include "LayoutIntegrationRunIterator.h"
+#include "LegacyInlineElementBox.h"
 #include "LegacyRootInlineBox.h"
 #include "LogicalSelectionOffsetCaches.h"
 #include "RenderBlock.h"
@@ -83,18 +83,18 @@
     return LayoutUnit { (fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction, linePositionMode) - fontMetrics.height()) / 2).toInt() };
 }
 
-std::unique_ptr<InlineElementBox> RenderLineBreak::createInlineBox()
+std::unique_ptr<LegacyInlineElementBox> RenderLineBreak::createInlineBox()
 {
-    return makeUnique<InlineElementBox>(*this);
+    return makeUnique<LegacyInlineElementBox>(*this);
 }
 
-void RenderLineBreak::setInlineBoxWrapper(InlineElementBox* inlineBox)
+void RenderLineBreak::setInlineBoxWrapper(LegacyInlineElementBox* inlineBox)
 {
     ASSERT(!inlineBox || !m_inlineBoxWrapper);
     m_inlineBoxWrapper = inlineBox;
 }
 
-void RenderLineBreak::replaceInlineBoxWrapper(InlineElementBox& inlineBox)
+void RenderLineBreak::replaceInlineBoxWrapper(LegacyInlineElementBox& inlineBox)
 {
     deleteInlineBoxWrapper();
     setInlineBoxWrapper(&inlineBox);

Modified: trunk/Source/WebCore/rendering/RenderLineBreak.h (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderLineBreak.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -25,7 +25,7 @@
 
 namespace WebCore {
 
-class InlineElementBox;
+class LegacyInlineElementBox;
 class HTMLElement;
 class Position;
 
@@ -40,11 +40,11 @@
 
     bool isWBR() const final { return m_isWBR; }
 
-    std::unique_ptr<InlineElementBox> createInlineBox();
-    InlineElementBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; }
-    void setInlineBoxWrapper(InlineElementBox*);
+    std::unique_ptr<LegacyInlineElementBox> createInlineBox();
+    LegacyInlineElementBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; }
+    void setInlineBoxWrapper(LegacyInlineElementBox*);
     void deleteInlineBoxWrapper();
-    void replaceInlineBoxWrapper(InlineElementBox&);
+    void replaceInlineBoxWrapper(LegacyInlineElementBox&);
     void dirtyLineBoxes(bool fullLayout);
 
     IntRect linesBoundingBox() const;
@@ -86,7 +86,7 @@
     void updateFromStyle() final;
     bool requiresLayer() const final { return false; }
 
-    InlineElementBox* m_inlineBoxWrapper;
+    LegacyInlineElementBox* m_inlineBoxWrapper;
     mutable int m_cachedLineHeight;
     bool m_isWBR;
 };

Modified: trunk/Source/WebCore/rendering/RenderListItem.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderListItem.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderListItem.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -29,7 +29,6 @@
 #include "HTMLNames.h"
 #include "HTMLOListElement.h"
 #include "HTMLUListElement.h"
-#include "InlineElementBox.h"
 #include "PseudoElement.h"
 #include "RenderStyleConstants.h"
 #include "RenderTreeBuilder.h"

Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderListMarker.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -28,7 +28,7 @@
 #include "Document.h"
 #include "FontCascade.h"
 #include "GraphicsContext.h"
-#include "InlineElementBox.h"
+#include "LegacyInlineElementBox.h"
 #include "RenderLayer.h"
 #include "RenderListItem.h"
 #include "RenderMultiColumnFlow.h"
@@ -1109,7 +1109,7 @@
     }
 }
 
-std::unique_ptr<InlineElementBox> RenderListMarker::createInlineBox()
+std::unique_ptr<LegacyInlineElementBox> RenderListMarker::createInlineBox()
 {
     auto box = RenderBox::createInlineBox();
     box->setBehavesLikeText(isText());

Modified: trunk/Source/WebCore/rendering/RenderListMarker.h (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderListMarker.h	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderListMarker.h	2021-06-06 14:41:05 UTC (rev 278534)
@@ -66,7 +66,7 @@
 
     void imageChanged(WrappedImagePtr, const IntRect* = 0) override;
 
-    std::unique_ptr<InlineElementBox> createInlineBox() override;
+    std::unique_ptr<LegacyInlineElementBox> createInlineBox() override;
 
     LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override;
     LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override;

Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderReplaced.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -34,7 +34,6 @@
 #include "HTMLParserIdioms.h"
 #include "HighlightData.h"
 #include "HighlightRegister.h"
-#include "InlineElementBox.h"
 #include "LayoutIntegrationLineIterator.h"
 #include "LayoutIntegrationRunIterator.h"
 #include "LayoutRepainter.h"

Modified: trunk/Source/WebCore/rendering/RenderText.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderText.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderText.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -30,7 +30,6 @@
 #include "BreakingContext.h"
 #include "CharacterProperties.h"
 #include "DocumentMarkerController.h"
-#include "EllipsisBox.h"
 #include "FloatQuad.h"
 #include "Frame.h"
 #include "FrameView.h"
@@ -40,6 +39,7 @@
 #include "LayoutIntegrationLineIterator.h"
 #include "LayoutIntegrationLineLayout.h"
 #include "LayoutIntegrationRunIterator.h"
+#include "LegacyEllipsisBox.h"
 #include "Range.h"
 #include "RenderBlock.h"
 #include "RenderCombineText.h"

Modified: trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp (278533 => 278534)


--- trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp	2021-06-06 05:27:37 UTC (rev 278533)
+++ trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp	2021-06-06 14:41:05 UTC (rev 278534)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "RenderTextLineBoxes.h"
 
-#include "EllipsisBox.h"
+#include "LegacyEllipsisBox.h"
 #include "LegacyInlineTextBox.h"
 #include "LegacyRootInlineBox.h"
 #include "RenderBlock.h"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to