WebKit Bugzilla
Attachment 347731 Details for
Bug 188828
: Spelling dots do not scale with page on iOS; share spelling dot painting code between Mac and iOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188828-20180821165903.patch (text/plain), 55.05 KB, created by
Daniel Bates
on 2018-08-21 16:59:04 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2018-08-21 16:59:04 PDT
Size:
55.05 KB
patch
obsolete
>Subversion Revision: 235007 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8fb28801f4f7777299f1b51ba15ced73ac1bb73f..f271ca28e3854dd30aeb34b39c74656aaf05e62c 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,52 @@ >+2018-08-21 Daniel Bates <dabates@apple.com> >+ >+ Share spelling dot painting code between Mac and iOS >+ https://bugs.webkit.org/show_bug.cgi?id=188828 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The look of the spelling dots on Mac and iOS are identical up to color. Towards making the >+ spelling dots in WebKit on iOS more closely match the look of the spelling dots in UIKit- >+ apps, standardize on using the same painting code for both Mac and iOS. >+ >+ Currently iOS uses bitmaps to render the spelling dots and does not account for user/CSS >+ zooming. As a result, the spelling dots on iOS render with artifacts (e.g. truncated dots). >+ A side benefit of having iOS share the same painting code as Mac is that iOS will now paint >+ the dots programmatically and we avoid both the need to use bitmaps and fix the bugs in >+ the painting of the bitmap dots with respect to zooming. >+ >+ * Resources/DictationPhraseWithAlternativesDot.png: Removed. >+ * Resources/DictationPhraseWithAlternativesDot@2x.png: Removed. >+ * Resources/SpellingDot.png: Removed. >+ * Resources/SpellingDot@2x.png: Removed. >+ * Resources/SpellingDot@3x.png: Removed. >+ * WebCore.xcodeproj/project.pbxproj: >+ * platform/graphics/cocoa/GraphicsContextCocoa.mm: >+ (WebCore::GraphicsContext::drawLineForDocumentMarker): >+ (WebCore::createDotPattern): Deleted. >+ * platform/ios/wak/WKGraphics.mm: >+ (WKRectFill): Incorporated the logic from _FillRectUsingOperation(). >+ (_FillRectUsingOperation): Deleted; moved the logic into WKRectFill() since WKRectFill() >+ is now the only caller of this function. >+ (WKRectFillUsingOperation): Deleted. >+ (imageResourcePath): Deleted. >+ (WKGraphicsCreateImageFromBundleWithName): Deleted. >+ (WKDrawPatternBitmap): Deleted. >+ (WKReleasePatternBitmap): Deleted. >+ (WKSetPattern): Deleted. >+ * platform/ios/wak/WKGraphicsInternal.h: Removed. >+ * rendering/InlineTextBox.cpp: >+ (WebCore::InlineTextBox::paintPlatformDocumentMarker): >+ * rendering/RenderThemeCocoa.h: >+ * rendering/RenderThemeCocoa.mm: >+ (WebCore::colorForStyle): Moved from RenderThemeMac. >+ (WebCore::RenderThemeCocoa::drawLineForDocumentMarker): Moved from RenderThemeMac. I renamed >+ the local variable ctx to context and fixed a type in a comment while moving this code. >+ * rendering/RenderThemeMac.h: >+ * rendering/RenderThemeMac.mm: >+ (WebCore::colorForStyle): Deleted; moved to class RenderThemeCocoa. >+ (WebCore::RenderThemeMac::drawLineForDocumentMarker): Deleted; moved to class RenderThemeCocoa. >+ > 2018-08-17 Aditya Keerthi <akeerthi@apple.com> > > [Datalist][iOS] Display suggestions for input[type=color] >diff --git a/Source/WebCore/Resources/DictationPhraseWithAlternativesDot.png b/Source/WebCore/Resources/DictationPhraseWithAlternativesDot.png >deleted file mode 100644 >index 42e10f8ca667020dddb8be84f968495174385061..0000000000000000000000000000000000000000 >GIT binary patch >literal 0 >HcmV?d00001 > >literal 183 >zcmeAS@N?(olHy`uVBq!ia0vp^EI`c6!3HF^d|7u4NO2Z;L>4nJa0`PlBg3pY5<o$P >zWRD<U28JqC28M=a28N&if%HoThEf9thF1v;3|2E37{v1@#UFJ8s<riWaSW-r#d6S) >z>wtm)!@;Zk(GglIt!2~p=`%V`*!+RL{M?T1k&HqC^F6+8()lxA@ibGzeCOXcPs!Y3 >ae8=F(Bz}_FZe}jfAO=rYKbLh*2~7Z`MKuio > >diff --git a/Source/WebCore/Resources/DictationPhraseWithAlternativesDot@2x.png b/Source/WebCore/Resources/DictationPhraseWithAlternativesDot@2x.png >deleted file mode 100644 >index ff369fb4869dff99062bd6032ced299008a257bf..0000000000000000000000000000000000000000 >GIT binary patch >literal 0 >HcmV?d00001 > >literal 267 >zcmeAS@N?(olHy`uVBq!ia0vp^96-#*!3HG%vEKg;q&N#aB8wRqxP?KOkzv*x380`t >zvPY0F14ET614BbI1H;e%K>8&EL#Y7+!>a@a2CEqi4C48d;*Yuk)lT$uaSW-r<#WoK >z>yU#4!^24P$jJ*@=bgTE%Ik!xi0j2_j+Hq&dqb`)NVpeyD1RdtpU?M|r$c+TzOgzj >zbl``|zVn54i<v*%vuuCf9U8}QpyEiHl_PUDgTAk-Uw*(<J{QFjT|*6axpKwR3*O7F >z@Vda|z-W+>ZE3pnLw&UOA#;7M8`8SVG9nmQ+KMegZp;7RVX!)B<G|T>G85=H22WQ% >Jmvv4FO#t@OSiArL > >diff --git a/Source/WebCore/Resources/SpellingDot.png b/Source/WebCore/Resources/SpellingDot.png >deleted file mode 100644 >index 761a9b788d44062892c5d3762686874ef071f524..0000000000000000000000000000000000000000 >GIT binary patch >literal 0 >HcmV?d00001 > >literal 195 >zcmeAS@N?(olHy`uVBq!ia0vp^EI`c6!3-puwc@^j1kxRS9T^y|-MHc(VFct$mbgZg >z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-%U4)6(a{eSi9ztyY%hKK*}pYYGY >z;a`9MUwQd|;SvA;|2K4Fy$e*vSrX(I4CI0VL$H5^5Xb^g7srr_TS*BCDGw47k`kXM >gB%~%kW8g4gV6<j14O_AhsD^>T)78&qol`;+0Dcoho&W#< > >diff --git a/Source/WebCore/Resources/SpellingDot@2x.png b/Source/WebCore/Resources/SpellingDot@2x.png >deleted file mode 100644 >index fa8e31c2daa583e0435a53a4bc1be353b1350ef7..0000000000000000000000000000000000000000 >GIT binary patch >literal 0 >HcmV?d00001 > >literal 256 >zcmeAS@N?(olHy`uVBq!ia0vp^96-#*!3HG%vEKg;q&N#aB8wRqxP?KOkzv*x380`t >zvPY0F14ET614BbI1H%^}-ExtEAvd0Z;YAJugH1OBgLFjmbM^|L+BQ!Y$B>F!A*VKS >zH91He_*nnt?n4DDi(gTGzK!~cBCdPgA6$84{j#L{gKqm}&1(f6UuM_0=U<O}_S26e >zoncL`;WO7zRtCqfomtJ_878ELcRk{WNqX^H>UqMfB#&T?(^dS38O|NtbVPwkaf4vU >z{hs8{;**x#Z8qe;cJ<L;&IX(R3PraM<umAP)xGg3^xs>cix@mz{an^LB{Ts5o|ax5 > >diff --git a/Source/WebCore/Resources/SpellingDot@3x.png b/Source/WebCore/Resources/SpellingDot@3x.png >deleted file mode 100644 >index 61b7f7afe7889530ca7c87378547c34e0aa0b02f..0000000000000000000000000000000000000000 >GIT binary patch >literal 0 >HcmV?d00001 > >literal 270 >zcmV+p0rCEcP)<h;3K|Lk000e1NJLTq000aC000RH1^@s62Dr^s0000PbVXQnQ*UN; >zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUyut`KgRCwBSk+BVfFc3xWqzsZer8{Qu >z24N72)R9;OHt-rQso4MllH1GAagOaGU;dVL{_lW;Wf%y$!#(U_2S+%-6TH$mQr6AF >zZ}>??o%sR36#4-v^~8*@=ptgW!}o|fFV@h2^YB;5BnUHKjF!c>z_vTPz~aIxpqr~+ >z6~MklTy~|zS1><8IJUrX2K~U&v2+(DLJOoc*)-}YWz9C)W~{4?Zu$EkDt!bP0GzBk >U1M=+xB>(^b07*qoM6N<$g0%l{O#lD@ > >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 9f4b3227b3deb6a756761e0ff946af500f5126e9..b5bd42a49b1c9ec11c14383380acb6e6acf6ab1e 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -57,7 +57,6 @@ > 01D3CF8514BD0A3000FE9970 /* WebGLContextObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 01D3CF7F14BD0A3000FE9970 /* WebGLContextObject.h */; }; > 01D3CF8614BD0A3000FE9970 /* WebGLSharedObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01D3CF8014BD0A3000FE9970 /* WebGLSharedObject.cpp */; }; > 01D3CF8714BD0A3000FE9970 /* WebGLSharedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 01D3CF8114BD0A3000FE9970 /* WebGLSharedObject.h */; }; >- 01E6C2E41194B2820050821C /* SpellingDot@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 01E6C2E31194B2820050821C /* SpellingDot@2x.png */; }; > 0562F9611573F88F0031CA16 /* PlatformLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0562F9601573F88F0031CA16 /* PlatformLayer.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 05FD69DF12845D4300B2BEB3 /* DOMTimeStamp.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 06027CAD0B1CBFC000884B2D /* ContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -630,7 +629,6 @@ > 1C12AC2B1EE778AE0079E0A0 /* FontFamilySpecificationCoreText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C12AC291EE778AE0079E0A0 /* FontFamilySpecificationCoreText.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 1C18DA59181AF6A500C4EF22 /* TextPainter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C18DA57181AF6A500C4EF22 /* TextPainter.h */; }; > 1C21E57D183ED1FF001C289D /* IOSurfacePool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C21E57B183ED1FF001C289D /* IOSurfacePool.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 1C2417BA1992C04100EF9938 /* SpellingDot@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C2417B91992C04100EF9938 /* SpellingDot@3x.png */; }; > 1C24EEA51C729CE40080F8FC /* FontFaceSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C24EEA31C729CE40080F8FC /* FontFaceSet.h */; }; > 1C24EEA91C72A7B40080F8FC /* JSFontFaceSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C24EEA71C72A7B40080F8FC /* JSFontFaceSet.h */; }; > 1C6626111C6E7CA600AB527C /* FontFace.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C66260F1C6E7CA600AB527C /* FontFace.h */; }; >@@ -3863,7 +3861,6 @@ > BE88E0DF1715D2A200658D98 /* VideoTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = BE88E0D31715D2A200658D98 /* VideoTrack.h */; settings = {ATTRIBUTES = (Private, ); }; }; > BE88E0E11715D2A200658D98 /* VideoTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE88E0D51715D2A200658D98 /* VideoTrackList.cpp */; }; > BE88E0E21715D2A200658D98 /* VideoTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = BE88E0D61715D2A200658D98 /* VideoTrackList.h */; }; >- BE8C753110681324001E93F5 /* SpellingDot.png in Resources */ = {isa = PBXBuildFile; fileRef = BE8C753010681324001E93F5 /* SpellingDot.png */; }; > BE8EF043171C8FF9009B48C3 /* JSAudioTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = BE8EF03F171C8FF9009B48C3 /* JSAudioTrack.h */; }; > BE8EF045171C8FF9009B48C3 /* JSAudioTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = BE8EF041171C8FF9009B48C3 /* JSAudioTrackList.h */; }; > BE8EF04B171C9014009B48C3 /* JSVideoTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = BE8EF047171C9014009B48C3 /* JSVideoTrack.h */; }; >@@ -4124,8 +4121,6 @@ > D000EBA311BDAFD400C47726 /* FrameLoaderStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = D000EBA111BDAFD400C47726 /* FrameLoaderStateMachine.h */; settings = {ATTRIBUTES = (Private, ); }; }; > D000ED2811C1B9CD00C47726 /* SubframeLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = D000ED2611C1B9CD00C47726 /* SubframeLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; > D01A27AE10C9BFD800026A42 /* SpaceSplitString.h in Headers */ = {isa = PBXBuildFile; fileRef = D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- D02B64B214089E56006EFA21 /* DictationPhraseWithAlternativesDot.png in Resources */ = {isa = PBXBuildFile; fileRef = D02B64B014089E56006EFA21 /* DictationPhraseWithAlternativesDot.png */; }; >- D02B64B314089E56006EFA21 /* DictationPhraseWithAlternativesDot@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D02B64B114089E56006EFA21 /* DictationPhraseWithAlternativesDot@2x.png */; }; > D05CED2A0A40BB2C00C5AF38 /* FormatBlockCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D05CED280A40BB2C00C5AF38 /* FormatBlockCommand.h */; }; > D06C0D8F0CFD11460065F43F /* RemoveFormatCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D06C0D8D0CFD11460065F43F /* RemoveFormatCommand.h */; }; > D07DEABA0A36554A00CA30F8 /* InsertListCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D07DEAB80A36554A00CA30F8 /* InsertListCommand.h */; }; >@@ -4786,19 +4781,18 @@ > E4E9B1191810916F003ACCDF /* SimpleLineLayoutResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = E4E9B1181810916F003ACCDF /* SimpleLineLayoutResolver.h */; }; > E4E9B11D1814569C003ACCDF /* SimpleLineLayoutFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = E4E9B11C1814569C003ACCDF /* SimpleLineLayoutFunctions.h */; }; > E4F9EEF3156DA00700D23E7E /* StyleSheetContents.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F9EEF1156D84C400D23E7E /* StyleSheetContents.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- E59DD4B821098287003C8B47 /* ListButtonArrow.png in Resources */ = {isa = PBXBuildFile; fileRef = E59DD4B721098285003C8B47 /* ListButtonArrow.png */; }; > E516699120FF9918009D2C27 /* ListButtonArrow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = E516698F20FF9916009D2C27 /* ListButtonArrow@2x.png */; }; > E517670320B88C1400D41167 /* DataListSuggestionInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = E517670220B88C1400D41167 /* DataListSuggestionInformation.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E52CF54D20A268AC00DADA27 /* DataListSuggestionsClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E52CF54C20A268AC00DADA27 /* DataListSuggestionsClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E52CF54F20A35A2800DADA27 /* DataListSuggestionPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = E52CF54E20A35A2800DADA27 /* DataListSuggestionPicker.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E58B45BA20AD07DD00991025 /* DataListButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E58B45B820AD07DD00991025 /* DataListButtonElement.h */; }; > E58B45BB20AD07DD00991025 /* DataListButtonElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E58B45B920AD07DD00991025 /* DataListButtonElement.cpp */; }; >+ E59DD4B821098287003C8B47 /* ListButtonArrow.png in Resources */ = {isa = PBXBuildFile; fileRef = E59DD4B721098285003C8B47 /* ListButtonArrow.png */; }; > E5BA7D63151437CA00FE1E3F /* LengthFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; }; > EBF5121C1696496C0056BD25 /* JSTypeConversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBF5121A1696496C0056BD25 /* JSTypeConversions.cpp */; }; > EBF5121D1696496C0056BD25 /* JSTypeConversions.h in Headers */ = {isa = PBXBuildFile; fileRef = EBF5121B1696496C0056BD25 /* JSTypeConversions.h */; }; > ECA680C71E67724500731D20 /* StringUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = ECA680C61E67724500731D20 /* StringUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; }; > ECCDB8811E4B8C5900A1AEA6 /* WKContentObservationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */; }; >- ECCDB8871E4BB63F00A1AEA6 /* WKGraphicsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */; }; > ED2BA83C09A24B91006C0AC4 /* DocumentMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */; settings = {ATTRIBUTES = (Private, ); }; }; > EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; > EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EDEC98020AED7E170059137F /* WebCorePrefix.h */; }; >@@ -5157,7 +5151,6 @@ > 01D3CF7F14BD0A3000FE9970 /* WebGLContextObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLContextObject.h; sourceTree = "<group>"; }; > 01D3CF8014BD0A3000FE9970 /* WebGLSharedObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLSharedObject.cpp; sourceTree = "<group>"; }; > 01D3CF8114BD0A3000FE9970 /* WebGLSharedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLSharedObject.h; sourceTree = "<group>"; }; >- 01E6C2E31194B2820050821C /* SpellingDot@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SpellingDot@2x.png"; sourceTree = "<group>"; }; > 0562F9601573F88F0031CA16 /* PlatformLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformLayer.h; sourceTree = "<group>"; }; > 05FD69DF12845D4300B2BEB3 /* DOMTimeStamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMTimeStamp.h; sourceTree = "<group>"; }; > 06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContextMenuItem.h; sourceTree = "<group>"; }; >@@ -6297,7 +6290,6 @@ > 1C18DA57181AF6A500C4EF22 /* TextPainter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPainter.h; sourceTree = "<group>"; }; > 1C21E57A183ED1FF001C289D /* IOSurfacePool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IOSurfacePool.cpp; sourceTree = "<group>"; }; > 1C21E57B183ED1FF001C289D /* IOSurfacePool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSurfacePool.h; sourceTree = "<group>"; }; >- 1C2417B91992C04100EF9938 /* SpellingDot@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SpellingDot@3x.png"; sourceTree = "<group>"; }; > 1C24EEA11C729B320080F8FC /* FontFaceSet.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FontFaceSet.idl; sourceTree = "<group>"; }; > 1C24EEA21C729CE40080F8FC /* FontFaceSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFaceSet.cpp; sourceTree = "<group>"; }; > 1C24EEA31C729CE40080F8FC /* FontFaceSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontFaceSet.h; sourceTree = "<group>"; }; >@@ -7175,7 +7167,6 @@ > 3FFFF9AC159D9B060020BBD5 /* ViewportStyleResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewportStyleResolver.h; sourceTree = "<group>"; }; > 4107908A1FC3E4F20061B27A /* ClientOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientOrigin.h; sourceTree = "<group>"; }; > 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageEventCustom.cpp; sourceTree = "<group>"; }; >- D2CDB5ED638F43AF86F07AA2 /* JSErrorEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorEventCustom.cpp; sourceTree = "<group>"; }; > 41103AA71E39790A00769F03 /* RealtimeOutgoingAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RealtimeOutgoingAudioSource.cpp; sourceTree = "<group>"; }; > 41103AA71E39790A00769F14 /* RealtimeOutgoingAudioSourceCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RealtimeOutgoingAudioSourceCocoa.cpp; sourceTree = "<group>"; }; > 41103AA81E39790A00769F03 /* RealtimeOutgoingAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RealtimeOutgoingAudioSource.h; sourceTree = "<group>"; }; >@@ -9262,7 +9253,6 @@ > 71EFCEDA202B388F00D7C411 /* AnimationEffectReadOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationEffectReadOnly.cpp; sourceTree = "<group>"; }; > 71EFCEDB202B389000D7C411 /* KeyframeEffectReadOnly.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KeyframeEffectReadOnly.idl; sourceTree = "<group>"; }; > 71EFCEDE202B39C700D7C411 /* JSAnimationEffectReadOnlyCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnimationEffectReadOnlyCustom.cpp; sourceTree = "<group>"; }; >- A4A69B8BB91B49D0A804C31D /* JSPromiseRejectionEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseRejectionEventCustom.cpp; sourceTree = "<group>"; }; > 71EFCEDF202B3AA100D7C411 /* JSKeyframeEffectReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSKeyframeEffectReadOnly.h; sourceTree = "<group>"; }; > 71EFCEE0202B3AA300D7C411 /* JSKeyframeEffectReadOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSKeyframeEffectReadOnly.cpp; sourceTree = "<group>"; }; > 71F936F71DD4F99B00922CC7 /* tracks-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "tracks-support.js"; sourceTree = "<group>"; }; >@@ -11184,6 +11174,7 @@ > A454424D119B3687009BE912 /* RenderMeter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMeter.h; sourceTree = "<group>"; }; > A456FA2411AD4A830020B420 /* LabelsNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LabelsNodeList.cpp; sourceTree = "<group>"; }; > A456FA2511AD4A830020B420 /* LabelsNodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelsNodeList.h; sourceTree = "<group>"; }; >+ A4A69B8BB91B49D0A804C31D /* JSPromiseRejectionEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseRejectionEventCustom.cpp; sourceTree = "<group>"; }; > A501920C132EBF2E008BFE55 /* Autocapitalize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Autocapitalize.h; sourceTree = "<group>"; }; > A5071E821C56D079009951BE /* ResourceUsageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceUsageData.h; sourceTree = "<group>"; }; > A5071E831C56D079009951BE /* ResourceUsageThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceUsageThread.cpp; sourceTree = "<group>"; }; >@@ -13050,7 +13041,6 @@ > BE88E0D51715D2A200658D98 /* VideoTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VideoTrackList.cpp; sourceTree = "<group>"; }; > BE88E0D61715D2A200658D98 /* VideoTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoTrackList.h; sourceTree = "<group>"; }; > BE88E0D71715D2A200658D98 /* VideoTrackList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VideoTrackList.idl; sourceTree = "<group>"; }; >- BE8C753010681324001E93F5 /* SpellingDot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SpellingDot.png; sourceTree = "<group>"; }; > BE8EF03E171C8FF9009B48C3 /* JSAudioTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioTrack.cpp; sourceTree = "<group>"; }; > BE8EF03F171C8FF9009B48C3 /* JSAudioTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioTrack.h; sourceTree = "<group>"; }; > BE8EF040171C8FF9009B48C3 /* JSAudioTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioTrackList.cpp; sourceTree = "<group>"; }; >@@ -13561,8 +13551,6 @@ > D000ED2611C1B9CD00C47726 /* SubframeLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubframeLoader.h; sourceTree = "<group>"; }; > D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpaceSplitString.cpp; sourceTree = "<group>"; }; > D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpaceSplitString.h; sourceTree = "<group>"; }; >- D02B64B014089E56006EFA21 /* DictationPhraseWithAlternativesDot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DictationPhraseWithAlternativesDot.png; sourceTree = "<group>"; }; >- D02B64B114089E56006EFA21 /* DictationPhraseWithAlternativesDot@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "DictationPhraseWithAlternativesDot@2x.png"; sourceTree = "<group>"; }; > D036DD8D208FFC0C00F9F4B2 /* WebGLCompressedTextureASTC.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGLCompressedTextureASTC.idl; sourceTree = "<group>"; }; > D05CED270A40BB2C00C5AF38 /* FormatBlockCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FormatBlockCommand.cpp; sourceTree = "<group>"; }; > D05CED280A40BB2C00C5AF38 /* FormatBlockCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FormatBlockCommand.h; sourceTree = "<group>"; }; >@@ -13586,6 +13574,7 @@ > D0EDA773143E303C0028E383 /* CachedRawResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedRawResource.h; sourceTree = "<group>"; }; > D0FF2A5B11F8C45A007E74E0 /* PingLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PingLoader.cpp; sourceTree = "<group>"; }; > D0FF2A5C11F8C45A007E74E0 /* PingLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingLoader.h; sourceTree = "<group>"; }; >+ D2CDB5ED638F43AF86F07AA2 /* JSErrorEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorEventCustom.cpp; sourceTree = "<group>"; }; > D302754512A5FE84004BD828 /* RenderDetailsMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderDetailsMarker.cpp; sourceTree = "<group>"; }; > D302754612A5FE84004BD828 /* RenderDetailsMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderDetailsMarker.h; sourceTree = "<group>"; }; > D359D786129CA2710006E5D2 /* HTMLDetailsElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDetailsElement.cpp; sourceTree = "<group>"; }; >@@ -14518,7 +14507,6 @@ > E4E9B11C1814569C003ACCDF /* SimpleLineLayoutFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutFunctions.h; sourceTree = "<group>"; }; > E4F9EEF0156D84C400D23E7E /* StyleSheetContents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleSheetContents.cpp; sourceTree = "<group>"; }; > E4F9EEF1156D84C400D23E7E /* StyleSheetContents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheetContents.h; sourceTree = "<group>"; }; >- E59DD4B721098285003C8B47 /* ListButtonArrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ListButtonArrow.png; sourceTree = "<group>"; }; > E516698F20FF9916009D2C27 /* ListButtonArrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ListButtonArrow@2x.png"; sourceTree = "<group>"; }; > E517670220B88C1400D41167 /* DataListSuggestionInformation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListSuggestionInformation.h; sourceTree = "<group>"; }; > E51A81DE17298D7700BFCA61 /* JSPerformance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformance.cpp; sourceTree = "<group>"; }; >@@ -14528,6 +14516,7 @@ > E55F4979151B888000BB67DB /* LengthFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthFunctions.cpp; sourceTree = "<group>"; }; > E58B45B820AD07DD00991025 /* DataListButtonElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListButtonElement.h; sourceTree = "<group>"; }; > E58B45B920AD07DD00991025 /* DataListButtonElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DataListButtonElement.cpp; sourceTree = "<group>"; }; >+ E59DD4B721098285003C8B47 /* ListButtonArrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ListButtonArrow.png; sourceTree = "<group>"; }; > E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LengthFunctions.h; sourceTree = "<group>"; }; > EB081CD81696084400553730 /* TypeConversions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeConversions.h; sourceTree = "<group>"; }; > EB081CD91696084400553730 /* TypeConversions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = TypeConversions.idl; sourceTree = "<group>"; }; >@@ -14536,7 +14525,6 @@ > ECA680C61E67724500731D20 /* StringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringUtilities.h; sourceTree = "<group>"; }; > ECA680C81E67730B00731D20 /* StringUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringUtilities.mm; sourceTree = "<group>"; }; > ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentObservationInternal.h; sourceTree = "<group>"; }; >- ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKGraphicsInternal.h; sourceTree = "<group>"; }; > ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMarker.h; sourceTree = "<group>"; }; > ED501DC50B249F2900AE18D9 /* EditorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = EditorMac.mm; sourceTree = "<group>"; }; > EDE3A4FF0C7A430600956A37 /* ColorMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorMac.h; sourceTree = "<group>"; }; >@@ -19258,13 +19246,8 @@ > children = ( > 2D50A4B51CE10E0000198049 /* AttachmentPlaceholder.png */, > 2D50A4B61CE10E0000198049 /* AttachmentPlaceholder@2x.png */, >- D02B64B014089E56006EFA21 /* DictationPhraseWithAlternativesDot.png */, >- D02B64B114089E56006EFA21 /* DictationPhraseWithAlternativesDot@2x.png */, > E59DD4B721098285003C8B47 /* ListButtonArrow.png */, > E516698F20FF9916009D2C27 /* ListButtonArrow@2x.png */, >- BE8C753010681324001E93F5 /* SpellingDot.png */, >- 01E6C2E31194B2820050821C /* SpellingDot@2x.png */, >- 1C2417B91992C04100EF9938 /* SpellingDot@3x.png */, > ); > name = images; > sourceTree = "<group>"; >@@ -21375,7 +21358,6 @@ > ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */, > A14832A4187F508700DA63A6 /* WKGraphics.h */, > A14832A5187F508700DA63A6 /* WKGraphics.mm */, >- ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */, > A14832A6187F508700DA63A6 /* WKTypes.h */, > A14832A7187F508700DA63A6 /* WKUtilities.c */, > A14832A8187F508700DA63A6 /* WKUtilities.h */, >@@ -31070,7 +31052,6 @@ > A14832BE187F64CC00DA63A6 /* WKContentObservation.h in Headers */, > ECCDB8811E4B8C5900A1AEA6 /* WKContentObservationInternal.h in Headers */, > A14832BF187F652C00DA63A6 /* WKGraphics.h in Headers */, >- ECCDB8871E4BB63F00A1AEA6 /* WKGraphicsInternal.h in Headers */, > A14832C1187F657A00DA63A6 /* WKTypes.h in Headers */, > A14832C3187F65DF00DA63A6 /* WKUtilities.h in Headers */, > A14832C4187F663C00DA63A6 /* WKView.h in Headers */, >@@ -31295,8 +31276,6 @@ > 2D50A4B81CE10E0000198049 /* AttachmentPlaceholder@2x.png in Resources */, > A1AA9AB91D23911500FEADB3 /* ContentFilterBlockedPage.html in Resources */, > A11E8C051B1E28F40003A7C7 /* copyCursor.png in Resources */, >- D02B64B214089E56006EFA21 /* DictationPhraseWithAlternativesDot.png in Resources */, >- D02B64B314089E56006EFA21 /* DictationPhraseWithAlternativesDot@2x.png in Resources */, > 7CC7E3D717208C0F003C5277 /* IDNScriptWhiteList.txt in Resources */, > 2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */, > E59DD4B821098287003C8B47 /* ListButtonArrow.png in Resources */, >@@ -31317,9 +31296,6 @@ > A11E8C071B1E28FE0003A7C7 /* northEastSouthWestResizeCursor.png in Resources */, > A11E8C081B1E29020003A7C7 /* northSouthResizeCursor.png in Resources */, > A11E8C091B1E29070003A7C7 /* northWestSouthEastResizeCursor.png in Resources */, >- BE8C753110681324001E93F5 /* SpellingDot.png in Resources */, >- 01E6C2E41194B2820050821C /* SpellingDot@2x.png in Resources */, >- 1C2417BA1992C04100EF9938 /* SpellingDot@3x.png in Resources */, > 93153BDC141959BC00FCF5BE /* textAreaResizeCorner.png in Resources */, > 9370918D1416D86B00477333 /* textAreaResizeCorner@2x.png in Resources */, > ); >diff --git a/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm b/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm >index b5a9d668f18a5918ba28c9edec0adeeb7edfcd10..3b2c39b24607b21b8d1025f7139a334de54307a6 100644 >--- a/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm >+++ b/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm >@@ -41,7 +41,6 @@ > #if PLATFORM(IOS) > #import "Color.h" > #import "WKGraphics.h" >-#import "WKGraphicsInternal.h" > #endif > > #if PLATFORM(MAC) >@@ -195,18 +194,6 @@ static NSImage *correctionImage = nullptr; > > #endif > >-#if PLATFORM (IOS) >- >-static RetainPtr<CGPatternRef> createDotPattern(bool& usingDot, const char* resourceName) >-{ >- RetainPtr<CGImageRef> image = adoptCF(WKGraphicsCreateImageFromBundleWithName(resourceName)); >- ASSERT(image); // if image is not available, we want to know >- usingDot = true; >- return adoptCF(WKCreatePatternFromCGImage(image.get())); >-} >- >-#endif >- > void GraphicsContext::updateDocumentMarkerResources() > { > #if PLATFORM(MAC) >@@ -227,142 +214,10 @@ static inline void setPatternPhaseInUserSpace(CGContextRef context, CGPoint phas > CGContextSetPatternPhase(context, CGSizeMake(phase.x, phase.y)); > } > >-// WebKit on Mac is a standard platform component, so it must use the standard platform artwork for underline. >-void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& point, float width, DocumentMarkerLineStyle style) >+// FIXME: We need to keep this function since it is referenced by DrawLineForDocumentMarker::apply(). >+void GraphicsContext::drawLineForDocumentMarker(const FloatPoint&, float, DocumentMarkerLineStyle) > { >- if (paintingDisabled()) >- return; >- >- // These are the same for misspelling or bad grammar. >- int patternHeight = cMisspellingLineThickness; >- float patternWidth = cMisspellingLinePatternWidth; >- >- bool usingDot; >-#if !PLATFORM(IOS) >- NSImage *image; >- NSColor *fallbackColor; >-#else >- CGPatternRef dotPattern; >-#endif >- switch (style) { >- case DocumentMarkerLineStyle::Spelling: { >- // Constants for spelling pattern color. >- static bool usingDotForSpelling = false; >-#if !PLATFORM(IOS) >- if (!spellingImage) >- spellingImage = [findImage(@"NSSpellingDot", @"SpellingDot", usingDotForSpelling) retain]; >- image = spellingImage; >- fallbackColor = [NSColor redColor]; >-#else >- static CGPatternRef spellingPattern = createDotPattern(usingDotForSpelling, "SpellingDot").leakRef(); >- dotPattern = spellingPattern; >-#endif >- usingDot = usingDotForSpelling; >- break; >- } >- case DocumentMarkerLineStyle::Grammar: { >-#if !PLATFORM(IOS) >- // Constants for grammar pattern color. >- static bool usingDotForGrammar = false; >- if (!grammarImage) >- grammarImage = [findImage(@"NSGrammarDot", @"GrammarDot", usingDotForGrammar) retain]; >- usingDot = grammarImage; >- image = grammarImage; >- fallbackColor = [NSColor greenColor]; >- break; >-#else >- ASSERT_NOT_REACHED(); >- return; >-#endif >- } >-#if PLATFORM(MAC) >- // To support correction panel. >- case DocumentMarkerLineStyle::AutocorrectionReplacement: >- case DocumentMarkerLineStyle::DictationAlternatives: { >- // Constants for spelling pattern color. >- static bool usingDotForSpelling = false; >- if (!correctionImage) >- correctionImage = [findImage(@"NSCorrectionDot", @"CorrectionDot", usingDotForSpelling) retain]; >- usingDot = usingDotForSpelling; >- image = correctionImage; >- fallbackColor = [NSColor blueColor]; >- break; >- } >-#endif >-#if PLATFORM(IOS) >- case DocumentMarkerLineStyle::TextCheckingDictationPhraseWithAlternatives: { >- static bool usingDotForDictationPhraseWithAlternatives = false; >- static CGPatternRef dictationPhraseWithAlternativesPattern = createDotPattern(usingDotForDictationPhraseWithAlternatives, "DictationPhraseWithAlternativesDot").leakRef(); >- dotPattern = dictationPhraseWithAlternativesPattern; >- usingDot = usingDotForDictationPhraseWithAlternatives; >- break; >- } >-#endif // PLATFORM(IOS) >- default: >-#if PLATFORM(IOS) >- // FIXME: Should remove default case so we get compile-time errors. >- ASSERT_NOT_REACHED(); >-#endif // PLATFORM(IOS) >- return; >- } >- >- FloatPoint offsetPoint = point; >- >- // Make sure to draw only complete dots. >- if (usingDot) { >- // allow slightly more considering that the pattern ends with a transparent pixel >- float widthMod = fmodf(width, patternWidth); >- if (patternWidth - widthMod > cMisspellingLinePatternGapWidth) { >- float gapIncludeWidth = 0; >- if (width > patternWidth) >- gapIncludeWidth = cMisspellingLinePatternGapWidth; >- offsetPoint.move(floor((widthMod + gapIncludeWidth) / 2), 0); >- width -= widthMod; >- } >- } >- >- // FIXME: This code should not use NSGraphicsContext currentContext >- // In order to remove this requirement we will need to use CGPattern instead of NSColor >- // FIXME: This code should not be using setPatternPhaseInUserSpace, as this approach is wrong >- // for transforms. >- >- // Draw underline. >- CGContextRef context = platformContext(); >- CGContextStateSaver stateSaver { context }; >- >-#if PLATFORM(IOS) >- WKSetPattern(context, dotPattern, YES, YES); >-#endif >- >- setPatternPhaseInUserSpace(context, offsetPoint); >- >- CGRect destinationRect = CGRectMake(offsetPoint.x(), offsetPoint.y(), width, patternHeight); >-#if !PLATFORM(IOS) >- if (image) { >- CGContextClipToRect(context, destinationRect); >- >- // We explicitly flip coordinates so as to ensure we paint the image right-side up. We do this because >- // -[NSImage CGImageForProposedRect:context:hints:] does not guarantee that the returned image will respect >- // any transforms applied to the context or any specified hints. >- CGContextTranslateCTM(context, 0, patternHeight); >- CGContextScaleCTM(context, 1, -1); >- >- NSRect dotRect = NSMakeRect(offsetPoint.x(), patternHeight - offsetPoint.y(), patternWidth, patternHeight); // Adjust y position as we flipped coordinates. >- >- // FIXME: Rather than getting the NSImage and then picking the CGImage from it, we should do what iOS does and >- // just load the CGImage in the first place. >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wdeprecated-declarations" >- CGImageRef cgImage = [image CGImageForProposedRect:&dotRect context:[NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO] hints:nullptr]; >-#pragma clang diagnostic pop >- CGContextDrawTiledImage(context, NSRectToCGRect(dotRect), cgImage); >- } else { >- CGContextSetFillColorWithColor(context, [fallbackColor CGColor]); >- CGContextFillRect(context, destinationRect); >- } >-#else >- WKRectFillUsingOperation(context, destinationRect, kCGCompositeSover); >-#endif >+ // Cocoa platform use the theme to paint the platform document markers. > } > > } // namespace WebCore >diff --git a/Source/WebCore/platform/ios/wak/WKGraphics.mm b/Source/WebCore/platform/ios/wak/WKGraphics.mm >index 68eb6dee7b6c72cdde79cbac91f6e25f701a4608..dfc6e0ee35f7f8f49fcd609302b74d31c960beda 100644 >--- a/Source/WebCore/platform/ios/wak/WKGraphics.mm >+++ b/Source/WebCore/platform/ios/wak/WKGraphics.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. >+ * Copyright (C) 2005-2018 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -25,16 +25,11 @@ > > #import "config.h" > #import "WKGraphics.h" >-#import "WKGraphicsInternal.h" > > #if PLATFORM(IOS) > >-#import "FontCascade.h" >-#import "PlatformScreen.h" > #import "WebCoreThreadInternal.h" >-#import <ImageIO/ImageIO.h> > #import <pal/spi/cg/CoreGraphicsSPI.h> >-#import <wtf/StdLibExtras.h> > > using namespace WebCore; > >@@ -56,28 +51,12 @@ static inline void _FillRectsUsingOperation(CGContextRef context, const CGRect* > CGContextSetCompositeOperation(context, oldOp); > } > >-static inline void _FillRectUsingOperation(CGContextRef context, CGRect rect, CGCompositeOperation op) >-{ >- if (rect.size.width > 0 && rect.size.height > 0) { >- _FillRectsUsingOperation (context, &rect, 1, op); >- } >-} >- > void WKRectFill(CGContextRef context, CGRect aRect) > { > if (aRect.size.width > 0 && aRect.size.height > 0) { > CGContextSaveGState(context); >- _FillRectUsingOperation(context, aRect, kCGCompositeCopy); >- CGContextRestoreGState(context); >- } >-} >- >-void WKRectFillUsingOperation(CGContextRef context, CGRect aRect, WKCompositeOperation compositeOperation) >-{ >- COMPILE_ASSERT(sizeof(WKCompositeOperation) == sizeof(CGCompositeOperation), "WKCompositeOperation must be the same size as CGCompositeOperation."); >- if (aRect.size.width > 0 && aRect.size.height > 0.0) { >- CGContextSaveGState(context); >- _FillRectUsingOperation(context, aRect, static_cast<CGCompositeOperation>(compositeOperation)); >+ if (aRect.size.width > 0 && aRect.size.height > 0) >+ _FillRectsUsingOperation(context, &aRect, 1, kCGCompositeCopy); > CGContextRestoreGState(context); > } > } >@@ -94,83 +73,4 @@ CGContextRef WKGetCurrentGraphicsContext(void) > return threadContext->currentCGContext; > } > >-static NSString *imageResourcePath(const char* imageFile, unsigned scaleFactor) >-{ >- NSString *fileName = scaleFactor == 1 ? [NSString stringWithUTF8String:imageFile] : [NSString stringWithFormat:@"%s@%dx", imageFile, scaleFactor]; >-#if PLATFORM(IOS_SIMULATOR) >- NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebCore"]; >- return [bundle pathForResource:fileName ofType:@"png"]; >-#else >- // Workaround for <rdar://problem/7780665> CFBundleCopyResourceURL takes a long time on iPhone 3G. >- NSString *imageDirectory = @"/System/Library/PrivateFrameworks/WebCore.framework"; >- return [NSString stringWithFormat:@"%@/%@.png", imageDirectory, fileName]; >-#endif >-} >- >-CGImageRef WKGraphicsCreateImageFromBundleWithName(const char *image_file) >-{ >- if (!image_file) >- return NULL; >- >- CGImageRef image = nullptr; >- NSData *imageData = nullptr; >- for (unsigned scaleFactor = screenScaleFactor(); scaleFactor > 0; --scaleFactor) { >- imageData = [NSData dataWithContentsOfFile:imageResourcePath(image_file, scaleFactor)]; >- ASSERT(scaleFactor != screenScaleFactor() || imageData); >- if (imageData) >- break; >- } >- >- if (imageData) { >- RetainPtr<CGDataProviderRef> dataProvider = adoptCF(CGDataProviderCreateWithCFData(reinterpret_cast<CFDataRef>(imageData))); >- image = CGImageCreateWithPNGDataProvider(dataProvider.get(), nullptr, NO, kCGRenderingIntentDefault); >- } >- >- return image; >-} >- >-static void WKDrawPatternBitmap(void *info, CGContextRef c) >-{ >- CGImageRef image = (CGImageRef)info; >- CGFloat scale = screenScaleFactor(); >- CGContextDrawImage(c, CGRectMake(0, 0, CGImageGetWidth(image) / scale, CGImageGetHeight(image) / scale), image); >-} >- >-static void WKReleasePatternBitmap(void *info) >-{ >- CGImageRelease(reinterpret_cast<CGImageRef>(info)); >-} >- >-static const CGPatternCallbacks WKPatternBitmapCallbacks = >-{ >- 0, WKDrawPatternBitmap, WKReleasePatternBitmap >-}; >- >-CGPatternRef WKCreatePatternFromCGImage(CGImageRef imageRef) >-{ >- // retain image since it's freed by our callback >- CGImageRetain(imageRef); >- >- CGFloat scale = screenScaleFactor(); >- return CGPatternCreate((void*)imageRef, CGRectMake(0, 0, CGImageGetWidth(imageRef) / scale, CGImageGetHeight(imageRef) / scale), CGAffineTransformIdentity, CGImageGetWidth(imageRef) / scale, CGImageGetHeight(imageRef) / scale, kCGPatternTilingConstantSpacing, 1 /*isColored*/, &WKPatternBitmapCallbacks); >-} >- >-void WKSetPattern(CGContextRef context, CGPatternRef pattern, bool fill, bool stroke) >-{ >- if (pattern == NULL) >- return; >- >- CGFloat patternAlpha = 1; >- CGColorSpaceRef colorspace = CGColorSpaceCreatePattern(NULL); >- if (fill) { >- CGContextSetFillColorSpace(context, colorspace); >- CGContextSetFillPattern(context, pattern, &patternAlpha); >- } >- if (stroke) { >- CGContextSetStrokeColorSpace(context, colorspace); >- CGContextSetStrokePattern(context, pattern, &patternAlpha); >- } >- CGColorSpaceRelease(colorspace); >-} >- > #endif // PLATFORM(IOS) >diff --git a/Source/WebCore/platform/ios/wak/WKGraphicsInternal.h b/Source/WebCore/platform/ios/wak/WKGraphicsInternal.h >deleted file mode 100644 >index 3fed476f22c051519da02fd51217ef6df423f84b..0000000000000000000000000000000000000000 >--- a/Source/WebCore/platform/ios/wak/WKGraphicsInternal.h >+++ /dev/null >@@ -1,47 +0,0 @@ >-/* >- * Copyright (C) 2017 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 >- >-#if TARGET_OS_IPHONE >- >-#import <CoreGraphics/CoreGraphics.h> >- >-typedef int WKCompositeOperation; >- >-#ifdef __cplusplus >-extern "C" { >-#endif >- >-void WKRectFillUsingOperation(CGContextRef, CGRect, WKCompositeOperation); >-CGImageRef WKGraphicsCreateImageFromBundleWithName(const char *image_file); >-CGPatternRef WKCreatePatternFromCGImage(CGImageRef imageRef); >-void WKSetPattern(CGContextRef context, CGPatternRef pattern, bool fill, bool stroke); >- >-#ifdef __cplusplus >-} >-#endif >- >-#endif // TARGET_OS_IPHONE >diff --git a/Source/WebCore/rendering/InlineTextBox.cpp b/Source/WebCore/rendering/InlineTextBox.cpp >index 5eac74abd21b116a73f504c25c2c193b02145ba8..0a784ccc34af01db106486fbc7735133a504c6d4 100644 >--- a/Source/WebCore/rendering/InlineTextBox.cpp >+++ b/Source/WebCore/rendering/InlineTextBox.cpp >@@ -726,7 +726,7 @@ void InlineTextBox::paintPlatformDocumentMarker(GraphicsContext& context, const > underlineOffset = baseline + 2; > } > >-#if PLATFORM(MAC) >+#if PLATFORM(COCOA) > RenderTheme::singleton().drawLineForDocumentMarker(renderer(), context, FloatPoint(boxOrigin.x() + start, boxOrigin.y() + underlineOffset), width, lineStyleForMarkedTextType(markedText.type)); > #else > context.drawLineForDocumentMarker(FloatPoint(boxOrigin.x() + start, boxOrigin.y() + underlineOffset), width, lineStyleForMarkedTextType(markedText.type)); >diff --git a/Source/WebCore/rendering/RenderThemeCocoa.h b/Source/WebCore/rendering/RenderThemeCocoa.h >index 30151d848ee45cf85d8894113142e07229be1c4c..c2830fe8adcad51e12d431bd6afe133499db333b 100644 >--- a/Source/WebCore/rendering/RenderThemeCocoa.h >+++ b/Source/WebCore/rendering/RenderThemeCocoa.h >@@ -36,6 +36,8 @@ namespace WebCore { > > class RenderThemeCocoa : public RenderTheme { > private: >+ void drawLineForDocumentMarker(const RenderText&, GraphicsContext&, const FloatPoint& origin, float width, DocumentMarkerLineStyle) final; >+ > #if ENABLE(APPLE_PAY) > void adjustApplePayButtonStyle(StyleResolver&, RenderStyle&, const Element*) const override; > bool paintApplePayButton(const RenderObject&, const PaintInfo&, const IntRect&) override; >diff --git a/Source/WebCore/rendering/RenderThemeCocoa.mm b/Source/WebCore/rendering/RenderThemeCocoa.mm >index df2c731d0896761d27742dd93ee6e1313ddfd291..c2c45d76894c106eb5e010270e9104400b2c3b87 100644 >--- a/Source/WebCore/rendering/RenderThemeCocoa.mm >+++ b/Source/WebCore/rendering/RenderThemeCocoa.mm >@@ -23,16 +23,18 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#include "config.h" >-#include "RenderThemeCocoa.h" >+#import "config.h" >+#import "RenderThemeCocoa.h" > > #if ENABLE(APPLE_PAY) > >-#include "RenderElement.h" >-#include "RenderStyle.h" >-#include "TranslateTransformOperation.h" >-#include <pal/spi/cocoa/PassKitSPI.h> >-#include <wtf/SoftLinking.h> >+#import "GraphicsContextCG.h" >+#import "RenderElement.h" >+#import "RenderStyle.h" >+#import "RenderText.h" >+#import "TranslateTransformOperation.h" >+#import <pal/spi/cocoa/PassKitSPI.h> >+#import <wtf/SoftLinking.h> > > #if PLATFORM(MAC) > SOFT_LINK_PRIVATE_FRAMEWORK(PassKit); >@@ -45,12 +47,56 @@ SOFT_LINK_MAY_FAIL(PassKit, PKDrawApplePayButton, void, (CGContextRef context, C > #endif // ENABLE(APPLE_PAY) > > #if ENABLE(VIDEO) >-#include "LocalizedStrings.h" >-#include <wtf/BlockObjCExceptions.h> >+#import "LocalizedStrings.h" >+#import <wtf/BlockObjCExceptions.h> > #endif > > namespace WebCore { > >+static CGColorRef colorForStyle(DocumentMarkerLineStyle style, bool useDarkMode) >+{ >+ switch (style) { >+ // Red >+ case DocumentMarkerLineStyle::Spelling: >+ return cachedCGColor(useDarkMode ? Color { 255, 140, 140, 217 } : Color { 255, 59, 48, 191 }); >+ // Blue >+ case DocumentMarkerLineStyle::DictationAlternatives: >+ case DocumentMarkerLineStyle::TextCheckingDictationPhraseWithAlternatives: >+ case DocumentMarkerLineStyle::AutocorrectionReplacement: >+ return cachedCGColor(useDarkMode ? Color { 40, 145, 255, 217 } : Color { 0, 122, 255, 191 }); >+ // Green >+ case DocumentMarkerLineStyle::Grammar: >+ return cachedCGColor(useDarkMode ? Color { 50, 215, 75, 217 } : Color { 25, 175, 50, 191 }); >+ } >+} >+ >+void RenderThemeCocoa::drawLineForDocumentMarker(const RenderText& renderer, GraphicsContext& context, const FloatPoint& origin, float width, DocumentMarkerLineStyle style) >+{ >+ if (context.paintingDisabled()) >+ return; >+ >+ auto circleColor = colorForStyle(style, renderer.page().useSystemAppearance() && renderer.page().useDarkAppearance()); >+ >+ // Center the underline and ensure we only draw entire dots. >+ FloatPoint offsetPoint = origin; >+ float widthMod = fmodf(width, cMisspellingLinePatternWidth); >+ if (cMisspellingLinePatternWidth - widthMod > cMisspellingLinePatternGapWidth) { >+ float gapIncludeWidth = 0; >+ if (width > cMisspellingLinePatternWidth) >+ gapIncludeWidth = cMisspellingLinePatternGapWidth; >+ offsetPoint.move(floor((widthMod + gapIncludeWidth) / 2), 0); >+ width -= widthMod; >+ } >+ >+ CGContextRef context = context.platformContext(); >+ CGContextStateSaver stateSaver { context }; >+ CGContextSetFillColorWithColor(context, circleColor); >+ for (int x = 0; x < width; x += cMisspellingLinePatternWidth) >+ CGContextAddEllipseInRect(context, CGRectMake(offsetPoint.x() + x, offsetPoint.y(), cMisspellingLineThickness, cMisspellingLineThickness)); >+ CGContextSetCompositeOperation(context, kCGCompositeSover); >+ CGContextFillPath(context); >+} >+ > #if ENABLE(APPLE_PAY) > > static const auto applePayButtonMinimumWidth = 140; >diff --git a/Source/WebCore/rendering/RenderThemeMac.h b/Source/WebCore/rendering/RenderThemeMac.h >index d98de3a959916c8faa354dede51998f88d8b0e9c..ba79bdac7297b31b46a6bf4d5d37215aa39839fb 100644 >--- a/Source/WebCore/rendering/RenderThemeMac.h >+++ b/Source/WebCore/rendering/RenderThemeMac.h >@@ -174,8 +174,6 @@ private: > bool paintAttachment(const RenderObject&, const PaintInfo&, const IntRect&) final; > #endif > >- void drawLineForDocumentMarker(const RenderText&, GraphicsContext&, const FloatPoint& origin, float width, DocumentMarkerLineStyle) final; >- > bool usingDarkAppearance(const RenderObject&) const final; > > private: >diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm >index b889dac4d4a1221cd57eeb0fd12bc55610c93b43..05e781a23374b874a0e38895e41f79f6d0d20a73 100644 >--- a/Source/WebCore/rendering/RenderThemeMac.mm >+++ b/Source/WebCore/rendering/RenderThemeMac.mm >@@ -37,7 +37,6 @@ > #import "FrameView.h" > #import "GeometryUtilities.h" > #import "GraphicsContext.h" >-#import "GraphicsContextCG.h" > #import "HTMLAttachmentElement.h" > #import "HTMLInputElement.h" > #import "HTMLMediaElement.h" >@@ -2973,50 +2972,6 @@ bool RenderThemeMac::paintAttachment(const RenderObject& renderer, const PaintIn > > #endif // ENABLE(ATTACHMENT_ELEMENT) > >-static CGColorRef colorForStyle(DocumentMarkerLineStyle style, bool useDarkMode) >-{ >- switch (style) { >- // Red. >- case DocumentMarkerLineStyle::Spelling: >- return cachedCGColor(useDarkMode ? Color { 255, 140, 140, 217 } : Color { 255, 59, 48, 191 }); >- // Blue. >- case DocumentMarkerLineStyle::DictationAlternatives: >- case DocumentMarkerLineStyle::TextCheckingDictationPhraseWithAlternatives: >- case DocumentMarkerLineStyle::AutocorrectionReplacement: >- return cachedCGColor(useDarkMode ? Color { 40, 145, 255, 217 } : Color { 0, 122, 255, 191 }); >- // Green. >- case DocumentMarkerLineStyle::Grammar: >- return cachedCGColor(useDarkMode ? Color { 50, 215, 75, 217 } : Color { 25, 175, 50, 191 }); >- } >-} >- >-void RenderThemeMac::drawLineForDocumentMarker(const RenderText& renderer, GraphicsContext& context, const FloatPoint& origin, float width, DocumentMarkerLineStyle style) >-{ >- if (context.paintingDisabled()) >- return; >- >- auto circleColor = colorForStyle(style, renderer.page().useSystemAppearance() && renderer.page().useDarkAppearance()); >- >- // Center the underline and ensure we only draw entires dots. >- FloatPoint offsetPoint = origin; >- float widthMod = fmodf(width, cMisspellingLinePatternWidth); >- if (cMisspellingLinePatternWidth - widthMod > cMisspellingLinePatternGapWidth) { >- float gapIncludeWidth = 0; >- if (width > cMisspellingLinePatternWidth) >- gapIncludeWidth = cMisspellingLinePatternGapWidth; >- offsetPoint.move(floor((widthMod + gapIncludeWidth) / 2), 0); >- width -= widthMod; >- } >- >- CGContextRef ctx = context.platformContext(); >- CGContextStateSaver stateSaver { ctx }; >- CGContextSetFillColorWithColor(ctx, circleColor); >- for (int x = 0; x < width; x += cMisspellingLinePatternWidth) >- CGContextAddEllipseInRect(ctx, CGRectMake(offsetPoint.x() + x, offsetPoint.y(), cMisspellingLineThickness, cMisspellingLineThickness)); >- CGContextSetCompositeOperation(ctx, kCGCompositeSover); >- CGContextFillPath(ctx); >-} >- > bool RenderThemeMac::usingDarkAppearance(const RenderObject& o) const > { > #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188828
:
347731
|
347733
|
347746
|
347809
|
347972