Summary: | Implement textStylingAtPosition in WK2 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Enrica Casucci <enrica> | ||||||
Component: | WebKit2 | Assignee: | Enrica Casucci <enrica> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | iPhone / iPad | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Enrica Casucci
2014-07-11 14:04:04 PDT
Created attachment 234779 [details]
Patch
Created attachment 234787 [details]
Patch2
Fixes the OS X build.
View in context: https://bugs.webkit.org/attachment.cgi?id=234779&action=review I don't know much about this code but the patch looks reasonable. > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1198 > + RetainPtr<CTFontDescriptorRef> fontDescriptor = adoptCF(CTFontDescriptorCreateWithNameAndSize(CFSTR("Helvetica"), 10)); This could be defined closer to where it is used. > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1205 > + fontDescriptor = adoptCF(CTFontDescriptorCreateCopyWithSymbolicTraits(fontDescriptor.get(), symbolicTraits, symbolicTraits)); Is there no way to create the font descriptor directly with the traits? It is a little ugly to create a font then copy it. > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1207 > + RetainPtr<CTFontRef> font = CTFontCreateWithFontDescriptor(fontDescriptor.get(), 10, nullptr); Shouldn't this use adoptCF? > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:752 > + if (style) { WebKit style: if (RenderStyle* ...) Committed revision 171015. |