зеркало из https://github.com/mozilla/gecko-dev.git
merge mozilla-central to mozilla-inbound. r=merge a=merge
This commit is contained in:
Коммит
e677c266f7
|
@ -352,7 +352,6 @@ mapped-generic-types = [
|
|||
{ generic = true, gecko = "mozilla::ServoCell", servo = "::std::cell::Cell" },
|
||||
{ generic = false, gecko = "ServoNodeData", servo = "AtomicRefCell<ElementData>" },
|
||||
{ generic = false, gecko = "mozilla::ServoWritingMode", servo = "::logical_geometry::WritingMode" },
|
||||
{ generic = false, gecko = "mozilla::ServoFontComputationData", servo = "::properties::FontComputationData" },
|
||||
{ generic = false, gecko = "mozilla::ServoCustomPropertiesMap", servo = "Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>" },
|
||||
{ generic = false, gecko = "mozilla::ServoRuleNode", servo = "Option<::rule_tree::StrongRuleNode>" },
|
||||
{ generic = false, gecko = "mozilla::ServoVisitedStyle", servo = "Option<::servo_arc::RawOffsetArc<::properties::ComputedValues>>" },
|
||||
|
|
|
@ -135,34 +135,6 @@ struct ServoWritingMode {
|
|||
uint8_t mBits;
|
||||
};
|
||||
|
||||
// Don't attempt to read from this
|
||||
// (see comment on ServoFontComputationData
|
||||
enum ServoKeywordSize {
|
||||
Empty, // when the Option is None
|
||||
XXSmall,
|
||||
XSmall,
|
||||
Small,
|
||||
Medium,
|
||||
Large,
|
||||
XLarge,
|
||||
XXLarge,
|
||||
XXXLarge,
|
||||
};
|
||||
|
||||
// Don't attempt to read from this. We can't
|
||||
// always guarantee that the interior representation
|
||||
// of this is correct (the mKeyword field may have a different padding),
|
||||
// but the entire struct should
|
||||
// have the same size and alignment as the Rust version.
|
||||
// Ensure layout tests get run if touching either side.
|
||||
struct ServoFontComputationData {
|
||||
ServoKeywordSize mKeyword;
|
||||
float/*32_t*/ mRatio;
|
||||
int32_t mAbsolute;
|
||||
|
||||
static_assert(sizeof(float) == 4, "float should be 32 bit");
|
||||
};
|
||||
|
||||
struct ServoCustomPropertiesMap {
|
||||
uintptr_t mPtr;
|
||||
};
|
||||
|
@ -270,14 +242,6 @@ private:
|
|||
/// element being matched if it is a link or the nearest ancestor link.
|
||||
mozilla::ServoVisitedStyle visited_style;
|
||||
|
||||
// this is the last member because most of the other members
|
||||
// are pointer sized. This makes it easier to deal with the
|
||||
// alignment of the fields when replacing things via bindgen
|
||||
//
|
||||
// This is opaque, please don't read from it from C++
|
||||
// (see comment on ServoFontComputationData)
|
||||
mozilla::ServoFontComputationData font_computation_data;
|
||||
|
||||
// C++ just sees this struct as a bucket of bits, and will
|
||||
// do the wrong thing if we let it use the default copy ctor/assignment
|
||||
// operator. Remove them so that there is no footgun.
|
||||
|
|
|
@ -588,6 +588,7 @@ enum class StyleDisplay : uint8_t {
|
|||
#define NS_STYLE_FONT_SIZE_XXXLARGE 7 // Only used by <font size="7">. Not specifiable in CSS.
|
||||
#define NS_STYLE_FONT_SIZE_LARGER 8
|
||||
#define NS_STYLE_FONT_SIZE_SMALLER 9
|
||||
#define NS_STYLE_FONT_SIZE_NO_KEYWORD 10 // Used by Servo to track the "no keyword" case
|
||||
|
||||
// See nsStyleFont
|
||||
// We should eventually stop using the NS_STYLE_* variants here.
|
||||
|
|
|
@ -111,6 +111,9 @@ static bool AreShadowArraysEqual(nsCSSShadowArray* lhs, nsCSSShadowArray* rhs);
|
|||
nsStyleFont::nsStyleFont(const nsFont& aFont, const nsPresContext* aContext)
|
||||
: mFont(aFont)
|
||||
, mSize(nsStyleFont::ZoomText(aContext, mFont.size))
|
||||
, mFontSizeFactor(1.0)
|
||||
, mFontSizeOffset(0)
|
||||
, mFontSizeKeyword(NS_STYLE_FONT_SIZE_MEDIUM)
|
||||
, mGenericID(kGenericFont_NONE)
|
||||
, mScriptLevel(0)
|
||||
, mMathVariant(NS_MATHML_MATHVARIANT_NONE)
|
||||
|
@ -131,6 +134,9 @@ nsStyleFont::nsStyleFont(const nsFont& aFont, const nsPresContext* aContext)
|
|||
nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
|
||||
: mFont(aSrc.mFont)
|
||||
, mSize(aSrc.mSize)
|
||||
, mFontSizeFactor(aSrc.mFontSizeFactor)
|
||||
, mFontSizeOffset(aSrc.mFontSizeOffset)
|
||||
, mFontSizeKeyword(aSrc.mFontSizeKeyword)
|
||||
, mGenericID(aSrc.mGenericID)
|
||||
, mScriptLevel(aSrc.mScriptLevel)
|
||||
, mMathVariant(aSrc.mMathVariant)
|
||||
|
|
|
@ -198,6 +198,14 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleFont
|
|||
// mFont.size should be used for display purposes
|
||||
// while mSize is the value to return in
|
||||
// getComputedStyle() for example.
|
||||
|
||||
// In stylo these three track whether the size is keyword-derived
|
||||
// and if so if it has been modified by a factor/offset
|
||||
float mFontSizeFactor;
|
||||
nscoord mFontSizeOffset;
|
||||
uint8_t mFontSizeKeyword; // NS_STYLE_FONT_SIZE_*, is NS_STYLE_FONT_SIZE_NO_KEYWORD
|
||||
// when not keyword-derived
|
||||
|
||||
uint8_t mGenericID; // [inherited] generic CSS font family, if any;
|
||||
// value is a kGenericFont_* constant, see nsFont.h.
|
||||
|
||||
|
|
|
@ -1140,4 +1140,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
|||
|
||||
static const int32_t kUnknownId = -1;
|
||||
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1514655026300000);
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1514742050390000);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -8,7 +8,7 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1517074215988000);
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1517161240575000);
|
||||
%%
|
||||
0-1.party, 1
|
||||
0.me.uk, 1
|
||||
|
@ -116,7 +116,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1517074215988000);
|
|||
132kv.ch, 1
|
||||
13318522.com, 1
|
||||
1359826938.rsc.cdn77.org, 1
|
||||
13826145000.com, 1
|
||||
1391kj.com, 1
|
||||
1395kj.com, 1
|
||||
1396.cc, 1
|
||||
|
@ -220,7 +219,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1517074215988000);
|
|||
2gen.com, 1
|
||||
2hypeenterprises.com, 1
|
||||
2kgwf.fi, 1
|
||||
2krueger.de, 1
|
||||
2mb.solutions, 1
|
||||
2nains.ch, 1
|
||||
2nerds1bit.com, 1
|
||||
|
@ -332,6 +330,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1517074215988000);
|
|||
500p.xyz, 1
|
||||
50plusnet.nl, 1
|
||||
513vpn.net, 1
|
||||
517vpn.cn, 1
|
||||
518maicai.com, 1
|
||||
525.info, 1
|
||||
52neptune.com, 1
|
||||
|
@ -886,6 +885,7 @@ ahxxm.com, 1
|
|||
ai-english.jp, 1
|
||||
aia.de, 1
|
||||
aibenzi.com, 1
|
||||
aicial.com, 1
|
||||
aidanmontare.net, 1
|
||||
aide-valais.ch, 1
|
||||
aiden.link, 1
|
||||
|
@ -893,6 +893,7 @@ aidhan.net, 1
|
|||
aidikofflaw.com, 1
|
||||
aie.de, 1
|
||||
aiesecarad.ro, 1
|
||||
aiforsocialmedia.com, 1
|
||||
aigcev.org, 1
|
||||
aiicy.org, 1
|
||||
aiida.se, 1
|
||||
|
@ -1033,6 +1034,7 @@ alexgaynor.net, 1
|
|||
alexhaydock.co.uk, 1
|
||||
alexhd.de, 1
|
||||
alexisabarca.com, 1
|
||||
alexischaussy.xyz, 1
|
||||
alexkott.com, 1
|
||||
alexmak.net, 1
|
||||
alexmerkel.com, 1
|
||||
|
@ -1461,7 +1463,6 @@ anseo.ninja, 1
|
|||
ansermet.net, 1
|
||||
ansgar-sonntag.de, 1
|
||||
ansgarsonntag.de, 1
|
||||
anshuman-chatterjee.com, 0
|
||||
anshumanbiswas.com, 1
|
||||
ansogning-sg.dk, 1
|
||||
anstaskforce.gov, 1
|
||||
|
@ -2027,7 +2028,6 @@ auntie-eileens.com.au, 1
|
|||
auplidespages.fr, 1
|
||||
aur.rocks, 1
|
||||
aureus.pw, 1
|
||||
auri.ga, 1
|
||||
auricblue.com, 1
|
||||
auriko-games.de, 1
|
||||
aurora-multimedia.co.uk, 1
|
||||
|
@ -2086,7 +2086,6 @@ autoterminus-used.be, 1
|
|||
autoverzekeringafsluiten.com, 1
|
||||
autoxy.it, 1
|
||||
autozane.com, 1
|
||||
auvernet.org, 1
|
||||
auxquatrevents.ch, 1
|
||||
ava-creative.de, 0
|
||||
avaaz.org, 1
|
||||
|
@ -2268,7 +2267,6 @@ bajic.ch, 1
|
|||
baka.network, 1
|
||||
bakabt.info, 1
|
||||
bakaproxy.moe, 1
|
||||
bakaweb.fr, 1
|
||||
bakersafari.co, 1
|
||||
bakim.li, 1
|
||||
bakkerinjebuurt.be, 1
|
||||
|
@ -2563,7 +2561,6 @@ belfasttechservices.co.uk, 1
|
|||
belge.rs, 1
|
||||
belgers.com, 1
|
||||
belgien.guide, 1
|
||||
belhopro.be, 1
|
||||
belics.com, 1
|
||||
belien-tweedehandswagens.be, 1
|
||||
believablebook.com, 0
|
||||
|
@ -2694,7 +2691,6 @@ betamint.org, 1
|
|||
betaworx.de, 1
|
||||
betaworx.eu, 1
|
||||
betformular.com, 1
|
||||
bethanyduke.com, 1
|
||||
betkoo.com, 1
|
||||
betlander.com, 1
|
||||
betonmoney.com, 1
|
||||
|
@ -2748,6 +2744,7 @@ beyours.be, 1
|
|||
bezoomnyville.com, 1
|
||||
bezpecnostsiti.cf, 1
|
||||
bfam.tv, 1
|
||||
bfd.vodka, 1
|
||||
bfi.wien, 0
|
||||
bfrailwayclub.cf, 1
|
||||
bftbradio.com, 1
|
||||
|
@ -2858,7 +2855,6 @@ binaryapparatus.com, 1
|
|||
binaryappdev.com, 1
|
||||
binaryevolved.com, 1
|
||||
binaryfigments.com, 1
|
||||
binarystud.io, 1
|
||||
binding-problem.com, 1
|
||||
binfind.com, 1
|
||||
bingcheung.com, 1
|
||||
|
@ -3143,7 +3139,6 @@ bltc.org.uk, 1
|
|||
blubberladen.de, 1
|
||||
blue-leaf81.net, 1
|
||||
blue42.net, 1
|
||||
bluebill.net, 1
|
||||
bluecards.eu, 1
|
||||
bluechilli.com, 1
|
||||
bluecon.ninja, 1
|
||||
|
@ -3326,7 +3321,6 @@ boueki.org, 1
|
|||
bougeret.fr, 1
|
||||
boukoubengo.com, 1
|
||||
bounceboxspc.com, 1
|
||||
bouncourseplanner.net, 1
|
||||
bouncyball.eu, 0
|
||||
bouncyballs.org, 1
|
||||
bountyfactory.io, 1
|
||||
|
@ -3361,6 +3355,7 @@ boxvergelijker.nl, 1
|
|||
boxview.com, 1
|
||||
boyan.in, 1
|
||||
boyfriendhusband.men, 1
|
||||
boyhost.cn, 1
|
||||
boypoint.de, 1
|
||||
boz.nl, 1
|
||||
bpadvisors.eu, 1
|
||||
|
@ -3458,7 +3453,6 @@ brege.org, 1
|
|||
breitbild-beamer.de, 1
|
||||
brejoc.com, 1
|
||||
brendanscherer.com, 1
|
||||
brenden.net.au, 1
|
||||
brentacampbell.com, 1
|
||||
bress.cloud, 1
|
||||
bressier.fr, 1
|
||||
|
@ -3585,7 +3579,6 @@ btxiaobai.com, 1
|
|||
bubba.cc, 1
|
||||
bubblegumblog.com, 1
|
||||
bubblespetspa.com, 1
|
||||
buben.tech, 1
|
||||
bubhub.io, 1
|
||||
buch-angucken.de, 1
|
||||
buck.com, 1
|
||||
|
@ -3732,7 +3725,6 @@ by777.com, 1
|
|||
byatte.com, 1
|
||||
bygningsregistrering.dk, 1
|
||||
byji.com, 1
|
||||
byken.cn, 1
|
||||
bymark.co, 1
|
||||
bymike.co, 1
|
||||
bynder.com, 1
|
||||
|
@ -3773,7 +3765,6 @@ c.cc, 1
|
|||
c16t.uk, 1
|
||||
c2o-library.net, 1
|
||||
c2o2.xyz, 1
|
||||
c3-compose.com, 1
|
||||
c3vo.de, 1
|
||||
c3w.at, 1
|
||||
c4.hk, 1
|
||||
|
@ -4138,7 +4129,6 @@ cdmon.tech, 1
|
|||
cdn6.de, 1
|
||||
cdnjs.com, 1
|
||||
cdns.cloud, 1
|
||||
cdt.org, 1
|
||||
cdu-wilgersdorf.de, 1
|
||||
ce-agentur.de, 1
|
||||
ce-pimkie.fr, 1
|
||||
|
@ -4293,7 +4283,6 @@ chaosdorf.de, 1
|
|||
chaosfield.at, 1
|
||||
chaoslab.org, 1
|
||||
chaospott.de, 1
|
||||
chaoticlaw.com, 1
|
||||
chaouby.com, 1
|
||||
chaplain.co, 1
|
||||
charbonnel.eu, 1
|
||||
|
@ -4521,7 +4510,6 @@ christoph-conrads.name, 1
|
|||
christophebarbezat.ch, 1
|
||||
christopherburg.com, 1
|
||||
christopherl.com, 1
|
||||
christopherpritchard.co.uk, 1
|
||||
christophertruncer.com, 1
|
||||
christophkreileder.com, 1
|
||||
christophsackl.de, 1
|
||||
|
@ -4744,6 +4732,7 @@ cloud2go.de, 1
|
|||
cloudapps.digital, 1
|
||||
cloudbased.info, 1
|
||||
cloudbasedsite.com, 1
|
||||
cloudbleed.info, 1
|
||||
cloudbolin.es, 1
|
||||
cloudcaprice.net, 1
|
||||
cloudflareonazure.com, 1
|
||||
|
@ -4759,7 +4748,6 @@ cloudpagesforwork.com, 1
|
|||
cloudpebble.net, 1
|
||||
cloudpengu.in, 1
|
||||
cloudpipes.com, 1
|
||||
clouds.webcam, 1
|
||||
cloudsecurityalliance.org, 1
|
||||
cloudservice.io, 1
|
||||
cloudspace-analytics.com, 1
|
||||
|
@ -5096,7 +5084,6 @@ condosforcash.com, 1
|
|||
condroz-motors.be, 1
|
||||
conectalmeria.com, 1
|
||||
confiancefoundation.org, 1
|
||||
confidential.network, 1
|
||||
config.schokokeks.org, 0
|
||||
confiwall.de, 1
|
||||
conflux.tw, 1
|
||||
|
@ -5280,6 +5267,7 @@ countingto.one, 1
|
|||
countryattire.com, 1
|
||||
countrybrewer.com.au, 1
|
||||
countryhouseresort.com, 1
|
||||
countryoutlaws.ca, 1
|
||||
countybankdel.com, 1
|
||||
countyjailinmatesearch.com, 1
|
||||
coup-dun-soir.ch, 1
|
||||
|
@ -5851,7 +5839,6 @@ dark-vision.cz, 1
|
|||
darkag.ovh, 1
|
||||
darkcores.net, 1
|
||||
darkdestiny.ch, 1
|
||||
darkengine.net, 1
|
||||
darkeststar.org, 1
|
||||
darkfire.ch, 1
|
||||
darkishgreen.com, 1
|
||||
|
@ -6127,7 +6114,6 @@ defme.eu, 1
|
|||
defrax.com, 1
|
||||
defrax.de, 1
|
||||
deftek.com, 1
|
||||
deftnerd.com, 1
|
||||
defuse.ca, 1
|
||||
defxing.net, 1
|
||||
degata.com, 1
|
||||
|
@ -6177,6 +6163,7 @@ democraziaineuropa.eu, 1
|
|||
demoniak.ch, 1
|
||||
demonwav.com, 1
|
||||
demonwolfdev.com, 1
|
||||
demotivatorbi.ru, 1
|
||||
dempsters.ca, 1
|
||||
demuzere.be, 1
|
||||
demuzere.com, 1
|
||||
|
@ -6271,7 +6258,6 @@ desterman.ru, 1
|
|||
destileria.net.br, 1
|
||||
destinationsofnewyorkstate.com, 1
|
||||
destinattorneyjohngreene.com, 1
|
||||
desu.ne.jp, 1
|
||||
det-te.ch, 1
|
||||
detecte-fuite.ch, 1
|
||||
detecte.ch, 1
|
||||
|
@ -6304,6 +6290,7 @@ developer.mydigipass.com, 0
|
|||
developerfair.com, 1
|
||||
developermail.io, 1
|
||||
developers.facebook.com, 0
|
||||
developersclub.website, 1
|
||||
developfx.com, 1
|
||||
developmentaid.org, 1
|
||||
developmentsites.melbourne, 1
|
||||
|
@ -6319,7 +6306,6 @@ devisnow.fr, 1
|
|||
devistravaux.org, 1
|
||||
devjack.de, 1
|
||||
devkid.net, 1
|
||||
devkit.cc, 1
|
||||
devlamvzw.org, 1
|
||||
devlatron.net, 1
|
||||
devlogr.com, 1
|
||||
|
@ -6329,7 +6315,6 @@ devonsawatzky.ca, 1
|
|||
devops-survey.com, 1
|
||||
devops.moe, 1
|
||||
devpgsv.com, 1
|
||||
devpsy.info, 1
|
||||
devstaff.gr, 1
|
||||
devyn.ca, 1
|
||||
devzero.io, 1
|
||||
|
@ -6553,7 +6538,7 @@ discofitta.com, 1
|
|||
disconformity.net, 1
|
||||
discord-chan.net, 1
|
||||
discordapp.com, 1
|
||||
discotek.club, 1
|
||||
discotek.club, 0
|
||||
discountmetaux.fr, 1
|
||||
discover-mercure.com, 1
|
||||
discoverhealthage.com, 0
|
||||
|
@ -6632,7 +6617,6 @@ dlouwrink.nl, 1
|
|||
dlrsp.org, 1
|
||||
dlzz.net, 1
|
||||
dm.lookout.com, 0
|
||||
dm4productions.com, 1
|
||||
dm7ds.de, 1
|
||||
dmarc.dk, 1
|
||||
dmarketer.com, 1
|
||||
|
@ -7135,6 +7119,7 @@ e-teacher.pl, 1
|
|||
e-tech-solution.com, 1
|
||||
e-tmf.org, 1
|
||||
e-tresor.at, 1
|
||||
e-tune-mt.net, 1
|
||||
e-typ.eu, 1
|
||||
e-vau.de, 1
|
||||
e-wishlist.net, 1
|
||||
|
@ -7434,7 +7419,6 @@ ekzarta.ru, 1
|
|||
el-cell.com, 1
|
||||
el-soul.com, 1
|
||||
eladgames.com, 1
|
||||
elaon.de, 1
|
||||
elars.de, 1
|
||||
elaxy-online.de, 1
|
||||
eldertons.co.uk, 1
|
||||
|
@ -7478,7 +7462,6 @@ elementalict.com, 1
|
|||
elementalrobotics.com, 1
|
||||
elementalsoftware.net, 1
|
||||
elementalsoftware.org, 1
|
||||
elementarywave.com, 1
|
||||
elements.guide, 1
|
||||
elena-baykova.ru, 1
|
||||
elenorsmadness.org, 1
|
||||
|
@ -8038,8 +8021,6 @@ evalesc.com, 1
|
|||
evanfiddes.com, 1
|
||||
evangelosm.com, 1
|
||||
evankurniawan.com, 1
|
||||
evantage.org, 1
|
||||
evantageglobal.com, 1
|
||||
evapp.org, 1
|
||||
evasion-energie.com, 1
|
||||
evasioncreole.com, 1
|
||||
|
@ -8147,6 +8128,7 @@ expandeco.com, 1
|
|||
expecting.com.br, 1
|
||||
experienceoz.com.au, 1
|
||||
expert-korovin.ru, 1
|
||||
expert.cz, 1
|
||||
experteasy.com.au, 1
|
||||
experticon.com, 1
|
||||
experts-en-gestion.fr, 1
|
||||
|
@ -8422,6 +8404,7 @@ fcsic.gov, 1
|
|||
fdlibre.eu, 1
|
||||
fdsys.gov, 0
|
||||
feac.us, 1
|
||||
feaden.me, 1
|
||||
fearghus.org, 1
|
||||
fearsomegaming.com, 1
|
||||
feastr.io, 1
|
||||
|
@ -8748,6 +8731,7 @@ flexstart.me, 1
|
|||
flextrack.dk, 1
|
||||
flightdeckfriend.com, 1
|
||||
flightschoolbooking.com, 1
|
||||
flightschoolcandidates.gov, 1
|
||||
fliino.com, 1
|
||||
flikmsg.co, 1
|
||||
flinch.io, 1
|
||||
|
@ -9129,7 +9113,6 @@ freiwurst.net, 1
|
|||
frenchcreekcog.org, 1
|
||||
frenzel.dk, 1
|
||||
frequencebanane.ch, 1
|
||||
fresh-hotel.org, 1
|
||||
fresh-networks.net, 1
|
||||
fresh.co.il, 1
|
||||
freshcode.nl, 1
|
||||
|
@ -9146,7 +9129,6 @@ frickelboxx.de, 1
|
|||
frickelmeister.de, 1
|
||||
frickenate.com, 1
|
||||
fridaperfumaria.com.br, 1
|
||||
fridolinka.cz, 1
|
||||
friedhelm-wolf.de, 1
|
||||
friedrich-foto-art.de, 1
|
||||
friedsamphotography.com, 1
|
||||
|
@ -9177,7 +9159,6 @@ froh.co.jp, 0
|
|||
frokenblomma.se, 1
|
||||
frolov.net, 1
|
||||
frolova.org, 1
|
||||
fromix.de, 1
|
||||
fromlemaytoz.com, 1
|
||||
fromscratch.rocks, 1
|
||||
fromthesoutherncross.com, 1
|
||||
|
@ -9344,7 +9325,6 @@ g2soft.net, 1
|
|||
g3dev.ch, 1
|
||||
g3rv4.com, 1
|
||||
g4w.co, 1
|
||||
g77.ca, 1
|
||||
gaasuper6.com, 1
|
||||
gabemack.com, 1
|
||||
gabriel.to, 1
|
||||
|
@ -9406,6 +9386,7 @@ gameisbest.jp, 1
|
|||
gamekeysuche.de, 1
|
||||
gamenerd.net, 1
|
||||
gameofbay.org, 1
|
||||
gameofpwnz.com, 1
|
||||
gamepad.com.br, 1
|
||||
gameparagon.info, 1
|
||||
gamercredo.com, 1
|
||||
|
@ -9692,7 +9673,6 @@ getwpd.com, 0
|
|||
getyeflask.com, 1
|
||||
getyou.onl, 1
|
||||
getyourphix.tk, 1
|
||||
gevaulug.fr, 1
|
||||
geyduschek.be, 1
|
||||
gfast.ru, 1
|
||||
gfhgiro.nl, 0
|
||||
|
@ -9717,7 +9697,6 @@ gha.st, 1
|
|||
ghaglund.se, 1
|
||||
ghcif.de, 1
|
||||
ghislainphu.fr, 1
|
||||
ghkim.net, 1
|
||||
ghostblog.info, 1
|
||||
ghostwritershigh.com, 1
|
||||
ghrelinblocker.info, 1
|
||||
|
@ -10130,6 +10109,7 @@ grettogeek.com, 1
|
|||
greuel.online, 1
|
||||
greve.xyz, 1
|
||||
grey.house, 1
|
||||
greybit.net, 1
|
||||
greyhash.se, 1
|
||||
greyskymedia.com, 1
|
||||
greysolutions.it, 1
|
||||
|
@ -10268,6 +10248,7 @@ gunwatch.co.uk, 1
|
|||
guphi.net, 0
|
||||
gurkan.in, 1
|
||||
gurmel.ru, 1
|
||||
gurochan.ch, 1
|
||||
guru-naradi.cz, 1
|
||||
gurueffect.com, 1
|
||||
gus.host, 1
|
||||
|
@ -10674,8 +10655,6 @@ helles-koepfchen.de, 1
|
|||
helloacm.com, 1
|
||||
helloanselm.com, 1
|
||||
hellofilters.com, 1
|
||||
hellomouse.cf, 1
|
||||
hellomouse.tk, 1
|
||||
hellotandem.com, 1
|
||||
hellothought.net, 1
|
||||
hellscanyonraft.com, 1
|
||||
|
@ -10830,7 +10809,6 @@ highlevelwoodlands.com, 1
|
|||
highlnk.com, 1
|
||||
highspeed-arnsberg.de, 1
|
||||
hightechbasementsystems.com, 1
|
||||
hightower.eu, 1
|
||||
highwaytohoell.de, 1
|
||||
higilopocht.li, 1
|
||||
higp.de, 1
|
||||
|
@ -11219,6 +11197,7 @@ hump.dk, 1
|
|||
humpen.se, 1
|
||||
hund.io, 1
|
||||
hundeformel.de, 1
|
||||
hundter.com, 1
|
||||
hunter.io, 1
|
||||
huntingdonlifesciences.com, 1
|
||||
huntshomeinspections.com, 1
|
||||
|
@ -11408,7 +11387,6 @@ idexxpublicationportal.com, 1
|
|||
idgard.de, 1
|
||||
idhosts.co.id, 1
|
||||
idid.tk, 1
|
||||
idinby.dk, 1
|
||||
idiopolis.org, 1
|
||||
idiotentruppe.de, 1
|
||||
idmanagement.gov, 1
|
||||
|
@ -11734,7 +11712,6 @@ inishbofin.ie, 1
|
|||
initq.net, 1
|
||||
initramfs.io, 1
|
||||
initrd.net, 1
|
||||
injust.eu.org, 1
|
||||
ink.horse, 1
|
||||
inkbunny.net, 0
|
||||
inkhor.se, 1
|
||||
|
@ -11874,6 +11851,7 @@ interseller.io, 1
|
|||
intertime.services, 1
|
||||
interview-suite.com, 1
|
||||
interviewpipeline.co.uk, 1
|
||||
interways.de, 1
|
||||
intexplore.org, 1
|
||||
intheater.de, 1
|
||||
inthepicture.com, 1
|
||||
|
@ -11892,6 +11870,7 @@ intramanager.dk, 1
|
|||
intranetsec-regionra.fr, 1
|
||||
intraobes.com, 1
|
||||
intrasoft.com.au, 1
|
||||
intune.life, 1
|
||||
intux.be, 0
|
||||
intvonline.com, 1
|
||||
intxt.net, 1
|
||||
|
@ -12522,7 +12501,6 @@ jialinwu.com, 0
|
|||
jianjia.io, 0
|
||||
jiaqiang.vip, 1
|
||||
jichi.io, 1
|
||||
jichi.me, 1
|
||||
jie.dance, 1
|
||||
jief.me, 1
|
||||
jigsawdevelopments.com, 1
|
||||
|
@ -12533,7 +12511,6 @@ jimmyroura.ch, 1
|
|||
jimshaver.net, 1
|
||||
jinancy.fr, 1
|
||||
jinbo123.com, 0
|
||||
jinbowiki.org, 1
|
||||
jing.su, 1
|
||||
jingjo.com.au, 1
|
||||
jinja.ai, 1
|
||||
|
@ -13196,7 +13173,7 @@ keyihao.cn, 1
|
|||
keyinfo.io, 1
|
||||
keypersonins.com, 1
|
||||
keys.fedoraproject.org, 1
|
||||
keyserver.sexy, 1
|
||||
keyserver.sexy, 0
|
||||
keystoneok.com, 1
|
||||
keysupport.org, 1
|
||||
kf7joz.com, 1
|
||||
|
@ -13232,6 +13209,7 @@ kiddyboom.ua, 1
|
|||
kids-at-home.ch, 1
|
||||
kidsforsavingearth.org, 1
|
||||
kidsinwoods-interfacesouth.org, 1
|
||||
kidsmark.net, 1
|
||||
kidsneversleep.com, 1
|
||||
kidtoyshop.ru, 1
|
||||
kiebel.de, 1
|
||||
|
@ -13457,6 +13435,7 @@ kodakit.com, 1
|
|||
kodden.com.br, 1
|
||||
kode.ch, 1
|
||||
koebbes.de, 1
|
||||
koelbli.ch, 1
|
||||
koelnmafia.de, 1
|
||||
koenigsbrunner-tafel.de, 1
|
||||
koerper-wie-seele.de, 0
|
||||
|
@ -13963,7 +13942,6 @@ lavoieducoeur.be, 1
|
|||
lavolte.net, 1
|
||||
lavval.com, 1
|
||||
law-peters.de, 1
|
||||
lawformt.com, 1
|
||||
lawn-seeds.com, 1
|
||||
lawnuk.com, 1
|
||||
lawrence-institute.com, 1
|
||||
|
@ -13986,7 +13964,6 @@ lbgconsultores.com, 1
|
|||
lbihrhelpdesk.com, 1
|
||||
lbs-logics.com, 1
|
||||
lca-pv.de, 1
|
||||
lcht.ch, 1
|
||||
lcti.biz, 1
|
||||
ld-begunjscica.si, 1
|
||||
ldc.com.br, 0
|
||||
|
@ -14036,7 +14013,6 @@ leavesofchangeweekly.org, 1
|
|||
lebal.se, 1
|
||||
lebanesearmy.gov.lb, 1
|
||||
lebarmy.gov.lb, 1
|
||||
lebens-fluss.at, 1
|
||||
lebihan.pl, 1
|
||||
leblanc.io, 1
|
||||
lebosse.me, 1
|
||||
|
@ -14194,7 +14170,6 @@ letsgowhilewereyoung.com, 1
|
|||
letstalkcounseling.com, 1
|
||||
letterbox-online.de, 1
|
||||
letterdance.de, 1
|
||||
letteringinstitute.com, 1
|
||||
lettersblogatory.com, 1
|
||||
lettland-firma.com, 1
|
||||
lettori.club, 1
|
||||
|
@ -14242,12 +14217,6 @@ lheinrich.de, 1
|
|||
lheinrich.org, 1
|
||||
li-ke.co.jp, 1
|
||||
liangji.com.tw, 0
|
||||
lianye1.cc, 1
|
||||
lianye2.cc, 1
|
||||
lianye3.cc, 1
|
||||
lianye4.cc, 1
|
||||
lianye5.cc, 1
|
||||
lianye6.cc, 1
|
||||
liaozheqi.cn, 1
|
||||
liaronce.win, 1
|
||||
liautard.fr, 1
|
||||
|
@ -14294,7 +14263,6 @@ lidong.me, 1
|
|||
lidow.eu, 1
|
||||
liduan.com, 1
|
||||
liduan.net, 1
|
||||
liebach.me, 1
|
||||
liebel.org, 1
|
||||
liebestarot.at, 1
|
||||
lied8.eu, 1
|
||||
|
@ -14429,7 +14397,6 @@ lirlandais.ch, 1
|
|||
lirnberger.com, 1
|
||||
lisamccorrie.com, 1
|
||||
lisamortimore.com, 1
|
||||
lisgade.dk, 1
|
||||
lisieuxarquitetura.com.br, 1
|
||||
liskgdt.net, 1
|
||||
lislan.org.uk, 1
|
||||
|
@ -14591,7 +14558,6 @@ login.sapo.pt, 1
|
|||
login.ubuntu.com, 1
|
||||
login.xero.com, 0
|
||||
login.yahoo.com, 0
|
||||
logistify.com.mx, 1
|
||||
logitel.de, 1
|
||||
logopaediereinhard.de, 1
|
||||
logopedistalanni.it, 1
|
||||
|
@ -15299,7 +15265,6 @@ masa-hou.com, 1
|
|||
mascosolutions.com, 1
|
||||
maservant.net, 1
|
||||
mashek.net, 1
|
||||
mashnew.com, 1
|
||||
masiniunelte.store.ro, 1
|
||||
masiul.is, 1
|
||||
maskinkultur.com, 1
|
||||
|
@ -15465,7 +15430,6 @@ mbinformatik.de, 0
|
|||
mblankhorst.nl, 1
|
||||
mbp.banking.co.at, 0
|
||||
mbr-net.de, 1
|
||||
mbrooks.info, 1
|
||||
mbs-journey.com, 1
|
||||
mbsec.net, 1
|
||||
mbweir.com, 1
|
||||
|
@ -15501,7 +15465,6 @@ mckinley.school, 1
|
|||
mckinley1.com, 1
|
||||
mckinleytk.com, 1
|
||||
mcl.gg, 1
|
||||
mclyr.com, 1
|
||||
mcmillansedationdentistry.com, 1
|
||||
mcmillanskiclub.com.au, 1
|
||||
mcneill.io, 1
|
||||
|
@ -16313,7 +16276,6 @@ morphy2k.io, 1
|
|||
morteruelo.net, 1
|
||||
mortis.eu, 1
|
||||
mosaic-design.ru, 1
|
||||
mosaique-lachenaie.fr, 1
|
||||
moscow.dating, 1
|
||||
mosfet.cz, 1
|
||||
mosin.org, 1
|
||||
|
@ -16377,7 +16339,6 @@ mpc-hc.org, 1
|
|||
mpcompliance.com, 1
|
||||
mpe.org, 1
|
||||
mpetroff.net, 1
|
||||
mpg-universal.com, 1
|
||||
mpg.ovh, 1
|
||||
mpi-sa.fr, 1
|
||||
mpintaamalabanna.it, 1
|
||||
|
@ -16591,7 +16552,6 @@ my-floor.com, 1
|
|||
my-host.ovh, 1
|
||||
my-hps.de, 1
|
||||
my-ip.work, 1
|
||||
my-pawnshop.com.ua, 0
|
||||
my-plancha.ch, 1
|
||||
my-static-demo-808795.c.cdn77.org, 1
|
||||
my-static-live-808795.c.cdn77.org, 1
|
||||
|
@ -16810,7 +16770,6 @@ naganithin.me, 1
|
|||
nagaragem.com.br, 1
|
||||
nagaya.biz, 1
|
||||
nagb.gov, 1
|
||||
nagb.org, 1
|
||||
nagel-dentaltechnik.de, 1
|
||||
nagelfam.com, 1
|
||||
naggie.net, 1
|
||||
|
@ -16835,7 +16794,6 @@ nalukfitness.com.br, 1
|
|||
namegrep.com, 1
|
||||
nameid.org, 1
|
||||
namepros.com, 1
|
||||
namereel.com, 1
|
||||
nametiles.co, 1
|
||||
namikawatetsuji.jp, 1
|
||||
naminam.de, 1
|
||||
|
@ -17391,6 +17349,7 @@ ninaundandre.de, 1
|
|||
ninchat.com, 1
|
||||
nine-hells.net, 0
|
||||
ninebennink.com, 1
|
||||
ninespec.com, 1
|
||||
ninetaillabs.com, 1
|
||||
ninetaillabs.xyz, 1
|
||||
ning.so, 1
|
||||
|
@ -17477,7 +17436,6 @@ nohttps.org, 1
|
|||
nohup.se, 1
|
||||
nohup.xyz, 1
|
||||
noincludesubdomains.preloaded.test, 0
|
||||
noisebridge.social, 1
|
||||
noisetrap.cz, 1
|
||||
noisky.cn, 1
|
||||
noisyfox.cn, 1
|
||||
|
@ -18193,7 +18151,6 @@ oszri.hu, 1
|
|||
otako.pl, 1
|
||||
otakubox.de, 1
|
||||
otakurepublic.com, 1
|
||||
otchecker.com, 1
|
||||
otellio.com, 1
|
||||
otellio.de, 1
|
||||
otellio.it, 1
|
||||
|
@ -18234,6 +18191,7 @@ outpostinfo.com, 1
|
|||
outsideconnections.com, 1
|
||||
over25tips.com, 1
|
||||
overalglas.nl, 1
|
||||
overclockers.ge, 1
|
||||
overkillshop.com, 1
|
||||
overseamusic.de, 1
|
||||
oversight.garden, 1
|
||||
|
@ -18259,7 +18217,6 @@ ownmay.com, 1
|
|||
ownspec.com, 1
|
||||
oxanababy.com, 1
|
||||
oxelie.com, 1
|
||||
oxro.co, 1
|
||||
oxygaming.com, 1
|
||||
oxymc.com, 1
|
||||
oxynux.xyz, 1
|
||||
|
@ -18387,7 +18344,6 @@ panthur.com.au, 0
|
|||
pantou.org, 0
|
||||
panzer72.ru, 1
|
||||
pap.la, 0
|
||||
papa-webzeit.de, 1
|
||||
papadopoulos.me, 1
|
||||
papakatsu-life.com, 1
|
||||
papatest24.de, 1
|
||||
|
@ -18545,7 +18501,6 @@ pauladamsmith.com, 1
|
|||
paulbakaus.com, 1
|
||||
paulbdelaat.nl, 1
|
||||
paulbramhall.uk, 1
|
||||
paulchen.at, 1
|
||||
pauldcox.com, 1
|
||||
paulerhof.com, 1
|
||||
paulewen.ca, 1
|
||||
|
@ -18612,7 +18567,6 @@ pbxapi.com, 1
|
|||
pbytes.com, 1
|
||||
pc-rescue.me, 1
|
||||
pc-tweak.de, 1
|
||||
pcat.io, 1
|
||||
pccentral.nl, 1
|
||||
pcel.com, 1
|
||||
pcf92.fr, 1
|
||||
|
@ -18648,6 +18602,7 @@ pedrosluiter.nl, 1
|
|||
pedroventura.com, 0
|
||||
peeekaaabooo.com, 1
|
||||
peekier.com, 1
|
||||
peekops.com, 1
|
||||
peep.gq, 1
|
||||
peercraft.at, 1
|
||||
peercraft.be, 1
|
||||
|
@ -18670,6 +18625,7 @@ peercraft.pl, 1
|
|||
peercraft.pt, 1
|
||||
peercraft.se, 1
|
||||
peercraft.us, 1
|
||||
peerless.ae, 1
|
||||
peername.com, 1
|
||||
peervpn.net, 1
|
||||
peeters.io, 1
|
||||
|
@ -19155,7 +19111,6 @@ ploofer.com, 1
|
|||
plot.ly, 1
|
||||
ploxel.com, 1
|
||||
plr4wp.com, 1
|
||||
plsboop.me, 1
|
||||
pluga.co, 1
|
||||
plugboard.xyz, 1
|
||||
plugcubed.net, 0
|
||||
|
@ -19554,7 +19509,6 @@ productgap.com, 1
|
|||
productived.net, 1
|
||||
proefteksten.nl, 0
|
||||
prof.ch, 1
|
||||
profection.biz, 1
|
||||
professionalboundaries.com, 1
|
||||
professors.ee, 1
|
||||
profidea.cz, 1
|
||||
|
@ -19962,6 +19916,7 @@ r0uzic.net, 1
|
|||
r2d2pc.com, 1
|
||||
r3nt3r.com, 1
|
||||
r3s1stanc3.me, 1
|
||||
r40.us, 1
|
||||
r6-team.ru, 1
|
||||
r7h.at, 1
|
||||
r811.de, 1
|
||||
|
@ -20174,6 +20129,9 @@ reality0ne.com, 1
|
|||
reallifeforums.com, 1
|
||||
realloc.me, 1
|
||||
really-simple-ssl.com, 1
|
||||
really.ai, 1
|
||||
really.io, 1
|
||||
reallyreally.io, 1
|
||||
realmofespionage.xyz, 1
|
||||
realwaycome.com, 1
|
||||
realwildart.com, 1
|
||||
|
@ -20352,6 +20310,7 @@ remaimodern.org, 1
|
|||
remambo.jp, 1
|
||||
remedioparaherpes.com, 1
|
||||
remedioscaserosparalacistitis.com, 1
|
||||
remedioskaseros.com, 0
|
||||
remedyrehab.com, 1
|
||||
rememberthemilk.com, 0
|
||||
remonti.info, 1
|
||||
|
@ -20443,7 +20402,6 @@ restaurantesimonetti.com.br, 1
|
|||
restaurantmangal.ch, 1
|
||||
rester-a-domicile.ch, 1
|
||||
rester-autonome-chez-soi.ch, 1
|
||||
restioson.me, 1
|
||||
restoran-radovce.me, 1
|
||||
restoreresearchstudy.com, 1
|
||||
restoruns.com, 1
|
||||
|
@ -20627,8 +20585,8 @@ rmmanfredi.com, 1
|
|||
rmpsolution.de, 1
|
||||
rms.sexy, 1
|
||||
rmsides.com, 1
|
||||
rmstudio.tw, 1
|
||||
rnag.ie, 1
|
||||
rnb-storenbau.ch, 1
|
||||
rnt.cl, 1
|
||||
ro.search.yahoo.com, 0
|
||||
roadguard.nl, 1
|
||||
|
@ -20728,12 +20686,10 @@ rokki.ch, 1
|
|||
rokort.dk, 1
|
||||
rokudenashi.de, 1
|
||||
roland.io, 1
|
||||
rolandkolodziej.com, 1
|
||||
rolandslate.com, 1
|
||||
rolandszabo.com, 1
|
||||
rolliwelt.de, 1
|
||||
rolodato.com, 1
|
||||
romaimperator.com, 1
|
||||
romainmuller.xyz, 1
|
||||
roman-pavlik.cz, 1
|
||||
romanpavlodar.kz, 1
|
||||
|
@ -21112,7 +21068,6 @@ saltercane.com, 0
|
|||
saltro.nl, 1
|
||||
saltstack.cz, 1
|
||||
salud.top, 0
|
||||
saludsexualmasculina.org, 1
|
||||
saludsis.mil.co, 1
|
||||
salutethepig.com, 1
|
||||
salverainha.org, 1
|
||||
|
@ -21398,14 +21353,12 @@ schrodingersscat.com, 1
|
|||
schrodingersscat.org, 1
|
||||
schroeder-immobilien-sundern.de, 1
|
||||
schroepfglas-versand.de, 1
|
||||
schrolm.de, 1
|
||||
schsrch.org, 1
|
||||
schsrch.xyz, 1
|
||||
schtiehve.duckdns.org, 1
|
||||
schubergphilis.com, 1
|
||||
schubertgmbh-ingelheim.de, 1
|
||||
schuhbeck.tk, 1
|
||||
schuhwerkstatt.at, 1
|
||||
schul-bar.de, 1
|
||||
schulderinsky.de, 1
|
||||
schuler.st, 1
|
||||
|
@ -21449,7 +21402,6 @@ scopea.fr, 1
|
|||
score-savers.com, 1
|
||||
scorobudem.ru, 1
|
||||
scorocode.ru, 1
|
||||
scottainslie.me.uk, 1
|
||||
scottgruber.me, 1
|
||||
scottgthomas.com, 1
|
||||
scotthel.me, 1
|
||||
|
@ -21529,7 +21481,6 @@ seatshare.co.uk, 1
|
|||
seattle-life.net, 1
|
||||
seattlefabrication.com, 1
|
||||
seattlemesh.net, 1
|
||||
seattleprivacy.org, 1
|
||||
seattlewalkinbathtubs.com, 1
|
||||
seb-mgl.de, 1
|
||||
sebastian-janich.de, 1
|
||||
|
@ -21537,6 +21488,7 @@ sebastian-kraus.me, 1
|
|||
sebastian-lutsch.de, 1
|
||||
sebastian-schmidt.me, 1
|
||||
sebastian.expert, 1
|
||||
sebastianblade.com, 1
|
||||
sebastianboegl.de, 1
|
||||
sebastiensenechal.com, 1
|
||||
sebi.org, 1
|
||||
|
@ -21734,6 +21686,7 @@ sep23.ru, 1
|
|||
sephr.com, 1
|
||||
sepie.gob.es, 1
|
||||
seppelec.com, 1
|
||||
seproco.com, 1
|
||||
septakkordeon.de, 1
|
||||
septillion.cn, 1
|
||||
septs.pw, 1
|
||||
|
@ -21944,7 +21897,6 @@ shichibukai.net, 1
|
|||
shieldofachilles.in, 1
|
||||
shift-to.co.jp, 1
|
||||
shiftdevices.com, 1
|
||||
shiftj.is, 1
|
||||
shiftleft.org, 1
|
||||
shiftnrg.org, 1
|
||||
shijing.me, 1
|
||||
|
@ -22012,6 +21964,7 @@ shopsouthafrican.com, 1
|
|||
shoptec.sk, 1
|
||||
shorebreaksecurity.com, 1
|
||||
shortdiary.me, 1
|
||||
shorten.ninja, 1
|
||||
shortpath.com, 1
|
||||
shortr.li, 1
|
||||
shoshin-aikido.de, 1
|
||||
|
@ -22222,6 +22175,7 @@ simpte.com, 1
|
|||
simpul.nl, 1
|
||||
sims4hub.ga, 1
|
||||
simsnieuws.nl, 1
|
||||
simtin-net.de, 1
|
||||
simukti.net, 1
|
||||
simumiehet.com, 1
|
||||
simus.fr, 1
|
||||
|
@ -22497,7 +22451,6 @@ smipty.com, 1
|
|||
smit.com.ua, 1
|
||||
smith.is, 0
|
||||
smithandcanova.co.uk, 1
|
||||
smittix.co.uk, 1
|
||||
smkw.com, 0
|
||||
sml.lc, 1
|
||||
smm.im, 1
|
||||
|
@ -22674,6 +22627,7 @@ solvemethod.com, 1
|
|||
solvops.com, 1
|
||||
solymar.co, 1
|
||||
somaini.li, 1
|
||||
somali-derp.com, 1
|
||||
somaliagenda.com, 1
|
||||
somanao.com, 1
|
||||
somcase.com.br, 1
|
||||
|
@ -22774,6 +22728,7 @@ souvik.me, 1
|
|||
soved.eu, 1
|
||||
sowingseasons.com, 1
|
||||
sowncloud.de, 1
|
||||
soz6.com, 1
|
||||
sozialy.com, 1
|
||||
sozon.ca, 1
|
||||
sp.com.pl, 1
|
||||
|
@ -22870,7 +22825,6 @@ splitdna.com, 1
|
|||
splitreflection.com, 1
|
||||
spodelime.com, 1
|
||||
spoketwist.com, 1
|
||||
spolwind.de, 1
|
||||
spom.net, 1
|
||||
sponc.de, 1
|
||||
spongepowered.org, 1
|
||||
|
@ -23311,10 +23265,8 @@ stuco.co, 1
|
|||
studenckiemetody.pl, 1
|
||||
student-eshop.cz, 1
|
||||
student-eshop.sk, 1
|
||||
student.andover.edu, 1
|
||||
studentforums.biz, 1
|
||||
studentite.bg, 0
|
||||
studentloans.gov, 1
|
||||
studentrightsadvocate.org, 1
|
||||
studentshare.net, 1
|
||||
studenttenant.com, 1
|
||||
|
@ -24341,6 +24293,7 @@ thesignalco.com.au, 1
|
|||
thesishelp.net, 1
|
||||
thesled.net, 1
|
||||
thesocialmediacentral.com, 1
|
||||
thesteins.org, 1
|
||||
thestory.ie, 1
|
||||
thestoryshack.com, 1
|
||||
thestrategyagency.com.au, 1
|
||||
|
@ -24420,6 +24373,7 @@ thomsonscleaning.co.uk, 1
|
|||
thomspooren.nl, 1
|
||||
thomwiggers.nl, 1
|
||||
thor.edu, 1
|
||||
thorbis.com, 1
|
||||
thorbiswebsitedesign.com, 1
|
||||
thorsten-schaefer.com, 1
|
||||
thorstenschaefer.name, 1
|
||||
|
@ -24582,7 +24536,6 @@ tjl.rocks, 1
|
|||
tjp.ch, 1
|
||||
tjs.me, 1
|
||||
tkacz.pro, 1
|
||||
tkarstens.de, 0
|
||||
tkat.ch, 1
|
||||
tkgpm.com, 1
|
||||
tkjg.fi, 1
|
||||
|
@ -25021,7 +24974,6 @@ travisfranck.com, 1
|
|||
travler.net, 1
|
||||
travotion.com, 1
|
||||
trbanka.com, 1
|
||||
treasuredinheritanceministry.com, 1
|
||||
treasurydirect.gov, 1
|
||||
treasuryhunt.gov, 1
|
||||
treasuryscams.gov, 1
|
||||
|
@ -25146,7 +25098,6 @@ tsedryk.ca, 1
|
|||
tsgbit.net, 1
|
||||
tsicons.com, 1
|
||||
tsigaradiko.com, 1
|
||||
tsironis-olivenoel.de, 1
|
||||
tsng-stg.tk, 1
|
||||
tsng.co.jp, 1
|
||||
tstrubberstamp.com, 1
|
||||
|
@ -25295,8 +25246,10 @@ tyil.nl, 1
|
|||
tyil.work, 1
|
||||
tykoon.com, 1
|
||||
tyl.io, 1
|
||||
tyler.rs, 1
|
||||
tylerdavies.net, 1
|
||||
tylerfreedman.com, 1
|
||||
tyleromeara.com, 1
|
||||
tylerschmidtke.com, 1
|
||||
type1joe.com, 1
|
||||
type1joe.net, 1
|
||||
|
@ -25355,7 +25308,6 @@ uchargeapp.com, 1
|
|||
uclanmasterplan.co.uk, 1
|
||||
ucrdatatool.gov, 1
|
||||
uctarna.online, 1
|
||||
udbhav.me, 1
|
||||
udo-luetkemeier.de, 1
|
||||
udomain.net, 1
|
||||
udp.sh, 0
|
||||
|
@ -25435,6 +25387,7 @@ undercovercondoms.co.uk, 1
|
|||
undercovercondoms.com, 1
|
||||
underlined.fr, 1
|
||||
undernet.uy, 0
|
||||
underskatten.tk, 1
|
||||
undo.co.il, 1
|
||||
undone.me, 1
|
||||
unearaigneeauplafond.fr, 0
|
||||
|
@ -25584,7 +25537,6 @@ urbanietz-immobilien.de, 1
|
|||
urbanmelbourne.info, 1
|
||||
urbannewsservice.com, 1
|
||||
urbansparrow.in, 1
|
||||
urbanstylestaging.com, 1
|
||||
urbanwildlifealliance.org, 1
|
||||
urbexdk.nl, 1
|
||||
urcentral.com, 1
|
||||
|
@ -26088,6 +26040,7 @@ vk4wip.org.au, 1
|
|||
vkirichenko.name, 1
|
||||
vkox.com, 1
|
||||
vksportphoto.com, 1
|
||||
vladimiroff.org, 1
|
||||
vladislavstoyanov.com, 1
|
||||
vldkn.net, 1
|
||||
vleij.com, 1
|
||||
|
@ -26125,7 +26078,6 @@ voidpay.com, 1
|
|||
voidpay.net, 1
|
||||
voidpay.org, 1
|
||||
voidptr.eu, 1
|
||||
voidserv.net, 1
|
||||
voidshift.com, 1
|
||||
voipsun.com, 1
|
||||
vokativy.cz, 0
|
||||
|
@ -26155,10 +26107,9 @@ vorkbaard.nl, 1
|
|||
vorlicek.de, 1
|
||||
vorlif.org, 1
|
||||
vorm2.com, 1
|
||||
vorodevops.com, 1
|
||||
vos-fleurs.ch, 1
|
||||
vos-fleurs.com, 1
|
||||
voshod.org, 0
|
||||
voshod.org, 1
|
||||
vosky.fr, 1
|
||||
vostronet.com, 1
|
||||
voter-info.uk, 1
|
||||
|
@ -26311,6 +26262,8 @@ warlions.info, 0
|
|||
warmestwishes.ca, 1
|
||||
warmlyyours.com, 0
|
||||
warmservers.com, 1
|
||||
warp-radio.com, 1
|
||||
warp-radio.tv, 1
|
||||
warr.ath.cx, 1
|
||||
warschild.org, 1
|
||||
wartorngalaxy.com, 1
|
||||
|
@ -26547,7 +26500,6 @@ wellensteyn.ru, 1
|
|||
weller.pm, 1
|
||||
wellies.com.au, 1
|
||||
wellness-gutschein.de, 1
|
||||
wellness.so, 1
|
||||
wellopp.com, 1
|
||||
wellproducedwines.com, 1
|
||||
wellsolveit.com, 1
|
||||
|
@ -26832,7 +26784,6 @@ wintermeyer-consulting.de, 1
|
|||
wintermeyer.de, 1
|
||||
winterschoen.nl, 1
|
||||
wintodoor.com, 1
|
||||
wipc.net, 1
|
||||
wipply.com, 0
|
||||
wir-bewegen.sh, 1
|
||||
wirbatz.org, 1
|
||||
|
@ -26973,7 +26924,6 @@ worldofterra.net, 1
|
|||
worldofvnc.net, 1
|
||||
worldpovertysolutions.org, 1
|
||||
worldsgreatestazuredemo.com, 1
|
||||
worldsoccerclips.com, 1
|
||||
worldstone777.com, 1
|
||||
wormdisk.net, 1
|
||||
wormholevpn.net, 1
|
||||
|
@ -27795,7 +27745,6 @@ zeitzer-turngala.de, 1
|
|||
zekinteractive.com, 1
|
||||
zelezny.uk, 0
|
||||
zelfrijdendeautos.com, 1
|
||||
zellari.ru, 1
|
||||
zeloz.xyz, 1
|
||||
zemlova.cz, 1
|
||||
zen-diez.de, 1
|
||||
|
@ -27808,9 +27757,6 @@ zenmate.com.tr, 1
|
|||
zeno-system.com, 1
|
||||
zenofa.co.id, 1
|
||||
zentask.io, 1
|
||||
zentience.dk, 1
|
||||
zentience.net, 1
|
||||
zentience.org, 1
|
||||
zenvideocloud.com, 1
|
||||
zenycosta.com, 1
|
||||
zepect.com, 1
|
||||
|
@ -27858,6 +27804,7 @@ zhaoxixiangban.cc, 1
|
|||
zhen-chen.com, 1
|
||||
zhengjie.com, 1
|
||||
zhikin.com, 1
|
||||
zhiku8.com, 1
|
||||
zhovner.com, 1
|
||||
zhuji.com, 1
|
||||
zhujicaihong.com, 1
|
||||
|
@ -27913,7 +27860,6 @@ zokster.net, 1
|
|||
zolokar.xyz, 1
|
||||
zombiesecured.com, 1
|
||||
zomerschoen.nl, 1
|
||||
zone-produkte.de, 1
|
||||
zone39.com, 1
|
||||
zonecb.com, 1
|
||||
zonemaster.fr, 1
|
||||
|
|
|
@ -118,7 +118,7 @@ impl FontContext {
|
|||
|
||||
let layout_font_group_cache_key = LayoutFontGroupCacheKey {
|
||||
pointer: style.clone(),
|
||||
size: Au::from(style.font_size),
|
||||
size: style.font_size.size(),
|
||||
};
|
||||
if let Some(ref cached_font_group) = self.layout_font_group_cache.get(
|
||||
&layout_font_group_cache_key) {
|
||||
|
@ -148,7 +148,7 @@ impl FontContext {
|
|||
Some(ref cached_font_ref) => {
|
||||
let cached_font = (*cached_font_ref).borrow();
|
||||
if cached_font.descriptor == desc &&
|
||||
cached_font.requested_pt_size == Au::from(style.font_size) &&
|
||||
cached_font.requested_pt_size == style.font_size.size() &&
|
||||
cached_font.variant == style.font_variant_caps {
|
||||
fonts.push((*cached_font_ref).clone());
|
||||
cache_hit = true;
|
||||
|
@ -166,7 +166,7 @@ impl FontContext {
|
|||
Some(template_info) => {
|
||||
let layout_font = self.create_layout_font(template_info.font_template,
|
||||
desc.clone(),
|
||||
Au::from(style.font_size),
|
||||
style.font_size.size(),
|
||||
style.font_variant_caps,
|
||||
template_info.font_key);
|
||||
let font = match layout_font {
|
||||
|
@ -199,7 +199,7 @@ impl FontContext {
|
|||
for cached_font_entry in &self.fallback_font_cache {
|
||||
let cached_font = cached_font_entry.font.borrow();
|
||||
if cached_font.descriptor == desc &&
|
||||
cached_font.requested_pt_size == Au::from(style.font_size) &&
|
||||
cached_font.requested_pt_size == style.font_size.size() &&
|
||||
cached_font.variant == style.font_variant_caps {
|
||||
fonts.push(cached_font_entry.font.clone());
|
||||
cache_hit = true;
|
||||
|
@ -211,7 +211,7 @@ impl FontContext {
|
|||
let template_info = self.font_cache_thread.last_resort_font_template(desc.clone());
|
||||
let layout_font = self.create_layout_font(template_info.font_template,
|
||||
desc.clone(),
|
||||
Au::from(style.font_size),
|
||||
style.font_size.size(),
|
||||
style.font_variant_caps,
|
||||
template_info.font_key);
|
||||
match layout_font {
|
||||
|
|
|
@ -97,10 +97,10 @@ impl Flow for MulticolFlow {
|
|||
{
|
||||
let column_style = self.block_flow.fragment.style.get_column();
|
||||
|
||||
let column_gap = Au::from(match column_style.column_gap {
|
||||
Either::First(len) => len,
|
||||
Either::Second(_normal) => self.block_flow.fragment.style.get_font().font_size,
|
||||
});
|
||||
let column_gap = match column_style.column_gap {
|
||||
Either::First(len) => len.into(),
|
||||
Either::Second(_normal) => self.block_flow.fragment.style.get_font().font_size.size(),
|
||||
};
|
||||
|
||||
let mut column_count;
|
||||
if let Either::First(column_width) = column_style.column_width {
|
||||
|
|
|
@ -447,7 +447,7 @@ pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: ::Serv
|
|||
|
||||
/// Returns the line block-size needed by the given computed style and font size.
|
||||
pub fn line_height_from_style(style: &ComputedValues, metrics: &FontMetrics) -> Au {
|
||||
let font_size = Au::from(style.get_font().font_size);
|
||||
let font_size = style.get_font().font_size.size();
|
||||
match style.get_inheritedtext().line_height {
|
||||
LineHeight::Normal => Au::from(metrics.line_gap),
|
||||
LineHeight::Number(l) => font_size.scale_by(l.0),
|
||||
|
|
|
@ -130,7 +130,7 @@ impl DocumentLoader {
|
|||
pub fn finish_load(&mut self, load: &LoadType) {
|
||||
debug!("Removing blocking load {:?} ({}).", load, self.blocking_loads.len());
|
||||
let idx = self.blocking_loads.iter().position(|unfinished| *unfinished == *load);
|
||||
self.blocking_loads.remove(idx.expect(&format!("unknown completed load {:?}", load)));
|
||||
self.blocking_loads.remove(idx.unwrap_or_else(|| panic!("unknown completed load {:?}", load)));
|
||||
}
|
||||
|
||||
pub fn is_blocked(&self) -> bool {
|
||||
|
|
|
@ -10,7 +10,6 @@ pub type ServoUnsafeCell<T> = ::std::cell::UnsafeCell<T>;
|
|||
pub type ServoCell<T> = ::std::cell::Cell<T>;
|
||||
pub type ServoNodeData = AtomicRefCell<ElementData>;
|
||||
pub type ServoWritingMode = ::logical_geometry::WritingMode;
|
||||
pub type ServoFontComputationData = ::properties::FontComputationData;
|
||||
pub type ServoCustomPropertiesMap = Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>;
|
||||
pub type ServoRuleNode = Option<::rule_tree::StrongRuleNode>;
|
||||
pub type ServoVisitedStyle = Option<::servo_arc::RawOffsetArc<::properties::ComputedValues>>;
|
||||
|
@ -440,6 +439,7 @@ pub mod root {
|
|||
pub const NS_STYLE_FONT_SIZE_XXXLARGE: ::std::os::raw::c_uint = 7;
|
||||
pub const NS_STYLE_FONT_SIZE_LARGER: ::std::os::raw::c_uint = 8;
|
||||
pub const NS_STYLE_FONT_SIZE_SMALLER: ::std::os::raw::c_uint = 9;
|
||||
pub const NS_STYLE_FONT_SIZE_NO_KEYWORD: ::std::os::raw::c_uint = 10;
|
||||
pub const NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED: ::std::os::raw::c_int =
|
||||
-4;
|
||||
pub const NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED: ::std::os::raw::c_int =
|
||||
|
@ -4462,19 +4462,6 @@ pub mod root {
|
|||
FirstLetterContinuation = 1,
|
||||
PlaceholderFrame = 2,
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum ServoKeywordSize {
|
||||
Empty = 0,
|
||||
XXSmall = 1,
|
||||
XSmall = 2,
|
||||
Small = 3,
|
||||
Medium = 4,
|
||||
Large = 5,
|
||||
XLarge = 6,
|
||||
XXLarge = 7,
|
||||
XXXLarge = 8,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug)]
|
||||
pub struct ServoStyleContext {
|
||||
|
@ -4486,7 +4473,7 @@ pub mod root {
|
|||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ServoStyleContext() {
|
||||
assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 280usize ,
|
||||
assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 264usize ,
|
||||
concat ! (
|
||||
"Size of: " , stringify ! ( ServoStyleContext ) ));
|
||||
assert_eq! (::std::mem::align_of::<ServoStyleContext>() , 8usize ,
|
||||
|
@ -4509,14 +4496,14 @@ pub mod root {
|
|||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const ServoStyleContext ) ) .
|
||||
mNextInheritingAnonBoxStyle as * const _ as usize } ,
|
||||
264usize , concat ! (
|
||||
248usize , concat ! (
|
||||
"Alignment of field: " , stringify ! (
|
||||
ServoStyleContext ) , "::" , stringify ! (
|
||||
mNextInheritingAnonBoxStyle ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const ServoStyleContext ) ) .
|
||||
mNextLazyPseudoStyle as * const _ as usize } ,
|
||||
272usize , concat ! (
|
||||
256usize , concat ! (
|
||||
"Alignment of field: " , stringify ! (
|
||||
ServoStyleContext ) , "::" , stringify ! (
|
||||
mNextLazyPseudoStyle ) ));
|
||||
|
@ -4528,7 +4515,7 @@ pub mod root {
|
|||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_GeckoFont() {
|
||||
assert_eq!(::std::mem::size_of::<GeckoFont>() , 120usize , concat
|
||||
assert_eq!(::std::mem::size_of::<GeckoFont>() , 128usize , concat
|
||||
! ( "Size of: " , stringify ! ( GeckoFont ) ));
|
||||
assert_eq! (::std::mem::align_of::<GeckoFont>() , 8usize , concat
|
||||
! ( "Alignment of " , stringify ! ( GeckoFont ) ));
|
||||
|
@ -12647,6 +12634,9 @@ pub mod root {
|
|||
pub struct nsStyleFont {
|
||||
pub mFont: root::nsFont,
|
||||
pub mSize: root::nscoord,
|
||||
pub mFontSizeFactor: f32,
|
||||
pub mFontSizeOffset: root::nscoord,
|
||||
pub mFontSizeKeyword: u8,
|
||||
pub mGenericID: u8,
|
||||
pub mScriptLevel: i8,
|
||||
pub mMathVariant: u8,
|
||||
|
@ -12662,7 +12652,7 @@ pub mod root {
|
|||
pub const nsStyleFont_kHasFinishStyle: bool = false;
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleFont() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleFont>() , 120usize , concat !
|
||||
assert_eq!(::std::mem::size_of::<nsStyleFont>() , 128usize , concat !
|
||||
( "Size of: " , stringify ! ( nsStyleFont ) ));
|
||||
assert_eq! (::std::mem::align_of::<nsStyleFont>() , 8usize , concat !
|
||||
( "Alignment of " , stringify ! ( nsStyleFont ) ));
|
||||
|
@ -12676,61 +12666,76 @@ pub mod root {
|
|||
as usize } , 88usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mSize ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mFontSizeFactor as
|
||||
* const _ as usize } , 92usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mFontSizeFactor ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mFontSizeOffset as
|
||||
* const _ as usize } , 96usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mFontSizeOffset ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mFontSizeKeyword as
|
||||
* const _ as usize } , 100usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mFontSizeKeyword ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mGenericID as *
|
||||
const _ as usize } , 92usize , concat ! (
|
||||
const _ as usize } , 101usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mGenericID ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mScriptLevel as *
|
||||
const _ as usize } , 93usize , concat ! (
|
||||
const _ as usize } , 102usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptLevel ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mMathVariant as *
|
||||
const _ as usize } , 94usize , concat ! (
|
||||
const _ as usize } , 103usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mMathVariant ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mMathDisplay as *
|
||||
const _ as usize } , 95usize , concat ! (
|
||||
const _ as usize } , 104usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mMathDisplay ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mMinFontSizeRatio
|
||||
as * const _ as usize } , 96usize , concat ! (
|
||||
as * const _ as usize } , 105usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mMinFontSizeRatio ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mExplicitLanguage
|
||||
as * const _ as usize } , 97usize , concat ! (
|
||||
as * const _ as usize } , 106usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mExplicitLanguage ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mAllowZoom as *
|
||||
const _ as usize } , 98usize , concat ! (
|
||||
const _ as usize } , 107usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mAllowZoom ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) .
|
||||
mScriptUnconstrainedSize as * const _ as usize } ,
|
||||
100usize , concat ! (
|
||||
108usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptUnconstrainedSize ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mScriptMinSize as *
|
||||
const _ as usize } , 104usize , concat ! (
|
||||
const _ as usize } , 112usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptMinSize ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) .
|
||||
mScriptSizeMultiplier as * const _ as usize } , 108usize ,
|
||||
mScriptSizeMultiplier as * const _ as usize } , 116usize ,
|
||||
concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptSizeMultiplier ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mLanguage as *
|
||||
const _ as usize } , 112usize , concat ! (
|
||||
const _ as usize } , 120usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mLanguage ) ));
|
||||
}
|
||||
|
@ -14809,11 +14814,10 @@ pub mod root {
|
|||
/// /// relevant link for this element. A element's "relevant link" is the
|
||||
/// /// element being matched if it is a link or the nearest ancestor link.
|
||||
pub visited_style: ::gecko_bindings::structs::ServoVisitedStyle,
|
||||
pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ServoComputedData() {
|
||||
assert_eq!(::std::mem::size_of::<ServoComputedData>() , 232usize ,
|
||||
assert_eq!(::std::mem::size_of::<ServoComputedData>() , 216usize ,
|
||||
concat ! ( "Size of: " , stringify ! ( ServoComputedData )
|
||||
));
|
||||
assert_eq! (::std::mem::align_of::<ServoComputedData>() , 8usize ,
|
||||
|
@ -14960,12 +14964,6 @@ pub mod root {
|
|||
as * const _ as usize } , 208usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( ServoComputedData )
|
||||
, "::" , stringify ! ( visited_style ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const ServoComputedData ) ) .
|
||||
font_computation_data as * const _ as usize } , 216usize ,
|
||||
concat ! (
|
||||
"Alignment of field: " , stringify ! ( ServoComputedData )
|
||||
, "::" , stringify ! ( font_computation_data ) ));
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
|
|
|
@ -10,7 +10,6 @@ pub type ServoUnsafeCell<T> = ::std::cell::UnsafeCell<T>;
|
|||
pub type ServoCell<T> = ::std::cell::Cell<T>;
|
||||
pub type ServoNodeData = AtomicRefCell<ElementData>;
|
||||
pub type ServoWritingMode = ::logical_geometry::WritingMode;
|
||||
pub type ServoFontComputationData = ::properties::FontComputationData;
|
||||
pub type ServoCustomPropertiesMap = Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>;
|
||||
pub type ServoRuleNode = Option<::rule_tree::StrongRuleNode>;
|
||||
pub type ServoVisitedStyle = Option<::servo_arc::RawOffsetArc<::properties::ComputedValues>>;
|
||||
|
@ -440,6 +439,7 @@ pub mod root {
|
|||
pub const NS_STYLE_FONT_SIZE_XXXLARGE: ::std::os::raw::c_uint = 7;
|
||||
pub const NS_STYLE_FONT_SIZE_LARGER: ::std::os::raw::c_uint = 8;
|
||||
pub const NS_STYLE_FONT_SIZE_SMALLER: ::std::os::raw::c_uint = 9;
|
||||
pub const NS_STYLE_FONT_SIZE_NO_KEYWORD: ::std::os::raw::c_uint = 10;
|
||||
pub const NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED: ::std::os::raw::c_int =
|
||||
-4;
|
||||
pub const NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED: ::std::os::raw::c_int =
|
||||
|
@ -4382,19 +4382,6 @@ pub mod root {
|
|||
FirstLetterContinuation = 1,
|
||||
PlaceholderFrame = 2,
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum ServoKeywordSize {
|
||||
Empty = 0,
|
||||
XXSmall = 1,
|
||||
XSmall = 2,
|
||||
Small = 3,
|
||||
Medium = 4,
|
||||
Large = 5,
|
||||
XLarge = 6,
|
||||
XXLarge = 7,
|
||||
XXXLarge = 8,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug)]
|
||||
pub struct ServoStyleContext {
|
||||
|
@ -4406,7 +4393,7 @@ pub mod root {
|
|||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ServoStyleContext() {
|
||||
assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 272usize ,
|
||||
assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 256usize ,
|
||||
concat ! (
|
||||
"Size of: " , stringify ! ( ServoStyleContext ) ));
|
||||
assert_eq! (::std::mem::align_of::<ServoStyleContext>() , 8usize ,
|
||||
|
@ -4429,14 +4416,14 @@ pub mod root {
|
|||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const ServoStyleContext ) ) .
|
||||
mNextInheritingAnonBoxStyle as * const _ as usize } ,
|
||||
256usize , concat ! (
|
||||
240usize , concat ! (
|
||||
"Alignment of field: " , stringify ! (
|
||||
ServoStyleContext ) , "::" , stringify ! (
|
||||
mNextInheritingAnonBoxStyle ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const ServoStyleContext ) ) .
|
||||
mNextLazyPseudoStyle as * const _ as usize } ,
|
||||
264usize , concat ! (
|
||||
248usize , concat ! (
|
||||
"Alignment of field: " , stringify ! (
|
||||
ServoStyleContext ) , "::" , stringify ! (
|
||||
mNextLazyPseudoStyle ) ));
|
||||
|
@ -4448,7 +4435,7 @@ pub mod root {
|
|||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_GeckoFont() {
|
||||
assert_eq!(::std::mem::size_of::<GeckoFont>() , 120usize , concat
|
||||
assert_eq!(::std::mem::size_of::<GeckoFont>() , 128usize , concat
|
||||
! ( "Size of: " , stringify ! ( GeckoFont ) ));
|
||||
assert_eq! (::std::mem::align_of::<GeckoFont>() , 8usize , concat
|
||||
! ( "Alignment of " , stringify ! ( GeckoFont ) ));
|
||||
|
@ -12494,6 +12481,9 @@ pub mod root {
|
|||
pub struct nsStyleFont {
|
||||
pub mFont: root::nsFont,
|
||||
pub mSize: root::nscoord,
|
||||
pub mFontSizeFactor: f32,
|
||||
pub mFontSizeOffset: root::nscoord,
|
||||
pub mFontSizeKeyword: u8,
|
||||
pub mGenericID: u8,
|
||||
pub mScriptLevel: i8,
|
||||
pub mMathVariant: u8,
|
||||
|
@ -12509,7 +12499,7 @@ pub mod root {
|
|||
pub const nsStyleFont_kHasFinishStyle: bool = false;
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleFont() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleFont>() , 120usize , concat !
|
||||
assert_eq!(::std::mem::size_of::<nsStyleFont>() , 128usize , concat !
|
||||
( "Size of: " , stringify ! ( nsStyleFont ) ));
|
||||
assert_eq! (::std::mem::align_of::<nsStyleFont>() , 8usize , concat !
|
||||
( "Alignment of " , stringify ! ( nsStyleFont ) ));
|
||||
|
@ -12523,61 +12513,76 @@ pub mod root {
|
|||
as usize } , 88usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mSize ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mFontSizeFactor as
|
||||
* const _ as usize } , 92usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mFontSizeFactor ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mFontSizeOffset as
|
||||
* const _ as usize } , 96usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mFontSizeOffset ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mFontSizeKeyword as
|
||||
* const _ as usize } , 100usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mFontSizeKeyword ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mGenericID as *
|
||||
const _ as usize } , 92usize , concat ! (
|
||||
const _ as usize } , 101usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mGenericID ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mScriptLevel as *
|
||||
const _ as usize } , 93usize , concat ! (
|
||||
const _ as usize } , 102usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptLevel ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mMathVariant as *
|
||||
const _ as usize } , 94usize , concat ! (
|
||||
const _ as usize } , 103usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mMathVariant ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mMathDisplay as *
|
||||
const _ as usize } , 95usize , concat ! (
|
||||
const _ as usize } , 104usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mMathDisplay ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mMinFontSizeRatio
|
||||
as * const _ as usize } , 96usize , concat ! (
|
||||
as * const _ as usize } , 105usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mMinFontSizeRatio ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mExplicitLanguage
|
||||
as * const _ as usize } , 97usize , concat ! (
|
||||
as * const _ as usize } , 106usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mExplicitLanguage ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mAllowZoom as *
|
||||
const _ as usize } , 98usize , concat ! (
|
||||
const _ as usize } , 107usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mAllowZoom ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) .
|
||||
mScriptUnconstrainedSize as * const _ as usize } ,
|
||||
100usize , concat ! (
|
||||
108usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptUnconstrainedSize ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mScriptMinSize as *
|
||||
const _ as usize } , 104usize , concat ! (
|
||||
const _ as usize } , 112usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptMinSize ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) .
|
||||
mScriptSizeMultiplier as * const _ as usize } , 108usize ,
|
||||
mScriptSizeMultiplier as * const _ as usize } , 116usize ,
|
||||
concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mScriptSizeMultiplier ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const nsStyleFont ) ) . mLanguage as *
|
||||
const _ as usize } , 112usize , concat ! (
|
||||
const _ as usize } , 120usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( nsStyleFont ) ,
|
||||
"::" , stringify ! ( mLanguage ) ));
|
||||
}
|
||||
|
@ -14656,11 +14661,10 @@ pub mod root {
|
|||
/// /// relevant link for this element. A element's "relevant link" is the
|
||||
/// /// element being matched if it is a link or the nearest ancestor link.
|
||||
pub visited_style: ::gecko_bindings::structs::ServoVisitedStyle,
|
||||
pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ServoComputedData() {
|
||||
assert_eq!(::std::mem::size_of::<ServoComputedData>() , 232usize ,
|
||||
assert_eq!(::std::mem::size_of::<ServoComputedData>() , 216usize ,
|
||||
concat ! ( "Size of: " , stringify ! ( ServoComputedData )
|
||||
));
|
||||
assert_eq! (::std::mem::align_of::<ServoComputedData>() , 8usize ,
|
||||
|
@ -14807,12 +14811,6 @@ pub mod root {
|
|||
as * const _ as usize } , 208usize , concat ! (
|
||||
"Alignment of field: " , stringify ! ( ServoComputedData )
|
||||
, "::" , stringify ! ( visited_style ) ));
|
||||
assert_eq! (unsafe {
|
||||
& ( * ( 0 as * const ServoComputedData ) ) .
|
||||
font_computation_data as * const _ as usize } , 216usize ,
|
||||
concat ! (
|
||||
"Alignment of field: " , stringify ! ( ServoComputedData )
|
||||
, "::" , stringify ! ( font_computation_data ) ));
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
|
|
|
@ -78,7 +78,7 @@ impl Device {
|
|||
pres_context: pres_context,
|
||||
default_values: ComputedValues::default_values(unsafe { &*pres_context }),
|
||||
// FIXME(bz): Seems dubious?
|
||||
root_font_size: AtomicIsize::new(font_size::get_initial_value().0.to_i32_au() as isize),
|
||||
root_font_size: AtomicIsize::new(font_size::get_initial_value().size().0 as isize),
|
||||
body_text_color: AtomicUsize::new(unsafe { &*pres_context }.mDefaultColor as usize),
|
||||
used_root_font_size: AtomicBool::new(false),
|
||||
used_viewport_size: AtomicBool::new(false),
|
||||
|
|
|
@ -511,7 +511,6 @@ pub trait MatchMethods : TElement {
|
|||
mut new_styles: ResolvedElementStyles,
|
||||
important_rules_changed: bool,
|
||||
) -> ChildCascadeRequirement {
|
||||
use app_units::Au;
|
||||
use dom::TNode;
|
||||
use std::cmp;
|
||||
|
||||
|
@ -553,7 +552,7 @@ pub trait MatchMethods : TElement {
|
|||
|
||||
if old_styles.primary.as_ref().map_or(true, |s| s.get_font().clone_font_size() != new_font_size) {
|
||||
debug_assert!(self.owner_doc_matches_for_testing(device));
|
||||
device.set_root_font_size(Au::from(new_font_size));
|
||||
device.set_root_font_size(new_font_size.size());
|
||||
// If the root font-size changed since last time, and something
|
||||
// in the document did use rem units, ensure we recascade the
|
||||
// entire tree.
|
||||
|
|
|
@ -53,7 +53,7 @@ use logical_geometry::WritingMode;
|
|||
use media_queries::Device;
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
use properties::computed_value_flags::*;
|
||||
use properties::{default_font_size_keyword, longhands, FontComputationData, Importance, LonghandId};
|
||||
use properties::{longhands, Importance, LonghandId};
|
||||
use properties::{PropertyDeclaration, PropertyDeclarationBlock, PropertyDeclarationId};
|
||||
use rule_tree::StrongRuleNode;
|
||||
use selector_parser::PseudoElement;
|
||||
|
@ -85,7 +85,6 @@ impl ComputedValues {
|
|||
pseudo: Option<<&PseudoElement>,
|
||||
custom_properties: Option<Arc<CustomPropertiesMap>>,
|
||||
writing_mode: WritingMode,
|
||||
font_size_keyword: FontComputationData,
|
||||
flags: ComputedValueFlags,
|
||||
rules: Option<StrongRuleNode>,
|
||||
visited_style: Option<Arc<ComputedValues>>,
|
||||
|
@ -96,7 +95,6 @@ impl ComputedValues {
|
|||
ComputedValuesInner::new(
|
||||
custom_properties,
|
||||
writing_mode,
|
||||
font_size_keyword,
|
||||
flags,
|
||||
rules,
|
||||
visited_style,
|
||||
|
@ -114,7 +112,6 @@ impl ComputedValues {
|
|||
ComputedValuesInner::new(
|
||||
/* custom_properties = */ None,
|
||||
/* writing_mode = */ WritingMode::empty(), // FIXME(bz): This seems dubious
|
||||
default_font_size_keyword(),
|
||||
ComputedValueFlags::empty(),
|
||||
/* rules = */ None,
|
||||
/* visited_style = */ None,
|
||||
|
@ -174,7 +171,6 @@ impl Clone for ComputedValuesInner {
|
|||
% endfor
|
||||
custom_properties: self.custom_properties.clone(),
|
||||
writing_mode: self.writing_mode.clone(),
|
||||
font_computation_data: self.font_computation_data.clone(),
|
||||
flags: self.flags.clone(),
|
||||
rules: self.rules.clone(),
|
||||
visited_style: self.visited_style.clone(),
|
||||
|
@ -188,7 +184,6 @@ type ParentStyleContextInfo<'a> = Option< &'a ComputedValues>;
|
|||
impl ComputedValuesInner {
|
||||
pub fn new(custom_properties: Option<Arc<CustomPropertiesMap>>,
|
||||
writing_mode: WritingMode,
|
||||
font_size_keyword: FontComputationData,
|
||||
flags: ComputedValueFlags,
|
||||
rules: Option<StrongRuleNode>,
|
||||
visited_style: Option<Arc<ComputedValues>>,
|
||||
|
@ -199,7 +194,6 @@ impl ComputedValuesInner {
|
|||
ComputedValuesInner {
|
||||
custom_properties: custom_properties,
|
||||
writing_mode: writing_mode,
|
||||
font_computation_data: font_size_keyword,
|
||||
rules: rules,
|
||||
visited_style: visited_style.map(|x| Arc::into_raw_offset(x)),
|
||||
flags: flags,
|
||||
|
@ -2167,8 +2161,27 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
pub fn set_font_size(&mut self, v: longhands::font_size::computed_value::T) {
|
||||
self.gecko.mSize = v.0.to_i32_au();
|
||||
self.gecko.mScriptUnconstrainedSize = v.0.to_i32_au();
|
||||
use values::specified::font::KeywordSize;
|
||||
self.gecko.mSize = v.size().0;
|
||||
self.gecko.mScriptUnconstrainedSize = v.size().0;
|
||||
if let Some(info) = v.keyword_info {
|
||||
self.gecko.mFontSizeKeyword = match info.kw {
|
||||
KeywordSize::XXSmall => structs::NS_STYLE_FONT_SIZE_XXSMALL,
|
||||
KeywordSize::XSmall => structs::NS_STYLE_FONT_SIZE_XSMALL,
|
||||
KeywordSize::Small => structs::NS_STYLE_FONT_SIZE_SMALL,
|
||||
KeywordSize::Medium => structs::NS_STYLE_FONT_SIZE_MEDIUM,
|
||||
KeywordSize::Large => structs::NS_STYLE_FONT_SIZE_LARGE,
|
||||
KeywordSize::XLarge => structs::NS_STYLE_FONT_SIZE_XLARGE,
|
||||
KeywordSize::XXLarge => structs::NS_STYLE_FONT_SIZE_XXLARGE,
|
||||
KeywordSize::XXXLarge => structs::NS_STYLE_FONT_SIZE_XXXLARGE,
|
||||
} as u8;
|
||||
self.gecko.mFontSizeFactor = info.factor;
|
||||
self.gecko.mFontSizeOffset = info.offset.0.to_i32_au();
|
||||
} else {
|
||||
self.gecko.mFontSizeKeyword = structs::NS_STYLE_FONT_SIZE_NO_KEYWORD as u8;
|
||||
self.gecko.mFontSizeFactor = 1.;
|
||||
self.gecko.mFontSizeOffset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// Set font size, taking into account scriptminsize and scriptlevel
|
||||
|
@ -2185,7 +2198,7 @@ fn static_assert() {
|
|||
self.fixup_font_min_size(device);
|
||||
None
|
||||
} else {
|
||||
self.gecko.mSize = v.0.to_i32_au();
|
||||
self.gecko.mSize = v.size().0;
|
||||
self.fixup_font_min_size(device);
|
||||
Some(Au(parent.gecko.mScriptUnconstrainedSize).into())
|
||||
}
|
||||
|
@ -2303,11 +2316,9 @@ fn static_assert() {
|
|||
/// This function will also handle scriptminsize and scriptlevel
|
||||
/// so should not be called when you just want the font sizes to be copied.
|
||||
/// Hence the different name.
|
||||
///
|
||||
/// Returns true if the inherited keyword size was actually used
|
||||
pub fn inherit_font_size_from(&mut self, parent: &Self,
|
||||
kw_inherited_size: Option<NonNegativeLength>,
|
||||
device: &Device) -> bool {
|
||||
device: &Device) {
|
||||
let (adjusted_size, adjusted_unconstrained_size)
|
||||
= self.calculate_script_level_size(parent, device);
|
||||
if adjusted_size.0 != parent.gecko.mSize ||
|
||||
|
@ -2327,28 +2338,66 @@ fn static_assert() {
|
|||
// In the case that MathML has given us an adjusted size, apply it.
|
||||
// Keep track of the unconstrained adjusted size.
|
||||
self.gecko.mSize = adjusted_size.0;
|
||||
|
||||
// Technically the MathML constrained size may also be keyword-derived
|
||||
// but we ignore this since it would be too complicated
|
||||
// to correctly track and it's mostly unnecessary.
|
||||
self.gecko.mFontSizeKeyword = structs::NS_STYLE_FONT_SIZE_NO_KEYWORD as u8;
|
||||
self.gecko.mFontSizeFactor = 1.;
|
||||
self.gecko.mFontSizeOffset = 0;
|
||||
|
||||
self.gecko.mScriptUnconstrainedSize = adjusted_unconstrained_size.0;
|
||||
self.fixup_font_min_size(device);
|
||||
false
|
||||
} else if let Some(size) = kw_inherited_size {
|
||||
// Parent element was a keyword-derived size.
|
||||
self.gecko.mSize = size.0.to_i32_au();
|
||||
// Copy keyword info over.
|
||||
self.gecko.mFontSizeFactor = parent.gecko.mFontSizeFactor;
|
||||
self.gecko.mFontSizeOffset = parent.gecko.mFontSizeOffset;
|
||||
self.gecko.mFontSizeKeyword = parent.gecko.mFontSizeKeyword;
|
||||
// MathML constraints didn't apply here, so we can ignore this.
|
||||
self.gecko.mScriptUnconstrainedSize = size.0.to_i32_au();
|
||||
self.fixup_font_min_size(device);
|
||||
true
|
||||
} else {
|
||||
// MathML isn't affecting us, and our parent element does not
|
||||
// have a keyword-derived size. Set things normally.
|
||||
self.gecko.mSize = parent.gecko.mSize;
|
||||
// copy keyword info over
|
||||
self.gecko.mFontSizeKeyword = structs::NS_STYLE_FONT_SIZE_NO_KEYWORD as u8;
|
||||
self.gecko.mFontSizeFactor = 1.;
|
||||
self.gecko.mFontSizeOffset = 0;
|
||||
self.gecko.mScriptUnconstrainedSize = parent.gecko.mScriptUnconstrainedSize;
|
||||
self.fixup_font_min_size(device);
|
||||
false
|
||||
}
|
||||
self.fixup_font_min_size(device);
|
||||
}
|
||||
|
||||
pub fn clone_font_size(&self) -> longhands::font_size::computed_value::T {
|
||||
Au(self.gecko.mSize).into()
|
||||
use values::computed::font::KeywordInfo;
|
||||
use values::specified::font::KeywordSize;
|
||||
let size = Au(self.gecko.mSize).into();
|
||||
let kw = match self.gecko.mFontSizeKeyword as u32 {
|
||||
structs::NS_STYLE_FONT_SIZE_XXSMALL => KeywordSize::XXSmall,
|
||||
structs::NS_STYLE_FONT_SIZE_XSMALL => KeywordSize::XSmall,
|
||||
structs::NS_STYLE_FONT_SIZE_SMALL => KeywordSize::Small,
|
||||
structs::NS_STYLE_FONT_SIZE_MEDIUM => KeywordSize::Medium,
|
||||
structs::NS_STYLE_FONT_SIZE_LARGE => KeywordSize::Large,
|
||||
structs::NS_STYLE_FONT_SIZE_XLARGE => KeywordSize::XLarge,
|
||||
structs::NS_STYLE_FONT_SIZE_XXLARGE => KeywordSize::XXLarge,
|
||||
structs::NS_STYLE_FONT_SIZE_XXXLARGE => KeywordSize::XXXLarge,
|
||||
structs::NS_STYLE_FONT_SIZE_NO_KEYWORD => {
|
||||
return longhands::font_size::computed_value::T {
|
||||
size: size,
|
||||
keyword_info: None,
|
||||
}
|
||||
}
|
||||
_ => unreachable!("mFontSizeKeyword should be an absolute keyword or NO_KEYWORD")
|
||||
};
|
||||
longhands::font_size::computed_value::T {
|
||||
size: size,
|
||||
keyword_info: Some(KeywordInfo {
|
||||
kw: kw,
|
||||
factor: self.gecko.mFontSizeFactor,
|
||||
offset: Au(self.gecko.mFontSizeOffset).into()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_font_weight(&mut self, v: longhands::font_weight::computed_value::T) {
|
||||
|
|
|
@ -596,348 +596,37 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
}
|
||||
</%helpers:longhand>
|
||||
|
||||
<%helpers:longhand name="font-size" animation_value_type="NonNegativeLength"
|
||||
<%helpers:longhand name="font-size" animation_value_type="ComputedValue"
|
||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER"
|
||||
allow_quirks="True" spec="https://drafts.csswg.org/css-fonts/#propdef-font-size">
|
||||
use app_units::Au;
|
||||
use properties::longhands::system_font::SystemFont;
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use values::FONT_MEDIUM_PX;
|
||||
use values::computed::NonNegativeLength;
|
||||
use values::specified::{AllowQuirks, FontRelativeLength, LengthOrPercentage, NoCalcLength};
|
||||
use values::specified::AllowQuirks;
|
||||
use values::specified::length::FontBaseSize;
|
||||
|
||||
impl ToCss for SpecifiedValue {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
match *self {
|
||||
SpecifiedValue::Length(ref lop) => lop.to_css(dest),
|
||||
SpecifiedValue::Keyword(kw, _, _) => kw.to_css(dest),
|
||||
SpecifiedValue::Smaller => dest.write_str("smaller"),
|
||||
SpecifiedValue::Larger => dest.write_str("larger"),
|
||||
SpecifiedValue::System(sys) => sys.to_css(dest),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub enum SpecifiedValue {
|
||||
Length(specified::LengthOrPercentage),
|
||||
/// A keyword value, along with a ratio and absolute offset.
|
||||
/// The ratio in any specified keyword value
|
||||
/// will be 1 (with offset 0), but we cascade keywordness even
|
||||
/// after font-relative (percent and em) values
|
||||
/// have been applied, which is where the ratio
|
||||
/// comes in. The offset comes in if we cascaded a calc value,
|
||||
/// where the font-relative portion (em and percentage) will
|
||||
/// go into the ratio, and the remaining units all computed together
|
||||
/// will go into the offset.
|
||||
/// See bug 1355707.
|
||||
Keyword(KeywordSize, f32, NonNegativeLength),
|
||||
Smaller,
|
||||
Larger,
|
||||
System(SystemFont)
|
||||
}
|
||||
|
||||
impl From<specified::LengthOrPercentage> for SpecifiedValue {
|
||||
fn from(other: specified::LengthOrPercentage) -> Self {
|
||||
SpecifiedValue::Length(other)
|
||||
}
|
||||
}
|
||||
use values::specified::font::{FONT_MEDIUM_PX, KeywordSize};
|
||||
use values::computed::font::{KeywordInfo};
|
||||
|
||||
pub mod computed_value {
|
||||
use values::computed::NonNegativeLength;
|
||||
pub type T = NonNegativeLength;
|
||||
use values::computed::font;
|
||||
pub type T = font::FontSize;
|
||||
}
|
||||
|
||||
/// CSS font keywords
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub enum KeywordSize {
|
||||
XXSmall = 1, // This is to enable the NonZero optimization
|
||||
// which simplifies the representation of Option<KeywordSize>
|
||||
// in bindgen
|
||||
XSmall,
|
||||
Small,
|
||||
Medium,
|
||||
Large,
|
||||
XLarge,
|
||||
XXLarge,
|
||||
// This is not a real font keyword and will not parse
|
||||
// HTML font-size 7 corresponds to this value
|
||||
XXXLarge,
|
||||
}
|
||||
|
||||
pub use self::KeywordSize::*;
|
||||
|
||||
impl KeywordSize {
|
||||
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
try_match_ident_ignore_ascii_case! { input.expect_ident()?,
|
||||
"xx-small" => Ok(XXSmall),
|
||||
"x-small" => Ok(XSmall),
|
||||
"small" => Ok(Small),
|
||||
"medium" => Ok(Medium),
|
||||
"large" => Ok(Large),
|
||||
"x-large" => Ok(XLarge),
|
||||
"xx-large" => Ok(XXLarge),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn html_size(&self) -> u8 {
|
||||
match *self {
|
||||
KeywordSize::XXSmall => 0,
|
||||
KeywordSize::XSmall => 1,
|
||||
KeywordSize::Small => 2,
|
||||
KeywordSize::Medium => 3,
|
||||
KeywordSize::Large => 4,
|
||||
KeywordSize::XLarge => 5,
|
||||
KeywordSize::XXLarge => 6,
|
||||
KeywordSize::XXXLarge => 7,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for KeywordSize {
|
||||
fn default() -> Self {
|
||||
Medium
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for KeywordSize {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
dest.write_str(match *self {
|
||||
XXSmall => "xx-small",
|
||||
XSmall => "x-small",
|
||||
Small => "small",
|
||||
Medium => "medium",
|
||||
Large => "large",
|
||||
XLarge => "x-large",
|
||||
XXLarge => "xx-large",
|
||||
XXXLarge => unreachable!("We should never serialize \
|
||||
specified values set via
|
||||
HTML presentation attributes"),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
% if product == "servo":
|
||||
impl ToComputedValue for KeywordSize {
|
||||
type ComputedValue = NonNegativeLength;
|
||||
#[inline]
|
||||
fn to_computed_value(&self, _: &Context) -> computed_value::T {
|
||||
// https://drafts.csswg.org/css-fonts-3/#font-size-prop
|
||||
use values::FONT_MEDIUM_PX;
|
||||
match *self {
|
||||
XXSmall => Au::from_px(FONT_MEDIUM_PX) * 3 / 5,
|
||||
XSmall => Au::from_px(FONT_MEDIUM_PX) * 3 / 4,
|
||||
Small => Au::from_px(FONT_MEDIUM_PX) * 8 / 9,
|
||||
Medium => Au::from_px(FONT_MEDIUM_PX),
|
||||
Large => Au::from_px(FONT_MEDIUM_PX) * 6 / 5,
|
||||
XLarge => Au::from_px(FONT_MEDIUM_PX) * 3 / 2,
|
||||
XXLarge => Au::from_px(FONT_MEDIUM_PX) * 2,
|
||||
XXXLarge => Au::from_px(FONT_MEDIUM_PX) * 3,
|
||||
}.into()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_computed_value(_: &computed_value::T) -> Self {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
% else:
|
||||
impl ToComputedValue for KeywordSize {
|
||||
type ComputedValue = NonNegativeLength;
|
||||
#[inline]
|
||||
fn to_computed_value(&self, cx: &Context) -> computed_value::T {
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use values::specified::length::au_to_int_px;
|
||||
// Data from nsRuleNode.cpp in Gecko
|
||||
// Mapping from base size and HTML size to pixels
|
||||
// The first index is (base_size - 9), the second is the
|
||||
// HTML size. "0" is CSS keyword xx-small, not HTML size 0,
|
||||
// since HTML size 0 is the same as 1.
|
||||
//
|
||||
// xxs xs s m l xl xxl -
|
||||
// - 0/1 2 3 4 5 6 7
|
||||
static FONT_SIZE_MAPPING: [[i32; 8]; 8] = [
|
||||
[9, 9, 9, 9, 11, 14, 18, 27],
|
||||
[9, 9, 9, 10, 12, 15, 20, 30],
|
||||
[9, 9, 10, 11, 13, 17, 22, 33],
|
||||
[9, 9, 10, 12, 14, 18, 24, 36],
|
||||
[9, 10, 12, 13, 16, 20, 26, 39],
|
||||
[9, 10, 12, 14, 17, 21, 28, 42],
|
||||
[9, 10, 13, 15, 18, 23, 30, 45],
|
||||
[9, 10, 13, 16, 18, 24, 32, 48]
|
||||
];
|
||||
|
||||
static FONT_SIZE_FACTORS: [i32; 8] = [60, 75, 89, 100, 120, 150, 200, 300];
|
||||
|
||||
// XXXManishearth handle quirks mode
|
||||
|
||||
let ref gecko_font = cx.style().get_font().gecko();
|
||||
let base_size = unsafe { Atom::with(gecko_font.mLanguage.raw::<nsIAtom>(), |atom| {
|
||||
cx.font_metrics_provider.get_size(atom, gecko_font.mGenericID).0
|
||||
}) };
|
||||
|
||||
let base_size_px = au_to_int_px(base_size as f32);
|
||||
let html_size = self.html_size() as usize;
|
||||
if base_size_px >= 9 && base_size_px <= 16 {
|
||||
NonNegativeLength::new(FONT_SIZE_MAPPING[(base_size_px - 9) as usize][html_size] as f32)
|
||||
} else {
|
||||
Au(FONT_SIZE_FACTORS[html_size] * base_size / 100).into()
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_computed_value(_: &computed_value::T) -> Self {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
% endif
|
||||
|
||||
/// This is the ratio applied for font-size: larger
|
||||
/// and smaller by both Firefox and Chrome
|
||||
const LARGER_FONT_SIZE_RATIO: f32 = 1.2;
|
||||
|
||||
impl SpecifiedValue {
|
||||
/// https://html.spec.whatwg.org/multipage/#rules-for-parsing-a-legacy-font-size
|
||||
pub fn from_html_size(size: u8) -> Self {
|
||||
SpecifiedValue::Keyword(match size {
|
||||
// If value is less than 1, let it be 1.
|
||||
0 | 1 => XSmall,
|
||||
2 => Small,
|
||||
3 => Medium,
|
||||
4 => Large,
|
||||
5 => XLarge,
|
||||
6 => XXLarge,
|
||||
// If value is greater than 7, let it be 7.
|
||||
_ => XXXLarge,
|
||||
}, 1., Au(0).into())
|
||||
}
|
||||
|
||||
/// If this value is specified as a ratio of the parent font (em units
|
||||
/// or percent) return the ratio
|
||||
pub fn as_font_ratio(&self, context: &Context) -> Option<(f32, NonNegativeLength)> {
|
||||
match *self {
|
||||
SpecifiedValue::Length(ref lop) => {
|
||||
match *lop {
|
||||
LengthOrPercentage::Percentage(pc) => {
|
||||
Some((pc.0, NonNegativeLength::zero()))
|
||||
}
|
||||
LengthOrPercentage::Length(ref nocalc) => {
|
||||
match *nocalc {
|
||||
NoCalcLength::FontRelative(FontRelativeLength::Em(em)) => {
|
||||
Some((em, NonNegativeLength::zero()))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
LengthOrPercentage::Calc(ref calc) => {
|
||||
if calc.em.is_none() && calc.percentage.is_none() {
|
||||
return None;
|
||||
}
|
||||
let ratio = calc.em.unwrap_or(0.) + calc.percentage.map_or(0., |pc| pc.0);
|
||||
// Compute it, but shave off the font-relative part (em, %)
|
||||
// This will mean that other font-relative units like ex and ch will be computed against
|
||||
// the old font even when the font changes. There's no particular "right answer" for what
|
||||
// to do here -- Gecko recascades as if the font had changed, we instead track the changes
|
||||
// and reapply, which means that we carry over old computed ex/ch values whilst Gecko
|
||||
// recomputes new ones. This is enough of an edge case to not really matter.
|
||||
let abs = calc.to_computed_value_zoomed(context, FontBaseSize::Custom(Au(0)))
|
||||
.length_component().into();
|
||||
Some((ratio, abs))
|
||||
}
|
||||
}
|
||||
}
|
||||
SpecifiedValue::Larger => Some((LARGER_FONT_SIZE_RATIO, Au(0).into())),
|
||||
SpecifiedValue::Smaller => Some((1. / LARGER_FONT_SIZE_RATIO, Au(0).into())),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Compute it against a given base font size
|
||||
pub fn to_computed_value_against(
|
||||
&self,
|
||||
context: &Context,
|
||||
base_size: FontBaseSize,
|
||||
) -> NonNegativeLength {
|
||||
use values::specified::length::FontRelativeLength;
|
||||
match *self {
|
||||
SpecifiedValue::Length(LengthOrPercentage::Length(
|
||||
NoCalcLength::FontRelative(value))) => {
|
||||
value.to_computed_value(context, base_size).into()
|
||||
}
|
||||
SpecifiedValue::Length(LengthOrPercentage::Length(
|
||||
NoCalcLength::ServoCharacterWidth(value))) => {
|
||||
value.to_computed_value(base_size.resolve(context)).into()
|
||||
}
|
||||
SpecifiedValue::Length(LengthOrPercentage::Length(
|
||||
NoCalcLength::Absolute(ref l))) => {
|
||||
context.maybe_zoom_text(l.to_computed_value(context)).into()
|
||||
}
|
||||
SpecifiedValue::Length(LengthOrPercentage::Length(ref l)) => {
|
||||
l.to_computed_value(context).into()
|
||||
}
|
||||
SpecifiedValue::Length(LengthOrPercentage::Percentage(pc)) => {
|
||||
base_size.resolve(context).scale_by(pc.0).into()
|
||||
}
|
||||
SpecifiedValue::Length(LengthOrPercentage::Calc(ref calc)) => {
|
||||
let calc = calc.to_computed_value_zoomed(context, base_size);
|
||||
calc.to_used_value(Some(base_size.resolve(context))).unwrap().into()
|
||||
}
|
||||
SpecifiedValue::Keyword(ref key, fraction, offset) => {
|
||||
let key_len = key.to_computed_value(context).scale_by(fraction) + offset;
|
||||
context.maybe_zoom_text(key_len.0).into()
|
||||
}
|
||||
SpecifiedValue::Smaller => {
|
||||
FontRelativeLength::Em(1. / LARGER_FONT_SIZE_RATIO)
|
||||
.to_computed_value(context, base_size).into()
|
||||
}
|
||||
SpecifiedValue::Larger => {
|
||||
FontRelativeLength::Em(LARGER_FONT_SIZE_RATIO)
|
||||
.to_computed_value(context, base_size).into()
|
||||
}
|
||||
|
||||
SpecifiedValue::System(_) => {
|
||||
<%self:nongecko_unreachable>
|
||||
context.cached_system_font.as_ref().unwrap().font_size
|
||||
</%self:nongecko_unreachable>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pub use values::specified::font::FontSize as SpecifiedValue;
|
||||
|
||||
#[inline]
|
||||
#[allow(missing_docs)]
|
||||
pub fn get_initial_value() -> computed_value::T {
|
||||
NonNegativeLength::new(FONT_MEDIUM_PX as f32)
|
||||
computed_value::T {
|
||||
size: Au::from_px(FONT_MEDIUM_PX).into(),
|
||||
keyword_info: Some(KeywordInfo::medium())
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_initial_specified_value() -> SpecifiedValue {
|
||||
SpecifiedValue::Keyword(Medium, 1., Au(0).into())
|
||||
SpecifiedValue::Keyword(KeywordInfo::medium())
|
||||
}
|
||||
|
||||
|
||||
impl ToComputedValue for SpecifiedValue {
|
||||
type ComputedValue = computed_value::T;
|
||||
|
||||
#[inline]
|
||||
fn to_computed_value(&self, context: &Context) -> computed_value::T {
|
||||
self.to_computed_value_against(context, FontBaseSize::InheritedStyle)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_computed_value(computed: &computed_value::T) -> Self {
|
||||
SpecifiedValue::Length(LengthOrPercentage::Length(
|
||||
ToComputedValue::from_computed_value(&computed.0)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
/// <length> | <percentage> | <absolute-size> | <relative-size>
|
||||
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<SpecifiedValue, ParseError<'i>> {
|
||||
|
@ -955,7 +644,7 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
}
|
||||
|
||||
if let Ok(kw) = input.try(KeywordSize::parse) {
|
||||
return Ok(SpecifiedValue::Keyword(kw, 1., Au(0).into()))
|
||||
return Ok(SpecifiedValue::Keyword(kw.into()))
|
||||
}
|
||||
|
||||
try_match_ident_ignore_ascii_case! { input.expect_ident()?,
|
||||
|
@ -964,42 +653,10 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
}
|
||||
}
|
||||
|
||||
impl SpecifiedValue {
|
||||
pub fn system_font(f: SystemFont) -> Self {
|
||||
SpecifiedValue::System(f)
|
||||
}
|
||||
pub fn get_system(&self) -> Option<SystemFont> {
|
||||
if let SpecifiedValue::System(s) = *self {
|
||||
Some(s)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_mut)]
|
||||
pub fn cascade_specified_font_size(context: &mut Context,
|
||||
specified_value: &SpecifiedValue,
|
||||
mut computed: NonNegativeLength) {
|
||||
if let SpecifiedValue::Keyword(kw, fraction, offset) = *specified_value {
|
||||
context.builder.font_size_keyword = Some((kw, fraction, offset));
|
||||
} else if let Some((ratio, abs)) = specified_value.as_font_ratio(context) {
|
||||
// In case a font-size-relative value was applied to a keyword
|
||||
// value, we must preserve this fact in case the generic font family
|
||||
// changes. relative values (em and %) applied to keywords must be
|
||||
// recomputed from the base size for the keyword and the relative size.
|
||||
//
|
||||
// See bug 1355707
|
||||
if let Some((kw, fraction, old_abs)) = *context.builder.inherited_font_computation_data() {
|
||||
context.builder.font_size_keyword =
|
||||
Some((kw, fraction * ratio, abs + old_abs.scale_by(ratio)));
|
||||
} else {
|
||||
context.builder.font_size_keyword = None;
|
||||
}
|
||||
} else {
|
||||
context.builder.font_size_keyword = None;
|
||||
}
|
||||
|
||||
mut computed: computed_value::T) {
|
||||
// we could use clone_language and clone_font_family() here but that's
|
||||
// expensive. Do it only in gecko mode for now.
|
||||
% if product == "gecko":
|
||||
|
@ -1010,9 +667,9 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
context.builder.get_parent_font().gecko().mLanguage.raw::<nsIAtom>() ||
|
||||
context.builder.get_font().gecko().mGenericID !=
|
||||
context.builder.get_parent_font().gecko().mGenericID {
|
||||
if let Some((kw, ratio, offset)) = context.builder.font_size_keyword {
|
||||
let len = kw.to_computed_value(context).scale_by(ratio) + offset;
|
||||
computed = context.maybe_zoom_text(len.0).into();
|
||||
if let Some(info) = computed.keyword_info {
|
||||
computed.size = context.maybe_zoom_text(info.kw.to_computed_value(context)
|
||||
.scale_by(info.factor) + info.offset)
|
||||
}
|
||||
}
|
||||
% endif
|
||||
|
@ -1031,7 +688,7 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
.to_computed_value_against(context, FontBaseSize::Custom(Au::from(parent)));
|
||||
context.builder
|
||||
.mutate_font()
|
||||
.apply_unconstrained_font_size(new_unconstrained);
|
||||
.apply_unconstrained_font_size(new_unconstrained.size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1041,22 +698,17 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
// If inheriting, we must recompute font-size in case of language
|
||||
// changes using the font_size_keyword. We also need to do this to
|
||||
// handle mathml scriptlevel changes
|
||||
let kw_inherited_size = context.builder.font_size_keyword.map(|(kw, ratio, offset)| {
|
||||
let len = SpecifiedValue::Keyword(kw, ratio, offset).to_computed_value(context);
|
||||
context.maybe_zoom_text(len.0).into()
|
||||
let kw_inherited_size = context.builder.get_parent_font()
|
||||
.clone_font_size()
|
||||
.keyword_info.map(|info| {
|
||||
context.maybe_zoom_text(SpecifiedValue::Keyword(info)
|
||||
.to_computed_value(context).size)
|
||||
});
|
||||
let parent_kw;
|
||||
let device = context.builder.device;
|
||||
let mut font = context.builder.take_font();
|
||||
let used_kw = {
|
||||
let parent_font = context.builder.get_parent_font();
|
||||
parent_kw = *context.builder.inherited_font_computation_data();
|
||||
|
||||
font.inherit_font_size_from(parent_font, kw_inherited_size, device)
|
||||
};
|
||||
font.inherit_font_size_from(context.builder.get_parent_font(),
|
||||
kw_inherited_size,
|
||||
context.builder.device);
|
||||
context.builder.put_font(font);
|
||||
context.builder.font_size_keyword =
|
||||
if used_kw { parent_kw } else { None };
|
||||
}
|
||||
|
||||
/// Cascade the initial value for the `font-size` property.
|
||||
|
@ -1068,16 +720,14 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
pub fn cascade_initial_font_size(context: &mut Context) {
|
||||
// font-size's default ("medium") does not always
|
||||
// compute to the same value and depends on the font
|
||||
let computed = context.maybe_zoom_text(
|
||||
longhands::font_size::get_initial_specified_value()
|
||||
.to_computed_value(context).0
|
||||
).into();
|
||||
let mut computed = longhands::font_size::get_initial_specified_value()
|
||||
.to_computed_value(context);
|
||||
computed.size = context.maybe_zoom_text(computed.size);
|
||||
context.builder.mutate_font().set_font_size(computed);
|
||||
% if product == "gecko":
|
||||
let device = context.builder.device;
|
||||
context.builder.mutate_font().fixup_font_min_size(device);
|
||||
% endif
|
||||
context.builder.font_size_keyword = Some((Default::default(), 1., Au(0).into()));
|
||||
}
|
||||
</%helpers:longhand>
|
||||
|
||||
|
@ -2552,7 +2202,10 @@ ${helpers.single_keyword("-moz-math-variant",
|
|||
let weight = longhands::font_weight::computed_value::T::from_gecko_weight(system.weight);
|
||||
let ret = ComputedSystemFont {
|
||||
font_family: longhands::font_family::computed_value::T(family),
|
||||
font_size: Au(system.size).into(),
|
||||
font_size: longhands::font_size::computed_value::T {
|
||||
size: Au(system.size).into(),
|
||||
keyword_info: None
|
||||
},
|
||||
font_weight: weight,
|
||||
font_size_adjust: longhands::font_size_adjust::computed_value
|
||||
::T::from_gecko_adjust(system.sizeAdjust),
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
use app_units::Au;
|
||||
use servo_arc::{Arc, UniqueArc};
|
||||
use smallbitvec::SmallBitVec;
|
||||
|
@ -92,32 +93,6 @@ pub trait MaybeBoxed<Out> {
|
|||
fn maybe_boxed(self) -> Out;
|
||||
}
|
||||
|
||||
|
||||
/// This is where we store extra font data while
|
||||
/// while computing font sizes.
|
||||
///
|
||||
/// font-size keyword values (and font-size-relative values applied
|
||||
/// to keyword values) need to preserve their identity as originating
|
||||
/// from keywords and relative font sizes. We store this information
|
||||
/// out of band in the ComputedValues. When None, the font size on the
|
||||
/// current struct was computed from a value that was not a keyword
|
||||
/// or a chain of font-size-relative values applying to successive parents
|
||||
/// terminated by a keyword. When Some, this means the font-size was derived
|
||||
/// from a keyword value or a keyword value on some ancestor with only
|
||||
/// font-size-relative keywords and regular inheritance in between. The
|
||||
/// integer stores the final ratio of the chain of font size relative values.
|
||||
/// and is 1 when there was just a keyword and no relative values.
|
||||
///
|
||||
/// When this is Some, we compute font sizes by computing the keyword against
|
||||
/// the generic font, and then multiplying it by the ratio (as well as adding any
|
||||
/// absolute offset from calcs)
|
||||
pub type FontComputationData = Option<(longhands::font_size::KeywordSize, f32, NonNegativeLength)>;
|
||||
|
||||
/// Default value for FontComputationData
|
||||
pub fn default_font_size_keyword() -> FontComputationData {
|
||||
Some((Default::default(), 1., Au(0).into()))
|
||||
}
|
||||
|
||||
impl<T> MaybeBoxed<T> for T {
|
||||
#[inline]
|
||||
fn maybe_boxed(self) -> T { self }
|
||||
|
@ -1845,9 +1820,8 @@ pub mod style_structs {
|
|||
/// (Servo does not handle MathML, so this just calls copy_font_size_from)
|
||||
pub fn inherit_font_size_from(&mut self, parent: &Self,
|
||||
_: Option<NonNegativeLength>,
|
||||
_: &Device) -> bool {
|
||||
_: &Device) {
|
||||
self.copy_font_size_from(parent);
|
||||
false
|
||||
}
|
||||
/// (Servo does not handle MathML, so this just calls set_font_size)
|
||||
pub fn apply_font_size(&mut self,
|
||||
|
@ -1985,9 +1959,6 @@ pub struct ComputedValuesInner {
|
|||
/// The writing mode of this computed values struct.
|
||||
pub writing_mode: WritingMode,
|
||||
|
||||
/// The keyword behind the current font-size property, if any
|
||||
pub font_computation_data: FontComputationData,
|
||||
|
||||
/// A set of flags we use to store misc information regarding this style.
|
||||
pub flags: ComputedValueFlags,
|
||||
|
||||
|
@ -2043,7 +2014,6 @@ impl ComputedValues {
|
|||
_: Option<<&PseudoElement>,
|
||||
custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
|
||||
writing_mode: WritingMode,
|
||||
font_size_keyword: FontComputationData,
|
||||
flags: ComputedValueFlags,
|
||||
rules: Option<StrongRuleNode>,
|
||||
visited_style: Option<Arc<ComputedValues>>,
|
||||
|
@ -2055,7 +2025,6 @@ impl ComputedValues {
|
|||
inner: ComputedValuesInner::new(
|
||||
custom_properties,
|
||||
writing_mode,
|
||||
font_size_keyword,
|
||||
flags,
|
||||
rules,
|
||||
visited_style,
|
||||
|
@ -2076,7 +2045,6 @@ impl ComputedValuesInner {
|
|||
pub fn new(
|
||||
custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
|
||||
writing_mode: WritingMode,
|
||||
font_size_keyword: FontComputationData,
|
||||
flags: ComputedValueFlags,
|
||||
rules: Option<StrongRuleNode>,
|
||||
visited_style: Option<Arc<ComputedValues>>,
|
||||
|
@ -2087,7 +2055,6 @@ impl ComputedValuesInner {
|
|||
ComputedValuesInner {
|
||||
custom_properties: custom_properties,
|
||||
writing_mode: writing_mode,
|
||||
font_computation_data: font_size_keyword,
|
||||
rules: rules,
|
||||
visited_style: visited_style,
|
||||
flags: flags,
|
||||
|
@ -2609,8 +2576,6 @@ pub struct StyleBuilder<'a> {
|
|||
///
|
||||
/// TODO(emilio): Make private.
|
||||
pub writing_mode: WritingMode,
|
||||
/// The keyword behind the current font-size property, if any.
|
||||
pub font_size_keyword: FontComputationData,
|
||||
/// Flags for the computed value.
|
||||
pub flags: ComputedValueFlags,
|
||||
/// The element's style if visited, only computed if there's a relevant link
|
||||
|
@ -2633,7 +2598,6 @@ impl<'a> StyleBuilder<'a> {
|
|||
rules: Option<StrongRuleNode>,
|
||||
custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
|
||||
writing_mode: WritingMode,
|
||||
font_size_keyword: FontComputationData,
|
||||
mut flags: ComputedValueFlags,
|
||||
visited_style: Option<Arc<ComputedValues>>,
|
||||
) -> Self {
|
||||
|
@ -2671,7 +2635,6 @@ impl<'a> StyleBuilder<'a> {
|
|||
modified_reset: false,
|
||||
custom_properties,
|
||||
writing_mode,
|
||||
font_size_keyword,
|
||||
flags,
|
||||
visited_style,
|
||||
% for style_struct in data.active_style_structs():
|
||||
|
@ -2714,7 +2677,6 @@ impl<'a> StyleBuilder<'a> {
|
|||
rules: None, // FIXME(emilio): Dubious...
|
||||
custom_properties: style_to_derive_from.custom_properties(),
|
||||
writing_mode: style_to_derive_from.writing_mode,
|
||||
font_size_keyword: style_to_derive_from.font_computation_data,
|
||||
flags: style_to_derive_from.flags,
|
||||
visited_style: style_to_derive_from.clone_visited_style(),
|
||||
% for style_struct in data.active_style_structs():
|
||||
|
@ -2834,7 +2796,6 @@ impl<'a> StyleBuilder<'a> {
|
|||
/* rules = */ None,
|
||||
parent.custom_properties(),
|
||||
parent.writing_mode,
|
||||
parent.font_computation_data,
|
||||
parent.flags,
|
||||
parent.clone_visited_style()
|
||||
)
|
||||
|
@ -2941,7 +2902,6 @@ impl<'a> StyleBuilder<'a> {
|
|||
self.pseudo,
|
||||
self.custom_properties,
|
||||
self.writing_mode,
|
||||
self.font_size_keyword,
|
||||
self.flags,
|
||||
self.rules,
|
||||
self.visited_style,
|
||||
|
@ -2964,11 +2924,6 @@ impl<'a> StyleBuilder<'a> {
|
|||
/// ::first-line case some of the inherited information needs to come from
|
||||
/// one ComputedValues instance and some from a different one.
|
||||
|
||||
/// Inherited font bits.
|
||||
pub fn inherited_font_computation_data(&self) -> &FontComputationData {
|
||||
&self.inherited_style.font_computation_data
|
||||
}
|
||||
|
||||
/// Inherited writing-mode.
|
||||
pub fn inherited_writing_mode(&self) -> &WritingMode {
|
||||
&self.inherited_style.writing_mode
|
||||
|
@ -3006,7 +2961,6 @@ mod lazy_static_module {
|
|||
use logical_geometry::WritingMode;
|
||||
use servo_arc::Arc;
|
||||
use super::{ComputedValues, ComputedValuesInner, longhands, style_structs};
|
||||
use super::default_font_size_keyword;
|
||||
use super::computed_value_flags::ComputedValueFlags;
|
||||
|
||||
/// The initial values for all style structs as defined by the specification.
|
||||
|
@ -3025,7 +2979,6 @@ mod lazy_static_module {
|
|||
% endfor
|
||||
custom_properties: None,
|
||||
writing_mode: WritingMode::empty(),
|
||||
font_computation_data: default_font_size_keyword(),
|
||||
rules: None,
|
||||
visited_style: None,
|
||||
flags: ComputedValueFlags::empty(),
|
||||
|
@ -3252,7 +3205,6 @@ where
|
|||
Some(rules.clone()),
|
||||
custom_properties,
|
||||
WritingMode::empty(),
|
||||
inherited_style.font_computation_data,
|
||||
ComputedValueFlags::empty(),
|
||||
visited_style,
|
||||
),
|
||||
|
|
|
@ -52,7 +52,7 @@ impl RuleCacheConditions {
|
|||
}
|
||||
|
||||
if let Some(fs) = self.font_size {
|
||||
if style.get_font().clone_font_size() != fs {
|
||||
if style.get_font().clone_font_size().size != fs {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ impl Device {
|
|||
viewport_size,
|
||||
device_pixel_ratio,
|
||||
// FIXME(bz): Seems dubious?
|
||||
root_font_size: AtomicIsize::new(font_size::get_initial_value().0.to_i32_au() as isize),
|
||||
root_font_size: AtomicIsize::new(font_size::get_initial_value().size().0 as isize),
|
||||
used_root_font_size: AtomicBool::new(false),
|
||||
used_viewport_units: AtomicBool::new(false),
|
||||
}
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Computed values for font properties
|
||||
|
||||
use app_units::Au;
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use values::computed::NonNegativeLength;
|
||||
use values::specified::font as specified;
|
||||
|
||||
#[derive(Animate, ComputeSquaredDistance, ToAnimatedValue, ToAnimatedZero)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
/// The computed value of font-size
|
||||
pub struct FontSize {
|
||||
/// The size.
|
||||
pub size: NonNegativeLength,
|
||||
/// If derived from a keyword, the keyword and additional transformations applied to it
|
||||
pub keyword_info: Option<KeywordInfo>,
|
||||
}
|
||||
|
||||
#[derive(Animate, ComputeSquaredDistance, ToAnimatedValue, ToAnimatedZero)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
/// Additional information for keyword-derived font sizes.
|
||||
pub struct KeywordInfo {
|
||||
/// The keyword used
|
||||
pub kw: specified::KeywordSize,
|
||||
/// A factor to be multiplied by the computed size of the keyword
|
||||
pub factor: f32,
|
||||
/// An additional Au offset to add to the kw*factor in the case of calcs
|
||||
pub offset: NonNegativeLength,
|
||||
}
|
||||
|
||||
impl KeywordInfo {
|
||||
/// Given a parent keyword info (self), apply an additional factor/offset to it
|
||||
pub fn compose(self, factor: f32, offset: NonNegativeLength) -> Self {
|
||||
KeywordInfo {
|
||||
kw: self.kw,
|
||||
factor: self.factor * factor,
|
||||
offset: self.offset.scale_by(factor) + offset,
|
||||
}
|
||||
}
|
||||
|
||||
/// KeywordInfo value for font-size: medium
|
||||
pub fn medium() -> Self {
|
||||
specified::KeywordSize::Medium.into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<specified::KeywordSize> for KeywordInfo {
|
||||
fn from(x: specified::KeywordSize) -> Self {
|
||||
KeywordInfo {
|
||||
kw: x,
|
||||
factor: 1.,
|
||||
offset: Au(0).into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FontSize {
|
||||
/// The actual computed font size.
|
||||
pub fn size(self) -> Au {
|
||||
self.size.into()
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for FontSize {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
self.size.to_css(dest)
|
||||
}
|
||||
}
|
|
@ -35,7 +35,7 @@ impl ToComputedValue for specified::NoCalcLength {
|
|||
specified::NoCalcLength::ViewportPercentage(length) =>
|
||||
length.to_computed_value(context.viewport_size_for_viewport_unit_resolution()),
|
||||
specified::NoCalcLength::ServoCharacterWidth(length) =>
|
||||
length.to_computed_value(Au::from(context.style().get_font().clone_font_size())),
|
||||
length.to_computed_value(context.style().get_font().clone_font_size().size()),
|
||||
#[cfg(feature = "gecko")]
|
||||
specified::NoCalcLength::Physical(length) =>
|
||||
length.to_computed_value(context),
|
||||
|
@ -269,7 +269,7 @@ impl specified::CalcLengthOrPercentage {
|
|||
|
||||
/// Compute font-size or line-height taking into account text-zoom if necessary.
|
||||
pub fn to_computed_value_zoomed(&self, context: &Context, base_size: FontBaseSize) -> CalcLengthOrPercentage {
|
||||
self.to_computed_value_with_zoom(context, |abs| context.maybe_zoom_text(abs), base_size)
|
||||
self.to_computed_value_with_zoom(context, |abs| context.maybe_zoom_text(abs.into()).0, base_size)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ pub mod box_;
|
|||
pub mod color;
|
||||
pub mod effects;
|
||||
pub mod flex;
|
||||
pub mod font;
|
||||
pub mod image;
|
||||
#[cfg(feature = "gecko")]
|
||||
pub mod gecko;
|
||||
|
@ -159,7 +160,7 @@ impl<'a> Context<'a> {
|
|||
|
||||
/// Apply text-zoom if enabled.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn maybe_zoom_text(&self, size: CSSPixelLength) -> CSSPixelLength {
|
||||
pub fn maybe_zoom_text(&self, size: NonNegativeLength) -> NonNegativeLength {
|
||||
// We disable zoom for <svg:text> by unsetting the
|
||||
// -x-text-zoom property, which leads to a false value
|
||||
// in mAllowZoom
|
||||
|
@ -172,7 +173,7 @@ impl<'a> Context<'a> {
|
|||
|
||||
/// (Servo doesn't do text-zoom)
|
||||
#[cfg(feature = "servo")]
|
||||
pub fn maybe_zoom_text(&self, size: CSSPixelLength) -> CSSPixelLength {
|
||||
pub fn maybe_zoom_text(&self, size: NonNegativeLength) -> NonNegativeLength {
|
||||
size
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,6 @@ pub type CSSFloat = f32;
|
|||
/// A CSS integer value.
|
||||
pub type CSSInteger = i32;
|
||||
|
||||
/// The default font size.
|
||||
pub const FONT_MEDIUM_PX: i32 = 16;
|
||||
|
||||
define_keyword_type!(None_, "none");
|
||||
define_keyword_type!(Auto, "auto");
|
||||
define_keyword_type!(Normal, "normal");
|
||||
|
|
|
@ -0,0 +1,354 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Specified values for font properties
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
use Atom;
|
||||
use app_units::Au;
|
||||
use cssparser::Parser;
|
||||
use properties::longhands::system_font::SystemFont;
|
||||
use std::fmt;
|
||||
use style_traits::{ToCss, ParseError};
|
||||
use values::computed::{font as computed, Context, NonNegativeLength, ToComputedValue};
|
||||
use values::specified::{LengthOrPercentage, NoCalcLength};
|
||||
use values::specified::length::FontBaseSize;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
/// A specified font-size value
|
||||
pub enum FontSize {
|
||||
/// A length; e.g. 10px.
|
||||
Length(LengthOrPercentage),
|
||||
/// A keyword value, along with a ratio and absolute offset.
|
||||
/// The ratio in any specified keyword value
|
||||
/// will be 1 (with offset 0), but we cascade keywordness even
|
||||
/// after font-relative (percent and em) values
|
||||
/// have been applied, which is where the ratio
|
||||
/// comes in. The offset comes in if we cascaded a calc value,
|
||||
/// where the font-relative portion (em and percentage) will
|
||||
/// go into the ratio, and the remaining units all computed together
|
||||
/// will go into the offset.
|
||||
/// See bug 1355707.
|
||||
Keyword(computed::KeywordInfo),
|
||||
/// font-size: smaller
|
||||
Smaller,
|
||||
/// font-size: larger
|
||||
Larger,
|
||||
/// Derived from a specified system font.
|
||||
System(SystemFont)
|
||||
}
|
||||
|
||||
impl ToCss for FontSize {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
match *self {
|
||||
FontSize::Length(ref lop) => lop.to_css(dest),
|
||||
FontSize::Keyword(info) => info.kw.to_css(dest),
|
||||
FontSize::Smaller => dest.write_str("smaller"),
|
||||
FontSize::Larger => dest.write_str("larger"),
|
||||
FontSize::System(sys) => sys.to_css(dest),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<LengthOrPercentage> for FontSize {
|
||||
fn from(other: LengthOrPercentage) -> Self {
|
||||
FontSize::Length(other)
|
||||
}
|
||||
}
|
||||
|
||||
/// CSS font keywords
|
||||
#[derive(Animate, ComputeSquaredDistance, ToAnimatedValue, ToAnimatedZero)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[allow(missing_docs)]
|
||||
pub enum KeywordSize {
|
||||
XXSmall = 1, // This is to enable the NonZero optimization
|
||||
// which simplifies the representation of Option<KeywordSize>
|
||||
// in bindgen
|
||||
XSmall,
|
||||
Small,
|
||||
Medium,
|
||||
Large,
|
||||
XLarge,
|
||||
XXLarge,
|
||||
// This is not a real font keyword and will not parse
|
||||
// HTML font-size 7 corresponds to this value
|
||||
XXXLarge,
|
||||
}
|
||||
|
||||
impl KeywordSize {
|
||||
/// Parse a keyword size
|
||||
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
try_match_ident_ignore_ascii_case! { input.expect_ident()?,
|
||||
"xx-small" => Ok(KeywordSize::XXSmall),
|
||||
"x-small" => Ok(KeywordSize::XSmall),
|
||||
"small" => Ok(KeywordSize::Small),
|
||||
"medium" => Ok(KeywordSize::Medium),
|
||||
"large" => Ok(KeywordSize::Large),
|
||||
"x-large" => Ok(KeywordSize::XLarge),
|
||||
"xx-large" => Ok(KeywordSize::XXLarge),
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert to an HTML <font size> value
|
||||
pub fn html_size(&self) -> u8 {
|
||||
match *self {
|
||||
KeywordSize::XXSmall => 0,
|
||||
KeywordSize::XSmall => 1,
|
||||
KeywordSize::Small => 2,
|
||||
KeywordSize::Medium => 3,
|
||||
KeywordSize::Large => 4,
|
||||
KeywordSize::XLarge => 5,
|
||||
KeywordSize::XXLarge => 6,
|
||||
KeywordSize::XXXLarge => 7,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for KeywordSize {
|
||||
fn default() -> Self {
|
||||
KeywordSize::Medium
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for KeywordSize {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
dest.write_str(match *self {
|
||||
KeywordSize::XXSmall => "xx-small",
|
||||
KeywordSize::XSmall => "x-small",
|
||||
KeywordSize::Small => "small",
|
||||
KeywordSize::Medium => "medium",
|
||||
KeywordSize::Large => "large",
|
||||
KeywordSize::XLarge => "x-large",
|
||||
KeywordSize::XXLarge => "xx-large",
|
||||
KeywordSize::XXXLarge => unreachable!("We should never serialize \
|
||||
specified values set via
|
||||
HTML presentation attributes"),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/// This is the ratio applied for font-size: larger
|
||||
/// and smaller by both Firefox and Chrome
|
||||
const LARGER_FONT_SIZE_RATIO: f32 = 1.2;
|
||||
|
||||
/// The default font size.
|
||||
pub const FONT_MEDIUM_PX: i32 = 16;
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
impl ToComputedValue for KeywordSize {
|
||||
type ComputedValue = NonNegativeLength;
|
||||
#[inline]
|
||||
fn to_computed_value(&self, _: &Context) -> NonNegativeLength {
|
||||
// https://drafts.csswg.org/css-fonts-3/#font-size-prop
|
||||
match *self {
|
||||
KeywordSize::XXSmall => Au::from_px(FONT_MEDIUM_PX) * 3 / 5,
|
||||
KeywordSize::XSmall => Au::from_px(FONT_MEDIUM_PX) * 3 / 4,
|
||||
KeywordSize::Small => Au::from_px(FONT_MEDIUM_PX) * 8 / 9,
|
||||
KeywordSize::Medium => Au::from_px(FONT_MEDIUM_PX),
|
||||
KeywordSize::Large => Au::from_px(FONT_MEDIUM_PX) * 6 / 5,
|
||||
KeywordSize::XLarge => Au::from_px(FONT_MEDIUM_PX) * 3 / 2,
|
||||
KeywordSize::XXLarge => Au::from_px(FONT_MEDIUM_PX) * 2,
|
||||
KeywordSize::XXXLarge => Au::from_px(FONT_MEDIUM_PX) * 3,
|
||||
}.into()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_computed_value(_: &NonNegativeLength) -> Self {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
impl ToComputedValue for KeywordSize {
|
||||
type ComputedValue = NonNegativeLength;
|
||||
#[inline]
|
||||
fn to_computed_value(&self, cx: &Context) -> NonNegativeLength {
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use values::specified::length::au_to_int_px;
|
||||
// Data from nsRuleNode.cpp in Gecko
|
||||
// Mapping from base size and HTML size to pixels
|
||||
// The first index is (base_size - 9), the second is the
|
||||
// HTML size. "0" is CSS keyword xx-small, not HTML size 0,
|
||||
// since HTML size 0 is the same as 1.
|
||||
//
|
||||
// xxs xs s m l xl xxl -
|
||||
// - 0/1 2 3 4 5 6 7
|
||||
static FONT_SIZE_MAPPING: [[i32; 8]; 8] = [
|
||||
[9, 9, 9, 9, 11, 14, 18, 27],
|
||||
[9, 9, 9, 10, 12, 15, 20, 30],
|
||||
[9, 9, 10, 11, 13, 17, 22, 33],
|
||||
[9, 9, 10, 12, 14, 18, 24, 36],
|
||||
[9, 10, 12, 13, 16, 20, 26, 39],
|
||||
[9, 10, 12, 14, 17, 21, 28, 42],
|
||||
[9, 10, 13, 15, 18, 23, 30, 45],
|
||||
[9, 10, 13, 16, 18, 24, 32, 48]
|
||||
];
|
||||
|
||||
static FONT_SIZE_FACTORS: [i32; 8] = [60, 75, 89, 100, 120, 150, 200, 300];
|
||||
|
||||
// XXXManishearth handle quirks mode (bug 1401322)
|
||||
|
||||
let ref gecko_font = cx.style().get_font().gecko();
|
||||
let base_size = unsafe { Atom::with(gecko_font.mLanguage.raw::<nsIAtom>(), |atom| {
|
||||
cx.font_metrics_provider.get_size(atom, gecko_font.mGenericID).0
|
||||
}) };
|
||||
|
||||
let base_size_px = au_to_int_px(base_size as f32);
|
||||
let html_size = self.html_size() as usize;
|
||||
if base_size_px >= 9 && base_size_px <= 16 {
|
||||
Au::from_px(FONT_SIZE_MAPPING[(base_size_px - 9) as usize][html_size]).into()
|
||||
} else {
|
||||
Au(FONT_SIZE_FACTORS[html_size] * base_size / 100).into()
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_computed_value(_: &NonNegativeLength) -> Self {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
|
||||
impl FontSize {
|
||||
/// https://html.spec.whatwg.org/multipage/#rules-for-parsing-a-legacy-font-size
|
||||
pub fn from_html_size(size: u8) -> Self {
|
||||
FontSize::Keyword(match size {
|
||||
// If value is less than 1, let it be 1.
|
||||
0 | 1 => KeywordSize::XSmall,
|
||||
2 => KeywordSize::Small,
|
||||
3 => KeywordSize::Medium,
|
||||
4 => KeywordSize::Large,
|
||||
5 => KeywordSize::XLarge,
|
||||
6 => KeywordSize::XXLarge,
|
||||
// If value is greater than 7, let it be 7.
|
||||
_ => KeywordSize::XXXLarge,
|
||||
}.into())
|
||||
}
|
||||
|
||||
/// Compute it against a given base font size
|
||||
pub fn to_computed_value_against(
|
||||
&self,
|
||||
context: &Context,
|
||||
base_size: FontBaseSize,
|
||||
) -> computed::FontSize {
|
||||
use values::specified::length::FontRelativeLength;
|
||||
|
||||
let compose_keyword = |factor| {
|
||||
context.style().get_parent_font()
|
||||
.clone_font_size().keyword_info
|
||||
.map(|i| i.compose(factor, Au(0).into()))
|
||||
};
|
||||
let mut info = None;
|
||||
let size = match *self {
|
||||
FontSize::Length(LengthOrPercentage::Length(
|
||||
NoCalcLength::FontRelative(value))) => {
|
||||
if let FontRelativeLength::Em(em) = value {
|
||||
// If the parent font was keyword-derived, this is too.
|
||||
// Tack the em unit onto the factor
|
||||
info = compose_keyword(em);
|
||||
}
|
||||
value.to_computed_value(context, base_size).into()
|
||||
}
|
||||
FontSize::Length(LengthOrPercentage::Length(
|
||||
NoCalcLength::ServoCharacterWidth(value))) => {
|
||||
value.to_computed_value(base_size.resolve(context)).into()
|
||||
}
|
||||
FontSize::Length(LengthOrPercentage::Length(
|
||||
NoCalcLength::Absolute(ref l))) => {
|
||||
context.maybe_zoom_text(l.to_computed_value(context).into())
|
||||
}
|
||||
FontSize::Length(LengthOrPercentage::Length(ref l)) => {
|
||||
l.to_computed_value(context).into()
|
||||
}
|
||||
FontSize::Length(LengthOrPercentage::Percentage(pc)) => {
|
||||
// If the parent font was keyword-derived, this is too.
|
||||
// Tack the % onto the factor
|
||||
info = compose_keyword(pc.0);
|
||||
base_size.resolve(context).scale_by(pc.0).into()
|
||||
}
|
||||
FontSize::Length(LengthOrPercentage::Calc(ref calc)) => {
|
||||
let parent = context.style().get_parent_font().clone_font_size();
|
||||
// if we contain em/% units and the parent was keyword derived, this is too
|
||||
// Extract the ratio/offset and compose it
|
||||
if (calc.em.is_some() || calc.percentage.is_some()) && parent.keyword_info.is_some() {
|
||||
let ratio = calc.em.unwrap_or(0.) + calc.percentage.map_or(0., |pc| pc.0);
|
||||
// Compute it, but shave off the font-relative part (em, %)
|
||||
// This will mean that other font-relative units like ex and ch will be computed against
|
||||
// the old font even when the font changes. There's no particular "right answer" for what
|
||||
// to do here -- Gecko recascades as if the font had changed, we instead track the changes
|
||||
// and reapply, which means that we carry over old computed ex/ch values whilst Gecko
|
||||
// recomputes new ones. This is enough of an edge case to not really matter.
|
||||
let abs = calc.to_computed_value_zoomed(context, FontBaseSize::Custom(Au(0).into()))
|
||||
.length_component().into();
|
||||
info = parent.keyword_info.map(|i| i.compose(ratio, abs));
|
||||
}
|
||||
let calc = calc.to_computed_value_zoomed(context, base_size);
|
||||
calc.to_used_value(Some(base_size.resolve(context))).unwrap().into()
|
||||
}
|
||||
FontSize::Keyword(i) => {
|
||||
// As a specified keyword, this is keyword derived
|
||||
info = Some(i);
|
||||
context.maybe_zoom_text(i.kw.to_computed_value(context).scale_by(i.factor) + i.offset)
|
||||
}
|
||||
FontSize::Smaller => {
|
||||
info = compose_keyword(1. / LARGER_FONT_SIZE_RATIO);
|
||||
FontRelativeLength::Em(1. / LARGER_FONT_SIZE_RATIO)
|
||||
.to_computed_value(context, base_size).into()
|
||||
}
|
||||
FontSize::Larger => {
|
||||
info = compose_keyword(LARGER_FONT_SIZE_RATIO);
|
||||
FontRelativeLength::Em(LARGER_FONT_SIZE_RATIO)
|
||||
.to_computed_value(context, base_size).into()
|
||||
}
|
||||
|
||||
FontSize::System(_) => {
|
||||
#[cfg(feature = "servo")] {
|
||||
unreachable!()
|
||||
}
|
||||
#[cfg(feature = "gecko")] {
|
||||
context.cached_system_font.as_ref().unwrap().font_size.size
|
||||
}
|
||||
}
|
||||
};
|
||||
computed::FontSize {
|
||||
size: size,
|
||||
keyword_info: info,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToComputedValue for FontSize {
|
||||
type ComputedValue = computed::FontSize;
|
||||
|
||||
#[inline]
|
||||
fn to_computed_value(&self, context: &Context) -> computed::FontSize {
|
||||
self.to_computed_value_against(context, FontBaseSize::InheritedStyle)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_computed_value(computed: &computed::FontSize) -> Self {
|
||||
FontSize::Length(LengthOrPercentage::Length(
|
||||
ToComputedValue::from_computed_value(&computed.size.0)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
impl FontSize {
|
||||
/// Construct a system font value.
|
||||
pub fn system_font(f: SystemFont) -> Self {
|
||||
FontSize::System(f)
|
||||
}
|
||||
|
||||
/// Obtain the system font, if any
|
||||
pub fn get_system(&self) -> Option<SystemFont> {
|
||||
if let FontSize::System(s) = *self {
|
||||
Some(s)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,7 +18,7 @@ use style_traits::{ToCss, ParseError, StyleParseError};
|
|||
use style_traits::values::specified::AllowedNumericType;
|
||||
use stylesheets::CssRuleType;
|
||||
use super::{AllowQuirks, Number, ToComputedValue, Percentage};
|
||||
use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, None_, Normal};
|
||||
use values::{Auto, CSSFloat, Either, None_, Normal};
|
||||
use values::{ExtremumLength, serialize_dimension};
|
||||
use values::computed::{self, CSSPixelLength, Context};
|
||||
use values::generics::NonNegative;
|
||||
|
@ -96,8 +96,8 @@ impl FontBaseSize {
|
|||
pub fn resolve(&self, context: &Context) -> Au {
|
||||
match *self {
|
||||
FontBaseSize::Custom(size) => size,
|
||||
FontBaseSize::CurrentStyle => Au::from(context.style().get_font().clone_font_size()),
|
||||
FontBaseSize::InheritedStyle => Au::from(context.style().get_parent_font().clone_font_size()),
|
||||
FontBaseSize::CurrentStyle => context.style().get_font().clone_font_size().size(),
|
||||
FontBaseSize::InheritedStyle => context.style().get_parent_font().clone_font_size().size(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -571,12 +571,6 @@ impl NoCalcLength {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
/// Returns a `medium` length.
|
||||
pub fn medium() -> NoCalcLength {
|
||||
NoCalcLength::Absolute(AbsoluteLength::Px(FONT_MEDIUM_PX as f32))
|
||||
}
|
||||
|
||||
/// Get an absolute length from a px value.
|
||||
#[inline]
|
||||
pub fn from_px(px_value: CSSFloat) -> NoCalcLength {
|
||||
|
|
|
@ -65,6 +65,7 @@ pub mod calc;
|
|||
pub mod color;
|
||||
pub mod effects;
|
||||
pub mod flex;
|
||||
pub mod font;
|
||||
#[cfg(feature = "gecko")]
|
||||
pub mod gecko;
|
||||
pub mod grid;
|
||||
|
|
|
@ -100,7 +100,7 @@ impl ToComputedValue for LineHeight {
|
|||
GenericLineHeight::Length(ref non_negative_lop) => {
|
||||
let result = match non_negative_lop.0 {
|
||||
LengthOrPercentage::Length(NoCalcLength::Absolute(ref abs)) => {
|
||||
context.maybe_zoom_text(abs.to_computed_value(context))
|
||||
context.maybe_zoom_text(abs.to_computed_value(context).into()).0
|
||||
}
|
||||
LengthOrPercentage::Length(ref length) => {
|
||||
length.to_computed_value(context)
|
||||
|
|
|
@ -32,7 +32,7 @@ fn size_of_selectors_dummy_types() {
|
|||
size_of_test!(test_size_of_rule, style::stylist::Rule, 32);
|
||||
|
||||
// Large pages generate tens of thousands of ComputedValues.
|
||||
size_of_test!(test_size_of_cv, ComputedValues, 272);
|
||||
size_of_test!(test_size_of_cv, ComputedValues, 256);
|
||||
|
||||
size_of_test!(test_size_of_option_arc_cv, Option<Arc<ComputedValues>>, 8);
|
||||
size_of_test!(test_size_of_option_rule_node, Option<StrongRuleNode>, 8);
|
||||
|
|
Загрузка…
Ссылка в новой задаче