WebKit Bugzilla
Attachment 341374 Details for
Bug 186007
: [Cocoa] Delete unnecessary WebCascadeList in ComplexTextController
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186007-20180525184942.patch (text/plain), 4.92 KB, created by
Myles C. Maxfield
on 2018-05-25 18:49:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2018-05-25 18:49:43 PDT
Size:
4.92 KB
patch
obsolete
>Subversion Revision: 232134 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 894ae700af9d610da747ec7560936e244b7e4c75..cfec2641275a55214abc1526361d630744094aa5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-25 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ [Cocoa] Delete unnecessary WebCascadeList in ComplexTextController >+ https://bugs.webkit.org/show_bug.cgi?id=186007 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * platform/graphics/mac/ComplexTextControllerCoreText.mm: >+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): >+ (-[WebCascadeList initWithFont:character:]): Deleted. >+ (-[WebCascadeList count]): Deleted. >+ (-[WebCascadeList objectAtIndex:]): Deleted. >+ > 2018-05-23 Chris Dumez <cdumez@apple.com> > > RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its cross-origin parent >diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >index 4c01b6553adc69979a724e502ddd2f6f5e894bfd..8845ba364c346d412297fcc04a3d19858cab52bd 100644 >--- a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >+++ b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >@@ -32,64 +32,6 @@ > #include <wtf/WeakPtr.h> > #include <CoreText/CoreText.h> > >-// Note: CTFontDescriptorRefs can live forever in caches inside CoreText, so this object can too. >-@interface WebCascadeList : NSArray { >- @private >- WeakPtr<WebCore::FontCascade> _font; >- UChar32 _character; >- NSUInteger _count; >- Vector<RetainPtr<CTFontDescriptorRef>, 16> _fontDescriptors; >-} >- >-- (id)initWithFont:(const WebCore::FontCascade*)font character:(UChar32)character; >- >-@end >- >-@implementation WebCascadeList >- >-- (id)initWithFont:(const WebCore::FontCascade*)font character:(UChar32)character >-{ >- if (!(self = [super init])) >- return nil; >- >- _font = font->createWeakPtr(); >- _character = character; >- >- // By the time a WebCascadeList is used, the FontCascade has already been asked to realize all of its >- // Fonts, so this loop does not hit the FontCache. >- while (!_font->fallbackRangesAt(_count).isNull()) >- _count++; >- >- return self; >-} >- >-- (NSUInteger)count >-{ >- return _font ? _count : 0; >-} >- >-- (id)objectAtIndex:(NSUInteger)index >-{ >- if (!_font) >- return nil; >- >- CTFontDescriptorRef fontDescriptor; >- if (index < _fontDescriptors.size()) { >- if ((fontDescriptor = _fontDescriptors[index].get())) >- return (id)fontDescriptor; >- } else >- _fontDescriptors.grow(index + 1); >- >- const WebCore::Font* font = _font->fallbackRangesAt(index).fontForCharacter(_character); >- if (!font) >- font = &_font->fallbackRangesAt(index).fontForFirstRange(); >- fontDescriptor = CTFontCopyFontDescriptor(font->platformData().ctFont()); >- _fontDescriptors[index] = adoptCF(fontDescriptor); >- return (id)fontDescriptor; >-} >- >-@end >- > namespace WebCore { > > ComplexTextController::ComplexTextRun::ComplexTextRun(CTRunRef ctRun, const Font& font, const UChar* characters, unsigned stringLocation, unsigned stringLength, unsigned indexBegin, unsigned indexEnd) >@@ -191,18 +133,8 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, > font = m_font.fallbackRangesAt(0).fontForCharacter(baseCharacter); > if (!font) > font = &m_font.fallbackRangesAt(0).fontForFirstRange(); >- >- RetainPtr<WebCascadeList> cascadeList = adoptNS([[WebCascadeList alloc] initWithFont:&m_font character:baseCharacter]); >- >- stringAttributes = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, font->getCFStringAttributes(m_font.enableKerning(), font->platformData().orientation()))); >- static const void* attributeKeys[] = { kCTFontCascadeListAttribute }; >- const void* values[] = { cascadeList.get() }; >- RetainPtr<CFDictionaryRef> attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, attributeKeys, values, sizeof(attributeKeys) / sizeof(*attributeKeys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); >- RetainPtr<CTFontDescriptorRef> fontDescriptor = adoptCF(CTFontDescriptorCreateWithAttributes(attributes.get())); >- RetainPtr<CTFontRef> fontWithCascadeList = adoptCF(CTFontCreateCopyWithAttributes(font->platformData().ctFont(), m_font.pixelSize(), 0, fontDescriptor.get())); >- CFDictionarySetValue(const_cast<CFMutableDictionaryRef>(stringAttributes.get()), kCTFontAttributeName, fontWithCascadeList.get()); >- } else >- stringAttributes = font->getCFStringAttributes(m_font.enableKerning(), font->platformData().orientation()); >+ } >+ stringAttributes = font->getCFStringAttributes(m_font.enableKerning(), font->platformData().orientation()); > > RetainPtr<CTLineRef> line; >
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 186007
:
341374
|
341378
|
341381
|
341382
|
341383
|
341384