This repository has been archived by the owner on Feb 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
patr0nus
committed
Jul 29, 2014
1 parent
f663ea9
commit d96f088
Showing
2 changed files
with
599 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
diff --git a/Source/core/rendering/RenderThemeChromiumMac.mm b/Source/core/rendering/RenderThemeChromiumMac.mm | ||
index 4f41185..d85acc0 100644 | ||
--- a/Source/core/rendering/RenderThemeChromiumMac.mm | ||
+++ b/Source/core/rendering/RenderThemeChromiumMac.mm | ||
@@ -142,14 +142,14 @@ const double progressAnimationNumFrames = 256; | ||
} | ||
|
||
@end | ||
- | ||
+/*MAS | ||
// Forward declare Mac SPIs. | ||
extern "C" { | ||
void _NSDrawCarbonThemeBezel(NSRect frame, BOOL enabled, BOOL flipped); | ||
// Request for public API: rdar://13787640 | ||
void _NSDrawCarbonThemeListBox(NSRect frame, BOOL enabled, BOOL flipped, BOOL always_yes); | ||
} | ||
- | ||
+*/ | ||
namespace WebCore { | ||
|
||
using namespace HTMLNames; | ||
@@ -770,7 +770,7 @@ bool RenderThemeChromiumMac::paintTextField(RenderObject* o, const PaintInfo& pa | ||
// of painting its own background. We need WebCore to paint styled backgrounds, so we'll use | ||
// this AppKit SPI function instead. | ||
if (!useNSTextFieldCell) { | ||
- _NSDrawCarbonThemeBezel(r, isEnabled(o) && !isReadOnlyControl(o), YES); | ||
+ //_NSDrawCarbonThemeBezel(r, isEnabled(o) && !isReadOnlyControl(o), YES);MAS | ||
return false; | ||
} | ||
#endif | ||
@@ -852,7 +852,7 @@ bool RenderThemeChromiumMac::paintCapsLockIndicator(RenderObject*, const PaintIn | ||
bool RenderThemeChromiumMac::paintTextArea(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r) | ||
{ | ||
LocalCurrentGraphicsContext localContext(paintInfo.context); | ||
- _NSDrawCarbonThemeListBox(r, isEnabled(o) && !isReadOnlyControl(o), YES, YES); | ||
+ //_NSDrawCarbonThemeListBox(r, isEnabled(o) && !isReadOnlyControl(o), YES, YES);MAS | ||
return false; | ||
} | ||
|
||
diff --git a/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm b/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm | ||
index 86bc893..d9fac9c 100644 | ||
--- a/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm | ||
+++ b/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm | ||
@@ -32,12 +32,13 @@ | ||
|
||
#include <ApplicationServices/ApplicationServices.h> | ||
#import <AvailabilityMacros.h> | ||
- | ||
+/*MAS | ||
// Forward declare Mac SPIs. | ||
extern "C" { | ||
// Request for public API: rdar://13803619 | ||
CTLineRef CTLineCreateWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void* context), void (*dispose)(const UniChar* chars, void* context), void* context); | ||
} | ||
+*/ | ||
|
||
@interface WebCascadeList : NSArray { | ||
@private | ||
@@ -236,7 +237,7 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, | ||
} else { | ||
ProviderInfo info = { cp, length, stringAttributes.get() }; | ||
|
||
- line.adoptCF(CTLineCreateWithUniCharProvider(&provideStringAndAttributes, 0, &info)); | ||
+ //line.adoptCF(CTLineCreateWithUniCharProvider(&provideStringAndAttributes, 0, &info)); | ||
} | ||
|
||
m_coreTextLines.append(line.get()); | ||
diff --git a/Source/platform/fonts/mac/SimpleFontDataMac.mm b/Source/platform/fonts/mac/SimpleFontDataMac.mm | ||
index c8e4421..db203b7 100644 | ||
--- a/Source/platform/fonts/mac/SimpleFontDataMac.mm | ||
+++ b/Source/platform/fonts/mac/SimpleFontDataMac.mm | ||
@@ -59,9 +59,9 @@ enum CGFontRenderingMode { | ||
extern "C" { | ||
// Request for public API: rdar://13803586 | ||
bool CGFontGetGlyphAdvancesForStyle(CGFontRef font, CGAffineTransform* transform, CGFontRenderingMode renderingMode, ATSGlyphRef* glyph, size_t count, CGSize* advance); | ||
- | ||
+//CTLineRef CTLineCreateWithAttributedString(CFAttributedStringRef string); | ||
// Request for public API: rdar://13803619 | ||
-CTLineRef CTLineCreateWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void* context), void (*dispose)(const UniChar* chars, void* context), void* context); | ||
+//CTLineRef CTLineCreateWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void* context), void (*dispose)(const UniChar* chars, void* context), void* context); | ||
} | ||
|
||
static CGFontRenderingMode cgFontRenderingModeForNSFont(NSFont* font) { | ||
@@ -413,7 +413,7 @@ static const UniChar* provideStringAndAttributes(CFIndex stringIndex, CFIndex* c | ||
bool SimpleFontData::canRenderCombiningCharacterSequence(const UChar* characters, size_t length) const | ||
{ | ||
ASSERT(isMainThread()); | ||
- | ||
+/*MAS | ||
if (!m_combiningCharacterSequenceSupport) | ||
m_combiningCharacterSequenceSupport = adoptPtr(new HashMap<String, bool>); | ||
|
||
@@ -423,8 +423,9 @@ bool SimpleFontData::canRenderCombiningCharacterSequence(const UChar* characters | ||
|
||
RetainPtr<CGFontRef> cgFont(AdoptCF, CTFontCopyGraphicsFont(platformData().ctFont(), 0)); | ||
|
||
- ProviderInfo info = { characters, length, getCFStringAttributes(0, platformData().orientation()) }; | ||
- RetainPtr<CTLineRef> line(AdoptCF, CTLineCreateWithUniCharProvider(&provideStringAndAttributes, 0, &info)); | ||
+ //ProviderInfo info = { characters, length, getCFStringAttributes(0, platformData().orientation()) }; | ||
+ CFAttributedStringRef attrStr = CFAttributedStringCreate(NULL, characters, getCFStringAttributes(0, platformData().orientation())) | ||
+ RetainPtr<CTLineRef> line(AdoptCF, CTLineCreateWithAttributedString(attrStr)); | ||
|
||
CFArrayRef runArray = CTLineGetGlyphRuns(line.get()); | ||
CFIndex runCount = CFArrayGetCount(runArray); | ||
@@ -439,7 +440,7 @@ bool SimpleFontData::canRenderCombiningCharacterSequence(const UChar* characters | ||
return false; | ||
} | ||
|
||
- addResult.storedValue->value = true; | ||
+ addResult.storedValue->value = true;*/ | ||
return true; | ||
} | ||
|
||
diff --git a/Source/platform/mac/KillRingMac.mm b/Source/platform/mac/KillRingMac.mm | ||
index 350a646..2dcf8b6 100644 | ||
--- a/Source/platform/mac/KillRingMac.mm | ||
+++ b/Source/platform/mac/KillRingMac.mm | ||
@@ -27,7 +27,7 @@ | ||
#import "platform/KillRing.h" | ||
|
||
namespace WebCore { | ||
- | ||
+/*MAS | ||
extern "C" { | ||
|
||
// Kill ring calls. Would be better to use NSKillRing.h, but that's not available as API or SPI. | ||
@@ -40,44 +40,45 @@ void _NSNewKillRingSequence(); | ||
void _NSSetKillRingToYankedState(); | ||
|
||
} | ||
- | ||
+*/ | ||
static void initializeKillRingIfNeeded() | ||
{ | ||
static bool initializedKillRing = false; | ||
if (!initializedKillRing) { | ||
initializedKillRing = true; | ||
- _NSInitializeKillRing(); | ||
+ //_NSInitializeKillRing(); | ||
} | ||
} | ||
|
||
void KillRing::append(const String& string) | ||
{ | ||
initializeKillRingIfNeeded(); | ||
- _NSAppendToKillRing(string); | ||
+ //_NSAppendToKillRing(string); | ||
} | ||
|
||
void KillRing::prepend(const String& string) | ||
{ | ||
initializeKillRingIfNeeded(); | ||
- _NSPrependToKillRing(string); | ||
+ //_NSPrependToKillRing(string); | ||
} | ||
|
||
String KillRing::yank() | ||
{ | ||
initializeKillRingIfNeeded(); | ||
- return _NSYankFromKillRing(); | ||
+ return String(); | ||
+ //return _NSYankFromKillRing(); | ||
} | ||
|
||
void KillRing::startNewSequence() | ||
{ | ||
initializeKillRingIfNeeded(); | ||
- _NSNewKillRingSequence(); | ||
+ //_NSNewKillRingSequence(); | ||
} | ||
|
||
void KillRing::setToYankedState() | ||
{ | ||
initializeKillRingIfNeeded(); | ||
- _NSSetKillRingToYankedState(); | ||
+ //_NSSetKillRingToYankedState(); | ||
} | ||
|
||
} // namespace WebCore |
Oops, something went wrong.