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
/
src-third_party-Webkit.diff
190 lines (165 loc) · 7.36 KB
/
src-third_party-Webkit.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
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..7e33d89 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
@@ -214,7 +215,7 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
RetainPtr<CTLineRef> line;
- if (!m_mayUseNaturalWritingDirection || m_run.directionalOverride()) {
+ if (!m_mayUseNaturalWritingDirection || m_run.directionalOverride() || true) {
static const void* optionKeys[] = { kCTTypesetterOptionForcedEmbeddingLevel };
const short ltrForcedEmbeddingLevelValue = 0;
const short rtlForcedEmbeddingLevelValue = 1;
@@ -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..9336eef 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,8 +440,8 @@ bool SimpleFontData::canRenderCombiningCharacterSequence(const UChar* characters
return false;
}
- addResult.storedValue->value = true;
- return true;
+ addResult.storedValue->value = true;*/
+ return false;
}
} // namespace WebCore
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