зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 3 changesets (bug 1353000) for devtools failures a=backout CLOSED TREE
Backed out changeset 7ef3333cedf5 (bug 1353000) Backed out changeset bd127ce305c7 (bug 1353000) Backed out changeset 10e777bb90dc (bug 1353000) --HG-- extra : amend_source : 8db7e67b22347962be0fdb055df1bb2c1853ab67
This commit is contained in:
Родитель
d35dad15a5
Коммит
1196244596
|
@ -2584,7 +2584,7 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
|
|||
CacheHashKey key(aText, aLength, aHash,
|
||||
aRunScript,
|
||||
aAppUnitsPerDevUnit,
|
||||
aFlags, aRounding);
|
||||
aFlags);
|
||||
|
||||
CacheHashEntry *entry = mWordCache->PutEntry(key);
|
||||
if (!entry) {
|
||||
|
@ -2618,7 +2618,7 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
|
|||
#endif
|
||||
|
||||
sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit,
|
||||
aFlags, aRounding);
|
||||
aFlags);
|
||||
entry->mShapedWord.reset(sw);
|
||||
if (!sw) {
|
||||
NS_WARNING("failed to create gfxShapedWord - expect missing text");
|
||||
|
@ -2643,7 +2643,6 @@ gfxFont::CacheHashEntry::KeyEquals(const KeyTypePointer aKey) const
|
|||
}
|
||||
if (sw->GetLength() != aKey->mLength ||
|
||||
sw->GetFlags() != aKey->mFlags ||
|
||||
sw->GetRounding() != aKey->mRounding ||
|
||||
sw->GetAppUnitsPerDevUnit() != aKey->mAppUnitsPerDevUnit ||
|
||||
sw->GetScript() != aKey->mScript) {
|
||||
return false;
|
||||
|
|
|
@ -1190,8 +1190,7 @@ public:
|
|||
static gfxShapedWord* Create(const uint8_t *aText, uint32_t aLength,
|
||||
Script aRunScript,
|
||||
int32_t aAppUnitsPerDevUnit,
|
||||
uint32_t aFlags,
|
||||
gfxFontShaper::RoundingFlags aRounding) {
|
||||
uint32_t aFlags) {
|
||||
NS_ASSERTION(aLength <= gfxPlatform::GetPlatform()->WordCacheCharLimit(),
|
||||
"excessive length for gfxShapedWord!");
|
||||
|
||||
|
@ -1207,15 +1206,13 @@ public:
|
|||
|
||||
// Construct in the pre-allocated storage, using placement new
|
||||
return new (storage) gfxShapedWord(aText, aLength, aRunScript,
|
||||
aAppUnitsPerDevUnit, aFlags,
|
||||
aRounding);
|
||||
aAppUnitsPerDevUnit, aFlags);
|
||||
}
|
||||
|
||||
static gfxShapedWord* Create(const char16_t *aText, uint32_t aLength,
|
||||
Script aRunScript,
|
||||
int32_t aAppUnitsPerDevUnit,
|
||||
uint32_t aFlags,
|
||||
gfxFontShaper::RoundingFlags aRounding) {
|
||||
uint32_t aFlags) {
|
||||
NS_ASSERTION(aLength <= gfxPlatform::GetPlatform()->WordCacheCharLimit(),
|
||||
"excessive length for gfxShapedWord!");
|
||||
|
||||
|
@ -1227,8 +1224,7 @@ public:
|
|||
LossyAppendUTF16toASCII(nsDependentSubstring(aText, aLength),
|
||||
narrowText);
|
||||
return Create((const uint8_t*)(narrowText.BeginReading()),
|
||||
aLength, aRunScript, aAppUnitsPerDevUnit, aFlags,
|
||||
aRounding);
|
||||
aLength, aRunScript, aAppUnitsPerDevUnit, aFlags);
|
||||
}
|
||||
|
||||
uint32_t size =
|
||||
|
@ -1240,8 +1236,7 @@ public:
|
|||
}
|
||||
|
||||
return new (storage) gfxShapedWord(aText, aLength, aRunScript,
|
||||
aAppUnitsPerDevUnit, aFlags,
|
||||
aRounding);
|
||||
aAppUnitsPerDevUnit, aFlags);
|
||||
}
|
||||
|
||||
// Override operator delete to properly free the object that was
|
||||
|
@ -1277,10 +1272,6 @@ public:
|
|||
return mScript;
|
||||
}
|
||||
|
||||
gfxFontShaper::RoundingFlags GetRounding() const {
|
||||
return mRounding;
|
||||
}
|
||||
|
||||
void ResetAge() {
|
||||
mAgeCounter = 0;
|
||||
}
|
||||
|
@ -1301,12 +1292,10 @@ private:
|
|||
// Construct storage for a ShapedWord, ready to receive glyph data
|
||||
gfxShapedWord(const uint8_t *aText, uint32_t aLength,
|
||||
Script aRunScript,
|
||||
int32_t aAppUnitsPerDevUnit, uint32_t aFlags,
|
||||
gfxFontShaper::RoundingFlags aRounding)
|
||||
int32_t aAppUnitsPerDevUnit, uint32_t aFlags)
|
||||
: gfxShapedText(aLength, aFlags | gfxTextRunFactory::TEXT_IS_8BIT,
|
||||
aAppUnitsPerDevUnit)
|
||||
, mScript(aRunScript)
|
||||
, mRounding(aRounding)
|
||||
, mAgeCounter(0)
|
||||
{
|
||||
memset(mCharGlyphsStorage, 0, aLength * sizeof(CompressedGlyph));
|
||||
|
@ -1316,11 +1305,9 @@ private:
|
|||
|
||||
gfxShapedWord(const char16_t *aText, uint32_t aLength,
|
||||
Script aRunScript,
|
||||
int32_t aAppUnitsPerDevUnit, uint32_t aFlags,
|
||||
gfxFontShaper::RoundingFlags aRounding)
|
||||
int32_t aAppUnitsPerDevUnit, uint32_t aFlags)
|
||||
: gfxShapedText(aLength, aFlags, aAppUnitsPerDevUnit)
|
||||
, mScript(aRunScript)
|
||||
, mRounding(aRounding)
|
||||
, mAgeCounter(0)
|
||||
{
|
||||
memset(mCharGlyphsStorage, 0, aLength * sizeof(CompressedGlyph));
|
||||
|
@ -1331,8 +1318,6 @@ private:
|
|||
|
||||
Script mScript;
|
||||
|
||||
gfxFontShaper::RoundingFlags mRounding;
|
||||
|
||||
uint32_t mAgeCounter;
|
||||
|
||||
// The mCharGlyphsStorage array is actually a variable-size member;
|
||||
|
@ -2047,23 +2032,18 @@ protected:
|
|||
int32_t mAppUnitsPerDevUnit;
|
||||
PLDHashNumber mHashKey;
|
||||
bool mTextIs8Bit;
|
||||
RoundingFlags mRounding;
|
||||
|
||||
CacheHashKey(const uint8_t *aText, uint32_t aLength,
|
||||
uint32_t aStringHash,
|
||||
Script aScriptCode, int32_t aAppUnitsPerDevUnit,
|
||||
uint32_t aFlags, RoundingFlags aRounding)
|
||||
uint32_t aFlags)
|
||||
: mLength(aLength),
|
||||
mFlags(aFlags),
|
||||
mScript(aScriptCode),
|
||||
mAppUnitsPerDevUnit(aAppUnitsPerDevUnit),
|
||||
mHashKey(aStringHash
|
||||
+ static_cast<int32_t>(aScriptCode)
|
||||
+ aAppUnitsPerDevUnit * 0x100
|
||||
+ aFlags * 0x10000
|
||||
+ int(aRounding)),
|
||||
mTextIs8Bit(true),
|
||||
mRounding(aRounding)
|
||||
mHashKey(aStringHash + static_cast<int32_t>(aScriptCode) +
|
||||
aAppUnitsPerDevUnit * 0x100 + aFlags * 0x10000),
|
||||
mTextIs8Bit(true)
|
||||
{
|
||||
NS_ASSERTION(aFlags & gfxTextRunFactory::TEXT_IS_8BIT,
|
||||
"8-bit flag should have been set");
|
||||
|
@ -2073,18 +2053,14 @@ protected:
|
|||
CacheHashKey(const char16_t *aText, uint32_t aLength,
|
||||
uint32_t aStringHash,
|
||||
Script aScriptCode, int32_t aAppUnitsPerDevUnit,
|
||||
uint32_t aFlags, RoundingFlags aRounding)
|
||||
uint32_t aFlags)
|
||||
: mLength(aLength),
|
||||
mFlags(aFlags),
|
||||
mScript(aScriptCode),
|
||||
mAppUnitsPerDevUnit(aAppUnitsPerDevUnit),
|
||||
mHashKey(aStringHash
|
||||
+ static_cast<int32_t>(aScriptCode)
|
||||
+ aAppUnitsPerDevUnit * 0x100
|
||||
+ aFlags * 0x10000
|
||||
+ int(aRounding)),
|
||||
mTextIs8Bit(false),
|
||||
mRounding(aRounding)
|
||||
mHashKey(aStringHash + static_cast<int32_t>(aScriptCode) +
|
||||
aAppUnitsPerDevUnit * 0x100 + aFlags * 0x10000),
|
||||
mTextIs8Bit(false)
|
||||
{
|
||||
// We can NOT assert that TEXT_IS_8BIT is false in aFlags here,
|
||||
// because this might be an 8bit-only word from a 16-bit textrun,
|
||||
|
|
|
@ -995,7 +995,7 @@ close DATA_TABLES;
|
|||
|
||||
print HEADER "namespace mozilla {\n";
|
||||
print HEADER "namespace unicode {\n";
|
||||
print HEADER "enum class Script : int16_t {\n";
|
||||
print HEADER "enum class Script {\n";
|
||||
for (my $i = 0; $i < scalar @scriptCodeToName; ++$i) {
|
||||
print HEADER " ", $scriptCodeToName[$i], " = ", $i, ",\n";
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Created on Tue Apr 4 21:22:17 2017 from UCD data files with version info:
|
||||
* Created on Tue Nov 15 16:39:42 2016 from UCD data files with version info:
|
||||
*
|
||||
|
||||
# Unicode Character Database
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Created on Tue Apr 4 21:22:17 2017 from UCD data files with version info:
|
||||
* Created on Tue Nov 15 16:39:42 2016 from UCD data files with version info:
|
||||
*
|
||||
|
||||
# Unicode Character Database
|
||||
|
@ -122,7 +122,7 @@ struct nsCharProps2 {
|
|||
|
||||
namespace mozilla {
|
||||
namespace unicode {
|
||||
enum class Script : int16_t {
|
||||
enum class Script {
|
||||
COMMON = 0,
|
||||
INHERITED = 1,
|
||||
ARABIC = 2,
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function draw(id, r, c) {
|
||||
var txt = "TryToTaLLY-" + id + "__________" + r;
|
||||
var ctx = document.getElementById(id).getContext('2d');
|
||||
ctx.font = '15px Arial';
|
||||
ctx.fillStyle = c;
|
||||
if (r) {
|
||||
ctx.save();
|
||||
ctx.rotate(Math.PI / 4);
|
||||
ctx.fillText(txt, 200, 0);
|
||||
ctx.restore();
|
||||
}
|
||||
ctx.fillText(txt, 10, 20);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
canvas { border: 1px solid silver; margin: 10px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="float:left; transform: translate(300px, 150px) scale(3)">
|
||||
<canvas id="c1" width="120" height="50"></canvas>
|
||||
</div>
|
||||
<script>
|
||||
draw("c1", false, "red");
|
||||
draw("c1", false, "green");
|
||||
</script>
|
||||
</body>
|
|
@ -1,31 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function draw(id, r, c) {
|
||||
var txt = "TryToTaLLY-" + id + "__________" + r;
|
||||
var ctx = document.getElementById(id).getContext('2d');
|
||||
ctx.font = '15px Arial';
|
||||
ctx.fillStyle = c;
|
||||
if (r) {
|
||||
ctx.save();
|
||||
ctx.rotate(Math.PI / 4);
|
||||
ctx.fillText(txt, 200, 0);
|
||||
ctx.restore();
|
||||
}
|
||||
ctx.fillText(txt, 10, 20);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
canvas { border: 1px solid silver; margin: 10px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="float:left; transform: translate(300px, 150px) scale(3)">
|
||||
<canvas id="c1" width="120" height="50"></canvas>
|
||||
</div>
|
||||
<script>
|
||||
draw("c1", true, "red");
|
||||
draw("c1", false, "green");
|
||||
</script>
|
||||
</body>
|
|
@ -113,4 +113,3 @@ fuzzy-if(winWidget,94,1575) fuzzy-if(cocoaWidget,1,24) == 1304353-text-global-co
|
|||
== text-indent-1b.html text-indent-1-ref.html
|
||||
|
||||
== 1347147-1.html 1347147-1-ref.html
|
||||
== 1353000-1.html 1353000-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче