ChangeLog-2013-06-11 1.5 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621
  1. 2013-06-10 Timothy Hatcher <timothy@apple.com>
  2. Remove Xcode 4 skin and only have the Xcode 5 look.
  3. Reviewed by Joseph Pecoraro.
  4. * UserInterface/ButtonNavigationItem.css:
  5. (.navigation-bar .item.button.suppress-emboss.disabled > .glyph):
  6. * UserInterface/CodeMirrorOverrides.css:
  7. * UserInterface/DashboardView.css:
  8. (.toolbar .dashboard):
  9. (body.window-inactive .toolbar .dashboard):
  10. (.toolbar.collapsed .dashboard):
  11. (.toolbar.collapsed .dashboard > .logs):
  12. * UserInterface/DashboardView.js:
  13. (WebInspector.DashboardView):
  14. (WebInspector.DashboardView.prototype._setItemEnabled):
  15. * UserInterface/DetailsSection.css:
  16. * UserInterface/DividerNavigationItem.css:
  17. (.navigation-bar .item.divider):
  18. * UserInterface/FilterBar.css:
  19. (.filter-bar > input[type="search"]):
  20. (.filter-bar > input[type="search"]::-webkit-input-placeholder):
  21. (.filter-bar > input[type="search"]:valid):
  22. * UserInterface/FindBanner.css:
  23. (.find-banner > input[type="search"]):
  24. (.find-banner > button):
  25. * UserInterface/HierarchicalPathComponent.css:
  26. * UserInterface/InstrumentSidebarPanel.css:
  27. * UserInterface/LayerTreeSidebarPanel.css:
  28. * UserInterface/Main.css:
  29. (#split-content-browser > .navigation-bar):
  30. * UserInterface/NavigationBar.css:
  31. * UserInterface/NavigationSidebarPanel.css:
  32. * UserInterface/RadioButtonNavigationItem.css:
  33. (.navigation-bar .item.radio.button.text-only.selected):
  34. * UserInterface/ResourceSidebarPanel.css:
  35. * UserInterface/ResourceSidebarPanel.js:
  36. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
  37. * UserInterface/ScopeBar.css:
  38. (.scope-bar > li):
  39. (.scope-bar > li:active):
  40. (.scope-bar > li:hover):
  41. (.scope-bar > li.selected):
  42. * UserInterface/SearchBar.css:
  43. (.search-bar > input[type="search"]):
  44. (.search-bar > input[type="search"]::-webkit-input-placeholder):
  45. (.search-bar > input[type="search"]:valid):
  46. * UserInterface/TimelinesContentView.css:
  47. (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
  48. 2013-06-08 Timothy Hatcher <timothy@apple.com>
  49. Improve switching from the full view console to the Resource sidebar, so the previous resource is shown in the content browser again.
  50. Also cleans up my earlier changes and removes an assert that can fire often now.
  51. <rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
  52. Reviewed by Antoine Quint.
  53. * UserInterface/Main.js:
  54. (WebInspector.showFullHeightConsole):
  55. (WebInspector._sidebarCollapsedStateDidChange): Call _updateNavigationSidebarForCurrentContentView for the navigation sidebar.
  56. (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Only do this work if the sidebar is not collapsed. We don't
  57. want to deselect items if the sidebar is collapsed, preserving the selection is important when showing the sidebar later.
  58. (WebInspector._updateNavigationSidebarForCurrentContentView): Added. Split off from _navigationSidebarPanelSelected. Only do this work
  59. if the sidebar is not collapsed.
  60. (WebInspector._navigationSidebarPanelSelected): Call _updateNavigationSidebarForCurrentContentView.
  61. (WebInspector._contentBrowserCurrentContentViewDidChange): Clean up by returning early if there is no current content view.
  62. * UserInterface/ResourceSidebarPanel.js:
  63. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Remove an assert that can happen a lot now.
  64. 2013-06-07 Antoine Quint <graouts@apple.com>
  65. <rdar://problem/14094308> Styles should come before Layers details sidebar
  66. Switch Layers and Styles.
  67. Reviewed by Timothy Hatcher.
  68. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  69. (WebInspector.CSSStyleDetailsSidebarPanel):
  70. * UserInterface/LayerTreeSidebarPanel.js:
  71. (WebInspector.LayerTreeSidebarPanel):
  72. * UserInterface/Main.js:
  73. (WebInspector.contentLoaded):
  74. 2013-06-07 Timothy Hatcher <timothy@apple.com>
  75. Keep the selected tree element in sync with the current content view.
  76. <rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
  77. Reviewed by Antoine Quint.
  78. * UserInterface/Main.js:
  79. (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Added.
  80. (WebInspector._navigationSidebarPanelSelected): Call _revealAndSelectRepresentedObjectInNavigationSidebar.
  81. (WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
  82. 2013-06-07 Timothy Hatcher <timothy@apple.com>
  83. Keep the navigation sidebar and the current content view in sync with a set of allowed sidebars per content view.
  84. <rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
  85. Reviewed by Antoine Quint.
  86. * UserInterface/ContentView.js:
  87. (WebInspector.ContentView.prototype.get allowedNavigationSidebarPanels): Added.
  88. * UserInterface/FrameContentView.js:
  89. (WebInspector.FrameContentView.prototype.get allowedNavigationSidebarPanels): Added.
  90. * UserInterface/Main.js:
  91. (WebInspector.showSplitConsole): Show the navigation sidebar if it was showing.
  92. (WebInspector.showFullHeightConsole): Hide the navigation sidebar and remember if it was showing.
  93. (WebInspector.toggleConsoleView): Show the sidebar if it was showing.
  94. (WebInspector._navigationSidebarPanelSelected): Ensure the navigation sidebar panel is allowed by the current content view.
  95. (WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
  96. * UserInterface/NavigationSidebarPanel.js:
  97. (WebInspector.NavigationSidebarPanel.prototype.showContentViewForCurrentSelection):
  98. (WebInspector.NavigationSidebarPanel.prototype.shown):
  99. * UserInterface/ProfileView.js:
  100. (WebInspector.ProfileView.prototype.get allowedNavigationSidebarPanels): Added.
  101. * UserInterface/ResourceClusterContentView.js:
  102. (WebInspector.ResourceClusterContentView.prototype.get allowedNavigationSidebarPanels): Added.
  103. * UserInterface/TimelinesContentView.js:
  104. (WebInspector.TimelinesContentView.prototype.get allowedNavigationSidebarPanels): Added.
  105. 2013-06-06 Timothy Hatcher <timothy@apple.com>
  106. Properly filter into resources with a source map if they haven't been expanded yet.
  107. <rdar://problem/14072548> Resources filter shows "No Filter Results" after reload with SourceMaps
  108. Reviewed by Joseph Pecoraro.
  109. * UserInterface/NavigationSidebarPanel.js:
  110. (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Pass false to
  111. traverseNextTreeElement to cause the tree elements to be populated. This matches the interactive
  112. case when typing into the filter bar, which already worked with source maps.
  113. 2013-06-05 Antoine Quint <graouts@apple.com>
  114. <rdar://problem/14077407> Jumping to an error in a JS file form the console highlights to white first before going back to red
  115. Remove the explicit ÒtoÓ color in the CSS animation we use to highlight a link
  116. in the text editor as it is revealed, which means the ÒtoÓ color will be the
  117. underlying color set on the element. This will animate to red for errors,
  118. yellow for warnings, and transparent for regular lines.
  119. Reviewed by Timothy Hatcher.
  120. * UserInterface/TextEditor.css:
  121. (@-webkit-keyframes text-editor-highlight-fadeout):
  122. 2013-06-05 Antoine Quint <graouts@apple.com>
  123. <rdar://problem/14077152> Activity viewer does not update error count for grouped errors when inspector is closed.
  124. Take into account the repeat count of an error when incrementing
  125. the message count.
  126. Reviewed by Timothy Hatcher.
  127. * UserInterface/DashboardManager.js:
  128. (WebInspector.DashboardManager.prototype._consoleMessageAdded):
  129. (WebInspector.DashboardManager.prototype._consoleMessageWasRepeated):
  130. (WebInspector.DashboardManager.prototype._incrementConsoleMessageType):
  131. 2013-06-05 Joseph Pecoraro <pecoraro@apple.com>
  132. <rdar://problem/14072409> Pressing Enter/Esc when editing a breakpoint (conditional breakpoint) should dismiss popover
  133. Handle Esc and Enter on the <input> to dismiss the popover.
  134. This behaves like Xcode's breakpoint condition popover.
  135. Reviewed by Timothy Hatcher.
  136. * UserInterface/Breakpoint.js:
  137. (WebInspector.Breakpoint.prototype._popoverConditionInputKeyDown):
  138. (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
  139. (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
  140. 2013-06-05 Joseph Pecoraro <pecoraro@apple.com>
  141. <rdar://problem/14054886> Pressing Enter in a blank console should do nothing, not insert a newline
  142. Reviewed by Antoine Quint.
  143. * UserInterface/ConsolePrompt.js:
  144. 2013-06-05 Timothy Hatcher <timothy@apple.com>
  145. Add/update copyright and license to all the user interface files in
  146. preparation for open sourcing to WebKit.
  147. Rubber-stamped by Antoine Quint.
  148. * UserInterface/ActivateButtonNavigationItem.js:
  149. * UserInterface/ActivateButtonToolbarItem.js:
  150. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  151. * UserInterface/ApplicationCacheFrame.js:
  152. * UserInterface/ApplicationCacheFrameContentView.css:
  153. * UserInterface/ApplicationCacheFrameContentView.js:
  154. * UserInterface/ApplicationCacheFrameTreeElement.js:
  155. * UserInterface/ApplicationCacheIcons.css:
  156. * UserInterface/ApplicationCacheManager.js:
  157. * UserInterface/ApplicationCacheManifest.js:
  158. * UserInterface/ApplicationCacheManifestTreeElement.js:
  159. * UserInterface/ApplicationCacheObserver.js:
  160. * UserInterface/BinarySearch.js:
  161. * UserInterface/BlankStylePropertiesSection.js:
  162. * UserInterface/BottomUpProfileDataGridTree.js:
  163. * UserInterface/BoxModelDetailsSectionRow.css:
  164. * UserInterface/BoxModelDetailsSectionRow.js:
  165. * UserInterface/Branch.js:
  166. * UserInterface/BranchManager.js:
  167. * UserInterface/Breakpoint.css:
  168. * UserInterface/Breakpoint.js:
  169. * UserInterface/BreakpointIcons.css:
  170. * UserInterface/BreakpointTreeElement.css:
  171. * UserInterface/BreakpointTreeElement.js:
  172. * UserInterface/ButtonNavigationItem.css:
  173. * UserInterface/ButtonNavigationItem.js:
  174. * UserInterface/ButtonToolbarItem.css:
  175. * UserInterface/ButtonToolbarItem.js:
  176. * UserInterface/CSSCompletions.js:
  177. * UserInterface/CSSKeywordCompletions.js:
  178. * UserInterface/CSSMedia.js:
  179. * UserInterface/CSSObserver.js:
  180. * UserInterface/CSSProperty.js:
  181. * UserInterface/CSSRule.js:
  182. * UserInterface/CSSSelectorProfileObject.js:
  183. * UserInterface/CSSSelectorProfileType.js:
  184. * UserInterface/CSSSelectorProfileView.js:
  185. * UserInterface/CSSStyleDeclaration.js:
  186. * UserInterface/CSSStyleDeclarationSection.css:
  187. * UserInterface/CSSStyleDeclarationSection.js:
  188. * UserInterface/CSSStyleDeclarationTextEditor.css:
  189. * UserInterface/CSSStyleDeclarationTextEditor.js:
  190. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  191. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  192. * UserInterface/CSSStyleManager.js:
  193. * UserInterface/CSSStyleSheet.js:
  194. * UserInterface/CallFrame.js:
  195. * UserInterface/CallFrameIcons.css:
  196. * UserInterface/CallFrameTreeElement.js:
  197. * UserInterface/ClusterContentView.css:
  198. * UserInterface/ClusterContentView.js:
  199. * UserInterface/CodeMirrorAdditions.js:
  200. * UserInterface/CodeMirrorCompletionController.css:
  201. * UserInterface/CodeMirrorCompletionController.js:
  202. * UserInterface/CodeMirrorFormatters.js:
  203. * UserInterface/CodeMirrorOverrides.css:
  204. * UserInterface/CodeMirrorTokenTrackingController.css:
  205. * UserInterface/CodeMirrorTokenTrackingController.js:
  206. * UserInterface/Color.js:
  207. * UserInterface/CompletionSuggestionsView.css:
  208. * UserInterface/CompletionSuggestionsView.js:
  209. * UserInterface/ComputedStyleDetailsPanel.js:
  210. * UserInterface/ConsoleCommand.js:
  211. * UserInterface/ConsoleCommandResult.js:
  212. * UserInterface/ConsoleGroup.js:
  213. * UserInterface/ConsoleMessage.js:
  214. * UserInterface/ConsoleMessageImpl.js:
  215. * UserInterface/ConsoleObserver.js:
  216. * UserInterface/ConsolePrompt.css:
  217. * UserInterface/ConsolePrompt.js:
  218. * UserInterface/ContentBrowser.css:
  219. * UserInterface/ContentBrowser.js:
  220. * UserInterface/ContentView.css:
  221. * UserInterface/ContentView.js:
  222. * UserInterface/ContentViewContainer.css:
  223. * UserInterface/ContentViewContainer.js:
  224. * UserInterface/ContextMenu.js:
  225. * UserInterface/ControlToolbarItem.css:
  226. * UserInterface/ControlToolbarItem.js:
  227. * UserInterface/CookieIcon.css:
  228. * UserInterface/CookieStorageContentView.css:
  229. * UserInterface/CookieStorageContentView.js:
  230. * UserInterface/CookieStorageObject.js:
  231. * UserInterface/CookieStorageTreeElement.js:
  232. * UserInterface/DOMDetailsSidebarPanel.js:
  233. * UserInterface/DOMNode.js:
  234. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  235. * UserInterface/DOMNodeStyles.js:
  236. * UserInterface/DOMObserver.js:
  237. * UserInterface/DOMSearchMatchObject.js:
  238. * UserInterface/DOMStorageContentView.css:
  239. * UserInterface/DOMStorageContentView.js:
  240. * UserInterface/DOMStorageIcons.css:
  241. * UserInterface/DOMStorageObject.js:
  242. * UserInterface/DOMStorageObserver.js:
  243. * UserInterface/DOMStorageTreeElement.js:
  244. * UserInterface/DOMTree.js:
  245. * UserInterface/DOMTreeContentView.css:
  246. * UserInterface/DOMTreeContentView.js:
  247. * UserInterface/DOMTreeElement.js:
  248. * UserInterface/DOMTreeElementPathComponent.js:
  249. * UserInterface/DOMTreeManager.js:
  250. * UserInterface/DOMTreeOutline.css:
  251. * UserInterface/DOMTreeOutline.js:
  252. * UserInterface/DOMTreeUpdater.js:
  253. * UserInterface/DOMUtilities.js:
  254. * UserInterface/DashboardManager.js:
  255. * UserInterface/DashboardView.css:
  256. * UserInterface/DashboardView.js:
  257. * UserInterface/DataGrid.css:
  258. * UserInterface/DataGrid.js:
  259. * UserInterface/DatabaseContentView.css:
  260. * UserInterface/DatabaseContentView.js:
  261. * UserInterface/DatabaseHostTreeElement.js:
  262. * UserInterface/DatabaseIcon.css:
  263. * UserInterface/DatabaseObject.js:
  264. * UserInterface/DatabaseObserver.js:
  265. * UserInterface/DatabaseTableContentView.css:
  266. * UserInterface/DatabaseTableContentView.js:
  267. * UserInterface/DatabaseTableIcon.css:
  268. * UserInterface/DatabaseTableObject.js:
  269. * UserInterface/DatabaseTableTreeElement.js:
  270. * UserInterface/DatabaseTreeElement.js:
  271. * UserInterface/DebuggerManager.js:
  272. * UserInterface/DebuggerObserver.js:
  273. * UserInterface/DebuggerSidebarPanel.css:
  274. * UserInterface/DebuggerSidebarPanel.js:
  275. * UserInterface/DetailsSection.css:
  276. * UserInterface/DetailsSection.js:
  277. * UserInterface/DetailsSectionDataGridRow.js:
  278. * UserInterface/DetailsSectionGroup.js:
  279. * UserInterface/DetailsSectionPropertiesRow.js:
  280. * UserInterface/DetailsSectionRow.js:
  281. * UserInterface/DetailsSectionSimpleRow.js:
  282. * UserInterface/DetailsSidebarPanel.css:
  283. * UserInterface/DetailsSidebarPanel.js:
  284. * UserInterface/DividerNavigationItem.css:
  285. * UserInterface/DividerNavigationItem.js:
  286. * UserInterface/Editing.css:
  287. * UserInterface/EditingSupport.js:
  288. * UserInterface/EventHandler.js:
  289. * UserInterface/EventListenerSection.js:
  290. * UserInterface/EventListenerSectionGroup.css:
  291. * UserInterface/EventListenerSectionGroup.js:
  292. * UserInterface/ExecutionContext.js:
  293. * UserInterface/ExecutionContextList.js:
  294. * UserInterface/FilterBar.css:
  295. * UserInterface/FilterBar.js:
  296. * UserInterface/FindBanner.css:
  297. * UserInterface/FindBanner.js:
  298. * UserInterface/FlexibleSpaceNavigationItem.css:
  299. * UserInterface/FlexibleSpaceNavigationItem.js:
  300. * UserInterface/FolderIcon.css:
  301. * UserInterface/FolderTreeElement.js:
  302. * UserInterface/FontResourceContentView.css:
  303. * UserInterface/FontResourceContentView.js:
  304. * UserInterface/Formatter.js:
  305. * UserInterface/FormatterContentBuilder.js:
  306. * UserInterface/FormatterSourceMap.js:
  307. * UserInterface/Frame.js:
  308. * UserInterface/FrameContentView.js:
  309. * UserInterface/FrameResourceManager.js:
  310. * UserInterface/FrameTreeElement.js:
  311. * UserInterface/GeneralTreeElement.js:
  312. * UserInterface/GeneralTreeElementPathComponent.js:
  313. * UserInterface/GenericResourceContentView.js:
  314. * UserInterface/Geometry.js:
  315. * UserInterface/HierarchicalPathComponent.css:
  316. * UserInterface/HierarchicalPathComponent.js:
  317. * UserInterface/HierarchicalPathNavigationItem.js:
  318. * UserInterface/ImageResourceContentView.css:
  319. * UserInterface/ImageResourceContentView.js:
  320. * UserInterface/ImageUtilities.js:
  321. * UserInterface/IndeterminateProgressSpinner.css:
  322. * UserInterface/IndeterminateProgressSpinner.js:
  323. * UserInterface/InspectorBackend.js:
  324. * UserInterface/InspectorFrontendAPI.js:
  325. * UserInterface/InspectorObserver.js:
  326. * UserInterface/InstrumentIcons.css:
  327. * UserInterface/InstrumentSidebarPanel.css:
  328. * UserInterface/InstrumentSidebarPanel.js:
  329. * UserInterface/IssueManager.js:
  330. * UserInterface/IssueMessage.js:
  331. * UserInterface/JavaScriptLogViewController.js:
  332. * UserInterface/JavaScriptProfileObject.js:
  333. * UserInterface/JavaScriptProfileType.js:
  334. * UserInterface/JavaScriptProfileView.css:
  335. * UserInterface/JavaScriptProfileView.js:
  336. * UserInterface/KeyboardShortcut.js:
  337. * UserInterface/LayerTreeDataGrid.js:
  338. * UserInterface/LayerTreeDataGridNode.js:
  339. * UserInterface/LayerTreeManager.js:
  340. * UserInterface/LayerTreeObserver.js:
  341. * UserInterface/LayerTreeSidebarPanel.css:
  342. * UserInterface/LayerTreeSidebarPanel.js:
  343. * UserInterface/LayoutTimelineDataGrid.js:
  344. * UserInterface/LayoutTimelineDataGridNode.js:
  345. * UserInterface/LayoutTimelineRecord.js:
  346. * UserInterface/LoadInspectorBackendCommands.js:
  347. * UserInterface/LoadLocalizedStrings.js:
  348. * UserInterface/LogContentView.css:
  349. * UserInterface/LogContentView.js:
  350. * UserInterface/LogIcon.css:
  351. * UserInterface/LogManager.js:
  352. * UserInterface/LogObject.js:
  353. * UserInterface/LogTreeElement.js:
  354. * UserInterface/MIMETypeUtilities.js:
  355. * UserInterface/Main.css:
  356. * UserInterface/Main.html:
  357. * UserInterface/Main.js:
  358. * UserInterface/MetricsStyleDetailsPanel.js:
  359. * UserInterface/NavigationBar.css:
  360. * UserInterface/NavigationBar.js:
  361. * UserInterface/NavigationItem.js:
  362. * UserInterface/NavigationSidebarPanel.css:
  363. * UserInterface/NavigationSidebarPanel.js:
  364. * UserInterface/NetworkDataGrid.css:
  365. * UserInterface/NetworkDataGrid.js:
  366. * UserInterface/NetworkGraphCalculator.js:
  367. * UserInterface/NetworkObserver.js:
  368. * UserInterface/NetworkTimeline.css:
  369. * UserInterface/Object.js:
  370. * UserInterface/ObjectPropertiesSection.js:
  371. * UserInterface/PageObserver.js:
  372. * UserInterface/PathComponentIcons.css:
  373. * UserInterface/Popover.css:
  374. * UserInterface/Popover.js:
  375. * UserInterface/ProfileManager.js:
  376. * UserInterface/ProfileObject.js:
  377. * UserInterface/ProfileType.js:
  378. * UserInterface/ProfileView.css:
  379. * UserInterface/ProfileView.js:
  380. * UserInterface/ProfilerObserver.js:
  381. * UserInterface/PropertiesSection.js:
  382. * UserInterface/QuickConsole.css:
  383. * UserInterface/QuickConsole.js:
  384. * UserInterface/QuickConsoleNavigationBar.js:
  385. * UserInterface/RadioButtonNavigationItem.css:
  386. * UserInterface/RadioButtonNavigationItem.js:
  387. * UserInterface/Resource.js:
  388. * UserInterface/ResourceClusterContentView.js:
  389. * UserInterface/ResourceCollection.js:
  390. * UserInterface/ResourceContentView.js:
  391. * UserInterface/ResourceDetailsSidebarPanel.js:
  392. * UserInterface/ResourceIcons.css:
  393. * UserInterface/ResourceSearchMatchObject.js:
  394. * UserInterface/ResourceSidebarPanel.css:
  395. * UserInterface/ResourceSidebarPanel.js:
  396. * UserInterface/ResourceTimelineDataGridNode.js:
  397. * UserInterface/ResourceTimelineDataGridNodePathComponent.js:
  398. * UserInterface/ResourceTimelineRecord.js:
  399. * UserInterface/ResourceTreeElement.css:
  400. * UserInterface/ResourceTreeElement.js:
  401. * UserInterface/Revision.js:
  402. * UserInterface/RulesStyleDetailsPanel.css:
  403. * UserInterface/RulesStyleDetailsPanel.js:
  404. * UserInterface/RuntimeObserver.js:
  405. * UserInterface/ScopeBar.css:
  406. * UserInterface/ScopeBar.js:
  407. * UserInterface/ScopeBarItem.js:
  408. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  409. * UserInterface/ScopeChainNode.js:
  410. * UserInterface/ScopeVariableTreeElement.js:
  411. * UserInterface/Script.js:
  412. * UserInterface/ScriptContentView.css:
  413. * UserInterface/ScriptContentView.js:
  414. * UserInterface/ScriptTimelineDataGrid.js:
  415. * UserInterface/ScriptTimelineDataGridNode.js:
  416. * UserInterface/ScriptTimelineRecord.js:
  417. * UserInterface/ScriptTreeElement.js:
  418. * UserInterface/SearchBar.css:
  419. * UserInterface/SearchBar.js:
  420. * UserInterface/SearchIcons.css:
  421. * UserInterface/SearchResultTreeElement.js:
  422. * UserInterface/Section.css:
  423. * UserInterface/Section.js:
  424. * UserInterface/Setting.js:
  425. * UserInterface/Sidebar.css:
  426. * UserInterface/Sidebar.js:
  427. * UserInterface/SidebarPanel.js:
  428. * UserInterface/SourceCode.js:
  429. * UserInterface/SourceCodeLocation.js:
  430. * UserInterface/SourceCodePosition.js:
  431. * UserInterface/SourceCodeRevision.js:
  432. * UserInterface/SourceCodeTextEditor.css:
  433. * UserInterface/SourceCodeTextEditor.js:
  434. * UserInterface/SourceCodeTextRange.js:
  435. * UserInterface/SourceCodeTreeElement.js:
  436. * UserInterface/SourceMap.js:
  437. * UserInterface/SourceMapManager.js:
  438. * UserInterface/SourceMapResource.js:
  439. * UserInterface/SourceMapResourceTreeElement.js:
  440. * UserInterface/StorageManager.js:
  441. * UserInterface/StorageTreeElement.js:
  442. * UserInterface/StyleDetailsPanel.js:
  443. * UserInterface/StyleRuleIcons.css:
  444. * UserInterface/SyntaxHighlightingDefaultTheme.css:
  445. * UserInterface/SyntaxHighlightingSupport.js:
  446. * UserInterface/TextContentView.css:
  447. * UserInterface/TextContentView.js:
  448. * UserInterface/TextEditor.css:
  449. * UserInterface/TextEditor.js:
  450. * UserInterface/TextRange.js:
  451. * UserInterface/TextResourceContentView.css:
  452. * UserInterface/TextResourceContentView.js:
  453. * UserInterface/TimelineDataGrid.css:
  454. * UserInterface/TimelineDataGrid.js:
  455. * UserInterface/TimelineDecorations.css:
  456. * UserInterface/TimelineDecorations.js:
  457. * UserInterface/TimelineEventMarker.js:
  458. * UserInterface/TimelineManager.js:
  459. * UserInterface/TimelineObserver.js:
  460. * UserInterface/TimelineOverview.css:
  461. * UserInterface/TimelineOverview.js:
  462. * UserInterface/TimelineRecord.js:
  463. * UserInterface/TimelinesContentView.css:
  464. * UserInterface/TimelinesContentView.js:
  465. * UserInterface/TimelinesObject.js:
  466. * UserInterface/ToggleButtonNavigationItem.js:
  467. * UserInterface/ToggleControlToolbarItem.js:
  468. * UserInterface/Toolbar.css:
  469. * UserInterface/Toolbar.js:
  470. * UserInterface/TreeOutline.js:
  471. * UserInterface/Utilities.js:
  472. * UserInterface/WebInspector.js:
  473. 2013-06-05 Timothy Hatcher <timothy@apple.com>
  474. Properly update the boundaries for the NetworkTransferTimeCalculator.
  475. It is expected that _lowerBound and _upperBound return NaN instead of 0.
  476. <rdar://problem/14040314> Web Inspector says it takes ~15,000 days to load developer library
  477. Reviewed by Joseph Pecoraro.
  478. * UserInterface/NetworkDataGrid.js:
  479. (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
  480. * UserInterface/NetworkGraphCalculator.js:
  481. (WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
  482. (WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
  483. * UserInterface/TimelineDecorations.js:
  484. (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
  485. 2013-06-05 Timothy Hatcher <timothy@apple.com>
  486. Unlocalize the box model labels.
  487. <rdar://problem/14057745> [WebBrowser]: Euro: 13A476r: Box model should not be localized
  488. Reviewed by Ada Chan.
  489. * UserInterface/BoxModelDetailsSectionRow.js:
  490. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
  491. 2013-06-05 Timothy Hatcher <timothy@apple.com>
  492. Syntax highlight inherit, initial and function names in CSS as keywords.
  493. Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
  494. Reviewed by Joseph Pecoraro.
  495. * UserInterface/CSSCompletions.js:
  496. (WebInspector.CSSCompletions.requestCSSNameCompletions.propertyNamesCallback):
  497. Strip function parenthesis from names. Process the color list to strip function parenthesis from rgb(), etc.
  498. 2013-06-05 Timothy Hatcher <timothy@apple.com>
  499. Improve the implicit suffix handling when editing in the middle of a CSS value.
  500. Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
  501. Reviewed by Joseph Pecoraro.
  502. * UserInterface/CodeMirrorCompletionController.js:
  503. (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
  504. 2013-06-05 Timothy Hatcher <timothy@apple.com>
  505. Autocomplete property names for transition and transition-property.
  506. Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
  507. Reviewed by Joseph Pecoraro.
  508. * UserInterface/CSSCompletions.js:
  509. (WebInspector.CSSCompletions.prototype.get values):
  510. * UserInterface/CSSKeywordCompletions.js:
  511. (WebInspector.CSSKeywordCompletions.forProperty):
  512. 2013-06-04 Timothy Hatcher <timothy@apple.com>
  513. Properly autocomplete CSS values if the property name is on a previous line.
  514. Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
  515. Reviewed by Joseph Pecoraro.
  516. * UserInterface/CodeMirrorCompletionController.js:
  517. (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
  518. 2013-06-03 Timothy Hatcher <timothy@apple.com>
  519. Add property names to the value keywords list so they are highlighted for -webkit-transition.
  520. <rdar://problem/14052662> "-webkit-transform" is not correctly highlighted when editing CSS resource
  521. Reviewed by Joseph Pecoraro.
  522. * UserInterface/CSSCompletions.js:
  523. (WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
  524. 2013-06-03 Joseph Pecoraro <pecoraro@apple.com>
  525. <rdar://problem/14047312> Add New Rules sometimes doesn't do anything
  526. Better handle generating selectors for nodes with spaces in class or id attributes.
  527. Tests: (Cases that were failing before)
  528. <div class=" x "> => Before: (..x.) After: (.x)
  529. <div id=" x "> => Before: (# x ) After: (div[id=" x "])
  530. <div id='"x"'> => Before: (#"x") After: (div[id="\"x\""])
  531. Reviewed by Timothy Hatcher.
  532. * UserInterface/DOMNode.js:
  533. (WebInspector.DOMNode.prototype.appropriateSelectorFor):
  534. * UserInterface/DOMUtilities.js:
  535. (WebInspector.displayNameForNode):
  536. 2013-06-03 Antoine Quint <graouts@apple.com>
  537. <rdar://problem/13932229> Update CSSKeywordCompletions.js for iOS properties
  538. Add support for the new Ò-appleÓ-prefixed values for the ÒfontÓ property.
  539. Reviewed by Timothy Hatcher.
  540. * UserInterface/CSSKeywordCompletions.js:
  541. 2013-06-03 Joseph Pecoraro <pecoraro@apple.com>
  542. <rdar://problem/14047029> Exception CallFrameTreeElement.js:19: TypeError: 'null' is not an object (evaluating 'callFrame.sourceCodeLocation.displaySourceCode')
  543. Only include a subtitle for call frame tree elements if there is a
  544. source code location, because that is used to determine the subtitle.
  545. Reviewed by Timothy Hatcher.
  546. * UserInterface/CallFrameTreeElement.js:
  547. (WebInspector.CallFrameTreeElement):
  548. 2013-06-03 Timothy Hatcher <timothy@apple.com>
  549. Hide the caret in read-only style declarations.
  550. <rdar://problem/14047344> Locked rules (UA stylesheets) in Styles sidebar shouldn't display a caret
  551. Reviewed by Joseph Pecoraro.
  552. * UserInterface/CSSStyleDeclarationTextEditor.css:
  553. (.css-style-text-editor.read-only > .CodeMirror .CodeMirror-cursor): Added.
  554. 2013-06-03 Timothy Hatcher <timothy@apple.com>
  555. Correctly stop auto recording the Timeline after the load event or a maximum duration (which ever comes first).
  556. The original fix for <rdar://problem/13180009> was incorrect and caused <rdar://problem/13919974>
  557. and also caused infinite auto recording on pages with indefinite timers that rapidly adds records.
  558. <rdar://problem/14043180> REGRESSION (6.0.5-Curie): Safari Web Content: 100% CPU when using Inspector
  559. Reviewed by Joseph Pecoraro.
  560. * UserInterface/TimelineManager.js:
  561. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  562. Don't call _stopAutoRecordingSoon for the DOMContent event.
  563. (WebInspector.TimelineManager.prototype._addRecord):
  564. Don't call _stopAutoRecordingSoon. Add the call to _resetAutoRecordingDeadTimeTimeout back.
  565. (WebInspector.TimelineManager.prototype._startAutoRecording):
  566. Use MaximumAutoRecordDuration instead of MaximumAutoRecordDurationAfterLastRecord for the timeout.
  567. (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
  568. Remove the dead time timeout now that it is back in _addRecord.
  569. 2013-06-02 Joseph Pecoraro <pecoraro@apple.com>
  570. <rdar://problem/14040519> BoxModelDetailsSectionRow.js:120: ERROR: TypeError: 'null' is not an object (evaluating 'style.propertyForName(width).value')
  571. Make the sidebar resilient against the possibility of an empty computed
  572. style object. The ultimate issue is that the DOM Tree does not have a
  573. selected node, but this could should be resilient anyways.
  574. Reviewed by Timothy Hatcher.
  575. * UserInterface/BoxModelDetailsSectionRow.js:
  576. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
  577. 2013-06-02 Joseph Pecoraro <pecoraro@apple.com>
  578. Reveal line sometimes doesn't work with content right at the edge of the screen.
  579. Reviewed by Timothy Hatcher.
  580. * UserInterface/TextEditor.js:
  581. (WebInspector.TextEditor.prototype._isPositionVisible):
  582. 2013-05-31 Joseph Pecoraro <pecoraro@apple.com>
  583. <rdar://problem/14039888> Should not have spellchecking during most HTML editing
  584. Allow EditingConfig to specify whether or not spellchecking should be enabled.
  585. Spellcheck is off by default, because most of the time it is code, and it is
  586. only enabled when editing a TextNode in the DOM Tree.
  587. Reviewed by Timothy Hatcher.
  588. * UserInterface/DOMTreeElement.js:
  589. (WebInspector.DOMTreeElement.prototype._startEditingTextNode):
  590. * UserInterface/EditingSupport.js:
  591. (WebInspector.EditingConfig):
  592. (.cleanUpAfterEditing):
  593. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  594. <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
  595. Previously the SourceCodeTextEditor was automatically formatting the
  596. content after the content was set on the TextEditor and some initial
  597. processing; such as revealing a pending position. This change lets
  598. the SourceCodeTextEditor signal to the TextEditor that it should
  599. automatically format the incoming string before the extra processing
  600. takes place. Now the pending position is updated in _prettyPrint,
  601. and revealed appropriately.
  602. Reviewed by Antoine Quint.
  603. * UserInterface/SourceCodeTextEditor.js:
  604. (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
  605. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
  606. (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
  607. Move the auto formatting decision from didPopulate to willPopulate.
  608. If autoformatting is needed, we signal the TextEditor before setting
  609. the string.
  610. * UserInterface/TextEditor.js:
  611. (WebInspector.TextEditor.prototype.set string.update):
  612. (WebInspector.TextEditor.prototype.set string):
  613. (WebInspector.TextEditor.prototype.set autoFormat):
  614. Keep a boolean for whether or not we should auto format when setting
  615. the string. When setting the string, format if needed, after clearing
  616. the history and before any pending position reveals.
  617. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  618. <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
  619. Rename "revealLine" to "revealPosition". Now, if the first reveal is
  620. for a position in pretty printed code, it can be remapped to an
  621. appropriate (line, column), instead of whatever (line, 0) mapped to.
  622. There is one bug fix here, the _prettyPrint in TextEditor was
  623. incorrectly doing this._lineNumberToReveal.lineNumber, which should
  624. have just been this._lineNumberToReveal. However, this code was not
  625. getting reached in its current form. That will be addressed in the
  626. next part.
  627. Reviewed by Antoine Quint.
  628. * UserInterface/FrameContentView.js:
  629. (WebInspector.FrameContentView.prototype.showSourceCode):
  630. * UserInterface/ResourceClusterContentView.js:
  631. (WebInspector.ResourceClusterContentView.prototype.showResponse):
  632. (WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
  633. * UserInterface/ResourceSidebarPanel.js:
  634. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
  635. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeLocation):
  636. (WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
  637. (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeLocation):
  638. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
  639. (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
  640. * UserInterface/ScriptContentView.js:
  641. (WebInspector.ScriptContentView.prototype.revealPosition):
  642. * UserInterface/TextContentView.js:
  643. (WebInspector.TextContentView.prototype.revealPosition):
  644. * UserInterface/TextEditor.js:
  645. (WebInspector.TextEditor.prototype.set string.update):
  646. (WebInspector.TextEditor.prototype.set string):
  647. (WebInspector.TextEditor.prototype.revealNextSearchResult):
  648. (WebInspector.TextEditor.prototype.line):
  649. (WebInspector.TextEditor.prototype.updateLayout):
  650. (WebInspector.TextEditor.prototype._textRangeFromCodeMirrorPosition):
  651. (WebInspector.TextEditor.prototype._codeMirrorPositionFromTextRange):
  652. * UserInterface/TextResourceContentView.js:
  653. (WebInspector.TextResourceContentView.prototype.revealPosition):
  654. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  655. <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
  656. Add WebInspector.SourceCodePosition. Rather than passing lineNumber
  657. and columnNumber as separate parameters all over the place, we can
  658. pass a position object. Create positions as appropriate from other
  659. classes like SourceCodeLocation and TextRange.
  660. Reviewed by Antoine Quint.
  661. * UserInterface/Main.html:
  662. * UserInterface/SourceCodeLocation.js:
  663. (WebInspector.SourceCodeLocation.prototype.position):
  664. (WebInspector.SourceCodeLocation.prototype.formattedPosition):
  665. (WebInspector.SourceCodeLocation.prototype.displayPosition):
  666. * UserInterface/SourceCodePosition.js: Added.
  667. (WebInspector.SourceCodePosition):
  668. (WebInspector.SourceCodePosition.prototype.get lineNumber):
  669. (WebInspector.SourceCodePosition.prototype.get columnNumber):
  670. * UserInterface/TextRange.js:
  671. (WebInspector.TextRange.prototype.startPosition):
  672. (WebInspector.TextRange.prototype.endPosition):
  673. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  674. <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
  675. Remove a reveal that always happens with line number 0.
  676. Reviewed by Antoine Quint.
  677. * UserInterface/Main.js:
  678. (WebInspector.toggleConsoleView):
  679. * UserInterface/ResourceSidebarPanel.js:
  680. (WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode):
  681. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  682. Unprefix uses of "-webkit-calc".
  683. Reviewed by Timothy Hatcher.
  684. * UserInterface/CSSStyleDeclarationTextEditor.css:
  685. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch):
  686. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  687. <rdar://problem/14028576> Inspector finds CSS color names in other strings
  688. Be a little more picky with our CSS regex, and include some post-processing
  689. to act as a negative lookbehind, which is not supported in JavaScript regexes.
  690. Do not allow color names that are prefixed or post-fixed with '-' or '.'.
  691. Tests cases that previously would have produced swatches:
  692. url(gold.png);
  693. url("fools-gold.png");
  694. url(fools.gold.png);
  695. Using a regex is of course an imperfect solution, but it covers the majority
  696. of cases and works well. It also allows us to detect colors in comments and
  697. provide color swatches for those. This allows us to filter out some more
  698. inappropriate cases.
  699. Reviewed by Timothy Hatcher.
  700. * UserInterface/CSSStyleDeclarationTextEditor.js:
  701. (WebInspector.CSSStyleDeclarationTextEditor.prototype.):
  702. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
  703. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  704. <rdar://problem/14023649> No -webkit-filter autocompletion
  705. Add functions to CSS completion suggestions. When the completion
  706. suggestion is showing it has both parens, when committed, the cursor is
  707. placed inside the two parens so users can keep typing.
  708. This adds a bunch of common function completions.
  709. Reviewed by Timothy Hatcher.
  710. * UserInterface/CSSKeywordCompletions.js:
  711. * UserInterface/CodeMirrorCompletionController.js:
  712. (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
  713. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  714. <rdar://problem/13994485> Hovering element breadcrumbs should highlight element on page
  715. When hovering DOMTreeElementPathComponents highlight the associated
  716. node on the page, like when you hover the DOMTreeElement.
  717. Reviewed by Dean Jackson.
  718. * UserInterface/HierarchicalPathComponent.js:
  719. (WebInspector.HierarchicalPathComponent):
  720. (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOver):
  721. (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOut):
  722. Provide hooks for subclass mouseOver and mouseOut functions.
  723. * UserInterface/DOMTreeElementPathComponent.js:
  724. (WebInspector.DOMTreeElementPathComponent.prototype.get nextSibling):
  725. (WebInspector.DOMTreeElementPathComponent.prototype.mouseOver):
  726. (WebInspector.DOMTreeElementPathComponent.prototype.mouseOut):
  727. Implement the mouseOver and mouseOut to show / hide the DOM highlight.
  728. 2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
  729. <rdar://problem/14020206> Debugger popover not showing for "this"
  730. Allow popover for the keyword "this".
  731. Reviewed by Antoine Quint.
  732. * UserInterface/CodeMirrorTokenTrackingController.js:
  733. (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
  734. 2013-05-28 Joseph Pecoraro <pecoraro@apple.com>
  735. <rdar://problem/14007495> Web Inspector has "Instruments," but this is already a feature in Xcode
  736. Rename the "Instruments" Navigation Sidebar to "Timelines". Marketing
  737. had concerns about using the same name in multiple places.
  738. Rubber-stamped by Timothy Hatcher.
  739. * Localizations/en.lproj/localizedStrings.js:
  740. * UserInterface/InstrumentSidebarPanel.js:
  741. (WebInspector.InstrumentSidebarPanel):
  742. 2013-05-28 Joseph Pecoraro <pecoraro@apple.com>
  743. <rdar://problem/14006550> Console errors persist when you navigate to other pages
  744. The console can clear in two ways, handle both events.
  745. Reviewed by Timothy Hatcher.
  746. * UserInterface/DashboardManager.js:
  747. (WebInspector.DashboardManager):
  748. 2013-05-27 Timothy Hatcher <timothy@apple.com>
  749. Fix copy handeling for DataGrid.
  750. When text selection was disabled in r48866, that broke the copy event
  751. handlers for DataGrid. That change prevents focus from making a caret
  752. selection inside the DataGrid (it goes outside to the nearest selectable
  753. text). This broke bubbling of the copy event to the right elements.
  754. Reviewed by Antoine Quint.
  755. * UserInterface/DataGrid.js:
  756. (WebInspector.DataGrid):
  757. (WebInspector.DataGrid.prototype.handleBeforeCopyEvent):
  758. (WebInspector.DataGrid.prototype.handleCopyEvent):
  759. * UserInterface/Main.js:
  760. (WebInspector._beforecopy):
  761. (WebInspector._copy):
  762. 2013-05-27 Timothy Hatcher <timothy@apple.com>
  763. Allow data grid value column's in details sections wrap to multiple lines.
  764. <rdar://problem/12329905> Can't easily view long header values
  765. Reviewed by Antoine Quint.
  766. * UserInterface/DataGrid.css:
  767. (.data-grid tr.selected):
  768. (.data-grid:focus tr.selected):
  769. * UserInterface/DetailsSection.css:
  770. (.details-section > .content .data-grid table.data):
  771. (.details-section > .content .data-grid tr:nth-child(even)):
  772. (.details-section > .content .data-grid tr:nth-child(odd)):
  773. (.details-section > .content .data-grid td.value-column):
  774. (.details-section > .content .data-grid td.value-column > div):
  775. 2013-05-27 Timothy Hatcher <timothy@apple.com>
  776. Only add event markers for the main frame.
  777. The event markers for frame heavy pages are too noisy and not very
  778. useful. We also didn't distinguish frames in the marker tooltips.
  779. Reviewed by Antoine Quint.
  780. * UserInterface/TimelineManager.js:
  781. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  782. (WebInspector.TimelineManager.prototype.eventRecorded):
  783. 2013-05-26 Timothy Hatcher <timothy@apple.com>
  784. Stop using a CSS drop-shadow filter for the Web Inspector popover.
  785. Use the existing background canvas to draw the drop shadow instead.
  786. <rdar://problem/13991902> Stop using CSS filters for Popover
  787. This also fixes:
  788. <rdar://problem/13977466> Popover arrow is not perfectly centered with content
  789. Reviewed by Joseph Pecoraro.
  790. * UserInterface/Popover.css:
  791. (.popover):
  792. (.popover > .container):
  793. * UserInterface/Popover.js:
  794. (WebInspector.Popover.prototype._update):
  795. (WebInspector.Popover.prototype._drawBackground):
  796. (WebInspector.Popover.prototype._bestMetricsForEdge):
  797. 2013-05-25 Timothy Hatcher <timothy@apple.com>
  798. Show the popover after a delay so quickly arrowing down the grid does not flash the popover.
  799. Also prevent showing the popover if the element is hidden, which was happening sometimes for
  800. rows at the bottom which were marked as offscreen still. Put MIN_Y before MAX_X so the popover
  801. is more predictably positioned, and this matches NSPopover. Plus always clear the popover
  802. TreeOutline after giving the popover time to animate out when hiding.
  803. Reviewed by Joseph Pecoraro.
  804. * UserInterface/TimelineDataGrid.js:
  805. (WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
  806. (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon.delayedWork):
  807. (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
  808. (WebInspector.TimelineDataGrid.prototype._hidePopover):
  809. (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
  810. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  811. Show a highlight quad on the screen when selecting a Layout/Paint record.
  812. If we know the Quad / Rect of a Paint / Layout we can highlight that
  813. portion on the inspected page. Unfortunately this information is not
  814. very useful after the page scrolls, but it can be useful.
  815. Reviewed by Timothy Hatcher.
  816. * UserInterface/Geometry.js:
  817. (WebInspector.Quad.prototype.toProtocol):
  818. * UserInterface/LayoutTimelineDataGrid.js:
  819. (WebInspector.LayoutTimelineDataGrid):
  820. (WebInspector.LayoutTimelineDataGrid.prototype.reset):
  821. (WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
  822. (WebInspector.LayoutTimelineDataGrid.prototype.hidden):
  823. (WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged):
  824. (WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded):
  825. * UserInterface/TimelineDataGrid.js:
  826. (WebInspector.TimelineDataGrid.prototype.shown):
  827. (WebInspector.TimelineDataGrid.prototype.hidden):
  828. * UserInterface/TimelinesContentView.js:
  829. (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType):
  830. (WebInspector.TimelinesContentView.prototype.shown):
  831. (WebInspector.TimelinesContentView.prototype.hidden):
  832. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  833. <rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
  834. Clear the popover's contents when the content view is reset so
  835. we don't leak anything held by the CallFrameTreeElements.
  836. Reviewed by Timothy Hatcher.
  837. * UserInterface/NetworkDataGrid.js:
  838. (WebInspector.NetworkDataGrid.prototype.reset):
  839. * UserInterface/TimelineDataGrid.js:
  840. (WebInspector.TimelineDataGrid.prototype.reset):
  841. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  842. <rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
  843. Stack trace information is already available from the backend. Display
  844. it in a popover when the corresponding row in the data grid is selected.
  845. Users can then click a call frame to jump to that source code location.
  846. Because both Layout and Script timelines include call traces, this is
  847. made generic an put in TimelineDataGrid. Subclasses tell the superclass
  848. which element to anchor the popover next to, but the superclass handles
  849. showing the popover.
  850. Reviewed by Timothy Hatcher.
  851. * UserInterface/CallFrameTreeElement.js:
  852. (WebInspector.CallFrameTreeElement):
  853. Allow a CallFrameTreeElement for native code call frames. Such call
  854. frames don't have a source code location, so they have no subtitle.
  855. * UserInterface/Images/Native.pdf: Added.
  856. * UserInterface/CallFrameIcons.css:
  857. (.native-icon .icon):
  858. This is a duplicate of the DOMNode.pdf gray [N] icon.
  859. * UserInterface/Main.html:
  860. Include new files.
  861. * UserInterface/NetworkDataGrid.js:
  862. (WebInspector.NetworkDataGrid):
  863. * UserInterface/ScriptTimelineDataGrid.js: Added.
  864. (WebInspector.ScriptTimelineDataGrid):
  865. (WebInspector.ScriptTimelineDataGrid.prototype.callFramePopoverAnchorElement):
  866. * UserInterface/LayoutTimelineDataGrid.js: Added.
  867. (WebInspector.LayoutTimelineDataGrid):
  868. (WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
  869. Give each TimelineDataGrid subclass its own class. Implement only
  870. what is needed. The new subclasses provide the element for the
  871. superclass to anchor the call frame popover.
  872. * UserInterface/TimelinesContentView.js:
  873. (WebInspector.TimelinesContentView):
  874. Instantiate the specific DataGrid types.
  875. * UserInterface/TimelineDataGrid.css: Added.
  876. * UserInterface/TimelineDataGrid.js:
  877. (WebInspector.TimelineDataGrid):
  878. (WebInspector.TimelineDataGrid.prototype.callFramePopoverAnchorElement):
  879. (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
  880. (WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
  881. (WebInspector.TimelineDataGrid.prototype._windowResized):
  882. (WebInspector.TimelineDataGrid.prototype._hidePopover):
  883. (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
  884. Show and manager the popover.
  885. (WebInspector.TimelineDataGrid.prototype._createPopoverContent):
  886. (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeElementSelected):
  887. Popover content is a TreeOutline containing CallFrameTreeElements.
  888. When a call frame is selected, reveal the source code location.
  889. * UserInterface/DataGrid.js:
  890. (WebInspector.DataGridNode.prototype.elementWithColumnIdentifier):
  891. Helper for accessing a specific <td> inside a <tr> by column name.
  892. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  893. Switch from "X" and "Y" to "Area" in the Layout Timeline
  894. For transformed paint rects an X, Y, Width and Height, didn't make
  895. sense, so the backend switched to quads. Instead of showing approximate
  896. values, like the bounding box, lets just remove unknowns and switch
  897. to showing the Area instead.
  898. Reviewed by Timothy Hatcher.
  899. * UserInterface/LayoutTimelineDataGridNode.js:
  900. (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
  901. * UserInterface/TimelinesContentView.js:
  902. (WebInspector.TimelinesContentView):
  903. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  904. Restore Width and Height values for Layouts and Paints in Timeline
  905. The backend changed a while back from including rect values, to quad
  906. values. We should move away from X and Y and instead show Area.
  907. Reviewed by Timothy Hatcher.
  908. * UserInterface/Geometry.js:
  909. (WebInspector.Quad):
  910. Provide a wrapper object for the protocol Quad representation.
  911. * UserInterface/TimelineManager.js:
  912. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  913. (WebInspector.TimelineManager.prototype.eventRecorded):
  914. Ingest new and old Layout and Paint timeline record.
  915. * UserInterface/LayoutTimelineRecord.js:
  916. (WebInspector.LayoutTimelineRecord):
  917. (WebInspector.LayoutTimelineRecord.prototype.get area):
  918. (WebInspector.LayoutTimelineRecord.prototype.get rect):
  919. (WebInspector.LayoutTimelineRecord.prototype.get quad):
  920. A record may be wrapping a quad.
  921. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  922. Use SourceCodeLocations when displaying Script locations.
  923. Using SourceCodeLocations allows the locations to show formatted
  924. and display locations and is therefore more accurate. It also shows
  925. the tooltip and display strings consistent with the rest of the UI.
  926. Reviewed by Timothy Hatcher.
  927. * UserInterface/ScriptTimelineDataGridNode.js:
  928. (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
  929. * UserInterface/ScriptTimelineRecord.js:
  930. (WebInspector.ScriptTimelineRecord):
  931. (WebInspector.ScriptTimelineRecord.prototype.get lineNumber):
  932. (WebInspector.ScriptTimelineRecord.prototype.get callFrames):
  933. (WebInspector.ScriptTimelineRecord.prototype.get sourceCodeLocation):
  934. * UserInterface/TimelineManager.js:
  935. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  936. (WebInspector.TimelineManager.prototype.eventRecorded):
  937. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  938. Add Script Timeline records for Installing / Removing Timelines
  939. We had records for TimerFired but not install / remove. It is sometimes
  940. useful to see the stack traces where timers are added and removed.
  941. Reviewed by Timothy Hatcher.
  942. * Localizations/en.lproj/localizedStrings.js:
  943. * UserInterface/ScriptTimelineRecord.js:
  944. (WebInspector.ScriptTimelineRecord.EventType.displayName):
  945. * UserInterface/TimelineManager.js:
  946. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  947. (WebInspector.TimelineManager.prototype.eventRecorded):
  948. 2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
  949. Remove some unused old style DataGrid events.
  950. These events are not used anywhere, and we have a new style event.
  951. Reviewed by Timothy Hatcher.
  952. * UserInterface/DataGrid.js:
  953. (WebInspector.DataGridNode.prototype.select):
  954. (WebInspector.DataGridNode.prototype.deselect):
  955. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  956. Turn off spellchecking on some text inputs.
  957. Reviewed by David Kilzer.
  958. * UserInterface/Breakpoint.js:
  959. (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
  960. * UserInterface/FindBanner.js:
  961. (WebInspector.FindBanner):
  962. 2013-05-24 Timothy Hatcher <timothy@apple.com>
  963. Tag all Web Inspector images with copyright info.
  964. Added to all images: Copyright © 2013 Apple Inc. All rights reserved.
  965. Requested by Joyce Chow.
  966. * UserInterface/Images/ApplicationCache.png:
  967. * UserInterface/Images/ApplicationCache@2x.png:
  968. * UserInterface/Images/ApplicationCacheManifest.png:
  969. * UserInterface/Images/ApplicationCacheManifest@2x.png:
  970. * UserInterface/Images/BackArrow.pdf:
  971. * UserInterface/Images/BottomUpTree.pdf:
  972. * UserInterface/Images/Breakpoint.png:
  973. * UserInterface/Images/Breakpoint@2x.png:
  974. * UserInterface/Images/BreakpointButton.pdf:
  975. * UserInterface/Images/BreakpointInactive.png:
  976. * UserInterface/Images/BreakpointInactive@2x.png:
  977. * UserInterface/Images/BreakpointInactiveButton.pdf:
  978. * UserInterface/Images/ClippingCSS.png:
  979. * UserInterface/Images/ClippingCSS@2x.png:
  980. * UserInterface/Images/ClippingGeneric.png:
  981. * UserInterface/Images/ClippingGeneric@2x.png:
  982. * UserInterface/Images/ClippingJS.png:
  983. * UserInterface/Images/ClippingJS@2x.png:
  984. * UserInterface/Images/Close.pdf:
  985. * UserInterface/Images/Colors.png:
  986. * UserInterface/Images/Colors@2x.png:
  987. * UserInterface/Images/Cookie.png:
  988. * UserInterface/Images/Cookie@2x.png:
  989. * UserInterface/Images/Crosshair.pdf:
  990. * UserInterface/Images/DOMCharacterData.pdf:
  991. * UserInterface/Images/DOMComment.pdf:
  992. * UserInterface/Images/DOMDocument.pdf:
  993. * UserInterface/Images/DOMDocumentType.pdf:
  994. * UserInterface/Images/DOMElement.pdf:
  995. * UserInterface/Images/DOMNode.pdf:
  996. * UserInterface/Images/DOMTextNode.pdf:
  997. * UserInterface/Images/DOMTree.pdf:
  998. * UserInterface/Images/Database.png:
  999. * UserInterface/Images/Database@2x.png:
  1000. * UserInterface/Images/DatabaseTable.png:
  1001. * UserInterface/Images/DatabaseTable@2x.png:
  1002. * UserInterface/Images/DisclosureTriangleSmallClosed.pdf:
  1003. * UserInterface/Images/DisclosureTriangleSmallOpen.pdf:
  1004. * UserInterface/Images/DisclosureTriangleTinyClosed.pdf:
  1005. * UserInterface/Images/DisclosureTriangleTinyOpen.pdf:
  1006. * UserInterface/Images/DockBottom.pdf:
  1007. * UserInterface/Images/DockRight.pdf:
  1008. * UserInterface/Images/DocumentCSS.png:
  1009. * UserInterface/Images/DocumentCSS@2x.png:
  1010. * UserInterface/Images/DocumentFont.png:
  1011. * UserInterface/Images/DocumentFont@2x.png:
  1012. * UserInterface/Images/DocumentGeneric.png:
  1013. * UserInterface/Images/DocumentGeneric@2x.png:
  1014. * UserInterface/Images/DocumentImage.png:
  1015. * UserInterface/Images/DocumentImage@2x.png:
  1016. * UserInterface/Images/DocumentJS.png:
  1017. * UserInterface/Images/DocumentJS@2x.png:
  1018. * UserInterface/Images/DocumentMarkup.png:
  1019. * UserInterface/Images/DocumentMarkup@2x.png:
  1020. * UserInterface/Images/Error.pdf:
  1021. * UserInterface/Images/ErrorSmall.pdf:
  1022. * UserInterface/Images/Errors.svg:
  1023. * UserInterface/Images/ErrorsEnabled.svg:
  1024. * UserInterface/Images/EventListener.pdf:
  1025. * UserInterface/Images/Exception.pdf:
  1026. * UserInterface/Images/FilterFieldGlyph.pdf:
  1027. * UserInterface/Images/FolderGeneric.png:
  1028. * UserInterface/Images/FolderGeneric@2x.png:
  1029. * UserInterface/Images/ForwardArrow.pdf:
  1030. * UserInterface/Images/Function.pdf:
  1031. * UserInterface/Images/GoToArrow.pdf:
  1032. * UserInterface/Images/HierarchicalNavigationItemChevron.pdf:
  1033. * UserInterface/Images/IndeterminateProgressSpinner1.pdf:
  1034. * UserInterface/Images/IndeterminateProgressSpinner10.pdf:
  1035. * UserInterface/Images/IndeterminateProgressSpinner11.pdf:
  1036. * UserInterface/Images/IndeterminateProgressSpinner12.pdf:
  1037. * UserInterface/Images/IndeterminateProgressSpinner2.pdf:
  1038. * UserInterface/Images/IndeterminateProgressSpinner3.pdf:
  1039. * UserInterface/Images/IndeterminateProgressSpinner4.pdf:
  1040. * UserInterface/Images/IndeterminateProgressSpinner5.pdf:
  1041. * UserInterface/Images/IndeterminateProgressSpinner6.pdf:
  1042. * UserInterface/Images/IndeterminateProgressSpinner7.pdf:
  1043. * UserInterface/Images/IndeterminateProgressSpinner8.pdf:
  1044. * UserInterface/Images/IndeterminateProgressSpinner9.pdf:
  1045. * UserInterface/Images/InstructionPointer.png:
  1046. * UserInterface/Images/InstructionPointer@2x.png:
  1047. * UserInterface/Images/Issues.svg:
  1048. * UserInterface/Images/IssuesEnabled.svg:
  1049. * UserInterface/Images/LayerBorders.pdf:
  1050. * UserInterface/Images/LessColumns.pdf:
  1051. * UserInterface/Images/LocalStorage.png:
  1052. * UserInterface/Images/LocalStorage@2x.png:
  1053. * UserInterface/Images/Locked.pdf:
  1054. * UserInterface/Images/Log.png:
  1055. * UserInterface/Images/Log@2x.png:
  1056. * UserInterface/Images/Logs.svg:
  1057. * UserInterface/Images/Memory.svg:
  1058. * UserInterface/Images/MoreColumns.pdf:
  1059. * UserInterface/Images/NavigationItemAngleBrackets.pdf:
  1060. * UserInterface/Images/NavigationItemBrushAndRuler.pdf:
  1061. * UserInterface/Images/NavigationItemBug.pdf:
  1062. * UserInterface/Images/NavigationItemCurleyBraces.pdf:
  1063. * UserInterface/Images/NavigationItemFile.pdf:
  1064. * UserInterface/Images/NavigationItemLayers.pdf:
  1065. * UserInterface/Images/NavigationItemLog.pdf:
  1066. * UserInterface/Images/NavigationItemMagnifyingGlass.pdf:
  1067. * UserInterface/Images/NavigationItemStopwatch.pdf:
  1068. * UserInterface/Images/NavigationItemStorage.pdf:
  1069. * UserInterface/Images/NavigationItemTrash.pdf:
  1070. * UserInterface/Images/NavigationItemVariable.pdf:
  1071. * UserInterface/Images/Network.png:
  1072. * UserInterface/Images/Network@2x.png:
  1073. * UserInterface/Images/NetworkBarBlue.png:
  1074. * UserInterface/Images/NetworkBarBlue@2x.png:
  1075. * UserInterface/Images/NetworkBarGray.png:
  1076. * UserInterface/Images/NetworkBarGray@2x.png:
  1077. * UserInterface/Images/NetworkBarGreen.png:
  1078. * UserInterface/Images/NetworkBarGreen@2x.png:
  1079. * UserInterface/Images/NetworkBarLabelCalloutLeft.pdf:
  1080. * UserInterface/Images/NetworkBarLabelCalloutRight.pdf:
  1081. * UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf:
  1082. * UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf:
  1083. * UserInterface/Images/NetworkBarOrange.png:
  1084. * UserInterface/Images/NetworkBarOrange@2x.png:
  1085. * UserInterface/Images/NetworkBarPurple.png:
  1086. * UserInterface/Images/NetworkBarPurple@2x.png:
  1087. * UserInterface/Images/NetworkBarRed.png:
  1088. * UserInterface/Images/NetworkBarRed@2x.png:
  1089. * UserInterface/Images/NetworkBarWhiteFlat.png:
  1090. * UserInterface/Images/NetworkBarWhiteFlat@2x.png:
  1091. * UserInterface/Images/NetworkBarYellow.png:
  1092. * UserInterface/Images/NetworkBarYellow@2x.png:
  1093. * UserInterface/Images/NetworkHollowBarBlue.png:
  1094. * UserInterface/Images/NetworkHollowBarBlue@2x.png:
  1095. * UserInterface/Images/NetworkHollowBarGray.png:
  1096. * UserInterface/Images/NetworkHollowBarGray@2x.png:
  1097. * UserInterface/Images/NetworkHollowBarGreen.png:
  1098. * UserInterface/Images/NetworkHollowBarGreen@2x.png:
  1099. * UserInterface/Images/NetworkHollowBarOrange.png:
  1100. * UserInterface/Images/NetworkHollowBarOrange@2x.png:
  1101. * UserInterface/Images/NetworkHollowBarPurple.png:
  1102. * UserInterface/Images/NetworkHollowBarPurple@2x.png:
  1103. * UserInterface/Images/NetworkHollowBarRed.png:
  1104. * UserInterface/Images/NetworkHollowBarRed@2x.png:
  1105. * UserInterface/Images/NetworkHollowBarYellow.png:
  1106. * UserInterface/Images/NetworkHollowBarYellow@2x.png:
  1107. * UserInterface/Images/Pause.pdf:
  1108. * UserInterface/Images/Percent.pdf:
  1109. * UserInterface/Images/Plus.pdf:
  1110. * UserInterface/Images/Profile.png:
  1111. * UserInterface/Images/Profile@2x.png:
  1112. * UserInterface/Images/PseudoElement.pdf:
  1113. * UserInterface/Images/Recording.png:
  1114. * UserInterface/Images/Recording@2x.png:
  1115. * UserInterface/Images/RecordingHovered.png:
  1116. * UserInterface/Images/RecordingHovered@2x.png:
  1117. * UserInterface/Images/RecordingStopped.png:
  1118. * UserInterface/Images/RecordingStopped@2x.png:
  1119. * UserInterface/Images/Reflection.pdf:
  1120. * UserInterface/Images/Reload.svg:
  1121. * UserInterface/Images/ReloadSelected.svg:
  1122. * UserInterface/Images/Request.pdf:
  1123. * UserInterface/Images/Resources.svg:
  1124. * UserInterface/Images/Response.pdf:
  1125. * UserInterface/Images/ResultLine.pdf:
  1126. * UserInterface/Images/Resume.pdf:
  1127. * UserInterface/Images/Script.png:
  1128. * UserInterface/Images/Script@2x.png:
  1129. * UserInterface/Images/SessionStorage.png:
  1130. * UserInterface/Images/SessionStorage@2x.png:
  1131. * UserInterface/Images/ShadowDOM.pdf:
  1132. * UserInterface/Images/SortIndicatorDownArrow.pdf:
  1133. * UserInterface/Images/SortIndicatorUpArrow.pdf:
  1134. * UserInterface/Images/SourceCode.pdf:
  1135. * UserInterface/Images/SplitToggleDown.pdf:
  1136. * UserInterface/Images/SplitToggleUp.pdf:
  1137. * UserInterface/Images/StepInto.pdf:
  1138. * UserInterface/Images/StepOut.pdf:
  1139. * UserInterface/Images/StepOver.pdf:
  1140. * UserInterface/Images/Stopwatch.png:
  1141. * UserInterface/Images/Stopwatch@2x.png:
  1142. * UserInterface/Images/StyleRuleAuthor.pdf:
  1143. * UserInterface/Images/StyleRuleInherited.pdf:
  1144. * UserInterface/Images/StyleRuleInheritedElement.pdf:
  1145. * UserInterface/Images/StyleRuleInspector.pdf:
  1146. * UserInterface/Images/StyleRuleUser.pdf:
  1147. * UserInterface/Images/StyleRuleUserAgent.pdf:
  1148. * UserInterface/Images/Time.svg:
  1149. * UserInterface/Images/TimelineBarBlue.png:
  1150. * UserInterface/Images/TimelineBarBlue@2x.png:
  1151. * UserInterface/Images/TimelineBarOrange.png:
  1152. * UserInterface/Images/TimelineBarOrange@2x.png:
  1153. * UserInterface/Images/TimelineBarPurple.png:
  1154. * UserInterface/Images/TimelineBarPurple@2x.png:
  1155. * UserInterface/Images/Undock.pdf:
  1156. * UserInterface/Images/UpDownArrows.svg:
  1157. * UserInterface/Images/UserInputPrompt.pdf:
  1158. * UserInterface/Images/UserInputPromptPrevious.pdf:
  1159. * UserInterface/Images/UserInputPromptPreviousSelected.pdf:
  1160. * UserInterface/Images/UserInputResult.pdf:
  1161. * UserInterface/Images/UserInputResultSelected.pdf:
  1162. * UserInterface/Images/Warning.pdf:
  1163. * UserInterface/Images/WarningSmall.pdf:
  1164. * UserInterface/Images/Weight.svg:
  1165. 2013-05-24 Timothy Hatcher <timothy@apple.com>
  1166. Workaround an error with minifying the Web Inspector.
  1167. jsmin.py does not like: return //.test();
  1168. <rdar://problem/13983475> REGRESSION(r51583): Cannot show web inspector in recent spades
  1169. * UserInterface/External/CodeMirror/codemirror.js:
  1170. (window.CodeMirror):
  1171. 2013-05-23 Timothy Hatcher <timothy@apple.com>
  1172. Update CodeMirror from 3.12 to 3.13.
  1173. Include the new comment.js addon and hook it up to Command-/.
  1174. Reviewed by Joseph Pecoraro.
  1175. * Scripts/update-codemirror-resources.rb: Added comment.js.
  1176. * UserInterface/CodeMirrorAdditions.js:
  1177. * UserInterface/External/CodeMirror/clojure.js:
  1178. * UserInterface/External/CodeMirror/codemirror.css:
  1179. * UserInterface/External/CodeMirror/codemirror.js:
  1180. * UserInterface/External/CodeMirror/coffeescript.js:
  1181. * UserInterface/External/CodeMirror/comment.js: Added.
  1182. * UserInterface/External/CodeMirror/css.js:
  1183. * UserInterface/External/CodeMirror/javascript.js:
  1184. * UserInterface/External/CodeMirror/less.js:
  1185. * UserInterface/External/CodeMirror/placeholder.js:
  1186. * UserInterface/External/CodeMirror/runmode.js:
  1187. * UserInterface/External/CodeMirror/sass.js:
  1188. * UserInterface/External/CodeMirror/searchcursor.js:
  1189. * UserInterface/External/CodeMirror/sql.js:
  1190. * UserInterface/External/CodeMirror/xml.js:
  1191. * UserInterface/Main.html: Include comment.js.
  1192. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1193. <rdar://problem/13972577> ER: when deleting break points on a file, don't move up if you can't delete
  1194. Reviewed by Timothy Hatcher.
  1195. * UserInterface/DebuggerSidebarPanel.js:
  1196. (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
  1197. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1198. <rdar://problem/7545262> Command-E should put selected text in the search box
  1199. Don't implicitly preventDefault with the keyboard shortcut. This allows the
  1200. default behavior of populating the system find pasteboard.
  1201. Reviewed by Timothy Hatcher.
  1202. * UserInterface/FindBanner.js:
  1203. (WebInspector.FindBanner):
  1204. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1205. <rdar://problem/7545262> Command-E should put selected text in the search box
  1206. Pass the "changeFocus" parameter through the internal cursor relative reveal functions.
  1207. Reviewed by Timothy Hatcher.
  1208. * UserInterface/TextEditor.js:
  1209. (WebInspector.TextEditor.prototype.revealPreviousSearchResult):
  1210. (WebInspector.TextEditor.prototype.revealNextSearchResult):
  1211. (WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
  1212. (WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
  1213. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1214. <rdar://problem/7545262> Command-E should put selected text in the search box
  1215. Instead of continuing the binary search when we encounter an invalid entry,
  1216. just break out immediately. This way we can revalidate all of the search results
  1217. and accurately search forward or back.
  1218. Reviewed by Timothy Hatcher.
  1219. * UserInterface/CodeMirrorAdditions.js:
  1220. * UserInterface/TextEditor.js:
  1221. (WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
  1222. (WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
  1223. (WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
  1224. (WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
  1225. (WebInspector.TextEditor.prototype._revalidateSearchResults):
  1226. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1227. <rdar://problem/7545262> Command-E should put selected text in the search box
  1228. Clear the automaticallyRevealFirstSearchResult state after revealing a search term.
  1229. Reviewed by Timothy Hatcher.
  1230. * UserInterface/TextEditor.js:
  1231. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1232. <rdar://problem/7545262> Command-E should put selected text in the search box
  1233. When searching forwards and backwards search relative to the current cursor position.
  1234. If we were already on a particular result we can keep the old path and just move
  1235. forward / back in the result list. Otherwise we binary search the closest position
  1236. to the cursor. Because results can be removed in the search path we have a
  1237. bit of added complexity.
  1238. Reviewed by Timothy Hatcher.
  1239. * UserInterface/TextEditor.js:
  1240. (WebInspector.TextEditor.prototype.set automaticallyRevealFirstSearchResult):
  1241. (WebInspector.TextEditor.prototype.addSearchResults.markRanges):
  1242. When automatically revealing, do so relative to the cursor.
  1243. (WebInspector.TextEditor.prototype.revealPreviousSearchResult):
  1244. (WebInspector.TextEditor.prototype.revealNextSearchResult):
  1245. (WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
  1246. If we don't have a search result index, or if the cursor moved off
  1247. of the last search result index, search relative to the cursor.
  1248. (WebInspector.TextEditor.prototype._comparePositions):
  1249. (WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
  1250. (WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
  1251. (WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
  1252. Binary search search results handling the possibility that a search result
  1253. could be null. I'm not sure if this works perfectly in such cases, but
  1254. it worked fine in practice.
  1255. (WebInspector.TextEditor.prototype._revalidateSearchResults):
  1256. When we try to traverse to a search result and it was deleted, revalidate
  1257. all the search results. This can happen if in a CSS file and the user
  1258. deleted some instances of a search result.
  1259. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1260. <rdar://problem/7545262> Command-E should put selected text in the search box
  1261. Step 1, make Command+E populate the FindBanner's search query, and silently
  1262. perform the search so that Command+G and Shift+Command+G work. Expose a
  1263. new ContentView method "searchQueryWithSelection" to get a search query
  1264. from the selection in that ContentView. This currently only works with
  1265. TextEditor ContentViews.
  1266. Reviewed by Timothy Hatcher.
  1267. * UserInterface/FindBanner.js:
  1268. (WebInspector.FindBanner): Add the keyboard shortcut.
  1269. (WebInspector.FindBanner.prototype._populateSearchQueryFromSelection):
  1270. Ask the delegate (ContentBrowser) for a search query from selection.
  1271. If we get one, silently perform a search.
  1272. * UserInterface/TextEditor.js:
  1273. (WebInspector.TextEditor.prototype.searchQueryWithSelection):
  1274. Get the selection from CodeMirror and return that.
  1275. * UserInterface/ContentView.js:
  1276. (WebInspector.ContentView.prototype.searchQueryWithSelection):
  1277. Default implementation returns null, meaning no change.
  1278. * UserInterface/ClusterContentView.js:
  1279. (WebInspector.ClusterContentView.prototype.searchQueryWithSelection):
  1280. * UserInterface/ContentBrowser.js:
  1281. (WebInspector.ContentBrowser.prototype.findBannerSearchQueryForSelection):
  1282. * UserInterface/ScriptContentView.js:
  1283. (WebInspector.ScriptContentView.prototype.searchQueryWithSelection):
  1284. * UserInterface/TextContentView.js:
  1285. (WebInspector.TextContentView.prototype.searchQueryWithSelection):
  1286. * UserInterface/TextResourceContentView.js:
  1287. (WebInspector.TextResourceContentView.prototype.searchQueryWithSelection):
  1288. Plumbing the message down the content views heirarchy.
  1289. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1290. Remove unnecessary return for setter.
  1291. This was just a copy / paste error from when it was originally written.
  1292. Reviewed by Timothy Hatcher.
  1293. * UserInterface/ClusterContentView.js:
  1294. (WebInspector.ClusterContentView.prototype.set automaticallyRevealFirstSearchResult):
  1295. 2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
  1296. Remove unused instance variable TextEditor._pendingSearchResultLineNumbers
  1297. Reviewed by Timothy Hatcher.
  1298. * UserInterface/TextEditor.js:
  1299. (WebInspector.TextEditor):
  1300. 2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
  1301. <rdar://problem/13961791> Stopping recording clears the timeline
  1302. It actually seems like a non-main frame resource change causes the
  1303. timeline to clear. Only clear on main frame main resource changes.
  1304. Reviewed by Timothy Hatcher.
  1305. * UserInterface/TimelineManager.js:
  1306. (WebInspector.TimelineManager.prototype._mainResourceDidChange):
  1307. 2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
  1308. <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
  1309. When a BreakpointTreeElement is selected and the page is reloaded the
  1310. breakpoint tree elements are removed. When removing the tree element
  1311. the parent, ResourceTreeElement, was selected and the tree outline
  1312. created a content view to show for that resource. This content view
  1313. was being orphaned and replaced when new resources were loaded.
  1314. We never want to create a content view for a Script/ResourceTreeElement
  1315. in the DebuggerSidebarPanel when it has no children. That is a sign
  1316. that the tree element is about to be deleted.
  1317. Reviewed by Timothy Hatcher.
  1318. * UserInterface/DebuggerSidebarPanel.js:
  1319. (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
  1320. 2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
  1321. <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
  1322. Prevent the populate with script content path from requesting content
  1323. multiple times. This is just an optimization to prevent duplicated work.
  1324. This can happen the first time the debugger is paused, by setting the
  1325. active call frame, opening the resource, and then triggering the active
  1326. call frame did change notification.
  1327. Reviewed by Timothy Hatcher.
  1328. * UserInterface/SourceCodeTextEditor.js:
  1329. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  1330. (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
  1331. (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
  1332. (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
  1333. 2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
  1334. <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
  1335. On iOS 6, when associating a Script with a Resource also update the type
  1336. to be Script, that way the resource will get a TextResourceContentView
  1337. instead of a GeneralResourceContentView and fall into the existing path
  1338. that will fetch Script Source for an editor when it is on a breakpoint
  1339. and cannot load the resource content.
  1340. Also, replace instances of "scriptsForResource" with the new scripts
  1341. accessor on WebInspector.Resource.
  1342. Reviewed by Timothy Hatcher.
  1343. * UserInterface/DebuggerManager.js:
  1344. (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
  1345. * UserInterface/Resource.js:
  1346. (WebInspector.Resource.prototype.associateWithScript):
  1347. * UserInterface/SourceCodeTextEditor.js:
  1348. (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
  1349. 2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
  1350. <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
  1351. Never loading content while on a breakpoint is possible in scripts if
  1352. the backend is paused executing the script before it has sent the
  1353. frontend information that the resource has finished loading. In these
  1354. cases, it is still possible for the frontend to get the "script source"
  1355. instead of the "resource content". These patches do that.
  1356. Start by creating an association between WebInspector.Resource and
  1357. WebInspector.Script. The order of events is always such that the Resource
  1358. is created first:
  1359. - Network.requestWillBeSent => create WebInspector.Resource
  1360. - Debugger.scriptParsed => create WebInspector.Script
  1361. So associate a Script with a Resource, if there is one, when the Script
  1362. is created. Currently we can only create the association with URLs,
  1363. which is not perfect if resources have the same URL but different
  1364. contents. That has never worked perfectly.
  1365. Reviewed by Timothy Hatcher.
  1366. * UserInterface/Script.js:
  1367. (WebInspector.Script):
  1368. (WebInspector.Script.prototype.get resource):
  1369. (WebInspector.Script.prototype.requestContentFromBackend):
  1370. (WebInspector.Script.prototype._resolveResource):
  1371. On creation associate with a Resource via URL.
  1372. * UserInterface/Resource.js:
  1373. (WebInspector.Resource.prototype.get scripts):
  1374. (WebInspector.Resource.prototype.associateWithScript):
  1375. Allow a Script to associate with this resource.
  1376. * UserInterface/FrameResourceManager.js:
  1377. Remove "resourceForScript". Script's now have a resource property.
  1378. * UserInterface/DebuggerSidebarPanel.js:
  1379. (WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
  1380. * UserInterface/Main.js:
  1381. (WebInspector.linkifyLocation):
  1382. * UserInterface/ResourceSidebarPanel.js:
  1383. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
  1384. (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
  1385. * UserInterface/ScriptContentView.js:
  1386. (WebInspector.ScriptContentView):
  1387. * UserInterface/SourceCodeTextEditor.js:
  1388. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
  1389. * UserInterface/SourceMapManager.js:
  1390. (WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
  1391. Refactor to the simpler script.resource.
  1392. 2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
  1393. Remove generic event listeners when ClusterContentViews are closed.
  1394. Some event listeners were removed, but not all. This would have
  1395. caused the cluster content views to be leaked.
  1396. Reviewed by Timothy Hatcher.
  1397. * UserInterface/ClusterContentView.js:
  1398. (WebInspector.ClusterContentView.prototype.closed):
  1399. 2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
  1400. Remove the concept of left and right navigation items.
  1401. They are unused. So just remove them.
  1402. Reviewed by Timothy Hatcher.
  1403. * UserInterface/ContentBrowser.js:
  1404. (WebInspector.ContentBrowser):
  1405. (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
  1406. * UserInterface/Sidebar.js:
  1407. (WebInspector.Sidebar):
  1408. 2013-05-22 Timothy Hatcher <timothy@apple.com>
  1409. Fix auto complete property caching.
  1410. <rdar://problem/13961832> Autocomplete of function return value causes side-effects multiple times
  1411. Reviewed by Joseph Pecoraro.
  1412. * UserInterface/JavaScriptLogViewController.js:
  1413. 2013-05-21 Antoine Quint <graouts@apple.com>
  1414. <rdar://problem/13948862> REGRESSION (r150395): Sticky headers are mis-positioned
  1415. Reviewed by Joseph Pecoraro.
  1416. * UserInterface/DetailsSection.css:
  1417. (.details-section > .header):
  1418. (.details-section .details-section > .header):
  1419. Position and layer the headers correctly such that they snap to
  1420. the right position when scrolling.
  1421. * UserInterface/Main.js:
  1422. (WebInspector.updateDockedState):
  1423. (WebInspector._toolbarDisplayModeDidChange):
  1424. (WebInspector._toolbarSizeModeDidChange):
  1425. Remove unnecessary code now that sticky-positioned elements behave
  1426. as expected in Òoverflow: scrollÓ elements.
  1427. 2013-05-21 Antoine Quint <graouts@apple.com>
  1428. <rdar://problem/13941438> Debugger popovers should prefer placement to the bottom/right over left to not cover expression
  1429. Reviewed by Timothy Hatcher.
  1430. Let Popover.present() be provided with a list of preferred edges in order
  1431. of preference and let the source code popovers prefer layout above, below and on
  1432. the right, in this order.
  1433. * UserInterface/Breakpoint.js:
  1434. (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
  1435. * UserInterface/LayerTreeSidebarPanel.js:
  1436. (WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
  1437. Adopt new Popover.present() parameter type.
  1438. * UserInterface/Popover.js:
  1439. (WebInspector.Popover):
  1440. (WebInspector.Popover.prototype.present):
  1441. Rename ÒpreferredEdgeÓ to ÒpreferredEdgesÓ (plural).
  1442. (WebInspector.Popover.prototype._update):
  1443. Instead of gathering metrics sorted by keys, gather them sorted in the
  1444. order of preference provided by the ÒpreferredEdgesÓ argument.
  1445. * UserInterface/SourceCodeTextEditor.js:
  1446. (WebInspector.SourceCodeTextEditor.prototype._showPopover):
  1447. Adopt new Popover.present() parameter type and provide the desired list
  1448. of preferred edges in order.
  1449. 2013-05-20 Joseph Pecoraro <pecoraro@apple.com>
  1450. <rdar://problem/13945892> Console messages not working with iOS 6
  1451. Reviewed by Timothy Hatcher.
  1452. Don't use the enums right now. They were not generated for the iOS 6
  1453. InspectorBackend commands file. In the future we should generate it
  1454. for Legacy systems as well as trunk, and use constants instead of
  1455. magic values in code.
  1456. * UserInterface/ConsoleObserver.js:
  1457. (WebInspector.ConsoleObserver.prototype.messageAdded):
  1458. 2013-05-19 Timothy Hatcher <timothy@apple.com>
  1459. Prevent selection and deselect all messages when clicking disclosure triangles in the console.
  1460. This mostly worked before, but if a selection did happen it wouldn't go away by itself. Now
  1461. it will go away if a disclosure triangle is clicked. Also the initial focus mouse down always
  1462. selected the row, now it does not.
  1463. <rdar://problem/13839762> REGRESSION: When inspecting an object in the console, the entire object becomes highlighted
  1464. Reviewed by Joseph Pecoraro.
  1465. * UserInterface/ConsoleGroup.js:
  1466. (WebInspector.ConsoleGroup.prototype.addMessage):
  1467. (WebInspector.ConsoleGroup.prototype._titleMouseDown): Added.
  1468. (WebInspector.ConsoleGroup.prototype._titleClicked):
  1469. Don't select a group row when the title is clicked.
  1470. * UserInterface/DOMTreeOutline.js:
  1471. (WebInspector.DOMTreeOutline.prototype._onmousedown):
  1472. Prevent default instead of stopping propagation.
  1473. * UserInterface/LogContentView.css:
  1474. (.outline-disclosure li.parent::before):
  1475. Drive by disclosure triangle position tweak.
  1476. * UserInterface/LogContentView.js:
  1477. (WebInspector.LogContentView.prototype._mousedown):
  1478. Check for defaultPrevented and deselect all messages.
  1479. * UserInterface/TreeOutline.js:
  1480. (TreeElement.treeElementMouseDown):
  1481. Prevent default instead of stopping propagation.
  1482. 2013-05-19 Timothy Hatcher <timothy@apple.com>
  1483. Fix the issue where console logs would overlap on reload.
  1484. Rejigger the console elements so the flex element can grow to fit and the parent does the scrolling.
  1485. <rdar://problem/13932826> REGRESSION (r147261): Reloading page causes overlapping console logs (116404)
  1486. Reviewed by Antoine Quint.
  1487. * UserInterface/JavaScriptLogViewController.js:
  1488. (WebInspector.JavaScriptLogViewController):
  1489. (WebInspector.JavaScriptLogViewController.prototype.isScrolledToBottom):
  1490. (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom.delayedWork):
  1491. (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom):
  1492. * UserInterface/LogContentView.css:
  1493. (.content-view.log):
  1494. (.console-messages):
  1495. * UserInterface/LogContentView.js:
  1496. (WebInspector.LogContentView):
  1497. (WebInspector.LogContentView.prototype.updateLayout):
  1498. (WebInspector.LogContentView.prototype.get scrollableElements):
  1499. (WebInspector.LogContentView.prototype._ensureMessageIsVisible):
  1500. (WebInspector.LogContentView.prototype._positionForMessage):
  1501. 2013-05-18 Timothy Hatcher <timothy@apple.com>
  1502. Make prefixed keywords syntax highlight correctly.
  1503. CodeMirror parses the vendor prefix separate from the property or keyword name,
  1504. so we need to strip vendor prefixes from our all our names, not just properties.
  1505. Reviewed by Joseph Pecoraro.
  1506. * UserInterface/CSSCompletions.js:
  1507. (WebInspector.CSSCompletions.requestCSSNameCompletions.nameForCodeMirror):
  1508. (WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
  1509. 2013-05-18 Joseph Pecoraro <pecoraro@apple.com>
  1510. <rdar://problem/13774412> Update CSSKeywordCompletions.js for Curie + iOS
  1511. This is a pretty mechanical update to CSS autocompletion suggestions.
  1512. Also fix suggestions not working for "-webkit-" properties.
  1513. Most of this list was manually generated by looking at specifications
  1514. and walking CSSParser::parseValue, isValidKeywordPropertyAndValue,
  1515. CSSProperty::isInheritedProperty, the related .in files, and a bit
  1516. of sleuthing. It is not meant to be perfect, webkit differs from
  1517. specs slightly and doesn't implement all properties, but it does
  1518. a better job than before.
  1519. Rubber-stamped by Timothy Hatcher.
  1520. * UserInterface/CSSKeywordCompletions.js:
  1521. (WebInspector.CSSKeywordCompletions.forProperty):
  1522. 2013-05-17 Timothy Hatcher <timothy@apple.com>
  1523. Drop -webkit- prefixes from CSS properties that no longer require them.
  1524. Reviewed by Joseph Pecoraro.
  1525. * UserInterface/CSSStyleDeclarationSection.css:
  1526. * UserInterface/CodeMirrorOverrides.css:
  1527. * UserInterface/DOMTreeOutline.css:
  1528. * UserInterface/Editing.css:
  1529. * UserInterface/LogContentView.css:
  1530. * UserInterface/Main.css:
  1531. * UserInterface/NavigationSidebarPanel.css:
  1532. * UserInterface/Section.css:
  1533. * UserInterface/TimelinesContentView.css:
  1534. 2013-05-17 Joseph Pecoraro <pecoraro@apple.com>
  1535. <rdar://problem/13919974> 11A368: Instruments tab of RWI is almost empty when loading apple.com on device
  1536. Fix a typo in the constant name. It was using a non-existent constant
  1537. which resulted in a 0ms timeout instead of the intended 15s.
  1538. Reviewed by Timothy Hatcher.
  1539. * UserInterface/TimelineManager.js:
  1540. (WebInspector.TimelineManager.prototype._startAutoRecording):
  1541. 2013-05-16 Joseph Pecoraro <pecoraro@apple.com>
  1542. <rdar://problem/13917982> Inconsistency between right-clicking and control-clicking in Debugger gutter
  1543. Ignore "Ctrl + Left Click" in more places:
  1544. * in drag / resize scenarios
  1545. * text editor gutter on a breakpoint
  1546. Reviewed by Timothy Hatcher.
  1547. * UserInterface/DataGrid.js:
  1548. (WebInspector.DataGrid.prototype._startResizerDragging):
  1549. (WebInspector.DataGrid.prototype._resizerDragging):
  1550. (WebInspector.DataGrid.prototype._endResizerDragging):
  1551. * UserInterface/Main.js:
  1552. (WebInspector._dockedResizerMouseDown.dockedResizerDrag):
  1553. (WebInspector._dockedResizerMouseDown.dockedResizerDragEnd):
  1554. (WebInspector._dockedResizerMouseDown):
  1555. (WebInspector._moveWindowMouseDown.toolbarDrag):
  1556. (WebInspector._moveWindowMouseDown.toolbarDragEnd):
  1557. (WebInspector._moveWindowMouseDown):
  1558. * UserInterface/Sidebar.js:
  1559. (WebInspector.Sidebar.prototype._resizerMouseDown):
  1560. (WebInspector.Sidebar.prototype._resizerMouseUp):
  1561. * UserInterface/TextEditor.js:
  1562. (WebInspector.TextEditor.prototype._gutterMouseDown):
  1563. 2013-05-17 Timothy Hatcher <timothy@apple.com>
  1564. Make clicking completions work again in the Style details sidebar.
  1565. <rdar://problem/13919341> REGRESSION: Mouse clicking a CSS autocompletion suggestion no longer works
  1566. Reviewed by Antoine Quint.
  1567. * UserInterface/CSSStyleDeclarationTextEditor.js:
  1568. (WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured):
  1569. Clicking a suggestion causes the editor to blur. We don't want to reset content in this case.
  1570. * UserInterface/CodeMirrorCompletionController.js:
  1571. (WebInspector.CodeMirrorCompletionController.prototype.isHandlingClickEvent): Added.
  1572. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): Use this.isHandlingClickEvent().
  1573. 2013-05-16 Timothy Hatcher <timothy@apple.com>
  1574. Reset the branches when the main frame navigates.
  1575. This makes sure the SourceCodeRevisions don't stick around between page loads and take up memory.
  1576. Reviewed by Joseph Pecoraro.
  1577. * UserInterface/BranchManager.js:
  1578. (WebInspector.BranchManager):
  1579. (WebInspector.BranchManager.prototype.initialize):
  1580. (WebInspector.BranchManager.prototype.deleteBranch):
  1581. (WebInspector.BranchManager.prototype._mainResourceDidChange):
  1582. 2013-05-16 Timothy Hatcher <timothy@apple.com>
  1583. Some random style tweaks.
  1584. Reviewed by Joseph Pecoraro.
  1585. * UserInterface/CSSStyleDeclarationSection.css:
  1586. (.style-declaration-section > .header): Smaller top margin to align with the icon better.
  1587. * UserInterface/CodeMirrorOverrides.css:
  1588. (.CodeMirror .CodeMirror-gutters): Lighter border color to match Xcode 5.
  1589. 2013-05-16 Timothy Hatcher <timothy@apple.com>
  1590. Fix a case where we would enter an infinite loop, consuming memory and hang.
  1591. <rdar://problem/13911608> REGRESSION (r50998): Massive memory growth and hanging (115811)
  1592. Reviewed by Joseph Pecoraro.
  1593. * UserInterface/Resource.js:
  1594. (WebInspector.Resource.prototype.updateForRedirectResponse):
  1595. (WebInspector.Resource.prototype.updateForResponse):
  1596. (WebInspector.Resource.prototype.increaseSize):
  1597. (WebInspector.Resource.prototype.markAsFinished):
  1598. (WebInspector.Resource.prototype.markAsFailed):
  1599. Timestamps are expected to be NaN instead of null. This wasn't an issue before because
  1600. the timeline code didn't use these timestamps. Now Resource.firstTimestamp uses them,
  1601. which is used by ResourceTimelineRecord.startTime.
  1602. 2013-05-15 Timothy Hatcher <timothy@apple.com>
  1603. Allow Command-K to clear the console anywhere in the Inspector.
  1604. <rdar://problem/13888241> Command-K doesn't clear the Console unless it has focus
  1605. Reviewed by Antoine Quint.
  1606. * UserInterface/JavaScriptLogViewController.js:
  1607. (WebInspector.JavaScriptLogViewController):
  1608. 2013-05-15 Timothy Hatcher <timothy@apple.com>
  1609. Fix the Save As... keyboard shortcut.
  1610. Reviewed by Antoine Quint.
  1611. * UserInterface/ContentBrowser.js:
  1612. (WebInspector.ContentBrowser):
  1613. Don't require the Option key. It is Command-Shift-S.
  1614. 2013-05-15 Timothy Hatcher <timothy@apple.com>
  1615. Make clicking the console icons in the dashboard toggle the scope.
  1616. <rdar://problem/13884713> Improve console filtering via the dashboard buttons
  1617. Reviewed by Antoine Quint.
  1618. * UserInterface/Main.js:
  1619. (WebInspector.showFullHeightConsole):
  1620. If the requested scope is already selected and the console is showing, then switch back to All.
  1621. 2013-05-15 Timothy Hatcher <timothy@apple.com>
  1622. Make the tab key commit the completion of there is only one suggestion.
  1623. <rdar://problem/13897001> REGRESSION (Safari 6): Tab to accept autocomplete with 1 result
  1624. should dismiss completion suggestions popover
  1625. Reviewed by Antoine Quint.
  1626. * UserInterface/CodeMirrorCompletionController.js:
  1627. (WebInspector.CodeMirrorCompletionController.prototype._handleTabKey):
  1628. Commit the current completion if there is only one suggestion.
  1629. 2013-05-14 Timothy Hatcher <timothy@apple.com>
  1630. Always evaluate the console prompt if the cursor is not at the last position.
  1631. <rdar://problem/13854691> New Return key behavior in Web Inspector breaks my typical usage
  1632. Reviewed by Joseph Pecoraro.
  1633. * UserInterface/ConsolePrompt.js:
  1634. (WebInspector.ConsolePrompt.prototype._handleEnterKey):
  1635. * UserInterface/JavaScriptLogViewController.js:
  1636. 2013-05-14 Timothy Hatcher <timothy@apple.com>
  1637. Update Frame.securityOrigin when committing the provisional load.
  1638. Reviewed by Joseph Pecoraro.
  1639. * UserInterface/Frame.js:
  1640. (WebInspector.Frame.prototype.commitProvisionalLoad):
  1641. * UserInterface/FrameResourceManager.js:
  1642. (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
  1643. 2013-05-14 Timothy Hatcher <timothy@apple.com>
  1644. Add DOMStorage when the main resource changes.
  1645. <rdar://problem/13844066> REGRESSION: If the Web Inspector is displayed when you refresh the page, local and session storage is not visible
  1646. Reviewed by Joseph Pecoraro.
  1647. * UserInterface/StorageManager.js:
  1648. (WebInspector.StorageManager.prototype._mainResourceDidChange):
  1649. (WebInspector.StorageManager.prototype._addDOMStorageIfNeeded):
  1650. (WebInspector.StorageManager.prototype._securityOriginDidChange):
  1651. 2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
  1652. <rdar://problem/13876379> Pretty printing while paused in the debugger loses the execution line
  1653. When pretty printing we replace the entire contents of the editor. If
  1654. the display location didn't change at all, then when we re-set the
  1655. execution line number, we wouldn't update the style on the line.
  1656. This change makes updating the execution line more of the TextEditor's
  1657. responsibility on a pretty print. Previously it was working in most cases
  1658. but now it should always work as long as the TextEditor has been given
  1659. an accurate execution line and column number. In pretty print we delete
  1660. the execution line handle so we are guaranteed to recreate it.
  1661. Just in case, also update SourceCodeLocation to listen to any location
  1662. changes, not just display location changes.
  1663. Reviewed by Timothy Hatcher.
  1664. * UserInterface/SourceCodeTextEditor.js:
  1665. (WebInspector.SourceCodeTextEditor.prototype.close):
  1666. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  1667. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
  1668. * UserInterface/TextEditor.js:
  1669. (WebInspector.TextEditor):
  1670. (WebInspector.TextEditor.prototype.get executionColumnNumber):
  1671. (WebInspector.TextEditor.prototype.set executionColumnNumber):
  1672. 2013-05-13 Timothy Hatcher <timothy@apple.com>
  1673. Fix the shortcut for the Layer details sidebar panel.
  1674. Also fix the naming of the toolbar buttons for the Style details sidebar and
  1675. Layer details sidebar so they are plural while the name in the tooltip is still singular.
  1676. <rdar://problem/13871872> Layers details sidebar shortcut should be control-shift-4, not control-shift-5
  1677. Reviewed by Joseph Pecoraro.
  1678. * Localizations/en.lproj/localizedStrings.js:
  1679. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  1680. (WebInspector.ApplicationCacheDetailsSidebarPanel):
  1681. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  1682. (WebInspector.CSSStyleDetailsSidebarPanel):
  1683. * UserInterface/DOMDetailsSidebarPanel.js:
  1684. (WebInspector.DOMDetailsSidebarPanel):
  1685. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  1686. (WebInspector.DOMNodeDetailsSidebarPanel):
  1687. * UserInterface/DetailsSidebarPanel.js:
  1688. (WebInspector.DetailsSidebarPanel):
  1689. * UserInterface/LayerTreeSidebarPanel.js:
  1690. (WebInspector.LayerTreeSidebarPanel):
  1691. * UserInterface/ResourceDetailsSidebarPanel.js:
  1692. (WebInspector.ResourceDetailsSidebarPanel):
  1693. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  1694. (WebInspector.ScopeChainDetailsSidebarPanel):
  1695. 2013-05-13 Timothy Hatcher <timothy@apple.com>
  1696. Tweak the console completions to work as expected in more cases.
  1697. Also prevent empty prefix completions unless it is the start of property access.
  1698. This was a regression from the fix for <rdar://problem/13860627>.
  1699. <rdar://problem/13871885> Command-line API functions don't autocomplete when passed as parameter
  1700. Reviewed by Joseph Pecoraro.
  1701. * UserInterface/CodeMirrorCompletionController.js:
  1702. (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
  1703. * UserInterface/ConsolePrompt.js:
  1704. (WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
  1705. * UserInterface/JavaScriptLogViewController.js:
  1706. 2013-05-12 Timothy Hatcher <timothy@apple.com>
  1707. Update the toolbar height so the save sheet is positioned correctly and window gradient is accurate.
  1708. <rdar://problem/13871067> Save sheet on the Web Inspector does not come out from under the toolbar
  1709. Reviewed by Antoine Quint.
  1710. * UserInterface/Main.js:
  1711. (WebInspector.contentLoaded):
  1712. (WebInspector.updateDockedState):
  1713. (WebInspector._updateToolbarHeight):
  1714. (WebInspector._toolbarDisplayModeDidChange):
  1715. (WebInspector._toolbarSizeModeDidChange):
  1716. 2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
  1717. Improve String.prototype.startsWith to not search the entire string.
  1718. Using the optional second parameter of lastIndexOf we can only search
  1719. for a substring from index 0, and not check the rest of the string.
  1720. I also went through and replaced all uses of str.indexOf(...) === 0 with
  1721. str.startsWith(...), or if a single character str.charAt(0) === "?".
  1722. Reviewed by Timothy Hatcher.
  1723. * UserInterface/CSSCompletions.js:
  1724. (WebInspector.CSSCompletions.prototype.startsWith):
  1725. (WebInspector.CSSCompletions.prototype._firstIndexOfPrefix):
  1726. * UserInterface/CallFrameTreeElement.js:
  1727. (WebInspector.CallFrameTreeElement):
  1728. * UserInterface/CookieStorageContentView.js:
  1729. (WebInspector.cookieMatchesResourceURL):
  1730. * UserInterface/DOMTreeElement.js:
  1731. (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
  1732. * UserInterface/EditingSupport.js:
  1733. * UserInterface/InstrumentSidebarPanel.js:
  1734. (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
  1735. * UserInterface/JavaScriptProfileView.js:
  1736. * UserInterface/Main.js:
  1737. (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
  1738. * UserInterface/Resource.js:
  1739. (WebInspector.Resource.Type.fromMIMEType):
  1740. * UserInterface/Utilities.js:
  1741. 2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
  1742. Make mailto: href links behave correctly.
  1743. Test: data:text/html,<a href="mailto:pecoraro@apple.com?subject=email">Email Joe</a>
  1744. Reviewed by Timothy Hatcher.
  1745. * UserInterface/Utilities.js:
  1746. 2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
  1747. <rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
  1748. TextEditor / SourceCodeTextEditor (most resources) already had behavior where
  1749. clicking a "link" would attempt to open it in the Inspector, and fallback to
  1750. opening a new browser tab for the URL. This hardens that behavior in the
  1751. "jump to symbol" case, and makes it work in the CSS Sidebar with Command+Click.
  1752. To encourage editing in the style sidebar, style url(...)s as strings,
  1753. which is how they displayed before these patches.
  1754. Reviewed by Timothy Hatcher.
  1755. * UserInterface/TextEditor.js:
  1756. (WebInspector.TextEditor.prototype._openClickedLinks):
  1757. Cleanup the code a bit.
  1758. * UserInterface/SourceCodeTextEditor.js:
  1759. (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
  1760. Don't jump to symbol when clicking a link. Fallback to TextEditor's link opening behavior.
  1761. * UserInterface/CSSStyleDeclarationTextEditor.js:
  1762. (WebInspector.CSSStyleDeclarationTextEditor.prototype):
  1763. Handle jump to symbol when clicking a link to behave link TextEditor's link opening behavior.
  1764. * UserInterface/CSSStyleDeclarationTextEditor.css:
  1765. (.css-style-text-editor > .CodeMirror .cm-link):
  1766. In the Style sidebar editors display links as strings by default.
  1767. 2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
  1768. <rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
  1769. Add extendedCSSToken, modeled after extendedXMLToken to parse url(...)
  1770. links and give them a "link" style class.
  1771. Normally CodeMirror parses "url", "(", <optionally quoted string>, ")".
  1772. We hook into this case and manually parse the optionally quoted string
  1773. ourselves so that we can handle quotes and whitespace exactly how we
  1774. want to.
  1775. Reviewed by Timothy Hatcher.
  1776. * UserInterface/CodeMirrorAdditions.js:
  1777. 2013-05-15 Joseph Pecoraro <pecoraro@apple.com>
  1778. <rdar://problem/13865123> REGRESSION: Incorrect link tokenization of unquoted src/href links - <img src=...>
  1779. Handle unquoted attributes when we take over tokenization of link attribute values.
  1780. Reviewed by Timothy Hatcher.
  1781. * UserInterface/CodeMirrorAdditions.js:
  1782. 2013-05-11 Timothy Hatcher <timothy@apple.com>
  1783. Make the tab behavior consistent among all CodeMirror editors.
  1784. Making this a setting is tracked by <rdar://problem/10593948>.
  1785. Reviewed by Darin Adler.
  1786. * UserInterface/CSSStyleDeclarationTextEditor.js:
  1787. (WebInspector.CSSStyleDeclarationTextEditor):
  1788. * UserInterface/TextEditor.js:
  1789. (WebInspector.TextEditor):
  1790. 2013-05-11 Timothy Hatcher <timothy@apple.com>
  1791. Allow editing any local file since edits can be saved and reloaded right from the Inspector.
  1792. Reviewed by Dean Jackson.
  1793. * UserInterface/ScriptContentView.js:
  1794. (WebInspector.ScriptContentView.prototype._contentWillPopulate):
  1795. * UserInterface/TextResourceContentView.js:
  1796. (WebInspector.TextResourceContentView.prototype._contentWillPopulate):
  1797. 2013-05-11 Timothy Hatcher <timothy@apple.com>
  1798. Support saving text resources and the console log to a local file.
  1799. <rdar://problem/5827275> PARITY (Chrome Developer Tools): Add an option to save a resource locally
  1800. Reviewed by Dean Jackson.
  1801. * Localizations/en.lproj/localizedStrings.js: Updated.
  1802. * UserInterface/ClusterContentView.js:
  1803. (WebInspector.ClusterContentView.prototype.get supportsSave):
  1804. (WebInspector.ClusterContentView.prototype.get saveData):
  1805. * UserInterface/ConsoleMessageImpl.js:
  1806. (WebInspector.ConsoleMessageImpl.prototype.toClipboardString): Always include the level. It was omitted
  1807. when we didn't have text range selection to make it easier to copy and paste. But we also include the
  1808. file and line info, so it was already has more info than just the message.
  1809. * UserInterface/ContentBrowser.js:
  1810. (WebInspector.ContentBrowser):
  1811. (WebInspector.ContentBrowser.prototype._saveDataToFile):
  1812. (WebInspector.ContentBrowser.prototype._save):
  1813. (WebInspector.ContentBrowser.prototype._saveAs):
  1814. * UserInterface/LogContentView.js:
  1815. (WebInspector.LogContentView.prototype.get supportsSave):
  1816. (WebInspector.LogContentView.prototype.get saveData):
  1817. (WebInspector.LogContentView.prototype.handleCopyEvent):
  1818. (WebInspector.LogContentView.prototype._formatMessagesAsData.var):
  1819. (WebInspector.LogContentView.prototype._formatMessagesAsData):
  1820. * UserInterface/ScriptContentView.js:
  1821. (WebInspector.ScriptContentView.prototype.get supportsSave):
  1822. (WebInspector.ScriptContentView.prototype.get saveData):
  1823. * UserInterface/TextContentView.js:
  1824. (WebInspector.TextContentView.prototype.get supportsSave):
  1825. (WebInspector.TextContentView.prototype.get saveData):
  1826. * UserInterface/TextResourceContentView.js:
  1827. (WebInspector.TextResourceContentView.prototype.get supportsSave):
  1828. (WebInspector.TextResourceContentView.prototype.get saveData):
  1829. 2013-05-11 Timothy Hatcher <timothy@apple.com>
  1830. Fix an exception I saw while navigating between pages.
  1831. I only reproduced this once, but the fix is a simple null check.
  1832. I'm assuming close was called a second time.
  1833. Reviewed by Anders Carlsson.
  1834. * UserInterface/DOMTreeOutline.js:
  1835. (WebInspector.DOMTreeOutline.prototype.close):
  1836. 2013-05-10 Timothy Hatcher <timothy@apple.com>
  1837. Tweak layer borders icon.
  1838. <rdar://problem/13717886> Two layers buttons with different meanings
  1839. * UserInterface/Images/LayerBorders.pdf:
  1840. 2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
  1841. <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
  1842. Add a "jump to symbol" mode when the command key is down for the CSS
  1843. style sidebar to jump to the display CSS Resource.
  1844. Reviewed by Timothy Hatcher.
  1845. * UserInterface/CSSStyleDeclarationTextEditor.js:
  1846. (WebInspector.CSSStyleDeclarationTextEditor):
  1847. (WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
  1848. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateJumpToSymbolTrackingMode):
  1849. Listen for GlobalModifierKeysDidChange events when the style for the
  1850. editor has an owner rule and that owner rule has a source code location.
  1851. (WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
  1852. Jump to the display resource when clicking the highlighted range.
  1853. (WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
  1854. Immediately highlight hovered ranges for jump to symbol mode.
  1855. 2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
  1856. <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
  1857. Add a "jump to symbol" mode when the command key is down, to quickly
  1858. jump between a SourceMapResource and the original resources for the
  1859. hovered token. This mode takes precedence over debugger popovers if
  1860. enabled (because the command key is pressed).
  1861. Reviewed by Timothy Hatcher.
  1862. * UserInterface/SourceCodeTextEditor.js:
  1863. (WebInspector.SourceCodeTextEditor):
  1864. (WebInspector.SourceCodeTextEditor.prototype.hidden):
  1865. (WebInspector.SourceCodeTextEditor.prototype.close):
  1866. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
  1867. (WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
  1868. Listen for GlobalModifierKeysDidChange events when this file has a source map
  1869. (either it is a SourceMapResource or it is a SourceCode with sourceMap resources).
  1870. (WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
  1871. (WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
  1872. (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
  1873. (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
  1874. (WebInspector.SourceCodeTextEditor.prototype._sourceCodeSourceMapAdded):
  1875. In SourceCodeTextEditors there are 2 possible reasons we may have hover tracking,
  1876. when on a breakpoint for JavaScript or in Jump To Symbol tracking mode.
  1877. (WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
  1878. (WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
  1879. (WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
  1880. Switch between and different tracking modes with different settings.
  1881. (WebInspector.SourceCodeTextEditor.prototype._sourceCodeLocationForEditorPosition):
  1882. (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
  1883. When in jump to symbol mode, determine the sourceCodeLocation relating to the
  1884. token that was clicked and jump between resources.
  1885. (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
  1886. When in jump to symbol mode, that takes precedence. Highlight just the hovered token.
  1887. 2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
  1888. <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
  1889. Move token tracking out of TextEditor into its own class with settings,
  1890. CodeMirrorTokenTrackingController. You can now set the token mode on
  1891. the controller to get different types of candidate hovered token results
  1892. back to the delegate (TextEditor subclass).
  1893. The CodeMirrorTokenTrackingController can start/stop tracking, highlight
  1894. a given text range, set delays for mousing over and out of tokens before
  1895. actions are taken, and provide different candidates depending the chosen
  1896. mode. The current modes are:
  1897. NonSymbolTokens - returns a candidate for just the hovered token.
  1898. JavaScriptExpression - returns a candidate for the hovered token with
  1899. extra information about the JavaScript expression ending at that token.
  1900. When tracking is enabled, the delegate may be notified of changes:
  1901. tokenTrackingControllerCanReleaseHighlightedRange - should remove the highlight
  1902. tokenTrackingControllerHighlightedRangeReleased - the highlight was removed
  1903. tokenTrackingControllerHighlightedRangeWasClicked - the highlight was clicked
  1904. tokenTrackingControllerNewHighlightCandidate - new hovered highlight candidate
  1905. A plus side of this is that TextEditor now no longer knows about
  1906. "JavaScript". It shouldn't need to know about a certain mode of
  1907. content that it contains.
  1908. Reviewed by Timothy Hatcher.
  1909. * UserInterface/Main.html:
  1910. * UserInterface/CodeMirrorTokenTrackingController.css: Added.
  1911. (.CodeMirror .jump-to-symbol-highlight): Shared style for any type of editor.
  1912. * UserInterface/CodeMirrorTokenTrackingController.js: Added.
  1913. (WebInspector.CodeMirrorTokenTrackingController):
  1914. (WebInspector.CodeMirrorTokenTrackingController.prototype.get delegate):
  1915. (WebInspector.CodeMirrorTokenTrackingController.prototype.set delegate):
  1916. (WebInspector.CodeMirrorTokenTrackingController.prototype.get mode):
  1917. (WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
  1918. (WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOverDelayDuration):
  1919. (WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOverDelayDuration):
  1920. (WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOutReleaseDelayDuration):
  1921. (WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOutReleaseDelayDuration):
  1922. (WebInspector.CodeMirrorTokenTrackingController.prototype.get classNameForHighlightedRange):
  1923. (WebInspector.CodeMirrorTokenTrackingController.prototype.set classNameForHighlightedRange):
  1924. Different settings of the controller.
  1925. (WebInspector.CodeMirrorTokenTrackingController.prototype.get tracking):
  1926. (WebInspector.CodeMirrorTokenTrackingController.prototype.get candidate):
  1927. Accessors for current state, but cannot be modified.
  1928. (WebInspector.CodeMirrorTokenTrackingController.prototype.startTracking):
  1929. (WebInspector.CodeMirrorTokenTrackingController.prototype.stopTracking):
  1930. (WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
  1931. (WebInspector.CodeMirrorTokenTrackingController.prototype.removeHighlightedRange):
  1932. API to make use of the tracker to start/stop/highlight.
  1933. (WebInspector.CodeMirrorTokenTrackingController.prototype.boundsForRange):
  1934. Helper for getting the bounds of a given codemirror text range.
  1935. (WebInspector.CodeMirrorTokenTrackingController.prototype.handleEvent):
  1936. (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedWithMarkedText):
  1937. (WebInspector.CodeMirrorTokenTrackingController.prototype._markedTextIsNoLongerHovered):
  1938. (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
  1939. (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOutOfEditor):
  1940. (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasPressedOverEditor):
  1941. (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
  1942. (WebInspector.CodeMirrorTokenTrackingController.prototype._windowLostFocus):
  1943. Events handled while tracking. Very few changes.
  1944. (WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
  1945. (WebInspector.CodeMirrorTokenTrackingController.prototype._processNonSymbolToken):
  1946. (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
  1947. When a token is hovered, create a candidate depending on the controller's mode.
  1948. * UserInterface/TextEditor.js:
  1949. (WebInspector.TextEditor):
  1950. (WebInspector.TextEditor.prototype.get tokenTrackingController):
  1951. Create and expose the tokenTrackingController.
  1952. * UserInterface/SourceCodeTextEditor.js:
  1953. (WebInspector.SourceCodeTextEditor):
  1954. (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved):
  1955. (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
  1956. (WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
  1957. (WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
  1958. (WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
  1959. (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
  1960. (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
  1961. (WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
  1962. (WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
  1963. (WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
  1964. (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerCanReleaseHighlightedRange):
  1965. (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
  1966. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
  1967. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
  1968. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
  1969. Switch to the tracking controller instead of TextEditor methods and properties.
  1970. * UserInterface/TextEditor.css:
  1971. (.text-editor > .CodeMirror .hovered-expression-highlight):
  1972. (@-webkit-keyframes text-editor-hovered-expression-highlight-fadeout):
  1973. Renamed the class name for expressions to have "expression" in the name.
  1974. 2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
  1975. <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
  1976. Introduce WebInspector.modifierKeys to know which modifier keys are
  1977. active at any time (command, option, shift). Trigger events on changes
  1978. through WebInspector.notifications.
  1979. Reviewed by Timothy Hatcher.
  1980. * UserInterface/Main.js:
  1981. (WebInspector.contentLoaded):
  1982. (WebInspector._updateModifierKeys):
  1983. (WebInspector._windowKeyDown):
  1984. (WebInspector._windowKeyUp):
  1985. * UserInterface/Object.js:
  1986. 2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
  1987. Do a little renaming on ResourceSidebarPanel show methods for text
  1988. ranges. This better matches the showSourceCodeLocation method names.
  1989. Reviewed by Timothy Hatcher.
  1990. * UserInterface/ResourceSidebarPanel.js:
  1991. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
  1992. (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
  1993. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
  1994. 2013-05-10 Timothy Hatcher <timothy@apple.com>
  1995. Make the console prompt suggest completions after typing "." or "[".
  1996. <rdar://problem/13860627> REGRESSION: Console autocompletion does not suggest anything until first character is typed
  1997. Reviewed by Joseph Pecoraro.
  1998. * UserInterface/CodeMirrorCompletionController.js:
  1999. (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
  2000. (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
  2001. (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
  2002. (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
  2003. 2013-05-09 Timothy Hatcher <timothy@apple.com>
  2004. Tell WebInspector.Resource about its type when it is created instead of changing it later.
  2005. This depends on: https://webkit.org/b/74935
  2006. <rdar://problem/13726105> Timeline network filters don't update as resources change type (74935)
  2007. Reviewed by David Kilzer.
  2008. * UserInterface/FrameResourceManager.js:
  2009. (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
  2010. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
  2011. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
  2012. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
  2013. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
  2014. * UserInterface/InspectorBackendCommands.js:
  2015. * UserInterface/NetworkObserver.js:
  2016. (WebInspector.NetworkObserver.prototype.requestWillBeSent):
  2017. 2013-05-09 Timothy Hatcher <timothy@apple.com>
  2018. Use a different image for the layer border toggle button.
  2019. <rdar://problem/13717886> Two layers buttons with different meanings
  2020. Reviewed by Joseph Pecoraro.
  2021. * UserInterface/DOMTreeContentView.js:
  2022. (WebInspector.DOMTreeContentView):
  2023. * UserInterface/Images/LayerBorders.pdf: Added.
  2024. 2013-05-08 Timothy Hatcher <timothy@apple.com>
  2025. Fix the heirarchical path components for unrevealed source map resources.
  2026. <rdar://problem/13681487> Missing heirarchical path components selecting breakpoints in source map resources in Debugger sidebar
  2027. Reviewed by Joseph Pecoraro.
  2028. * UserInterface/ResourceSidebarPanel.js:
  2029. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
  2030. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
  2031. Special case WebInspector.SourceMapResource.
  2032. * UserInterface/SourceCodeTreeElement.js:
  2033. (WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
  2034. Revert r50608.
  2035. 2013-05-07 Timothy Hatcher <timothy@apple.com>
  2036. Fix the background color for the Timeline navigation bar.
  2037. The container is taller than the navigation bar, and it used for mouse over slop.
  2038. So the background color needs to be on the navigation bar.
  2039. Reviewed by Joseph Pecoraro.
  2040. * UserInterface/TimelinesContentView.css:
  2041. (.content-view.timelines > .data-grid > .navigation-bar-container):
  2042. (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
  2043. 2013-05-07 Timothy Hatcher <timothy@apple.com>
  2044. Compare async resource types by their first timestamp so they are in chronological order.
  2045. <rdar://problem/13827118> Web Inspector: cannot see order of xhrs in resource inspector (115728)
  2046. Reviewed by Joseph Pecoraro.
  2047. * UserInterface/ResourceTreeElement.js:
  2048. (WebInspector.ResourceTreeElement.compareResourceTreeElements):
  2049. 2013-05-07 Timothy Hatcher <timothy@apple.com>
  2050. Fix and simplify the layout path for Toolbar.
  2051. <rdar://problem/13828232> REGRESSION: Toolbar overflows when using Icons and Text (Horizontal) mode
  2052. Reviewed by Joseph Pecoraro.
  2053. * UserInterface/Toolbar.css:
  2054. (.toolbar .control-section):
  2055. * UserInterface/Toolbar.js:
  2056. (WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
  2057. (WebInspector.Toolbar.prototype.customUpdateLayout):
  2058. 2013-05-07 Joseph Pecoraro <pecoraro@apple.com>
  2059. <rdar://problem/13821139> After deleting a node when remote inspecting, Web Inspector is broken
  2060. When using the remote inspector, there is enough of a delay between
  2061. messages that the didRemoveNode handler triggers the DOMTreeUpdater to
  2062. refresh the portion of the tree before this removeNodeCallback happens.
  2063. Since removeNodeCallback is asynchronous anyways, we should bail if
  2064. the tree element was already removed from the tree (has no parent).
  2065. Reviewed by Timothy Hatcher.
  2066. * UserInterface/DOMTreeElement.js:
  2067. (WebInspector.DOMTreeElement.prototype.remove.removeNodeCallback):
  2068. (WebInspector.DOMTreeElement.prototype.remove):
  2069. 2013-05-07 Joseph Pecoraro <pecoraro@apple.com>
  2070. Fix member name typo.
  2071. This was the only occurrence of _selectDOMNode. This looks
  2072. like it was just a typo of _selectedDOMNode.
  2073. Reviewed by Darin Adler.
  2074. * UserInterface/DOMTreeOutline.js:
  2075. (WebInspector.DOMTreeOutline):
  2076. 2013-05-07 Timothy Hatcher <timothy@apple.com>
  2077. Use a brighter blue for selected labels in the label-only toolbar mode.
  2078. This better matches the blue used in the selected toolbar icons.
  2079. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2080. Reviewed by Antoine Quint.
  2081. * UserInterface/ButtonToolbarItem.css:
  2082. (.toolbar.label-only .item.activate.button.activated > .label):
  2083. 2013-05-07 Timothy Hatcher <timothy@apple.com>
  2084. Only allow the LCD to be a single line, giving less difference between toolbar modes and sizes.
  2085. This better distributes the space in the LCD and makes it collapse down to 3 items when
  2086. there isn't enough room for all 6 items.
  2087. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2088. Reviewed by Antoine Quint.
  2089. * UserInterface/DashboardView.css:
  2090. (.toolbar .dashboard):
  2091. (body.nightly-build .toolbar .dashboard):
  2092. (body.nightly-build .toolbar.collapsed .dashboard):
  2093. (body:not(.nightly-build) .toolbar.collapsed .dashboard):
  2094. (body:not(.nightly-build) .toolbar.collapsed .dashboard > .logs):
  2095. (.toolbar .dashboard > .item):
  2096. (.toolbar .dashboard > .resourcesSize):
  2097. (.toolbar .dashboard > .item > div):
  2098. (.toolbar.normal-size.icon-and-label-vertical .dashboard):
  2099. (.toolbar.normal-size.icon-and-label-horizontal .dashboard > .item):
  2100. * UserInterface/DashboardView.js:
  2101. (WebInspector.DashboardView):
  2102. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2103. Update the LCD background to match Xcode 5.
  2104. This change is conditional to non-nightlies.
  2105. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2106. Reviewed by Joseph Pecoraro.
  2107. * UserInterface/DashboardView.css:
  2108. (.toolbar .dashboard):
  2109. (body:not(.nightly-build) .toolbar .dashboard):
  2110. (body.window-inactive:not(.nightly-build) .toolbar .dashboard):
  2111. (body.nightly-build .toolbar .dashboard):
  2112. (.toolbar .dashboard > .item):
  2113. (.toolbar.small-size.icon-and-label-horizontal .dashboard):
  2114. (body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard):
  2115. (.toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
  2116. (body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
  2117. (.toolbar.normal-size.icon-and-label-horizontal .dashboard):
  2118. (body.nightly-build .toolbar.normal-size.icon-and-label-horizontal .dashboard):
  2119. (.toolbar.small-size.icon-and-label-vertical .dashboard):
  2120. (body.nightly-build .toolbar.small-size.icon-and-label-vertical .dashboard):
  2121. (.toolbar.normal-size.icon-and-label-vertical .dashboard):
  2122. (body.nightly-build .toolbar.normal-size.icon-and-label-vertical .dashboard):
  2123. (.toolbar.icon-and-label-vertical .dashboard > .item):
  2124. (body.nightly-build .toolbar.icon-and-label-vertical .dashboard > .item):
  2125. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2126. Update the filter field placeholder in the Resources sidebar when showing search results.
  2127. Reviewed by Antoine Quint.
  2128. * Localizations/en.lproj/localizedStrings.js:
  2129. * UserInterface/ResourceSidebarPanel.js:
  2130. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2131. Always have the HierarchicalPathComponent take space so it gives the last item some padding.
  2132. Reviewed by Antoine Quint.
  2133. * UserInterface/HierarchicalPathComponent.css:
  2134. (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child > .separator):
  2135. Use visibility: hidden instead of display: none.
  2136. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2137. Make ScopeBarItem and RadioButtonNavigationItem have a min-width so when they are selected the bold
  2138. weight does not cause the item to change its width.
  2139. This adds some updateLayout calls to places that needed it now or were missing it already.
  2140. This change is not conditional to non-nightlies. It does no harm to always do this.
  2141. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2142. Reviewed by Antoine Quint.
  2143. * UserInterface/ButtonNavigationItem.js:
  2144. (WebInspector.ButtonNavigationItem.prototype.set label):
  2145. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  2146. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
  2147. * UserInterface/Main.js:
  2148. (WebInspector._contentBrowserSizeDidChange):
  2149. * UserInterface/RadioButtonNavigationItem.js:
  2150. (WebInspector.RadioButtonNavigationItem.prototype.get selected):
  2151. (WebInspector.RadioButtonNavigationItem.prototype.set selected):
  2152. (WebInspector.RadioButtonNavigationItem.prototype.get active):
  2153. (WebInspector.RadioButtonNavigationItem.prototype.set active):
  2154. (WebInspector.RadioButtonNavigationItem.prototype.updateLayout):
  2155. * UserInterface/ScopeBar.js:
  2156. (WebInspector.ScopeBar.prototype.updateLayout):
  2157. (WebInspector.ScopeBar.prototype._populate):
  2158. * UserInterface/TimelineDataGrid.js:
  2159. (WebInspector.TimelineDataGrid):
  2160. (WebInspector.TimelineDataGrid.prototype.updateLayout):
  2161. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2162. Show overflow shadow pockets in the navigation sidebar when content can scroll.
  2163. This change is conditional to non-nightlies.
  2164. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2165. Reviewed by Antoine Quint.
  2166. * UserInterface/NavigationSidebarPanel.css:
  2167. (.sidebar > .panel.navigation > .overflow-shadow):
  2168. (body.nightly-build .sidebar > .panel.navigation > .overflow-shadow):
  2169. (.sidebar > .panel.navigation > .overflow-shadow.top):
  2170. * UserInterface/NavigationSidebarPanel.js:
  2171. (WebInspector.NavigationSidebarPanel):
  2172. (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
  2173. (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
  2174. (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
  2175. (WebInspector.NavigationSidebarPanel.prototype.shown):
  2176. (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
  2177. (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
  2178. (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
  2179. (WebInspector.NavigationSidebarPanel.prototype._treeElementExpandedOrCollapsed):
  2180. * UserInterface/ResourceSidebarPanel.js:
  2181. (WebInspector.ResourceSidebarPanel):
  2182. * UserInterface/TreeOutline.js:
  2183. (TreeElement.prototype.collapse):
  2184. (TreeElement.prototype.expand):
  2185. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2186. Update focus and active focus generated images to match the blues used by Xcode 5.
  2187. This change is not conditional to non-nightlies. It shouldn't be too revealing.
  2188. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2189. Reviewed by Antoine Quint.
  2190. * UserInterface/ImageUtilities.js:
  2191. (.generateImage):
  2192. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2193. Update styles to match the majority of Xcode 5's design changes.
  2194. The style changes are conditional so they wont apply when running a WebKit nightly.
  2195. After WWDC we can remove the condition and the extra style rules this adds.
  2196. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2197. Rubber-stamped by Antoine Quint.
  2198. * UserInterface/ButtonNavigationItem.css:
  2199. (.navigation-bar .item.button.text-only):
  2200. (body.nightly .navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
  2201. * UserInterface/CodeMirrorOverrides.css:
  2202. (.CodeMirror .CodeMirror-gutters):
  2203. (.body.nightly-build .CodeMirror .CodeMirror-gutters):
  2204. (.CodeMirror .CodeMirror-linenumber):
  2205. * UserInterface/DetailsSection.css:
  2206. (.details-section > .header):
  2207. (.details-section .details-section > .header):
  2208. (body.nightly-build .details-section > .header):
  2209. (body.nightly-build .details-section .details-section > .header):
  2210. * UserInterface/DividerNavigationItem.css:
  2211. (.navigation-bar .item.divider):
  2212. (body.nightly .navigation-bar .item.divider):
  2213. * UserInterface/FilterBar.css:
  2214. (.filter-bar):
  2215. (body.nightly-build .filter-bar):
  2216. (body:not(.nightly-build) .filter-bar > input[type="search"]):
  2217. (body:not(.nightly-build) .filter-bar > input[type="search"]::-webkit-input-placeholder):
  2218. (body:not(.nightly-build) .filter-bar > input[type="search"]:valid):
  2219. * UserInterface/FilterBar.js:
  2220. (WebInspector.FilterBar):
  2221. * UserInterface/FindBanner.css:
  2222. (body.nightly-build .find-banner):
  2223. (body:not(.nightly) .find-banner > input[type="search"]):
  2224. (body:not(.nightly) .find-banner > button):
  2225. (.find-banner > button > .glyph):
  2226. (body.nightly .find-banner > button > .glyph):
  2227. * UserInterface/HierarchicalPathComponent.css:
  2228. (body.nightly .hierarchical-path-component > .separator):
  2229. (.hierarchical-path-component.text-only > select):
  2230. * UserInterface/InstrumentSidebarPanel.css:
  2231. (.sidebar > .panel.instrument > .title-bar):
  2232. (body.nightly-build .sidebar > .panel.instrument > .title-bar):
  2233. (.sidebar > .panel.instrument > .title-bar.profiles):
  2234. (body.nightly-build .sidebar > .panel.instrument > .title-bar.profiles):
  2235. * UserInterface/LayerTreeSidebarPanel.css:
  2236. (.layer-tree.panel .bottom-bar):
  2237. (body.nightly-build .layer-tree.panel .bottom-bar):
  2238. * UserInterface/Main.css:
  2239. (#split-content-browser > .navigation-bar):
  2240. (body.nightly-build #split-content-browser > .navigation-bar):
  2241. * UserInterface/NavigationBar.css:
  2242. (.navigation-bar):
  2243. (body.nightly-build .navigation-bar):
  2244. (body.nightly-build.window-inactive .navigation-bar):
  2245. * UserInterface/NavigationSidebarPanel.css:
  2246. (.sidebar > .panel.navigation > .content):
  2247. (body.nightly-build .sidebar > .panel.navigation > .content):
  2248. (.sidebar > .panel.navigation > .overflow-shadow):
  2249. (.sidebar > .panel.navigation > .overflow-shadow.top):
  2250. * UserInterface/RadioButtonNavigationItem.css:
  2251. (.navigation-bar .item.radio.button.text-only.selected):
  2252. (body:not(.nightly) .navigation-bar .item.radio.button.text-only.selected):
  2253. (body.nightly .navigation-bar .item.radio.button.selected):
  2254. * UserInterface/ResourceSidebarPanel.css:
  2255. (.sidebar > .panel.resource > .empty-content-placeholder):
  2256. (body.nightly-build .sidebar > .panel.resource > .empty-content-placeholder):
  2257. (.sidebar > .panel.resource > .search-bar):
  2258. (body.nightly-build .sidebar > .panel.resource > .search-bar):
  2259. * UserInterface/ResourceSidebarPanel.js:
  2260. (WebInspector.ResourceSidebarPanel):
  2261. * UserInterface/ScopeBar.css:
  2262. (.scope-bar > li):
  2263. (body:not(.nightly-build) .scope-bar > li):
  2264. (body:not(.nightly-build) .scope-bar > li:active):
  2265. (body:not(.nightly-build) .scope-bar > li.selected):
  2266. (body.nightly-build .scope-bar > li):
  2267. (body.nightly-build .scope-bar > li:active):
  2268. (.scope-bar > li:hover):
  2269. (.scope-bar > li.selected):
  2270. (.scope-bar > li:active):
  2271. (body.nightly-build .scope-bar > li.selected):
  2272. * UserInterface/SearchBar.css:
  2273. (.search-bar > input[type="search"]):
  2274. (body:not(.nightly-build) .search-bar > input[type="search"]):
  2275. (body:not(.nightly-build) .search-bar > input[type="search"]::-webkit-input-placeholder):
  2276. (body:not(.nightly-build) .search-bar > input[type="search"]:valid):
  2277. * UserInterface/SearchBar.js:
  2278. (WebInspector.SearchBar):
  2279. * UserInterface/TimelinesContentView.css:
  2280. (.content-view.timelines > .data-grid):
  2281. (body.nightly-build .content-view.timelines > .data-grid):
  2282. (.content-view.timelines > .data-grid th):
  2283. (body.nightly-build .content-view.timelines > .data-grid th):
  2284. (.content-view.timelines > .data-grid th:not(:last-child)):
  2285. (body.nightly-build .content-view.timelines > .data-grid th:not(:last-child)):
  2286. (.content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
  2287. (body.nightly-build .content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
  2288. (.content-view.timelines > .data-grid th.sort-descending):
  2289. (body.nightly-build .content-view.timelines > .data-grid th.sort-descending):
  2290. (.content-view.timelines > .data-grid > .navigation-bar-container):
  2291. (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
  2292. (body.nightly-build .content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
  2293. 2013-05-06 Timothy Hatcher <timothy@apple.com>
  2294. Add a nightly-build class so we can hide new UI from nightly WebKit builds.
  2295. Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
  2296. Reviewed by Antoine Quint.
  2297. * UserInterface/Main.js:
  2298. (WebInspector.contentLoaded):
  2299. Set the nightly-build class on body if we are in a nightly build.
  2300. 2013-05-03 Timothy Hatcher <timothy@apple.com>
  2301. Add stubs for savedURL and appendedToURL.
  2302. https://webkit.org/b/115561
  2303. rdar://problem/13806055
  2304. Reviewed by Joseph Pecoraro.
  2305. * UserInterface/InspectorFrontendAPI.js:
  2306. (InspectorFrontendAPI.savedURL):
  2307. (InspectorFrontendAPI.appendedToURL):
  2308. 2013-05-02 Timothy Hatcher <timothy@apple.com>
  2309. Fix the alignment of the titles in the Timelines sidebar.
  2310. Reviewed by Joseph Pecoraro.
  2311. * UserInterface/GeneralTreeElement.js:
  2312. (WebInspector.GeneralTreeElement.prototype._updateTitleElements):
  2313. Only create a subtitle if the string has a value, not an empty string.
  2314. 2013-05-01 Timothy Hatcher <timothy@apple.com>
  2315. Make the Dashboard timer and Timeline views more robust when going back/forward.
  2316. <rdar://problem/13612025> Dashboard: LCD timer never stops when going back/forward
  2317. <rdar://problem/13180009> Recording sometimes never stops because the load event marker is never added
  2318. <rdar://problem/13510955> Intermittently, timeline is in "days" after refreshing wsj.com site
  2319. Reviewed by Antoine Quint.
  2320. * UserInterface/DashboardManager.js:
  2321. (WebInspector.DashboardManager):
  2322. (WebInspector.DashboardManager.prototype._mainResourceDidChange):
  2323. (WebInspector.DashboardManager.prototype._recordingStopped):
  2324. (WebInspector.DashboardManager.prototype._startUpdatingTime):
  2325. (WebInspector.DashboardManager.prototype._stopUpdatingTime): Added.
  2326. (WebInspector.DashboardManager.prototype._updateTime):
  2327. * UserInterface/NetworkGraphCalculator.js:
  2328. (WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
  2329. (WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
  2330. (WebInspector.NetworkTransferDurationCalculator.prototype._upperBound):
  2331. Don't return NaN for the bounds.
  2332. * UserInterface/Resource.js:
  2333. (WebInspector.Resource.prototype.get firstTimestamp): Added.
  2334. Added as a helper to prevent using NaN as the start time.
  2335. * UserInterface/ResourceTimelineRecord.js:
  2336. (WebInspector.ResourceTimelineRecord.prototype.get startTime):
  2337. Use firstTimestamp.
  2338. * UserInterface/TimelineManager.js:
  2339. (WebInspector.TimelineManager.prototype.startRecording):
  2340. (WebInspector.TimelineManager.prototype.stopRecording):
  2341. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  2342. (WebInspector.TimelineManager.prototype.eventRecorded):
  2343. (WebInspector.TimelineManager.prototype._clear):
  2344. (WebInspector.TimelineManager.prototype._addRecord):
  2345. (WebInspector.TimelineManager.prototype._startAutoRecording):
  2346. (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
  2347. (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
  2348. (WebInspector.TimelineManager.prototype._mainResourceDidChange):
  2349. Fire an event on clear so the timeline view clears even if recording does not start.
  2350. Track the main resource object and not the request identifier, since a resource
  2351. might not have a request identifier in the back/forward case. Auto stop recording soon
  2352. after every record, not just the load event since we don't always have load events.
  2353. * UserInterface/TimelinesContentView.js:
  2354. (WebInspector.TimelinesContentView):
  2355. (WebInspector.TimelinesContentView.prototype._recordsCleared):
  2356. Use RecordsCleared event instead of RecordingStarted to clear the view.
  2357. 2013-05-01 Timothy Hatcher <timothy@apple.com>
  2358. Reveal the line (if supplied) when showing a ScriptContentView.
  2359. <rdar://problem/13785027> REGRESSION: Extra Scripts: no autoscroll to debugger statement.
  2360. Reviewed by Joseph Pecoraro.
  2361. * UserInterface/ResourceSidebarPanel.js:
  2362. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
  2363. 2013-05-01 Timothy Hatcher <timothy@apple.com>
  2364. Don't update the dashboard text unless it has changed.
  2365. Also step up the interval we update the time so it does not try to update every 50ms when the
  2366. duration is long enough to not matter.
  2367. <rdar://problem/13718056> While JS debugging, everything in the inspector window is repainting all the time
  2368. Reviewed by Joseph Pecoraro.
  2369. * UserInterface/DashboardManager.js:
  2370. (WebInspector.DashboardManager.prototype._startUpdatingTime):
  2371. (WebInspector.DashboardManager.prototype._updateTime):
  2372. * UserInterface/DashboardView.js:
  2373. (WebInspector.DashboardView.prototype.set logs):
  2374. (WebInspector.DashboardView.prototype.set issues):
  2375. (WebInspector.DashboardView.prototype.set errors):
  2376. (WebInspector.DashboardView.prototype.set time):
  2377. (WebInspector.DashboardView.prototype.set resourcesCount):
  2378. (WebInspector.DashboardView.prototype.set resourcesSize):
  2379. (WebInspector.DashboardView.prototype._appendElementForNamedItem.):
  2380. 2013-05-01 Timothy Hatcher <timothy@apple.com>
  2381. Breakpoint context menu items should appear for Extra and Anonymous Scripts.
  2382. <rdar://problem/13776299>
  2383. Reviewed by Joseph Pecoraro.
  2384. * UserInterface/DebuggerSidebarPanel.js:
  2385. (WebInspector.DebuggerSidebarPanel.prototype._breakpointsBeneathTreeElement):
  2386. (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
  2387. (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
  2388. Check for WebInspector.ScriptTreeElement in addition to WebInspector.ResourceTreeElement.
  2389. 2013-04-30 Timothy Hatcher <timothy@apple.com>
  2390. Disable spellcheck and smart quotes in the console prompt.
  2391. I'll upstream this to CodeMirror once I get approval from legal.
  2392. <rdar://problem/13757709>
  2393. Reviewed by Ricky Mondello.
  2394. * UserInterface/External/CodeMirror/codemirror.js:
  2395. (window.CodeMirror):
  2396. 2013-04-30 Timothy Hatcher <timothy@apple.com>
  2397. Tweak the Toolbar layout code to not hide the Dashboard when sizes are off by one.
  2398. This wasn't needed when sub-pixel layout was on, but that was disabled in http://webkit.org/b/149209.
  2399. <rdar://problem/13757354> REGRESSION: Toolbar thinks it is collapsed, so dashboard is hidden
  2400. Reviewed by Joseph Pecoraro.
  2401. * UserInterface/Toolbar.js:
  2402. (WebInspector.Toolbar.prototype.customUpdateLayout):
  2403. 2013-04-30 Timothy Hatcher <timothy@apple.com>
  2404. Have dashboard buttons (console summary buttons) do filtering as well.
  2405. <rdar://problem/13685685>
  2406. Reviewed by Joseph Pecoraro.
  2407. * UserInterface/DashboardView.js:
  2408. (WebInspector.DashboardView):
  2409. (WebInspector.DashboardView.prototype._consoleItemWasClicked):
  2410. * UserInterface/LogContentView.js:
  2411. (WebInspector.LogContentView.prototype.get scopeBar):
  2412. * UserInterface/Main.js:
  2413. (WebInspector.showFullHeightConsole):
  2414. (WebInspector.showConsoleView):
  2415. 2013-04-30 Joseph Pecoraro <pecoraro@apple.com>
  2416. <rdar://problem/12719925> Call stack should show live line number next to file name
  2417. Reviewed by Timothy Hatcher.
  2418. * UserInterface/GeneralTreeElement.js:
  2419. (WebInspector.GeneralTreeElement):
  2420. (WebInspector.GeneralTreeElement.prototype.get tooltipHandledSeparately):
  2421. (WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
  2422. (WebInspector.GeneralTreeElement.prototype._updateTitleElements):
  2423. Allow clients to handle the tooltip themselves, and to set subtitle as
  2424. an element, instead of a string (already possible with mainTitle).
  2425. * UserInterface/CallFrameTreeElement.js:
  2426. (WebInspector.CallFrameTreeElement):
  2427. Set the subtitle as a live location <span>.
  2428. (WebInspector.CallFrameTreeElement.prototype.onattach):
  2429. Set the tooltip on the entire tree element once it is created.
  2430. * UserInterface/SourceCodeLocation.js:
  2431. (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip):
  2432. Allow an optional prefix before the location string.
  2433. 2013-04-29 Timothy Hatcher <timothy@apple.com>
  2434. Remove an assert from StyleDetailsPanel.prototype.shown.
  2435. The shown function can be called multiple times. Just keep the early return.
  2436. Also make sure to call StyleDetailsPanel.prototype.hidden in another case.
  2437. Reviewed by Joseph Pecoraro.
  2438. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  2439. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
  2440. * UserInterface/StyleDetailsPanel.js:
  2441. (WebInspector.StyleDetailsPanel.prototype.shown):
  2442. 2013-04-29 Timothy Hatcher <timothy@apple.com>
  2443. Skip invalid properties when associating related properties.
  2444. <rdar://problem/13752586> DOMNodeStyles.js:981: console.assert(property.overridden); on html5please.com
  2445. Reviewed by Joseph Pecoraro.
  2446. * UserInterface/DOMNodeStyles.js:
  2447. (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties):
  2448. 2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
  2449. Don't allow Command+Enter in the Console with an empty expression.
  2450. Reviewed by Timothy Hatcher.
  2451. * UserInterface/ConsolePrompt.js:
  2452. 2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
  2453. <rdar://problem/13616567> Can no longer clear the console with clear()
  2454. LogContentView starts listening for an event in the constructor which
  2455. was getting removed in close and not being added back. This ContentView
  2456. is already treated like a singleton with other events, treat this the
  2457. same and just avoid removing event listeners in close.
  2458. Reviewed by Timothy Hatcher.
  2459. * UserInterface/LogContentView.js:
  2460. 2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
  2461. <rdar://problem/13765474> REGRESSION: Console should not clear on reload
  2462. The backend sends the frontend a messagesCleared messages for many reasons.
  2463. We should not clear the active log when there was a navigation. In those
  2464. cases the LogManager will send out a Cleared or SessionStarted event.
  2465. It would be messy and brittle to determine if we are in the middle of a
  2466. main resource load, so it is easier to do a setTimeout and send an event
  2467. if we did not do a navigation.
  2468. This works well with all common cases, but breaks:
  2469. js> console.log(1); console.clear(); console.log(2);
  2470. Filed the follow-up bug to handle fixing this by providing the frontend
  2471. with the information it needs in messagesCleared.
  2472. Reviewed by Timothy Hatcher.
  2473. * UserInterface/ConsoleObserver.js:
  2474. (WebInspector.ConsoleObserver.prototype.messageAdded):
  2475. Don't append a blank ConsoleMessage row for console.clear messages.
  2476. * UserInterface/LogManager.js:
  2477. (WebInspector.LogManager.prototype.messagesCleared):
  2478. (WebInspector.LogManager.prototype._mainResourceDidChange):
  2479. Defer ActiveLogCleared events so that we don't issue one while we
  2480. are reloading the page.
  2481. 2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
  2482. <rdar://problem/13764663> Tooltips on live location links are no longer working
  2483. Changing the content in mousemove, even if the content was the same,
  2484. would cause the tooltip to disappear. Avoid changing the content unless
  2485. we absolutely need to.
  2486. Reviewed by Timothy Hatcher.
  2487. * UserInterface/SourceCodeLocation.js:
  2488. (WebInspector.SourceCodeLocation.prototype.updateDisplayString):
  2489. Avoid unnecessary content updates.
  2490. (WebInspector.SourceCodeLocation.prototype._locationString):
  2491. Fix typo causing column numbers to not show up in tooltips.
  2492. 2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
  2493. <rdar://problem/13763988> Jump to "rs.js" error location link not live on theverge.com
  2494. The URL in the ConsoleMessage is the URL of the Script, which contains
  2495. a fragment. The URL of the Resource does not contain the fragment. When
  2496. we create a sourceCodeLocation in linkifyLocation we want to get the
  2497. resource that has a sidebar item, because that is the resource in the
  2498. sidebar that will show a ContentView. So if we get a Script try to get
  2499. the Resource for that Script if one exists.
  2500. Reviewed by Timothy Hatcher.
  2501. * UserInterface/Main.js:
  2502. (WebInspector.linkifyLocation):
  2503. 2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
  2504. <rdar://problem/13442566> Console context selector should truncate or generate better names when the names are long
  2505. Truncate the context selector quick console nav bar item. And modify
  2506. how items are sorted in the context menu to show the frame name if one
  2507. is available.
  2508. Reviewed by Timothy Hatcher.
  2509. * UserInterface/HierarchicalPathComponent.js:
  2510. (WebInspector.HierarchicalPathComponent):
  2511. (WebInspector.HierarchicalPathComponent.prototype.get displayName):
  2512. (WebInspector.HierarchicalPathComponent.prototype.set displayName):
  2513. (WebInspector.HierarchicalPathComponent.prototype.get truncatedDisplayNameLength):
  2514. (WebInspector.HierarchicalPathComponent.prototype.set truncatedDisplayNameLength):
  2515. Separate the display name property from the title element's content, so we
  2516. can truncate the display but store the real name.
  2517. (WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText):
  2518. Truncate the display in the navigation bar.
  2519. (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption):
  2520. (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement):
  2521. Work around an NSMenu issue and truncate in the option text in the context menu.
  2522. * UserInterface/QuickConsole.js:
  2523. (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
  2524. (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
  2525. (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
  2526. Set the Frame on the PathComponents to use later for sorting.
  2527. 2013-04-29 Timothy Hatcher <timothy@apple.com>
  2528. Abort earlier when loading completions for a null or undefined value.
  2529. <rdar://problem/13764611> JavaScriptLogViewController.js:293: CONSOLEAPI ERROR: Unknown result type: undefined
  2530. Reviewed by Joseph Pecoraro.
  2531. * UserInterface/JavaScriptLogViewController.js:
  2532. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
  2533. Return early if the RemoteObject is null or undefined. Also release the completion group.
  2534. 2013-04-29 Timothy Hatcher <timothy@apple.com>
  2535. Correct the layout of navigation items when an item has selector arrows.
  2536. <rdar://problem/13717922> Layer border toggle button disappears sometimes
  2537. Reviewed by Joseph Pecoraro.
  2538. * UserInterface/HierarchicalPathComponent.js:
  2539. (WebInspector.HierarchicalPathComponent):
  2540. (WebInspector.HierarchicalPathComponent.prototype.get minimumWidth): Added.
  2541. (WebInspector.HierarchicalPathComponent.prototype.set forcedWidth):
  2542. (WebInspector.HierarchicalPathComponent.prototype.get selectorArrows): Added.
  2543. (WebInspector.HierarchicalPathComponent.prototype.set selectorArrows): Added.
  2544. Account for the width of the selector arrows when using minimum width.
  2545. * UserInterface/HierarchicalPathNavigationItem.js:
  2546. (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
  2547. Ask HierarchicalPathComponent for its minimum width.
  2548. * UserInterface/NavigationBar.js:
  2549. (WebInspector.NavigationBar.prototype.updateLayout):
  2550. Skip flexible space items since they can take up no space at the minimum width.
  2551. 2013-04-27 Dean Jackson <dino@apple.com>
  2552. <rdar://problem/13441708> Make the Web Inspector work if HiDPI canvas is disabled on OS X
  2553. Reviewed by Tim Hatcher.
  2554. For <rdar://problem/13437328>, HIGH_DPI_CANVAS was disabled on retina devices, so
  2555. the places in the inspector that use a canvas must double the dimensions of
  2556. the image buffers they request.
  2557. * UserInterface/DashboardView.css:
  2558. (.toolbar .dashboard): Since the image being pased in as background might be 2x,
  2559. make sure that it uses the element size for the background.
  2560. * UserInterface/DashboardView.js: Request a 2x canvas if necessary.
  2561. * UserInterface/ImageUtilities.js:
  2562. (generateColoredImage): No need to pass in scale, as this method is passed the
  2563. correct width and height the caller needs. Use get/setImageData methods.
  2564. (generateColoredImagesForCSS): Calculate a scaledWidth/Height to be used throughout
  2565. this method. Make sure we create contexts with the correct dimensions, and save/restore
  2566. them at full size.
  2567. (._drawImageShadow): Use scaledWidth/Height.
  2568. (._invertMaskImage): No need to pass in width and height..
  2569. (._applyImageMask): Ditto.
  2570. (generateEmbossedImages): Calculate a scaledWidth/Height to be used throughout
  2571. this method. Make sure we create contexts with the correct dimensions.
  2572. * UserInterface/Popover.js:
  2573. (WebInspector.Popover.prototype.set frame): Make sure to set the background size when
  2574. the frame is updated.
  2575. (WebInspector.Popover.prototype._drawBackground): Create a correctly scaled canvas,
  2576. and some minor code cleanup.
  2577. 2013-04-27 Timothy Hatcher <timothy@apple.com>
  2578. Fix the speed of typing in the Web Inspector.
  2579. ToggleControlToolbarItem regenerates its images every time 'toggled' is set, even
  2580. if the flag does not change! And the dock button updates 'toggled' on keydown and
  2581. keyup to update when Option is pressed.
  2582. <rdar://problem/13756496> REGRESSION: Dock/undock buttons regenerates ever keydown and keyup!
  2583. Reviewed by Dean Jackson.
  2584. * UserInterface/ToggleButtonNavigationItem.js:
  2585. (WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Return early if flag does not change.
  2586. 2013-04-27 Joseph Pecoraro <pecoraro@apple.com>
  2587. <rdar://problem/13143692> Object literal properties should not have popovers
  2588. Given test:
  2589. var foo = 300, o = { foo: 1 };
  2590. var result = o.foo;
  2591. This patch makes it so hovering "foo" in the object literal does not
  2592. show a popover, it used to show 300. While hovering the variable "foo"
  2593. or hovering the property access "o.foo" both show expected values.
  2594. Reviewed by Timothy Hatcher.
  2595. * UserInterface/TextEditor.js:
  2596. (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
  2597. If we are hovering a JavaScript token inside of a <script> in HTML resources
  2598. then the JavaScript state is actually token.state.localState. If it is in
  2599. a JavaScript resource then it is just token.state. Pass the most specific
  2600. state on our partial "token" object.
  2601. (WebInspector.TextEditor.prototype._checkHoveredToken):
  2602. Bail for JavaScript object literal properties.
  2603. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2604. <rdar://problem/13753106> SourceCodeTextEditor.js:815: JS ERROR: TypeError: undefined is not an object (evaluating this.hoveredToken.bounds)
  2605. We have a complete token in tokenWasHovered, however between then and
  2606. when the async DebuggerAgent.evaluateOnCallFrame callback happens the
  2607. hovered token can change. If it changed, bail, so we don't end up
  2608. trying to put the popover on the wrong hovered token or worse
  2609. hit this exception and break execution.
  2610. Reviewed by Timothy Hatcher.
  2611. * UserInterface/SourceCodeTextEditor.js:
  2612. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
  2613. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
  2614. (WebInspector.SourceCodeTextEditor.prototype._showPopover):
  2615. Add asserts and preventative bails in multiple places to catch
  2616. similar issues in the future if new paths are added.
  2617. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2618. <rdar://problem/13746094> Esc inside a read only editor (JavaScript) should not bring up completion suggestions
  2619. Pass on "Esc" if the editor is read only.
  2620. Reviewed by Timothy Hatcher.
  2621. * UserInterface/CodeMirrorCompletionController.js:
  2622. (WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
  2623. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2624. <rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
  2625. <rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
  2626. Make the ConsoleMessage and Profiler links live when possible. Create
  2627. a live link with createSourceCodeLocationLink or linkifyLocation.
  2628. ConsoleMessages's have line and column information now both at the
  2629. base and in stack traces. Profiler nodes don't have column info, but we
  2630. can still make them live, just not entirely accurate.
  2631. Reviewed by Timothy Hatcher.
  2632. * UserInterface/ConsoleMessageImpl.js:
  2633. (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
  2634. (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
  2635. Use WebInspector.linkifyLocation with url, line, and column.
  2636. * UserInterface/Main.js:
  2637. (.showSourceCodeLocation):
  2638. (WebInspector.createSourceCodeLocationLink):
  2639. (WebInspector.linkifyLocation):
  2640. If we have the resource with url passed into linkifyLocation
  2641. it creates a link with a sourceCodeLocation. Otherwise it just
  2642. creates a basic link with the appropriate styles.
  2643. * UserInterface/CSSSelectorProfileView.js:
  2644. (WebInspector.CSSSelectorDataGridNode.prototype.createCell):
  2645. (WebInspector.CSSSelectorDataGridNode.prototype._linkifyLocation):
  2646. * UserInterface/ProfileDataGridTree.js:
  2647. (WebInspector.ProfileDataGridNode.prototype._linkifyLocation):
  2648. Use WebInspector.linkifyLocation with url and lineNumber. Add
  2649. a FIXME about the missing column number.
  2650. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2651. <rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
  2652. <rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
  2653. Give ConsoleMessage a column number. The backend now sends us this info.
  2654. Reviewed by Timothy Hatcher.
  2655. * UserInterface/ConsoleCommandResult.js:
  2656. (WebInspector.ConsoleCommandResult):
  2657. * UserInterface/ConsoleMessage.js:
  2658. (WebInspector.ConsoleMessage):
  2659. (WebInspector.ConsoleMessage.create):
  2660. * UserInterface/ConsoleMessageImpl.js:
  2661. (WebInspector.ConsoleMessageImpl):
  2662. (WebInspector.ConsoleMessageImpl.prototype.get levelString):
  2663. * UserInterface/ConsoleObserver.js:
  2664. (WebInspector.ConsoleObserver.prototype.messageAdded):
  2665. * UserInterface/LogManager.js:
  2666. (WebInspector.LogManager.prototype.messageWasAdded):
  2667. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2668. <rdar://problem/13745104> First revealLine to SourceMapResource lineNumber is not working
  2669. SourceMapResource's may lazily load their data. In such cases the
  2670. ContentView for the resource will be Generic and ignore the revealLine.
  2671. Once loaded, the Generic ContentView will be replaced by a better view,
  2672. but the line number to reveal has been lost. Save that information in
  2673. the cluster content view, as long as the resource has not finished,
  2674. and pass it on to the new content view when the resource finishes.
  2675. Reviewed by Timothy Hatcher.
  2676. * UserInterface/SourceMapResource.js:
  2677. (WebInspector.SourceMapResource.prototype.requestContentFromBackend):
  2678. Mark as finished after updating types.
  2679. * UserInterface/ResourceClusterContentView.js:
  2680. (WebInspector.ResourceClusterContentView.prototype.showResponse):
  2681. (WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
  2682. (WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
  2683. If a revealLine comes in for a resource not yet finished loading, replay
  2684. the reveal line when the resource does finish. If subsequent reveals come
  2685. in, the most recent one wins.
  2686. * UserInterface/TextEditor.js:
  2687. (WebInspector.TextEditor._prettyPrint.prettyPrintAndUpdateEditor):
  2688. When a file is formatted we updated the delayed line number to reveal, but
  2689. didn't update the delayed text range to select. Do that just in case.
  2690. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2691. <rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
  2692. When hovering a link with Command we are showing the original,
  2693. unformatted location. So make sure that when clicked we jump
  2694. to that exact, unformatted location.
  2695. Reviewed by Timothy Hatcher.
  2696. * UserInterface/Main.js:
  2697. (WebInspector.createGoToArrowButton):
  2698. Handle Command+Click to jump to an unformatted location.
  2699. * UserInterface/ResourceSidebarPanel.js:
  2700. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
  2701. (WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
  2702. Allow showing a source code that forces unformatting.
  2703. * UserInterface/TextEditor.js:
  2704. (WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
  2705. (WebInspector.TextEditor.prototype.revealLine):
  2706. May need to unformat the resource before revealing the line.
  2707. * UserInterface/FrameContentView.js:
  2708. (WebInspector.FrameContentView.prototype.showSourceCode):
  2709. * UserInterface/ResourceClusterContentView.js:
  2710. (WebInspector.ResourceClusterContentView.prototype.showResponse):
  2711. * UserInterface/ScriptContentView.js:
  2712. (WebInspector.ScriptContentView.prototype.revealLine):
  2713. * UserInterface/TextContentView.js:
  2714. (WebInspector.TextContentView.prototype.revealLine):
  2715. * UserInterface/TextResourceContentView.js:
  2716. (WebInspector.TextResourceContentView.prototype.revealLine):
  2717. Pass the forceUnformat option through revealLine paths.
  2718. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2719. <rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
  2720. Update the rules for a live location display.
  2721. - Show display location by default if there is one.
  2722. - Show display locations in italics, original locations display non-italics.
  2723. - Command+Mouseover a display location will show the original location.
  2724. - Provide different display styles for column numbers. Default to "OnlyIfLarge"
  2725. meaning only show column numbers if the column is > 80.
  2726. Reviewed by Timothy Hatcher.
  2727. * UserInterface/CallFrameTreeElement.js:
  2728. (WebInspector.CallFrameTreeElement):
  2729. Simplify by using SourceCodeLocation.prototype.tooltipString.
  2730. * UserInterface/SourceCodeLocation.js:
  2731. (WebInspector.SourceCodeLocation.prototype.originalLocationString):
  2732. (WebInspector.SourceCodeLocation.prototype.formattedLocationString):
  2733. (WebInspector.SourceCodeLocation.prototype.displayLocationString):
  2734. Add the new column style parameter. Pass it through to _locationString.
  2735. (WebInspector.SourceCodeLocation.prototype.tooltipString):
  2736. Always show full URLs and columns in tooltips.
  2737. (WebInspector.SourceCodeLocation.prototype._locationString):
  2738. Respect the column style when including column numbers.
  2739. (WebInspector.SourceCodeLocation.prototype.updateDisplayString):
  2740. (WebInspector.SourceCodeLocation.prototype.mouseOverOrMove):
  2741. (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
  2742. Update the default value to displayLocation. And the Command+Mouseover to originalLocation.
  2743. 2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
  2744. <rdar://problem/13701576> SASS source map location is wrong on http://html5please.com
  2745. CSSRule.selectorList.range has column information, which allows us to
  2746. provide a much better location to jump to. So when selectorList and
  2747. its SourceRange is available, use that for its start line and column.
  2748. Fallback to the CSSRule.sourceLine which is always available.
  2749. Reviewed by Timothy Hatcher.
  2750. * UserInterface/DOMNodeStyles.js:
  2751. (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
  2752. 2013-04-26 Timothy Hatcher <timothy@apple.com>
  2753. Update CodeMirror from 3.11+ to 3.12.
  2754. * UserInterface/External/CodeMirror/clojure.js: Updated.
  2755. * UserInterface/External/CodeMirror/codemirror.js: Updated.
  2756. * UserInterface/External/CodeMirror/javascript.js: Updated.
  2757. * UserInterface/External/CodeMirror/searchcursor.js: Updated.
  2758. * UserInterface/External/CodeMirror/sql.js: Updated.
  2759. 2013-04-26 Timothy Hatcher <timothy@apple.com>
  2760. Make completions work after open brackets.
  2761. This also improves things to limit keywords to certain contexts.
  2762. <rdar://problem/13746491> Should have JavaScript completion suggestions after a base of all open bracket characters, e.g. "if (tr|"
  2763. Reviewed by Joseph Pecoraro.
  2764. * UserInterface/CodeMirrorCompletionController.js:
  2765. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
  2766. * UserInterface/JavaScriptLogViewController.js:
  2767. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
  2768. 2013-04-26 Timothy Hatcher <timothy@apple.com>
  2769. Improve multi-line support in the console prompt.
  2770. Pressing return at the end of the expression now does a parse to see if the expression
  2771. is ready to evaluate. We will insert a new line if the error is recoverable, otherwise
  2772. we will evaluate it. Pressing enter will insert a new line when there is no text, when
  2773. the cursor is not at the last position or there is a selection. Command-Enter will now
  2774. always evaluate the expression.
  2775. <rdar://problem/13747367>
  2776. Reviewed by Joseph Pecoraro.
  2777. * UserInterface/ConsolePrompt.js:
  2778. (WebInspector.ConsolePrompt):
  2779. (WebInspector.ConsolePrompt.prototype._handleEnterKey.positionsEqual): Added.
  2780. (WebInspector.ConsolePrompt.prototype._handleEnterKey.commitTextOrInsertNewLine): Added.
  2781. (WebInspector.ConsolePrompt.prototype._handleEnterKey):
  2782. (WebInspector.ConsolePrompt.prototype._handleCommandEnterKey):
  2783. * UserInterface/InspectorBackendCommands.js:
  2784. * UserInterface/JavaScriptLogViewController.js:
  2785. (WebInspector.JavaScriptLogViewController.prototype.):
  2786. (WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText):
  2787. 2013-04-25 Timothy Hatcher <timothy@apple.com>
  2788. Fix some edge cases with the default JavaScript completions.
  2789. Reviewed by Joseph Pecoraro.
  2790. * UserInterface/CodeMirrorCompletionController.js:
  2791. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
  2792. Correct the check for switch statements which was missing the "type" parts. Use "info"
  2793. instead to check for "switch". Substring the suffix, since there are cases it can be longer.
  2794. Also prevent keyword completions in var declarations, except for "this".
  2795. 2013-04-25 Timothy Hatcher <timothy@apple.com>
  2796. Properly handle duplicate query parameters and form encoded POST data.
  2797. <rdar://problem/13737105> Duplicate query parameters only show the last item in the sidebar data grids
  2798. Reviewed by Joseph Pecoraro.
  2799. * UserInterface/ResourceDetailsSidebarPanel.js:
  2800. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
  2801. (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
  2802. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
  2803. Pass true to parseQueryString to get an array of name/value pairs. Then build
  2804. the DataGrid using that result.
  2805. * UserInterface/Utilities.js:
  2806. (parseLocationQueryParameters):
  2807. (parseQueryString):
  2808. Added arrayResult parameter to allow getting all values, not just the last one.
  2809. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2810. Improve the sort order for array index completions.
  2811. Reviewed by Joseph Pecoraro.
  2812. * UserInterface/JavaScriptLogViewController.js:
  2813. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames.compare):
  2814. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
  2815. Try to sort in numerical order first, then as strings.
  2816. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2817. Allow autocompletion after "({a:1,b:2})" to suggest "a" and "b" properties.
  2818. <rdar://problem/5866281> Console should allow autocompletion after symbols like ), ], }
  2819. Reviewed by Joseph Pecoraro.
  2820. * UserInterface/CodeMirrorCompletionController.js:
  2821. (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
  2822. Ignore stop characters when we are inside brackets.
  2823. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2824. Remove TextPrompt and JavaScriptTextPrompt.
  2825. Reviewed by Joseph Pecoraro.
  2826. * UserInterface/JavaScriptTextPrompt.css: Removed.
  2827. * UserInterface/JavaScriptTextPrompt.js: Removed.
  2828. * UserInterface/Main.html:
  2829. * UserInterface/TextPrompt.css: Removed.
  2830. * UserInterface/TextPrompt.js: Removed.
  2831. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2832. Update DatabaseContentView to use ConsolePrompt.
  2833. Reviewed by Joseph Pecoraro.
  2834. * UserInterface/DatabaseContentView.css:
  2835. (.database-query-prompt):
  2836. (.database-user-query::before, .database-query-prompt::before, .database-query-result::before):
  2837. (.database-user-query):
  2838. (.database-query-result):
  2839. * UserInterface/DatabaseContentView.js:
  2840. (WebInspector.DatabaseContentView):
  2841. (WebInspector.DatabaseContentView.prototype.shown):
  2842. (WebInspector.DatabaseContentView.prototype.updateLayout):
  2843. (WebInspector.DatabaseContentView.prototype._messagesClicked):
  2844. (WebInspector.DatabaseContentView.prototype.accumulateMatches):
  2845. (WebInspector.DatabaseContentView.prototype.tableNamesCallback):
  2846. (WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded):
  2847. (WebInspector.DatabaseContentView.prototype.consolePromptTextCommited):
  2848. (WebInspector.DatabaseContentView.prototype._appendQueryResult):
  2849. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2850. Implement live completions for the ConsolePrompt.
  2851. Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
  2852. than in Chrome / the WebKit inspector
  2853. Reviewed by Joseph Pecoraro.
  2854. * UserInterface/ConsolePrompt.js:
  2855. (WebInspector.ConsolePrompt.prototype.updateCompletions):
  2856. (WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
  2857. * UserInterface/JavaScriptLogViewController.js:
  2858. (WebInspector.JavaScriptLogViewController):
  2859. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated.getCompletions):
  2860. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated):
  2861. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNamesFromEvaluate):
  2862. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
  2863. (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
  2864. (WebInspector.JavaScriptLogViewController.prototype._clearLastProperties):
  2865. Most of this is copied and adapted from JavaScriptTextPrompt. The new part if the caching of property names.
  2866. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2867. Prevent the Escape key from toggling and triggering a completion.
  2868. When the prompt is empty we allow console toggling. When not empty it triggers completion.
  2869. Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
  2870. than in Chrome / the WebKit inspector
  2871. Reviewed by Joseph Pecoraro.
  2872. * UserInterface/CodeMirrorCompletionController.js:
  2873. (WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
  2874. Call the completionControllerShouldAllowEscapeCompletion delegate function.
  2875. * UserInterface/ConsolePrompt.js:
  2876. (WebInspector.ConsolePrompt.prototype.completionControllerShouldAllowEscapeCompletion):
  2877. Added. Return true if the prompt is not empty.
  2878. * UserInterface/KeyboardShortcut.js:
  2879. (WebInspector.KeyboardShortcut._handleKeyDown):
  2880. Don't process the shortcut if default was prevented. We know someone already handled
  2881. the key, but didn't call stopPropagation. CodeMirror does this.
  2882. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2883. Implement default completions for JavaScript in CodeMirrorCompletionController.
  2884. Also hook up completions in ConsolePrompt to get the default completions.
  2885. Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
  2886. than in Chrome / the WebKit inspector
  2887. Reviewed by Joseph Pecoraro.
  2888. * UserInterface/CodeMirrorCompletionController.js:
  2889. (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
  2890. (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
  2891. (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
  2892. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchKeywords):
  2893. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables.filterVariables):
  2894. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables):
  2895. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
  2896. * UserInterface/ConsolePrompt.js:
  2897. (WebInspector.ConsolePrompt):
  2898. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2899. Hook up the ConsolePrompt delegate to JavaScriptLogViewController.
  2900. This makes the prompt work and evaluate results. No auto completion yet.
  2901. Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
  2902. than in Chrome / the WebKit inspector
  2903. Reviewed by Joseph Pecoraro.
  2904. * UserInterface/JavaScriptLogViewController.js:
  2905. (WebInspector.JavaScriptLogViewController.prototype.consolePromptHistoryDidChange):
  2906. (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited.printResult):
  2907. (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited):
  2908. (WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow.evalCallback):
  2909. (WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow):
  2910. Copied from JavaScriptTextPrompt.evalInInspectedWindow.
  2911. 2013-04-24 Timothy Hatcher <timothy@apple.com>
  2912. Start using ConsolePrompt in the QuickConsole.
  2913. This simplifies the DOM structure of the QuickConsole and makes resizing happen
  2914. automatically using flex layout instead of JavaScript.
  2915. Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
  2916. than in Chrome / the WebKit inspector
  2917. Reviewed by Joseph Pecoraro.
  2918. * UserInterface/JavaScriptLogViewController.js:
  2919. (WebInspector.JavaScriptLogViewController):
  2920. (WebInspector.JavaScriptLogViewController.prototype.clear):
  2921. (WebInspector.JavaScriptLogViewController.prototype.startNewSession):
  2922. (WebInspector.JavaScriptLogViewController.prototype._handleClearShortcut):
  2923. (WebInspector.JavaScriptLogViewController.prototype._handleFindShortcut):
  2924. (WebInspector.JavaScriptLogViewController.prototype._handleFindNextShortcut):
  2925. (WebInspector.JavaScriptLogViewController.prototype._handleFindPreviousShortcut):
  2926. (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
  2927. Remove keydown and bind the the keyboard shortcuts to the messages element
  2928. and prompt element using specific event handlers.
  2929. * UserInterface/LogContentView.js:
  2930. (WebInspector.LogContentView):
  2931. (WebInspector.LogContentView.prototype.shown):
  2932. (WebInspector.LogContentView.prototype.searchBarWantsToLoseFocus): Match _escapeWasPressed.
  2933. (WebInspector.LogContentView.prototype._activeLogCleared):
  2934. (WebInspector.LogContentView.prototype._keyDown):
  2935. Removed keyboard shortcut handling that was using private properties
  2936. from JavaScriptLogViewController.
  2937. * UserInterface/Main.html:
  2938. Include ConsolePrompt.js and ConsolePrompt.css.
  2939. * UserInterface/QuickConsole.css:
  2940. (.quick-console):
  2941. (.quick-console > .console-prompt):
  2942. (.quick-console > .console-prompt::before):
  2943. (.quick-console > .console-prompt > .CodeMirror):
  2944. (.quick-console > .navigation-bar):
  2945. Simplified by removing redundant elements.
  2946. * UserInterface/QuickConsole.js:
  2947. (WebInspector.QuickConsole): Removed redundant elements.
  2948. (WebInspector.QuickConsole.prototype.updateLayout):
  2949. Set max-height and stop calling _updateSize.
  2950. (WebInspector.QuickConsole.prototype._updateSize): Removed.
  2951. 2013-04-23 Timothy Hatcher <timothy@apple.com>
  2952. Start using CodeMirror for the Console prompt.
  2953. This introduces a new class, ConsolePrompt.
  2954. Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
  2955. than in Chrome / the WebKit inspector
  2956. Reviewed by Joseph Pecoraro.
  2957. * UserInterface/ConsolePrompt.css: Added.
  2958. (.console-prompt):
  2959. (.console-prompt > .CodeMirror):
  2960. (.console-prompt > .CodeMirror-scroll):
  2961. * UserInterface/ConsolePrompt.js: Added.
  2962. (WebInspector.ConsolePrompt):
  2963. (WebInspector.ConsolePrompt.prototype.get element):
  2964. (WebInspector.ConsolePrompt.prototype.get delegate):
  2965. (WebInspector.ConsolePrompt.prototype.set delegate):
  2966. (WebInspector.ConsolePrompt.prototype.get text):
  2967. (WebInspector.ConsolePrompt.prototype.set text):
  2968. (WebInspector.ConsolePrompt.prototype.get history):
  2969. (WebInspector.ConsolePrompt.prototype.set history):
  2970. (WebInspector.ConsolePrompt.prototype.get focused):
  2971. (WebInspector.ConsolePrompt.prototype.focus):
  2972. (WebInspector.ConsolePrompt.prototype.shown):
  2973. (WebInspector.ConsolePrompt.prototype._handlePreviousKey):
  2974. (WebInspector.ConsolePrompt.prototype._handleNextKey):
  2975. (WebInspector.ConsolePrompt.prototype._handleEnterKey):
  2976. (WebInspector.ConsolePrompt.prototype._restoreHistoryEntry):
  2977. (WebInspector.ConsolePrompt.prototype._historyEntryForCurrentText):
  2978. (WebInspector.ConsolePrompt.prototype._rememberCurrentTextInHistory):
  2979. 2013-04-23 Antoine Quint <graouts@apple.com>
  2980. <rdar://problem/13681931> Debugger Popover should not dismiss when mouse is over the popover
  2981. We would always dismiss the popover when we'd hover more than 1 second
  2982. outside of the marked token in the text editor. This would also happen
  2983. if the mouse happened to be over the popover shown for the marked token.
  2984. We now track whether the mouse is over the presented popover and only
  2985. dismiss the popover when no longer hovering the marked text in case the
  2986. mouse is not over it.
  2987. Reviewed by Timothy Hatcher.
  2988. * UserInterface/EventHandler.js: Added.
  2989. (WebInspector.EventHandler):
  2990. (WebInspector.EventHandler.prototype.handleEvent):
  2991. New utility to handle events in a way that makes it convenient to start
  2992. and stop tracking events in the scope of that object without using closures.
  2993. * UserInterface/Main.html:
  2994. Add the new EventHandler helper.
  2995. * UserInterface/SourceCodeTextEditor.js:
  2996. (WebInspector.SourceCodeTextEditor.prototype.hidden):
  2997. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  2998. (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
  2999. (WebInspector.SourceCodeTextEditor.prototype.hoveredTokenWasReleased):
  3000. (WebInspector.SourceCodeTextEditor.prototype._showPopover):
  3001. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
  3002. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
  3003. (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
  3004. (WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
  3005. (WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):
  3006. (WebInspector.SourceCodeTextEditor.prototype._popoverMouseover):
  3007. (WebInspector.SourceCodeTextEditor.prototype._popoverMouseout):
  3008. 2013-04-22 Timothy Hatcher <timothy@apple.com>
  3009. Teach CodeMirror about the CSS properties, keywords and colors we support in WebKit.
  3010. This keeps syntax highlighting in sync with code completion.
  3011. Reviewed by Joseph Pecoraro.
  3012. * UserInterface/CSSCompletions.js:
  3013. (WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
  3014. (WebInspector.CSSCompletions.requestCSSNameCompletions.updateCodeMirrorCSSMode):
  3015. (WebInspector.CSSCompletions.requestCSSNameCompletions):
  3016. 2013-04-21 Timothy Hatcher <timothy@apple.com>
  3017. Fix some selection issues in the Console.
  3018. Allow command-click on a single row selection to deselect that row the first time.
  3019. Before it was requiring two clicks -- because it would become selected twice --
  3020. before it would deselect.
  3021. Also make sure to clear focusable children after populating delayed results,
  3022. like a the DOM tree.
  3023. Reviewed by Joseph Pecoraro.
  3024. * UserInterface/LogContentView.js:
  3025. (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
  3026. (WebInspector.LogContentView.prototype._updateMessagesSelection):
  3027. 2013-04-21 Timothy Hatcher <timothy@apple.com>
  3028. Allow the context menu and clicking on any link in the console.
  3029. There are other links in the console besides those with the console-message-url
  3030. style class that should work and get the normal context menu.
  3031. <rdar://problem/13702031> can't click on a "failed to load" url in console
  3032. Reviewed by Joseph Pecoraro.
  3033. * UserInterface/LogContentView.js:
  3034. (WebInspector.LogContentView.prototype._handleContextMenuEvent):
  3035. (WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
  3036. Check only for tag name, not class name.
  3037. 2013-04-19 Timothy Hatcher <timothy@apple.com>
  3038. Allow both text and row selections in the Console.
  3039. Text selection switches to row selection if the text selection spans multiple rows.
  3040. <rdar://problem/13599610> REGRESSION: Can't select partial text of console output
  3041. Reviewed by Joseph Pecoraro.
  3042. * UserInterface/DOMTreeOutline.js:
  3043. (WebInspector.DOMTreeOutline.prototype._onmousedown):
  3044. Call event.stopPropagation() to prevent row selection in the console.
  3045. * UserInterface/LogContentView.css:
  3046. (.console-message-text > span): Added. Allow text selection.
  3047. (.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before):
  3048. (.console-group-title::before):
  3049. Use px instead of em to fix a positioning issue.
  3050. * UserInterface/LogContentView.js:
  3051. (WebInspector.LogContentView):
  3052. (WebInspector.LogContentView.prototype._mousedown):
  3053. (WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
  3054. (WebInspector.LogContentView.prototype._mousemove):
  3055. Allow text selection that switches to row selection if the text selection spans multiple rows.
  3056. This involves delaying operations from mousedown until later in mousemove or mouseup.
  3057. * UserInterface/TreeOutline.js:
  3058. (TreeElement.treeElementMouseDown):
  3059. Call event.stopPropagation() to prevent row selection in the console.
  3060. 2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
  3061. <rdar://problem/13701561> Improve SourceMap folder tree hierarchies
  3062. Implement a few improvements to folder tree hierarchies.
  3063. - if there is a sourceRoot in the sourceMap use that as the base for
  3064. subpaths, otherwise fallback to the sourceMappingURL (may change).
  3065. - if a source is an absolute URL on a different scheme / host, prefix
  3066. the subpath with a folder of the host name.
  3067. - flatten folder chains in the UI. Makes expanding folders easier.
  3068. Reviewed by Timothy Hatcher.
  3069. * UserInterface/SourceMap.js:
  3070. (WebInspector.SourceMap):
  3071. (WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
  3072. (WebInspector.SourceMap.prototype._parseMap):
  3073. Save the sourceRoot. And return urlComponents for the basePath, instead of
  3074. just the path.
  3075. * UserInterface/Utilities.js:
  3076. * UserInterface/SourceMapResource.js:
  3077. (WebInspector.SourceMapResource.prototype.get sourceMapDisplaySubpath):
  3078. Determine the subpath to display in the UI for this source map resource.
  3079. * UserInterface/SourceCodeTreeElement.js:
  3080. (WebInspector.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain):
  3081. (WebInspector.SourceCodeTreeElement.prototype.onpopulate.findAndCombineFolderChains):
  3082. (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
  3083. Flatten folder chains.
  3084. 2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
  3085. <rdar://problem/13701561> Improve SourceMap folder tree hierarchies
  3086. Correctly resolve dots when determining absolute URLs. Previously I had
  3087. left in extra "../s", however they should have been removed. And
  3088. absoluteURL should handle resolving any dots in the partialURL.
  3089. This fixes ASSERTs in Debug WebKit builds where we were calling
  3090. loadResourceSynchronously with a URL that was expected to be
  3091. absolute and wasn't.
  3092. Reviewed by Timothy Hatcher.
  3093. * UserInterface/SourceMap.js:
  3094. * UserInterface/Utilities.js:
  3095. 2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
  3096. <rdar://problem/13701561> Improve SourceMap folder tree hierarchies
  3097. Remove the old combine folder chain code. It will be easier to follow
  3098. the new code with the old code gone.
  3099. Reviewed by Timothy Hatcher.
  3100. * UserInterface/SourceCodeTreeElement.js:
  3101. (WebInspector.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain):
  3102. 2013-04-19 Joseph Pecoraro <pecoraro@apple.com>
  3103. <rdar://problem/13654793> Source Maps: Support for Stylesheets (less / sass / scss) with SourceMaps
  3104. The Inspector protocol now tells us when a CSS response contains a
  3105. sourceMappingURL for a Resource. If we are given a source map URL,
  3106. download the source map and associate it with the Resource.
  3107. Give Stylesheet SourceMapResources (like sass stylesheets) a CSS
  3108. clipping icon instead of using the generic clipping icon.
  3109. Reviewed by Timothy Hatcher.
  3110. * UserInterface/FrameResourceManager.js:
  3111. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
  3112. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
  3113. (WebInspector.FrameResourceManager.prototype._createResource):
  3114. If there is a sourceMapURL, download it and associate it with the Resource.
  3115. * UserInterface/Images/ClippingCSS.png: Added.
  3116. * UserInterface/Images/ClippingCSS@2x.png: Added.
  3117. * UserInterface/ResourceIcons.css:
  3118. (.source-map-resource.resource-icon.resource-type-stylesheet .icon):
  3119. CSS Clipping icon for stylesheet source map resources (like less / sass / scss).
  3120. * UserInterface/InspectorBackendCommands.js:
  3121. * UserInterface/NetworkObserver.js:
  3122. (WebInspector.NetworkObserver.prototype.loadingFinished):
  3123. Handle and pass on the new "extraResourceInfo" parameter.
  3124. 2013-04-19 Joseph Pecoraro <pecoraro@apple.com>
  3125. <rdar://problem/13654793> Source Maps: Support for Stylesheets (less / sass / scss) with SourceMaps
  3126. Follow OpenSource and merge PositionSourceMap into SourceMap.
  3127. Reviewed by Timothy Hatcher.
  3128. * UserInterface/SourceMap.js:
  3129. (WebInspector.SourceMap):
  3130. (WebInspector.SourceMap.prototype.findEntry):
  3131. (WebInspector.SourceMap.prototype.findEntryReversed):
  3132. (WebInspector.SourceMap.prototype._parseMap):
  3133. * UserInterface/SourceMapManager.js:
  3134. (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
  3135. 2013-04-18 Timothy Hatcher <timothy@apple.com>
  3136. Make sure to call shown on the current Style sub-panel when the sidebar visibility changes.
  3137. <rdar://problem/13604148> Content jumps in details sidebar when switching to styles pane
  3138. Reviewed by Joseph Pecoraro.
  3139. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  3140. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
  3141. Call shown on the selected panel.
  3142. 2013-04-18 Timothy Hatcher <timothy@apple.com>
  3143. Use CSSAgent.setStyleText for Style Attribute editing too.
  3144. <rdar://problem/13630483> Style Attribute editing in the Style details sidebar does not work on shadow content (114442)
  3145. Reviewed by Joseph Pecoraro.
  3146. * UserInterface/DOMNodeStyles.js:
  3147. (WebInspector.DOMNodeStyles.prototype.changeStyleText):
  3148. 2013-04-18 Timothy Hatcher <timothy@apple.com>
  3149. Switch from X-WebKit-CSP to Content-Security-Policy for the CSP header.
  3150. Also stop allowing 'unsafe-eval' since the one place we used eval() is dead code.
  3151. Reviewed by Joseph Pecoraro.
  3152. * UserInterface/InspectorBackend.js:
  3153. (InspectorBackendClass.prototype.loadFromJSONIfNeeded): Removed. Not used by Safari.
  3154. * UserInterface/Main.html:
  3155. 2013-04-18 Timothy Hatcher <timothy@apple.com>
  3156. Make sure to always include the New Rule button in the Styles sidebar.
  3157. <rdar://problem/13683941> Can't add a new rule unless there is a matched rule already
  3158. Reviewed by Joseph Pecoraro.
  3159. * UserInterface/RulesStyleDetailsPanel.js:
  3160. (WebInspector.RulesStyleDetailsPanel.prototype.refresh.addNewRuleButton): Added.
  3161. (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Call addNewRuleButton if
  3162. addedNewRuleButton isn't true after the end of the loop.
  3163. 2013-04-18 Timothy Hatcher <timothy@apple.com>
  3164. Remove workaround for <rdar://problem/13337211> now that it is fixed.
  3165. Removing this ends up fixing:
  3166. <rdar://problem/13612942> REGRESSION: Style sidebar does not update immediately with node change
  3167. Reviewed by Joseph Pecoraro.
  3168. * UserInterface/DOMNodeStyles.js:
  3169. (WebInspector.DOMNodeStyles.prototype.refresh):
  3170. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
  3171. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
  3172. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
  3173. Removed the repeat refresh polling logic.
  3174. 2013-04-18 Timothy Hatcher <timothy@apple.com>
  3175. Properly handle !important properties from inherited rules.
  3176. <rdar://problem/13683742> Important properties from inherited rules
  3177. mistakenly strikeout the effective property
  3178. Reviewed by Joseph Pecoraro.
  3179. * UserInterface/DOMNodeStyles.js:
  3180. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
  3181. Mark properties as overridden from inherited elements if there
  3182. is already an effective property from another element.
  3183. 2013-04-18 Timothy Hatcher <timothy@apple.com>
  3184. Adopt CSSAgent.setStyleText added in https://webkit.org/b/109340.
  3185. <rdar://problem/13337211> Editing styles on daringfireball.net interrupts autocompletion and flashes
  3186. Reviewed by Joseph Pecoraro.
  3187. * UserInterface/DOMNodeStyles.js:
  3188. (WebInspector.DOMNodeStyles.prototype.styleChanged): Use CSSAgent.setStyleText.
  3189. * UserInterface/InspectorBackendCommands.js: Updated.
  3190. 2013-04-18 Joseph Pecoraro <pecoraro@apple.com>
  3191. <rdar://problem/13681577> Unresolved breakpoint in SourceMapResource when reloading page
  3192. The ContentBrowser no longer contains ResourceContentViews directly, it
  3193. has ResourceClusterContentViews. Update the closeAll prototype call on
  3194. page navigations to make sure resource views get closed properly.
  3195. Reviewed by Timothy Hatcher.
  3196. * UserInterface/ResourceSidebarPanel.js:
  3197. 2013-04-18 Joseph Pecoraro <pecoraro@apple.com>
  3198. <rdar://problem/13681487> Missing heirarchical path components selecting breakpoints in source map resources in Debugger sidebar
  3199. Force onpopulate to create the SourceMapTreeElements immediately,
  3200. instead of lazily waiting for the user to expand the Resource in
  3201. the Resources sidebar. Then, when we look up the TreeElement to
  3202. get the hierarchical path components it will be found.
  3203. Reviewed by Timothy Hatcher.
  3204. * UserInterface/SourceCodeTreeElement.js:
  3205. (WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
  3206. (WebInspector.SourceCodeTreeElement.prototype._sourceMapAdded):
  3207. 2013-04-17 Joseph Pecoraro <pecoraro@apple.com>
  3208. ERROR: TypeError: 'undefined' is not an object (evaluating 'currentContentView.handleCopyEvent.bind')
  3209. Right clicking in an editor was producing an error. Check if both
  3210. the content view and the handleCopyEvent handler exist.
  3211. Reviewed by Timothy Hatcher.
  3212. * UserInterface/ClusterContentView.js:
  3213. (WebInspector.ClusterContentView.prototype.get handleCopyEvent):
  3214. 2013-04-15 Timothy Hatcher <timothy@apple.com>
  3215. Fix an exception that happens when clicking source links multiple times.
  3216. Reviewed by Antoine Quint.
  3217. * UserInterface/ContentViewContainer.js:
  3218. (WebInspector.ContentViewContainer.prototype.showContentView):
  3219. Return currentView if it is already showing. This matches the case where we return the view
  3220. if it wasn't already showing. Change other returns to return null instead of undefined.
  3221. * UserInterface/ResourceClusterContentView.js:
  3222. (WebInspector.ResourceClusterContentView.prototype._showContentViewForIdentifier):
  3223. Add an assert that we have a content view. This wasn't needed but I used to to pinpoint the bug.
  3224. 2013-04-15 Joseph Pecoraro <pecoraro@apple.com>
  3225. <rdar://problem/13644426> Support %c - styled console messages - http://adamschwartz.co/log/
  3226. Merge OpenSource r130941, r131448, r134166, r134202.
  3227. Reviewed by Timothy Hatcher.
  3228. * UserInterface/ConsoleMessageImpl.js:
  3229. (WebInspector.ConsoleMessageImpl.prototype.styleFormatter):
  3230. (WebInspector.ConsoleMessageImpl.prototype.isWhitelistedProperty):
  3231. (WebInspector.ConsoleMessageImpl.prototype.append):
  3232. (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
  3233. 2013-04-15 Joseph Pecoraro <pecoraro@apple.com>
  3234. <rdar://problem/13658744> Improve %f, %d, %i formatters for numbers and non-numeric input
  3235. Developer tools differ subtly in this area. I like Firefox's behavior
  3236. the most, calling parseFloat or parseInt on the argument. We now match
  3237. that behavior.
  3238. Chrome prints NaN for anything but primitive numbers. Which causes it
  3239. to print NaN for Infinity and "1.5". Firebug just prints out everything
  3240. like "%s", like we used to before this patch.
  3241. Reviewed by Timothy Hatcher.
  3242. * UserInterface/ConsoleMessageImpl.js:
  3243. (WebInspector.ConsoleMessageImpl.prototype.stringFormatter):
  3244. (WebInspector.ConsoleMessageImpl.prototype.floatFormatter):
  3245. (WebInspector.ConsoleMessageImpl.prototype.integerFormatter):
  3246. 2013-04-15 Timothy Hatcher <timothy@apple.com>
  3247. Don't call clearHistory or markClean in TextEditor after the first time.
  3248. This allows undo/redo in the content browser after editing in style sidebar.
  3249. Reviewed by Joseph Pecoraro.
  3250. * UserInterface/TextEditor.js:
  3251. (WebInspector.TextEditor): Set _initialStringNotSet.
  3252. (WebInspector.TextEditor.prototype.set string.update):
  3253. Call clearHistory and markClean only if _initialStringNotSet is set.
  3254. And delete _initialStringNotSet afterwards.
  3255. 2013-04-14 Timothy Hatcher <timothy@apple.com>
  3256. Default dockSide to "undocked" if it isn't specified in the query parameters.
  3257. This hides the dock buttons again in the iOS Inspector.
  3258. Reviewed by Dan Bernstein.
  3259. * UserInterface/Main.js:
  3260. (WebInspector.contentLoaded):
  3261. 2013-04-14 Timothy Hatcher <timothy@apple.com>
  3262. Don't allow Command-Z to clear the editor.
  3263. Reviewed by Antoine Quint.
  3264. * UserInterface/TextEditor.js:
  3265. (WebInspector.TextEditor.prototype.set string.update):
  3266. Call clearHistory and markClean.
  3267. 2013-04-13 Timothy Hatcher <timothy@apple.com>
  3268. Fix an exception when inspecting a request that has a "Content-type"
  3269. header instead of "Content-Type".
  3270. All HTTP headers are case-insensitive, so we need to handle that.
  3271. Reviewed by Ricky Mondello.
  3272. * UserInterface/Resource.js:
  3273. (WebInspector.Resource.prototype.get requestDataContentType):
  3274. (WebInspector.Resource.prototype.get encodedSize):
  3275. (WebInspector.Resource.prototype.get compressed):
  3276. (WebInspector.Resource.prototype.updateForResponse):
  3277. (WebInspector.Resource.prototype.increaseSize):
  3278. Use valueForCaseInsensitiveKey to fetch headers.
  3279. * UserInterface/ResourceDetailsSidebarPanel.js:
  3280. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
  3281. Set requestDataContentType to "" if it is null so the split() that comes later works.
  3282. * UserInterface/Utilities.js:
  3283. (Object.prototype.valueForCaseInsensitiveKey): Added.
  3284. 2013-04-13 Timothy Hatcher <timothy@apple.com>
  3285. Rename "Post Data" to "Request Data" and show the data if it exists,
  3286. not just for the "POST" method.
  3287. Reviewed by Antoine Quint.
  3288. * Localizations/en.lproj/localizedStrings.js: Updated.
  3289. * UserInterface/FrameResourceManager.js:
  3290. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
  3291. * UserInterface/Resource.js:
  3292. (WebInspector.Resource):
  3293. (WebInspector.Resource.prototype.get requestData):
  3294. (WebInspector.Resource.prototype.get requestDataContentType):
  3295. * UserInterface/ResourceClusterContentView.js:
  3296. (WebInspector.ResourceClusterContentView.prototype.get requestContentView):
  3297. (WebInspector.ResourceClusterContentView.prototype._canShowRequestContentView):
  3298. * UserInterface/ResourceDetailsSidebarPanel.js:
  3299. (WebInspector.ResourceDetailsSidebarPanel):
  3300. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
  3301. (WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):
  3302. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
  3303. Remove a workaround for file data that is no longer needed.
  3304. 2013-04-12 Timothy Hatcher <timothy@apple.com>
  3305. Prevent a double layout in the content browser navigation bar when switching views.
  3306. By default inserted navigation items schedule a layout soon, which prevents multiple consecutive layouts
  3307. when inserting many navigation items. Forcing a layout after inserting navigation items causes the
  3308. items to be displayed in their final positions and sizes right away.
  3309. Reviewed by Joseph Pecoraro.
  3310. * UserInterface/ContentBrowser.js:
  3311. (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
  3312. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
  3313. (WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
  3314. Call updateLayout after changing the navigation bar.
  3315. * UserInterface/HierarchicalPathNavigationItem.js:
  3316. (WebInspector.HierarchicalPathNavigationItem.prototype.set components):
  3317. Use updateLayoutSoon to coalesce multiple changes.
  3318. * UserInterface/NavigationBar.js:
  3319. (WebInspector.NavigationBar.prototype.updateLayout): Clear the timeout.
  3320. 2013-04-12 Timothy Hatcher <timothy@apple.com>
  3321. Fix the layout of the selector arrows when components start to collapse.
  3322. Reviewed by Joseph Pecoraro.
  3323. * UserInterface/HierarchicalPathComponent.css:
  3324. (.hierarchical-path-component.show-selector-arrows): Added.
  3325. (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component.show-selector-arrows:last-child): Added.
  3326. Specify correct min-widths that include space for the selector arrows.
  3327. * UserInterface/HierarchicalPathComponent.js:
  3328. (WebInspector.HierarchicalPathComponent): Add the show-selector-arrows class name to the element.
  3329. 2013-04-12 Timothy Hatcher <timothy@apple.com>
  3330. Add the ability to see POST data that isn't in the application/x-www-form-urlencoded format.
  3331. <rdar://problem/12667485> REGRESSION (Safari 6): Missing POST request view for non-urlencoded data
  3332. Reviewed by Joseph Pecoraro.
  3333. * Localizations/en.lproj/localizedStrings.js: Updated.
  3334. * UserInterface/ClusterContentView.js:
  3335. (WebInspector.ClusterContentView.prototype.get handleCopyEvent): Added.
  3336. Handles passing through the current content view's handleCopyEvent function.
  3337. * UserInterface/ContentView.js:
  3338. (WebInspector.ContentView):
  3339. (WebInspector.ContentView.isViewable):
  3340. Added TextContentView.
  3341. * UserInterface/DetailsSection.css:
  3342. (.details-section > .content > .group > .row.simple > .value .go-to-arrow): Added.
  3343. * UserInterface/FrameContentView.js:
  3344. (WebInspector.FrameContentView.createPathComponent): Pass true to get double arrows.
  3345. (WebInspector.FrameContentView.prototype.showResource): Added.
  3346. (WebInspector.FrameContentView.prototype.showSourceCode): Return the view. Use showResource.
  3347. (WebInspector.FrameContentView.prototype.showDOMTree): Return the view.
  3348. * UserInterface/Images/Request.pdf: Added.
  3349. * UserInterface/Images/Response.pdf: Added.
  3350. * UserInterface/Main.html: Included new files.
  3351. * UserInterface/PathComponentIcons.css:
  3352. (.request-icon .icon): Added.
  3353. (.response-icon .icon): Added.
  3354. * UserInterface/ResourceClusterContentView.js: Added.
  3355. (WebInspector.ResourceClusterContentView.createPathComponent):
  3356. (WebInspector.ResourceClusterContentView):
  3357. (WebInspector.ResourceClusterContentView.prototype.get resource):
  3358. (WebInspector.ResourceClusterContentView.prototype.get responseContentView):
  3359. (WebInspector.ResourceClusterContentView.prototype.get requestContentView):
  3360. (WebInspector.ResourceClusterContentView.prototype.get selectionPathComponents):
  3361. (WebInspector.ResourceClusterContentView.prototype.shown):
  3362. (WebInspector.ResourceClusterContentView.prototype.closed):
  3363. (WebInspector.ResourceClusterContentView.prototype.showRequest):
  3364. (WebInspector.ResourceClusterContentView.prototype.showResponse):
  3365. (WebInspector.ResourceClusterContentView.prototype._canShowRequestContentView):
  3366. (WebInspector.ResourceClusterContentView.prototype._pathComponentForContentView):
  3367. (WebInspector.ResourceClusterContentView.prototype._identifierForContentView):
  3368. (WebInspector.ResourceClusterContentView.prototype._showContentViewForIdentifier):
  3369. (WebInspector.ResourceClusterContentView.prototype._pathComponentSelected):
  3370. (WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
  3371. * UserInterface/ResourceContentView.js:
  3372. (WebInspector.ResourceContentView):
  3373. Removed code that handled resource type changes and concrete subclasses.
  3374. That is now handled by ResourceClusterContentView.
  3375. * UserInterface/ResourceDetailsSidebarPanel.js:
  3376. (WebInspector.ResourceDetailsSidebarPanel.prototype._goToPostDataClicked): Added.
  3377. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection):
  3378. Renamed Size to Data in the Post Data section. Added a go-to arrow.
  3379. * UserInterface/ResourceSidebarPanel.js:
  3380. (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Handle ResourceClusterContentView.
  3381. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Ditto.
  3382. (WebInspector.ResourceSidebarPanel.prototype.showResourceRequest): Added.
  3383. * UserInterface/TextContentView.css: Added.
  3384. (.content-view.text > .text-editor):
  3385. * UserInterface/TextContentView.js: Added.
  3386. (WebInspector.TextContentView):
  3387. (WebInspector.TextContentView.prototype.get textEditor):
  3388. (WebInspector.TextContentView.prototype.get navigationItems):
  3389. (WebInspector.TextContentView.prototype.revealLine):
  3390. (WebInspector.TextContentView.prototype.shown):
  3391. (WebInspector.TextContentView.prototype.hidden):
  3392. (WebInspector.TextContentView.prototype.closed):
  3393. (WebInspector.TextContentView.prototype.get supportsSearch):
  3394. (WebInspector.TextContentView.prototype.get numberOfSearchResults):
  3395. (WebInspector.TextContentView.prototype.get hasPerformedSearch):
  3396. (WebInspector.TextContentView.prototype.set automaticallyRevealFirstSearchResult):
  3397. (WebInspector.TextContentView.prototype.performSearch):
  3398. (WebInspector.TextContentView.prototype.searchCleared):
  3399. (WebInspector.TextContentView.prototype.revealPreviousSearchResult):
  3400. (WebInspector.TextContentView.prototype.revealNextSearchResult):
  3401. (WebInspector.TextContentView.prototype.updateLayout):
  3402. (WebInspector.TextContentView.prototype._togglePrettyPrint):
  3403. (WebInspector.TextContentView.prototype._textEditorFormattingDidChange):
  3404. (WebInspector.TextContentView.prototype._numberOfSearchResultsDidChange):
  3405. 2013-04-11 Joseph Pecoraro <pecoraro@apple.com>
  3406. <rdar://problem/13630859> Remote Web Inspector doesn't work for some sites (114447)
  3407. RWIInspectorFrontendHost always returns undefined for IFH.loadResourceSynchronously.
  3408. Gracefully handle that in our frontend while we either implement it, or create
  3409. a new Inspector protocol method to load resources through the backend.
  3410. Reviewed by Timothy Hatcher.
  3411. * UserInterface/SourceMapManager.js:
  3412. (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
  3413. * UserInterface/SourceMapResource.js:
  3414. (WebInspector.SourceMapResource.prototype._requestResourceAsynchronously):
  3415. 2013-04-11 Timothy Hatcher <timothy@apple.com>
  3416. Force CodeMirror editors to be a stacking context to prevent creating many layers
  3417. inside when another element overlaps.
  3418. <rdar://problem/13608839> REGRESSION: Text in Web Inspector Source Code
  3419. view looks heavy (double rendered?)
  3420. Reviewed by Joseph Pecoraro.
  3421. * UserInterface/CodeMirrorOverrides.css:
  3422. (.CodeMirror): Added. Set z-index: 0. Position is already set in codemirror.css.
  3423. 2013-04-10 Timothy Hatcher <timothy@apple.com>
  3424. Make the Web Inspector database code tolerant of quota exceptions.
  3425. Reviewed by Joseph Pecoraro.
  3426. * UserInterface/ImageUtilities.js:
  3427. If we can't open the database it isn't the end of the world, we just will
  3428. always generate the images and not cache them for better load times.
  3429. 2013-04-10 Timothy Hatcher <timothy@apple.com>
  3430. Drop the expected usage down to 5 MB to match the values in RWI and WK1.
  3431. This fixes an exception on load for first time users.
  3432. Reviewed by Brian Weinstein.
  3433. * UserInterface/ImageUtilities.js:
  3434. 2013-04-10 Timothy Hatcher <timothy@apple.com>
  3435. Update the Style Attribute in the sidebar when the DOM attribute changes.
  3436. Also only update a style rule for external changes if the editor isn't focused.
  3437. This prevents external changes from fighting with user edits.
  3438. <rdar://problem/13619049>
  3439. Reviewed by Antoine Quint.
  3440. * UserInterface/CSSStyleDeclarationTextEditor.js:
  3441. (WebInspector.CSSStyleDeclarationTextEditor):
  3442. (WebInspector.CSSStyleDeclarationTextEditor.prototype._commitChanges):
  3443. (WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured): Added.
  3444. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
  3445. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
  3446. Simplify when we reset the content to only do it when not focused.
  3447. * UserInterface/DOMTreeManager.js:
  3448. (WebInspector.DOMTreeManager.prototype._loadNodeAttributes):
  3449. Fire WebInspector.DOMNode.Event.AttributeModified. Remove StyleInvalidated event.
  3450. 2013-04-10 Timothy Hatcher <timothy@apple.com>
  3451. Make DOMNodeStyles mark as needing refresh in all cases when a stylesheet changes.
  3452. The stylesheet change might be a rule that we didn't match yet, so checking existing matched
  3453. rules for the stylesheet will not trigger a refresh. This code was added back when refresh was
  3454. not as smart, so this is the correct thing to do now.
  3455. <rdar://problem/13387359> Undoing selector change does not show selector affecting the page anywhere
  3456. Reviewed by Antoine Quint.
  3457. * UserInterface/DOMNodeStyles.js:
  3458. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange):
  3459. Simplify by always calling _markAsNeedsRefresh.
  3460. 2013-04-09 Timothy Hatcher <timothy@apple.com>
  3461. Indent invalid style properties, not just blank lines.
  3462. Also strike out text that is not recognized as a property or comment.
  3463. This will now properly indent and strike out these two error cases:
  3464. padding; 0;
  3465. *line-height: 1;
  3466. <rdar://problem/13608848> Checkbox missing for a style property
  3467. Reviewed by Antoine Quint.
  3468. * UserInterface/CSSStyleDeclarationTextEditor.css:
  3469. Strike out spans that are not comments or marked properties.
  3470. * UserInterface/CSSStyleDeclarationTextEditor.js:
  3471. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
  3472. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
  3473. Call _markLinesWithCheckboxPlaceholder so the placeholders are added if needed for
  3474. lines htat didn't have properties.
  3475. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
  3476. Remove use of __checkboxMarker, it is not set anymore.
  3477. (WebInspector.CSSStyleDeclarationTextEditor.prototype._markLinesWithCheckboxPlaceholder):
  3478. Renamed from _markBlankLinesWithCheckboxPlaceholder and taught how to mark only lines that
  3479. need marked, and ignores the rest.
  3480. 2013-04-08 Timothy Hatcher <timothy@apple.com>
  3481. Avoid a console error when viewing Anonymous scripts.
  3482. Reviewed by Geoffrey Garen.
  3483. * UserInterface/ResourceSidebarPanel.js:
  3484. (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
  3485. 2013-04-08 Timothy Hatcher <timothy@apple.com>
  3486. Make the Scope Variables details sidebar work when evaluating in the Console.
  3487. <rdar://problem/12831236> REGRESSION (6.0.3-Curie): Scope Chain shows nothing while debugging
  3488. Reviewed by Joseph Pecoraro.
  3489. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  3490. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork): Clear the timeout.
  3491. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Set a timeout.
  3492. 2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
  3493. Copy PrettyPrinter updates into UserInterface to enact the changes.
  3494. Unreviewed, just moving reviewed code between directories.
  3495. * UserInterface/CodeMirrorFormatters.js:
  3496. * UserInterface/External/CodeMirror/javascript.js:
  3497. * UserInterface/Formatter.js:
  3498. (Formatter.prototype._handleToken):
  3499. 2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
  3500. <rdar://problem/13593779> Pretty printer should line "case" and "default" with "switch"
  3501. Dedent before case/default and indent after, so it lines up with the switch.
  3502. Reviewed by Timothy Hatcher.
  3503. * Tools/PrettyPrinting/CodeMirrorFormatters.js:
  3504. * Tools/PrettyPrinting/index.html:
  3505. * Tools/PrettyPrinting/js-tests/switch-case-default-expected.js: Added.
  3506. * Tools/PrettyPrinting/js-tests/switch-case-default.js: Added.
  3507. 2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
  3508. <rdar://problem/13584713> Pretty printer should gracefully handle single line if/else/for/do/while blocks
  3509. This adds indentation support for single statement blocks. This had a
  3510. pretty big performance cost pretty printing jquery.min.js (20ms), but
  3511. I think it is worth it. In the inspector itself, I did not see pretty
  3512. printing actually taking longer. I'll continue to look at performance.
  3513. Reviewed by Timothy Hatcher.
  3514. * Tools/PrettyPrinting/Formatter.js:
  3515. (Formatter.prototype._handleToken):
  3516. Let the Code modify state before / after the token is consumed.
  3517. Let the formatters specify multiple dedents at once.
  3518. * Tools/PrettyPrinting/FormatterDebug.js:
  3519. (Formatter.prototype.debug):
  3520. In JavaScript print out the previous lexical state.
  3521. * Tools/PrettyPrinting/CodeMirrorFormatters.js:
  3522. Pretty print a good chunk of JavaScript single statement blocks and
  3523. if/else chains.
  3524. * Tools/PrettyPrinting/javascript.js:
  3525. Update to "near" trunk CodeMirror JavaScript. The most recent commit
  3526. causes issues.
  3527. * Tools/PrettyPrinting/index.html:
  3528. * Tools/PrettyPrinting/js-tests/block-comment-expected.js: Added.
  3529. * Tools/PrettyPrinting/js-tests/block-comment.js: Added.
  3530. * Tools/PrettyPrinting/js-tests/single-statement-blocks-expected.js: Added.
  3531. * Tools/PrettyPrinting/js-tests/single-statement-blocks.js: Added.
  3532. Added some micro-tests for recent pretty printing changes.
  3533. 2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
  3534. Add a little test running harness to the PrettyPrinter tool. No tests yet.
  3535. Reviewed by Timothy Hatcher.
  3536. * Tools/PrettyPrinting/index.html:
  3537. 2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
  3538. Update the PrettyPrinting Tool to match UserInterface.
  3539. Unreviewed tools change.
  3540. * Tools/PrettyPrinting/codemirror.js:
  3541. (window.CodeMirror):
  3542. * Tools/PrettyPrinting/javascript.js:
  3543. 2013-04-08 Timothy Hatcher <timothy@apple.com>
  3544. Enable completions for resource content views.
  3545. <rdar://problem/13598062>
  3546. Reviewed by Antoine Quint.
  3547. * UserInterface/TextEditor.js:
  3548. (WebInspector.TextEditor): Hook up a WebInspector.CodeMirrorCompletionController.
  3549. 2013-04-08 Timothy Hatcher <timothy@apple.com>
  3550. Delay computing suggestions for 250ms to keep from slowing down typing.
  3551. <rdar://problem/13598014> CSS completions can slow down typing
  3552. Reviewed by Antoine Quint.
  3553. * UserInterface/CodeMirrorCompletionController.js:
  3554. (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
  3555. (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
  3556. Clear the typing delay timeout.
  3557. (WebInspector.CodeMirrorCompletionController.prototype._handleChange):
  3558. Set _ignoreNextCursorActivity so hideCompletions isn't called.
  3559. 2013-04-08 Antoine Quint <graouts@apple.com>
  3560. <rdar://problem/13597681> Layers sidebar panel may flash popovers with stale content
  3561. We only present the popover when the data grid node hasn't changed
  3562. between the time we called into the backend and the time the callback
  3563. is called.
  3564. Reviewed by Timothy Hatcher.
  3565. * UserInterface/LayerTreeSidebarPanel.js:
  3566. (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
  3567. 2013-04-08 Antoine Quint <graouts@apple.com>
  3568. <rdar://problem/12892280> Layer tree panel data grid should refresh less frequently when layers for nodes are recreated
  3569. Provide a custom DataGrid subclass for the Layers panel where we
  3570. use CSS transforms to update the position of data grid nodes
  3571. instead of relying on DOM order so that we can avoid DOM thrashing
  3572. and retain scroll position for rapidly changing content. We also
  3573. set the width of "Paints" and "Memory" columns for a nicely
  3574. consistent formatting.
  3575. Reviewed by Timothy Hatcher.
  3576. * UserInterface/DetailsSectionDataGridRow.js:
  3577. (WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
  3578. Perform a quick return in case the new data grid is the same
  3579. as the previous in order to remove the possibility of appending
  3580. the data grid's element if it was already the current data grid.
  3581. * UserInterface/LayerTreeDataGrid.js: Added.
  3582. (WebInspector.LayerTreeDataGrid):
  3583. Initialize the DataGrid with a custom set of columns and set the
  3584. width of the "Paints" and "Memory" columns.
  3585. (WebInspector.LayerTreeDataGrid.prototype.insertChild):
  3586. (WebInspector.LayerTreeDataGrid.prototype.removeChild):
  3587. Override these DataGrid methods to perform our custom layout of
  3588. cells when a child is added or removed.
  3589. (WebInspector.LayerTreeDataGrid.prototype.setChildren):
  3590. Public API used to set the list of children data grid nodes for
  3591. this data grid. We compare this new list to the previous list
  3592. and only remove / add the nodes that need to be, avoiding having
  3593. to remove the entire set of children to update the nodes list.
  3594. (WebInspector.LayerTreeDataGrid.prototype._updateChildren):
  3595. Position the children data grid nodes using CSS transforms instead
  3596. of DOM order. We also manually set the sibling relationship there
  3597. since it can no longer be accomplished in insertChild() or
  3598. removeChild() calls.
  3599. (WebInspector.LayerTreeDataGrid.prototype._recalculateSiblings):
  3600. Make this method a no-op since we manually perform the same task in
  3601. _updateChildren().
  3602. * UserInterface/LayerTreeDataGridNode.js:
  3603. (WebInspector.LayerTreeDataGridNode):
  3604. Add a new _outlets private ivar we use to stash the DOM elements
  3605. we'll need to update when the node's data changes.
  3606. (WebInspector.LayerTreeDataGridNode.prototype.createCells):
  3607. Override this DataGridNode API in order to add a flag that cells
  3608. were created which we'll use as a flag to allow the update of a
  3609. cell's data in the data setter.
  3610. (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
  3611. (WebInspector.LayerTreeDataGridNode.prototype.set layer):
  3612. (WebInspector.LayerTreeDataGridNode.prototype.get data):
  3613. (WebInspector.LayerTreeDataGridNode.prototype.set data):
  3614. Custom data setter as the default version would completely trash
  3615. the DOM tree and replace it with a whole new set of elements to
  3616. update the data. We choose a more incremental approach here since
  3617. individual fields for this node may change (paint count being the
  3618. most likely).
  3619. (WebInspector.LayerTreeDataGridNode.prototype._makeOutlet):
  3620. (WebInspector.LayerTreeDataGridNode.prototype._makeNameCell):
  3621. Prepare the DOM elements used to present the node's data. Many
  3622. elements for the name cell are dynamically added and removed in
  3623. _updateNameCellData().
  3624. (WebInspector.LayerTreeDataGridNode.prototype._updateCell):
  3625. (WebInspector.LayerTreeDataGridNode.prototype._updateNameCellData):
  3626. Update the information on outlets or their very availability based
  3627. on the current data and represented layer.
  3628. * UserInterface/LayerTreeSidebarPanel.js:
  3629. (WebInspector.LayerTreeSidebarPanel.prototype.shown):
  3630. (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
  3631. Remove the auto-sizing of data grid columns as we're not setting them
  3632. to be constant for a more consistent look.
  3633. (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
  3634. Instantiate our new LayerTreeDataGrid class.
  3635. (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
  3636. Use the custom setChildren() API on LayerTreeDataGrid to change the
  3637. children order.
  3638. (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
  3639. * UserInterface/Main.html:
  3640. Add LayerTreeDataGrid.js.
  3641. 2013-04-07 Joseph Pecoraro <pecoraro@apple.com>
  3642. <rdar://problem/13584696> Pretty printer should preserve whitespace in multi-line comments
  3643. Update CodeMirror to trunk to get a few recent fixes.
  3644. This update includes project wide tailing whitespace and tab removal
  3645. which is why so many files were changed.
  3646. Rubber-stamped by Timothy Hatcher.
  3647. * UserInterface/External/CodeMirror/clojure.js:
  3648. * UserInterface/External/CodeMirror/codemirror.js:
  3649. * UserInterface/External/CodeMirror/coffeescript.js:
  3650. * UserInterface/External/CodeMirror/javascript.js:
  3651. * UserInterface/External/CodeMirror/less.js:
  3652. * UserInterface/External/CodeMirror/matchbrackets.js:
  3653. * UserInterface/External/CodeMirror/overlay.js:
  3654. * UserInterface/External/CodeMirror/sql.js:
  3655. * UserInterface/External/CodeMirror/xml.js:
  3656. 2013-04-07 Joseph Pecoraro <pecoraro@apple.com>
  3657. <rdar://problem/13043550> REGRESSION: Scrollbar renders behind position: sticky elements in the Web Inspector
  3658. Give the Sidebar Panels a stacking context to work around the issue.
  3659. Reviewed by Ricky Mondello.
  3660. * UserInterface/Sidebar.css:
  3661. (.sidebar > .panel):
  3662. 2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
  3663. Add a small script to update the Tools/PrettyPrinting directory.
  3664. My workflow for fixing a PrettyPrinting bug is to first update the Tools
  3665. directory with exact replicas of files in UserInterface. Make changes
  3666. and test with the debug page, and then transfer the files back to the
  3667. inspector. This script helps automate those steps.
  3668. Reviewed by Cody Krieger.
  3669. * Scripts/update-codemirror-resources.rb:
  3670. * Scripts/update-pretty-printer.rb: Added.
  3671. 2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
  3672. Update the PrettyPrinting Tool with a few Debug changes.
  3673. Unreviewed tools change.
  3674. * Tools/PrettyPrinting/index.html:
  3675. * Tools/PrettyPrinting/FormatterDebug.js:
  3676. (.pad):
  3677. (.debugToken):
  3678. (Formatter.prototype.debug):
  3679. Output null, undefined, or 'string' for tokens.
  3680. Previously null and undefined output as '-'.
  3681. 2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
  3682. Update the PrettyPrinting Tool with CodeMirror CSS changes.
  3683. Unreviewed tools change.
  3684. * Tools/PrettyPrinting/codemirror-additions.css: Added.
  3685. * Tools/PrettyPrinting/codemirror.css:
  3686. * Tools/PrettyPrinting/index.html:
  3687. 2013-04-05 Timothy Hatcher <timothy@apple.com>
  3688. Tweak Web Inspector's image cache database.
  3689. We only want to keep the image data around for the first use. These
  3690. images are typically only used in one place. This keeps performance
  3691. good during page load and frees memory that typically won't be reused.
  3692. Also add transaction error logging and a better expected database size.
  3693. Reviewed by Joseph Pecoraro.
  3694. * UserInterface/ImageUtilities.js:
  3695. (_logSQLTransactionError):
  3696. (_prefetchCachedImagesAndUpdate):
  3697. (.restoreImageData):
  3698. (restoreImageFromStorage):
  3699. 2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
  3700. Update the PrettyPrinting Tool with new formatter changes.
  3701. Also some tweaks so that the Tools files are identical to the ones in
  3702. the actual Web Inspector (UserInterface).
  3703. Unreviewed tools change.
  3704. * Tools/PrettyPrinting/CodeMirrorFormatters.js:
  3705. * Tools/PrettyPrinting/Formatter.js:
  3706. (Formatter.prototype.format):
  3707. (Formatter.prototype._handleToken):
  3708. (Formatter.prototype._handleEmptyLine):
  3709. * Tools/PrettyPrinting/FormatterContentBuilder.js:
  3710. (FormatterContentBuilder.prototype.appendNewline):
  3711. (FormatterContentBuilder.prototype.appendMultipleNewlines):
  3712. (FormatterContentBuilder.prototype.removeLastNewline):
  3713. (FormatterContentBuilder.prototype._addFormattedLineEnding):
  3714. * Tools/PrettyPrinting/FormatterDebug.js: Added.
  3715. (Formatter.prototype.debug):
  3716. * Tools/PrettyPrinting/Utilities.js: Added.
  3717. * Tools/PrettyPrinting/codemirror.js:
  3718. * Tools/PrettyPrinting/css.js:
  3719. * Tools/PrettyPrinting/index.html:
  3720. * Tools/PrettyPrinting/javascript.js:
  3721. 2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
  3722. Win back performance in pretty-printing large files
  3723. With preserving newlines we lost a few ms. This wins back at
  3724. least the same amount and a bit more on JavaScript (2-3ms).
  3725. Checking if the current token is a comment is a very common
  3726. in our pretty printers. Only perform the work once, and pass
  3727. the result around as needed to prevent duplicated work.
  3728. Reviewed by Timothy Hatcher.
  3729. * UserInterface/CodeMirrorFormatters.js:
  3730. * UserInterface/Formatter.js:
  3731. (Formatter.prototype._handleToken):
  3732. 2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
  3733. <rdar://problem/13582023> Web Inspector removes blank lines in my JS when pretty printing
  3734. When pretty-printing already pretty code we did a poor job of preserving
  3735. the nice extra whitespace the original code had. This preserves the empty
  3736. (whitespace only) lines in the original code.
  3737. Because our pretty printer sometimes adds multiple newlines, like in CSS
  3738. after each rule, we don't need to add yet another newline to just preserve
  3739. a blank line from the original content. Handle that gracefully.
  3740. This introduces a minor performance regression (1-3ms in large content)
  3741. but I think it is well worth it considering the results. Much prettier!
  3742. JavaScript Test:
  3743. Foo.prototype.f = function() {
  3744. // ...
  3745. }
  3746. Foo.prototype.g = function() {
  3747. // ...
  3748. }
  3749. CSS Test:
  3750. /* comment one */
  3751. /* comment two */
  3752. Reviewed by Antoine Quint.
  3753. * UserInterface/Formatter.js:
  3754. (Formatter.prototype.format):
  3755. (Formatter.prototype._handleToken):
  3756. (Formatter.prototype._handleEmptyLine):
  3757. Call handleEmptyLine for whitespace only lines, and force
  3758. append a newline unless the builder just had multiple.
  3759. * UserInterface/FormatterContentBuilder.js:
  3760. (FormatterContentBuilder):
  3761. (FormatterContentBuilder.prototype.appendNewline):
  3762. (FormatterContentBuilder.prototype.appendMultipleNewlines):
  3763. Helper for appending multiple newlines, to set some extra state.
  3764. 2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
  3765. <rdar://problem/13583718> Pretty printing should not move comments to the end of the previous line
  3766. Previously we removed newlines before comments if they were after a
  3767. semicolon. This was intended to keep comments on the same line as code.
  3768. This could backfire if the comment was really on actually on the next
  3769. line. So be more specific, and don't remove the previous newline if
  3770. the comment is the first token on a line.
  3771. JavaScript Test:
  3772. function() {
  3773. var a;
  3774. // test
  3775. }
  3776. CSS Test:
  3777. a {
  3778. color: red;
  3779. /* test */
  3780. }
  3781. Reviewed by Timothy Hatcher.
  3782. * UserInterface/CodeMirrorFormatters.js:
  3783. * UserInterface/Formatter.js:
  3784. (Formatter.prototype.format):
  3785. (Formatter.prototype._handleToken):
  3786. 2013-04-05 Antoine Quint <graouts@apple.com>
  3787. <rdar://problem/13472300> Layers in sidebar panel should use iconography
  3788. Refreshing the look of the Layers sidebar panel data grid nodes
  3789. to use icons to identify the kind of layers presented (element,
  3790. pseudo-element or reflection). Also, we mark the pseudo-element
  3791. part of the CSS selector by displaying it in lighter text as well
  3792. as showing a " Ñ Reflection" extra label in the case of reflections.
  3793. Finally, we also trim the text in the CSS selector label and shorten
  3794. it to make room for the go-to arrow button should it be visible
  3795. when hovering the data grid node.
  3796. Reviewed by Timothy Hatcher.
  3797. * Localizations/en.lproj/localizedStrings.js:
  3798. * UserInterface/Images/PseudoElement.pdf: Added.
  3799. * UserInterface/Images/Reflection.pdf: Added.
  3800. * UserInterface/LayerTreeDataGridNode.js:
  3801. (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
  3802. (WebInspector.LayerTreeDataGridNode.prototype.set layer):
  3803. (WebInspector.LayerTreeDataGridNode.prototype._createNodeCellContent):
  3804. (WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
  3805. * UserInterface/LayerTreeSidebarPanel.css:
  3806. (.layer-tree.panel .data-grid table.data):
  3807. (.layer-tree.panel .data-container tr):
  3808. (.layer-tree.panel .data-container td > div):
  3809. (.layer-tree.panel .data-container .name-column):
  3810. (.layer-tree.panel .data-container .name-column .icon):
  3811. (.layer-tree.panel .data-container tr.reflection .name-column .icon):
  3812. (.layer-tree.panel .data-container tr.pseudo-element .name-column .icon):
  3813. (.layer-tree.panel .data-container .name-column .label):
  3814. (.layer-tree.panel .data-container tr:hover .name-column .label):
  3815. (.layer-tree.panel .data-container .name-column .reflection):
  3816. (.layer-tree.panel .data-container tr.selected .name-column .reflection):
  3817. (.layer-tree.panel .data-container .go-to-arrow):
  3818. (.layer-tree.panel .data-container tr:hover .go-to-arrow):
  3819. 2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
  3820. <rdar://problem/13573165> Pressing Esc in a readOnly editor should still focus the quick console
  3821. Reviewed by Timothy Hatcher.
  3822. * UserInterface/EditingSupport.js:
  3823. (WebInspector.isEventTargetAnEditableField):
  3824. 2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
  3825. <rdar://problem/13580154> DOMTreeOutline.js:504: JS ERROR: TypeError: 'true' is not a function (evaluating 'this._contextMenuCallback(contextMenu, node)'
  3826. DOMTreeOutline constructors were passing 3 booleans. In the case of
  3827. outlines in the Console it was passing "true" expecting that to provide
  3828. a "Reveal Element" context menu item, but that mis-matched the
  3829. constructor. Fix the error, and add back the context menu item.
  3830. Reviewed by Timothy Hatcher.
  3831. * UserInterface/DOMTreeOutline.js:
  3832. (WebInspector.DOMTreeOutline):
  3833. Update parameters.
  3834. (WebInspector.DOMTreeOutline.prototype.revealElement):
  3835. (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
  3836. Append a "Reveal Element" context menu item if needed.
  3837. * UserInterface/ObjectPropertiesSection.js:
  3838. (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
  3839. Update the string. We don't have a panel, the nav bar labels this "DOM Tree".
  3840. 2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
  3841. ERROR URIError: URI error in FrameResourceManager.prototype.resourceForScript
  3842. decodeURI can throw a URIError, e.g. decodeURI("%"). Protect against
  3843. this in FrameResourceManager. This method is meant to work with both
  3844. already decoded and encoded URIs.
  3845. Reviewed by Timothy Hatcher.
  3846. * UserInterface/FrameResourceManager.js:
  3847. (WebInspector.FrameResourceManager.prototype.resourceForScript):
  3848. Wrap the code with decodeURI in a try/catch.
  3849. 2013-04-04 Timothy Hatcher <timothy@apple.com>
  3850. Fix opening the Web Inspector in Production builds.
  3851. A function declaration was pushed up next to a parenthesis when minified.
  3852. This made the parser think we were trying to make a call. Adding a semicolon
  3853. is all we need to make things work again when combined and minified.
  3854. <rdar://problem/13577591> REGRESSION (r50120-50124): Can't open Web Inspector
  3855. Reviewed by Ricky Mondello.
  3856. * UserInterface/MIMETypeUtilities.js:
  3857. (WebInspector.fileExtensionForURL):
  3858. (WebInspector.mimeTypeForFileExtension):
  3859. 2013-04-04 Antoine Quint <graouts@apple.com>
  3860. <rdar://problem/13570821> Reasons for compositing popover should adjust position if inspector window resizes
  3861. Allow for popovers to have their target frame updated independently
  3862. of their content so we can efficiently update their position as the
  3863. element for which a popover is presented changes position. Now that
  3864. we have this support, we update the popover presentation when the
  3865. window size changes and a popover is visible in the Layers sidebar
  3866. panel.
  3867. Reviewed by Timothy Hatcher.
  3868. * UserInterface/Breakpoint.js:
  3869. (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
  3870. Adopt the updated Popover API.
  3871. * UserInterface/LayerTreeSidebarPanel.js:
  3872. (WebInspector.LayerTreeSidebarPanel):
  3873. Track window resize events so that we may update the popover
  3874. presentation as it changes.
  3875. (WebInspector.LayerTreeSidebarPanel.prototype._windowResized):
  3876. Update the popover presentation in case there is a visible popover.
  3877. (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
  3878. Use the new _updatePopoverForSelectedNode() method as the callback.
  3879. (WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
  3880. Adopt the updated Popover API and only set the popover's content
  3881. should one be provided, ie. when the method is called as callback
  3882. to _contentForPopover().
  3883. * UserInterface/Popover.js:
  3884. (WebInspector.Popover):
  3885. New private ivars to track some popover presentation state.
  3886. (WebInspector.Popover.prototype.get visible):
  3887. New public property to let clients check on popover visibility.
  3888. (WebInspector.Popover.prototype.set content):
  3889. (WebInspector.Popover.prototype.present):
  3890. New public property and method signature to let clients set the
  3891. content of the popover independently of its presentation attributes.
  3892. (WebInspector.Popover.prototype._update):
  3893. New private method called to update the presentation state
  3894. of the popover and basically the old content of the present()
  3895. method with use of the presentation ivars instead of method
  3896. arguments and some optimizations to check that we only update
  3897. the content and draw the canvas background should they have
  3898. changed.
  3899. * UserInterface/SourceCodeTextEditor.js:
  3900. (WebInspector.SourceCodeTextEditor.prototype._showPopover):
  3901. Adopt the updated Popover API.
  3902. 2013-04-04 Timothy Hatcher <timothy@apple.com>
  3903. Make ContentViewContainer robust against null/undefined elements in contentView.scrollableElements.
  3904. DatabaseTableContentView can return a null element when the table is empty, and this causes exceptions.
  3905. Reviewed by Antoine Quint.
  3906. * UserInterface/ContentViewContainer.js:
  3907. (WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView):
  3908. (WebInspector.ContentViewContainer.prototype._restoreScrollPositionsForContentView):
  3909. 2013-04-04 Timothy Hatcher <timothy@apple.com>
  3910. Don't use localStorage to cache generated images in the Web Inspector.
  3911. This migrates ImageUtilities off localStorage to a SQL database.
  3912. <rdar://problem/13574226> Web Inspector breaks when file:/// localStorage hits 5MB limit
  3913. Rubber-stamped by Antoine Quint.
  3914. * UserInterface/ImageUtilities.js:
  3915. (_devicePixelRatioChanged):
  3916. (_registerGeneratedImageUpdateFunction):
  3917. (_logSQLError):
  3918. (_prefetchCachedImagesAndUpdate.complete):
  3919. (_prefetchCachedImagesAndUpdate._generatedImageCacheDatabase.transaction):
  3920. (_prefetchCachedImagesAndUpdate):
  3921. (restoreImageFromStorage):
  3922. (generateColoredImagesForCSS.restoreImages):
  3923. (generateColoredImagesForCSS.restoreImages.restoreActiveImages):
  3924. (generateColoredImagesForCSS.restoreImage):
  3925. (generateColoredImagesForCSS.update):
  3926. (generateColoredImagesForCSS.generateImage):
  3927. (generateEmbossedImages):
  3928. (generateEmbossedImages.generateImages):
  3929. (generateEmbossedImages.generateImages.generateActiveImages):
  3930. 2013-04-04 Antoine Quint <graouts@apple.com>
  3931. <rdar://problem/13570779> Reasons for compositing popover in layers sidebar is poorly aligned with selected datagrid row
  3932. Also apply padding to the target frame size, not just the origin, and
  3933. adjust the padding down to 2 to match the padding used for breakpoints.
  3934. Reviewed by Timothy Hatcher.
  3935. * UserInterface/LayerTreeSidebarPanel.js:
  3936. (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
  3937. 2013-04-03 Joseph Pecoraro <pecoraro@apple.com>
  3938. <rdar://problem/13573798> REGRESSION: CodeMirror editor doesn't refresh when split console is hidden and more of the content view is visible
  3939. Reviewed by Timothy Hatcher.
  3940. * UserInterface/QuickConsole.js:
  3941. (WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged):
  3942. Trigger a DidResize event because the console would have changed
  3943. its visible size.
  3944. 2013-04-03 Joseph Pecoraro <pecoraro@apple.com>
  3945. <rdar://problem/13474739> Respect sourcesContent in SourceMaps for SourceMapResources
  3946. If the resource's contents are available via the Source Map's
  3947. sourcesContent array, then use them. Otherwise, go the normal path of
  3948. downloading the resource. Because neither path can get the MIME type of
  3949. the resource right now, fallback to trying to determine the MIME type
  3950. from the resource's file extension.
  3951. Reviewed by Timothy Hatcher.
  3952. * UserInterface/Main.html:
  3953. * UserInterface/MIMETypeUtilities.js: Added.
  3954. (WebInspector.fileExtensionForURL):
  3955. (WebInspector.mimeTypeForFileExtension):
  3956. Helpers for extensions and MIME types.
  3957. * UserInterface/SourceMapResource.js:
  3958. (WebInspector.SourceMapResource.prototype._requestResourceAsynchronously):
  3959. Check for embedded sourcesContent content, and determine the MIME type
  3960. from the file extension.
  3961. * UserInterface/Resource.js:
  3962. Be sure to give types to some of the MIME types for CodeMirror supported
  3963. types, which may show up as SourceMap sources.
  3964. 2013-04-03 Joseph Pecoraro <pecoraro@apple.com>
  3965. ERROR: console.assert(alternateImage) in ToggleButtonNavigationItem.js:4
  3966. Remove assert that there must be an alternateImage. The undock button
  3967. does not have an alternate image, and this assert would trigger each
  3968. time the inspector was opened.
  3969. Reviewed by Timothy Hatcher.
  3970. * UserInterface/ToggleButtonNavigationItem.js:
  3971. (WebInspector.ToggleButtonNavigationItem):
  3972. 2013-04-03 Jessie Berlin <jberlin@apple.com>
  3973. Ran update-safari-localizable-strings.
  3974. * Localizations/en.lproj/localizedStrings.js:
  3975. 2013-04-03 Timothy Hatcher <timothy@apple.com>
  3976. Add switch to activate / deactivate all breakpoints.
  3977. <rdar://problem/11329057> REGRESSION (Safari 6): Switch to activate / deactivate all
  3978. breakpoints is missing (debugger)
  3979. Reviewed by Joseph Pecoraro.
  3980. * Localizations/en.lproj/localizedStrings.js: Updated.
  3981. * UserInterface/Breakpoint.js:
  3982. (WebInspector.Breakpoint.prototype.get resolved):
  3983. Check DebuggerManager.breakpointsEnabled. This is the easiest approach to get the gray
  3984. icons for breakpoints in all the right places without adding checks at all call sites.
  3985. * UserInterface/DebuggerManager.js:
  3986. (WebInspector.DebuggerManager):
  3987. (WebInspector.DebuggerManager.prototype.get breakpointsEnabled):
  3988. (WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
  3989. (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
  3990. Check the breakpointsEnabled setting when updating the break on exception state.
  3991. * UserInterface/DebuggerSidebarPanel.css:
  3992. (.sidebar > .panel.debugger .breakpoint-toggle): Added.
  3993. (.sidebar > .panel.debugger .breakpoint-toggle.enabled): Added.
  3994. * UserInterface/DebuggerSidebarPanel.js:
  3995. (WebInspector.DebuggerSidebarPanel):
  3996. (WebInspector.DebuggerSidebarPanel.prototype._breakpointsToggleButtonClicked):
  3997. Added a button to the Breakpoints section header.
  3998. 2013-04-03 Antoine Quint <graouts@apple.com>
  3999. <rdar://problem/13566082> DOMTreeManager.highlightRect() does not take scrolling into account
  4000. Add support for the new "usePageCoordinates" argument to DOM.highlightRect()
  4001. and set it to true when highlighting the bounds of generated layers.
  4002. Reviewed by Timothy Hatcher.
  4003. * UserInterface/DOMTreeManager.js:
  4004. (WebInspector.DOMTreeManager.prototype.highlightRect):
  4005. * UserInterface/InspectorBackendCommands.js:
  4006. * UserInterface/LayerTreeSidebarPanel.js:
  4007. (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
  4008. 2013-04-03 Antoine Quint <graouts@apple.com>
  4009. <rdar://problem/13105224> Reflect data grid timeline filters in the Timeline overview
  4010. Apply the filtering of records directly into the timelineOverviewRecordsWithType()
  4011. method which is the method used by the TimelineOverview to gather data. Additionally,
  4012. we now update the content of the TimelineOverview when the filters applied to one of
  4013. the data grids change such that the timeline overview is kept in sync.
  4014. Reviewed by Timothy Hatcher.
  4015. * UserInterface/TimelinesContentView.js:
  4016. (WebInspector.TimelinesContentView.prototype.timelineOverviewRecordsWithType):
  4017. (WebInspector.TimelinesContentView.prototype._dataGridFiltersDidChange):
  4018. 2013-04-03 Antoine Quint <graouts@apple.com>
  4019. <rdar://problem/13557373> Layers panel doesn't know how to account for anonymous layers
  4020. Handle the new "isAnonymous" property on the protocol and the renamed
  4021. "pseudoElement" property. We also format use of pseudo-elements better
  4022. and handle the somewhat unlikely possibility that we would deal with
  4023. layers with unknown nodes.
  4024. Reviewed by Timothy Hatcher.
  4025. * Localizations/en.lproj/localizedStrings.js:
  4026. New localized string for "Unknown node".
  4027. * UserInterface/LayerTreeDataGridNode.js:
  4028. (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
  4029. Update the "no-node" class on the data grid node's element.
  4030. (WebInspector.LayerTreeDataGridNode.prototype.set layer):
  4031. Set an "Unknown node" label for layers with an unknown node, which
  4032. shouldn't really happen, but we should be prepared for the possibility.
  4033. Seeing this message means that the agent should be taught how to deal
  4034. with a probably edge case. We also update the code to deal with the
  4035. "pseudoElement" property instead of "pseudoClass" to match the protocol
  4036. change. Finally, we also update the "no-node" class on the data grid's node.
  4037. (WebInspector.LayerTreeDataGridNode.prototype._updateDOMNodeAvailability):
  4038. New method to update the "no-node" class on the data grid's node so
  4039. that we may hide the go-to arrow button in the case where there is
  4040. no associated node.
  4041. * UserInterface/LayerTreeSidebarPanel.css:
  4042. (.layer-tree.panel .data-grid tr.no-node .go-to-arrow):
  4043. Hide the go-to arrow button in the case where there is no associated node.
  4044. * UserInterface/LayerTreeSidebarPanel.js:
  4045. (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
  4046. Also use highlightRect() in the case where the layer is anonymous.
  4047. 2013-04-02 Joseph Pecoraro <pecoraro@apple.com>
  4048. <rdar://problem/13548470> REGRESSION: Web inspector hung after searching for "swf"
  4049. Reviewed by Timothy Hatcher.
  4050. * UserInterface/TextEditor.js:
  4051. (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
  4052. Be more careful providing a center margin when the text size and editor
  4053. height can be fractional. If the margin is greater than half the size of
  4054. the editor, CodeMirror gets stuck in an infinite loop.
  4055. 2013-04-02 Joseph Pecoraro <pecoraro@apple.com>
  4056. ERROR: TypeError: 'undefined' is not an object (evaluating 'this._profileView.showTimeAsPercent.value')
  4057. When selecting a CSS Profile, displayProfile could trigger from the
  4058. superclass constructor before the showTimeAsPercent Setting was
  4059. initialized, causing this error. ProfileView's are assumed to have
  4060. this property, and the ProfileView constructor had an unused
  4061. parameter, which looks like it was intended for this purpose.
  4062. Reviewed by Timothy Hatcher.
  4063. * UserInterface/CSSSelectorProfileView.js:
  4064. (WebInspector.CSSSelectorProfileView):
  4065. * UserInterface/JavaScriptProfileView.js:
  4066. (WebInspector.JavaScriptProfileView):
  4067. * UserInterface/ProfileView.js:
  4068. (WebInspector.ProfileView):
  4069. 2013-04-02 Timothy Hatcher <timothy@apple.com>
  4070. Update toolbar layout for recent flex box changes.
  4071. <rdar://problem/13556024>
  4072. Reviewed by Joseph Pecoraro.
  4073. * UserInterface/Toolbar.css:
  4074. (.toolbar .item-section): Added min-width: -webkit-min-content.
  4075. min-width now defaults to 0, but we need the sections to stop at the
  4076. content size so the JavaScript layout function can do the right thing.
  4077. 2013-04-02 Antoine Quint <graouts@apple.com>
  4078. <rdar://problem/13545256> Automatic selection of a CSS profile upon finishing recording fails to show any content
  4079. Make sure we set the "showAsTimePercent" property before calling super since
  4080. it may be used by the generated WebInspector.CSSSelectorDataGridNode in
  4081. displayProfile() which would be called in the super call in the case where
  4082. the view is created as the profile finishes recording.
  4083. Reviewed by Timothy Hatcher.
  4084. * UserInterface/CSSSelectorProfileView.js:
  4085. (WebInspector.CSSSelectorProfileView):
  4086. 2013-04-01 Timothy Hatcher <timothy@apple.com>
  4087. Fix the icons for the exception breakpoints.
  4088. <rdar://problem/13552326> REGRESSION: Exception breakpoints are missing custom icons
  4089. Reviewed by Joseph Pecoraro.
  4090. * UserInterface/DebuggerSidebarPanel.js:
  4091. (WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName): Added.
  4092. This property was expected to exist but got removed at some point.
  4093. BreakpointTreeElement property handled undefined and used the generic icon.
  4094. 2013-04-01 Timothy Hatcher <timothy@apple.com>
  4095. Compressed PNGs with pngcrush and further reduced the size of some PDFs by re-exporting them. Removed some unused images too.
  4096. This goes from 2.1 MB of images down to 1.2 MB.
  4097. Rubber-stamped by Joseph Pecoraro.
  4098. * UserInterface/Images/ApplicationCache.png:
  4099. * UserInterface/Images/ApplicationCache@2x.png:
  4100. * UserInterface/Images/ApplicationCacheManifest.png:
  4101. * UserInterface/Images/ApplicationCacheManifest@2x.png:
  4102. * UserInterface/Images/Breakpoint.png:
  4103. * UserInterface/Images/Breakpoint@2x.png:
  4104. * UserInterface/Images/BreakpointInactive.png:
  4105. * UserInterface/Images/BreakpointInactive@2x.png:
  4106. * UserInterface/Images/ClippingGeneric.png:
  4107. * UserInterface/Images/ClippingGeneric@2x.png:
  4108. * UserInterface/Images/ClippingJS.png:
  4109. * UserInterface/Images/ClippingJS@2x.png:
  4110. * UserInterface/Images/Close.pdf:
  4111. * UserInterface/Images/Colors.png:
  4112. * UserInterface/Images/Colors@2x.png:
  4113. * UserInterface/Images/Cookie.png:
  4114. * UserInterface/Images/Cookie@2x.png:
  4115. * UserInterface/Images/Crosshair.pdf:
  4116. * UserInterface/Images/DOMCharacterData.pdf:
  4117. * UserInterface/Images/DOMComment.pdf:
  4118. * UserInterface/Images/DOMDocument.pdf:
  4119. * UserInterface/Images/DOMDocumentType.pdf:
  4120. * UserInterface/Images/DOMElement.pdf:
  4121. * UserInterface/Images/DOMNode.pdf:
  4122. * UserInterface/Images/DOMTextNode.pdf:
  4123. * UserInterface/Images/DOMTree.pdf:
  4124. * UserInterface/Images/Database.png:
  4125. * UserInterface/Images/Database@2x.png:
  4126. * UserInterface/Images/DatabaseTable.png:
  4127. * UserInterface/Images/DatabaseTable@2x.png:
  4128. * UserInterface/Images/DisclosureTriangleSmallClosed.pdf:
  4129. * UserInterface/Images/DisclosureTriangleSmallOpen.pdf:
  4130. * UserInterface/Images/DockBottom.pdf:
  4131. * UserInterface/Images/DockRight.pdf:
  4132. * UserInterface/Images/DocumentCSS.png:
  4133. * UserInterface/Images/DocumentCSS@2x.png:
  4134. * UserInterface/Images/DocumentFont.png:
  4135. * UserInterface/Images/DocumentFont@2x.png:
  4136. * UserInterface/Images/DocumentGeneric.png:
  4137. * UserInterface/Images/DocumentGeneric@2x.png:
  4138. * UserInterface/Images/DocumentImage.png:
  4139. * UserInterface/Images/DocumentImage@2x.png:
  4140. * UserInterface/Images/DocumentJS.png:
  4141. * UserInterface/Images/DocumentJS@2x.png:
  4142. * UserInterface/Images/DocumentMarkup.png:
  4143. * UserInterface/Images/DocumentMarkup@2x.png:
  4144. * UserInterface/Images/EventListener.pdf:
  4145. * UserInterface/Images/Exception.pdf:
  4146. * UserInterface/Images/FilterFieldGlyph.pdf:
  4147. * UserInterface/Images/FolderGeneric.png:
  4148. * UserInterface/Images/FolderGeneric@2x.png:
  4149. * UserInterface/Images/Function.pdf:
  4150. * UserInterface/Images/HierarchicalNavigationItemChevron.pdf:
  4151. * UserInterface/Images/InstructionPointer.png:
  4152. * UserInterface/Images/InstructionPointer@2x.png:
  4153. * UserInterface/Images/LeftSidebarClose.pdf: Removed.
  4154. * UserInterface/Images/LeftSidebarOpen.pdf: Removed.
  4155. * UserInterface/Images/LessColumns.pdf:
  4156. * UserInterface/Images/LocalStorage.png:
  4157. * UserInterface/Images/LocalStorage@2x.png:
  4158. * UserInterface/Images/Log.png:
  4159. * UserInterface/Images/Log@2x.png:
  4160. * UserInterface/Images/MoreColumns.pdf:
  4161. * UserInterface/Images/NavigationItemAngleBrackets.pdf:
  4162. * UserInterface/Images/NavigationItemBug.pdf:
  4163. * UserInterface/Images/NavigationItemCurleyBraces.pdf:
  4164. * UserInterface/Images/NavigationItemFile.pdf:
  4165. * UserInterface/Images/NavigationItemLayers.pdf:
  4166. * UserInterface/Images/NavigationItemLog.pdf:
  4167. * UserInterface/Images/NavigationItemRuler.pdf: Removed.
  4168. * UserInterface/Images/NavigationItemStopwatch.pdf:
  4169. * UserInterface/Images/NavigationItemStorage.pdf:
  4170. * UserInterface/Images/Network.png:
  4171. * UserInterface/Images/Network@2x.png:
  4172. * UserInterface/Images/NetworkBarBlue.png:
  4173. * UserInterface/Images/NetworkBarBlue@2x.png:
  4174. * UserInterface/Images/NetworkBarGray.png:
  4175. * UserInterface/Images/NetworkBarGray@2x.png:
  4176. * UserInterface/Images/NetworkBarGreen.png:
  4177. * UserInterface/Images/NetworkBarGreen@2x.png:
  4178. * UserInterface/Images/NetworkBarLabelCalloutLeft.pdf:
  4179. * UserInterface/Images/NetworkBarLabelCalloutRight.pdf:
  4180. * UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf:
  4181. * UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf:
  4182. * UserInterface/Images/NetworkBarOrange.png:
  4183. * UserInterface/Images/NetworkBarOrange@2x.png:
  4184. * UserInterface/Images/NetworkBarPurple.png:
  4185. * UserInterface/Images/NetworkBarPurple@2x.png:
  4186. * UserInterface/Images/NetworkBarRed.png:
  4187. * UserInterface/Images/NetworkBarRed@2x.png:
  4188. * UserInterface/Images/NetworkBarWhiteFlat.png:
  4189. * UserInterface/Images/NetworkBarWhiteFlat@2x.png:
  4190. * UserInterface/Images/NetworkBarYellow.png:
  4191. * UserInterface/Images/NetworkBarYellow@2x.png:
  4192. * UserInterface/Images/NetworkHollowBarBlue.png:
  4193. * UserInterface/Images/NetworkHollowBarBlue@2x.png:
  4194. * UserInterface/Images/NetworkHollowBarGray.png:
  4195. * UserInterface/Images/NetworkHollowBarGray@2x.png:
  4196. * UserInterface/Images/NetworkHollowBarGreen.png:
  4197. * UserInterface/Images/NetworkHollowBarGreen@2x.png:
  4198. * UserInterface/Images/NetworkHollowBarOrange.png:
  4199. * UserInterface/Images/NetworkHollowBarOrange@2x.png:
  4200. * UserInterface/Images/NetworkHollowBarPurple.png:
  4201. * UserInterface/Images/NetworkHollowBarPurple@2x.png:
  4202. * UserInterface/Images/NetworkHollowBarRed.png:
  4203. * UserInterface/Images/NetworkHollowBarRed@2x.png:
  4204. * UserInterface/Images/NetworkHollowBarYellow.png:
  4205. * UserInterface/Images/NetworkHollowBarYellow@2x.png:
  4206. * UserInterface/Images/Pause.pdf:
  4207. * UserInterface/Images/Profile.png:
  4208. * UserInterface/Images/Profile@2x.png:
  4209. * UserInterface/Images/Recording.png:
  4210. * UserInterface/Images/RecordingHovered.png:
  4211. * UserInterface/Images/RecordingHovered@2x.png:
  4212. * UserInterface/Images/RecordingStopped.png:
  4213. * UserInterface/Images/RecordingStopped@2x.png:
  4214. * UserInterface/Images/ResultLine.pdf:
  4215. * UserInterface/Images/Resume.pdf:
  4216. * UserInterface/Images/RightSidebarClose.pdf: Removed.
  4217. * UserInterface/Images/RightSidebarOpen.pdf: Removed.
  4218. * UserInterface/Images/Script.png:
  4219. * UserInterface/Images/Script@2x.png:
  4220. * UserInterface/Images/SessionStorage.png:
  4221. * UserInterface/Images/SessionStorage@2x.png:
  4222. * UserInterface/Images/SourceCode.pdf:
  4223. * UserInterface/Images/StepInto.pdf:
  4224. * UserInterface/Images/StepOut.pdf:
  4225. * UserInterface/Images/StepOver.pdf:
  4226. * UserInterface/Images/Stopwatch.png:
  4227. * UserInterface/Images/Stopwatch@2x.png:
  4228. * UserInterface/Images/StyleRuleAuthor.pdf:
  4229. * UserInterface/Images/StyleRuleInherited.pdf:
  4230. * UserInterface/Images/StyleRuleInheritedElement.pdf:
  4231. * UserInterface/Images/StyleRuleInspector.pdf:
  4232. * UserInterface/Images/StyleRuleUser.pdf:
  4233. * UserInterface/Images/StyleRuleUserAgent.pdf:
  4234. * UserInterface/Images/TimelineBarBlue.png:
  4235. * UserInterface/Images/TimelineBarBlue@2x.png:
  4236. * UserInterface/Images/TimelineBarOrange.png:
  4237. * UserInterface/Images/TimelineBarOrange@2x.png:
  4238. * UserInterface/Images/TimelineBarPurple.png:
  4239. * UserInterface/Images/TimelineBarPurple@2x.png:
  4240. * UserInterface/Images/ToggleArrowDown.pdf: Removed.
  4241. * UserInterface/Images/ToggleArrowUp.pdf: Removed.
  4242. * UserInterface/Images/Undock.pdf:
  4243. * UserInterface/Images/UserInputPrompt.pdf:
  4244. * UserInterface/Images/UserInputPromptPrevious.pdf:
  4245. * UserInterface/Images/UserInputResult.pdf:
  4246. 2013-03-31 Timothy Hatcher <timothy@apple.com>
  4247. Allow changing Web Inspector dock sides without undocking first.
  4248. Holding option will change the undock button to the opposite attachment side. When clicked
  4249. the button will change to the other attachment side. Holding option with allow undock. This
  4250. keeps the last used option available if the user hardly undocks but frequently changes sides.
  4251. rdar://problem/13543127
  4252. Reviewed by Antoine Quint.
  4253. * Localizations/en.lproj/localizedStrings.js: Updated.
  4254. * UserInterface/Images/Dock.pdf: Removed.
  4255. * UserInterface/Images/DockBottom.pdf: Added.
  4256. * UserInterface/Images/DockRight.pdf: Added.
  4257. * UserInterface/Main.js:
  4258. (WebInspector.loaded): Added key event listeners.
  4259. (WebInspector.contentLoaded): Use ToggleControlToolbarItem for undock button.
  4260. (WebInspector._windowKeyDown): Added.
  4261. (WebInspector._windowKeyUp): Added.
  4262. (WebInspector._undock):
  4263. (WebInspector._updateDockNavigationItems):
  4264. Set and check toggled state for undock button and do the right thing.
  4265. * UserInterface/ToggleButtonNavigationItem.js:
  4266. (WebInspector.ToggleButtonNavigationItem.prototype.set alternateToolTip): Added.
  4267. (WebInspector.ToggleButtonNavigationItem.prototype.set alternateImage): Added.
  4268. 2013-04-01 Joseph Pecoraro <pecoraro@apple.com>
  4269. <rdar://problem/13492413> Improve line number subtitle for SourceMap Breakpoints in Debugger sidebar
  4270. If a breakpoint is in a SourceMapResource, there is a subtitle showing
  4271. the original location. If the original location is in a formatted file
  4272. show the italics formatted location that you would jump to. Don't show
  4273. a subtitle for breakpoints in formatted resources, just the Line:Column.
  4274. Reviewed by Timothy Hatcher.
  4275. * UserInterface/BreakpointTreeElement.css:
  4276. (.item.breakpoint .subtitle.formatted-location):
  4277. Italics if the subtitle is displaying a formatted location.
  4278. * UserInterface/BreakpointTreeElement.js:
  4279. (WebInspector.BreakpointTreeElement):
  4280. (WebInspector.BreakpointTreeElement.prototype._updateTitles):
  4281. For SourceMap resources, show the formatted / original location.
  4282. Always have the real original location in the tooltip.
  4283. (WebInspector.BreakpointTreeElement.prototype._breakpointLocationDidChange):
  4284. Update the titles if any location changes (the original file may
  4285. have been formatted, and we'd want to update for that).
  4286. * UserInterface/GeneralTreeElement.js:
  4287. (WebInspector.GeneralTreeElement.prototype.get subtitleElement):
  4288. Be sure to create the title element the subtitle gets appended to.
  4289. * UserInterface/ResourceSidebarPanel.js:
  4290. (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeLocation):
  4291. This essentially means, show location in the editor.
  4292. * UserInterface/SourceCodeLocation.js:
  4293. (WebInspector.SourceCodeLocation.prototype.formattedLocationString):
  4294. Helper for getting the display string for the formatted location.
  4295. 2013-04-01 Joseph Pecoraro <pecoraro@apple.com>
  4296. Avoid some asserts that can happen when reformatting files with breakpoints.
  4297. Reviewed by Timothy Hatcher.
  4298. * UserInterface/SourceCodeTextEditor.js:
  4299. (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
  4300. * UserInterface/TextEditor.js:
  4301. (WebInspector.TextEditor.prototype.updateStyles):
  4302. (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
  4303. 2013-03-29 Timothy Hatcher <timothy@apple.com>
  4304. Add CSS as a known source type.
  4305. <rdar://problem/13498380> ASSERTION: IssueMessage.js:64: Unknown issue source: css
  4306. Reviewed by Ricky Mondello.
  4307. * UserInterface/IssueMessage.js:
  4308. (WebInspector.IssueMessage):
  4309. 2013-03-29 Timothy Hatcher <timothy@apple.com>
  4310. Don't try to toggle visibility if a toggle is already pending.
  4311. <rdar://problem/13401011> New Shortcut to hide/show elements while
  4312. inspecting breaks if you leave the key pressed.
  4313. Reviewed by Joseph Pecoraro.
  4314. * UserInterface/DOMTreeOutline.js:
  4315. (WebInspector.DOMTreeOutline.prototype._hideElement.toggleProperties):
  4316. (WebInspector.DOMTreeOutline.prototype._hideElement):
  4317. 2013-03-29 Joseph Pecoraro <pecoraro@apple.com>
  4318. Avoid a SourceMapResource Folder chain of single level folders.
  4319. On of my test cases, <http://dev.fontdragr.com>, a resource with
  4320. a source map has all its source map resources in a "src" folder.
  4321. This creates a poor experience in the resources sidebar. When
  4322. expanding the resource, there is just a "src" folder. In those
  4323. cases, and in general if there is one long chain of folders,
  4324. don't even use folders.
  4325. Reviewed by Timothy Hatcher.
  4326. * UserInterface/SourceCodeTreeElement.js:
  4327. (WebInspector.SourceCodeTreeElement.prototype.onpopulate.folderHasOnlyResourceChildren):
  4328. (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
  4329. (WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
  4330. 2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
  4331. <rdar://problem/13310717> Source Maps: should display folder hierarchy in the sidebar
  4332. Resolve "./" and "../" in URL paths in parseURL. Leave the path
  4333. unadjusted if we get to a point we don't know how to handle, e.g.
  4334. too many "../" components.
  4335. Reviewed by Timothy Hatcher.
  4336. * UserInterface/SourceCodeTreeElement.js:
  4337. (WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
  4338. * UserInterface/Utilities.js:
  4339. 2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
  4340. <rdar://problem/13310717> Source Maps: should display folder hierarchy in the sidebar
  4341. Often SourceMap's include sources in a hierarchy. We should create
  4342. a folder structure for that hierarchy in the resources sidebar. When
  4343. the SourceMap is part of a Frame, we don't do this, we still just
  4344. sort SourceMapResources into their associated type folder.
  4345. Reviewed by Timothy Hatcher.
  4346. * UserInterface/ResourceTreeElement.js:
  4347. (WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements):
  4348. Added a generic sort function that can take both Folder and Resource
  4349. tree elements. It sorts folders first, by name, then resources by their
  4350. normal sort order (type and name).
  4351. * UserInterface/SourceMap.js:
  4352. (WebInspector.SourceMap.prototype.get sourceMappingURLBasePath):
  4353. When the source map resolves its sources it builds an absolute URL
  4354. using the partial URL (map.sourceRoot + map.source[i]) and base URL
  4355. of the provided sourceMappingURL. We can use this "base path" to
  4356. get only the individual source's relative subpath later on.
  4357. * UserInterface/SourceMapResource.js:
  4358. (WebInspector.SourceMapResource.prototype.get sourceMapRelativeSubpath):
  4359. Get the subpath relative to the SourceMap's url. This allows us
  4360. to get the path components and build a directory tree.
  4361. * UserInterface/SourceCodeTreeElement.js:
  4362. (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
  4363. (WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
  4364. (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
  4365. Given a subpath, create folders as needed and insert the actual
  4366. SourceMapResourceTreeElement inside the deepest folder. Cache
  4367. folders along the way so we don't re-create folders, and so that
  4368. we can look them up again later if needed.
  4369. 2013-03-28 Timothy Hatcher <timothy@apple.com>
  4370. Combine and minify CodeMirror scripts and styles in Production builds.
  4371. <rdar://problem/13446918>
  4372. Reviewed by Joseph Pecoraro.
  4373. * Scripts/combine-resources.pl:
  4374. * Scripts/copy-user-interface-resources.sh:
  4375. 2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
  4376. Unreviewed. Missing semicolon causing warning when stripping asserts.
  4377. * UserInterface/TextEditor.js:
  4378. (WebInspector.TextEditor.prototype.updateBreakpointLineAndColumn):
  4379. 2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
  4380. <rdar://problem/13412969> Reveal line centered hits a code mirror exception unless put in setTimeout
  4381. CodeMirror issue has been fixed. Remove the "delay" form paths that
  4382. would have hit the exception before. They no longer do.
  4383. Reviewed by Timothy Hatcher.
  4384. * UserInterface/TextEditor.js:
  4385. (WebInspector.TextEditor.prototype.revealAndHighlightLine):
  4386. (WebInspector.TextEditor.prototype.revealLine):
  4387. (WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
  4388. (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
  4389. 2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
  4390. <rdar://problem/13412969> Reveal line centered hits a code mirror exception unless put in setTimeout
  4391. <rdar://problem/13512430> Idle Inspector recalculates styles a few times a second because of CodeMirror
  4392. Update CodeMirror to trunk to get a few recent fixes.
  4393. Reviewed by Timothy Hatcher.
  4394. * UserInterface/External/CodeMirror/codemirror.js:
  4395. * UserInterface/External/CodeMirror/sass.js:
  4396. 2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
  4397. Add a small script to update CodeMirror resources.
  4398. Reviewed by Cody Krieger.
  4399. * Scripts/update-codemirror-resources.rb: Added.
  4400. 2013-03-28 Jessie Berlin <jberlin@apple.com>
  4401. Ran update-safari-localizable-strings.
  4402. * Localizations/en.lproj/localizedStrings.js:
  4403. 2013-03-28 Antoine Quint <graouts@apple.com>
  4404. <rdar://problem/13505485> REGRESSION: Can't copy links from the console via the context menu
  4405. Let the default context menu show if the user targeted an
  4406. <a> element that is not a console message URL.
  4407. Reviewed by Timothy Hatcher.
  4408. * UserInterface/LogContentView.js:
  4409. (WebInspector.LogContentView.prototype._handleContextMenuEvent):
  4410. 2013-03-28 Antoine Quint <graouts@apple.com>
  4411. <rdar://problem/13526203> Recording profiles in the Instruments sidebar should show a spinner
  4412. Remove the "Recording" prefix for profiles that are recording and
  4413. instead use an indeterminate spinner to indicate the profile is
  4414. recording.
  4415. Reviewed by Timothy Hatcher.
  4416. * Localizations/en.lproj/localizedStrings.js:
  4417. Remove unused string "Recording JavaScript Profile %s\u2026".
  4418. * UserInterface/InstrumentSidebarPanel.js:
  4419. (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
  4420. Remove the indeterminate spinner from the tree element representing
  4421. the profile that finished recording.
  4422. (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
  4423. For profiles that are presently recording, simulate the pending
  4424. addition of the tree element by adding 1 to the generated number.
  4425. This ensures that the generated title matches the one that will
  4426. appear as this method is called again upon recording completion.
  4427. (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded):
  4428. Add an indeterminate spinner to the tree element representing
  4429. the newly-added profile.
  4430. * UserInterface/ProfileManager.js:
  4431. (WebInspector.ProfileManager.prototype.startProfilingCSSSelectors):
  4432. (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
  4433. (WebInspector.ProfileManager.prototype.profileWasStartedFromConsole):
  4434. (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
  4435. Use the final title directly since we're now using an indeterminate
  4436. spinner to indicate a profile is recording.
  4437. 2013-03-28 Antoine Quint <graouts@apple.com>
  4438. <rdar://problem/13525984> Profile name in navigation bar breadcrumbs doesn't update when recording completes
  4439. Propagate an event when a GeneralTreeElement's "mainTitle"
  4440. property changes such that the NavigationBar may eventually
  4441. pick it up and update itself.
  4442. Reviewed by Timothy Hatcher.
  4443. * UserInterface/GeneralTreeElement.js:
  4444. (WebInspector.GeneralTreeElement.prototype.set mainTitle):
  4445. Dispatch the new MainTitleDidChange event.
  4446. * UserInterface/GeneralTreeElementPathComponent.js:
  4447. (WebInspector.GeneralTreeElementPathComponent):
  4448. Register a listener for the MainTitleDidChange event on the
  4449. provided GeneralTreeElement.
  4450. (WebInspector.GeneralTreeElementPathComponent.prototype._mainTitleDidChange):
  4451. Update the "displayName" property to match the GeneralTreeElement's
  4452. updated "mainTitle" property.
  4453. * UserInterface/TreeOutline.js:
  4454. (TreeOutline):
  4455. (TreeElement):
  4456. Make both TreeOutline and TreeElement subclasses of
  4457. WebInspector.Object such that they may dispatch events.
  4458. 2013-03-28 Antoine Quint <graouts@apple.com>
  4459. <rdar://problem/13105775> Handle currently recording profiles in a more graceful manner
  4460. We now present a nice-looking "RecordingÉ" message when a recording
  4461. profile is selected in the instruments sidebar.
  4462. Reviewed by Timothy Hatcher.
  4463. * Localizations/en.lproj/localizedStrings.js:
  4464. New "RecordingÉ" string used to present when we're recording a profile
  4465. of an unknown type (future-proofing).
  4466. * UserInterface/CSSSelectorProfileView.js:
  4467. (WebInspector.CSSSelectorProfileView):
  4468. (WebInspector.CSSSelectorProfileView.prototype.recordingTitle):
  4469. (WebInspector.CSSSelectorProfileView.prototype.displayProfile):
  4470. Implement the new ProfileView protocol to display the profile
  4471. data only when it's available.
  4472. * UserInterface/JavaScriptProfileView.js:
  4473. (WebInspector.JavaScriptProfileView):
  4474. (WebInspector.JavaScriptProfileView.prototype.recordingTitle):
  4475. (WebInspector.JavaScriptProfileView.prototype.displayProfile.profileCallback):
  4476. (WebInspector.JavaScriptProfileView.prototype.displayProfile):
  4477. Implement the new ProfileView protocol to display the profile
  4478. data only when it's available.
  4479. * UserInterface/Main.html:
  4480. Add the new ProfileView.css file.
  4481. * UserInterface/ProfileManager.js:
  4482. (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
  4483. Ensure we set the "recording" property last as it would fire the
  4484. new WebInspector.ProfileObject.Event.FinshedRecording event before
  4485. the profile data has been set on the object.
  4486. * UserInterface/ProfileObject.js:
  4487. (WebInspector.ProfileObject.prototype.set recording):
  4488. Dispatch a new WebInspector.ProfileObject.Event.FinshedRecording
  4489. event when the profile has finished recording.
  4490. * UserInterface/ProfileView.css: Added.
  4491. (.recording-profile-view):
  4492. (.recording-profile-view > .indeterminate-progress-spinner):
  4493. (.recording-profile-view > span):
  4494. New CSS support for the new recording message in ProfileView,
  4495. using CSS flexbox to vertically and horizontally center the
  4496. indeterminate spinner and text.
  4497. * UserInterface/ProfileView.js:
  4498. (WebInspector.ProfileView):
  4499. In case the profile for this ProfileView is still recording,
  4500. register for the WebInspector.ProfileObject.Event.FinshedRecording
  4501. event to be notified of when the profile is done recording
  4502. and show a "RecordingÉ" message until then.
  4503. (WebInspector.ProfileView.prototype.displayProfile):
  4504. New method called when the profile has finished recording and
  4505. we've removed the "RecordingÉ" message from display. Meant to
  4506. be implemented by subclasses.
  4507. (WebInspector.ProfileView.prototype.recordingTitle):
  4508. New method called when populating the "RecordingÉ" message allowing
  4509. subclasses to return a clearer message.
  4510. (WebInspector.ProfileView.prototype._profileFinishedRecording):
  4511. Event handler for the WebInspector.ProfileObject.Event.FinshedRecording
  4512. event which removes the "RecordingÉ" message and calls
  4513. displayProfile().
  4514. (WebInspector.ProfileView.prototype._showRecordingMessage):
  4515. Display the "RecordingÉ" message.
  4516. (WebInspector.ProfileView.prototype._hideRecordingMessage):
  4517. Removes the "RecordingÉ" message, if any.
  4518. 2013-03-28 Antoine Quint <graouts@apple.com>
  4519. <rdar://problem/13483963> copying text from the web inspector includes [LOG] when you paste
  4520. Don't add [Log] prefix for log-level messages.
  4521. Reviewed by Timothy Hatcher.
  4522. * UserInterface/ConsoleMessageImpl.js:
  4523. (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
  4524. 2013-03-26 Timothy Hatcher <timothy@apple.com>
  4525. Support for dock-to-right in the Web Inspector.
  4526. rdar://problem/10368152
  4527. Reviewed by Joseph Pecoraro.
  4528. * UserInterface/InspectorFrontendAPI.js:
  4529. (InspectorFrontendAPI.setDockSide):
  4530. * UserInterface/Main.css:
  4531. (body.docked.bottom):
  4532. (body.docked.right):
  4533. (#docked-resizer):
  4534. (body.docked #docked-resizer):
  4535. (body.docked.bottom #docked-resizer):
  4536. (body.docked.right #docked-resizer):
  4537. (body.docked.bottom #toolbar):
  4538. (body.docked.bottom #toolbar .item:not(.flexible-space)):
  4539. (body.docked.right #navigation-sidebar.collapsed > .resizer):
  4540. * UserInterface/Main.js:
  4541. (WebInspector.loaded):
  4542. (WebInspector.contentLoaded):
  4543. (WebInspector.updateDockedState):
  4544. (WebInspector._toolbarDisplayModeDidChange):
  4545. (WebInspector._toolbarSizeModeDidChange):
  4546. (WebInspector._toolbarMouseDown):
  4547. (WebInspector._dockedResizerMouseDown.dockedResizerDrag):
  4548. (WebInspector._dockedResizerMouseDown):
  4549. 2013-03-27 Antoine Quint <graouts@apple.com>
  4550. <rdar://problem/13105774> Recording a profile with the inspector UI should automatically select the new profile upon completion
  4551. Automatically select profiles that completed as a result of the user
  4552. pressing the record button in the instruments sidebar panel.
  4553. Reviewed by Timothy Hatcher.
  4554. * UserInterface/InstrumentSidebarPanel.js:
  4555. (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
  4556. Check the "fromConsole" property on the ProfilingEnded event to
  4557. see whether this profile should be automatically selected.
  4558. * UserInterface/ProfileManager.js:
  4559. (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
  4560. Also indicate whether the ProfilingEnded event is created as a
  4561. result of a profile finishing recording as a result of calling
  4562. one of the console APIs.
  4563. 2013-03-27 Antoine Quint <graouts@apple.com>
  4564. <rdar://problem/13190009> Profile recorded prior to the current page load may show empty content view
  4565. We now create the content view for a profile that finished recording instantly
  4566. rather than delay it until selection. This ensures that all recorded profiles
  4567. are available across page loads, until we navigate away.
  4568. Reviewed by Timothy Hatcher.
  4569. * UserInterface/ConsoleObserver.js:
  4570. (WebInspector.ConsoleObserver.prototype.messageAdded):
  4571. Fix an oversight from the previous commit where we wouldn't distinguish
  4572. calls to console.profile() and console.profileEnd() made as a result
  4573. of starting a profile from the UI or starting a profile by actually
  4574. calling these methods.
  4575. * UserInterface/InstrumentSidebarPanel.js:
  4576. (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
  4577. Force the creation of the content view for the provided profile so that
  4578. the profile is immediately retrieved from the backend and available
  4579. across page loads.
  4580. * UserInterface/ProfileManager.js:
  4581. (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
  4582. (WebInspector.ProfileManager.prototype.addJavaScriptProfile):
  4583. (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
  4584. Pass the currently recording profile as data to the ProfilingEnded
  4585. event dispatched.
  4586. 2013-03-27 Jessie Berlin <jberlin@apple.com>
  4587. Ran update-safari-localizable-strings.
  4588. * Localizations/en.lproj/localizedStrings.js:
  4589. 2013-03-27 Antoine Quint <graouts@apple.com>
  4590. <rdar://problem/13515381> Profiles started from console API don't appear until done
  4591. We now intercept console.profile() and console.profileEnd() messages
  4592. appearing through the ConsoleObserver so that we can simulate
  4593. setRecordingJavaScriptProfile protocol events in the ConsoleManager.
  4594. This allows us to deal with console profiles in a more unified manner.
  4595. The recording button, however, does not go red when a profile is
  4596. recording from the console.
  4597. Reviewed by Timothy Hatcher.
  4598. * Localizations/en.lproj/localizedStrings.js:
  4599. Changed string for "Recording JavaScript ProfileÉ" to allow for
  4600. a profile title as well, since it might be known form the
  4601. console.profile() call that initiated it.
  4602. * UserInterface/ConsoleObserver.js:
  4603. (WebInspector.ConsoleObserver.prototype.messageAdded):
  4604. Check for console.profile() and console.profileEnd() calls and
  4605. inform the ProfileManager that a profile started or ended from
  4606. the console API.
  4607. * UserInterface/ProfileManager.js:
  4608. (WebInspector.ProfileManager.prototype.profileWasStartedFromConsole):
  4609. Simulate a setRecordingJavaScriptProfile protocol event and set up
  4610. the profile's title if provided.
  4611. (WebInspector.ProfileManager.prototype.profileWasEndedFromConsole):
  4612. Simulate a setRecordingJavaScriptProfile protocol event.
  4613. (WebInspector.ProfileManager.prototype.addJavaScriptProfile):
  4614. Remove custom logic to deal with the belated creation of a
  4615. JavaScriptProfileObject for a profile that would have been started
  4616. from the console API since we now get the notification via the simulated
  4617. setRecordingJavaScriptProfile protocol event.
  4618. (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
  4619. Only dispatch the ProfilingStarted event if the profile was initiated
  4620. from the user interface.
  4621. 2013-03-26 Joseph Pecoraro <pecoraro@apple.com>
  4622. Check-in some documentation files on the RWI protocols.
  4623. Better these be checked in then floating on my machine.
  4624. Rubber-stamped by Timothy Hatcher.
  4625. * Documentation/RWI-Messages.graffle: Added.
  4626. * Documentation/RWI-Messages.pdf: Added.
  4627. 2013-03-26 Antoine Quint <graouts@apple.com>
  4628. <rdar://problem/13096650> Debugger popover does not appear sometimes (or is too slow to appear)
  4629. We now dismiss the debugger popover when the hovered token (or the
  4630. popover for it) is no longer hovered for a whole second. Additionally,
  4631. if there is marked text, we immediately show a popover for a newly
  4632. hovered token instead of waiting 500ms so that's easier to go from
  4633. token to token to get their information.
  4634. Reviewed by Joseph Pecoraro.
  4635. * UserInterface/Popover.js:
  4636. (WebInspector.Popover.prototype.get element):
  4637. Newly public property, used to check in hoveredElementCanReleaseHoveredToken() in
  4638. the SourceCodeTextEditor whether the newly hovered element is contained within
  4639. a popover.
  4640. * UserInterface/SourceCodeTextEditor.js:
  4641. (WebInspector.SourceCodeTextEditor.prototype.hoveredElementCanReleaseHoveredToken):
  4642. Check whether the newly hovered element is contained within the presented
  4643. popover or whether text in the popover is selected.
  4644. (WebInspector.SourceCodeTextEditor.prototype.hoveredTokenWasReleased):
  4645. Dismiss the popover since the user has moused out of the hovered token long
  4646. enough that it shouldn't be considered hovered anymore.
  4647. * UserInterface/TextEditor.js:
  4648. (WebInspector.TextEditor.prototype.stopTrackingTokenHovering):
  4649. Remove the window-wide mousemove event listener.
  4650. (WebInspector.TextEditor.prototype.handleEvent):
  4651. Route mousemove events to the _mouseMovedWithMarkedText() method
  4652. if it's the window-wide mousemove event listener.
  4653. (WebInspector.TextEditor.prototype.highlightHoveredExpression):
  4654. Start tracking mousemove events at the window level so that we can
  4655. detect any element, even outside of the text editor, that might be
  4656. hovered long enough to release the hovered token.
  4657. (WebInspector.TextEditor.prototype.removeHighlightOnHoveredExpression):
  4658. Remove the document-wide mousemove event listener and delete the
  4659. _tokenHighlightMarkedText property so that we can use its absence
  4660. to gather that there is no marked text when checking for a newly
  4661. hovered token in _mouseMovedOverEditor().
  4662. (WebInspector.TextEditor.prototype.hoveredElementCanReleaseHoveredToken):
  4663. Public method used to identify whether the hovered element qualifies
  4664. to release the hovered token. The default implementation simply checks
  4665. that the hovered element is the marked text for the hovered token.
  4666. (WebInspector.TextEditor.prototype.hoveredTokenWasReleased):
  4667. Public method meant to be subclassed, called when we've identified that
  4668. the hovered token has been moused out of for more than a second.
  4669. (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
  4670. Immediately check the newly hovered token if there already is
  4671. hovered token, allowing for a quick inspection of hovered tokens.
  4672. (WebInspector.TextEditor.prototype._mouseMovedWithMarkedText):
  4673. Check the hovered element qualifies to release the hover token, and if it so,
  4674. start a one-second timer to release it.
  4675. (WebInspector.TextEditor.prototype._checkHoveredToken):
  4676. Stop the timer started in _mouseMovedWithMarkedText() to check whether
  4677. the currently hovered element could qualify to release the hovered token.
  4678. (WebInspector.TextEditor.prototype._markedTextIsNoLongerHovered):
  4679. Method called when the timer started in _mouseMovedWithMarkedText() to
  4680. check whether the currently hovered element could qualify to relase the
  4681. hovered token has fired.
  4682. 2013-03-26 Antoine Quint <graouts@apple.com>
  4683. <rdar://problem/13505817> Debugger popovers don't appear for undefined values
  4684. Handle the RemoteObject type "undefined" and also implement better
  4685. handling of null Object values as well.
  4686. Reviewed by Timothy Hatcher.
  4687. * UserInterface/SourceCodeTextEditor.js:
  4688. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
  4689. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
  4690. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
  4691. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull):
  4692. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined):
  4693. 2013-03-26 Jessie Berlin <jberlin@apple.com>
  4694. Ran update-safari-localizable-strings.
  4695. Reviewed by Conrad Shultz.
  4696. * Localizations/en.lproj/localizedStrings.js:
  4697. 2013-03-26 Antoine Quint <graouts@apple.com>
  4698. <rdar://problem/13439854> REGRESSION: Copying array or object output does not contain values
  4699. We now simply use the _formattedMessage DOM node if available and
  4700. if the message isn't a stack trace. Then, we insert the URL line,
  4701. with repeat count if set, after the first line.
  4702. Reviewed by Timothy Hatcher.
  4703. * UserInterface/ConsoleMessageImpl.js:
  4704. (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
  4705. 2013-03-26 Antoine Quint <graouts@apple.com>
  4706. <rdar://problem/13345023> Logging an Array after it has been sorted results in its undefined elements not being shown
  4707. Merging code from OpenSource to match the handling of arrays in the Console.
  4708. Reviewed by Timothy Hatcher.
  4709. * Localizations/en.lproj/localizedStrings.js:
  4710. * UserInterface/ConsoleMessageImpl.js:
  4711. (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
  4712. (WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
  4713. (WebInspector.ConsoleMessageImpl.prototype._printArray):
  4714. * UserInterface/RemoteObject.js:
  4715. (WebInspector.RemoteObject.prototype.release):
  4716. (WebInspector.RemoteObject.prototype.arrayLength):
  4717. 2013-03-25 Timothy Hatcher <timothy@apple.com>
  4718. Don't include the main frame document as a separate resource in the sidebar.
  4719. <rdar://problem/13484805> REGRESSION: Main frame is included twice in the Resources sidebar
  4720. Reviewed by Joseph Pecoraro.
  4721. * UserInterface/FrameResourceManager.js:
  4722. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
  4723. Skip resources with type "Document" and with the same url as the frame.
  4724. 2013-03-25 Timothy Hatcher <timothy@apple.com>
  4725. Fix large image scaling after the switch to the new flex model
  4726. <rdar://problem/13493712> REGRESSION: Very poor image squishing when content
  4727. window is narrow / image is large (113222)
  4728. Reviewed by Joseph Pecoraro.
  4729. * UserInterface/ImageResourceContentView.css:
  4730. (.content-view.resource.image):
  4731. (.content-view.resource.image img):
  4732. Use min-width: 0 so the image can shrink.
  4733. 2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
  4734. Turn on support for breakpoints in pretty printed resources and SourceMaps
  4735. We are now getting expected column information from the backend and
  4736. hitting breakpoints on columns as expected. This was the last change
  4737. needed to consider the following tasks complete:
  4738. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  4739. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  4740. Reviewed by Timothy Hatcher.
  4741. * UserInterface/DebuggerSidebarPanel.js:
  4742. (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
  4743. * UserInterface/SourceCodeTextEditor.js:
  4744. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
  4745. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  4746. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
  4747. 2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
  4748. Workaround while still investigating <rdar://problem/13412969>.
  4749. Jump to line centered can still throw an exception when revealing a
  4750. when the content first loads (reveal pending line). So delay in
  4751. just that case.
  4752. Reviewed by Timothy Hatcher.
  4753. * UserInterface/TextEditor.js:
  4754. (WebInspector.TextEditor.prototype.revealAndHighlightLine):
  4755. (WebInspector.TextEditor.prototype.revealLine):
  4756. (WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
  4757. 2013-03-25 Antoine Quint <graouts@apple.com>
  4758. <rdar://problem/13495086> Commands and their result should not be subject to search filtering
  4759. No longer filter out commands and their results based on search terms.
  4760. We also change the CSS class name we use to hide messages that may be
  4761. filtered out due to the search terms to be exclusive rather than
  4762. inclusive.
  4763. Reviewed by Timothy Hatcher.
  4764. * UserInterface/LogContentView.css:
  4765. (.search-in-progress .console-item.filtered-out-by-search):
  4766. (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted):
  4767. (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
  4768. * UserInterface/LogContentView.js:
  4769. (WebInspector.LogContentView.prototype._isMessageVisible):
  4770. (WebInspector.LogContentView.prototype._visibleMessages):
  4771. (WebInspector.LogContentView.prototype._performSearch):
  4772. 2013-03-25 Antoine Quint <graouts@apple.com>
  4773. <rdar://problem/13494748> Expandable console items should only select when clicking outside of the expandable part
  4774. We no longer select messages if the hit area is part of an expandable element.
  4775. This makes it easier to expand nodes and JS objects without first having to
  4776. select the console message.
  4777. Reviewed by Timothy Hatcher.
  4778. * UserInterface/LogContentView.js:
  4779. (WebInspector.LogContentView.prototype._mousedown):
  4780. (WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
  4781. 2013-03-25 Antoine Quint <graouts@apple.com>
  4782. <rdar://problem/13495023> JS objects logged to console can't be expanded using keyboard
  4783. We now also handle expansion of JS objects logged to the console. To support this,
  4784. we add a new VisibleContentDidChange event to WebInspector.Section such that we can
  4785. when the visible content of a given WebInspector.ObjectPropertiesSection is updated,
  4786. since there is no onexpand() method available as is the case with TreeOutline.
  4787. Reviewed by Timothy Hatcher.
  4788. * UserInterface/LogContentView.js:
  4789. (WebInspector.LogContentView.prototype._leftArrowWasPressed):
  4790. (WebInspector.LogContentView.prototype._rightArrowWasPressed.else.bind):
  4791. (WebInspector.LogContentView.prototype._rightArrowWasPressed):
  4792. (WebInspector.LogContentView.prototype._propertiesSectionDidUpdateContent):
  4793. * UserInterface/ObjectPropertiesSection.js:
  4794. (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
  4795. * UserInterface/Section.js:
  4796. (WebInspector.Section):
  4797. (WebInspector.Section.prototype.expand):
  4798. 2013-03-25 Antoine Quint <graouts@apple.com>
  4799. <rdar://problem/13416461> Message repeat count causes bad layout in the Console
  4800. We now always display the warning or error icon as well as the repeat count
  4801. for the message, and we copy the repeat count to the clipboard as well.
  4802. Reviewed by Timothy Hatcher.
  4803. * UserInterface/ConsoleMessageImpl.js:
  4804. (WebInspector.ConsoleMessageImpl.prototype.updateRepeatCount):
  4805. (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
  4806. * UserInterface/LogContentView.css:
  4807. (.console-message .bubble):
  4808. 2013-03-25 Antoine Quint <graouts@apple.com>
  4809. <rdar://problem/13493775> Console log should scroll to reveal messages for highlighted search match
  4810. Make sure we scroll to reveal messages upon highlighting a match.
  4811. Reviewed by Joseph Pecoraro.
  4812. * UserInterface/LogContentView.js:
  4813. (WebInspector.LogContentView.prototype._highlightSearchMatchAtIndex):
  4814. 2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
  4815. <rdar://problem/13418317> REGRESSION: DOM Tree "Edit as HTML" is not inserting newlines with return
  4816. Give multiline WebInspector.startEditing edit boxes have better white-space behavior.
  4817. Reviewed by Timothy Hatcher.
  4818. * UserInterface/Editing.css:
  4819. (.editing.multiline):
  4820. * UserInterface/EditingSupport.js:
  4821. 2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
  4822. <rdar://problem/13491916> Searching forward or back in find banner should reveal in center
  4823. Reviewed by Dean Jackson.
  4824. * UserInterface/TextEditor.js:
  4825. (WebInspector.TextEditor.prototype._revealSearchResult):
  4826. (WebInspector.TextEditor.prototype._isPositionVisible):
  4827. (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
  4828. When revealing a search result, reveal the line centered in
  4829. the editor if needed. Don't do the setTimeout, the lines in
  4830. the editor did not change so we shouldn't need to worry about
  4831. the CodeMirror exception.
  4832. (WebInspector.TextEditor.prototype.revealAndHighlightLine):
  4833. Share the isPositionVisible code.
  4834. (WebInspector.TextEditor.prototype._prettyPrint):
  4835. This is the only case where I know we need the setTimeout delay
  4836. to workaround a CodeMirror exception when autoformatting.
  4837. 2013-03-23 Joseph Pecoraro <pecoraro@apple.com>
  4838. <rdar://problem/13491257> CSS pretty printing no longer works
  4839. For CSS there is now a "css-base" mode with a "text/css" variant,
  4840. and a "text/x-scss" variant. There is a convenience mode "css"
  4841. which explicitly gets the "text/css" variant of the "css-base" mode.
  4842. The pretty printer should extend "css-base". Whether the content
  4843. is "text/css" or "text/x-scss" the mode outputting the tokens will
  4844. be "css-base", and that mode needs to have the pretty printer
  4845. extensions.
  4846. Extend the "css-base" mode, instead of the overly specific text/css
  4847. css mode to have extendedToken and alternate name "css". So, as
  4848. "css-base" creates tokens for either "text/css" or "text/x-scss",
  4849. it will adds our "m-css" style classes and get our styles.
  4850. We still define the "css-rule" mode to be an alias of the text/css
  4851. specific mode. To workaround a limitation of CodeMirror, we don't
  4852. re-extend any properties that have already been extended (token,
  4853. alternate name) and only extend new properties. We get the earlier
  4854. extensions because internally when creating a "css-rule" mode,
  4855. CodeMirror get the text/css variant of "css-base" with "css-base"
  4856. extensions and then applies our extensions on top of that.
  4857. Reviewed by Timothy Hatcher.
  4858. * UserInterface/CodeMirrorFormatters.js:
  4859. * UserInterface/TextEditor.js:
  4860. (WebInspector.TextEditor.prototype.hasFormatter):
  4861. * UserInterface/CodeMirrorAdditions.js:
  4862. 2013-03-23 Joseph Pecoraro <pecoraro@apple.com>
  4863. <rdar://problem/13490780> Find banner status does not update after switching between source files
  4864. When switching content views, reset the find banner and perform a
  4865. search with the find banner's query in the new content view so that
  4866. keyboard shortcuts will work in the new content view even though
  4867. the find banner is hidden.
  4868. Reviewed by Timothy Hatcher.
  4869. * UserInterface/ContentView.js:
  4870. (WebInspector.ContentView.prototype.get hasPerformedSearch):
  4871. (WebInspector.ContentView.prototype.set automaticallyRevealFirstSearchResult):
  4872. Properties used by ContentBrowser to update the find banner when
  4873. switching to the ContentView. Allow a search to be performed on
  4874. a ContentView without automatically jumping to the first result.
  4875. * UserInterface/ContentBrowser.js:
  4876. (WebInspector.ContentBrowser):
  4877. (WebInspector.ContentBrowser.prototype._findBannerDidShow):
  4878. (WebInspector.ContentBrowser.prototype._findBannerDidHide):
  4879. Allow or disallow jumping to the first search result based on banner visibility.
  4880. Keyboard shortcuts will still work.
  4881. (WebInspector.ContentBrowser.prototype._updateFindBanner):
  4882. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
  4883. When the content view changes, update the banner. Search the new
  4884. content view so that keyboard shortcuts work.
  4885. * UserInterface/FindBanner.js:
  4886. (WebInspector.FindBanner.prototype.show):
  4887. (WebInspector.FindBanner.prototype.hide):
  4888. Emit events for when the banner shows or hides.
  4889. * UserInterface/ClusterContentView.js:
  4890. (WebInspector.ClusterContentView.prototype.get hasPerformedSearch):
  4891. (WebInspector.ClusterContentView.prototype.set automaticallyRevealFirstSearchResult):
  4892. * UserInterface/DOMTreeContentView.js:
  4893. (WebInspector.DOMTreeContentView.prototype.get hasPerformedSearch):
  4894. (WebInspector.DOMTreeContentView.prototype.set automaticallyRevealFirstSearchResult):
  4895. (WebInspector.DOMTreeContentView.prototype.performSearch.searchResultsReady):
  4896. (WebInspector.DOMTreeContentView.prototype.performSearch):
  4897. * UserInterface/ScriptContentView.js:
  4898. (WebInspector.ScriptContentView.prototype.get hasPerformedSearch):
  4899. (WebInspector.ScriptContentView.prototype.set automaticallyRevealFirstSearchResult):
  4900. * UserInterface/TextEditor.js:
  4901. (WebInspector.TextEditor):
  4902. (WebInspector.TextEditor.prototype.set automaticallyRevealFirstSearchResult):
  4903. (WebInspector.TextEditor.prototype.addSearchResults.markRanges):
  4904. (WebInspector.TextEditor.prototype.addSearchResults):
  4905. * UserInterface/TextResourceContentView.js:
  4906. (WebInspector.TextResourceContentView.prototype.get hasPerformedSearch):
  4907. (WebInspector.TextResourceContentView.prototype.set automaticallyRevealFirstSearchResult):
  4908. Implement the new ContentView properties. Respect the
  4909. automaticallyRevealFirstSearchResult property by not jumping to the
  4910. first result unless we are allowed too.
  4911. 2013-03-23 Joseph Pecoraro <pecoraro@apple.com>
  4912. Fix a typo causing warnings in the inspector.
  4913. Unreviewed.
  4914. * UserInterface/Main.html:
  4915. 2013-03-23 Antoine Quint <graouts@apple.com>
  4916. <rdar://problem/11682467> Should be able to do a Find in a Log
  4917. Add a search / filter bar to the navigation bar of the console log.
  4918. The search bar can be given focus by hitting Cmd+F, and it can provide
  4919. focus back to the console prompt by hitting Esc. or Enter (which also
  4920. highlights the first matching search result). The Cmd+G and Cmd+Shift+G
  4921. keyboard shortcuts also work as expected.
  4922. Reviewed by Timothy Hatcher.
  4923. * Localizations/en.lproj/localizedStrings.js:
  4924. * UserInterface/JavaScriptLogViewController.js:
  4925. (WebInspector.JavaScriptLogViewController):
  4926. (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
  4927. Add support for the new Cmd+F, Cmd+G and Cmd+Shift+G keyboard shortcuts.
  4928. * UserInterface/LogContentView.css:
  4929. (.log-search-bar > input):
  4930. (.search-in-progress .console-item):
  4931. (.search-in-progress .console-item.matches-search:not(.filtered-out)):
  4932. (.search-in-progress .console-item.matches-search .highlighted):
  4933. (.search-in-progress .console-item.matches-search .highlighted.selected):
  4934. * UserInterface/LogContentView.js:
  4935. (WebInspector.LogContentView):
  4936. Create the SearchBar.
  4937. (WebInspector.LogContentView.prototype.get navigationItems):
  4938. Add the SearchBar to the navigation bar.
  4939. (WebInspector.LogContentView.prototype.get searchInProgress):
  4940. Inidicates whether a search is in progress (ie. search term
  4941. isn't the empty string).
  4942. (WebInspector.LogContentView.prototype.focusSearchBar):
  4943. New API to bring focus to the SearchBar's input field.
  4944. (WebInspector.LogContentView.prototype.highlightPreviousSearchMatch):
  4945. New API to highlight the previous search match.
  4946. (WebInspector.LogContentView.prototype.highlightNextSearchMatch):
  4947. New API to highlight the next search match.
  4948. (WebInspector.LogContentView.prototype.searchBarWantsToLoseFocus):
  4949. SearchBar delegate method we use to move focus back to the prompt
  4950. as the user hit the Esc. key while the search bar has focus.
  4951. (WebInspector.LogContentView.prototype.searchBarDidActivate):
  4952. SearchBar delegate method we use to move focus back to the prompt
  4953. as the user hit the Enter key while the search bar has focus. We
  4954. also select the first search match to make it stand out.
  4955. (WebInspector.LogContentView.prototype._updateMessagesSelection):
  4956. Refactoring: _allVisibleMessages() is now _visibleMessages().
  4957. (WebInspector.LogContentView.prototype._isMessageVisible):
  4958. Take into account whether the message matches the search terms
  4959. so that it's filtered otherwise.
  4960. (WebInspector.LogContentView.prototype._selectAllMessages):
  4961. Refactoring: _allVisibleMessages() is now _visibleMessages().
  4962. (WebInspector.LogContentView.prototype._unfilteredMessages):
  4963. New method to provide the list of messsages that match the
  4964. filters provided via the scope bar.
  4965. (WebInspector.LogContentView.prototype._visibleMessages):
  4966. Refactoring: _allVisibleMessages() is now _visibleMessages().
  4967. Also take into account additional filtering via the search bar.
  4968. (WebInspector.LogContentView.prototype._filterMessages):
  4969. Perform a search after the filters have changed to ensure we
  4970. are showing the correct set of messages.
  4971. (WebInspector.LogContentView.prototype._keyDown):
  4972. Add support for the new Cmd+F, Cmd+G and Cmd+Shift+G keyboard shortcuts.
  4973. (WebInspector.LogContentView.prototype._commandFWasPressed):
  4974. Focus the search bar upon hitting Cmd+F.
  4975. (WebInspector.LogContentView.prototype._commandGWasPressed):
  4976. Highlight the next search match upon hitting Cmd+G.
  4977. (WebInspector.LogContentView.prototype._commandShiftGWasPressed):
  4978. Highlight the next search match upon hitting Cmd+Shift+G.
  4979. (WebInspector.LogContentView.prototype._upArrowWasPressed):
  4980. (WebInspector.LogContentView.prototype._downArrowWasPressed):
  4981. (WebInspector.LogContentView.prototype._previousMessage):
  4982. (WebInspector.LogContentView.prototype._nextMessage):
  4983. (WebInspector.LogContentView.prototype._clearFocusableChildren):
  4984. Refactoring: _allVisibleMessages() is now _visibleMessages().
  4985. (WebInspector.LogContentView.prototype._searchTextDidChange):
  4986. Run the search as the terms in the search bar changed.
  4987. (WebInspector.LogContentView.prototype._performSearch):
  4988. (WebInspector.LogContentView.prototype._highlightRanges):
  4989. Perform a search based on the text in the search bar and apply
  4990. a "matches-search" CSS class to all text ranges matching the
  4991. search terms. This is actually performed by method merged from
  4992. the OpenSource Web Inspector code.
  4993. (WebInspector.LogContentView.prototype._rangesOverlap):
  4994. Checks whether two text ranges overlap at all. We use this to identify
  4995. if the previously selected search term is still present in the new
  4996. set of matching search ranges.
  4997. (WebInspector.LogContentView.prototype._highlightSearchMatchAtIndex):
  4998. Highlights a given term in the array of highlighted elements created in
  4999. _performSearch().
  5000. * UserInterface/Main.html:
  5001. Include the new SearchBar files.
  5002. * UserInterface/Main.js:
  5003. (WebInspector.highlightRangesWithStyleClass):
  5004. (WebInspector.revertDomChanges):
  5005. Methods merged as-is from OpenSource.
  5006. * UserInterface/SearchBar.css: Added.
  5007. (.search-bar > input):
  5008. * UserInterface/SearchBar.js: Added.
  5009. (WebInspector.SearchBar):
  5010. (WebInspector.SearchBar.prototype.get text):
  5011. (WebInspector.SearchBar.prototype.set text):
  5012. (WebInspector.SearchBar.prototype.focus):
  5013. (WebInspector.SearchBar.prototype._handleSearchEvent):
  5014. (WebInspector.SearchBar.prototype._handleKeydownEvent):
  5015. New NavigationItem subclass to provide a SearchBar within a NavigationBar.
  5016. 2013-03-22 Timothy Hatcher <timothy@apple.com>
  5017. Make the New Rule button 10px taller for a bigger hit target.
  5018. <rdar://problem/13470200> I expect the clickable area for "+ New Rule" to be bigger.
  5019. Reviewed by Joseph Pecoraro.
  5020. * UserInterface/RulesStyleDetailsPanel.css:
  5021. (.sidebar > .panel.details.css-style .rules .new-rule):
  5022. 2013-03-22 Timothy Hatcher <timothy@apple.com>
  5023. Show the compression status and the compression amount in the Resource details sidebar.
  5024. <rdar://problem/13201070> Show gzip status of resources more prominently
  5025. Reviewed by Joseph Pecoraro.
  5026. * Localizations/en.lproj/localizedStrings.js: Updated.
  5027. * UserInterface/Resource.js:
  5028. (WebInspector.Resource.prototype.get encodedSize): Added.
  5029. (WebInspector.Resource.prototype.get transferSize): Use encodedSize.
  5030. (WebInspector.Resource.prototype.get compressed): Added.
  5031. * UserInterface/ResourceDetailsSidebarPanel.js:
  5032. (WebInspector.ResourceDetailsSidebarPanel): Added compression group.
  5033. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Call _refreshCompressed.
  5034. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshCompressed): Added.
  5035. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize):
  5036. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize):
  5037. Call _refreshCompressed and update encoded size row.
  5038. 2013-03-21 Timothy Hatcher <timothy@apple.com>
  5039. Add a placeholder for empty style rules in the Style details sidebar.
  5040. Reviewed by Joseph Pecoraro.
  5041. * Localizations/en.lproj/localizedStrings.js: Updated.
  5042. * UserInterface/CSSStyleDeclarationTextEditor.css:
  5043. (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder): Added.
  5044. * UserInterface/CSSStyleDeclarationTextEditor.js:
  5045. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
  5046. Set the placeholder option based on the readOnly state.
  5047. 2013-03-21 Timothy Hatcher <timothy@apple.com>
  5048. Enable auto closing brackets and quotes along with matching bracket highlighting.
  5049. Also share common CodeMirror styles in CodeMirrorOverrides.css.
  5050. Reviewed by Dean Jackson.
  5051. * UserInterface/CSSStyleDeclarationTextEditor.css:
  5052. (.css-style-text-editor > .CodeMirror):
  5053. (.css-style-text-editor > .CodeMirror-scroll):
  5054. * UserInterface/CSSStyleDeclarationTextEditor.js:
  5055. (WebInspector.CSSStyleDeclarationTextEditor):
  5056. * UserInterface/CodeMirrorOverrides.css: Added.
  5057. (.CodeMirror *):
  5058. (.CodeMirror .CodeMirror-lines):
  5059. (.CodeMirror pre):
  5060. (.CodeMirror .CodeMirror-selected):
  5061. (.CodeMirror.CodeMirror-focused .CodeMirror-selected):
  5062. (.CodeMirror .CodeMirror-cursor):
  5063. (.CodeMirror .CodeMirror-lines .CodeMirror-matchingbracket):
  5064. (.CodeMirror .CodeMirror-lines .CodeMirror-nonmatchingbracket):
  5065. (.CodeMirror .CodeMirror-gutters):
  5066. (.CodeMirror .CodeMirror-linenumber):
  5067. * UserInterface/Main.html:
  5068. * UserInterface/TextEditor.css:
  5069. (.text-editor > .CodeMirror):
  5070. * UserInterface/TextEditor.js:
  5071. (WebInspector.TextEditor):
  5072. 2013-03-21 Timothy Hatcher <timothy@apple.com>
  5073. Update CodeMirror to ToT (v3.11+) which includes a scroll performance file and other changes.
  5074. Include the new placeholder and closebrackets add-ons so we can use them in our editors.
  5075. Also includes more modes that could be encountered on the web that we should syntax highlight.
  5076. I've included the SQL mode since I plan to switch the database prompt to use it soon.
  5077. <rdar://problem/13470814> Scrolling in the Style > Rules sidebar is kind of sluggish
  5078. Rubber-stamped by Joseph Pecoraro.
  5079. * UserInterface/External/CodeMirror/clojure.js: Added.
  5080. * UserInterface/External/CodeMirror/closebrackets.js: Added.
  5081. * UserInterface/External/CodeMirror/codemirror.css: Updated.
  5082. * UserInterface/External/CodeMirror/codemirror.js: Updated.
  5083. * UserInterface/External/CodeMirror/coffeescript.js: Added.
  5084. * UserInterface/External/CodeMirror/css.js: Updated.
  5085. * UserInterface/External/CodeMirror/less.js: Added.
  5086. * UserInterface/External/CodeMirror/livescript.js: Added.
  5087. * UserInterface/External/CodeMirror/placeholder.js: Added.
  5088. * UserInterface/External/CodeMirror/sass.js: Added.
  5089. * UserInterface/External/CodeMirror/searchcursor.js: Updated.
  5090. * UserInterface/External/CodeMirror/sql.js: Added.
  5091. * UserInterface/External/CodeMirror/xml.js: Updated.
  5092. * UserInterface/Main.html: Include added files.
  5093. 2013-03-21 Antoine Quint <graouts@apple.com>
  5094. <rdar://problem/13439837> REGRESSION: Copying the output of console.log(1,2,3) only copies "[Log] 1"
  5095. Use the _message property rather than _messageText to provide the base
  5096. textual representation of a console message, as hinted by the _formatMessage
  5097. method which says that _message "is used for inline message bubbles in
  5098. SourceFrames, or other plain-text representations".
  5099. Reviewed by Ricky Mondello.
  5100. * UserInterface/ConsoleMessageImpl.js:
  5101. (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
  5102. 2013-03-20 Timothy Hatcher <timothy@apple.com>
  5103. Make the relaod button appear correctly when inspecting web archives.
  5104. <rdar://problem/13455883> Extra misplaced folder in Inspector sidebar
  5105. Reviewed by Joseph Pecoraro.
  5106. * UserInterface/ResourceTreeElement.css:
  5107. (.item.resource > .status > .reload-button):
  5108. (.item.resource.selected > .status > .reload-button):
  5109. Use .resource instead of .resource-type-document. Since the button exists
  5110. for web archives, and they get .resource-type-other. Fixing web archives
  5111. to get a proper type is tracked by <rdar://problem/6420783>.
  5112. 2013-03-20 Timothy Hatcher <timothy@apple.com>
  5113. Correct some inconsistencies with opening the Inspector and what content views are opened.
  5114. <rdar://problem/12947914> Opening web inspector with Show Page Resources can open inspector in inconsistent state
  5115. Reviewed by Joseph Pecoraro.
  5116. * UserInterface/InspectorFrontendAPI.js:
  5117. (InspectorFrontendAPI.showResources):
  5118. (InspectorFrontendAPI.showMainResourceForFrame):
  5119. Set ignoreLastContentCookie so the ResourceSidebarPanel has a chance to show the content view for the main frame
  5120. once the main frame is known.
  5121. * UserInterface/Main.js:
  5122. (WebInspector.contentLoaded):
  5123. Set collapsed after loading the pending frontend commands are dispatched so only the final selected sidebar panel
  5124. gets shown and has a say in what content view gets shown. Also removed code that collapsed the details sidebar,
  5125. now that sidebars are collapsed by default.
  5126. (WebInspector.sidebarPanelForCurrentContentView): Added.
  5127. * UserInterface/NavigationSidebarPanel.js:
  5128. (WebInspector.NavigationSidebarPanel.prototype.shown):
  5129. Only select the selected tree element again if the content view is from a different sidebar. This way showing the
  5130. Resources sidebar when you have gone back and forth between other resource wont jump to some old selected resource.
  5131. * UserInterface/ResourceSidebarPanel.js:
  5132. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
  5133. Allow onselect if we aren't showing a content view yet. That way the main frame is selected and shown in the content.
  5134. * UserInterface/Sidebar.js:
  5135. (WebInspector.Sidebar):
  5136. (WebInspector.Sidebar.prototype.set width):
  5137. Make collapsed by default. Only tell the sidebar panel about width changes if not collapsed.
  5138. 2013-03-20 Joseph Pecoraro <pecoraro@apple.com>
  5139. <rdar://problem/13442600> Picking a frame in the console context selector menu should refocus the console input
  5140. Detect when the hidden <select> in the HierarchicalPathComponent was
  5141. interacted with, even if its value did not change, and trigger a
  5142. "Clicked" event for those interested. The Console refocuses its prompt
  5143. in these cases when the execution context selector is interacted with.
  5144. Reviewed by Antoine Quint.
  5145. * UserInterface/HierarchicalPathComponent.js:
  5146. (WebInspector.HierarchicalPathComponent):
  5147. (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseUp):
  5148. * UserInterface/QuickConsole.js:
  5149. (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
  5150. (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
  5151. (WebInspector.QuickConsole.prototype._pathComponentClicked):
  5152. 2013-03-20 Timothy Hatcher <timothy@apple.com>
  5153. Make editing CSS resources work correctly again.
  5154. <rdar://problem/13457053> Safari Web Inspector: Editing .css files in main area is jumpy (112750)
  5155. Reviewed by Antoine Quint.
  5156. * UserInterface/CSSStyleManager.js:
  5157. (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
  5158. (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges):
  5159. (WebInspector.CSSStyleManager.prototype._resourceContentDidChange):
  5160. (WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent):
  5161. We were relying on SourceCode.Event.ContentDidChange not firing if the content was equal. However, since we
  5162. coalesce changes the content might be briefly out of sync and the event was firing. That would cause us to
  5163. update TextEditor with a slightly older version of the content and mess up the user.
  5164. 2013-03-19 Timothy Hatcher <timothy@apple.com>
  5165. Don't create a new console group on reload if the current one is empty.
  5166. Also make sure to scroll the new group into view when it is create so it is visible and ready to show new messages.
  5167. <rdar://problem/12951299> Web Inspector console shouldn't draw a line on refresh if nothing was printed
  5168. <rdar://problem/13209212> Console doesn't scroll to the bottom when a reloaded page logs
  5169. Reviewed by Joseph Pecoraro.
  5170. * UserInterface/ConsoleGroup.js:
  5171. (WebInspector.ConsoleGroup.prototype.hasMessages): Added.
  5172. * UserInterface/JavaScriptLogViewController.js:
  5173. (WebInspector.JavaScriptLogViewController.prototype.startNewSession):
  5174. Reuse the previous group if it does not have messages. Also scroll the new session into view so it is ready
  5175. to show messages.
  5176. * UserInterface/LogContentView.css:
  5177. (.console-group.new-session .console-group-messages .console-item:first-child): Added.
  5178. Don't show a border when it is in a new-session since there is already a dashed border.
  5179. 2013-03-19 Timothy Hatcher <timothy@apple.com>
  5180. Don't show storage if we don't have a security origin (about:blank).
  5181. Reviewed by Joseph Pecoraro.
  5182. * UserInterface/StorageManager.js:
  5183. (WebInspector.StorageManager.prototype._securityOriginDidChange):
  5184. 2013-03-19 Timothy Hatcher <timothy@apple.com>
  5185. Don't refresh the metrics display if the user is incrementing/decrementing via the arrow keys.
  5186. When editing is committed or canceled we do a refresh to pick up any changes.
  5187. <rdar://problem/13441338> REGRESSION: Safari Web Inspector: Using Up/Down to
  5188. modify margins loses focus (112566)
  5189. Reviewed by Joseph Pecoraro.
  5190. * UserInterface/BoxModelDetailsSectionRow.js:
  5191. (WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Return early if _ignoreNextRefresh.
  5192. (WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown): Set _ignoreNextRefresh.
  5193. 2013-03-19 Timothy Hatcher <timothy@apple.com>
  5194. Make Local and Session storage work again.
  5195. <rdar://problem/13266278> REGRESSION: Local and Session storage protocol
  5196. changes break displaying these items
  5197. Reviewed by Joseph Pecoraro.
  5198. * UserInterface/DOMStorageObject.js:
  5199. (WebInspector.DOMStorageObject.prototype.getEntries):
  5200. Use DOMStorageAgent.getDOMStorageEntries or DOMStorageAgent.getDOMStorageItems.
  5201. * UserInterface/DOMStorageObserver.js:
  5202. (WebInspector.DOMStorageObserver.prototype.addDOMStorage):
  5203. Revert earlier Curie compatibility support since it changed again!
  5204. * UserInterface/StorageManager.js:
  5205. (WebInspector.StorageManager):
  5206. (WebInspector.StorageManager.prototype._securityOriginDidChange): Added.
  5207. (WebInspector.StorageManager.prototype._domStorageForId):
  5208. When a Frame's security origin changes, add local and session storage if they don't
  5209. already exist for that security origin.
  5210. 2013-03-19 Timothy Hatcher <timothy@apple.com>
  5211. Add securityOrigin to WebInspector.Frame.
  5212. This will be needed to fix DOM Storage inspection.
  5213. Reviewed by Joseph Pecoraro.
  5214. * UserInterface/Frame.js:
  5215. (WebInspector.Frame):
  5216. (WebInspector.Frame.prototype.initialize):
  5217. (WebInspector.Frame.prototype.get securityOrigin): Added.
  5218. Added securityOrigin parameters. Also fire the NameDidChange at the end of initialize
  5219. so the Frame is in the final state instead of an intermediate state.
  5220. * UserInterface/FrameResourceManager.js:
  5221. (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
  5222. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
  5223. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
  5224. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
  5225. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
  5226. (WebInspector.FrameResourceManager.prototype._createFrame):
  5227. Pass along the securityOrigin so Frame can be created or initialized with it.
  5228. Also pass along the frame name in places it was missing, now that we might need it.
  5229. 2013-03-19 Timothy Hatcher <timothy@apple.com>
  5230. Update InspectorBackendCommands to the latest.
  5231. Reviewed by Joseph Pecoraro.
  5232. * UserInterface/InspectorBackend.js:
  5233. (InspectorBackendClass.prototype._getAgent):
  5234. (InspectorBackendClass.prototype.registerCommand):
  5235. (InspectorBackendClass.prototype.registerEnum):
  5236. Added support for registerEnum, which is new.
  5237. * UserInterface/InspectorBackendCommands.js:
  5238. Updated to the latest from Open Source r146200.
  5239. 2013-03-18 Timothy Hatcher <timothy@apple.com>
  5240. Make console messages bottom align if the log hasn't scrolled yet.
  5241. Also includes:
  5242. * Restore clicking the empty space in the log to focus the prompt.
  5243. * Make the prompt top border lighten when the log view is showing.
  5244. <rdar://problem/13442215> Maybe improve console typing UI (112588)
  5245. Reviewed by Joseph Pecoraro.
  5246. * UserInterface/ConsoleGroup.js:
  5247. (WebInspector.ConsoleGroup.prototype.addMessage):
  5248. * UserInterface/LogContentView.css:
  5249. (.console-messages):
  5250. (.console-messages :first-child):
  5251. Use flex layout and an auto top margin to push items to the bottom until scrolled.
  5252. (.console-item):
  5253. (.console-user-command .console-message):
  5254. Move the border to the top since items are bottom aligned now.
  5255. * UserInterface/LogContentView.js:
  5256. (WebInspector.LogContentView.prototype._mousedown):
  5257. Focus the prompt if the click was in empty space.
  5258. * UserInterface/Main.js:
  5259. (WebInspector.showSplitConsole):
  5260. (WebInspector.hideSplitConsole):
  5261. (WebInspector.showFullHeightConsole):
  5262. (WebInspector._contentBrowserCurrentContentViewDidChange):
  5263. Notify the QuickConsole via consoleLogVisibilityChanged when the log view shows
  5264. or hides in the main content browser or split content browser.
  5265. * UserInterface/QuickConsole.css:
  5266. (.quick-console.showing-log): Added. Lighten the border color.
  5267. * UserInterface/QuickConsole.js:
  5268. (WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged): Added.
  5269. Add or remove the showing-log style class.
  5270. 2013-03-17 Timothy Hatcher <timothy@apple.com>
  5271. Tweak how the console view and split console work.
  5272. Clicking the console button will always show the console full height. The console button
  5273. is only blue when the console view is full height. Pressing escape always shows the split
  5274. console. Add support for allowing the content view to decide if the split console can be
  5275. shown. If it can't the full height console is shown instead.
  5276. Reviewed by Joseph Pecoraro.
  5277. * Localizations/en.lproj/localizedStrings.js:
  5278. * UserInterface/ClusterContentView.js:
  5279. (WebInspector.ClusterContentView.prototype.get supportsSplitContentBrowser):
  5280. * UserInterface/ContentView.js:
  5281. (WebInspector.ContentView.prototype.get supportsSplitContentBrowser):
  5282. * UserInterface/ContentViewContainer.js:
  5283. (WebInspector.ContentViewContainer.prototype._showContentView):
  5284. (WebInspector.ContentViewContainer.prototype._hideContentView):
  5285. * UserInterface/InstrumentSidebarPanel.js:
  5286. (WebInspector.InstrumentSidebarPanel):
  5287. * UserInterface/LogContentView.js:
  5288. (WebInspector.LogContentView):
  5289. (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
  5290. (WebInspector.LogContentView.prototype._toggleSplit):
  5291. * UserInterface/Main.js:
  5292. (WebInspector.loaded):
  5293. (WebInspector.contentLoaded):
  5294. (WebInspector.isShowingSplitConsole):
  5295. (WebInspector.currentViewSupportsSplitContentBrowser):
  5296. (WebInspector.toggleSplitConsole):
  5297. (WebInspector.showSplitConsole):
  5298. (WebInspector.hideSplitConsole):
  5299. (WebInspector.showFullHeightConsole):
  5300. (WebInspector.isShowingConsoleView):
  5301. (WebInspector.showConsoleView):
  5302. (WebInspector.toggleConsoleView):
  5303. (WebInspector._contentBrowserCurrentContentViewDidChange):
  5304. * UserInterface/QuickConsole.js:
  5305. (WebInspector.QuickConsole.prototype._toggleOrFocus):
  5306. * UserInterface/TimelinesContentView.js:
  5307. (WebInspector.TimelinesContentView.prototype.get supportsSplitContentBrowser):
  5308. 2013-03-18 Joseph Pecoraro <pecoraro@apple.com>
  5309. <rdar://problem/13443806> Safari Web Inspector: Point-to-inspect mode breaks when Node details sidebar open (112607)
  5310. Fix typos that could cause exceptions.
  5311. Reviewed by Timothy Hatcher.
  5312. * UserInterface/EventListenerSectionGroup.js:
  5313. (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
  5314. 2013-03-17 Timothy Hatcher <timothy@apple.com>
  5315. Stop scaling the MoreColumns.pdf and LessColumns.pdf images.
  5316. Reviewed by Jon Honeycutt.
  5317. * UserInterface/TimelinesContentView.css:
  5318. (.content-view.timelines > .data-grid th.collapser > .collapser-button):
  5319. * UserInterface/TimelinesContentView.js:
  5320. 2013-03-17 Timothy Hatcher <timothy@apple.com>
  5321. Only call SidebarPanel's shown and hidden when the visibility actually changes.
  5322. This was causing the Console view to not be remembered between sessions because the
  5323. InstrumentsPanel was selecting a tree element in the shown function, even though
  5324. the sidebar panel was not visible.
  5325. Reviewed by Joseph Pecoraro.
  5326. * UserInterface/Sidebar.js:
  5327. (WebInspector.Sidebar.prototype.set selectedSidebarPanel):
  5328. (WebInspector.Sidebar.prototype.set collapsed):
  5329. 2013-03-17 Timothy Hatcher <timothy@apple.com>
  5330. Speed up Web Inspector image generation some by using Uint32Array.
  5331. Reviewed by Joseph Pecoraro.
  5332. * UserInterface/ImageUtilities.js:
  5333. (generateColoredImage):
  5334. (generateEmbossedImages._invertMaskImage):
  5335. Use Uint32Array to process the pixels faster. Account for endianness (even though we don't
  5336. really need to since we don't support Windows or PowerPC.)
  5337. * UserInterface/Utilities.js:
  5338. (Uint32Array.isLittleEndian): Added.
  5339. 2013-03-17 Timothy Hatcher <timothy@apple.com>
  5340. Cache and restore generated images to speed up the load time for the Web Inspector.
  5341. <rdar://problem/13436334> Web Inspector takes about 3s to activate
  5342. Reviewed by Joseph Pecoraro.
  5343. * UserInterface/ButtonNavigationItem.js:
  5344. (WebInspector.ButtonNavigationItem.prototype._generateImages):
  5345. Pass !this._imageCacheable to generateEmbossedImages.
  5346. * UserInterface/ImageUtilities.js:
  5347. (generateColoredImage):
  5348. Don't set globalCompositeOperation to "clear" before using webkitPutImageDataHD.
  5349. (generateColoredImagesForCSS):
  5350. (generateColoredImagesForCSS.imageLoaded): Added.
  5351. (generateColoredImagesForCSS.ensureImageIsLoaded): Added.
  5352. (generateColoredImagesForCSS.restoreImages): Added.
  5353. (generateColoredImagesForCSS.restoreImage): Added.
  5354. (generateColoredImagesForCSS.devicePixelRatioChanged): Added.
  5355. (generateColoredImagesForCSS.generateImagesIfNeeded): Renamed from generateImages.
  5356. (generateColoredImagesForCSS.generateImagesIfNeeded.generateActiveImages):
  5357. (generateColoredImagesForCSS.generateImage):
  5358. Try to restore the images first. If needed, load the image and regenerate them.
  5359. (_createImageLocalStorageKey): Added.
  5360. (saveImageToLocalStorage): Added.
  5361. (restoreImageFromLocalStorage): Added.
  5362. (restoreImageFromLocalStorage.parseVersion): Added.
  5363. Save and restore images via pixel arrays with localStorage. Abort the restore
  5364. if versions mismatch or the array size isn't correct.
  5365. (generateEmbossedImages):
  5366. (generateEmbossedImages.imageLoaded): Added.
  5367. (generateEmbossedImages.ensureImageIsLoaded): Added.
  5368. (generateEmbossedImages.restoreImages): Added.
  5369. (generateEmbossedImages.restoreImage): Added.
  5370. (generateEmbossedImages.devicePixelRatioChanged): Added.
  5371. (generateEmbossedImages.generateImagesIfNeeded): Added.
  5372. (generateEmbossedImages.generateImagesIfNeeded.generateActiveImages):
  5373. (generateEmbossedImages.generateImage): Renamed from _createEmbossedCanvasImage.
  5374. Try to restore the images first. If needed, load the image and regenerate them.
  5375. (generateEmbossedImages._invertMaskImage):
  5376. (generateEmbossedImages._applyImageMask):
  5377. Don't set globalCompositeOperation to "clear" before using webkitPutImageDataHD.
  5378. * UserInterface/ToggleButtonNavigationItem.js:
  5379. Mark the image as not cacheable. We need to swap images with the same identifiers.
  5380. 2013-03-17 Timothy Hatcher <timothy@apple.com>
  5381. Make generateColoredImagesForCSS require passing image width and height.
  5382. This will be needed to cache and restore generated images for <rdar://problem/13436334>.
  5383. Reviewed by Joseph Pecoraro.
  5384. * UserInterface/CSSStyleDeclarationSection.js:
  5385. (WebInspector.CSSStyleDeclarationSection):
  5386. * UserInterface/DataGrid.js:
  5387. (WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded):
  5388. * UserInterface/DetailsSection.js:
  5389. (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded):
  5390. * UserInterface/FindBanner.js:
  5391. (WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
  5392. * UserInterface/ImageUtilities.js:
  5393. (generateColoredImagesForCSS):
  5394. * UserInterface/Main.js:
  5395. (WebInspector._generateDisclosureTriangleImages):
  5396. * UserInterface/NavigationSidebarPanel.js:
  5397. (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded):
  5398. 2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
  5399. Simplify giving ExecutionContexts for Frames a name
  5400. Reviewed by Dean Jackson.
  5401. * UserInterface/FrameResourceManager.js:
  5402. (WebInspector.FrameResourceManager.prototype.executionContextCreated):
  5403. * UserInterface/QuickConsole.js:
  5404. (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
  5405. Make both iOS 6 and trunk use the frame's main resource's display name.
  5406. 2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
  5407. Clean-up Weight.svg a little more.
  5408. Rubber-stamped by Timothy Hatcher.
  5409. * UserInterface/Images/Weight.svg:
  5410. Removed the path id, and extra processing instruction attribute.
  5411. 2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
  5412. Add Execution Context / Frame selector to the QuickConsole
  5413. <rdar://problem/10809363> PARITY (WebKit Web Inspector): UI for evaluating in different windows / frames from the console is missing
  5414. Reviewed by Dean Jackson.
  5415. * UserInterface/ExecutionContext.js:
  5416. (WebInspector.ExecutionContext):
  5417. Allow an execution context with the special undefined identifier.
  5418. * UserInterface/NavigationBar.js:
  5419. (WebInspector.NavigationBar.prototype.get sizesToFit):
  5420. * UserInterface/QuickConsoleNavigationBar.js:
  5421. (WebInspector.QuickConsoleNavigationBar.prototype.get sizesToFit):
  5422. * UserInterface/HierarchicalPathNavigationItem.js:
  5423. (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
  5424. The QuickConsoleNavigationBar stretches. Respect that laying out a hierarchical path.
  5425. * UserInterface/HierarchicalPathComponent.css:
  5426. (.hierarchical-path-component > .selector-arrows):
  5427. (.hierarchical-path-component.text-only):
  5428. (.hierarchical-path-component.text-only > select):
  5429. * UserInterface/HierarchicalPathComponent.js:
  5430. (WebInspector.HierarchicalPathComponent):
  5431. * UserInterface/Images/UpDownArrows.svg: Added.
  5432. Allow creating a text only HierarchicalPathComponent, and one that shows
  5433. up/down popup selector arrows.
  5434. * UserInterface/Frame.js:
  5435. (WebInspector.Frame.prototype.commitProvisionalLoad):
  5436. (WebInspector.Frame.prototype.clearExecutionContexts):
  5437. Send an event when clearing contexts. Provide a flag for when it happens
  5438. while a frame is navigating, in which case we would expect a new execution
  5439. context soon for the new page.
  5440. * Localizations/en.lproj/localizedStrings.js:
  5441. * UserInterface/QuickConsole.js:
  5442. (WebInspector.QuickConsole):
  5443. Register for events necessary to fill a selector picker with frames.
  5444. iOS 6 needs to provide frame ids, so listen for added / removed frames.
  5445. Trunk and later use ExecutionContexts which Frames broadcast changes for.
  5446. Executing in the main frame uses "undefined".
  5447. (WebInspector.QuickConsole.prototype.get executionContextIdentifier):
  5448. This is the selected identifier (contextId or frameId on iOS 6). If no
  5449. selector is shown, this will still be the main frame execution context.
  5450. (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
  5451. (WebInspector.QuickConsole.prototype._rebuildExecutionContextPathComponents):
  5452. Update the nav bar components. There is a single segment, with the selected component.
  5453. (WebInspector.QuickConsole.prototype._framePageExecutionContextsCleared):
  5454. (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
  5455. Trunk, event handlers when frames get and clear execution contexts. When a frame
  5456. navigates we have a little bit of logic to reselect that frame when its new
  5457. execution context comes in.
  5458. (WebInspector.QuickConsole.prototype._frameAdded):
  5459. (WebInspector.QuickConsole.prototype._frameRemoved):
  5460. (WebInspector.QuickConsole.prototype._frameMainResourceChanged):
  5461. iOS 6 support. Track frame adds, removes, and resource changes to update the display.
  5462. (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
  5463. (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
  5464. Helpers for creating path components. Handles iOS 6 and trunk to get the right id.
  5465. (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
  5466. (WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
  5467. (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
  5468. (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
  5469. PathComponents are a linked list. We display them sorted. These are helpers for
  5470. inserting, removing, and updating a path component in that list.
  5471. (WebInspector.QuickConsole.prototype._pathComponentSelected):
  5472. (WebInspector.QuickConsole.prototype._debuggerActiveCallFrameDidChange):
  5473. Changes to the state of the inspector that may require the UI to update.
  5474. * UserInterface/JavaScriptTextPrompt.js:
  5475. (WebInspector.JavaScriptTextPrompt.prototype.evalInInspectedWindow):
  5476. Evaluate in the context selected in the QuickConsole.
  5477. 2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
  5478. Create an ExecutionContextList class.
  5479. <rdar://problem/10809363> PARITY (WebKit Web Inspector): UI for evaluating in different windows / frames from the console is missing
  5480. There may be many ExecutionContexts for a page, one for each isolated
  5481. world in the frame. Store each context for a frame in an ExecutionContext
  5482. and provide an accessor for the one that is the page context.
  5483. This also converges on the name "pageExecutionContext" instead of
  5484. "mainExecutionContext" for the special context of the page.
  5485. Reviewed by Dean Jackson.
  5486. * UserInterface/Main.html:
  5487. * UserInterface/ExecutionContextList.js: Added.
  5488. (WebInspector.ExecutionContextList):
  5489. (WebInspector.ExecutionContextList.prototype.get pageExecutionContext):
  5490. (WebInspector.ExecutionContextList.prototype.get contexts):
  5491. (WebInspector.ExecutionContextList.prototype.add):
  5492. (WebInspector.ExecutionContextList.prototype.clear):
  5493. ExecutionContextList holds a list of contexts and has a quick
  5494. accessor for the page execution context.
  5495. * UserInterface/Frame.js:
  5496. (WebInspector.Frame):
  5497. (WebInspector.Frame.prototype.get pageExecutionContext):
  5498. (WebInspector.Frame.prototype.get executionContextList):
  5499. (WebInspector.Frame.prototype.clearExecutionContexts):
  5500. (WebInspector.Frame.prototype.addExecutionContext):
  5501. Updated to use an ExecutionContextList.
  5502. * UserInterface/DOMTree.js:
  5503. (WebInspector.DOMTree):
  5504. (WebInspector.DOMTree.prototype.requestRootDOMNode):
  5505. (WebInspector.DOMTree.prototype._requestRootDOMNode):
  5506. (WebInspector.DOMTree.prototype._framePageExecutionContextChanged):
  5507. Updated from mainExecutionContext to pageExecutionContext.
  5508. 2013-03-16 Timothy Hatcher <timothy@apple.com>
  5509. Move the debugger controls from the quick console to the debugger sidebar.
  5510. Also dynamically add and remove the call stack section so it isn't an eyesore
  5511. when you are not paused.
  5512. Reviewed by Joseph Pecoraro.
  5513. * Localizations/en.lproj/localizedStrings.js:
  5514. * UserInterface/DebuggerSidebarPanel.css: Added.
  5515. (.sidebar > .panel.debugger > .content):
  5516. (.sidebar > .panel.debugger > .navigation-bar):
  5517. * UserInterface/DebuggerSidebarPanel.js:
  5518. (WebInspector.DebuggerSidebarPanel):
  5519. (WebInspector.DebuggerSidebarPanel.prototype._debuggerPauseResumeButtonClicked):
  5520. (WebInspector.DebuggerSidebarPanel.prototype._debuggerStepOverButtonClicked):
  5521. (WebInspector.DebuggerSidebarPanel.prototype._debuggerStepIntoButtonClicked):
  5522. (WebInspector.DebuggerSidebarPanel.prototype._debuggerStepOutButtonClicked):
  5523. (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
  5524. (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
  5525. (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
  5526. (WebInspector.DebuggerSidebarPanel.prototype.deselectCallStackContentTreeElements): Added.
  5527. (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
  5528. * UserInterface/Main.html:
  5529. * UserInterface/QuickConsole.js:
  5530. (WebInspector.QuickConsole):
  5531. (WebInspector.QuickConsole.prototype._toggleOrFocus):
  5532. 2013-03-16 Timothy Hatcher <timothy@apple.com>
  5533. Make the toolbar labels look better in window mode.
  5534. Rubber-stamped by Joseph Pecoraro.
  5535. * UserInterface/Toolbar.css:
  5536. (body:not(.docked) .toolbar .item.button > .label): Apply antialiased only to the labels
  5537. so we don't affect text in the dashboard. Also add a stroke to make the text heavier.
  5538. 2013-03-16 Timothy Hatcher <timothy@apple.com>
  5539. Make toolbar items layout and collapse better at narrow window sizes.
  5540. <rdar://problem/13189092> Toolbar items can be laid out on top of each other with narrow window
  5541. Reviewed by Joseph Pecoraro.
  5542. * UserInterface/ButtonToolbarItem.css:
  5543. (.toolbar.collapsed .item.button > .label): Removed. We only use icon-only now.
  5544. * UserInterface/DashboardView.css:
  5545. (.toolbar.collapsed .dashboard): Added. Collapses when there is no room.
  5546. * UserInterface/NavigationBar.js:
  5547. (WebInspector.NavigationBar.prototype.updateLayout): Call customUpdateLayout() if it exists.
  5548. * UserInterface/Toolbar.css:
  5549. (.toolbar .item-section:not(.center)): Removed min-width and made flex be 1.
  5550. (.toolbar .item-section.left): Added right margin to prevent touching.
  5551. (.toolbar .item-section.center): Make flex be 2 so it can be a different width.
  5552. (.toolbar .item-section.right): Added a left margin to prevent touching.
  5553. * UserInterface/Toolbar.js:
  5554. (WebInspector.Toolbar.prototype.set displayMode): Revert the forced icon-only mode.
  5555. (WebInspector.Toolbar.prototype.customUpdateLayout.computeItemWidths): Added.
  5556. (WebInspector.Toolbar.prototype.customUpdateLayout.computeSectionWidths): Added.
  5557. (WebInspector.Toolbar.prototype.customUpdateLayout): Added.
  5558. Computes each section individually for overflow. If any section overflow switch to icon-only
  5559. mode when in horizontal-label mode. If any section overflows after that then collapse the
  5560. toolbar, which only hides the Dashboard right now.
  5561. 2013-03-16 Timothy Hatcher <timothy@apple.com>
  5562. Make the labels in the Instruments sidebar be 11px instead of 10px.
  5563. Reviewed by Joseph Pecoraro.
  5564. * UserInterface/NavigationSidebarPanel.css:
  5565. Removed a rule that was making the font-size 10px. Only the Instruments
  5566. sidebar triggered this rule.
  5567. 2013-03-16 Timothy Hatcher <timothy@apple.com>
  5568. Break-up the generation of images and delay the generation of
  5569. active images so the initial page load is faster.
  5570. <rdar://problem/13436334> Web Inspector takes about 3s to activate
  5571. Reviewed by Joseph Pecoraro.
  5572. * UserInterface/ImageUtilities.js:
  5573. (.generateImages.generateActiveImages): Added.
  5574. (.generateImages): Set a tiemout to call generateActiveImages.
  5575. (._generateImages.generateActiveImages): Added.
  5576. (._generateImages): Set a tiemout to call generateActiveImages.
  5577. 2013-03-15 Timothy Hatcher <timothy@apple.com>
  5578. Sort resources by domain before sorting alphabetically by name.
  5579. This was suggested by someone on Twitter. It allows local resources to bubble
  5580. to the top and external resources (analytic scripts, etc.) to come later.
  5581. Reviewed by Joseph Pecoraro.
  5582. * UserInterface/GeneralTreeElement.js:
  5583. (WebInspector.GeneralTreeElement):
  5584. (WebInspector.GeneralTreeElement.prototype.set mainTitle):
  5585. (WebInspector.GeneralTreeElement.prototype.set subtitle):
  5586. Fallback to "" for mainTitle and subtitle.
  5587. * UserInterface/ResourceTreeElement.js:
  5588. (WebInspector.ResourceTreeElement.compareResourceTreeElements):
  5589. Sort resources by domain (subtitle) before sorting by name (mainTitle).
  5590. 2013-03-15 Jessie Berlin <jberlin@apple.com>
  5591. Ran update-safari-localizable-strings.
  5592. * Localizations/en.lproj/localizedStrings.js:
  5593. 2013-03-14 Timothy Hatcher <timothy@apple.com>
  5594. Display em-dashes instead of "0" for resources size and time to make it clear
  5595. the values are not known yet.
  5596. Reviewed by Joseph Pecoraro.
  5597. * UserInterface/DashboardView.js:
  5598. (WebInspector.DashboardView.prototype.set time):
  5599. (WebInspector.DashboardView.prototype.set resourcesSize):
  5600. 2013-03-14 Timothy Hatcher <timothy@apple.com>
  5601. Remove references to bottomUpHead. We can build the bottom-up tree locally.
  5602. The bottomUpHead is being removed from the protocol by https://webkit.org/b/112351.
  5603. Also remove references to TopDownTreeFactory and BottomUpTreeFactory with is dead code.
  5604. Reviewed by Joseph Pecoraro.
  5605. * UserInterface/JavaScriptProfileView.js:
  5606. (WebInspector.JavaScriptProfileView.prototype.get bottomUpProfileDataGridTree):
  5607. 2013-03-14 Timothy Hatcher <timothy@apple.com>
  5608. Always specify overflow-x when specifying overflow-y.
  5609. Not specifying overflow-x causes it to be auto and can show scrollbars for wide content.
  5610. Also use auto instead of scroll in a few places to prevent scroll bars from always being
  5611. visible when the system prefers non-overlay scrollbars.
  5612. Reviewed by Joseph Pecoraro.
  5613. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  5614. (.sidebar > .panel.details.css-style > .content):
  5615. * UserInterface/LayerTreeSidebarPanel.css:
  5616. (.layer-tree.panel .data-container):
  5617. * UserInterface/LogContentView.css:
  5618. (.console-messages):
  5619. * UserInterface/Popover.css:
  5620. (.popover > .container):
  5621. 2013-03-14 Timothy Hatcher <timothy@apple.com>
  5622. Remove the memory placeholder in the toolbar dashboard now that we deferred that feature.
  5623. This also evenly distributes the items for a better layout in all modes.
  5624. <rdar://problem/13237747> Dashboard items are not evenly distributed
  5625. Reviewed by Joseph Pecoraro.
  5626. * Localizations/en.lproj/localizedStrings.js: Updated.
  5627. * UserInterface/DashboardView.css:
  5628. Overhauled the styles to use flex layout in all cases.
  5629. * UserInterface/DashboardView.js:
  5630. (WebInspector.DashboardView):
  5631. Removed memory and split resources into resourceCount and resourcesSize.
  5632. (WebInspector.DashboardView.prototype.set logs):
  5633. (WebInspector.DashboardView.prototype.set issues):
  5634. (WebInspector.DashboardView.prototype.set errors):
  5635. (WebInspector.DashboardView.prototype.set resourcesCount):
  5636. Call _formatPossibleLargeNumber and set the outlet.
  5637. (WebInspector.DashboardView.prototype.set resourcesSize):
  5638. Set the resourcesSize outlet instead of calling _updateResourcesOutlet.
  5639. (WebInspector.DashboardView.prototype._formatPossibleLargeNumber):
  5640. Added. This is a better approach to dealing with large numbers than ellipsis.
  5641. (WebInspector.DashboardView.prototype._appendElementForNamedItem):
  5642. Removed the double div. It is no longer needed to truncate since all the outlets
  5643. can't really go larger than 6 characters now.
  5644. (WebInspector.DashboardView.prototype._networkItemWasClicked):
  5645. Renamed from _timeWasClicked so resourcesSize can use it.
  5646. * UserInterface/Images/Weight.svg: Added.
  5647. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5648. Mark DOM node styles as needing refreshed when an ancestor changes pseudo classes or any attributes change.
  5649. <rdar://problem/13412234> REGRESSION: Style details sidebar does not update when ancestor nodes change
  5650. Reviewed by Joseph Pecoraro.
  5651. * UserInterface/CSSStyleManager.js:
  5652. (WebInspector.CSSStyleManager): Add event listeners for all nodes.
  5653. (WebInspector.CSSStyleManager.prototype._nodePseudoClassesDidChange): Added.
  5654. (WebInspector.CSSStyleManager.prototype._nodeAttributesDidChange): Added.
  5655. * UserInterface/DOMNodeStyles.js:
  5656. (WebInspector.DOMNodeStyles): Remove event listeners on the single node.
  5657. (WebInspector.DOMNodeStyles.prototype.pseudoClassesDidChange): Added.
  5658. (WebInspector.DOMNodeStyles.prototype.attributeDidChange): Added.
  5659. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5660. Always refresh the DOM node styles when visibility changes for the sidebar or separate panels.
  5661. <rdar://problem/13412234> REGRESSION: Style details sidebar does not update when ancestor nodes change
  5662. Reviewed by Joseph Pecoraro.
  5663. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  5664. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
  5665. Call markAsNeedsRefresh instead of the removed refreshIfNeeded.
  5666. * UserInterface/StyleDetailsPanel.js:
  5667. (WebInspector.StyleDetailsPanel):
  5668. (WebInspector.StyleDetailsPanel.prototype.shown):
  5669. (WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh):
  5670. (WebInspector.StyleDetailsPanel.prototype._refreshNodeStyles): Added.
  5671. (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed):
  5672. (WebInspector.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
  5673. Remove the concept of having a separate needs refresh flag. Instead we just call refresh on the DOMNodeStyles
  5674. and wait for the Refreshed event. This way we always get the latest styles when first showing the panel.
  5675. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5676. <rdar://problem/13421555> Source code links should always show the original location
  5677. Location links will now show the original location normally, and
  5678. display a mapped / formatted display location in italics when hovered,
  5679. but only if such a location exists.
  5680. Reviewed by Timothy Hatcher.
  5681. * UserInterface/LayoutTimelineDataGridNode.js:
  5682. (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
  5683. * UserInterface/Main.js:
  5684. (WebInspector.createSourceCodeLocationLink):
  5685. Use the SourceCodeLocation helpers to keep the contents live.
  5686. * UserInterface/Main.css:
  5687. (.display-location):
  5688. Make display locations italic.
  5689. * UserInterface/SourceCodeLocation.js:
  5690. (WebInspector.SourceCodeLocation.prototype.tooltipString):
  5691. (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip):
  5692. (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
  5693. Different handlers to keep a tooltip or element property live.
  5694. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5695. <rdar://problem/13418338> Show / Hide Shadow DOM should not change the selected node, or select the earliest ancestor
  5696. Reviewed by Timothy Hatcher.
  5697. * UserInterface/DOMTreeOutline.js:
  5698. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5699. <rdar://problem/13418332> Remove or selectively show "Show Shadow DOM" context menu, there is a nav bar button
  5700. Reviewed by Timothy Hatcher.
  5701. * UserInterface/DOMTreeOutline.js:
  5702. (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
  5703. (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
  5704. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5705. Improve JavaScript pretty printing of "finally"
  5706. Reviewed by Timothy Hatcher.
  5707. * UserInterface/CodeMirrorFormatters.js:
  5708. * Tools/PrettyPrinting/CodeMirrorFormatters.js:
  5709. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5710. Provide a SourceCodeLocation helper that keeps an element text up to date.
  5711. Reviewed by Timothy Hatcher.
  5712. * UserInterface/LayoutTimelineDataGridNode.js:
  5713. (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
  5714. * UserInterface/SourceCodeLocation.js:
  5715. (WebInspector.SourceCodeLocation.prototype.setAndKeepElementDisplayLocationStringUpToDate):
  5716. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5717. Let WebInspector.createSourceCodeLocationLink create a goToArrow
  5718. Reviewed by Timothy Hatcher.
  5719. This allows LayoutTimelineDataGridNode to use createSourceCodeLocationLink
  5720. and not remove its children.
  5721. * UserInterface/LayoutTimelineDataGridNode.js:
  5722. (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
  5723. * UserInterface/Main.js:
  5724. (.updateLinkDisplayStrings):
  5725. (WebInspector.createSourceCodeLocationLink):
  5726. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5727. WebInspector.createSourceCodeLocationLink use SourceCodeLocation's full power
  5728. Reviewed by Timothy Hatcher.
  5729. When a link is created with a source code location we can show the real
  5730. location (mapped location, formatted location, original location) and
  5731. update the link and tooltip when things change.
  5732. * UserInterface/EventListenerSectionGroup.js:
  5733. (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
  5734. Switch to from createSourceCodeLink to createSourceCodeLocationLink.
  5735. * UserInterface/Main.js:
  5736. (WebInspector.createSourceCodeLocationLink):
  5737. Update link text and tooltip when the location changes.
  5738. * UserInterface/SourceCodeLocation.js:
  5739. (WebInspector.SourceCodeLocation.prototype._locationString):
  5740. Use SourceCode.displayName and handle source codes without URLs if needed.
  5741. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5742. <rdar://problem/13386143> REGRESSION (CodeMirror): Jump to line / reveal line should reveal closer to the middle of the editor never the top or bottom if possible
  5743. If revealLine is called with a line outside the visible set of lines
  5744. in the editor then scroll the editor to make that line the center.
  5745. This also behaves as expected for lines the start / end of a document.
  5746. Reviewed by Timothy Hatcher.
  5747. * UserInterface/TextEditor.js:
  5748. (WebInspector.TextEditor.prototype.shown):
  5749. In order for cm.getScrollInfo() values to be valid after an editor is
  5750. reattached to the DOM Hierarchy we have to call refresh, and because of
  5751. the way CodeMirror works (coalescing changes in operations) the
  5752. getScrollInfo is only valid after the refresh operation. So remove the
  5753. wrapping operation here.
  5754. (WebInspector.TextEditor.prototype.set formatted):
  5755. If you pretty print a document do not send a change event and
  5756. cause the value to be sent to the backend. The frontend style
  5757. sidebar expects line and column numbers for the original
  5758. unformatted document.
  5759. (WebInspector.TextEditor.prototype.revealAndHighlightLine):
  5760. (WebInspector.TextEditor.prototype.revealLine):
  5761. (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
  5762. (WebInspector.TextEditor.prototype._prettyPrint):
  5763. In revealLine or prettyPrint when we move the selection make a decision
  5764. whether or not to scroll the editor to put that line in the center.
  5765. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5766. Update CodeMirror to ToT (v3.1+) which includes some JavaScript language and selection fixes
  5767. <rdar://problem/13396332> CodeMirror: Selection on lines that wrap more than once is incorrect
  5768. Rubber-stamped by Timothy Hatcher.
  5769. * UserInterface/External/CodeMirror/codemirror.js:
  5770. * UserInterface/External/CodeMirror/javascript.js:
  5771. 2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
  5772. <rdar://problem/13410237> REGRESSION: Editing CSS resources no longer works (it is read-only)
  5773. Reviewed by Ricky Mondello.
  5774. * UserInterface/TextEditor.js:
  5775. (WebInspector.TextEditor.prototype.set readOnly):
  5776. 2013-03-14 Antoine Quint <graouts@apple.com>
  5777. <rdar://problem/13410257> Display the reason why a layer is composited
  5778. Retrieve the reason why the selected layer in the layer tree sidebar
  5779. panel is composited and display them in a popover anchored to the
  5780. selected data grid node, removing the popover when the inspector
  5781. loses focus or the data grid node is no longer selected.
  5782. Reviewed by Joseph Pecoraro.
  5783. * Localizations/en.lproj/localizedStrings.js:
  5784. Add new strings used to display the various compositing reasons.
  5785. * UserInterface/InspectorBackendCommands.js:
  5786. Add new LayerTree.reasonsForCompositingLayer() protocol method.
  5787. * UserInterface/LayerTreeManager.js:
  5788. (WebInspector.LayerTreeManager.prototype.reasonsForCompositingLayer):
  5789. Wrapper for the new LayerTree.reasonsForCompositingLayer() protocol
  5790. method.
  5791. * UserInterface/LayerTreeSidebarPanel.css:
  5792. (.layer-tree-popover):
  5793. (.layer-tree-popover p):
  5794. (.layer-tree-popover ul):
  5795. (.layer-tree-popover li):
  5796. Styles for the content displayed in a popover to show the compositing
  5797. reasons for the selected layer.
  5798. * UserInterface/LayerTreeSidebarPanel.js:
  5799. (WebInspector.LayerTreeSidebarPanel.prototype._selectedDataGridNodeChanged):
  5800. On top of highlighting the appropriate region in the canvas for the
  5801. selected layer, also show a popover with the reasons why it was
  5802. composited or remove the popover if there are no selected layers.
  5803. (WebInspector.LayerTreeSidebarPanel.prototype._dataGridGainedFocus):
  5804. Show the popover for the selected data grid node.
  5805. (WebInspector.LayerTreeSidebarPanel.prototype._dataGridLostFocus):
  5806. Hide the popover.
  5807. (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
  5808. (WebInspector.LayerTreeSidebarPanel.prototype._hidePopover):
  5809. (WebInspector.LayerTreeSidebarPanel.prototype.):
  5810. (WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):
  5811. Show a popover listing the compositing reasons for the selected layer
  5812. anchored to the selected data grid node. The content of the popover
  5813. is provided after the call to the agent to retrieve the reasons for
  5814. compositing has returned.
  5815. * UserInterface/Popover.css:
  5816. (.popover):
  5817. (.popover.arrow-up):
  5818. (.popover.arrow-right):
  5819. (.popover.arrow-down):
  5820. (.popover.arrow-left):
  5821. * UserInterface/Popover.js:
  5822. (WebInspector.Popover.prototype.area):
  5823. (WebInspector.Popover.prototype.present):
  5824. (WebInspector.Popover.prototype._bestMetricsForEdge):
  5825. Miscellaneous enhancements for better popover behavior where we correctly
  5826. round up the metrics for the hosted content, ensure we interrupt a dismiss
  5827. animation when presenting the popover again, and change the sizing behavior
  5828. to take into account the various padding metrics applied as a result of
  5829. picking a given edge.
  5830. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5831. Don't wait until DOMContentLoaded to do non-UI initialization when loading the Web Inspector.
  5832. Part of: <rdar://problem/13412219> REGRESSION: Opening the Web Inspector takes 5s
  5833. Reviewed by Joseph Pecoraro.
  5834. * UserInterface/CodeMirrorAdditions.js:
  5835. Moved extra MIME-type registration here.
  5836. * UserInterface/Main.html:
  5837. Added a inline script to call WebInspector.loaded(). This needs to be outside of Main.js so it
  5838. comes after the scripts added via document.write when Main.js is a combined file.
  5839. * UserInterface/Main.js:
  5840. (WebInspector.loaded): Added. Moved code from contentLoaded.
  5841. (WebInspector.contentLoaded): Moved code to loaded.
  5842. (WebInspector._windowResized): Call _contentBrowserSizeDidChange to avoid registering for resize twice.
  5843. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5844. Add selected images for UserInputResult.pdf and UserInputPromptPrevious.pdf.
  5845. Reviewed by Joseph Pecoraro.
  5846. * UserInterface/Images/UserInputPromptPreviousSelected.pdf: Added.
  5847. * UserInterface/Images/UserInputResultSelected.pdf: Added.
  5848. * UserInterface/LogContentView.css:
  5849. (.console-messages:focus .console-item.selected .console-user-command-result.console-log-level::before):
  5850. (.console-messages:focus .console-item.selected .console-user-command::before):
  5851. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5852. Make copy work in the split console.
  5853. <rdar://problem/13411428> Copy does not work if the console is in split view
  5854. Reviewed by Joseph Pecoraro.
  5855. * UserInterface/Main.js:
  5856. (WebInspector._focusedContentView): Added.
  5857. (WebInspector._beforecopy): Structure more like _copy. Use _focusedContentView.
  5858. (WebInspector._copy): Use _focusedContentView.
  5859. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5860. Remove old focus tracking code in EditingSupport.js and start tracking currentFocusElement
  5861. and previousFocusElement in Main.js's _focusChanged handler.
  5862. Reviewed by Joseph Pecoraro.
  5863. * UserInterface/EditingSupport.js:
  5864. (WebInspector.startEditing.cleanUpAfterEditing): Use restoreFocusFromElement().
  5865. * UserInterface/JavaScriptTextPrompt.js:
  5866. (WebInspector.JavaScriptTextPrompt.prototype.focus): Use focus().
  5867. * UserInterface/Main.js:
  5868. (WebInspector.restoreFocusFromElement): Added.
  5869. (WebInspector._focusChanged): Set currentFocusElement and previousFocusElement.
  5870. * UserInterface/TextPrompt.js:
  5871. (WebInspector.TextPrompt.prototype._startEditing): Use focus().
  5872. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5873. Fix some things with the new console selection behavior.
  5874. * Makes sure all disclosure triangles and text are white when the row selection is blue.
  5875. * Makes sure all disclosure triangles and text are normal when the row selection is gray.
  5876. * Fixes a bug where click would cause the row to jump between top and bottom reveal instead of
  5877. toggling a clicked disclosure triangle.
  5878. * Only expand recursively if the Option key is pressed. This matches the TreeOutline code.
  5879. * Collapse recursively if the option key is pressed.
  5880. * Better aligns the disclosure triangles with DOM tree nodes.
  5881. Reviewed by Antoine Quint.
  5882. * UserInterface/LogContentView.css:
  5883. (.console-messages):
  5884. (.console-item.selected):
  5885. (.console-messages:focus .console-item.selected *):
  5886. (.console-group-title::before):
  5887. (.console-messages:focus .console-item.selected .console-group-title::before):
  5888. (.console-messages:focus .console-group.collapsed .console-item.selected .console-group-title::before):
  5889. (.console-messages:focus .console-item.selected .section .header .title):
  5890. (.console-message-url):
  5891. (.console-messages:focus .console-item.selected .section .header::before):
  5892. (.console-messages:focus .console-item.selected .section.expanded .header::before):
  5893. (.console-messages:focus .console-item.selected .properties-tree li.parent::before):
  5894. (.console-messages:focus .console-item.selected .properties-tree li.parent.expanded::before):
  5895. (.outline-disclosure li.parent::before):
  5896. (.console-messages:focus .console-item.selected .outline-disclosure li.parent::before):
  5897. (.console-messages:focus .console-item.selected .outline-disclosure li.parent.expanded::before):
  5898. * UserInterface/LogContentView.js:
  5899. (WebInspector.LogContentView.prototype._mousedown):
  5900. Use focus() instead of setCurrentFocusElement. The setCurrentFocusElement function is legacy and
  5901. should be removed someday.
  5902. (WebInspector.LogContentView.prototype._updateMessagesSelection):
  5903. Don't call _ensureMessageIsVisible if the message was already selected from the start.
  5904. (WebInspector.LogContentView.prototype._rightArrowWasPressed):
  5905. (WebInspector.LogContentView.prototype._leftArrowWasPressed):
  5906. Only expand or collapse recursively if the Option key is pressed.
  5907. 2013-03-13 Timothy Hatcher <timothy@apple.com>
  5908. Tweak the New Rule behavior in the Style details sidebar.
  5909. Makes sure to scroll to reveal the section when it is focused. Also use appropriateSelectorFor
  5910. instead of displayNameForNode to generate better selectors.
  5911. Reviewed by Antoine Quint.
  5912. * UserInterface/DOMNodeStyles.js:
  5913. (WebInspector.DOMNodeStyles.prototype.addRule): Use appropriateSelectorFor.
  5914. * UserInterface/RulesStyleDetailsPanel.js:
  5915. (WebInspector.RulesStyleDetailsPanel.prototype.refresh.scrollToFocusedSection): Added.
  5916. (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Call scrollToFocusedSection on a timeout.
  5917. 2013-03-13 Antoine Quint <graouts@apple.com>
  5918. Make the "Memory" outlet at the bottom of the layer tree
  5919. sidebar panel align to the right as expected.
  5920. Reviewed by Timothy Hatcher.
  5921. * UserInterface/LayerTreeSidebarPanel.css:
  5922. (.layer-tree.panel .layers-memory-label):
  5923. 2013-03-13 Antoine Quint <graouts@apple.com>
  5924. <rdar://problem/13410203> Correctly identify layers for generated and reflected content
  5925. We now correctly identify layers as reflected content and/or generated
  5926. content with a more appropriate name in the "child layers" data grid.
  5927. Additionally, we highlight the bounds of the layer on the page to
  5928. clearly identify what this reflection or generated content is on the
  5929. canvas.
  5930. Reviewed by Joseph Pecoraro.
  5931. * Localizations/en.lproj/localizedStrings.js:
  5932. New localized string used to identify reflections layers.
  5933. * UserInterface/DOMTreeManager.js:
  5934. (WebInspector.DOMTreeManager.prototype.highlightRect):
  5935. New method wrapping DOMAgent.highlightRect().
  5936. * UserInterface/LayerTreeDataGridNode.js:
  5937. (WebInspector.LayerTreeDataGridNode.prototype.set layer):
  5938. Further qualify the layer by adding either the ::before or ::after
  5939. pseudo-class for layers that are associated to generated content as
  5940. well as a localized "Reflection for" prefix for reflected layers.
  5941. * UserInterface/LayerTreeSidebarPanel.js:
  5942. (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
  5943. Check what type of layer is now selected and call the new
  5944. DOMTreeManager.highlightRect() method in case we're dealing with a
  5945. reflection or generated layer.
  5946. 2013-03-13 Antoine Quint <graouts@apple.com>
  5947. <rdar://problem/13209485> Layer Tree sidebar should respect "show-shadow-dom" setting
  5948. The layer tree sidebar panel data grid now respects the
  5949. "show-shadow-dom" setting.
  5950. Reviewed by Timothy Hatcher.
  5951. * UserInterface/LayerTreeSidebarPanel.js:
  5952. (WebInspector.LayerTreeSidebarPanel):
  5953. Track changes for the "show-shadow-dom" setting.
  5954. (WebInspector.LayerTreeSidebarPanel.prototype.refresh):
  5955. Keep track of the unfiltered set of child layers returned when calling
  5956. into the LayerTreeAgent such that we can reuse this unfiltered list
  5957. of child layers layer as the "show-shadow-dom" setting changes.
  5958. (WebInspector.LayerTreeSidebarPanel.prototype._showShadowDOMSettingChanged):
  5959. Update the display such that the new setting is taken into account.
  5960. (WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers):
  5961. Filter the list of child layers to take into account the
  5962. "show-shadow-dom" setting. We also keep track of the layer for
  5963. the current node in the new "_layerForNode" property such that
  5964. it may be used to call into this method again when we need to
  5965. update the shadow DOM filter without querying the backend again.
  5966. 2013-03-13 Antoine Quint <graouts@apple.com>
  5967. <rdar://problem/13409543> Adopt new LayerTreeAgent protocol
  5968. We remove all code related to the previous LayerTreeAgent protocol where
  5969. we'd use the LayerTree.getLayerTree() and LayerTree.nodeIdForLayerId()
  5970. methods which have now been replaced by a single method to provide the
  5971. layers in the scope of a given DOM subtree with LayerTree.layersForNode().
  5972. Reviewed by Joseph Pecoraro.
  5973. * Localizations/en.lproj/localizedStrings.js:
  5974. Remove the strings related to composited layers since the protocol now
  5975. only provides composited layers.
  5976. * UserInterface/InspectorBackendCommands.js:
  5977. Remove the old LayerTree.getLayerTree() and LayerTree.nodeIdForLayerId()
  5978. protocol methods and add the new LayerTree.layersForNode() method.
  5979. * UserInterface/LayerTreeDataGridNode.js:
  5980. (WebInspector.LayerTreeDataGridNode.prototype.get layer):
  5981. New public accessor for the "_layer" property such that the
  5982. LayerTreeSidebarPanel may access properties of the selected data grid
  5983. node's layer.
  5984. (WebInspector.LayerTreeDataGridNode.prototype.set layer):
  5985. Remove the check for a valid node since the protocol ensures that layers
  5986. now have a valid nodeId pushed to the front-end. We're also removing the
  5987. redundant "layerData" property by just letting the layer be accessible
  5988. via a public accessor.
  5989. (WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
  5990. Use the "_layer" property to find out the nodeId rather than the removed
  5991. "layerData" property.
  5992. * UserInterface/LayerTreeManager.js:
  5993. (WebInspector.LayerTreeManager):
  5994. Remove the hard-coded disabling of the LayerTree features in the front-end
  5995. and instead use a real run-time check for availability of the LayerTreeAgent.
  5996. We also remove some ivars we no longer use.
  5997. (WebInspector.LayerTreeManager.prototype.layerTreeMutations):
  5998. Complete rewrite of the method to account for the richer set of
  5999. information exposed by the new protocol. We now have to take into account
  6000. much more than just layer ids to indentify mutations, node ids should also
  6001. be taken into account to check if a layer for the same node has appeared
  6002. with a new layer id (as it may have been destroyed and recreated for a
  6003. content update). We also need to take into account generated content and
  6004. reflections, which may have pseudo element ids.
  6005. (WebInspector.LayerTreeManager.prototype.layersForNode):
  6006. New wrapper for the new LayerTreeAgent.layersForNode() protocol method.
  6007. (WebInspector.LayerTreeManager.prototype.layerTreeDidChange):
  6008. We no longer obtain the layer tree upon a change, we merely dispatch
  6009. an event indicating that the layer tree has changed.
  6010. * UserInterface/LayerTreeSidebarPanel.js:
  6011. (WebInspector.LayerTreeSidebarPanel):
  6012. Remove the setting to only show composited layers since the protocol now
  6013. only returns composited layers.
  6014. (WebInspector.LayerTreeSidebarPanel.prototype.refresh):
  6015. Retrieve layers from the agent and update our display with the result.
  6016. (WebInspector.LayerTreeSidebarPanel.prototype._layerTreeDidChange):
  6017. Mark that we need a refresh following a change in the layer tree.
  6018. (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
  6019. No longer show the "Composited" row since all layers are now composited.
  6020. (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
  6021. No longer build the "only show composited layers" checkbox.
  6022. (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
  6023. (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
  6024. Use the now-public "layer" property on the LayerTreeDataGridNode to
  6025. look up layer information for sorting.
  6026. (WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers):
  6027. Keep track of the new child layers in a "_childLayers" property.
  6028. (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
  6029. Remove the checks for composited since all layers are now composited.
  6030. (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
  6031. (WebInspector.LayerTreeSidebarPanel.prototype._updateMetrics):
  6032. Update to use new properties on layer objects per the change in protocol.
  6033. 2013-03-13 Antoine Quint <graouts@apple.com>
  6034. <rdar://problem/12886275> Selecting errors in the console doesn't select the error and the filename
  6035. In order to be able to provide custom content to the clipboard for console messages,
  6036. we must also allow selection of console messages in a different way than via text
  6037. selection. In this patch, we make the list of messages selectable, supporting the
  6038. selection types one would expect from a desktop application. I go into the details
  6039. of what features exactly are implemented in the per-method discussion below.
  6040. Reviewed by Timothy Hatcher.
  6041. * UserInterface/ConsoleCommand.js:
  6042. (WebInspector.ConsoleCommand.prototype.toClipboardString):
  6043. Adopt the protocol to provide a custom clipboard string in the form of
  6044. "> theJSCommand();".
  6045. * UserInterface/ConsoleCommandResult.js:
  6046. (WebInspector.ConsoleCommandResult.prototype.toClipboardString):
  6047. Adopt the protocol to provide a custom clipboard string in the form of
  6048. "< theCommandResult".
  6049. * UserInterface/ConsoleGroup.js:
  6050. (WebInspector.ConsoleGroup.prototype.addMessage):
  6051. Wrap individual messages in a group within a wrapper element with a "console-item"
  6052. CSS class. These elements are used to apply a "selected" or "filtered-out" class and
  6053. to draw the full-width borders on the items.
  6054. * UserInterface/ConsoleMessageImpl.js:
  6055. (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
  6056. Refactor to use new _shouldDumpStackTrace() method.
  6057. (WebInspector.ConsoleMessageImpl.prototype._shouldDumpStackTrace):
  6058. New method to share logic once used only in _formatMessage() with
  6059. toClipboardString() as well.
  6060. (WebInspector.ConsoleMessageImpl.prototype.toString):
  6061. Refactor to use new "levelString" property.
  6062. (WebInspector.ConsoleMessageImpl.prototype.get levelString):
  6063. New accessor to share logic once used only in toString() with toClipboardString()
  6064. as well.
  6065. (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
  6066. Adopt the protocol to provide a custom clipboard string where we log the level,
  6067. message text, url, line number and optionally the stack frames.
  6068. * UserInterface/JavaScriptLogViewController.js:
  6069. (WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage):
  6070. Return the cloned message so that we may manipulate it from call sites (ie. in
  6071. LogContentView.prototype._messageAdded()).
  6072. (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Fix a
  6073. missing semi-colon.
  6074. * UserInterface/LogContentView.css:
  6075. (.console-messages):
  6076. Remove useless properties.
  6077. (.console-item):
  6078. Basic style for all console item wrappers, draw a 1px bottom border.
  6079. (.console-item.selected):
  6080. Background color for selected items when the container doesn't have focus (gray).
  6081. (.console-messages:focus .console-item.selected):
  6082. Background color for selected items when the container has focus (blue).
  6083. (.console-messages:focus .console-item.selected *):
  6084. Make all text in selected items white.
  6085. (.console-item.selected .console-group-title::before):
  6086. Use a white triangle for selected items.
  6087. (.console-group.collapsed .console-item.selected .console-group-title::before):
  6088. Use a white triangle for selected items.
  6089. (.console-item.selected .console-error-level .section .header .title):
  6090. Ensure text is white in selected items.
  6091. (.console-item.selected .console-debug-level .console-message-text):
  6092. Ensure text is white in selected items.
  6093. (.auto-complete-text, .editing .auto-complete-text):
  6094. Remove useless property.
  6095. (.console-item.selected .outline-disclosure li.parent::before):
  6096. Use a white triangle for selected items.
  6097. (.console-item.selected .outline-disclosure li.parent.expanded::before):
  6098. Use a white triangle for selected items.
  6099. (.console-item.filtered-out):
  6100. Remove all filtered-out items from layout.
  6101. * UserInterface/LogContentView.js:
  6102. (WebInspector.LogContentView):
  6103. New ivars to track the current nesting level and the list of all selected message
  6104. elements. We also start tracking a series of keyboard and mouse events on the
  6105. messages container to implement multiple selection of message elements.
  6106. (WebInspector.LogContentView.prototype.updateLayout):
  6107. Override this ContentView method to track the height of the messages container
  6108. in order to update the scroll position of the container as we ensure the visibility
  6109. of selected items.
  6110. (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
  6111. Manually nest the messages hosted in wrappers and keep track of the nesting level
  6112. as groups are opened and closed. We also clear all focusable children there as new
  6113. content may have been added with markup using the "tabindex" attributes.
  6114. (WebInspector.LogContentView.prototype.handleCopyEvent):
  6115. Provide custom content to the clipboard based on the clipboard text of each message
  6116. in the selected messages list in DOM order.
  6117. (WebInspector.LogContentView.prototype._messageAdded):
  6118. Ensure newly added messages are filtered out in case they don't match the selected
  6119. filters in the scope bar.
  6120. (WebInspector.LogContentView.prototype._mousedown):
  6121. Event handler for the "mousedown" event on the messages container. We ignore user
  6122. interaction if we would otherwise show a contextual menu, and ensure the messages
  6123. container has focus otherwise. In case we're getting focus now and we already had
  6124. selected elements, we go no further. Otherwise, we figure out which message was
  6125. under the mouse pointer and track that we should prevent a "click" event from being
  6126. dispatched in case the message was not yet selected. This ensures that we don't
  6127. collapse/expand an outline and select at the same time. We then update the message
  6128. selection state and track further mouse interaction. If we detect we didn't click on
  6129. a message, ie. the empty area of the messages container, we clear the selection list.
  6130. (WebInspector.LogContentView.prototype._mousemove):
  6131. Get the message element under the mouse pointer, if any, and update the messages
  6132. selection list so that we select messages from the first element we moused down
  6133. on to this one.
  6134. (WebInspector.LogContentView.prototype._mouseup):
  6135. Stop tracking any further "mousemove" and "mouseup" events as the selection-by-mouse
  6136. interaction draws to an end.
  6137. (WebInspector.LogContentView.prototype._click):
  6138. Prevent the propagation of "click" events if we established in the "mousedown" event
  6139. handler that we should have.
  6140. (WebInspector.LogContentView.prototype.handleEvent):
  6141. Router for mouse "mousemove" and "mouseup" events.
  6142. (WebInspector.LogContentView.prototype._updateMessagesSelection):
  6143. Method that updates the selected state of the provided message based on whether
  6144. we're allowing multiple selection (Cmd+click) and range selection
  6145. (Shift+click/arrow-up/arrow-down).
  6146. (WebInspector.LogContentView.prototype._ensureMessageIsVisible):
  6147. Scrolls the messages container as necessary to reveal the provided message. We avoid
  6148. getting metrics from CSS as much as possible by using the positiong of the message
  6149. directly after the provided one since we can get that information via
  6150. _positionForMessage() without triggering a style recalc. In the case where we want to
  6151. ensure the last message is visible, we have no other resort but to query its height.
  6152. (WebInspector.LogContentView.prototype._positionForMessage):
  6153. Get the position of the given message in the coordinate system established by the
  6154. messages container.
  6155. (WebInspector.LogContentView.prototype._isMessageVisible):
  6156. Indicates whether the provided message is visible (ie. not filtered-out or within a
  6157. collapsed group).
  6158. (WebInspector.LogContentView.prototype._isMessageSelected):
  6159. Indicates whether the provided message is selected.
  6160. (WebInspector.LogContentView.prototype._selectAllMessages):
  6161. Selects all visible messages.
  6162. (WebInspector.LogContentView.prototype._allMessages):
  6163. All the messages in the messages container as an Array.
  6164. (WebInspector.LogContentView.prototype._allVisibleMessages):
  6165. All visible messages in the messages container as an Array.
  6166. (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
  6167. Filter messages as the selected filters in the scope bar have changed.
  6168. (WebInspector.LogContentView.prototype._filterMessages):
  6169. Filter the messages based on scope bar filters selection. We ensure commands and
  6170. results are always visible, no matter what filters are selected.
  6171. (WebInspector.LogContentView.prototype._didFocus):
  6172. Track that the messages container is focused.
  6173. (WebInspector.LogContentView.prototype._didBlur):
  6174. Track that the messages container is not focused.
  6175. (WebInspector.LogContentView.prototype._keyDown):
  6176. Event handler for the "keydown" event, used to route to the more specific handlers.
  6177. (WebInspector.LogContentView.prototype._commandAWasPressed):
  6178. Event handler for Cmd+A key combination, selects all visible messages.
  6179. (WebInspector.LogContentView.prototype._escapeWasPressed):
  6180. Event handler for the Esc. key being pressed, clears the selection if there are
  6181. any selected messages, otherwise moving focus to the command prompt.
  6182. (WebInspector.LogContentView.prototype._upArrowWasPressed):
  6183. Event handler for the up arrow key being pressed, selects the message above, or add
  6184. it to the selection list if the shift key is selected.
  6185. (WebInspector.LogContentView.prototype._downArrowWasPressed):
  6186. Event handler for the down arrow key being pressed, selects the message below, or add
  6187. it to the selection list if the shift key is selected.
  6188. (WebInspector.LogContentView.prototype._leftArrowWasPressed):
  6189. Event handler for the left arrow key veing pressed, collapses the current group or
  6190. message with stack trace. Otherwise, does nothing.
  6191. (WebInspector.LogContentView.prototype._rightArrowWasPressed):
  6192. Event handler for the right arrow key veing pressed, expands the current group or
  6193. message with stack trace. Otherwise, does nothing.
  6194. (WebInspector.LogContentView.prototype._previousMessage):
  6195. Traverses the list of visible messages until we find a message located prior to
  6196. the provided message.
  6197. (WebInspector.LogContentView.prototype._nextMessage):
  6198. Traverses the list of visible messages until we find a message located after to the
  6199. provided message.
  6200. (WebInspector.LogContentView.prototype._clearFocusableChildren):
  6201. Remove the "tabindex" attribute on all elements located within the messages container
  6202. to ensure no element can steal focus away from the messages container and mess with our
  6203. handling of keyboard events.
  6204. 2013-03-12 Timothy Hatcher <timothy@apple.com>
  6205. Don't truncate the suggestions menu when it gets close to the right edge.
  6206. Restore a line that was removed that we needed after all to get the right behavior.
  6207. Rubber-stamped by Joseph Pecoraro.
  6208. * UserInterface/CompletionSuggestionsView.js:
  6209. (WebInspector.CompletionSuggestionsView.prototype.show): Update width after maximumWidth changes.
  6210. 2013-03-12 Timothy Hatcher <timothy@apple.com>
  6211. Prevent style text from shifting as properties are marked with checkboxes.
  6212. This marks blanks lines in editable styles with a placeholder that is the same
  6213. size as the checkbox. When a checkbox is added the placeholder is removed. That
  6214. switch keeps the text in the same position and looks superb!
  6215. This also forces checkboxes to be visible when the editor has focus, not just hovered.
  6216. Reviewed by Joseph Pecoraro.
  6217. * UserInterface/CSSStyleDeclarationTextEditor.css:
  6218. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .checkbox-placeholder): Added.
  6219. * UserInterface/CSSStyleDeclarationTextEditor.js:
  6220. (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers): Added all
  6221. param so we don't clear placeholder in all cases, only when doing a reset.
  6222. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Call
  6223. _removeCheckboxPlaceholder.
  6224. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Call
  6225. _markBlankLinesWithCheckboxPlaceholder.
  6226. (WebInspector.CSSStyleDeclarationTextEditor.prototype._markBlankLinesWithCheckboxPlaceholder): Added.
  6227. (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeCheckboxPlaceholder): Added.
  6228. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call
  6229. _markBlankLinesWithCheckboxPlaceholder and pass true for _clearTextMarkers's all param.
  6230. 2013-03-12 Timothy Hatcher <timothy@apple.com>
  6231. Improve the load time of the Web Inspector by loading localizedString.js sooner.
  6232. Reviewed by Joseph Pecoraro.
  6233. * UserInterface/LoadLocalizedStrings.js: Added.
  6234. * UserInterface/Main.html: Include LoadLocalizedStrings.js before Main.js.
  6235. * UserInterface/Main.js: Don't dynamically load localizedString.js.
  6236. 2013-03-11 Timothy Hatcher <timothy@apple.com>
  6237. Disable auto completion inside comments.
  6238. <rdar://problem/13387317>
  6239. Reviewed by Joseph Pecoraro.
  6240. * UserInterface/CodeMirrorCompletionController.js:
  6241. (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): Return early inside comments.
  6242. 2013-03-11 Timothy Hatcher <timothy@apple.com>
  6243. Don't highlight autocompletion items on hover. Only highlight them when active.
  6244. <rdar://problem/13387350> CSS autocompletion can be confusing if mouse cursor is hidden and hovering completion menu
  6245. Reviewed by Joseph Pecoraro.
  6246. * UserInterface/CompletionSuggestionsView.css:
  6247. (.completion-suggestions-container:not(:active) > .item.selected,
  6248. .completion-suggestions-container > .item:active): Renamed from being hover to active.
  6249. 2013-03-11 Timothy Hatcher <timothy@apple.com>
  6250. Workaround <rdar://problem/13392441> so Images and Fonts don't get cut off at the top.
  6251. We can get the expected result by using margin: 0 auto until the behavior of -webkit-align-items
  6252. is hashed out more.
  6253. Reviewed by Joseph Pecoraro.
  6254. * UserInterface/FontResourceContentView.css:
  6255. (.content-view.resource.font): Remove -webkit-align-items: center and use margin: 0 auto.
  6256. (.content-view.resource.font .preview): Change 13px to 15px to be less arbitrary.
  6257. * UserInterface/ImageResourceContentView.css:
  6258. (.content-view.resource.image): Ditto.
  6259. 2013-03-11 Timothy Hatcher <timothy@apple.com>
  6260. Make SVG fonts work in the Web Inspector.
  6261. <rdar://problem/13392056> SVG fonts are not rendered when selected
  6262. Reviewed by Jon Lee.
  6263. * UserInterface/FontResourceContentView.js:
  6264. (WebInspector.FontResourceContentView.prototype.contentAvailable): Supply format("svg") when we
  6265. know we are loading an SVG font. This seems to be required for SVG fonts.
  6266. 2013-03-11 Timothy Hatcher <timothy@apple.com>
  6267. Don't allow setting a rule's selector to an empty string.
  6268. <rdar://problem/13387384> When editing a selector to be the empty string, nothing is committed - UI should reflect that
  6269. Reviewed by Antoine Quint.
  6270. * UserInterface/CSSStyleDeclarationSection.css:
  6271. (.style-declaration-section > .header > .selector:empty): Added.
  6272. (.style-declaration-section > .header > .selector:empty::before): Added.
  6273. * UserInterface/CSSStyleDeclarationSection.js:
  6274. (WebInspector.CSSStyleDeclarationSection.prototype._commitSelector): Call refresh if the selector is empty.
  6275. 2013-03-11 Timothy Hatcher <timothy@apple.com>
  6276. Ignore Shift-Tab in CodeMirror instances since it does unexpected things.
  6277. <rdar://problem/13387373> CSS editor typing Shift+Tab adds weird pre-indent
  6278. Reviewed by Antoine Quint.
  6279. * UserInterface/CodeMirrorAdditions.js:
  6280. (ignoreKey): Added.
  6281. 2013-03-11 Timothy Hatcher <timothy@apple.com>
  6282. Improve the wrapping of the pseudo class checkboxes.
  6283. Also make sure the scroll logic handles the different heights possible.
  6284. <rdar://problem/13383635> Pseudo class checkboxes should wrap better with narrow sidebar (never 3x1 & 1x1)
  6285. Reviewed by Antoine Quint.
  6286. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  6287. (.sidebar > .panel.details.css-style > .content > .pseudo-classes): Switch to flex layout.
  6288. (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group): Added.
  6289. (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label): Split the margin on each side.
  6290. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  6291. (WebInspector.CSSStyleDetailsSidebarPanel): Create group elements of up to two labels each.
  6292. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange): Call _updateNoForcedPseudoClassesScrollOffset.
  6293. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Ditto.
  6294. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._updateNoForcedPseudoClassesScrollOffset): Update the height.
  6295. 2013-03-11 Joseph Pecoraro <pecoraro@apple.com>
  6296. <rdar://problem/11720808> REGRESSION (Safari 6): Conditional breakpoints UI missing
  6297. Add back conditional breakpoints UI. The UI is modeled after Xcode's
  6298. "Edit Breakpoint" context menu and popover UI.
  6299. Reviewed by Timothy Hatcher.
  6300. * UserInterface/Breakpoint.js:
  6301. (WebInspector.Breakpoint):
  6302. (WebInspector.Breakpoint.prototype.get condition):
  6303. (WebInspector.Breakpoint.prototype.set condition):
  6304. (WebInspector.Breakpoint.prototype.get info):
  6305. Give a breakpoint a condition, mutators, and save the condition in
  6306. the breakpoint info.
  6307. (WebInspector.Breakpoint.prototype.appendContextMenuItems):
  6308. Add a context menu item for "Edit Breakpoint".
  6309. (WebInspector.Breakpoint.prototype._popoverToggleCheckboxChanged):
  6310. (WebInspector.Breakpoint.prototype._popoverConditionInputChanged):
  6311. (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
  6312. (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
  6313. Generate the popover content and show the popover.
  6314. * UserInterface/Breakpoint.css: Added.
  6315. (.popover .edit-breakpoint-popover-content):
  6316. (.popover .edit-breakpoint-popover-content > label.toggle):
  6317. (.popover .edit-breakpoint-popover-content > table):
  6318. (.popover .edit-breakpoint-popover-content > table > tr > th):
  6319. (.popover .edit-breakpoint-popover-content > table > tr > td):
  6320. (#edit-breakpoint-popover-condition):
  6321. Styles for the edit breakpoint popover.
  6322. * UserInterface/BreakpointTreeElement.js:
  6323. (WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
  6324. Pass the breakpoint element in the display so that if a popover needs
  6325. to be shown, we have the bounds of an element to show it for.
  6326. * UserInterface/DebuggerManager.js:
  6327. (WebInspector.DebuggerManager):
  6328. (WebInspector.DebuggerManager.prototype.isBreakpointEditable):
  6329. Never allow setting a condition on the special breakpoints.
  6330. (WebInspector.DebuggerManager.prototype._breakpointConditionDidChange):
  6331. (WebInspector.DebuggerManager.prototype._breakpointConditionDidChange.breakpointRemoved):
  6332. To set the condition delete the old breakpoint and set a new breakpoint
  6333. with the new condition. The WebInspector.Breakpoint will get an updated id.
  6334. * UserInterface/Main.html:
  6335. * Localizations/en.lproj/localizedStrings.js:
  6336. Include new files and strings.
  6337. 2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
  6338. Add a "Select Output" button to PrettyPrinting tools.
  6339. The new button make copying the entire output easier. Useful for saving
  6340. before and after contents to see changes. Also update the formatter and
  6341. clean up some style issues.
  6342. Unreviewed tools change.
  6343. * Tools/PrettyPrinting/CodeMirrorFormatters.js:
  6344. * Tools/PrettyPrinting/index.html:
  6345. 2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
  6346. Pretty printing: Don't try to be smart about unary +/-.
  6347. This was causing some simple expressions like "1+1" or "foo+1" to
  6348. become "1 +1" and "foo +1" instead of the expected "1 + 1" and
  6349. "foo + 1". The most common unary expressions negative numbers,
  6350. are parsed as a single token by CodeMirror anyways, so drop the
  6351. special case in the formatter.
  6352. Reviewed by Timothy Hatcher.
  6353. * UserInterface/CodeMirrorFormatters.js:
  6354. Remove the special case that tried to handle unary +/-.
  6355. 2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
  6356. Update the PrettyPrinting Tool with new formatter changes.
  6357. Unreviewed tools change.
  6358. * Tools/PrettyPrinting/CodeMirrorFormatters.js:
  6359. * Tools/PrettyPrinting/Formatter.js:
  6360. (Formatter.prototype._handleToken):
  6361. (Formatter.prototype._handleEmptyLine):
  6362. 2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
  6363. Pretty Printing: switch from startsWith to regex matching for tokens
  6364. This addresses a review comment that using startsWith for checking
  6365. token types is brittle and we should check the entire string. The
  6366. performance impact was negligible on JavaScript and minor on CSS,
  6367. so it is worth making the change to make the code less brittle.
  6368. Reviewed by Timothy Hatcher.
  6369. * UserInterface/CodeMirrorFormatters.js:
  6370. * UserInterface/Formatter.js:
  6371. (Formatter.prototype._handleToken):
  6372. (Formatter.prototype._handleEmptyLine):
  6373. 2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
  6374. Add Pretty Printing Debug Page to WebInspector/Tools/PrettyPrinting
  6375. The pretty printing files in the Inspector can be run independently of
  6376. the Inspector. The only requirements are CodeMirror, its modes, and a
  6377. few Utility functions. This provides a separate tool that makes it
  6378. easier to debug and benchmark pretty printing without needing to run
  6379. the entire inspector. By default it includes some debug information
  6380. that will speed up debugging and make making improvements easier.
  6381. Rubber-stamped by Timothy Hatcher.
  6382. * Tools/PrettyPrinting/CodeMirrorFormatters.js: Added.
  6383. * Tools/PrettyPrinting/Formatter.js: Added.
  6384. * Tools/PrettyPrinting/FormatterContentBuilder.js: Added.
  6385. * Tools/PrettyPrinting/codemirror.css: Added.
  6386. * Tools/PrettyPrinting/codemirror.js: Added.
  6387. * Tools/PrettyPrinting/css.js: Added.
  6388. * Tools/PrettyPrinting/javascript.js: Added.
  6389. CodeMirror and WebInspector pretty printing files copied with only
  6390. minor tweaks (debugging code).
  6391. * Tools/PrettyPrinting/populate/apple.css: Added.
  6392. * Tools/PrettyPrinting/populate/jquery.min.js: Added.
  6393. Useful JavaScript and CSS content to populate the editor with. The
  6394. contents are decent stress tests for coverage and benchmarking.
  6395. jQuery is already in Safari for other tools, and apple.com's CSS
  6396. is Apple source. These files are just included as test data.
  6397. * Tools/PrettyPrinting/index.html: Added.
  6398. Driver. Includes an editor, some buttons, and outputs results.
  6399. 2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
  6400. <rdar://problem/13375942> Pretty printing: Search results highlight wrong text range and highlight wrong line
  6401. Provide a SourceCodeTextRange. This contains start and end SourceCodeLocation
  6402. objects and uses those to provide raw, formatted, and mapped (display)
  6403. WebInspector.TextRanges and events when the range bounds change.
  6404. Search results coming from the backend have the original content and so
  6405. include raw text range information. When we jump to the source code we
  6406. will want to reveal and highlight the formatted line.
  6407. Reviewed by Timothy Hatcher.
  6408. * UserInterface/DOMSearchMatchObject.js:
  6409. (WebInspector.DOMSearchMatchObject):
  6410. (WebInspector.DOMSearchMatchObject.prototype.get sourceCodeTextRange):
  6411. * UserInterface/Main.html:
  6412. * UserInterface/ResourceSearchMatchObject.js:
  6413. (WebInspector.ResourceSearchMatchObject):
  6414. (WebInspector.ResourceSearchMatchObject.prototype.get sourceCodeTextRange):
  6415. Switch these to create and hold a SourceCodeTextRange.
  6416. * UserInterface/ResourceSidebarPanel.js:
  6417. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
  6418. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
  6419. When selecting a SearchMatchObject reveal and select the formatted range.
  6420. It may be jarring to the user to see a search result for something and
  6421. jump to the mapped (display) location which may not contain the search term.
  6422. * UserInterface/SearchResultTreeElement.js:
  6423. (WebInspector.SearchResultTreeElement):
  6424. (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle):
  6425. Be aware that the represented SearchMatchObject has a sourceCodeTextRange
  6426. now. But we are provided line content from the original resource, so in
  6427. highlighting the search string use the original resource's text range.
  6428. * UserInterface/SourceCode.js:
  6429. (WebInspector.SourceCode.prototype.createSourceCodeTextRange):
  6430. * UserInterface/SourceMapResource.js:
  6431. (WebInspector.SourceMapResource.prototype.createSourceCodeTextRange):
  6432. Helpers for creating a SourceCodeTextRange by providing an unformatted
  6433. TextRange in the given resource. Automatically takes care of SourceMaps.
  6434. * UserInterface/SourceCodeTextRange.js: Added.
  6435. (WebInspector.SourceCodeTextRange):
  6436. (WebInspector.SourceCodeTextRange.prototype.get sourceCode):
  6437. (WebInspector.SourceCodeTextRange.prototype.get textRange):
  6438. (WebInspector.SourceCodeTextRange.prototype.get formattedTextRange):
  6439. (WebInspector.SourceCodeTextRange.prototype.get displaySourceCode):
  6440. (WebInspector.SourceCodeTextRange.prototype.get displayTextRange):
  6441. (WebInspector.SourceCodeTextRange.prototype._startAndEndLocationsInSameMappedResource):
  6442. (WebInspector.SourceCodeTextRange.prototype._sourceCodeLocationChanged):
  6443. SourceCodeTextRange matching SourceCodeLocation's semantics.
  6444. 2013-03-09 Timothy Hatcher <timothy@apple.com>
  6445. Don't flash red strikethrough when actively editing a style.
  6446. <rdar://problem/13385762>
  6447. Reviewed by Joseph Pecoraro.
  6448. * UserInterface/CSSStyleDeclarationTextEditor.css:
  6449. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.invalid): Renamed.
  6450. * UserInterface/CSSStyleDeclarationTextEditor.js:
  6451. (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearRemoveEditingLineClassesTimeout): Added.
  6452. (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClasses): Added.
  6453. (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClasses.removeEditingLineClasses): Added.
  6454. (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClassesSoon): Added.
  6455. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Add EditingLineStyleClassName to the changed line.
  6456. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateProperties): Call _removeEditingLineClassesSoon.
  6457. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call _removeEditingLineClasses.
  6458. * UserInterface/CodeMirrorCompletionController.js:
  6459. (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint): Don't add line CompletionPendingStyleClassName.
  6460. (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): Remove call to _removePendingCompletionLineStyleClass.
  6461. (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint): Ditto.
  6462. (WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass): Removed.
  6463. 2013-03-09 Timothy Hatcher <timothy@apple.com>
  6464. Prevent CSS autocompletion from interfering with the undo/redo history.
  6465. We now remove any changes we programmatically do from the undo history.
  6466. And before undo or redo we make sure to hide the completions so the editor
  6467. is back to the state that matches the history.
  6468. <rdar://problem/13384296> CSS Autocompletion causes unexpected Undo behavior
  6469. Reviewed by Joseph Pecoraro.
  6470. * UserInterface/CodeMirrorCompletionController.js:
  6471. (WebInspector.CodeMirrorCompletionController): Hook up _handleHideKey to the standard
  6472. undo and redo shortcuts. Also hook up select all so it goes through instead of being
  6473. blocked by _handleCursorActivity.
  6474. (WebInspector.CodeMirrorCompletionController.prototype.get _currentReplacementText): Added.
  6475. (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update): Call
  6476. _removeLastChangeFromHistory after replaceRange.
  6477. (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update): Added.
  6478. Replace the prefix with the full completion text. Don't call _removeLastChangeFromHistory.
  6479. (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): Call update.
  6480. (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): Added.
  6481. (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update): Call
  6482. _removeLastChangeFromHistory after each replaceRange.
  6483. (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): Call
  6484. _removeCompletionHint before getting the cursor so any cursor changes are done first.
  6485. (WebInspector.CodeMirrorCompletionController.prototype._handleHideKey): Added. Hide the completions
  6486. and pass through to other the standard handlers.
  6487. 2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
  6488. <rdar://problem/12463631> REGRESSION: Subframes don't show the DOM tree
  6489. Reviewed by Timothy Hatcher.
  6490. * UserInterface/DOMTree.js:
  6491. (WebInspector.DOMTree):
  6492. (WebInspector.DOMTree.prototype.requestRootDOMNode):
  6493. (WebInspector.DOMTree.prototype._requestRootDOMNodeInternal):
  6494. (WebInspector.DOMTree.prototype._frameMainResourceDidChange):
  6495. (WebInspector.DOMTree.prototype._frameExecutionContextChanged):
  6496. If we are a subframe we must wait for a context execution identifier
  6497. to do the RuntimeAgent.evaluate to get the document. So we may need
  6498. to wait for it. Switch to invoke and clarify we use frameId for
  6499. iOS 6 backwards compatibility.
  6500. * UserInterface/ExecutionContext.js: Added.
  6501. (WebInspector.ExecutionContext):
  6502. (WebInspector.ExecutionContext.supported):
  6503. (WebInspector.ExecutionContext.prototype.get id):
  6504. (WebInspector.ExecutionContext.prototype.get name):
  6505. (WebInspector.ExecutionContext.prototype.get isPageContext):
  6506. (WebInspector.ExecutionContext.prototype.get frame):
  6507. WebInspector.Object class for Runtime.ExecutionContextDescription type.
  6508. This was unavailable in iOS 6, so add a static "supported" function.
  6509. * UserInterface/Frame.js:
  6510. (WebInspector.Frame.prototype.initialize):
  6511. (WebInspector.Frame.prototype.commitProvisionalLoad):
  6512. Clear executino contexts on initialize, navigating, and detaching (manager).
  6513. (WebInspector.Frame.prototype.get mainExecutionContext):
  6514. (WebInspector.Frame.prototype.get executionContexts):
  6515. (WebInspector.Frame.prototype.clearExecutionContexts):
  6516. (WebInspector.Frame.prototype.addExecutionContext):
  6517. A frame may have multiple execution contexts. One for each world. We consider
  6518. the first execution context we receive for a frame to be the main one.
  6519. (WebInspector.Frame.prototype.get executionContextIdentifier):
  6520. Backwards compatible execution context identifier. Null if not yet resolved.
  6521. * UserInterface/FrameResourceManager.js:
  6522. (WebInspector.FrameResourceManager.prototype.frameDidDetach):
  6523. When detaching a page, clear the execution contexts.
  6524. (WebInspector.FrameResourceManager.prototype.executionContextCreated):
  6525. Set the execution context on a frame if provided.
  6526. * UserInterface/Main.html:
  6527. * UserInterface/Main.js:
  6528. (WebInspector.contentLoaded):
  6529. Register a "Runtime" domain observer and enable it when it is available.
  6530. * UserInterface/RuntimeObserver.js: Added.
  6531. (WebInspector.RuntimeObserver):
  6532. (WebInspector.RuntimeObserver.prototype.executionContextCreated):
  6533. Add a new Observer for "Runtime" domain events.
  6534. 2013-03-08 Timothy Hatcher <timothy@apple.com>
  6535. <rdar://problem/13381025> REGRESSION (Safari 6): Bottom-up profiling option missing
  6536. Reviewed by Joseph Pecoraro.
  6537. * Localizations/en.lproj/localizedStrings.js: Updated.
  6538. * UserInterface/Images/BottomUpTree.pdf: Added.
  6539. * UserInterface/JavaScriptProfileView.js:
  6540. (WebInspector.JavaScriptProfileView.prototype.get navigationItems): Added. Return percent
  6541. and bottom up item.
  6542. (WebInspector.JavaScriptProfileView.prototype._toggleBottomUpView): Added. Flip the setting
  6543. and call _changeView.
  6544. (WebInspector.JavaScriptProfileView.prototype._changeView): Check _showTreeBottomUpSetting.
  6545. Removing reference to old viewSelectElement property.
  6546. 2013-03-08 Timothy Hatcher <timothy@apple.com>
  6547. Make the "H" key toggle the visibility of the selected DOM element.
  6548. <rdar://problem/13352674> PARITY (WebKit Web Inspector): Shortcut to hide/show DOM elements while inspecting
  6549. Reviewed by Joseph Pecoraro.
  6550. * UserInterface/DOMTreeOutline.js:
  6551. (WebInspector.DOMTreeOutline): Create the keyboard shortcut.
  6552. (WebInspector.DOMTreeOutline.prototype._hideElement.toggleProperties): Added.
  6553. (WebInspector.DOMTreeOutline.prototype._hideElement): Added.
  6554. 2013-03-08 Timothy Hatcher <timothy@apple.com>
  6555. Always fire the Refreshed event for DOMNodeStyles.
  6556. Not firing Refreshed made it hard to listen for when it was safe to use the properties.
  6557. If you call refresh, you expect Refreshed to always fire. But it would only fire if there
  6558. was a significant change. Now it always fires and passes a flag whether it was significant.
  6559. Reviewed by Joseph Pecoraro.
  6560. * UserInterface/CSSStyleDeclaration.js:
  6561. (WebInspector.CSSStyleDeclaration.prototype.propertyForName): Drive by: don't consider
  6562. pending properties if we can't create or are not editable.
  6563. * UserInterface/DOMNodeStyles.js:
  6564. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Keep track on if we
  6565. found a significant change since the last time we fired the Refreshed event. Only recompute
  6566. if it was significant if we aren't already marked as significant. Pass significantChange along
  6567. with the Refreshed event and always fire it.
  6568. * UserInterface/RulesStyleDetailsPanel.js:
  6569. (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Added significantChange param. Only
  6570. do a rebuild if it was significant.
  6571. * UserInterface/StyleDetailsPanel.js:
  6572. (WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh): Set _forceSignificantChange.
  6573. (WebInspector.StyleDetailsPanel.prototype.refresh): Added significantChange param.
  6574. (WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition): Pass along
  6575. significantChange to refresh, taking into consideration _forceSignificantChange.
  6576. (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed): Pass along significantChange
  6577. from the event to _refreshPreservingScrollPosition.
  6578. 2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
  6579. <rdar://problem/13372615> REGRESSION: theverge.com shows 2 duplicate "rs.js" Extra Script resources
  6580. The URLs passed in scriptParsed messages appears to not match up properly
  6581. with the Resource URL. Testing on theverge.com we can get script URLs
  6582. that are encoded where the resource URL is decoded, and we can get script
  6583. URLs that have a hash where the resource URL does not have a hash. Provide
  6584. a generic resourceForScript lookup.
  6585. Reviewed by Timothy Hatcher.
  6586. * UserInterface/FrameResourceManager.js:
  6587. (WebInspector.FrameResourceManager.prototype.resourceForScript):
  6588. Walk the frame tree looking for a resource with the same URL as
  6589. a script. Check the with fragment encoded and decoded script URL,
  6590. an without fragment encoded and decoded script URL.
  6591. * UserInterface/ResourceSidebarPanel.js:
  6592. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
  6593. (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
  6594. * UserInterface/DebuggerManager.js:
  6595. (WebInspector.DebuggerManager.prototype.scriptsForURL):
  6596. * UserInterface/DebuggerSidebarPanel.js:
  6597. (WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
  6598. * UserInterface/ScriptContentView.js:
  6599. (WebInspector.ScriptContentView):
  6600. * UserInterface/SourceCodeTextEditor.js:
  6601. (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
  6602. * UserInterface/SourceMapManager.js:
  6603. (WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
  6604. When we have a script, use the resourceForScript instead of resourceForURL.
  6605. * UserInterface/Utilities.js:
  6606. (removeURLFragment): helper fro removing URL fragment.
  6607. 2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
  6608. <rdar://problem/13371011> Misclassified resources if you open the inspector while the page is loading
  6609. When the Web Inspector is opened during a page load it gets a list of
  6610. all resources from the backend via getResourceTree. We assume that the
  6611. resources in that tree are completed loads. We may later discover that
  6612. some of those resources are actively loading, and that other actively
  6613. loading resources are not in that list. We can detect both of these
  6614. cases by receiving a receiveResponse message. Handle it appropriately
  6615. so that a WebInspector.Script can always find a WebInspector.Resource.
  6616. Otherwise, the Script would show its own tree element under "Extra
  6617. Scripts" in the sidebar.
  6618. Reviewed by Timothy Hatcher.
  6619. * UserInterface/FrameResourceManager.js:
  6620. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
  6621. When we don't have an identifier but we find a Resource by URL, then we should
  6622. update the Resource to still be loading. If we don't have a Resource at all we
  6623. should create one, it is currently loading.
  6624. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
  6625. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading):
  6626. We can assert again. We always expect to have a Resource by the time we get a
  6627. didFinishLoading or didFailLoading message. If we don't then this could be
  6628. an extreme edge case (like a dataReceived without a receivedResponse).
  6629. * UserInterface/Resource.js:
  6630. (WebInspector.Resource.prototype.revertMarkAsFinished):
  6631. Revert the finished and finished timestamp properties. When a
  6632. finishLoading or didFailLoading message comes in the states will
  6633. be updated again.
  6634. 2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
  6635. ASSERT: FrameResourceManager.prototype.frameDidNavigate: console.assert(frame)
  6636. Fix a typo. A WebInspector.Resource has a parentFrame, not a frame accessor.
  6637. Reviewed by Timothy Hatcher.
  6638. * UserInterface/FrameResourceManager.js:
  6639. (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
  6640. 2013-03-08 Timothy Hatcher <timothy@apple.com>
  6641. Fix the font smoothing in the Web Inspector.
  6642. This is needed after making the Web Inspector WKView use tiled drawing since our WKView is transparent.
  6643. <rdar://problem/12922185> REGRESSION: Text in the Web Inspector is not sub-pixel anti-aliased anymore
  6644. Reviewed by Joseph Pecoraro.
  6645. * UserInterface/Main.css:
  6646. (body): Add -webkit-font-smoothing: subpixel-antialiased to force sub-pixel in our transparent WebView.
  6647. * UserInterface/NavigationSidebarPanel.css:
  6648. (.sidebar > .panel.navigation > .empty-content-placeholder > .message): Remove -webkit-font-smoothing: antialiased.
  6649. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6650. Don't scroll the Style details sidebar if the pseudo class checkboxes are not present.
  6651. This applies when inspecting an iOS 6 device or simulator.
  6652. Reviewed by Joseph Pecoraro.
  6653. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  6654. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _initialScrollOffset): Return 0
  6655. if we can't for pseudo classes.
  6656. * UserInterface/StyleDetailsPanel.js:
  6657. (WebInspector.StyleDetailsPanel.prototype.get _initialScrollOffset): Ditto.
  6658. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6659. Display applied media queries in the new Style details sidebar.
  6660. <rdar://problem/13376129>
  6661. Reviewed by Joseph Pecoraro.
  6662. * Localizations/en.lproj/localizedStrings.js: Updated.
  6663. * UserInterface/RulesStyleDetailsPanel.css:
  6664. (.sidebar > .panel.details.css-style .rules .label): Renamed from .inherited-label.
  6665. (.sidebar > .panel.details.css-style .rules .label .go-to-link): Added.
  6666. (.sidebar > .panel.details.css-style .rules .label + .style-declaration-section): Added.
  6667. (.sidebar > .panel.details.css-style .rules .new-rule): Tweaked opacity to better match .label.
  6668. (.sidebar > .panel.details.css-style .rules .new-rule:hover): Ditto.
  6669. (.sidebar > .panel.details.css-style .rules .new-rule:active): Ditto.
  6670. * UserInterface/RulesStyleDetailsPanel.js:
  6671. (WebInspector.RulesStyleDetailsPanel.prototype.refresh.mediaListsEqual): Added.
  6672. (WebInspector.RulesStyleDetailsPanel.prototype.refresh.filteredMediaList): Added.
  6673. (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Only include the media list if it is
  6674. different from the previous media list shown.
  6675. * UserInterface/SourceCodeLocation.js:
  6676. (WebInspector.SourceCodeLocation.prototype.isEqual): Added.
  6677. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6678. Fix a typo in the Dashboard tooltips.
  6679. <rdar://problem/13365669> [WebInspector] typo in source - "click to show to the" should be "click to show the"
  6680. Reviewed by Ricky Mondello.
  6681. * Localizations/en.lproj/localizedStrings.js: Updated.
  6682. * UserInterface/DashboardView.js:
  6683. (WebInspector.DashboardView): Removed "to" from two tooltips.
  6684. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6685. Fix the word wrapping for long origins that are links.
  6686. Also fixes the location and wrapping of the read-only lock icon.
  6687. <rdar://problem/13365935> Long CSS resource names causes poor line wrapping in Style sidebar
  6688. Reviewed by Joseph Pecoraro.
  6689. * UserInterface/CSSStyleDeclarationSection.css:
  6690. (.style-declaration-section.locked > .header::before): Changed from after so the lock sticks
  6691. to the top of the section as intended instead of on the last line. Add a left margin to prevent
  6692. the origin from touching the icon.
  6693. (.style-declaration-section > .header > .origin): Remove display: inline-block and vertical-align.
  6694. Added word-wrap: break-word and white-space: nowrap to prevent breaking the built-in origins among
  6695. multiple lines.
  6696. (.style-declaration-section > .header > .origin a): Added. Set white-space to normal to allow it
  6697. to break along multiple lines.
  6698. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6699. Indent wrapped lines by 2 extra spaces to better break up long lines in the details sidebar.
  6700. An earlier change made it work for editable styles, this makes it work for read-only styles.
  6701. <rdar://problem/13310983> Long styles that wrap are hard to read in new Style details sidebar.
  6702. Reviewed by Ricky Mondello.
  6703. * UserInterface/CSSStyleDeclarationTextEditor.css:
  6704. (.css-style-text-editor.read-only > .CodeMirror pre):
  6705. 2013-03-07 Jessie Berlin <jberlin@apple.com>
  6706. Ran update-safari-localizable-strings.
  6707. * Localizations/en.lproj/localizedStrings.js:
  6708. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6709. Add Array.lastValue and start using it.
  6710. Reviewed by Antoine Quint.
  6711. * UserInterface/CodeMirrorCompletionController.js:
  6712. (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
  6713. * UserInterface/CodeMirrorFormatters.js:
  6714. * UserInterface/DOMNode.js:
  6715. (WebInspector.DOMNode.prototype.get lastChild):
  6716. * UserInterface/DOMTreeElement.js:
  6717. (WebInspector.DOMTreeElement.prototype._updateChildren):
  6718. (WebInspector.DOMTreeElement.prototype.moveToNextAttributeIfNeeded):
  6719. (WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
  6720. * UserInterface/DataGrid.js:
  6721. (WebInspector.DataGrid.prototype.sortNodes):
  6722. (WebInspector.DataGridNode.prototype.traversePreviousNode):
  6723. * UserInterface/FormatterContentBuilder.js:
  6724. (FormatterContentBuilder.prototype.removeLastNewline):
  6725. (FormatterContentBuilder.prototype._addFormattedLineEnding):
  6726. * UserInterface/HierarchicalPathNavigationItem.js:
  6727. (WebInspector.HierarchicalPathNavigationItem.prototype.get lastComponent):
  6728. * UserInterface/InspectorBackend.js:
  6729. (InspectorBackendClass.prototype._sendMessageToBackend):
  6730. * UserInterface/TextPrompt.js:
  6731. (WebInspector.TextPrompt.prototype._completionsReady):
  6732. * UserInterface/TimelineManager.js:
  6733. (WebInspector.TimelineManager.prototype.eventRecorded):
  6734. * UserInterface/TimelineOverview.js:
  6735. (WebInspector.TimelineOverview.prototype.update):
  6736. * UserInterface/Utilities.js:
  6737. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6738. Use Array.contains instead of indexOf.
  6739. Reviewed by Antoine Quint.
  6740. * UserInterface/Branch.js:
  6741. (WebInspector.Branch.prototype.addRevision):
  6742. * UserInterface/CSSRule.js:
  6743. * UserInterface/CSSStyleDeclaration.js:
  6744. * UserInterface/CSSStyleDeclarationSection.js:
  6745. (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
  6746. * UserInterface/CodeMirrorCompletionController.js:
  6747. (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
  6748. * UserInterface/ContentBrowser.js:
  6749. (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem):
  6750. * UserInterface/ContentViewContainer.js:
  6751. (WebInspector.ContentViewContainer.prototype.showContentView):
  6752. * UserInterface/DOMNode.js:
  6753. * UserInterface/DOMNodeStyles.js:
  6754. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
  6755. * UserInterface/DOMTreeElement.js:
  6756. * UserInterface/GeneralTreeElement.js:
  6757. (WebInspector.GeneralTreeElement.prototype.addClassName):
  6758. (WebInspector.GeneralTreeElement.prototype.removeClassName):
  6759. * UserInterface/LayerTreeManager.js:
  6760. (WebInspector.LayerTreeManager.prototype.var):
  6761. * UserInterface/NavigationBar.js:
  6762. (WebInspector.NavigationBar.prototype._findNavigationItem):
  6763. * UserInterface/Sidebar.js:
  6764. (WebInspector.Sidebar.prototype.findSidebarPanel):
  6765. 2013-03-07 Timothy Hatcher <timothy@apple.com>
  6766. Don't ignore user agent rules when forced pseudo classes change.
  6767. Normally the Refreshed event is not fired only when user agent rules change, due to a bug
  6768. in WebCore. However, we need to fire it when the forced pseudo classes change since there
  6769. are base rules for most of the pseudo classes that need to show up in the sidebar.
  6770. Reviewed by Antoine Quint.
  6771. * UserInterface/DOMNodeStyles.js:
  6772. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Don't check for
  6773. user agent rules if _includeUserAgentRulesOnNextRefresh is true.
  6774. (WebInspector.DOMNodeStyles.prototype._markAsNeedsRefresh): Added includeUserAgentRules.
  6775. Set _includeUserAgentRulesOnNextRefresh if includeUserAgentRules is true.
  6776. (WebInspector.DOMNodeStyles.prototype._pseudoClassesDidChange): Pass true to _markAsNeedsRefresh.
  6777. 2013-03-06 Timothy Hatcher <timothy@apple.com>
  6778. Add checkboxes that allow forcing pseudo classes in the Style details sidebar.
  6779. The checkboxes are scrolled off the top if there are no forced pseudo classes.
  6780. When there are forced classes the checkboxes are initially visible. Also we can
  6781. only scroll them away when there is enough content to scroll.
  6782. <rdar://problem/13143555> Add the ability to toggle forced CSS pseudo-classes from style sidebar
  6783. Reviewed by Joseph Pecoraro.
  6784. * Localizations/en.lproj/localizedStrings.js:
  6785. * UserInterface/CSSStyleDeclarationSection.css:
  6786. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  6787. (.sidebar > .panel.details.css-style > .content > .pseudo-classes):
  6788. (.sidebar > .panel.details.css-style > .content > .pseudo-classes > label):
  6789. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  6790. (WebInspector.CSSStyleDetailsSidebarPanel):
  6791. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
  6792. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.addEventListeners):
  6793. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.removeEventListeners):
  6794. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _initialScrollOffset):
  6795. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
  6796. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
  6797. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
  6798. * UserInterface/CSSStyleManager.js:
  6799. (WebInspector.CSSStyleManager.prototype.canForcePseudoClasses):
  6800. * UserInterface/DOMTreeElement.js:
  6801. (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
  6802. * UserInterface/StyleDetailsPanel.js:
  6803. (WebInspector.StyleDetailsPanel.prototype.get _initialScrollOffset):
  6804. (WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition):
  6805. * UserInterface/Utilities.js:
  6806. (Array.prototype.contains): Added.
  6807. 2013-03-06 Timothy Hatcher <timothy@apple.com>
  6808. Remove more dead code from CSSStyleManager that I missed.
  6809. Rubber-stamped by Joseph Pecoraro.
  6810. * UserInterface/CSSStyleManager.js:
  6811. (WebInspector.CSSStyleManager.parseRuleArrayPayload): Removed.
  6812. 2013-03-06 Timothy Hatcher <timothy@apple.com>
  6813. Add missing image Images/Locked.pdf.
  6814. <rdar://problem/13355862>
  6815. * UserInterface/Images/Locked.pdf: Added.
  6816. 2013-03-05 Timothy Hatcher <timothy@apple.com>
  6817. Add support for adding new rules in the Style details sidebar.
  6818. <rdar://problem/11326086> REGRESSION (Safari 6): Can't add new selectors / rules
  6819. Reviewed by Joseph Pecoraro.
  6820. * Localizations/en.lproj/localizedStrings.js: Updated.
  6821. * UserInterface/CSSStyleDeclarationSection.css:
  6822. (div:not(.style-declaration-section) + .style-declaration-section): Added. Generic
  6823. rule to add a shadow on the top when something is between sections.
  6824. * UserInterface/DOMNodeStyles.js:
  6825. (WebInspector.DOMNodeStyles.prototype.addRule): Added.
  6826. (WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder): Include Inspector
  6827. styles. Also collect user and user agent styles into one array.
  6828. * UserInterface/Images/Plus.pdf: Added.
  6829. * UserInterface/RulesStyleDetailsPanel.css:
  6830. (.sidebar > .panel.details.css-style .rules .new-rule): Added.
  6831. (.sidebar > .panel.details.css-style .rules .new-rule img): Added.
  6832. (.sidebar > .panel.details.css-style .rules .new-rule:hover): Added.
  6833. (.sidebar > .panel.details.css-style .rules .new-rule:active): Added.
  6834. * UserInterface/RulesStyleDetailsPanel.js:
  6835. (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection): Focus the new
  6836. inspector rule when it is added.
  6837. (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Create a New Rule button.
  6838. (WebInspector.RulesStyleDetailsPanel.prototype._newRuleClicked): Added.
  6839. 2013-03-05 Timothy Hatcher <timothy@apple.com>
  6840. Remove dead code from CSSStyleManager.
  6841. Rubber-stamped by Joseph Pecoraro.
  6842. * UserInterface/CSSStyleManager.js:
  6843. Remove old code and the copyright that went with the code. None of the remaining
  6844. code came from the original open source file.
  6845. 2013-03-04 Timothy Hatcher <timothy@apple.com>
  6846. Always insert a space after ":" when pretty printing in the Style details sidebar.
  6847. Reviewed by Joseph Pecoraro.
  6848. * UserInterface/CSSProperty.js:
  6849. (WebInspector.CSSProperty.prototype.get synthesizedText): Added.
  6850. (WebInspector.CSSProperty.prototype.get text): Factored into synthesizedText.
  6851. * UserInterface/CSSStyleDeclarationTextEditor.js:
  6852. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Use synthesizedText.
  6853. Using CSSProperty.text still uses the original text which might not have a space after ":".
  6854. 2013-03-04 Timothy Hatcher <timothy@apple.com>
  6855. Skip invalid properties when marking overridden properties.
  6856. Reviewed by Joseph Pecoraro.
  6857. * UserInterface/DOMNodeStyles.js:
  6858. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Check for not valid and continue early.
  6859. 2013-03-04 Timothy Hatcher <timothy@apple.com>
  6860. Flag properties that have other vendor keywords in the value so they are not crossed out in red.
  6861. Reviewed by Joseph Pecoraro.
  6862. * UserInterface/CSSProperty.js:
  6863. (WebInspector.CSSProperty.prototype.hasOtherVendorNameOrKeyword): Check propertyValueHasOtherVendorKeyword too.
  6864. * UserInterface/CSSStyleManager.js:
  6865. (WebInspector.CSSStyleManager.prototype.propertyValueHasOtherVendorKeyword): Added.
  6866. 2013-03-04 Timothy Hatcher <timothy@apple.com>
  6867. Indent wrapped lines by 2 extra spaces to better break up long lines in the details sidebar.
  6868. <rdar://problem/13310983> Long styles that wrap are hard to read in new Style details sidebar.
  6869. Reviewed by Joseph Pecoraro.
  6870. * UserInterface/CSSStyleDeclarationTextEditor.css:
  6871. (.css-style-text-editor > .CodeMirror pre): Tweak the padding and text-indent.
  6872. 2013-03-04 Timothy Hatcher <timothy@apple.com>
  6873. Add CodeMirrorCompletionController and start using it in CSSStyleDeclarationTextEditor.
  6874. This restores auto complete to the Style details sidebar and also paves the way for using
  6875. CodeMirror for the console prompt.
  6876. <rdar://problem/13304962> REGRESSION: Style property autocomplete missing from the Style details sidebar
  6877. Reviewed by Joseph Pecoraro.
  6878. * UserInterface/CSSStyleDeclarationTextEditor.css:
  6879. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .completion-pending .css-style-declaration-property.invalid):
  6880. * UserInterface/CSSStyleDeclarationTextEditor.js:
  6881. (WebInspector.CSSStyleDeclarationTextEditor):
  6882. (WebInspector.CSSStyleDeclarationTextEditor.prototype.completionControllerCompletionsHidden):
  6883. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
  6884. (WebInspector.CSSStyleDeclarationTextEditor.prototype):
  6885. * UserInterface/CodeMirrorCompletionController.css: Added.
  6886. (.CodeMirror .CodeMirror-lines .completion-hint):
  6887. * UserInterface/CodeMirrorCompletionController.js: Added.
  6888. (WebInspector.CodeMirrorCompletionController):
  6889. (WebInspector.CodeMirrorCompletionController.prototype.get delegate):
  6890. (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
  6891. (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
  6892. (WebInspector.CodeMirrorCompletionController.prototype.isShowingCompletions):
  6893. (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
  6894. (WebInspector.CodeMirrorCompletionController.prototype.close):
  6895. (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
  6896. (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsClickedCompletion):
  6897. (WebInspector.CodeMirrorCompletionController.prototype._hasPendingCompletion):
  6898. (WebInspector.CodeMirrorCompletionController.prototype._notifyCompletionsHiddenSoon):
  6899. (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
  6900. (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
  6901. (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
  6902. (WebInspector.CodeMirrorCompletionController.prototype.update):
  6903. (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
  6904. (WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass.removePendingStyleClass):
  6905. (WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass):
  6906. (WebInspector.CodeMirrorCompletionController.prototype.isStopCharacter):
  6907. (WebInspector.CodeMirrorCompletionController.prototype.isOpenBracketCharacter):
  6908. (WebInspector.CodeMirrorCompletionController.prototype.isCloseBracketCharacter):
  6909. (WebInspector.CodeMirrorCompletionController.prototype.matchingBracketCharacter):
  6910. (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
  6911. (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
  6912. (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
  6913. (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
  6914. (WebInspector.CodeMirrorCompletionController.prototype._handleUpKey):
  6915. (WebInspector.CodeMirrorCompletionController.prototype._handleDownKey):
  6916. (WebInspector.CodeMirrorCompletionController.prototype._handleRightOrEnterKey):
  6917. (WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
  6918. (WebInspector.CodeMirrorCompletionController.prototype._handleTabKey):
  6919. (WebInspector.CodeMirrorCompletionController.prototype._handleChange):
  6920. (WebInspector.CodeMirrorCompletionController.prototype._handleCursorActivity):
  6921. (WebInspector.CodeMirrorCompletionController.prototype._handleHideAction):
  6922. * UserInterface/CompletionSuggestionsView.css: Added.
  6923. (.completion-suggestions):
  6924. (.completion-suggestions > .completion-suggestions-container):
  6925. (.completion-suggestions-container > .item):
  6926. (.completion-suggestions-container > .item:hover):
  6927. * UserInterface/CompletionSuggestionsView.js: Added.
  6928. (WebInspector.CompletionSuggestionsView):
  6929. (WebInspector.CompletionSuggestionsView.prototype.get delegate):
  6930. (WebInspector.CompletionSuggestionsView.prototype.get visible):
  6931. (WebInspector.CompletionSuggestionsView.prototype.get selectedIndex):
  6932. (WebInspector.CompletionSuggestionsView.prototype.set selectedIndex):
  6933. (WebInspector.CompletionSuggestionsView.prototype.selectNext):
  6934. (WebInspector.CompletionSuggestionsView.prototype.selectPrevious):
  6935. (WebInspector.CompletionSuggestionsView.prototype.isHandlingClickEvent):
  6936. (WebInspector.CompletionSuggestionsView.prototype.show):
  6937. (WebInspector.CompletionSuggestionsView.prototype.hide):
  6938. (WebInspector.CompletionSuggestionsView.prototype.update):
  6939. (WebInspector.CompletionSuggestionsView.prototype.get _selectedItemElement):
  6940. (WebInspector.CompletionSuggestionsView.prototype._mouseDown):
  6941. (WebInspector.CompletionSuggestionsView.prototype._mouseUp):
  6942. (WebInspector.CompletionSuggestionsView.prototype._itemClicked):
  6943. * UserInterface/Main.html:
  6944. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  6945. Disable some features while column debugging is broken
  6946. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  6947. To prevent broken behavior and a poor experience with breakpoints and
  6948. debugging but still allow for pretty-printing disable some features
  6949. related to columns. We can revert this change later and test more when
  6950. the underlying issue is fixed.
  6951. Reviewed by Timothy Hatcher.
  6952. * UserInterface/DebuggerSidebarPanel.js:
  6953. (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
  6954. Instead of jumping to the display location, jump to the original location.
  6955. * UserInterface/SourceCodeTextEditor.js:
  6956. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
  6957. Don't autoformat if we're being debugged.
  6958. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  6959. If we are going to be debugged unformat.
  6960. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
  6961. Disallow setting breakpoints in formatted content.
  6962. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  6963. Update CodeMirror to ToT (v3.1+) which includes some important performance fixes
  6964. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  6965. Reviewed by Timothy Hatcher.
  6966. * UserInterface/External/CodeMirror/codemirror.js:
  6967. * UserInterface/External/CodeMirror/javascript.js:
  6968. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  6969. Set the FormatterSourceMap on both Resource and Script like SourceMaps
  6970. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  6971. Most source code text editors are for Resources, like external scripts.
  6972. However the backend identifies call frames with Script line and column
  6973. information. So the Script needs to know about the Resource's formatter.
  6974. We register for events in case the execution line changes on the fly.
  6975. This could happen if a breakpoint is hit on page load of a script that
  6976. is auto formatted. When the page loads, the breakpoint is hit and the
  6977. call frame is created with the original location and no formatter. When
  6978. the script Resource is shown it gets formatted, the associated Script
  6979. gets the formatter and the active call frame location updates its
  6980. display location. In that case the text editor for the Resource may
  6981. need to update its display of the execution line number.
  6982. Reviewed by Timothy Hatcher.
  6983. * UserInterface/SourceCodeTextEditor.js:
  6984. (WebInspector.SourceCodeTextEditor.prototype.close):
  6985. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  6986. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
  6987. (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
  6988. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  6989. Update Display Strings in Breakpoint and CallFrame TreeElements
  6990. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  6991. If a breakpoint is on a column, show line:column. If the breakpoint is
  6992. in a formatted view, set the subtitle to the original location. If a
  6993. call frame is in a formatted source, include the original location in
  6994. the tooltip.
  6995. Reviewed by Timothy Hatcher.
  6996. * UserInterface/SourceCodeLocation.js:
  6997. (WebInspector.SourceCodeLocation.prototype.originalLocationString):
  6998. (WebInspector.SourceCodeLocation.prototype.displayLocationString):
  6999. (WebInspector.SourceCodeLocation.prototype._locationString):
  7000. Provide generic file:line:column string support.
  7001. * Localizations/en.lproj/localizedStrings.js:
  7002. * UserInterface/BreakpointTreeElement.js:
  7003. (WebInspector.BreakpointTreeElement.prototype._updateTitles):
  7004. * UserInterface/CallFrameTreeElement.js:
  7005. (WebInspector.CallFrameTreeElement):
  7006. Update strings where appropriate.
  7007. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7008. Automatically pretty print files that look like they are minified.
  7009. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  7010. Reviewed by Timothy Hatcher.
  7011. * UserInterface/SourceCodeTextEditor.js:
  7012. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
  7013. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7014. Update breakpoint handling for formatted content
  7015. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  7016. TextEditor and SourceCodeTextEditor both have a map that stores breakpoint
  7017. information for editor lineNumber and columnNumber. For editors it makes
  7018. the most sense to keep these maps consistent with the formatted state of
  7019. the editor.
  7020. Terminology with this in mind "editor line info" is always the line and
  7021. column information for the current state of the editor. If the editor
  7022. is formatted, this is a formatted line and column of the sourceCode.
  7023. if the editor is not formatted this is the original line and column of
  7024. the sourceCode.
  7025. A tricky part here is that with a FormatterSourceMap is that it may map
  7026. a simple line:0 to a more accurate line:#. For example setting the
  7027. breakpoint on a pretty printed source code with leading whitespace, the
  7028. accurate location will not be column 0 but instead be the column # of
  7029. the first character on that line. When this happens we need to make sure
  7030. that both the SourceCodeTextEditor and TextEditor have stored the more
  7031. accurate location in their maps.
  7032. Reviewed by Timothy Hatcher.
  7033. * UserInterface/SourceCodeTextEditor.js:
  7034. (WebInspector.SourceCodeTextEditor.prototype._unformattedLineInfoForEditorLineInfo):
  7035. Given an editor line info, this gives us the original line info depending on
  7036. if the text editor is formatted or not.
  7037. (WebInspector.SourceCodeTextEditor.prototype._editorLineInfoForSourceCodeLocation):
  7038. Given a SourceCodeLocation this gives us a line info for the text editor depending
  7039. on if the text editor is formatted or not. SourceCodeLocation already handles this.
  7040. (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
  7041. When a breakpoint moves, we'll need to update our tables removing the old
  7042. location and setting the new location. SourceCodeLocation gives us the old
  7043. and new formatted location which handles if the text editor is formatted or not.
  7044. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
  7045. If the text editor is formatted, be sure to remove a breakpoint with the
  7046. unformatted, original location because we're dealing with the backend.
  7047. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
  7048. When the TextEditor sends a delegate up to the SourceCodeTextEditor about
  7049. a breakpoint being added, it waits for a response to put into its table.
  7050. Use this as an opportunity to provide the accurate resolved location.
  7051. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
  7052. When the TextEditor sends a delegate up to the SourceCodeTextEditor about
  7053. a breakpoint being moved, it has already put an entry into its table at
  7054. line + column 0. We update that entry via updateBreakpointLineAndColumn.
  7055. (WebInspector.SourceCodeTextEditor.prototype.textEditorFormattingDidChange):
  7056. After pretty printing the editor's value was completely changed. Some
  7057. breakpoints may have moved, some might not have. Ignore the DisplayLocation
  7058. change events when setting the formatter on the SourceCode and update all
  7059. the breakpoint map locations for ourself and the underlying TextEditor.
  7060. * UserInterface/TextEditor.js:
  7061. (WebInspector.TextEditor.prototype.updateBreakpointLineAndColumn):
  7062. (WebInspector.TextEditor.prototype._gutterMouseDown):
  7063. Update or set breakpoint info entires with accurante line and column info.
  7064. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7065. Pretty print and incorporate the formatted location into the SourceCodeLocation display location
  7066. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  7067. When a SourceCodeTextEditor formats a SourceCode it produces a
  7068. FormatterSourceMap and sets it on the SourceCode. All SourceCodeLocations
  7069. associated with that SourceCode can update their display location.
  7070. If a location is already listening for DisplayLocation change events
  7071. it will just work (BreakPointTreeElements, CallFrameTreeElements).
  7072. SourceCodeLocation now has 3 sets of values and a display value:
  7073. - [public] sourceCode, lineNumber, columnNumber
  7074. - raw original sourceCode and values
  7075. - useful for interaction with the backend
  7076. - [public] formattedLineNumber, formattedColumnNumber
  7077. - for the original sourceCode
  7078. - if the sourceCode has a formatter, these are the formatted values
  7079. - if the sourceCode doesn't have a formatter, these are the same as the raw values
  7080. - useful for TextEditors that are showing content + gutters for formatted source
  7081. - [private] mappedResource, mappedLineNumber, mappedColumnNumber
  7082. - if the sourceCode has a sourceMap, this is the mapped location of the raw
  7083. values into a SourceMapResource line and column
  7084. - if the sourceCode doesn't have a sourceMap these are null, NaN, NaN
  7085. - useful for a display location, since it is the author's original pre-generated source
  7086. - [public] displayResource, displayLineNumber, displayColumnNumber
  7087. - if there is a mapped location use that
  7088. - if there is a formatted location use that
  7089. - otherwise use the raw original location
  7090. - useful for anyone who wants to display a location
  7091. Most users of SourceCodeLocation should only care about the display
  7092. values and should register for DisplayLocation change events to know
  7093. when to update.
  7094. Reviewed by Timothy Hatcher.
  7095. * UserInterface/TextEditor.js:
  7096. (WebInspector.TextEditor):
  7097. (WebInspector.TextEditor.prototype.get formatterSourceMap):
  7098. (WebInspector.TextEditor.prototype._prettyPrint):
  7099. Run the formatter. Update selection. Update search. Notify delegate.
  7100. * UserInterface/ScriptContentView.js:
  7101. (WebInspector.ScriptContentView):
  7102. (WebInspector.ScriptContentView.prototype._textEditorFormattingDidChange):
  7103. * UserInterface/TextResourceContentView.js:
  7104. (WebInspector.TextResourceContentView):
  7105. (WebInspector.TextResourceContentView.prototype._textEditorFormattingDidChange):
  7106. Update the pretty print button's activated state when formatting changes to match the TextEditor.
  7107. * UserInterface/SourceCodeTextEditor.js:
  7108. (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
  7109. The TextEditor changed formatting and updated its FormatterSourceMap. Set
  7110. the FormatterSourceMap on the SourceCode itself.
  7111. * UserInterface/SourceCode.js:
  7112. (WebInspector.SourceCode):
  7113. (WebInspector.SourceCode.prototype.get formatterSourceMap):
  7114. (WebInspector.SourceCode.prototype.set formatterSourceMap):
  7115. A SourceCode may have a formatter source map when the TextEditor for it
  7116. was pretty printed. Store that on the SourceCode so SourceCodeLocation
  7117. objects know where to find it, and send an event when it changes.
  7118. * UserInterface/SourceCodeLocation.js:
  7119. (WebInspector.SourceCodeLocation.prototype.get formattedLineNumber):
  7120. (WebInspector.SourceCodeLocation.prototype.get formattedColumnNumber):
  7121. (WebInspector.SourceCodeLocation.prototype._resolveFormattedLocation):
  7122. Formatted location when the SourceCode is pretty printed. Original otherwise.
  7123. (WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
  7124. (WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
  7125. Mapped location, fallback to formatted, fallback to raw original.
  7126. (WebInspector.SourceCodeLocation.prototype.hasFormattedLocation):
  7127. (WebInspector.SourceCodeLocation.prototype.hasDifferentDisplayLocation):
  7128. Helpful accessors for those that might be interested.
  7129. (WebInspector.SourceCodeLocation.prototype._sourceCodeFormatterDidChange):
  7130. When the SourceCode's formatter source map changed resolve our re-resolve
  7131. our locations and fire an event if needed.
  7132. (WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
  7133. Make the code simpler and handle formatted location changes.
  7134. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7135. Add a pretty print button to text content views
  7136. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  7137. Reviewed by Timothy Hatcher.
  7138. * UserInterface/ContentBrowser.js:
  7139. (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
  7140. * UserInterface/FrameContentView.js:
  7141. (WebInspector.FrameContentView.prototype.get navigationItems):
  7142. Be sure to update navigation items when a FrameContentView changes
  7143. content views (Source Code and DOM Tree), because the different views
  7144. might have different navigation items.
  7145. * Localizations/en.lproj/localizedStrings.js:
  7146. * UserInterface/ScriptContentView.js:
  7147. (WebInspector.ScriptContentView.prototype.get navigationItems):
  7148. (WebInspector.ScriptContentView.prototype._contentDidPopulate):
  7149. (WebInspector.ScriptContentView.prototype._togglePrettyPrint):
  7150. * UserInterface/TextResourceContentView.js:
  7151. (WebInspector.TextResourceContentView.prototype.get navigationItems):
  7152. (WebInspector.TextResourceContentView.prototype._contentDidPopulate):
  7153. (WebInspector.TextResourceContentView.prototype._togglePrettyPrint):
  7154. Add a pretty print button to Script and TextResource content views.
  7155. Disabled initially, and enabled when content populates and the
  7156. TextEditor supports formatting
  7157. * UserInterface/TextEditor.js:
  7158. (WebInspector.TextEditor):
  7159. (WebInspector.TextEditor.prototype.set readOnly):
  7160. (WebInspector.TextEditor.prototype.get formatted):
  7161. (WebInspector.TextEditor.prototype.set formatted):
  7162. (WebInspector.TextEditor.prototype._updateCodeMirrorReadOnly):
  7163. Currently, mark the editor as readyOnly immediately when it is formatted.
  7164. This may change in the future.
  7165. (WebInspector.TextEditor.prototype.hasFormatter):
  7166. (WebInspector.TextEditor.prototype.canBeFormatted):
  7167. Accessor for whether the TextEditor can be formatted.
  7168. * UserInterface/SourceCodeTextEditor.js:
  7169. (WebInspector.SourceCodeTextEditor.prototype.canBeFormatted):
  7170. Don't allow SourceMapResources to be formatted. This is to simplify
  7171. later changes a bit. We can do this later in the future if we want.
  7172. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
  7173. Fire an event when content populates.
  7174. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7175. FormatterSourceMap to convert between original and formatted locations
  7176. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  7177. Add FormatterSourceMap class. This is nearly identical to OpenSource's
  7178. FormatterSourceMapping, which does the same thing. This provides
  7179. conversions in either direction between an original and formatted line
  7180. and column number. It requires the original and formatted line endings
  7181. and a mapping, all data the the ContentBuilder has.
  7182. Reviewed by Timothy Hatcher.
  7183. * UserInterface/FormatterSourceMap.js: Added.
  7184. (WebInspector.FormatterSourceMap):
  7185. (WebInspector.FormatterSourceMap.fromBuilder):
  7186. (WebInspector.FormatterSourceMap.prototype.originalToFormatted):
  7187. (WebInspector.FormatterSourceMap.prototype.formattedToOriginal):
  7188. (WebInspector.FormatterSourceMap.prototype._locationToPosition):
  7189. (WebInspector.FormatterSourceMap.prototype._positionToLocation):
  7190. (WebInspector.FormatterSourceMap.prototype._convertPosition):
  7191. * UserInterface/Main.html:
  7192. * UserInterface/Utilities.js:
  7193. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7194. CSS Pretty Printer
  7195. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  7196. Reviewed by Timothy Hatcher.
  7197. * UserInterface/CodeMirrorFormatters.js:
  7198. (CodeMirror["css mode"].shouldHaveSpaceBeforeToken):
  7199. (CodeMirror["css mode"].shouldHaveSpaceAfterLastToken):
  7200. (CodeMirror["css mode"].newlinesAfterToken):
  7201. (CodeMirror["css mode"].removeLastNewline):
  7202. (CodeMirror["css mode"].indentAfterToken):
  7203. (CodeMirror["css mode"].newlineBeforeToken):
  7204. (CodeMirror["css mode"].dedentBeforeToken):
  7205. (CodeMirror["css mode"].modifyStateForToken):
  7206. The general goals are:
  7207. - spaces after ',' in selector lists
  7208. - spaces after ':' between properties and values
  7209. - newlines after '{', '}', and ';', with 2 newlines between blocks
  7210. - newlines after ',' in long selector lists "a,b,..,z {}"
  7211. - indent after '{' and dedent before '}'
  7212. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7213. Formatter, ContentBuilder, and JavaScript Pretty Printer
  7214. <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
  7215. This patch adds a Formatter driver class, a ContentBuilder class that
  7216. builds both the formatted string and line ending markers needed for a
  7217. source mapping, and JavaScript CodeMirror extensions for pretty printing.
  7218. The Formatter and FormatterContentBuilder classes are not WebInspector
  7219. prefixed. Their only dependency is CodeMirror and the CodeMirror modes.
  7220. They are standalone, and could be moved to a Worker if needed.
  7221. The Formatter class takes a tokenizer (in our case a CodeMirror object)
  7222. and a builder object. Call format() on a range to tokenize over that
  7223. range and populate the builder for that range. The Formatter assumes
  7224. the CodeMirror object has the appropriate pretty printing extensions.
  7225. The ContentBuilder class manages line endings the resulting string, and
  7226. all things whitespace related in the output string (such as collapsing
  7227. whitespace, and indentation).
  7228. The CodeMirror pretty printing extensions are very primitive. For each
  7229. token CodeMirror outputs the mode for that token is asked if we should
  7230. add a space before or after, add newlines before or after, indent or
  7231. dedent, retroactively remove the last newline, or updating private state.
  7232. Most of the time whitespace is already required languages, so whitespace
  7233. only really needs to be added where it is optional and would be prettier.
  7234. One simple example is "}else{" versus "} else {". The mode doesn't need
  7235. to worry about collapsing whitespace. It just suggests where whitespace
  7236. goes and the Formatter + ContentBuilder takes care of the rest.
  7237. Reviewed by Timothy Hatcher.
  7238. * UserInterface/Formatter.js: Added.
  7239. (Formatter):
  7240. (Formatter.prototype.format):
  7241. A StringStream is considered to be one line. So split the content over
  7242. the given range into lines, and tokenize over the lines. There are hooks
  7243. for handling tokens, empty lines, and line endings.
  7244. (Formatter.prototype._handleToken):
  7245. Ask the mode how to pretty print the current token.
  7246. (Formatter.prototype._handleEmptyLine):
  7247. Preserve newlines in multi-line comments. If this is an empty line in
  7248. a comment, force the builder to add a new line.
  7249. (Formatter.prototype._handleLineEnding):
  7250. Notify the builder that of an original line ending.
  7251. * UserInterface/FormatterContentBuilder.js: Added.
  7252. (FormatterContentBuilder):
  7253. (FormatterContentBuilder.prototype.get originalContent):
  7254. (FormatterContentBuilder.prototype.get formattedContent):
  7255. (FormatterContentBuilder.prototype.get mapping):
  7256. (FormatterContentBuilder.prototype.get originalLineEndings):
  7257. (FormatterContentBuilder.prototype.get formattedLineEndings):
  7258. (FormatterContentBuilder.prototype.setOriginalContent):
  7259. Results of a formatting run. Everything needed for a SourceMap.
  7260. (FormatterContentBuilder.prototype.appendToken):
  7261. (FormatterContentBuilder.prototype.appendSpace):
  7262. (FormatterContentBuilder.prototype.appendNewline):
  7263. (FormatterContentBuilder.prototype.removeLastNewline):
  7264. (FormatterContentBuilder.prototype.indent):
  7265. (FormatterContentBuilder.prototype.dedent):
  7266. (FormatterContentBuilder.prototype.addOriginalLineEnding):
  7267. (FormatterContentBuilder.prototype.finish):
  7268. Public interface is simple.
  7269. (FormatterContentBuilder.prototype._popNewLine):
  7270. (FormatterContentBuilder.prototype._append):
  7271. Handle growing / shrinking the content + content length at the same time.
  7272. (FormatterContentBuilder.prototype._appendIndent):
  7273. Indentation is stored in a cache to avoid recomputing often. However,
  7274. the cache stops at 20, if there is an indentation greater than 20 we
  7275. compose it in chunks.
  7276. (FormatterContentBuilder.prototype._addMappingIfNeeded):
  7277. Add a mapping for each token originalPosition and formattedPosition.
  7278. (FormatterContentBuilder.prototype._addFormattedLineEnding):
  7279. Keep track of formatted content line endings.
  7280. * UserInterface/CodeMirrorFormatters.js: Added.
  7281. (CodeMirror["javascript mode"].shouldHaveSpaceBeforeToken):
  7282. (CodeMirror["javascript mode"].shouldHaveSpaceAfterLastToken):
  7283. (CodeMirror["javascript mode"].newlinesAfterToken):
  7284. (CodeMirror["javascript mode"].removeLastNewline):
  7285. (CodeMirror["javascript mode"].indentAfterToken):
  7286. (CodeMirror["javascript mode"].newlineBeforeToken):
  7287. (CodeMirror["javascript mode"].dedentBeforeToken):
  7288. The general goal with these hooks are:
  7289. - spaces before and after most operators (not unary)
  7290. - spaces around keywords
  7291. - newlines after '{', '}', and ';'
  7292. - newlines after ',' when inside an object context
  7293. - indent after '{' and dedent before '}'
  7294. * UserInterface/Main.html:
  7295. Add new files.
  7296. 2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
  7297. <rdar://problem/13331470> REGRESSION: Inspector debugger continue button is a pause icon when it should be an arrow
  7298. Reviewed by Timothy Hatcher.
  7299. * UserInterface/ButtonNavigationItem.js:
  7300. (WebInspector.ButtonNavigationItem.prototype.set image):
  7301. This was appending a new child image element each time instead of
  7302. replacing the existing image. Remove the old children on changes.
  7303. 2013-03-04 Antoine Quint <graouts@apple.com>
  7304. <rdar://problem/13331811> Web Inspector: remove existing LayerTreeAgent protocol APIs (111251)
  7305. Deactivate the layer tree sidebar panel until the new API
  7306. lands in WebCore and we can update the Internal code to use
  7307. this API.
  7308. Reviewed by Timothy Hatcher.
  7309. * UserInterface/LayerTreeManager.js:
  7310. (WebInspector.LayerTreeManager):
  7311. * UserInterface/LayerTreeObserver.js:
  7312. (WebInspector.LayerTreeObserver.prototype.layerTreeDidChange):
  7313. * UserInterface/LayerTreeSidebarPanel.js:
  7314. (WebInspector.LayerTreeSidebarPanel.prototype.supportsDOMNode):
  7315. 2013-03-01 Timothy Hatcher <timothy@apple.com>
  7316. Update the Style details sidebar when when pseudo classes are forced or media queries change.
  7317. <rdar://problem/13328298>
  7318. Reviewed by Joseph Pecoraro.
  7319. * UserInterface/CSSStyleManager.js:
  7320. (WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged): Call mediaQueryResultDidChange on each DOMNodeStyles.
  7321. Removed the event since it wasn't used anymore.
  7322. * UserInterface/DOMNode.js:
  7323. (WebInspector.DOMNode.prototype.setPseudoClassEnabled): Fire the event after the agent actually does the change.
  7324. (WebInspector.DOMNode.prototype.setPseudoClassEnabled.changed): Added.
  7325. * UserInterface/DOMNodeStyles.js:
  7326. (WebInspector.DOMNodeStyles): Added listener for EnabledPseudoClassesChanged.
  7327. (WebInspector.DOMNodeStyles.prototype.mediaQueryResultDidChange): Added. Call _markAsNeedsRefresh.
  7328. (WebInspector.DOMNodeStyles.prototype._markAsNeedsRefresh): Added.
  7329. (WebInspector.DOMNodeStyles.prototype._pseudoClassesDidChange): Added. Call _markAsNeedsRefresh.
  7330. (WebInspector.DOMNodeStyles.prototype._attributesDidChange): Use _markAsNeedsRefresh.
  7331. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.checkRules): Ditto.
  7332. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Ditto.
  7333. 2013-03-01 Timothy Hatcher <timothy@apple.com>
  7334. Changes are committed to frequently since updating to CodeMirror 3.1.
  7335. Reviewed by Joseph Pecoraro.
  7336. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7337. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): The origin for user input
  7338. changed from "input" to "+input". And there is now "+delete". Internally CodeMirror just looks for
  7339. the "+" prefix to decide if the change should coalesce in undo history. We should do the same.
  7340. 2013-03-01 Timothy Hatcher <timothy@apple.com>
  7341. Fix style editing after an Inspector protocol change for how SourceRange is sent.
  7342. <rdar://problem/13324015> Style editing in the new Style details sidebar is broken after r144434
  7343. Reviewed by Joseph Pecoraro.
  7344. * UserInterface/CSSProperty.js:
  7345. (WebInspector.CSSProperty): Removed startStyleSheetTextPosition and endStyleSheetTextPosition.
  7346. Added styleSheetTextRange and styleDeclarationTextRange.
  7347. (WebInspector.CSSProperty.prototype.update): Ditto. Delete _styleDeclarationTextRange if it isn't
  7348. given so it can be recomputed.
  7349. (WebInspector.CSSProperty.prototype.get styleSheetTextRange): Added.
  7350. (WebInspector.CSSProperty.prototype.get styleDeclarationTextRange): Added. Compute if missing.
  7351. * UserInterface/CSSStyleDeclaration.js:
  7352. (WebInspector.CSSStyleDeclaration): Removed startStyleSheetTextPosition and endStyleSheetTextPosition.
  7353. Added styleSheetTextRange.
  7354. (WebInspector.CSSStyleDeclaration.prototype.update): Ditto.
  7355. (WebInspector.CSSStyleDeclaration.prototype.get visibleProperties): Look for styleDeclarationTextRange.
  7356. (WebInspector.CSSStyleDeclaration.prototype.get styleSheetTextRange): Added.
  7357. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7358. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Don't add
  7359. checkboxes for properties if the editor is read-only.
  7360. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Use styleDeclarationTextRange.
  7361. Don't add checkboxes for comments if the editor is read-only.
  7362. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Use styleSheetTextRange.
  7363. * UserInterface/DOMNodeStyles.js:
  7364. (WebInspector.DOMNodeStyles.prototype.changeStyleText): Use styleSheetTextRange.
  7365. (WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Use styleSheetTextRange.
  7366. (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Update comment.
  7367. (WebInspector.DOMNodeStyles.prototype._parseSourceRangePayload): Added. Helper.
  7368. (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Use _parseSourceRangePayload.
  7369. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Ditto.
  7370. * UserInterface/TextRange.js:
  7371. (WebInspector.TextRange): Allow 4 or 2 argument construction. One for lines and columns, the other for offsets.
  7372. (WebInspector.TextRange.prototype.get startLine): Added.
  7373. (WebInspector.TextRange.prototype.get startColumn): Added.
  7374. (WebInspector.TextRange.prototype.get endLine): Added.
  7375. (WebInspector.TextRange.prototype.get endColumn): Added.
  7376. (WebInspector.TextRange.prototype.get startOffset): Added.
  7377. (WebInspector.TextRange.prototype.get endOffset): Added.
  7378. (WebInspector.TextRange.prototype.resolveLinesAndColumns): Added.
  7379. (WebInspector.TextRange.prototype.resolveLinesAndColumns.countNewLineCharacters): Added.
  7380. (WebInspector.TextRange.prototype.resolveOffsets): Added.
  7381. 2013-02-28 Timothy Hatcher <timothy@apple.com>
  7382. Switch from post-processing for the style pretty printer to fully synthesized content.
  7383. Inserting a newline between the semicolon and the next property was causing the newline
  7384. to be inserted between the next property and its checkbox. This is controllable via the
  7385. insertLeft option on bookmarks in CodeMirror; however, that causes typed text to go on
  7386. the left of the checkbox.
  7387. Switching to the synthesized code path is cleaner and simpler.
  7388. <rdar://problem/13314682> Styles on Twitter.com have checkboxes at the end of the property
  7389. instead of beginning
  7390. Reviewed by Joseph Pecoraro.
  7391. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7392. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Renamed lineCount()
  7393. to countNewLineCharacters() since it conflicts with the lineCount variable.
  7394. 2013-02-28 Timothy Hatcher <timothy@apple.com>
  7395. Don't disable property checkboxes after click to prevent a subtle flash.
  7396. <rdar://problem/13306506> CSS rule box flashes checkboxes and crossed-out text during editing
  7397. Reviewed by Antoine Quint.
  7398. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7399. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Don't set disabled.
  7400. Remove assert for range since it might have been removed already.
  7401. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Ditto.
  7402. 2013-02-28 Timothy Hatcher <timothy@apple.com>
  7403. Use CodeMirror 3.1's new getAllMarks() instead of tracking them ourselves.
  7404. Also fix an assert that would fire if we reused a text marker that was removed.
  7405. Reviewed by Antoine Quint.
  7406. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7407. (WebInspector.CSSStyleDeclarationTextEditor): Remove _textMarkers.
  7408. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Stop using _textMarkers.
  7409. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Ditto.
  7410. Also only reuse a marker if it is still in the document.
  7411. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Stop using _textMarkers.
  7412. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Ditto.
  7413. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7414. Remove a flash of the color swatch when toggling a property.
  7415. Reviewed by Joseph Pecoraro.
  7416. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7417. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Add lineNumber
  7418. parameter to update only that line. Also skip colors that are already marked.
  7419. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Call _createColorSwatches.
  7420. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Ditto.
  7421. (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Set __markedColor
  7422. to true so we know it is a color. Remove an unused class name.
  7423. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7424. Pretty print the style text if there are more properties than there are lines.
  7425. There are a few style rules on apple.com that are multiple lines with 5-10
  7426. properties per line. These were avoiding the pretty printing because the line
  7427. count was greater than one.
  7428. Reviewed by Joseph Pecoraro.
  7429. * UserInterface/CSSStyleDeclaration.js:
  7430. (WebInspector.CSSStyleDeclaration.prototype.update): Clear _visibleProperties.
  7431. (WebInspector.CSSStyleDeclaration.prototype.get visibleProperties): Added.
  7432. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7433. (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties): Add an
  7434. option to only iterate over the visible properties. Also pass along if this is the last
  7435. property to the callback.
  7436. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Pass true to
  7437. _iterateOverProperties.
  7438. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Pretty print if the
  7439. visible property count is greater than the line count.
  7440. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7441. Fix the text selection color in the style
  7442. This is fallout from upgrading to CodeMirror 3.1.
  7443. <rdar://problem/13307885> REGRESSION: Selection color in CodeMirror editors is always showing as gray unfocused
  7444. Reviewed by Joseph Pecoraro.
  7445. * UserInterface/CSSStyleDeclarationTextEditor.css:
  7446. (.css-style-text-editor > .CodeMirror.CodeMirror-focused .CodeMirror-selected): Fixed the selector
  7447. to look for CodeMirror-focused on the .CodeMirror element.
  7448. * UserInterface/TextEditor.css:
  7449. (.text-editor > .CodeMirror.CodeMirror-focused .CodeMirror-selected): Ditto.
  7450. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7451. Don't do a full refresh of the Style details sidebar unless the included style declarations
  7452. actually did change.
  7453. Firing the DOMNodeStyles refreshed event cause the DOM to be rebuilt and that interrupts typing
  7454. and causes the checkboxes to flash.
  7455. <rdar://problem/13306506> CSS rule box flashes checkboxes and crossed-out text during editing
  7456. <rdar://problem/13306813> Typing very fast drops characters when editing in the Style details sidebar
  7457. Reviewed by Joseph Pecoraro.
  7458. * UserInterface/DOMNodeStyles.js:
  7459. (WebInspector.DOMNodeStyles.prototype.refresh): Removed dontFireRefreshedEvent parameter. We now
  7460. smartly detect if the event needs to fire.
  7461. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Remove dontFireRefreshedEvent.
  7462. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Iterate over the styles and
  7463. check if any were added or removed from the last refresh.
  7464. (WebInspector.DOMNodeStyles.prototype.attributeChanged): Stop passing true to refresh().
  7465. (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Ditto.
  7466. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7467. WebInspector.CSSProperty.Event.OverriddenStatusChanged is firing too much.
  7468. In the workaround that landed in r48890, we delayed the fetch for inline and computed styles.
  7469. This caused the OverriddenStatusChanged event to fire because the coalesce delay timed out
  7470. while waiting for the inline style to come over the wire.
  7471. Now we fetch them immediately again and if matched styles fails we make the inline and computed
  7472. style callbacks bail before parsing their results. Failing is an edge case that might be fixed
  7473. on the backend soon, so throwing the results away isn't that expensive. This also improves
  7474. refresh performance in the common case.
  7475. Reviewed by Joseph Pecoraro.
  7476. * UserInterface/DOMNodeStyles.js:
  7477. (WebInspector.DOMNodeStyles.prototype.refresh): Initialize matchedStylesFailed to false.
  7478. (WebInspector.DOMNodeStyles.prototype.fetchedMatchedStyles): Set matchedStylesFailed.
  7479. (WebInspector.DOMNodeStyles.prototype.fetchedInlineStyles): Return early if matchedStylesFailed.
  7480. (WebInspector.DOMNodeStyles.prototype.fetchedComputedStyle): Ditto.
  7481. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7482. Properties are not updated when overridden status changes.
  7483. This is fallout from upgrading to CodeMirror 3.1.
  7484. Reviewed by Joseph Pecoraro.
  7485. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7486. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
  7487. The cm property moved to the new doc property of TextMarker.
  7488. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7489. Pretty print the style text if there are multiple properties on only one line.
  7490. This helps cases like apple.com and nytimes.com where minified or single line
  7491. rules are the norm.
  7492. Reviewed by Joseph Pecoraro.
  7493. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7494. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Loop over
  7495. the properties that have markers and add newlines after them.
  7496. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7497. Make color swatches show up for user agent styles, and other styles that don't have text.
  7498. Reviewed by Joseph Pecoraro.
  7499. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7500. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Return early if the style isn't
  7501. editable. This still can be called when readOnly is set because clicking on a color swatch modifies the text.
  7502. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Broke color matching out into
  7503. _createColorSwatches. Added nonatomic support to avoid nesting operations.
  7504. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Added.
  7505. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call _createColorSwatches in synthesized
  7506. case when there isn't style text.
  7507. 2013-02-27 Antoine Quint <graouts@apple.com>
  7508. <rdar://problem/13218172> Make hover state for dashboard icons more pronounced
  7509. Add a thin border around dashboard items on hover and make it slightly
  7510. more pronounced when the item is also being clicked.
  7511. Reviewed by Joseph Pecoraro.
  7512. * UserInterface/DashboardView.css:
  7513. (.dashboard > .item):
  7514. (.dashboard > .item.enabled:hover):
  7515. (.dashboard > .item.enabled:active):
  7516. (.toolbar.normal-size.icon-and-label-horizontal > .item-section > .dashboard > .item):
  7517. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .item):
  7518. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
  7519. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .time):
  7520. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
  7521. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
  7522. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
  7523. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
  7524. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .item):
  7525. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
  7526. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .time):
  7527. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
  7528. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
  7529. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
  7530. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
  7531. 2013-02-27 Timothy Hatcher <timothy@apple.com>
  7532. Update CodeMirror from 3.0.2 to 3.1.
  7533. Rubber-stamped by Jeff Miller.
  7534. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7535. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get focused): Use the wrapper
  7536. element since the classname moved from the scroller element.
  7537. * UserInterface/External/CodeMirror/codemirror.css: Updated.
  7538. * UserInterface/External/CodeMirror/codemirror.js: Updated.
  7539. * UserInterface/External/CodeMirror/htmlmixed.js: Updated.
  7540. * UserInterface/External/CodeMirror/javascript.js: Updated.
  7541. * UserInterface/External/CodeMirror/matchbrackets.js: Updated.
  7542. * UserInterface/External/CodeMirror/searchcursor.js: Updated.
  7543. 2013-02-26 Timothy Hatcher <timothy@apple.com>
  7544. Add support to CodeMirror for incrementing and decrementing numbers.
  7545. The key binding are:
  7546. * Option-Up: +1
  7547. * Shift-Option-Up: +10
  7548. * Option-PageUp: +10
  7549. * Shift-Option-PageUp: +100
  7550. * Option-Down: -1
  7551. * Shift-Option-Down: -10
  7552. * Option-PageDown: -10
  7553. * Shift-Alt-PageDown: -100
  7554. When altering by 1 or -1 any numbers between 1 and -1 will be altered
  7555. by 0.1 or -0.1 instead.
  7556. Reviewed by Joseph Pecoraro.
  7557. * UserInterface/CodeMirrorAdditions.js:
  7558. (alterNumber): Added. Hooked up via the default key map that extends the
  7559. Mac keybindings. This means all instances of CodeMirror get this support.
  7560. 2013-02-26 Timothy Hatcher <timothy@apple.com>
  7561. Add color swatches next to color strings.
  7562. <rdar://problem/7206272>
  7563. Reviewed by Joseph Pecoraro.
  7564. * Localizations/en.lproj/localizedStrings.js: Updated.
  7565. * UserInterface/CSSStyleDeclarationTextEditor.css:
  7566. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch): Added.
  7567. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch > span): Added.
  7568. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:hover > span): Added.
  7569. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:active > span): Added.
  7570. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7571. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Search for colors
  7572. and add swatches next to them.
  7573. (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Added. Replace the
  7574. text with the next color format.
  7575. * UserInterface/Color.js:
  7576. (WebInspector.Color.prototype.nextFormat): Added. Helper to pick the next format.
  7577. 2013-02-26 Timothy Hatcher <timothy@apple.com>
  7578. Add checkboxes next to property names and commented out properties.
  7579. Unchecking will comment out the property and checking the box next to a property comment
  7580. will uncomment it and make it live again.
  7581. <rdar://problem/7206272>
  7582. Reviewed by Joseph Pecoraro.
  7583. * UserInterface/CSSStyleDeclarationTextEditor.css:
  7584. (.css-style-text-editor.read-only > .CodeMirror pre): Added. Indent the text the same amount
  7585. as if there were checkboxes.
  7586. (.css-style-text-editor > .CodeMirror .CodeMirror-lines input[type=checkbox]): Added.
  7587. (.css-style-text-editor:hover > .CodeMirror .CodeMirror-lines input[type=checkbox]): Added.
  7588. * UserInterface/CSSStyleDeclarationTextEditor.js:
  7589. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Look for comments
  7590. that look like properties and add checkboxes in front of them.
  7591. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
  7592. Create checkbox marker for properties or update the existing one.
  7593. (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers): Delete __checkboxMarker.
  7594. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Added.
  7595. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Added.
  7596. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Set the read-only style class
  7597. so the text of read-only styles is indented the same amount as if there were checkboxes.
  7598. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7599. Implement the Rules details style panel.
  7600. <rdar://problem/7206272&12526319>
  7601. Reviewed by Joseph Pecoraro.
  7602. * Localizations/en.lproj/localizedStrings.js: Updated.
  7603. * UserInterface/CSSStyleDeclarationSection.css: Added.
  7604. (.style-declaration-section):
  7605. (.style-declaration-section + .style-declaration-section):
  7606. (.style-declaration-section.last-in-group):
  7607. (.style-declaration-section.last-in-group + .style-declaration-section):
  7608. (.style-declaration-section.last-in-group + .style-declaration-section:last-child):
  7609. (.style-declaration-section:last-child):
  7610. (.style-declaration-section > .header):
  7611. (.style-declaration-section > .header > .icon):
  7612. (.style-declaration-section > .header > .selector):
  7613. (.style-declaration-section > .header > .selector:focus):
  7614. (.style-declaration-section.selector-locked > .header > .selector):
  7615. (.style-declaration-section.locked > .header::after):
  7616. (.style-declaration-section > .header > .selector > .matched):
  7617. (.style-declaration-section > .header > .origin):
  7618. (.style-declaration-section > .header > .origin > .go-to-link):
  7619. * UserInterface/CSSStyleDeclarationSection.js: Added.
  7620. (WebInspector.CSSStyleDeclarationSection):
  7621. (WebInspector.CSSStyleDeclarationSection.prototype.get element):
  7622. (WebInspector.CSSStyleDeclarationSection.prototype.get style):
  7623. (WebInspector.CSSStyleDeclarationSection.prototype.get lastInGroup):
  7624. (WebInspector.CSSStyleDeclarationSection.prototype.set lastInGroup):
  7625. (WebInspector.CSSStyleDeclarationSection.prototype.get focused):
  7626. (WebInspector.CSSStyleDeclarationSection.prototype.focus):
  7627. (WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
  7628. (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
  7629. (WebInspector.CSSStyleDeclarationSection.prototype.updateLayout):
  7630. (WebInspector.CSSStyleDeclarationSection.prototype._commitSelector):
  7631. * UserInterface/Images/StyleRuleAuthor.pdf: Added.
  7632. * UserInterface/Images/StyleRuleInherited.pdf: Added.
  7633. * UserInterface/Images/StyleRuleInheritedElement.pdf: Added.
  7634. * UserInterface/Images/StyleRuleInspector.pdf: Added.
  7635. * UserInterface/Images/StyleRuleUser.pdf: Added.
  7636. * UserInterface/Images/StyleRuleUserAgent.pdf: Added.
  7637. * UserInterface/Main.html: Included new files.
  7638. * UserInterface/RulesStyleDetailsPanel.css: Added.
  7639. (.sidebar > .panel.details.css-style .rules .inherited-label):
  7640. (.sidebar > .panel.details.css-style .rules .inherited-label + .style-declaration-section):
  7641. * UserInterface/RulesStyleDetailsPanel.js:
  7642. (WebInspector.RulesStyleDetailsPanel):
  7643. (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
  7644. (WebInspector.RulesStyleDetailsPanel.prototype.refresh):
  7645. (WebInspector.RulesStyleDetailsPanel.prototype.shown):
  7646. (WebInspector.RulesStyleDetailsPanel.prototype.hidden):
  7647. (WebInspector.RulesStyleDetailsPanel.prototype.widthDidChange):
  7648. * UserInterface/StyleRuleIcons.css: Added.
  7649. (.author-style-rule-icon .icon):
  7650. (.user-style-rule-icon .icon):
  7651. (.user-agent-style-rule-icon .icon):
  7652. (.inspector-style-rule-icon .icon):
  7653. (.inherited-style-rule-icon .icon):
  7654. (.inherited-element-style-rule-icon .icon):
  7655. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7656. Implement the Computed details style panel.
  7657. Reviewed by Joseph Pecoraro.
  7658. * Localizations/en.lproj/localizedStrings.js: Updated.
  7659. * UserInterface/ComputedStyleDetailsPanel.js:
  7660. (WebInspector.ComputedStyleDetailsPanel):
  7661. (WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
  7662. (WebInspector.ComputedStyleDetailsPanel.prototype.shown):
  7663. (WebInspector.ComputedStyleDetailsPanel.prototype.widthDidChange):
  7664. (WebInspector.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
  7665. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7666. Add CSSStyleDeclarationTextEditor.
  7667. This class implements a rich text editor for style text. It will reflect the assigned CSSStyleDeclaration.
  7668. Edits will be applied to the page and property parse errors or overridden status will be highlighted.
  7669. Reviewed by Joseph Pecoraro.
  7670. * UserInterface/CSSStyleDeclarationTextEditor.css: Added.
  7671. (.css-style-text-editor):
  7672. (.css-style-text-editor > .CodeMirror):
  7673. (.css-style-text-editor > .CodeMirror *):
  7674. (.css-style-text-editor > .CodeMirror-scroll):
  7675. (.css-style-text-editor > .CodeMirror .CodeMirror-lines):
  7676. (.css-style-text-editor > .CodeMirror pre):
  7677. (.css-style-text-editor > .CodeMirror .CodeMirror-selected):
  7678. (.css-style-text-editor > .CodeMirror .CodeMirror-focused .CodeMirror-selected):
  7679. (.css-style-text-editor > .CodeMirror .CodeMirror-cursor):
  7680. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden):
  7681. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.invalid):
  7682. (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited):
  7683. * UserInterface/CSSStyleDeclarationTextEditor.js: Added.
  7684. (WebInspector.CSSStyleDeclarationTextEditor):
  7685. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get element):
  7686. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get delegate):
  7687. (WebInspector.CSSStyleDeclarationTextEditor.prototype.set delegate):
  7688. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get style):
  7689. (WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
  7690. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get focused):
  7691. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get alwaysShowPropertyNames):
  7692. (WebInspector.CSSStyleDeclarationTextEditor.prototype.set alwaysShowPropertyNames):
  7693. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get showsImplicitProperties):
  7694. (WebInspector.CSSStyleDeclarationTextEditor.prototype.set showsImplicitProperties):
  7695. (WebInspector.CSSStyleDeclarationTextEditor.prototype.get sortProperties):
  7696. (WebInspector.CSSStyleDeclarationTextEditor.prototype.set sortProperties):
  7697. (WebInspector.CSSStyleDeclarationTextEditor.prototype.focus):
  7698. (WebInspector.CSSStyleDeclarationTextEditor.prototype.refresh):
  7699. (WebInspector.CSSStyleDeclarationTextEditor.prototype.updateLayout):
  7700. (WebInspector.CSSStyleDeclarationTextEditor.prototype.shown):
  7701. (WebInspector.CSSStyleDeclarationTextEditor.prototype.hidden):
  7702. (WebInspector.CSSStyleDeclarationTextEditor.prototype._formatedContent):
  7703. (WebInspector.CSSStyleDeclarationTextEditor.prototype._commitChanges):
  7704. (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
  7705. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
  7706. (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkerForPropertyIfNeeded):
  7707. (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
  7708. (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers):
  7709. (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties.sortProperty):
  7710. (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
  7711. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyOverriddenStatusChanged):
  7712. (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
  7713. (WebInspector.CSSStyleDeclarationTextEditor.prototype._styleOffsetToCodeMirrorPosition):
  7714. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update.else.lineCount):
  7715. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
  7716. (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
  7717. * UserInterface/CodeMirrorAdditions.js:
  7718. * UserInterface/Main.html:
  7719. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7720. Implement the Metrics details style panel.
  7721. Converts BoxModelDetailsSectionRow to use the new CSS model. Removes code needed to
  7722. work with the old CSS model.
  7723. Reviewed by Joseph Pecoraro.
  7724. * Localizations/en.lproj/localizedStrings.js: Updated.
  7725. * UserInterface/BoxModelDetailsSectionRow.js:
  7726. (WebInspector.BoxModelDetailsSectionRow):
  7727. (WebInspector.BoxModelDetailsSectionRow.prototype.get nodeStyles):
  7728. (WebInspector.BoxModelDetailsSectionRow.prototype.set nodeStyles):
  7729. (WebInspector.BoxModelDetailsSectionRow.prototype._refresh):
  7730. (WebInspector.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
  7731. (WebInspector.BoxModelDetailsSectionRow.prototype._highlightDOMNode):
  7732. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
  7733. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement):
  7734. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement):
  7735. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
  7736. (WebInspector.BoxModelDetailsSectionRow.prototype._startEditing):
  7737. (WebInspector.BoxModelDetailsSectionRow.prototype._alteredFloatNumber): Added. Copied from the now
  7738. removed CSSPropertyPrompt class.
  7739. (WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown):
  7740. (WebInspector.BoxModelDetailsSectionRow.prototype._editingCancelled):
  7741. (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput):
  7742. * UserInterface/MetricsStyleDetailsPanel.js:
  7743. (WebInspector.MetricsStyleDetailsPanel):
  7744. (WebInspector.MetricsStyleDetailsPanel.prototype.refresh):
  7745. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7746. Remember the scroll position when refreshing the style detail panels.
  7747. Reviewed by Joseph Pecoraro.
  7748. * UserInterface/StyleDetailsPanel.js:
  7749. (WebInspector.StyleDetailsPanel.prototype.refreshIfNeeded): Call _refreshPreservingScrollPosition
  7750. instead refresh.
  7751. (WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition): Added. Only remember the
  7752. scroll position if the previous node is the same as this one.
  7753. (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed): Call _refreshPreservingScrollPosition
  7754. instead refresh.
  7755. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7756. Tell SidebarPanel and StyleDetailsPanel when the width of the Sidebar changes.
  7757. This will be needed to update CodeMirror on the size change.
  7758. Reviewed by Joseph Pecoraro.
  7759. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  7760. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange): Added. Tell the selected
  7761. panel to refresh if needed.
  7762. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Added. Tell the selected panel
  7763. that the width changed.
  7764. * UserInterface/Sidebar.js:
  7765. (WebInspector.Sidebar.prototype.set width): Call widthDidChange on the sidebar panel.
  7766. (WebInspector.Sidebar.prototype.set collapsed): Ditto.
  7767. * UserInterface/SidebarPanel.js:
  7768. (WebInspector.SidebarPanel.prototype.widthDidChange): Added stub.
  7769. * UserInterface/StyleDetailsPanel.js:
  7770. (WebInspector.StyleDetailsPanel.prototype.widthDidChange): Added stub.
  7771. 2013-02-21 Timothy Hatcher <timothy@apple.com>
  7772. Add start implementation for each of the three Style detail panels.
  7773. <rdar://problem/7206272&12526319>
  7774. Reviewed by Joseph Pecoraro.
  7775. * Localizations/en.lproj/localizedStrings.js: Updated.
  7776. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  7777. (.sidebar > .panel.details.css-style):
  7778. (.sidebar > .panel.details.css-style > .navigation-bar):
  7779. (.sidebar > .panel.details.css-style > .content):
  7780. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  7781. (WebInspector.CSSStyleDetailsSidebarPanel):
  7782. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
  7783. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
  7784. * UserInterface/ComputedStyleDetailsPanel.js: Added.
  7785. (WebInspector.ComputedStyleDetailsPanel):
  7786. * UserInterface/DOMNodeStyles.js:
  7787. (WebInspector.DOMNodeStyles.prototype.get needsRefresh): Added.
  7788. * UserInterface/Main.html:
  7789. * UserInterface/Main.js:
  7790. (WebInspector._updateStickyPostionStyles):
  7791. * UserInterface/MetricsStyleDetailsPanel.js: Added.
  7792. (WebInspector.MetricsStyleDetailsPanel):
  7793. * UserInterface/RulesStyleDetailsPanel.js: Added.
  7794. (WebInspector.RulesStyleDetailsPanel):
  7795. * UserInterface/StyleDetailsPanel.js: Added.
  7796. (WebInspector.StyleDetailsPanel):
  7797. (WebInspector.StyleDetailsPanel.prototype.get element):
  7798. (WebInspector.StyleDetailsPanel.prototype.get navigationItem):
  7799. (WebInspector.StyleDetailsPanel.prototype.get nodeStyles):
  7800. (WebInspector.StyleDetailsPanel.prototype.shown):
  7801. (WebInspector.StyleDetailsPanel.prototype.hidden):
  7802. (WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh):
  7803. (WebInspector.StyleDetailsPanel.prototype.refreshIfNeeded):
  7804. (WebInspector.StyleDetailsPanel.prototype.refresh):
  7805. (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed):
  7806. (WebInspector.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
  7807. 2013-02-21 Timothy Hatcher <timothy@apple.com>
  7808. Add start of new implementation of CSSStyleDetailsSidebarPanel.
  7809. <rdar://problem/7206272&12526319>
  7810. Reviewed by Joseph Pecoraro.
  7811. * UserInterface/CSSStyleDetailsSidebarPanel.css: Added.
  7812. (.sidebar > .panel.details.css-style): Added. Empty for now.
  7813. * UserInterface/CSSStyleDetailsSidebarPanel.js: Added.
  7814. (WebInspector.CSSStyleDetailsSidebarPanel):
  7815. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.supportsDOMNode):
  7816. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
  7817. * UserInterface/Images/NavigationItemBrushAndRuler.pdf: Added.
  7818. 2013-02-21 Timothy Hatcher <timothy@apple.com>
  7819. Remove CSSStyleDetailsSidebarPanel and friends in preparation for a new implementation.
  7820. <rdar://problem/7206272&12526319>
  7821. Rubber-stamped by Joseph Pecoraro.
  7822. * UserInterface/CSSPropertyPrompt.js: Removed.
  7823. * UserInterface/CSSStyleDetailsSidebarPanel.css: Removed.
  7824. * UserInterface/CSSStyleDetailsSidebarPanel.js: Removed.
  7825. * UserInterface/ComputedStylePropertiesSection.js: Removed.
  7826. * UserInterface/Main.html: Removed files except CSSStyleDetailsSidebarPanel.{js,css}.
  7827. * UserInterface/OldCSSMedia.js: Removed.
  7828. * UserInterface/OldCSSProperty.js: Removed.
  7829. * UserInterface/OldCSSRule.js: Removed.
  7830. * UserInterface/OldCSSStyleDeclaration.js: Removed.
  7831. * UserInterface/StylePropertiesSection.js: Removed.
  7832. * UserInterface/StylePropertyTreeElement.js: Removed.
  7833. 2013-02-21 Timothy Hatcher <timothy@apple.com>
  7834. Remove AppearanceDetailsSidebarPanel in preparation for it being merged with Style details.
  7835. <rdar://problem/7206272&12526319>
  7836. Reviewed by Joseph Pecoraro.
  7837. * UserInterface/AppearanceDetailsSidebarPanel.js: Removed.
  7838. * UserInterface/Main.html: Removed AppearanceDetailsSidebarPanel.js.
  7839. * UserInterface/Main.js:
  7840. (WebInspector.contentLoaded): Removed AppearanceDetailsSidebarPanel.
  7841. 2013-02-21 Timothy Hatcher <timothy@apple.com>
  7842. Add support for text only navigation buttons.
  7843. This will be used by the navigation bar in the new Styles sidebar.
  7844. Reviewed by Joseph Pecoraro.
  7845. * UserInterface/ButtonNavigationItem.css:
  7846. (.navigation-bar .item.button.text-only): Added.
  7847. (.navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
  7848. Use -webkit-calc in the background-position to work with variable widths.
  7849. * UserInterface/ButtonNavigationItem.js:
  7850. (WebInspector.ButtonNavigationItem):
  7851. (WebInspector.ButtonNavigationItem.prototype.get label):
  7852. (WebInspector.ButtonNavigationItem.prototype.set label):
  7853. (WebInspector.ButtonNavigationItem.prototype.set image):
  7854. * UserInterface/RadioButtonNavigationItem.css:
  7855. (.navigation-bar .item.radio.button:not(.text-only)): Added :not(.text-only) to allow
  7856. variable based on text length.
  7857. (.navigation-bar.collapsed .item.radio.button:not(.text-only)): Ditto.
  7858. (.navigation-bar .item.radio.button.selected): Use -webkit-calc in the background-position
  7859. to work with variable widths.
  7860. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7861. Don't try to commit changes before we have new text positions.
  7862. We need to keep the startStyleSheetTextPosition and endStyleSheetTextPosition up-to-date.
  7863. If we don't have the correct positions then we can corrupt the stylesheet the next time
  7864. the user makes an edit.
  7865. Reviewed by Joseph Pecoraro.
  7866. * UserInterface/DOMNodeStyles.js:
  7867. (WebInspector.DOMNodeStyles): Initialize _stylesNeedingTextCommited to [].
  7868. (WebInspector.DOMNodeStyles.prototype.refresh): Call changeStyleText for the next style
  7869. object that needs changed.
  7870. (WebInspector.DOMNodeStyles.prototype.changeRuleSelector): Set _needsRefresh to true.
  7871. (WebInspector.DOMNodeStyles.prototype.changeStyleText): If we need a refresh then it is not safe
  7872. to make the edits now. Store the text and remember the style so we can commit it after the next refresh.
  7873. (WebInspector.DOMNodeStyles.prototype.changePropertyText): Set _needsRefresh to true.
  7874. (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Call refresh to get updated positions and
  7875. computed style info.
  7876. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7877. Always try to update the resource when a stylesheet changes.
  7878. Reviewed by Joseph Pecoraro.
  7879. * UserInterface/CSSStyleManager.js:
  7880. (WebInspector.CSSStyleManager.prototype.styleSheetChanged): Always call _updateResourceContent. This
  7881. was preventing resource updates when the stylesheet changed because of a sidebar text edit. Checking the result
  7882. of noteContentDidChange was to prevent updating the resource content if the change originated from a resource edit.
  7883. However, we will soon allow text edits from the sidebar and the check was preventing resources from being updated.
  7884. The new check in the content setter of SourceCodeRevision prevents updating resources when they haven't changed.
  7885. * UserInterface/SourceCodeRevision.js:
  7886. (WebInspector.SourceCodeRevision.prototype.set content): Return early if the content is the same.
  7887. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7888. Fix typo that was preventing refresh of DOMNodeStyles.
  7889. Reviewed by Joseph Pecoraro.
  7890. * UserInterface/DOMNodeStyles.js:
  7891. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): The property is ownerStyleSheet, not parentStyleSheet.
  7892. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7893. Workaround a bug where matched rules is empty for stylesheets with imported stylesheets.
  7894. If matched rules is empty (rare because of user agent stylesheet rules) then WebCore might
  7895. be waiting for an @import rule to load. Check again after a delay until we get some results or timeout.
  7896. We shouldn't need to poll like this, https://webkit.org/b/110750 tracks this problem.
  7897. Reviewed by Joseph Pecoraro.
  7898. * UserInterface/DOMNodeStyles.js:
  7899. (WebInspector.DOMNodeStyles.prototype.refresh): Removed map clearing and call to CSSAgent.getInlineStylesForNode
  7900. and CSSAgent.getComputedStyleForNode. We only want to fetch those if fetchedMatchedStyles succeeds.
  7901. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Schedule another refresh attempt and
  7902. return early if the match is empty. Moved the map clearing here after the early return. Call CSSAgent.getInlineStylesForNode.
  7903. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Call CSSAgent.getComputedStyleForNode.
  7904. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7905. Don't reuse a pending property if it is already used.
  7906. This was happening when parsing an edit that had multiple properties with the same name.
  7907. The last property to be parsed was picking the same pending property and preventing
  7908. all properties from being represented with the right value, etc.
  7909. Reviewed by Joseph Pecoraro.
  7910. * UserInterface/DOMNodeStyles.js:
  7911. (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Only pick a pending property
  7912. if the index is NaN.
  7913. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7914. Prevent firing change events in more places when nothing has changed.
  7915. Reviewed by Joseph Pecoraro.
  7916. * UserInterface/CSSStyleDeclaration.js:
  7917. (WebInspector.CSSStyleDeclaration.prototype.update.delayed): Don't fire the event if there is text and it hasn't changed.
  7918. * UserInterface/DOMNodeStyles.js:
  7919. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Only fire Refreshed if !dontFireRefreshedEvent.
  7920. (WebInspector.DOMNodeStyles.prototype.changeStyleText.attributeChanged): Pass true to refresh().
  7921. (WebInspector.DOMNodeStyles.prototype.changeStyleText.contentDidChange): Added. Call refresh().
  7922. (WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Listen for content change.
  7923. (WebInspector.DOMNodeStyles.prototype._attributesDidChange): Ignore if _ignoreNextStyleAttributeDidChangeEvent
  7924. is set and the attribute is "style".
  7925. 2013-02-22 Timothy Hatcher <timothy@apple.com>
  7926. Minimize the number of times the OverriddenStatusChanged is fired for properties.
  7927. When updating styles, DOMNodeStyles will sometimes temporarily change overridden
  7928. to false only to later change it back to true when it finds the effective property
  7929. in a later style in the cascade. To minimize churn we coalesce these changes and
  7930. only fire the event if the value is different after a delay.
  7931. Reviewed by Joseph Pecoraro.
  7932. * UserInterface/CSSProperty.js:
  7933. (WebInspector.CSSProperty.prototype.update): Use the setter for overridden
  7934. if we want to fire events.
  7935. (WebInspector.CSSProperty.prototype.set overridden.delayed): Added.
  7936. (WebInspector.CSSProperty.prototype.set overridden): Coalesce changes and
  7937. only fire the event if the end result differs.
  7938. 2013-02-22 Timothy Hatcher <timothy@apple.com>
  7939. Delay firing the PropertiesChanged event so DOMNodeStyles has a chance
  7940. to mark overridden and associated properties.
  7941. Reviewed by Joseph Pecoraro.
  7942. * UserInterface/CSSStyleDeclaration.js:
  7943. (WebInspector.CSSStyleDeclaration.prototype.update.delayed): Added. Fire the event here.
  7944. (WebInspector.CSSStyleDeclaration.prototype.update): Set a timeout and call delayed.
  7945. 2013-02-22 Timothy Hatcher <timothy@apple.com>
  7946. Consider the properties as enabled for computed style declarations.
  7947. Reviewed by Joseph Pecoraro.
  7948. * UserInterface/CSSProperty.js:
  7949. (WebInspector.CSSProperty.prototype.get enabled): Check for CSSStyleDeclaration.Type.Computed.
  7950. 2013-02-22 Timothy Hatcher <timothy@apple.com>
  7951. Add support for checking if a property has another vendor prefix.
  7952. This will be used to style those properties differently instead of marking
  7953. them as completely invalid. Also fix a regex error in canonicalNameForPropertyName.
  7954. Reviewed by Joseph Pecoraro.
  7955. * UserInterface/CSSProperty.js:
  7956. (WebInspector.CSSProperty.prototype.update): Delete _hasOtherVendorPrefix.
  7957. (WebInspector.CSSProperty.prototype.hasOtherVendorPrefix): Added.
  7958. * UserInterface/CSSStyleManager.js:
  7959. (WebInspector.CSSStyleManager.prototype.propertyNameHasOtherVendorPrefix): Added.
  7960. (WebInspector.CSSStyleManager.prototype.canonicalNameForPropertyName): Fix the regex
  7961. to check the beginning of the string.
  7962. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  7963. Add effectivePropertyForName to DOMNodeStyles.
  7964. Also mark the longhand properties as effective if the shorthand property is the effective property.
  7965. Reviewed by Joseph Pecoraro.
  7966. * UserInterface/DOMNodeStyles.js:
  7967. (WebInspector.DOMNodeStyles.prototype.effectivePropertyForName): Added.
  7968. (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Pass _propertyNameToEffectivePropertyMap
  7969. to _associateRelatedProperties.
  7970. (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties): Set propertyNameToEffectiveProperty
  7971. for the longhand if the related shorthand is effective.
  7972. 2013-02-21 Timothy Hatcher <timothy@apple.com>
  7973. Don't try to add or remove a CSSProperty if the index is wrong.
  7974. Reviewed by Joseph Pecoraro.
  7975. * UserInterface/CSSProperty.js:
  7976. (WebInspector.CSSProperty.prototype.add): Return early if index is not NaN.
  7977. (WebInspector.CSSProperty.prototype.remove): Return early if index is NaN.
  7978. 2013-02-22 Timothy Hatcher <timothy@apple.com>
  7979. Mark DOMNodesStyles as needing refresh if attributes change on the node.
  7980. Also fix a leak with the CSSStyleSheet.Event.ContentDidChange listener.
  7981. Reviewed by Joseph Pecoraro.
  7982. * UserInterface/DOMNode.js:
  7983. (WebInspector.DOMNode.Event.AttributeModified): Added.
  7984. (WebInspector.DOMNode.Event.AttributeRemoved): Added.
  7985. * UserInterface/DOMNodeStyles.js:
  7986. (WebInspector.DOMNodeStyles): Listen for AttributeModified and AttributeRemoved events.
  7987. Stop listening for CSSStyleSheet.Event.ContentDidChange globally to avoid a leak.
  7988. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Listen for
  7989. CSSStyleSheet.Event.ContentDidChange on the stylesheet object here.
  7990. (WebInspector.DOMNodeStyles.prototype._parseRulePayload): Ditto.
  7991. (WebInspector.DOMNodeStyles.prototype._attributesDidChange): Added. Mark as needing
  7992. refresh and fire the NeedsRefresh event.
  7993. * UserInterface/DOMTreeManager.js:
  7994. (WebInspector.DOMTreeManager.prototype._attributeModified): Fire the event on DOMNode too.
  7995. (WebInspector.DOMTreeManager.prototype._attributeRemoved): Ditto.
  7996. 2013-02-22 Timothy Hatcher <timothy@apple.com>
  7997. Fix some event listener leaks related to the DOM content view.
  7998. Reviewed by Joseph Pecoraro.
  7999. * UserInterface/DOMTreeContentView.js:
  8000. (WebInspector.DOMTreeContentView.prototype.closed): Call close on the DOMTreeOutline.
  8001. Use the new version of removeEventListener by passing null for type and listener.
  8002. * UserInterface/DOMTreeOutline.js:
  8003. (WebInspector.DOMTreeOutline.prototype.close): Added. Call close on the DOMTreeUpdater.
  8004. * UserInterface/DOMTreeUpdater.js:
  8005. (WebInspector.DOMTreeUpdater.prototype.close): Added. Call removeEventListener.
  8006. * UserInterface/Object.js:
  8007. (WebInspector.Object.addEventListener): Prevent registering multiple times.
  8008. (WebInspector.Object.removeEventListener): Handle a null eventType by looping over all
  8009. the registered types. Delete _listeners if the map is empty.
  8010. 2013-02-20 Timothy Hatcher <timothy@apple.com>
  8011. Avoid a crash when changing the text of an inline style.
  8012. Reviewed by Joseph Pecoraro.
  8013. * UserInterface/DOMNodeStyles.js:
  8014. (WebInspector.DOMNodeStyles.prototype.attributeChanged): Set the style attribute
  8015. on the node when the style is an inline style.
  8016. 2013-02-20 Timothy Hatcher <timothy@apple.com>
  8017. Return early in the CSSProperty and CSSStyleDeclaration setters if the value does not change.
  8018. Reviewed by Joseph Pecoraro.
  8019. * UserInterface/CSSProperty.js:
  8020. (WebInspector.CSSProperty.prototype.set text): Return early.
  8021. (WebInspector.CSSProperty.prototype.set name): Ditto.
  8022. (WebInspector.CSSProperty.prototype.set value): Ditto.
  8023. (WebInspector.CSSProperty.prototype.set priority): Ditto.
  8024. * UserInterface/CSSStyleDeclaration.js:
  8025. (WebInspector.CSSStyleDeclaration.prototype.set text): Return early.
  8026. 2013-02-20 Timothy Hatcher <timothy@apple.com>
  8027. Properly parse CSSProperty.status and handle when it is missing.
  8028. The Inspector.json documentation was incorrect about this, and has been
  8029. fixed in r143465.
  8030. Reviewed by Joseph Pecoraro.
  8031. * UserInterface/CSSProperty.js:
  8032. (WebInspector.CSSProperty): Added anonymous parameter.
  8033. (WebInspector.CSSProperty.prototype.update): Ditto.
  8034. (WebInspector.CSSProperty.prototype.get anonymous): Added.
  8035. * UserInterface/DOMNodeStyles.js:
  8036. (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Set anonymous
  8037. to true when status is "style". Also default to "style" when status is missing.
  8038. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Skip anonymous
  8039. properties.
  8040. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8041. Correct and simplify overridden property marking.
  8042. Reviewed by Joseph Pecoraro.
  8043. * UserInterface/CSSProperty.js:
  8044. (WebInspector.CSSProperty.prototype.isActive): Removed.
  8045. * UserInterface/DOMNodeStyles.js:
  8046. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Only
  8047. use the propertyNameToEffectiveProperty map to accomplish what we needed
  8048. three maps for before. Only enabled is checked, instead of the old isActive
  8049. function. The isActive function was skipping already overridden properties,
  8050. so repeat calls to _markOverriddenProperties would not work correctly.
  8051. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8052. Store all properties for inherited styles.
  8053. We need all properties so we can allow editing inherited styles while
  8054. not removing the non-inherited properties when the edits are applied.
  8055. Reviewed by Joseph Pecoraro.
  8056. * UserInterface/CSSProperty.js:
  8057. (WebInspector.CSSProperty.prototype.update):
  8058. (WebInspector.CSSProperty.prototype.get inherited):
  8059. * UserInterface/DOMNodeStyles.js:
  8060. (WebInspector.DOMNodeStyles.prototype.refresh):
  8061. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
  8062. (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
  8063. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
  8064. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8065. Properly handle repeat occurrences of the same rule.
  8066. A rule might match multiple times if the selector is generic and matches
  8067. ancestors and has inherited properties.
  8068. Reviewed by Joseph Pecoraro.
  8069. * UserInterface/DOMNodeStyles.js:
  8070. (WebInspector.DOMNodeStyles.prototype.refresh):
  8071. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
  8072. (WebInspector.DOMNodeStyles.prototype._handlePropertyChange):
  8073. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
  8074. (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
  8075. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8076. Add matchedSelectors and matchedSelectorText to CSSRule.
  8077. Reviewed by Joseph Pecoraro.
  8078. * UserInterface/CSSRule.js:
  8079. (WebInspector.CSSRule.prototype.update): Delete _matchedSelectors and _matchedSelectorText.
  8080. (WebInspector.CSSRule.prototype.get matchedSelectors): Added.
  8081. (WebInspector.CSSRule.prototype.get matchedSelectorText): Added.
  8082. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8083. Add editable getter to CSSRule.
  8084. Reviewed by Joseph Pecoraro.
  8085. * UserInterface/CSSRule.js:
  8086. (WebInspector.CSSRule.prototype.get editable): Added.
  8087. (WebInspector.CSSRule.prototype.set selectorText): Return early if not editable
  8088. or if the selectors already match.
  8089. * UserInterface/CSSStyleDeclaration.js:
  8090. (WebInspector.CSSStyleDeclaration.prototype.get editable): Check the rule's editable
  8091. property too.
  8092. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8093. Add orderedStyles to DOMNodeStyles.
  8094. This will allow the UI to easily display the styles in the right order.
  8095. Reviewed by Joseph Pecoraro.
  8096. * UserInterface/DOMNodeStyles.js:
  8097. (WebInspector.DOMNodeStyles): Added _orderedStyles.
  8098. (WebInspector.DOMNodeStyles.prototype.get orderedStyles): Added.
  8099. (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Store orderedStyles
  8100. on the DOMNodeStyles object and the pseudo element objects.
  8101. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8102. Store matched rules in reverse order so the most specific rule is first, not last.
  8103. Reviewed by Joseph Pecoraro.
  8104. * UserInterface/DOMNodeStyles.js:
  8105. (WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
  8106. Iterate in reverse order to match the cascade order.
  8107. (WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged): Fix a typo.
  8108. (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Ditto.
  8109. (WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder):
  8110. Iterate in normal order now that they stored in reverse order.
  8111. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8112. Fix parsing of pseudo styles and inherited inline styles.
  8113. Reviewed by Joseph Pecoraro.
  8114. * UserInterface/DOMNodeStyles.js:
  8115. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Properly
  8116. iterate of the pseudoElementRulesPayload array. Also fix the arguments passed
  8117. to _parseStyleDeclarationPayload. The first argument was 'this', back when
  8118. it was using call().
  8119. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8120. Store the relevant node on CSSStyleDeclaration.
  8121. The node is useful for inherited styles so we can jump to the
  8122. element the styles are inherited from.
  8123. Reviewed by Joseph Pecoraro.
  8124. * UserInterface/CSSStyleDeclaration.js:
  8125. (WebInspector.CSSStyleDeclaration):
  8126. (WebInspector.CSSStyleDeclaration.prototype.get node): Added.
  8127. * UserInterface/DOMNodeStyles.js:
  8128. (WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
  8129. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
  8130. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
  8131. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
  8132. (WebInspector.DOMNodeStyles.prototype.refresh):
  8133. (WebInspector.DOMNodeStyles.prototype._handlePropertyChange):
  8134. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
  8135. (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
  8136. 2013-02-25 Timothy Hatcher <timothy@apple.com>
  8137. Make copy work if there is a CodeMirror editor focused in the sidebar.
  8138. The content view was stealing the copy event and preventing the editor from putting
  8139. anything on the pasteboard. We were also having a focus issue where the console or
  8140. other editor was staying focused after clicking the DOM tree.
  8141. Reviewed by Joseph Pecoraro.
  8142. * UserInterface/EditingSupport.js:
  8143. (WebInspector.isEventTargetAnEditableField): Correct the check to include CodeMirror
  8144. and also only count text input types.
  8145. * UserInterface/Main.js:
  8146. (WebInspector.contentLoaded): Added focus event listener.
  8147. (WebInspector._focusChanged): Added. Make a caret selection inside the focused element.
  8148. This is needed (at least) to remove caret from console when focus is moved.
  8149. (WebInspector._copy): Only pass along the copy event if the target isn't an editable field.
  8150. 2013-02-19 Timothy Hatcher <timothy@apple.com>
  8151. Don't allow text selection in data grid rows.
  8152. The row selection conflicts with the text range selection.
  8153. Reviewed by Joseph Pecoraro.
  8154. * UserInterface/DataGrid.css:
  8155. (.data-grid td): Removed -webkit-user-select: text.
  8156. 2013-02-26 Antoine Quint <graouts@apple.com>
  8157. <rdar://problem/13265166> Remote inspecting an iOS 6.1 device never has the dashboard timer stop
  8158. Previous to iOS7, we don't get a frameId reported for timeline events. We fallback to using the
  8159. page's loadEventFired event and message the timelineManager to use the reported timestamp
  8160. as the _loadEventTime in case it hadn't already been set.
  8161. Reviewed by Timothy Hatcher.
  8162. * UserInterface/PageObserver.js:
  8163. (WebInspector.PageObserver.prototype.loadEventFired):
  8164. * UserInterface/TimelineManager.js:
  8165. (WebInspector.TimelineManager.prototype.pageDidLoad):
  8166. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8167. <rdar://problem/11978845> Pressing delete on a file should delete all breakpoints
  8168. Allow TreeOutlines to handle keyboard events on TreeElements if the
  8169. TreeElement hasn't already handled the event. This will allow the
  8170. breakpoint outline to handle delete keys pressed on resources.
  8171. Likewise, allow TreeOutlines to handle context menus on TreeElements
  8172. that don't specifically have a context menu handler. This will allow
  8173. the breakpoint outline to show a context menu for resources.
  8174. Reviewed by Timothy Hatcher.
  8175. * Localizations/en.lproj/localizedStrings.js:
  8176. * UserInterface/DebuggerSidebarPanel.js:
  8177. (WebInspector.DebuggerSidebarPanel):
  8178. (WebInspector.DebuggerSidebarPanel.prototype._breakpointsBeneathTreeElement):
  8179. (WebInspector.DebuggerSidebarPanel.prototype._removeAllBreakpoints):
  8180. (WebInspector.DebuggerSidebarPanel.prototype._toggleAllBreakpoints):
  8181. (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
  8182. (WebInspector.DebuggerSidebarPanel.prototype.removeAllResourceBreakpoints):
  8183. (WebInspector.DebuggerSidebarPanel.prototype.toggleAllResourceBreakpoints):
  8184. (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
  8185. Setup ondelete and oncontextmenu handlers on the breakpoint tree outline.
  8186. The delete action deletes all breakpoints in that resource. The content
  8187. menu action provides a choice to delete or toggle all breakpoints.
  8188. * UserInterface/Breakpoint.js:
  8189. (WebInspector.Breakpoint.prototype.appendContextMenuItems):
  8190. Reorder and rename the context menus to more closely match Xcode.
  8191. * UserInterface/TreeOutline.js:
  8192. (TreeOutline.prototype._treeKeyDown):
  8193. Send common key events up to the tree outline if it implements them.
  8194. * UserInterface/GeneralTreeElement.js:
  8195. (WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler):
  8196. (WebInspector.GeneralTreeElement.prototype.onattach):
  8197. Bind a TreeOutline context menu to the individual GeneralTreeElements if the
  8198. specific GeneralTreeElement does not have a context menu handler.
  8199. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8200. <rdar://problem/13299163> Give Breakpoint Tree Elements Context Menus to Delete and Toggle
  8201. Reviewed by Timothy Hatcher.
  8202. * Localizations/en.lproj/localizedStrings.js:
  8203. * UserInterface/Breakpoint.js:
  8204. (WebInspector.Breakpoint.prototype.appendContextMenuItems):
  8205. (WebInspector.Breakpoint.prototype.appendContextMenuItems.removeBreakpoint):
  8206. (WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleBreakpoint):
  8207. Offer context menu items to remove and toggle the breakpoint, if possible.
  8208. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8209. Update remaining SourceCodeLocation constructors.
  8210. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8211. Reviewed by Timothy Hatcher.
  8212. * UserInterface/DOMNodeStyles.js:
  8213. (WebInspector.DOMNodeStyles.prototype._createSourceCodeLocation):
  8214. * UserInterface/TimelineManager.js:
  8215. (WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame):
  8216. (WebInspector.TimelineManager.prototype._callFramesFromPayload):
  8217. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8218. Update CallFrame displays for SourceMap display locations.
  8219. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8220. Use the display (mapped) location when available. Multiple editors
  8221. may show the execution line, the original and mapped editors.
  8222. Reviewed by Timothy Hatcher.
  8223. * UserInterface/CallFrameTreeElement.js:
  8224. (WebInspector.CallFrameTreeElement):
  8225. * UserInterface/DebuggerManager.js:
  8226. (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
  8227. * UserInterface/DebuggerSidebarPanel.js:
  8228. (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
  8229. * UserInterface/SourceCodeTextEditor.js:
  8230. (WebInspector.SourceCodeTextEditor.prototype):
  8231. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8232. Add isEmptyObject instead of doing Object.keys(foo).length
  8233. In benchmarks of empty, small, and large objects isEmptyObject
  8234. performed better then checking the length of Object.keys. Especially
  8235. for large objects.
  8236. Reviewed by Timothy Hatcher.
  8237. * UserInterface/DOMNodeStyles.js:
  8238. (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties):
  8239. * UserInterface/LayerTreeSidebarPanel.js:
  8240. (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
  8241. * UserInterface/RemoteObject.js:
  8242. (WebInspector.LocalJSONObject.prototype.get hasChildren):
  8243. * UserInterface/ResourceDetailsSidebarPanel.js:
  8244. * UserInterface/SourceCodeTextEditor.js:
  8245. (WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo):
  8246. * UserInterface/TextEditor.js:
  8247. (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
  8248. (WebInspector.TextEditor.prototype):
  8249. * UserInterface/Utilities.js:
  8250. (isEmptyObject):
  8251. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8252. Get Breakpoints Working with SourceMaps - Line + Column Breakpoint Support.
  8253. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8254. Previously breakpoints could only appear in a single SourceCodeTextEditor, and
  8255. only one could be placed on a line. After this patch:
  8256. - Breakpoints may show up in multiple editors at the original and mapped locations.
  8257. - Breakpoints effective locations may be on columns. If you set a breakpoint on
  8258. a line in a mapped resource, it may map back to a non-0 column in the original.
  8259. - Multiple breakpoints may be set on a line. If you set a breakpoint on a few
  8260. lines in a mapped resource, they may all map back to the same line in the original
  8261. but just have different column offsets.
  8262. Breakpoints are still set and saved with their original SourceMapLocation locations.
  8263. Reviewed by Timothy Hatcher.
  8264. * UserInterface/DebuggerManager.js:
  8265. (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
  8266. (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
  8267. When looking up breakpoints for a source code, associate them with the source code
  8268. at the same time by setting the Breakpoint's SourceCodeLocation's sourceCode. The
  8269. breakpoints for a SourceMapResource are only those in the originator that have
  8270. a display location inside the mapped resource.
  8271. (WebInspector.DebuggerManager.prototype.reset):
  8272. Disassociate breakpoints on reset, by clearing the SourceCodeLocation's sourceCode.
  8273. (WebInspector.DebuggerManager.prototype._breakpointSourceCodeLocationDidChange):
  8274. Dispatch a new BreakpointMoved event. There were already existing events for
  8275. BreakpointAdded and Removed but not Moved. We add this for convenience, there
  8276. are currently no users though, they all watch the breakpoints source code location.
  8277. * UserInterface/TextEditor.js:
  8278. (WebInspector.TextEditor.prototype.setBreakpointInfoForLineAndColumn):
  8279. (WebInspector.TextEditor.prototype._addBreakpointToLineAndColumnWithInfo):
  8280. (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
  8281. Update setBreakpointInfo to include line + column numbers.
  8282. (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine.updateStyles):
  8283. (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine):
  8284. Updating breakpoint style now handles multi-breakpoints. For multi-breakpoints
  8285. we only style it as disabled if all breakpoints on that line are disabled.
  8286. Likewise for resolved.
  8287. (WebInspector.TextEditor.prototype._allColumnBreakpointInfoForLine):
  8288. (WebInspector.TextEditor.prototype._setColumnBreakpointInfoForLine):
  8289. Now that a line may have multiple column breakpoints, this is a bulk
  8290. getter and setter used during breakpoint dragging to set the breakpoint
  8291. infos on a line.
  8292. (WebInspector.TextEditor.prototype._gutterMouseDown):
  8293. (WebInspector.TextEditor.prototype._documentMouseMoved):
  8294. (WebInspector.TextEditor.prototype._documentMouseUp):
  8295. Do nothing if clicking on a multi-breakpoint. Otherwise, when dragging
  8296. remember the original breakpoints line and column information. While the
  8297. drag is happening, we are already updating our internal line + column
  8298. information, so in mouse up when notifying delegates we can ignore their
  8299. setBreakpointInfo calls.
  8300. * UserInterface/TextEditor.css:
  8301. (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber):
  8302. (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
  8303. Styles for a line with multiple breakpoints. We show a centered white
  8304. ellipsis and hide the line number.
  8305. * UserInterface/SourceCodeTextEditor.js:
  8306. (WebInspector.SourceCodeTextEditor):
  8307. (WebInspector.SourceCodeTextEditor.prototype.close):
  8308. Now that breakpoints can be added in one editor and affect a different editor
  8309. we must listen for breakpoint added and move (via it's source code location).
  8310. Register for the events in the constructor and clear in close.
  8311. (WebInspector.SourceCodeTextEditor.prototype._editorLineInfoForSourceCodeLocation):
  8312. SourceCodeTextEditors for original resources show their content with original line
  8313. numbers. For mapped resources show their content with display line numbers. So
  8314. whenever we have a sourceCodeLocation, we use this to convert it to the "editor"
  8315. line info, which is just the line + column number for this editor + TextEditor.
  8316. (WebInspector.SourceCodeTextEditor.prototype._breakpointForEditorLineInfo):
  8317. (WebInspector.SourceCodeTextEditor.prototype._addBreakpointWithEditorLineInfo):
  8318. (WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo):
  8319. Update addBreakpoint and removeBreakpoint for line + column, instead of just line.
  8320. (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
  8321. (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus):
  8322. (WebInspector.SourceCodeTextEditor.prototype._breakpointAdded):
  8323. (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved):
  8324. When breakpoints are added, removed update our map, and pass that information
  8325. on to the underlying TextEditor.
  8326. (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
  8327. When a breakpoint moves, we need to lookup the breakpoint from its old location.
  8328. The old location is different depending on if we are the editor for the original
  8329. or mapped resource. So work out the correct old location, and pass that
  8330. information and the underlying TextEditor.
  8331. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
  8332. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
  8333. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
  8334. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
  8335. When the TextEditor modifies a breakpoint, we must update our maps for that
  8336. breakpoint. When we tell the DebuggerManager about the updates, we will
  8337. expect some events to fire to update other editors that might be interested
  8338. in that breakpoint. We can ignore those events ourselves, because we
  8339. just made the change.
  8340. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8341. Sort Breakpoints in the Debugger Sidebar
  8342. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8343. Reviewed by Timothy Hatcher.
  8344. * UserInterface/DebuggerSidebarPanel.js:
  8345. (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
  8346. (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
  8347. (WebInspector.DebuggerSidebarPanel.prototype._compareBreakpointTreeElements):
  8348. Sort BreakpointsTreeElements (children of Resources) by Line #.
  8349. Sort top level tree elements by title, always placing the special breakpoints at the top.
  8350. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8351. Give BreakpointTreeElements a ContextMenu to Reveal Original Resource.
  8352. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8353. Reviewed by Timothy Hatcher.
  8354. * UserInterface/Breakpoint.js:
  8355. (WebInspector.Breakpoint.prototype.appendContextMenuItems):
  8356. Given a context menu, add a show original resource menu item.
  8357. * UserInterface/TreeOutline.js:
  8358. (TreeElement.prototype._detach):
  8359. Add an ondetach event to balance onattach.
  8360. * UserInterface/GeneralTreeElement.js:
  8361. (WebInspector.GeneralTreeElement.prototype.onattach):
  8362. (WebInspector.GeneralTreeElement.prototype.ondetach):
  8363. Manage adding and removing a contextmenu event listener for oncontextmenu.
  8364. * UserInterface/BreakpointTreeElement.js:
  8365. (WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
  8366. Show a ContextMenu with the Breakpoint's menu items.
  8367. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8368. Make Breakpoint to use a SourceCodeLocation. Update its BreakpointTreeElement display.
  8369. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8370. This is the start of modifying Breakpoints to use SourceCodeLocation.
  8371. There are remaining users (SourceCodeTextEditor) which will be addressed
  8372. in a following patch. This updates Breakpoint and its display in the sidebar.
  8373. Reviewed by Timothy Hatcher.
  8374. * UserInterface/Breakpoint.js:
  8375. (WebInspector.Breakpoint):
  8376. (WebInspector.Breakpoint.prototype.get sourceCodeLocation):
  8377. (WebInspector.Breakpoint.prototype.get info):
  8378. Update the constructor and serialization to use SourceCodeLocations,
  8379. which includes a line number and column number.
  8380. * UserInterface/BreakpointTreeElement.js:
  8381. (WebInspector.BreakpointTreeElement):
  8382. (WebInspector.BreakpointTreeElement.prototype._updateTitles):
  8383. (WebInspector.BreakpointTreeElement.prototype._updateStatus):
  8384. BreakpointTreeElements always display the display line + column. They
  8385. show the original location as a subtitle.
  8386. (WebInspector.BreakpointTreeElement.prototype._breakpointDisplayLocationDidChange):
  8387. When the breakpoint's display location changes update our titles.
  8388. However, if the breakpoint actually changed resources, then prepare
  8389. for removal. The sidebar will detect this and create a new tree element.
  8390. * UserInterface/DebuggerManager.js:
  8391. (WebInspector.DebuggerManager):
  8392. (WebInspector.DebuggerManager.prototype.didSetBreakpoint):
  8393. (WebInspector.DebuggerManager.prototype._setBreakpoint):
  8394. Set breakpoints with the breakpoints line + column information.
  8395. * UserInterface/DebuggerSidebarPanel.js:
  8396. (WebInspector.DebuggerSidebarPanel):
  8397. (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
  8398. Simplify now that the breakpoint's SourceCodeLocation already has the
  8399. original SourceCode. Also, create SourceMapResourceTreeElements as needed.
  8400. (WebInspector.DebuggerSidebarPanel.prototype._breakpointRemoved):
  8401. (WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement):
  8402. Refactor breakpoint removal code so it can be shared.
  8403. (WebInspector.DebuggerSidebarPanel.prototype._breakpointDisplayLocationDidChange):
  8404. If a breakpoint changes resources remove the old breakpoint tree element
  8405. and add a new one with the new location.
  8406. (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
  8407. Show the display location.
  8408. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8409. Make Find banner when viewing a SourceMapResource work.
  8410. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8411. A SourceMapResource can display its content in a SourceCodeTextEditor just
  8412. like regular resources. However, it does not use the backend to search
  8413. it's contents, because its contents are all loaded by the frontend. Give
  8414. customPerformSearch a return value saying whether or not it was handled.
  8415. If not handled, we fall back to CodeMirror's text search, which works fine.
  8416. Reviewed by Timothy Hatcher.
  8417. * UserInterface/SourceCodeTextEditor.js:
  8418. (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
  8419. * UserInterface/TextEditor.js:
  8420. (WebInspector.TextEditor.prototype.performSearch):
  8421. If the customPerformSearch returns false, then the custom search did
  8422. not handle the search, and we fallback to the default CodeMirror search.
  8423. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8424. Make SourceCodeLocation provide raw and mapped locations.
  8425. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8426. SourceCodeLocation automatically provide original (raw) and mapped (display)
  8427. source code locations. It's API requires that it be constructed with the raw
  8428. source code and location information, which is automated by using
  8429. SourceCode.prototype.createSourceCodeLocation, passing a lineNumber and
  8430. columnNumber for the source code that you're invoking the method on.
  8431. All uses of SourceCodeLocation will be audited and updated in later patches,
  8432. this patch includes just the core SourceCodeLocation uses.
  8433. Reviewed by Timothy Hatcher.
  8434. * UserInterface/ResourceSidebarPanel.js:
  8435. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
  8436. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeLocation):
  8437. (WebInspector.ResourceSidebarPanel.prototype.showOriginalSourceCodeLocation):
  8438. By default, when showing any location we want to show it's display location,
  8439. which will be the source map resource if there is one, otherwise the raw resource.
  8440. If needed, there is a way to explicitly show the original source code location.
  8441. * UserInterface/SourceCode.js:
  8442. (WebInspector.SourceCode.prototype.createSourceCodeLocation):
  8443. Default implementation, just use the given line and column number.
  8444. * UserInterface/SourceMapResource.js:
  8445. (WebInspector.SourceMapResource.prototype.createSourceCodeLocation):
  8446. Mapped resource. Reverse lookup the raw line and column. Adjust if
  8447. needed for inline <script> offsets. And construct the SourceCodeLocation
  8448. with the raw values.
  8449. * UserInterface/SourceCodeLocation.js:
  8450. (WebInspector.SourceCodeLocation):
  8451. (WebInspector.SourceCodeLocation.prototype.get sourceCode):
  8452. (WebInspector.SourceCodeLocation.prototype.get lineNumber):
  8453. (WebInspector.SourceCodeLocation.prototype.get columnNumber):
  8454. This is the raw location data.
  8455. (WebInspector.SourceCodeLocation.prototype.hasMappedLocation):
  8456. (WebInspector.SourceCodeLocation.prototype.get displaySourceCode):
  8457. (WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
  8458. (WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
  8459. If we have a mapped location, use that. Otherwise use the raw location.
  8460. (WebInspector.SourceCodeLocation.prototype.update):
  8461. If a user of a SourceCodeLocation wants to update the location there
  8462. are restrictions. The updated location must be either the raw resource
  8463. or the mapped resource. SourceCodeLocation then does the rest, and
  8464. updates its internal values and dispatches events appropriately.
  8465. (WebInspector.SourceCodeLocation.prototype.set sourceCode):
  8466. There are cases where the inspector (Breakpoints) which may want to keep
  8467. around a line/column SourceCodeLocation but without an associated
  8468. SourceCode. Setting the source code to null will make this a dumb
  8469. location, and setting it to a source code will update appropriately.
  8470. (WebInspector.SourceCodeLocation.prototype._resetMappedLocation):
  8471. (WebInspector.SourceCodeLocation.prototype._setMappedLocation):
  8472. (WebInspector.SourceCodeLocation.prototype._resolveMappedLocation):
  8473. We lazily resolve the mapped location when needed. In cases where
  8474. a SourceCodeLocation is created from a SourceMapResource the mapped
  8475. location is already known and can be set directly.
  8476. (WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
  8477. Clients of SourceCodeLocation may want to update their display if
  8478. a source map was added and a new better location is available. We
  8479. provide events for any change, or just display location changes.
  8480. (WebInspector.SourceCodeLocation.prototype._sourceCodeSourceMapAdded):
  8481. Whenever the raw resource adds a source map check if there was a
  8482. display location change.
  8483. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8484. Show SourceMapResources in the Resources Sidebar
  8485. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8486. SourceMapResources are added to the Resources Sidebar as children
  8487. of the originator Resource. So if a Script has a SourceMap with
  8488. multiple inputs, there will be a disclosure triangle by the Script
  8489. and you can see the original resources for that Script.
  8490. Since both Resources and Scripts can have SourceMapChildren this
  8491. patch refactors both of those TreeElement classes to extend from a
  8492. common SourceCodeTreeElement class that manages the new
  8493. SourceMapResourceTreeElement children.
  8494. FrameTreeElements, special subclasses of ResourceTreeElements and
  8495. thus SourceCodeTreeElements handle their own source map resource
  8496. children. This is so that SourceMapResources for <script>s in the
  8497. frame are placed along with that frame's same typed resources.
  8498. SourceMapResources that are scripts will be in the Scripts folder,
  8499. or no folder if the frame has only a few resources.
  8500. Reviewed by Timothy Hatcher.
  8501. * UserInterface/ResourceSidebarPanel.js:
  8502. (WebInspector.ResourceSidebarPanel):
  8503. A TreeOutline must opt-in to displaying source map tree elements
  8504. for resources. We only show source map children of resources in the
  8505. main resource tree outline. We will not show them in the search
  8506. results tree outline or breakpoints tree outline.
  8507. * UserInterface/GeneralTreeElement.js:
  8508. (WebInspector.GeneralTreeElement.prototype.callFirstAncestorFunction):
  8509. Move this code from ResourceTreeElement to General. It is useful.
  8510. * UserInterface/SourceCodeTreeElement.js: Added.
  8511. (WebInspector.SourceCodeTreeElement):
  8512. (WebInspector.SourceCodeTreeElement.prototype.updateSourceMapResources):
  8513. (WebInspector.SourceCodeTreeElement.prototype.onattach):
  8514. (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
  8515. (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
  8516. (WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
  8517. Common superclass for Script and Resource TreeElements. This manages the
  8518. child source map resources. Sorts them, and replaces them when they change.
  8519. * UserInterface/ResourceTreeElement.js:
  8520. (WebInspector.ResourceTreeElement):
  8521. (WebInspector.ResourceTreeElement.compareResourceTreeElements): Common comparison.
  8522. (WebInspector.ResourceTreeElement.prototype._updateResource):
  8523. (WebInspector.ResourceTreeElement.prototype._updateTitles):
  8524. (WebInspector.ResourceTreeElement.prototype._typeDidChange):
  8525. * UserInterface/ScriptTreeElement.js:
  8526. (WebInspector.ScriptTreeElement):
  8527. Refactor as subclasses of SourceCodeTreeElement.
  8528. * UserInterface/SourceMapResourceTreeElement.js: Added.
  8529. (WebInspector.SourceMapResourceTreeElement):
  8530. (WebInspector.SourceMapResourceTreeElement.prototype.onattach):
  8531. (WebInspector.SourceMapResourceTreeElement.prototype._updateTitles):
  8532. A SourceMapResourceTreeElement is very simple. It adds a style class to
  8533. get unique icons, lazy loads on attach, and since it doesn't have a
  8534. parent frame it uses it's originator's host to display a subtitle if
  8535. it is loaded from a different origin.
  8536. * UserInterface/FrameTreeElement.js:
  8537. (WebInspector.FrameTreeElement.prototype.updateSourceMapResources):
  8538. (WebInspector.FrameTreeElement.prototype.onattach):
  8539. (WebInspector.FrameTreeElement.prototype.onpopulate):
  8540. (WebInspector.FrameTreeElement.prototype._updateParentStatus):
  8541. (WebInspector.FrameTreeElement.prototype._addTreeElementForRepresentedObject):
  8542. (WebInspector.FrameTreeElement.prototype._insertResourceTreeElement):
  8543. Handle our own SourceMapResource children in onpopulate and addTreeElement paths.
  8544. * UserInterface/Main.html:
  8545. * UserInterface/ResourceIcons.css:
  8546. (.source-map-resource.resource-icon .icon):
  8547. (.source-map-resource.resource-icon.resource-type-script .icon):
  8548. * UserInterface/Images/ClippingGeneric.png: Added.
  8549. * UserInterface/Images/ClippingGeneric@2x.png: Added.
  8550. Add new files, images, and styles to trigger the images.
  8551. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8552. Download SourceMaps and create SourceMapResources.
  8553. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8554. Reviewed by Timothy Hatcher.
  8555. * UserInterface/SourceMap.js:
  8556. (WebInspector.SourceMap):
  8557. (WebInspector.SourceMap.prototype.get originalSourceCode):
  8558. (WebInspector.SourceMap.prototype.get resources):
  8559. (WebInspector.SourceMap.prototype.addResource):
  8560. (WebInspector.SourceMap.prototype.resourceForURL):
  8561. Give a SourceMap references to the SourceCode that originally requested
  8562. it, and the SourceMapResources created for the input sources.
  8563. * UserInterface/SourceMapResource.js: Added.
  8564. (WebInspector.SourceMapResource):
  8565. (WebInspector.SourceMapResource.prototype.get sourceMap):
  8566. A SourceMapResource is a Resource subclass with no loading information.
  8567. It has a reference to the SourceMap that it belongs to.
  8568. (WebInspector.SourceMapResource.prototype.canRequestContentFromBackend):
  8569. (WebInspector.SourceMapResource.prototype.requestContentFromBackend):
  8570. The content is loaded on demand. Normal requests for SourceCode content
  8571. goes through SourceCode.prototype.requestContent. Since the content is
  8572. loaded on demand, the type and data are filled in after content is
  8573. requested, and we fire normal Resource events, like Type changed.
  8574. * UserInterface/Resource.js:
  8575. (WebInspector.Resource.prototype.markAsFinished):
  8576. Don't request content if we can't / shouldn't request content from the
  8577. backend. Normally resources load their content as soon as they finish
  8578. loading. However SourceMapResources load their content and then mark
  8579. as finished. Without this we would get a harmless assert.
  8580. * UserInterface/SourceCode.js:
  8581. (WebInspector.SourceCode):
  8582. (WebInspector.SourceCode.prototype.get sourceMaps):
  8583. (WebInspector.SourceCode.prototype.addSourceMap):
  8584. Any SourceCode resource can have a set of source maps. In the common case,
  8585. a Script will have a single source map. However a Document resource map
  8586. have multiple sourceMaps for different inline <script> sections.
  8587. * UserInterface/DebuggerObserver.js:
  8588. (WebInspector.DebuggerObserver.prototype.scriptParsed):
  8589. * UserInterface/DebuggerManager.js:
  8590. (WebInspector.DebuggerManager.prototype.scriptDidParse):
  8591. The SourceMap resource's url comes in from scriptDidParse. Pass it on
  8592. eventually to the Script constructor.
  8593. * UserInterface/Script.js:
  8594. (WebInspector.Script):
  8595. If we have a source map URL, load and parse the source map.
  8596. * UserInterface/SourceMapManager.js: Added.
  8597. (WebInspector.SourceMapManager):
  8598. (WebInspector.SourceMapManager.prototype.sourceMapForURL):
  8599. (WebInspector.SourceMapManager.prototype.downloadSourceMap):
  8600. (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
  8601. (WebInspector.SourceMapManager.prototype._loadAndParseFailed):
  8602. (WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
  8603. (WebInspector.SourceMapManager.prototype._mainResourceDidChange):
  8604. A global set of SourceMaps by url. This prevents multiple downloads of
  8605. the same source map. The map is cleared on main resource changes.
  8606. * UserInterface/Main.html:
  8607. * UserInterface/Main.js:
  8608. (WebInspector.contentLoaded):
  8609. Add new files and instantiate the new manager singleton.
  8610. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8611. Add parts of SourceMap.js from OpenSource.
  8612. <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
  8613. This parses a v3 SourceMap file. The spec is linked at the top.
  8614. SourceMap.js comes from OpenSource's frontend/SourceMap.js.
  8615. Reviewed by Timothy Hatcher.
  8616. * UserInterface/Main.html:
  8617. * UserInterface/SourceMap.js: Added.
  8618. (WebInspector.SourceMap):
  8619. (WebInspector.SourceMap.prototype.sources):
  8620. (WebInspector.SourceMap.prototype.sourceContent):
  8621. (WebInspector.SourceMap.prototype._parseMappingPayload):
  8622. (WebInspector.SourceMap.prototype._parseSections):
  8623. (WebInspector.SourceMap.prototype._parseMap):
  8624. (WebInspector.SourceMap.prototype._isSeparator):
  8625. (WebInspector.SourceMap.prototype._decodeVLQ):
  8626. (WebInspector.SourceMap.StringCharIterator):
  8627. (WebInspector.SourceMap.StringCharIterator.prototype.next):
  8628. (WebInspector.SourceMap.StringCharIterator.prototype.peek):
  8629. (WebInspector.SourceMap.StringCharIterator.prototype.hasNext):
  8630. (WebInspector.PositionBasedSourceMap):
  8631. (WebInspector.PositionBasedSourceMap.prototype.findEntry):
  8632. (WebInspector.PositionBasedSourceMap.prototype.findEntryReversed):
  8633. (WebInspector.PositionBasedSourceMap.prototype._parseMap):
  8634. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8635. Only allow left clicks on the gutter / dragging breakpoints.
  8636. Reviewed by Ricky Mondello.
  8637. * UserInterface/TextEditor.js:
  8638. (WebInspector.TextEditor.prototype):
  8639. Bail if the mouse down button is not the left button.
  8640. 2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
  8641. Remove unused ContextMenu soft menu code.
  8642. Rubber-stamped by Ricky Mondello.
  8643. * UserInterface/ContextMenu.js:
  8644. 2013-02-21 Joseph Pecoraro <pecoraro@apple.com>
  8645. Standardize on "Event" not "Events". There were a few outliers.
  8646. Reviewed by Brian Weinstein.
  8647. * UserInterface/DatabaseContentView.js:
  8648. (WebInspector.DatabaseContentView.prototype._queryFinished):
  8649. * UserInterface/StylePropertyTreeElement.js:
  8650. (WebInspector.StylePropertyTreeElement.prototype):
  8651. * UserInterface/TextPrompt.js:
  8652. (WebInspector.TextPrompt.prototype.applySuggestion):
  8653. (WebInspector.TextPrompt.prototype.acceptSuggestion):
  8654. 2013-02-19 Jeff Miller <jeffm@apple.com>
  8655. Regenerate localizedStrings.js after recent changes.
  8656. * Localizations/en.lproj/localizedStrings.js:
  8657. Regenerated.
  8658. 2013-02-18 Joseph Pecoraro <pecoraro@apple.com>
  8659. <rdar://problem/13232839> Show Error Console (Option+Cmd+C) should always put keyboard focus in the console
  8660. The keyboard shortcut already existed, but if used to open the inspector
  8661. the focus was getting stolen away by other elements with tabindex and
  8662. the DOM Tree. Fix this so focus is not stolen away. As an added bonus
  8663. the console now keeps its focus across page reloads and navigations.
  8664. Reviewed by Antoine Quint.
  8665. * UserInterface/InspectorFrontendAPI.js:
  8666. (InspectorFrontendAPI.showConsole):
  8667. When the keyboard shortcut is triggered, focus the quick console. If
  8668. the page is still loading, we will need to focus again because other
  8669. elements with tabindex may steal focus away from the console prompt.
  8670. * UserInterface/Main.js:
  8671. (WebInspector.isConsoleFocused):
  8672. Global accessor for whether or not the console is focused.
  8673. * UserInterface/DOMTreeContentView.js:
  8674. (WebInspector.DOMTreeContentView.prototype.shown):
  8675. When showing a the DOMTreeOutline, never steal focus from the console.
  8676. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode):
  8677. When the root dom node changes and we reveal and select an element,
  8678. never steal focus from the console.
  8679. * UserInterface/DOMTreeOutline.js:
  8680. (WebInspector.DOMTreeOutline.prototype.setVisible):
  8681. Provide an optional omitFocus parameter to pass on. It already exists below.
  8682. 2013-02-18 Joseph Pecoraro <pecoraro@apple.com>
  8683. Move .indeterminate-progress-spinner from resources only to all content views.
  8684. ScriptContentViews also use spinners, and they were not getting the
  8685. proper styling if you were fast enough to see it!
  8686. Reviewed by Brian Weinstein.
  8687. * UserInterface/ContentView.css: Renamed from WebInspector/UserInterface/ResourceContentView.css.
  8688. (.content-view > .indeterminate-progress-spinner):
  8689. * UserInterface/Main.html:
  8690. 2013-02-18 Joseph Pecoraro <pecoraro@apple.com>
  8691. Hide the Image Size section for Image resources if the load failed.
  8692. Reviewed by Brian Weinstein.
  8693. * UserInterface/ResourceDetailsSidebarPanel.js:
  8694. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
  8695. Don't show an empty image size section if the image failed to load.
  8696. 2013-02-16 Joseph Pecoraro <pecoraro@apple.com>
  8697. Accidentally added some code referencing SourceMapResource before it was added.
  8698. Unreviewed cleanup.
  8699. * UserInterface/ResourceSidebarPanel.js:
  8700. (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
  8701. 2013-02-18 Antoine Quint <graouts@apple.com>
  8702. <rdar://problem/13180267> REGRESSION: Reload button is no longer visible in the Web Inspector
  8703. Make the ResourceTreeElement's "status" property a reload button in case we're
  8704. dealing with the main resource of the main frame.
  8705. Reviewed by Joseph Pecoraro.
  8706. * UserInterface/Images/Reload.pdf: Removed.
  8707. * UserInterface/Images/Reload.svg: Added.
  8708. * UserInterface/Images/ReloadSelected.svg: Added.
  8709. * UserInterface/Main.js:
  8710. (WebInspector.contentLoaded):
  8711. * UserInterface/ResourceTreeElement.css:
  8712. (.item.resource-type-document > .status > .reload-button):
  8713. (.item.resource-type-document.selected > .status > .reload-button):
  8714. * UserInterface/ResourceTreeElement.js:
  8715. (WebInspector.ResourceTreeElement.prototype.get reloadButton):
  8716. (WebInspector.ResourceTreeElement.prototype._updateResource):
  8717. (WebInspector.ResourceTreeElement.prototype._updateStatus):
  8718. (WebInspector.ResourceTreeElement.prototype._reloadPageClicked):
  8719. 2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
  8720. Double clicking the disclosure triangle for a TreeElement should not
  8721. trigger the ondblclick for the element.
  8722. This will be more possible once we add SourceMaps, but it is currently
  8723. possible right now with the Main Resource's disclosure triangle.
  8724. Reviewed by Dean Jackson.
  8725. * UserInterface/TreeOutline.js:
  8726. (TreeElement.treeElementDoubleClicked):
  8727. 2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
  8728. We don't need to check the entire string when we mean to check just the
  8729. first character. Convert an indexOf to charAt(0).
  8730. Reviewed by Timothy Hatcher.
  8731. * UserInterface/FrameTreeElement.js:
  8732. (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
  8733. 2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
  8734. <rdar://problem/13226395> Multiline console.asserts in ResourceSidebarPanel.js not getting stripped
  8735. Reviewed by Timothy Hatcher.
  8736. * Scripts/remove-console-asserts.pl:
  8737. For safety, keep the script reading line by line and warn if there is
  8738. a console.assert that was not stripped. This almost always means the
  8739. assert spanned multiple lines.
  8740. * UserInterface/ResourceSidebarPanel.js:
  8741. Converted multi-line asserts to a single line.
  8742. 2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
  8743. Manually running remove-console-asserts.pl was failing on rename.
  8744. Change instead to File::move from the File::copy module and
  8745. report errors if they happen.
  8746. Reviewed by Timothy Hatcher.
  8747. * Scripts/remove-console-asserts.pl:
  8748. 2013-02-15 Timothy Hatcher <timothy@apple.com>
  8749. Fix exceptions caused by my earlier InspectorBackendCommands change.
  8750. Unreviewed.
  8751. * UserInterface/DOMStorageObserver.js:
  8752. (WebInspector.DOMStorageObserver.prototype.domStorageItemsCleared): Call
  8753. updateDOMStorage instead of domStorageUpdated.
  8754. (WebInspector.DOMStorageObserver.prototype.domStorageItemRemoved): Ditto.
  8755. (WebInspector.DOMStorageObserver.prototype.domStorageItemAdded): Ditto.
  8756. (WebInspector.DOMStorageObserver.prototype.domStorageItemUpdated): Ditto.
  8757. 2013-02-15 Jessie Berlin <jberlin@apple.com>
  8758. Ran update-safari-localizable-strings.
  8759. * Localizations/en.lproj/localizedStrings.js:
  8760. 2013-02-15 Timothy Hatcher <timothy@apple.com>
  8761. Update InspectorBackendCommands.js for the latest protocol changes.
  8762. Reviewed by Antoine Quint.
  8763. * UserInterface/CSSObserver.js:
  8764. (WebInspector.CSSObserver.prototype.styleSheetAdded): Added.
  8765. (WebInspector.CSSObserver.prototype.styleSheetRemoved): Added.
  8766. * UserInterface/CookieStorageContentView.js:
  8767. (WebInspector.CookieStorageContentView.prototype._deleteCallback): Pass both domain and url.
  8768. * UserInterface/DOMStorageObserver.js:
  8769. (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Renamed from domStorageUpdated.
  8770. (WebInspector.DOMStorageObserver.prototype.domStorageItemsCleared): Added.
  8771. (WebInspector.DOMStorageObserver.prototype.domStorageItemRemoved): Added.
  8772. (WebInspector.DOMStorageObserver.prototype.domStorageItemAdded): Added.
  8773. (WebInspector.DOMStorageObserver.prototype.domStorageItemUpdated): Added.
  8774. * UserInterface/DOMTreeManager.js:
  8775. (WebInspector.DOMTreeManager.prototype.highlightDOMNode): Use invoke since the argument
  8776. order changed and objectId is an optional argument we don't use.
  8777. * UserInterface/InspectorBackend.js:
  8778. (InspectorBackendClass.prototype.reportProtocolError): Log the whole error, not just the message.
  8779. * UserInterface/InspectorBackendCommands.js: Updated from OpenSource r142992.
  8780. * UserInterface/InspectorObserver.js:
  8781. (WebInspector.InspectorObserver.prototype.detached): Added.
  8782. * UserInterface/PageObserver.js:
  8783. (WebInspector.PageObserver.prototype.javascriptDialogOpening): Added.
  8784. (WebInspector.PageObserver.prototype.javascriptDialogClosed): Added.
  8785. (WebInspector.PageObserver.prototype.scriptsEnabled): Added.
  8786. 2013-02-15 Antoine Quint <graouts@apple.com>
  8787. <rdar://problem/13207008> Allow toggling showing shadow trees with a button in the DOM Tree navigation bar
  8788. We do a few things in this patch:
  8789. 1. We move the existing compositing borders navigation item from
  8790. FrameContentView to DOMTreeContentView.
  8791. 2. We add a new navigation item on DOMTreeContentView to toggle
  8792. shadow tree DOM nodes.
  8793. 3. We make ClusterContentView return its current content view's
  8794. navigation items in the navigationItems accessor since otherwise
  8795. the DOMTreeContentView navigation items wouldn't get picked up.
  8796. 4. We add a new event to notify when a ContentView's navigation
  8797. items have changed so that they may be picked up by the ContentBrowser.
  8798. Reviewed by Timothy Hatcher.
  8799. * Localizations/en.lproj/localizedStrings.js:
  8800. * UserInterface/ClusterContentView.js:
  8801. (WebInspector.ClusterContentView.prototype.get navigationItems):
  8802. (WebInspector.ClusterContentView.prototype._currentContentViewDidChange):
  8803. * UserInterface/ContentBrowser.js:
  8804. (WebInspector.ContentBrowser):
  8805. (WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
  8806. * UserInterface/ContentView.js:
  8807. * UserInterface/DOMTreeContentView.js:
  8808. (WebInspector.DOMTreeContentView):
  8809. (WebInspector.DOMTreeContentView.prototype.get navigationItems):
  8810. (WebInspector.DOMTreeContentView.prototype.shown):
  8811. (WebInspector.DOMTreeContentView.prototype._mouseWasClicked):
  8812. (WebInspector.DOMTreeContentView.prototype._toggleCompositingBorders):
  8813. (WebInspector.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
  8814. (WebInspector.DOMTreeContentView.prototype._showShadowDOMSettingChanged):
  8815. (WebInspector.DOMTreeContentView.prototype._toggleShowsShadowDOMSetting):
  8816. * UserInterface/FrameContentView.js:
  8817. (WebInspector.FrameContentView.prototype.shown):
  8818. (WebInspector.FrameContentView.prototype._pathComponentSelected):
  8819. * UserInterface/Images/ShadowDOM.pdf: Added.
  8820. 2013-02-15 Antoine Quint <graouts@apple.com>
  8821. <rdar://problem/13026376> Layers sidebar panel should show layers associated with any descendant node
  8822. Use the DOM hierarchy to compile a list of layers associated with any
  8823. descendant of the node passed to LayerTreeManager's layersForNode()
  8824. method.
  8825. Reviewed by Timothy Hatcher.
  8826. * UserInterface/LayerTreeManager.js:
  8827. (WebInspector.LayerTreeManager.prototype.get flatLayerTree): New getter
  8828. to make it much easier to debug issues with the LayerTreeManager so we
  8829. get the flat list of all known layers from the console.
  8830. (WebInspector.LayerTreeManager.prototype.layersForNode):
  8831. (WebInspector.LayerTreeManager.prototype.):
  8832. (WebInspector.LayerTreeManager.prototype._flattenedLayerTree):
  8833. (WebInspector.LayerTreeManager.prototype._obtainNodeIdsForLayerIds):
  8834. (WebInspector.LayerTreeManager.prototype._layersForDescendantsOfNode):
  8835. 2013-02-15 Antoine Quint <graouts@apple.com>
  8836. <rdar://problem/13223597> Dashboard resources size may be only partial
  8837. Wait until we've gotten an event indicating we're loading the main
  8838. resource to start tracking sizes.
  8839. Reviewed by Timothy Hatcher.
  8840. * UserInterface/DashboardManager.js:
  8841. (WebInspector.DashboardManager):
  8842. (WebInspector.DashboardManager.prototype._mainResourceDidChange):
  8843. (WebInspector.DashboardManager.prototype._startUpdatingTime):
  8844. 2013-02-15 Antoine Quint <graouts@apple.com>
  8845. <rdar://problem/13217869> Dashboard: LCD timer does not update when going back/forward
  8846. Don't forget to kill any previously running timer when a new page loads
  8847. and reset the time reported in the dashboard to 0 before starting the
  8848. new timer.
  8849. Reviewed by Timothy Hatcher.
  8850. * UserInterface/DashboardManager.js:
  8851. (WebInspector.DashboardManager.prototype._mainResourceDidChange):
  8852. 2013-02-15 Antoine Quint <graouts@apple.com>
  8853. <rdar://problem/13207017> Nodes hosted in shadow trees should not be disregarded when "show-shadow-dom" setting is off
  8854. We used to only deal with the "show-shadow-dom" setting as immutable and
  8855. would simply not create DOMNodes for payloads with shadow roots in case
  8856. the setting was false (the default). However, we would run in a situation
  8857. where the backend could push nodes that were part of a shadow tree,
  8858. regardless of the setting, and the parentId for the node would not be
  8859. referenced in the DOMTreeManager's _idToDOMNode map which would eventually
  8860. yield an error when handling setChildNodes payloads and break any further
  8861. DOM interaction in the inspector. This kind of case happened quite often
  8862. when the LayerTreeManager would get composted layers that were part of
  8863. an <input> element, <video> element, etc.
  8864. We now switch to a system where the "show-shadow-dom" setting can be changed
  8865. at any time and we reflect the correct state in the DOMTreeOutline. Since
  8866. the DOMTreeOutline bases its representation on the data represented by
  8867. DOMNode instances, we make the "firstChild", "lastChild", "previousSibling",
  8868. "nextSibling" and "children" properties getters and dynamically check whether
  8869. child nodes hosted in shadow roots should be ignored.
  8870. We only build the filtered children list in the case where we shouldn't
  8871. show shadow roots and we've identified through a call to _renumber() that
  8872. the filtered list needed updating. The filtered list is then cached until
  8873. the next time it needs updating.
  8874. We also make the "childNodeCount" property use a getter / setter as it was
  8875. being accessed using the ivar from outside the DOMNode class and it would
  8876. not reflect whether shadow roots should be reported as children.
  8877. Then, we move the setting to be a shared setting on the global WebInspector
  8878. object and track changes to it, updating all nodes in the DOMTreeOutline
  8879. when the change happens.
  8880. Further fixes will ensure we refresh the layer tree when the setting changes,
  8881. and teach the LayerTreeManager to ignore layers attached to nodes in shadow
  8882. roots when the setting is to hide shadow nodes. Another fix will be to provide
  8883. a button to toggle that setting in the DOM tree's navigation bar in lieu of
  8884. a contextual menu item.
  8885. Reviewed by Joseph Pecoraro.
  8886. * UserInterface/DOMNode.js:
  8887. (WebInspector.DOMNode):
  8888. (WebInspector.DOMNode.prototype.get firstChild):
  8889. (WebInspector.DOMNode.prototype.get lastChild):
  8890. (WebInspector.DOMNode.prototype.get nextSibling):
  8891. (WebInspector.DOMNode.prototype.get previousSibling):
  8892. (WebInspector.DOMNode.prototype.get childNodeCount):
  8893. (WebInspector.DOMNode.prototype.set childNodeCount):
  8894. (WebInspector.DOMNode.prototype.hasChildNodes):
  8895. (WebInspector.DOMNode.prototype.hasShadowRoots):
  8896. (WebInspector.DOMNode.prototype._insertChild):
  8897. (WebInspector.DOMNode.prototype._removeChild):
  8898. (WebInspector.DOMNode.prototype._setChildrenPayload):
  8899. (WebInspector.DOMNode.prototype._renumber):
  8900. * UserInterface/DOMTreeElement.js:
  8901. (WebInspector.DOMTreeElement.prototype.handleLoadAllChildren):
  8902. * UserInterface/DOMTreeManager.js:
  8903. (WebInspector.DOMTreeManager.prototype._childNodeCountUpdated):
  8904. * UserInterface/DOMTreeOutline.js:
  8905. (WebInspector.DOMTreeOutline):
  8906. (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
  8907. (WebInspector.DOMTreeOutline.prototype._toggleShowShadowDOM):
  8908. (WebInspector.DOMTreeOutline.prototype._showShadowDOMSettingChanged):
  8909. * UserInterface/Main.js:
  8910. (WebInspector.contentLoaded):
  8911. 2013-02-14 Timothy Hatcher <timothy@apple.com>
  8912. Switch to the new flexbox model for significantly faster layout times.
  8913. <rdar://problem/13206930> REGRESSION: Layout time in the Web Inspector
  8914. is 1.21x longer compared to Safari 6
  8915. Reviewed by Simon Fraser.
  8916. * UserInterface/TextPrompt.js:
  8917. (WebInspector.TextPrompt.SuggestBox.prototype._updateBoxPosition): Make sure to absolute position
  8918. the element when measuring in the body to avoid flexbox layout.
  8919. * UserInterface/HierarchicalPathNavigationItem.js:
  8920. (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Use updateLayout instead
  8921. of updateLayoutSoon. Delaying the layout causes a visual flash of wrapped items.
  8922. * UserInterface/ButtonToolbarItem.css: Replaced -webkit-box with -webkit-flex.
  8923. Replaced -webkit-box-flex with -webkit-flex. Replaced -webkit-box-orient: vertical
  8924. with -webkit-flex-direction: column. Replaced -webkit-box-orient: horizontal with
  8925. -webkit-flex-direction: row. Replaced -webkit-box-align: center with -webkit-align-items: center.
  8926. Replaced -webkit-box-pack: center with -webkit-justify-content: center. Replaced
  8927. -webkit-box-pack: start with -webkit-justify-content: flex-start. Replaced -webkit-box-pack: end
  8928. with -webkit-justify-content: flex-end.
  8929. * UserInterface/ContentBrowser.css: Ditto.
  8930. * UserInterface/ControlToolbarItem.css: Ditto.
  8931. * UserInterface/DashboardView.css: Ditto.
  8932. * UserInterface/FilterBar.css: Ditto.
  8933. * UserInterface/FlexibleSpaceNavigationItem.css: Ditto.
  8934. * UserInterface/FontResourceContentView.css: Ditto.
  8935. * UserInterface/ImageResourceContentView.css: Ditto.
  8936. * UserInterface/LayerTreeSidebarPanel.css: Ditto.
  8937. * UserInterface/Main.css: Ditto.
  8938. * UserInterface/NavigationSidebarPanel.css: Ditto.
  8939. * UserInterface/Popover.css: Ditto.
  8940. * UserInterface/QuickConsole.css: Ditto.
  8941. * UserInterface/ResourceSidebarPanel.css: Ditto.
  8942. * UserInterface/Toolbar.css: Ditto.
  8943. * UserInterface/HierarchicalPathComponent.css: Ditto.
  8944. Plus added min-width: 0 in a couple places to get proper shrinking.
  8945. * UserInterface/NavigationBar.css: Ditto.
  8946. Plus added -webkit-flex-wrap: wrap in a couple places to get proper measuring in JavaScript.
  8947. 2013-02-14 Antoine Quint <graouts@apple.com>
  8948. <rdar://problem/13200858> Popovers can draw their background twice
  8949. Since the canvas context may be the very same context across
  8950. presentations of the popover, ensure that we restore the default
  8951. state after we're done drawing so that the previous clip path
  8952. is removed.
  8953. We also clear the drawing region so that we don't get remnants
  8954. of the previously drawn frame in case the frame size is the same
  8955. as for the previous popover presentation.
  8956. Reviewed by Timothy Hatcher.
  8957. * UserInterface/Popover.js:
  8958. (WebInspector.Popover.prototype._drawBackground):
  8959. 2013-02-14 Antoine Quint <graouts@apple.com>
  8960. <rdar://problem/13192982> Debugger popovers should line-up arrow to match hovered token
  8961. Use the token's bounds rather than the expression's bounds
  8962. to present the popover.
  8963. Reviewed by Timothy Hatcher.
  8964. * UserInterface/TextEditor.js:
  8965. (WebInspector.TextEditor.prototype._checkHoveredToken):
  8966. 2013-02-14 Antoine Quint <graouts@apple.com>
  8967. <rdar://problem/13209159> Dashboard load timer starts over when recording in the Timeline manually
  8968. Instead of starting the timer upon starting recording the timeline, use the
  8969. WebInspector.Frame.Event.MainResourceDidChange event to track load of the
  8970. main frame only since it's the load of the main frame that we're showing
  8971. the time for in the dashboard.
  8972. Reviewed by Timothy Hatcher.
  8973. * UserInterface/DashboardManager.js:
  8974. (WebInspector.DashboardManager):
  8975. (WebInspector.DashboardManager.prototype._mainResourceDidChange):
  8976. 2013-02-13 Timothy Hatcher <timothy@apple.com>
  8977. Don't fire WebInspector.QuickConsole.Event.DidResize if nothing changed.
  8978. Part of: <rdar://problem/12745890> Autocomplete slows down my typing in the Web Inspector console while debugging
  8979. Reviewed by Antoine Quint.
  8980. * UserInterface/QuickConsole.js:
  8981. (WebInspector.QuickConsole.prototype._updateSize): Only change the style and fire the event
  8982. if the height of the toolbar or element changed.
  8983. 2013-02-12 Timothy Hatcher <timothy@apple.com>
  8984. Speed up selection of deeply nested DOM nodes.
  8985. <rdar://problem/13201584> UI updates after selecting elements is very slow
  8986. Reviewed by Joseph Pecoraro.
  8987. * UserInterface/HierarchicalPathNavigationItem.js:
  8988. (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Remove a offsetWidth
  8989. from a loop that also sets style info.
  8990. 2013-02-12 Timothy Hatcher <timothy@apple.com>
  8991. Treat an empty URL for frames as "about:blank" for the special empty page.
  8992. Reviewed by Joseph Pecoraro.
  8993. * UserInterface/FrameResourceManager.js:
  8994. (WebInspector.FrameResourceManager.prototype._createFrame):
  8995. 2013-02-13 Antoine Quint <graouts@apple.com>
  8996. <rdar://problem/13193125> Debugger popovers don't appear for boolean values
  8997. Don't forget to handle boolean values for the debugger popover.
  8998. Reviewed by Timothy Hatcher.
  8999. * UserInterface/SourceCodeTextEditor.js:
  9000. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
  9001. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
  9002. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean):
  9003. 2013-02-12 Jessie Berlin <jberlin@apple.com>
  9004. Ran update-safari-localizable-strings.
  9005. Reviewed by Cody Krieger.
  9006. * Localizations/en.lproj/localizedStrings.js:
  9007. Updated by the script.
  9008. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9009. Add support for computed style.
  9010. <rdar://problem/7206272&12526319>
  9011. Reviewed by Joseph Pecoraro.
  9012. * UserInterface/CSSProperty.js:
  9013. (WebInspector.CSSProperty.prototype.set text): Return early if not editable.
  9014. (WebInspector.CSSProperty.prototype.set name): Ditto.
  9015. (WebInspector.CSSProperty.prototype.get canonicalName): Use CSSStyleManager.canonicalNameForPropertyName.
  9016. (WebInspector.CSSProperty.prototype.set value): Return early if not editable.
  9017. (WebInspector.CSSProperty.prototype.set priority): Ditto.
  9018. (WebInspector.CSSProperty.prototype.set enabled): Ditto.
  9019. (WebInspector.CSSProperty.prototype.add): Ditto.
  9020. (WebInspector.CSSProperty.prototype.remove): Ditto.
  9021. * UserInterface/CSSStyleDeclaration.js:
  9022. (WebInspector.CSSStyleDeclaration):
  9023. (WebInspector.CSSStyleDeclaration.prototype.get editable): Added.
  9024. (WebInspector.CSSStyleDeclaration.prototype.update): Store the property in a map if we aren't editable.
  9025. (WebInspector.CSSStyleDeclaration.prototype.addProperty): Return early if not editable.
  9026. (WebInspector.CSSStyleDeclaration.prototype.removeProperty): Ditto.
  9027. (WebInspector.CSSStyleDeclaration.prototype.propertyForName): Use property map if not editable.
  9028. * UserInterface/CSSStyleManager.js:
  9029. (WebInspector.CSSStyleManager.prototype.canonicalNameForPropertyName): Added. Moved from CSSProperty.
  9030. * UserInterface/DOMNodeStyles.js:
  9031. (WebInspector.DOMNodeStyles):
  9032. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Added. Moved the finish here.
  9033. (WebInspector.DOMNodeStyles.prototype.get computedStyle): Added.
  9034. (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Handle NaN index better.
  9035. (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Use an external effective property map for
  9036. the main element styles.
  9037. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Use an external effective property map
  9038. if one is passed in.
  9039. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9040. Add support for editing rules, styles and properties.
  9041. <rdar://problem/7206272&12526319>
  9042. Reviewed by Joseph Pecoraro.
  9043. * UserInterface/CSSProperty.js:
  9044. (WebInspector.CSSProperty.prototype.set index): Added.
  9045. (WebInspector.CSSProperty.prototype.update): Delete the pending properties.
  9046. (WebInspector.CSSProperty.prototype.get text): Use the getters to get the pending values.
  9047. (WebInspector.CSSProperty.prototype.set text): Added.
  9048. (WebInspector.CSSProperty.prototype.get name): Return _pendingName if index is NaN.
  9049. (WebInspector.CSSProperty.prototype.set name): Added.
  9050. (WebInspector.CSSProperty.prototype.get value): Return _pendingValue if index is NaN.
  9051. (WebInspector.CSSProperty.prototype.set value): Added.
  9052. (WebInspector.CSSProperty.prototype.get important): Use priority getter.
  9053. (WebInspector.CSSProperty.prototype.set important): Added.
  9054. (WebInspector.CSSProperty.prototype.get priority): Return _pendingPriority if index is NaN.
  9055. (WebInspector.CSSProperty.prototype.set priority): Added.
  9056. (WebInspector.CSSProperty.prototype.get enabled): Check ownerStyle and index too.
  9057. (WebInspector.CSSProperty.prototype.set enabled): Added.
  9058. (WebInspector.CSSProperty.prototype.add): Added.
  9059. (WebInspector.CSSProperty.prototype.remove): Added.
  9060. (WebInspector.CSSProperty.prototype._updatePropertySoon): Added.
  9061. (WebInspector.CSSProperty.prototype._updatePropertySoon.performUpdate): Added.
  9062. (WebInspector.CSSProperty.prototype._cancelPendingUpdate): Added.
  9063. * UserInterface/CSSRule.js:
  9064. (WebInspector.CSSRule.prototype.set selectorText): Added.
  9065. (WebInspector.CSSRule.prototype.set selectors): Added.
  9066. * UserInterface/CSSStyleDeclaration.js:
  9067. (WebInspector.CSSStyleDeclaration):
  9068. (WebInspector.CSSStyleDeclaration.prototype.update): Don't set ownerStyle to null anymore
  9069. since we reuse properties and want them associated still.
  9070. (WebInspector.CSSStyleDeclaration.prototype.set text): Added.
  9071. (WebInspector.CSSStyleDeclaration.prototype.get pendingProperties): Added.
  9072. (WebInspector.CSSStyleDeclaration.prototype.propertyForName): Added.
  9073. (WebInspector.CSSStyleDeclaration.prototype.propertyForName.findMatch): Added.
  9074. (WebInspector.CSSStyleDeclaration.prototype.addProperty): Added.
  9075. (WebInspector.CSSStyleDeclaration.prototype.removeProperty): Added.
  9076. * UserInterface/DOMNodeStyles.js:
  9077. (WebInspector.DOMNodeStyles.prototype.ruleSelectorChanged): Added.
  9078. (WebInspector.DOMNodeStyles.prototype.changeRuleSelector): Added.
  9079. (WebInspector.DOMNodeStyles.prototype.changeStyleText): Added.
  9080. (WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Added.
  9081. (WebInspector.DOMNodeStyles.prototype.changeProperty): Added.
  9082. (WebInspector.DOMNodeStyles.prototype.changePropertyText): Added.
  9083. (WebInspector.DOMNodeStyles.prototype.changePropertyEnabledState): Added.
  9084. (WebInspector.DOMNodeStyles.prototype.addProperty): Added.
  9085. (WebInspector.DOMNodeStyles.prototype.removeProperty): Added.
  9086. (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Added.
  9087. (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Reuse pending properties.
  9088. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Ignore stylesheets we know
  9089. we just changed.
  9090. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9091. Mark overridden properties and associate shorthand to longhand properties.
  9092. <rdar://problem/7206272&12526319>
  9093. Reviewed by Joseph Pecoraro.
  9094. * UserInterface/CSSProperty.js:
  9095. (WebInspector.CSSProperty.prototype.update):
  9096. (WebInspector.CSSProperty.prototype.get canonicalName): Added.
  9097. (WebInspector.CSSProperty.prototype.get canonicalName.canonicalPropertyName): Added.
  9098. (WebInspector.CSSProperty.prototype.set overridden): Added.
  9099. * UserInterface/DOMNodeStyles.js:
  9100. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Call _updateStyleCascade.
  9101. (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Added.
  9102. (WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder): Added.
  9103. (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Added.
  9104. (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties): Added.
  9105. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9106. Parse inherited rules, pseudo elements, inline style and attribute styles.
  9107. <rdar://problem/7206272&12526319>
  9108. Reviewed by Joseph Pecoraro.
  9109. * UserInterface/DOMNodeStyles.js:
  9110. (WebInspector.DOMNodeStyles): Added maps and properties.
  9111. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Parse pseudoElementRulesPayload
  9112. and inheritedRulesPayload.
  9113. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Parse inlineStylePayload and
  9114. attributesStylePayload.
  9115. (WebInspector.DOMNodeStyles.prototype.get inheritedRules): Added.
  9116. (WebInspector.DOMNodeStyles.prototype.get inlineStyle): Added.
  9117. (WebInspector.DOMNodeStyles.prototype.get attributesStyle): Added.
  9118. (WebInspector.DOMNodeStyles.prototype.get pseudoElements): Added.
  9119. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Check inherited,
  9120. inline, attributes and pseudo elements.
  9121. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9122. Add WebInspector.CSSStyleDeclaration and WebInspector.CSSProperty and have DOMNodeStyles parse and create them.
  9123. <rdar://problem/7206272&12526319>
  9124. Reviewed by Joseph Pecoraro.
  9125. * UserInterface/CSSProperty.js: Added.
  9126. (WebInspector.CSSProperty):
  9127. (WebInspector.CSSProperty.prototype.get ownerStyle):
  9128. (WebInspector.CSSProperty.prototype.set ownerStyle):
  9129. (WebInspector.CSSProperty.prototype.get index):
  9130. (WebInspector.CSSProperty.prototype.update):
  9131. (WebInspector.CSSProperty.prototype.get text):
  9132. (WebInspector.CSSProperty.prototype.get name):
  9133. (WebInspector.CSSProperty.prototype.get value):
  9134. (WebInspector.CSSProperty.prototype.get important):
  9135. (WebInspector.CSSProperty.prototype.get priority):
  9136. (WebInspector.CSSProperty.prototype.get enabled):
  9137. (WebInspector.CSSProperty.prototype.get overridden):
  9138. (WebInspector.CSSProperty.prototype.get implicit):
  9139. (WebInspector.CSSProperty.prototype.get valid):
  9140. (WebInspector.CSSProperty.prototype.get startStyleSheetTextPosition):
  9141. (WebInspector.CSSProperty.prototype.get endStyleSheetTextPosition):
  9142. (WebInspector.CSSProperty.prototype.get relatedShorthandProperty):
  9143. (WebInspector.CSSProperty.prototype.set relatedShorthandProperty):
  9144. (WebInspector.CSSProperty.prototype.get relatedLonghandProperties):
  9145. (WebInspector.CSSProperty.prototype.addRelatedLonghandProperty):
  9146. (WebInspector.CSSProperty.prototype.clearRelatedLonghandProperties):
  9147. (WebInspector.CSSProperty.prototype.isActive):
  9148. * UserInterface/CSSStyleDeclaration.js: Added.
  9149. (WebInspector.CSSStyleDeclaration):
  9150. (WebInspector.CSSStyleDeclaration.prototype.get id):
  9151. (WebInspector.CSSStyleDeclaration.prototype.get ownerStyleSheet):
  9152. (WebInspector.CSSStyleDeclaration.prototype.get type):
  9153. (WebInspector.CSSStyleDeclaration.prototype.get inherited):
  9154. (WebInspector.CSSStyleDeclaration.prototype.update):
  9155. (WebInspector.CSSStyleDeclaration.prototype.get ownerRule):
  9156. (WebInspector.CSSStyleDeclaration.prototype.set ownerRule):
  9157. (WebInspector.CSSStyleDeclaration.prototype.get text):
  9158. (WebInspector.CSSStyleDeclaration.prototype.get properties):
  9159. (WebInspector.CSSStyleDeclaration.prototype.get startStyleSheetTextPosition):
  9160. (WebInspector.CSSStyleDeclaration.prototype.get endStyleSheetTextPosition):
  9161. (WebInspector.CSSStyleDeclaration.prototype.get nodeStyles):
  9162. * UserInterface/DOMNodeStyles.js:
  9163. (WebInspector.DOMNodeStyles):
  9164. (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload):
  9165. (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
  9166. (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
  9167. * UserInterface/Main.html:
  9168. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9169. Add WebInspector.CSSRule and WebInspector.CSSMedia and have DOMNodeStyles parse and create them.
  9170. <rdar://problem/7206272&12526319>
  9171. Reviewed by Joseph Pecoraro.
  9172. * UserInterface/CSSMedia.js: Added.
  9173. (WebInspector.CSSMedia):
  9174. (WebInspector.CSSMedia.prototype.get type):
  9175. (WebInspector.CSSMedia.prototype.get text):
  9176. (WebInspector.CSSMedia.prototype.get sourceCodeLocation):
  9177. * UserInterface/CSSRule.js: Added.
  9178. (WebInspector.CSSRule):
  9179. (WebInspector.CSSRule.prototype.get id):
  9180. (WebInspector.CSSRule.prototype.get ownerStyleSheet):
  9181. (WebInspector.CSSRule.prototype.update):
  9182. (WebInspector.CSSRule.prototype.get type):
  9183. (WebInspector.CSSRule.prototype.get sourceCodeLocation):
  9184. (WebInspector.CSSRule.prototype.get selectorText):
  9185. (WebInspector.CSSRule.prototype.get selectors):
  9186. (WebInspector.CSSRule.prototype.get matchedSelectorIndices):
  9187. (WebInspector.CSSRule.prototype.get style):
  9188. (WebInspector.CSSRule.prototype.get mediaList):
  9189. (WebInspector.CSSRule.prototype.get nodeStyles):
  9190. * UserInterface/DOMNodeStyles.js:
  9191. (WebInspector.DOMNodeStyles):
  9192. (WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
  9193. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
  9194. (WebInspector.DOMNodeStyles.prototype.refresh):
  9195. (WebInspector.DOMNodeStyles.prototype.get matchedRules):
  9196. (WebInspector.DOMNodeStyles.prototype._identifierToString):
  9197. (WebInspector.DOMNodeStyles.prototype._createSourceCodeLocation):
  9198. (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
  9199. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.markAsNeedsRefresh):
  9200. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.checkRules):
  9201. (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange):
  9202. * UserInterface/Main.html:
  9203. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9204. Add WebInspector.DOMNodeStyles, a new class to inspect and manage styles for a node.
  9205. <rdar://problem/7206272&12526319>
  9206. Reviewed by Joseph Pecoraro.
  9207. * UserInterface/CSSStyleManager.js:
  9208. (WebInspector.CSSStyleManager): Added _nodeStylesMap.
  9209. (WebInspector.CSSStyleManager.prototype.stylesForNode): Added.
  9210. (WebInspector.CSSStyleManager.prototype._mainResourceDidChange): Clear _nodeStylesMap.
  9211. * UserInterface/DOMNodeStyles.js: Added.
  9212. (WebInspector.DOMNodeStyles):
  9213. (WebInspector.DOMNodeStyles.prototype.get node):
  9214. (WebInspector.DOMNodeStyles.prototype.refreshIfNeeded):
  9215. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
  9216. (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
  9217. (WebInspector.DOMNodeStyles.prototype.refresh):
  9218. * UserInterface/Main.html: Added DOMNodeStyles.js.
  9219. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9220. Add WebInspector.CSSStyleSheet and start using it.
  9221. This replaces a collection of maps and content updating functions in CSSStyleManager
  9222. with a proper SourceCode subclass that manages its info, content and works with branches.
  9223. <rdar://problem/7206272&12526319>
  9224. Reviewed by Joseph Pecoraro.
  9225. * UserInterface/BoxModelDetailsSectionRow.js:
  9226. (WebInspector.BoxModelDetailsSectionRow): Listen for the change event on CSSStyleSheet.
  9227. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  9228. (WebInspector.CSSStyleDetailsSidebarPanel): Ditto.
  9229. * UserInterface/CSSStyleManager.js:
  9230. (WebInspector.CSSStyleManager): Added event listeners for resources.
  9231. (WebInspector.CSSStyleManager.prototype.styleSheetForIdentifier): Added.
  9232. (WebInspector.CSSStyleManager.prototype.styleSheetChanged): Call noteContentDidChange and
  9233. _updateResourceContent.
  9234. (WebInspector.CSSStyleManager.prototype._mainResourceDidChange): Added. Clear the maps when the
  9235. main frame navigates.
  9236. (WebInspector.CSSStyleManager.prototype._resourceAdded): Added. Call _clearStyleSheetsForResource.
  9237. (WebInspector.CSSStyleManager.prototype._resourceTypeDidChange): Ditto.
  9238. (WebInspector.CSSStyleManager.prototype._clearStyleSheetsForResource): Added.
  9239. (WebInspector.CSSStyleManager.prototype._frameURLMapKey): Added.
  9240. (WebInspector.CSSStyleManager.prototype._lookupStyleSheetForResource.syleSheetsFetched): Use
  9241. _styleSheetFrameURLMap instead of _styleSheetInfoMap.
  9242. (WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier): Removed.
  9243. (WebInspector.CSSStyleManager.prototype._lookupStyleSheet): Updated function names.
  9244. (WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets): Ditto.
  9245. (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
  9246. Use SourceCodeRevision to update the stylesheet content.
  9247. (WebInspector.CSSStyleManager.prototype._updateResourceContent): Added.
  9248. (WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent): Added.
  9249. (WebInspector.CSSStyleManager.prototype._updateResourceContent.styleSheetReady): Added.
  9250. (WebInspector.CSSStyleManager.prototype._updateResourceContent.applyStyleSheetChanges): Added.
  9251. * UserInterface/CSSStyleSheet.js: Added.
  9252. (WebInspector.CSSStyleSheet):
  9253. (WebInspector.CSSStyleSheet.resetUniqueDisplayNameNumbers):
  9254. (WebInspector.CSSStyleSheet.prototype.get id):
  9255. (WebInspector.CSSStyleSheet.prototype.get parentFrame):
  9256. (WebInspector.CSSStyleSheet.prototype.get url):
  9257. (WebInspector.CSSStyleSheet.prototype.get urlComponents):
  9258. (WebInspector.CSSStyleSheet.prototype.get displayName):
  9259. (WebInspector.CSSStyleSheet.prototype.updateInfo):
  9260. (WebInspector.CSSStyleSheet.prototype.get revisionForRequestedContent):
  9261. (WebInspector.CSSStyleSheet.prototype.handleCurrentRevisionContentChange.contentDidChange):
  9262. (WebInspector.CSSStyleSheet.prototype.handleCurrentRevisionContentChange):
  9263. (WebInspector.CSSStyleSheet.prototype.canRequestContentFromBackend):
  9264. (WebInspector.CSSStyleSheet.prototype.requestContentFromBackend):
  9265. (WebInspector.CSSStyleSheet.prototype.noteContentDidChange):
  9266. * UserInterface/Main.html: Added CSSStyleSheet.js.
  9267. * UserInterface/SourceCode.js:
  9268. (WebInspector.SourceCode.prototype.revisionContentDidChange): Call handleCurrentRevisionContentChange.
  9269. (WebInspector.SourceCode.prototype.handleCurrentRevisionContentChange): Added.
  9270. (WebInspector.SourceCode.prototype.get revisionForRequestedContent): Added.
  9271. (WebInspector.SourceCode.prototype.markContentAsStale): Added.
  9272. (WebInspector.SourceCode.prototype._processContent): Use revisionForRequestedContent.
  9273. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9274. Remove noteStyleSheetChanged and use the styleSheetChanged backend event.
  9275. The backend already tells us when a stylesheet changes, so we should use it
  9276. instead of trying to fire the event when we think it should.
  9277. <rdar://problem/7206272&12526319>
  9278. Reviewed by Joseph Pecoraro.
  9279. * UserInterface/CSSObserver.js:
  9280. (WebInspector.CSSObserver.prototype.styleSheetChanged): Call CSSStyleManager.
  9281. * UserInterface/CSSStyleManager.js:
  9282. (WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged): Moved to the top.
  9283. (WebInspector.CSSStyleManager.prototype.styleSheetChanged): Added.
  9284. (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged): Removed.
  9285. * UserInterface/OldCSSProperty.js:
  9286. (WebInspector.OldCSSProperty.prototype.callback): Removed call to noteStyleSheetChanged.
  9287. (WebInspector.OldCSSProperty.prototype.setText): Ditto.
  9288. (WebInspector.OldCSSProperty.prototype.setDisabled): Ditto.
  9289. * UserInterface/OldCSSStyleDeclaration.js:
  9290. (WebInspector.OldCSSStyleDeclaration.prototype.insertPropertyAt): Removed call to noteStyleSheetChanged.
  9291. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9292. Create mappings between shorthand and longhand property names.
  9293. <rdar://problem/7206272&12526319>
  9294. Reviewed by Joseph Pecoraro.
  9295. * UserInterface/CSSCompletions.js:
  9296. (WebInspector.CSSCompletions): Create the mappings.
  9297. (WebInspector.CSSCompletions.prototype.longhandsForShorthand): Added.
  9298. (WebInspector.CSSCompletions.prototype.shorthandsForLonghand): Added.
  9299. 2013-02-11 Timothy Hatcher <timothy@apple.com>
  9300. Rename current CSS model classes to have "Old" prefixes.
  9301. This is in preparation for a new and improved CSS model classes.
  9302. <rdar://problem/7206272&12526319>
  9303. Reviewed by Joseph Pecoraro.
  9304. * UserInterface/CSSStyleManager.js:
  9305. (WebInspector.CSSStyleManager.parseRuleArrayPayload):
  9306. (WebInspector.CSSStyleManager.prototype.):
  9307. (WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync):
  9308. (WebInspector.CSSStyleManager.prototype.getComputedStyleAsync):
  9309. (WebInspector.CSSStyleManager.prototype.getInlineStylesAsync):
  9310. * UserInterface/Main.html:
  9311. * UserInterface/OldCSSMedia.js: Renamed from WebInspector/UserInterface/CSSMedia.js.
  9312. * UserInterface/OldCSSProperty.js: Renamed from WebInspector/UserInterface/CSSProperty.js.
  9313. * UserInterface/OldCSSRule.js: Renamed from WebInspector/UserInterface/CSSRule.js.
  9314. * UserInterface/OldCSSStyleDeclaration.js: Renamed from WebInspector/UserInterface/CSSStyleDeclaration.js.
  9315. * UserInterface/StylePropertiesSection.js:
  9316. (WebInspector.StylePropertiesSection):
  9317. (WebInspector.StylePropertiesSection.prototype.onpopulate):
  9318. 2013-02-12 Antoine Quint <graouts@apple.com>
  9319. <rdar://problem/11053300> Profile recording button falsely indicates "recording" if started and then page navigates or refreshes
  9320. We now correctly keep the recording state across a page reload,
  9321. only resetting it, as well as removing any previous profile, when
  9322. we navigate away from the current page.
  9323. To do so, we alert the sidebar panel when a profile is interrupted
  9324. such that any old tree item for this profile is pruned and the
  9325. state of the profile recording button is updated to match that of
  9326. the profiler. Additionally, when the main frame is refreshed, we
  9327. attempt to resume profiling by looking for existing, though stale,
  9328. profile objects, and creating a new one as needed. In cases where
  9329. we navigate to a new frame, the "Cleared" event is dispatched and
  9330. the sidebar panel empties itself.
  9331. Finally, we ensure that the number set for the profile's title
  9332. reflects the current list of profiles of this type and that any
  9333. selected CSS profile's content view is hidden if the profile list
  9334. is cleared.
  9335. Note that profiles that were recorded prior to the current load
  9336. will show an empty content view unless they had also been selected
  9337. prior to a subsequent load. This is a known issue and will be fixed
  9338. with a followup task.
  9339. Reviewed by Timothy Hatcher.
  9340. * UserInterface/InstrumentSidebarPanel.js:
  9341. (WebInspector.InstrumentSidebarPanel):
  9342. (WebInspector.InstrumentSidebarPanel.prototype._profilingInterrupted):
  9343. (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
  9344. (WebInspector.InstrumentSidebarPanel.prototype._profilesCleared):
  9345. * UserInterface/ProfileManager.js:
  9346. (WebInspector.ProfileManager.prototype.initialize):
  9347. (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
  9348. (WebInspector.ProfileManager.prototype._mainResourceDidChange):
  9349. (WebInspector.ProfileManager.prototype._checkForInterruptions):
  9350. (WebInspector.ProfileManager.prototype._attemptToResumeProfiling):
  9351. 2013-02-12 Antoine Quint <graouts@apple.com>
  9352. <rdar://problem/13171934> Control+click on toolbar doesn't bring up toolbar context menu items
  9353. Don't do any custom handling of mousedown events on the toolbar if
  9354. the control key was pressed.
  9355. Reviewed by Timothy Hatcher.
  9356. * UserInterface/Main.js:
  9357. (WebInspector._toolbarMouseDown):
  9358. 2013-02-11 Antoine Quint <graouts@apple.com>
  9359. <rdar://problem/10854712> REGRESSION (Safari 6): It's hard to see at a glance if a page has any JS/HTML errors/warnings
  9360. We add a new DashboardManager singleton which taps into events exposed
  9361. by other managers and classes in order to monitor resources, timeline
  9362. records and console messages and display the respective counts in a
  9363. DashboardView. The DashboardView knows how to lay itself out in the
  9364. various toolbar modes and lets the user jump to various parts of the
  9365. inspector upon clicking its outlets, while providing useful information
  9366. as the user hovers over the item with the mouse.
  9367. Reviewed by Timothy Hatcher and Joseph Pecoraro.
  9368. * Localizations/en.lproj/localizedStrings.js:
  9369. * UserInterface/DashboardManager.js: Added.
  9370. (WebInspector.DashboardManager):
  9371. (WebInspector.DashboardManager.prototype._resourceWasAdded):
  9372. (WebInspector.DashboardManager.prototype._resourcesWereCleared):
  9373. (WebInspector.DashboardManager.prototype._frameWasAdded):
  9374. (WebInspector.DashboardManager.prototype._resourceSizeDidChange):
  9375. (WebInspector.DashboardManager.prototype._timelineRecordingStarted):
  9376. (WebInspector.DashboardManager.prototype._updateTime):
  9377. (WebInspector.DashboardManager.prototype._consoleMessageAdded):
  9378. (WebInspector.DashboardManager.prototype._consoleMessageWasRepeated):
  9379. (WebInspector.DashboardManager.prototype._incrementConsoleMessageType):
  9380. (WebInspector.DashboardManager.prototype._consoleWasCleared):
  9381. * UserInterface/DashboardView.css: Added.
  9382. (.dashboard):
  9383. (.dashboard > .item):
  9384. (.dashboard > .item > *):
  9385. (.dashboard > .item > img):
  9386. (.dashboard > .item.enabled > img):
  9387. (.dashboard > .item.enabled:hover > img):
  9388. (.dashboard > .item > div):
  9389. (.dashboard > .item.issues > div > div):
  9390. (.dashboard > .item.enabled > div):
  9391. (.dashboard > .item.enabled:hover > div):
  9392. (.dashboard > .resources > img):
  9393. (.dashboard > .time > img):
  9394. (.dashboard > .logs > img):
  9395. (.dashboard > .memory > img):
  9396. (.dashboard > .errors > img):
  9397. (.dashboard > .errors.enabled > img):
  9398. (.dashboard > .errors.enabled:hover > img):
  9399. (.dashboard > .errors.enabled > div):
  9400. (.dashboard > .errors.enabled:hover > div):
  9401. (.dashboard > .issues > img):
  9402. (.dashboard > .issues.enabled > img):
  9403. (.dashboard > .issues.enabled:hover > img):
  9404. (.dashboard > .issues.enabled > div):
  9405. (.dashboard > .issues.enabled:hover > div):
  9406. (.toolbar.normal-size.icon-and-label-horizontal > .item-section > .dashboard):
  9407. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard):
  9408. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .item):
  9409. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
  9410. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .time):
  9411. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
  9412. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
  9413. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
  9414. (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
  9415. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard):
  9416. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .item):
  9417. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
  9418. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .time):
  9419. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
  9420. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
  9421. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
  9422. (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
  9423. * UserInterface/DashboardView.js: Added.
  9424. (WebInspector.DashboardView):
  9425. (WebInspector.DashboardView.prototype.get logs):
  9426. (WebInspector.DashboardView.prototype.set logs):
  9427. (WebInspector.DashboardView.prototype.get issues):
  9428. (WebInspector.DashboardView.prototype.set issues):
  9429. (WebInspector.DashboardView.prototype.get errors):
  9430. (WebInspector.DashboardView.prototype.set errors):
  9431. (WebInspector.DashboardView.prototype.set memory):
  9432. (WebInspector.DashboardView.prototype.set time):
  9433. (WebInspector.DashboardView.prototype.get resourcesCount):
  9434. (WebInspector.DashboardView.prototype.set resourcesCount):
  9435. (WebInspector.DashboardView.prototype.get resourcesSize):
  9436. (WebInspector.DashboardView.prototype.set resourcesSize):
  9437. (WebInspector.DashboardView.prototype._appendElementForNamedItem):
  9438. (WebInspector.DashboardView.prototype._itemWasClicked):
  9439. (WebInspector.DashboardView.prototype._resourcesWasClicked):
  9440. (WebInspector.DashboardView.prototype._timeWasClicked):
  9441. (WebInspector.DashboardView.prototype._consoleItemWasClicked):
  9442. (WebInspector.DashboardView.prototype._updateResourcesOutlet):
  9443. (WebInspector.DashboardView.prototype._setItemEnabled):
  9444. * UserInterface/Images/Errors.svg: Added.
  9445. * UserInterface/Images/ErrorsEnabled.svg: Added.
  9446. * UserInterface/Images/Issues.svg: Added.
  9447. * UserInterface/Images/IssuesEnabled.svg: Added.
  9448. * UserInterface/Images/Logs.svg: Added.
  9449. * UserInterface/Images/Memory.svg: Added.
  9450. * UserInterface/Images/Resources.svg: Added.
  9451. * UserInterface/Images/Time.svg: Added.
  9452. * UserInterface/Main.html:
  9453. * UserInterface/Main.js:
  9454. (WebInspector.contentLoaded):
  9455. * UserInterface/Resource.js:
  9456. (WebInspector.Resource.prototype.increaseSize):
  9457. 2013-02-08 Joseph Pecoraro <pecoraro@apple.com>
  9458. <rdar://problem/13184288> REGRESSION: Undo / Redo no longer works in QuickConsole
  9459. Reviewed by Timothy Hatcher.
  9460. * UserInterface/KeyboardShortcut.js:
  9461. (WebInspector.KeyboardShortcut):
  9462. (WebInspector.KeyboardShortcut._handleKeyDown):
  9463. (WebInspector.KeyboardShortcut.prototype.get implicitlyPreventsDefault):
  9464. (WebInspector.KeyboardShortcut.prototype.set implicitlyPreventsDefault):
  9465. By default keyboard shortcuts prevent default. Allow the KeyboardShortcut
  9466. to opt out of implicitly preventing default. That way a keyboard shortcut
  9467. can be added that does not prevent default.
  9468. * UserInterface/Main.js:
  9469. (WebInspector.contentLoaded):
  9470. The undo and redo keyboard shortcuts will not implicitly prevent default.
  9471. (WebInspector._undoKeyboardShortcut):
  9472. (WebInspector._redoKeyboardShortcut):
  9473. Do not trigger WebInspector.undo or redo if the key event triggered
  9474. while in a text field. Instead let the event bubble to get default
  9475. text editing behavior.
  9476. 2013-02-08 Timothy Hatcher <timothy@apple.com>
  9477. Only record the load event time for the main frame.
  9478. Reviewed by Antoine Quint.
  9479. * UserInterface/TimelineManager.js:
  9480. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Check the frameId against the
  9481. mainFrame's id before setting _loadEventTime.
  9482. 2013-02-07 Timothy Hatcher <timothy@apple.com>
  9483. Make CSS autocompletion work again when editing a property.
  9484. <rdar://problem/13058573> REGRESSION: CSS autocompletion broken after OpenSource r123612
  9485. Reviewed by Joseph Pecoraro.
  9486. * UserInterface/CSSCompletions.js:
  9487. (WebInspector.CSSCompletions): Support the change in format of values.
  9488. 2013-02-07 Antoine Quint <graouts@apple.com>
  9489. <rdar://problem/13162142> Contextual menu items on the toolbar are missing
  9490. Pass the event when creating a ContextMenu object instead on calling show().
  9491. Reviewed by Joseph Pecoraro.
  9492. * UserInterface/LogContentView.js:
  9493. (WebInspector.LogContentView.prototype._handleContextMenuEvent):
  9494. * UserInterface/Toolbar.js:
  9495. (WebInspector.Toolbar.prototype._handleContextMenuEvent):
  9496. 2013-02-07 Joseph Pecoraro <pecoraro@apple.com>
  9497. Merge OpenSource r116305 to fix TextPrompt event listener and style leaks.
  9498. Reviewed by Timothy Hatcher.
  9499. * UserInterface/TextPrompt.js:
  9500. (WebInspector.TextPrompt.prototype._attachInternal):
  9501. (WebInspector.TextPrompt.prototype.detach):
  9502. 2013-02-05 Antoine Quint <graouts@apple.com>
  9503. <rdar://problem/11007445> PARITY (WebKit Web Inspector): Support Undo/Redo for DOM changes
  9504. Wire up Cmd+Z and Cmd+Shift+Z keyboard shortcuts to call DOMAgent's
  9505. undo() and redo() methods while marking DOM and CSS editing tasks
  9506. as undoable via the DOMAgent's markUndoableState() method.
  9507. Reviewed by Timothy Hatcher.
  9508. * UserInterface/CSSProperty.js:
  9509. (WebInspector.CSSProperty.prototype.callback):
  9510. (WebInspector.CSSProperty.prototype.setText):
  9511. (WebInspector.CSSProperty.prototype.setDisabled):
  9512. * UserInterface/CSSStyleManager.js:
  9513. (WebInspector.CSSStyleManager.prototype.):
  9514. (WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier):
  9515. (WebInspector.CSSStyleManager.prototype.callback):
  9516. (WebInspector.CSSStyleManager.prototype.setRuleSelector):
  9517. (WebInspector.CSSStyleManager.prototype.addRule):
  9518. * UserInterface/DOMNode.js:
  9519. (WebInspector.DOMNode.prototype.setNodeName):
  9520. (WebInspector.DOMNode.prototype.setNodeValue):
  9521. (WebInspector.DOMNode.prototype.setAttribute):
  9522. (WebInspector.DOMNode.prototype.setAttributeValue):
  9523. (WebInspector.DOMNode.prototype.):
  9524. (WebInspector.DOMNode.prototype.removeAttribute):
  9525. (WebInspector.DOMNode.prototype.setOuterHTML):
  9526. (WebInspector.DOMNode.prototype.removeNode):
  9527. (WebInspector.DOMNode.prototype.moveTo):
  9528. (WebInspector.DOMNode.prototype.setPseudoClassEnabled):
  9529. * UserInterface/Main.js:
  9530. (WebInspector.contentLoaded):
  9531. (WebInspector.undo):
  9532. (WebInspector.redo):
  9533. 2013-02-05 Antoine Quint <graouts@apple.com>
  9534. <rdar://problem/11133526> PARITY (WebKit Web Inspector): Ability to force pseudo state for an element is missing
  9535. In order to show submenu items in contextual menus in the Web Inspector, we update ContextMenu.js
  9536. to be the latest from OpenSource and update the way we use this API in our code so that the event
  9537. is provided at construction time rather than when calling the .show() method.
  9538. We also have to update the RWI-specific front-end host in order to recognize the new "subMenu"
  9539. contextual menu item type and handle its items to show as a submenu item in the NSMenu we
  9540. create.
  9541. Then, we allow the possibility to enforce certain pseudo-classes on a DOMNode, which triggers
  9542. a new event that the style and appearance panels listen to in order to refresh their display
  9543. and account for any style changes that may result from a pseudo-class being forced.
  9544. Finally, we add new menu items to the contextual menu of a DOM node in the inspector's DOM
  9545. tree to allow to "Force CSS Pseudo-Classes".
  9546. Reviewed by Timothy Hatcher.
  9547. * Localizations/en.lproj/localizedStrings.js:
  9548. * UserInterface/BoxModelDetailsSectionRow.js:
  9549. (WebInspector.BoxModelDetailsSectionRow):
  9550. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  9551. (WebInspector.CSSStyleDetailsSidebarPanel):
  9552. * UserInterface/ContextMenu.js:
  9553. (WebInspector.ContextMenuItem):
  9554. (WebInspector.ContextMenuItem.prototype.id):
  9555. (WebInspector.ContextMenuItem.prototype.type):
  9556. (WebInspector.ContextMenuItem.prototype.isEnabled):
  9557. (WebInspector.ContextMenuItem.prototype.setEnabled):
  9558. (WebInspector.ContextMenuItem.prototype._buildDescriptor):
  9559. (WebInspector.ContextSubMenuItem):
  9560. (WebInspector.ContextSubMenuItem.prototype.appendItem):
  9561. (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
  9562. (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
  9563. (WebInspector.ContextSubMenuItem.prototype.appendSeparator):
  9564. (WebInspector.ContextSubMenuItem.prototype._pushItem):
  9565. (WebInspector.ContextSubMenuItem.prototype.isEmpty):
  9566. (WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
  9567. (WebInspector.ContextMenu):
  9568. (WebInspector.ContextMenu.prototype.nextId):
  9569. (WebInspector.ContextMenu.prototype.show):
  9570. (WebInspector.ContextMenu.prototype.showSoftMenu):
  9571. (WebInspector.ContextMenu.prototype._setHandler):
  9572. (WebInspector.ContextMenu.prototype._buildDescriptor):
  9573. (WebInspector.ContextMenu.prototype._itemSelected):
  9574. (WebInspector.ContextMenu.prototype.appendApplicableItems):
  9575. (WebInspector.ContextMenu.Provider):
  9576. (WebInspector.ContextMenu.Provider.prototype.appendApplicableItems):
  9577. (WebInspector.ContextMenu.registerProvider):
  9578. * UserInterface/DOMNode.js:
  9579. (WebInspector.DOMNode):
  9580. (WebInspector.DOMNode.prototype.isXMLNode):
  9581. (WebInspector.DOMNode.prototype.get enabledPseudoClasses):
  9582. (WebInspector.DOMNode.prototype.setPseudoClassEnabled):
  9583. * UserInterface/DOMTreeElement.js:
  9584. (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
  9585. (WebInspector.DOMTreeElement.prototype._populateForcedPseudoStateItems.string_appeared_here.forEach):
  9586. (WebInspector.DOMTreeElement.prototype._populateForcedPseudoStateItems):
  9587. * UserInterface/DOMTreeOutline.js:
  9588. (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
  9589. * UserInterface/DataGrid.js:
  9590. (WebInspector.DataGrid.prototype._contextMenuInDataTable):
  9591. * UserInterface/ObjectPropertiesSection.js:
  9592. (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
  9593. (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired):
  9594. * UserInterface/Utilities.js:
  9595. 2013-02-04 Jessie Berlin <jberlin@apple.com>
  9596. Ran update-safari-localizable-strings.
  9597. * Localizations/en.lproj/localizedStrings.js:
  9598. 2013-02-04 Antoine Quint <graouts@apple.com>
  9599. <rdar://problem/13042270> Debugger should be smarter about hovered tokens
  9600. When notifying that we're hovering a new token, keep going through
  9601. previous tokens on the same line to find other expressions and .
  9602. so that a full property chain can be resolved. The result is now
  9603. stored in a new "fullExpression" property on the "hoveredToken" object.
  9604. Additionally, the bounds of the token are now those of the full expression
  9605. such that highlight is correct and the highlight-related APIs have been
  9606. renamed to work within the context of an expression and not a token.
  9607. While this patch doesn't handle expressions across several lines, it gets
  9608. us to parity with what the OpenSource Web Inspector knows how to handle.
  9609. Reviewed by Joseph Pecoraro.
  9610. * UserInterface/SourceCodeTextEditor.js:
  9611. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
  9612. (WebInspector.SourceCodeTextEditor.prototype._showPopover):
  9613. (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
  9614. * UserInterface/TextEditor.js:
  9615. (WebInspector.TextEditor.prototype.highlightHoveredExpression):
  9616. (WebInspector.TextEditor.prototype.removeHighlightOnHoveredExpression):
  9617. (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
  9618. (WebInspector.TextEditor.prototype._checkHoveredToken):
  9619. 2013-02-01 Joseph Pecoraro <pecoraro@apple.com>
  9620. <rdar://problem/13137010> Console toggle split / full-height button is showing the wrong direction
  9621. Reviewed by Timothy Hatcher.
  9622. * UserInterface/LogContentView.js:
  9623. (WebInspector.LogContentView.prototype.shown):
  9624. (WebInspector.LogContentView.prototype._toggleSplit):
  9625. Always update the toggle button whenever the log content view is shown.
  9626. * UserInterface/Main.js:
  9627. (WebInspector.toggleSplitConsole):
  9628. This no longer needs to return true or false, so clean it up.
  9629. 2013-02-01 Joseph Pecoraro <pecoraro@apple.com>
  9630. <rdar://problem/13137050> Clicking Console button in main toolbar should always toggle the console, even if no back history
  9631. Reviewed by Timothy Hatcher.
  9632. * UserInterface/Main.js:
  9633. (WebInspector.toggleConsoleView):
  9634. When toggling and there is no history, open the source code for the main resource.
  9635. 2013-02-01 Timothy Hatcher <timothy@apple.com>
  9636. Add the ability to resize the split console.
  9637. Part of: <rdar://problem/13118771> Unify the quick console and full console
  9638. Reviewed by Joseph Pecoraro.
  9639. * UserInterface/Main.css:
  9640. (#split-content-browser > .navigation-bar): Use row-resize cursor.
  9641. (#split-content-browser > .navigation-bar .item:not(.flexible-space)): Use default cursor.
  9642. * UserInterface/Main.js:
  9643. (WebInspector.contentLoaded): Added height setting and event listener. Call _updateSplitConsoleHeight.
  9644. (WebInspector._updateSplitConsoleHeight): Added.
  9645. (WebInspector._consoleResizerMouseDown): Added.
  9646. (WebInspector._consoleResizerMouseDown.dockedResizerDrag): Added.
  9647. (WebInspector._consoleResizerMouseDown.dockedResizerDragEnd): Added.
  9648. 2013-01-30 Timothy Hatcher <timothy@apple.com>
  9649. Gut the old Quick Console except the prompt and make the Console view use the Quick Console prompt.
  9650. Part of: <rdar://problem/13118771> Unify the quick console and full console
  9651. Reviewed by Joseph Pecoraro.
  9652. * UserInterface/LogContentView.js:
  9653. (WebInspector.LogContentView): Use the quick console prompt. Don't append a <br> now that the prompt
  9654. isn't in the view.
  9655. (WebInspector.LogContentView.prototype.didAppendConsoleMessage): Added.
  9656. (WebInspector.LogContentView.prototype.promptDidChangeHeight): Added.
  9657. * UserInterface/QuickConsole.css: Removed unused rules.
  9658. * UserInterface/QuickConsole.js:
  9659. (WebInspector.QuickConsole):
  9660. (WebInspector.QuickConsole.prototype.updateLayout): Just call _updateSize.
  9661. (WebInspector.QuickConsole.prototype._updateSize): Added.
  9662. (WebInspector.QuickConsole.prototype._toggleOrFocus): Call WebInspector.toggleConsoleView.
  9663. 2013-01-30 Timothy Hatcher <timothy@apple.com>
  9664. Add the ability to show a second content browser at the bottom for the console view.
  9665. Part of: <rdar://problem/13118771> Unify the quick console and full console
  9666. Reviewed by Joseph Pecoraro.
  9667. * Localizations/en.lproj/localizedStrings.js: Updated.
  9668. * UserInterface/ContentBrowser.js:
  9669. (WebInspector.ContentBrowser.prototype.get element): Added.
  9670. * UserInterface/Images/SplitToggleDown.pdf: Added.
  9671. * UserInterface/Images/SplitToggleUp.pdf: Added.
  9672. * UserInterface/InspectorFrontendAPI.js:
  9673. (InspectorFrontendAPI.showConsole): Use toggleConsoleView instead.
  9674. * UserInterface/LogContentView.js:
  9675. (WebInspector.LogContentView): Create a navigation item for toggling the split.
  9676. (WebInspector.LogContentView.prototype.get navigationItems): Include the new item.
  9677. (WebInspector.LogContentView.prototype._toggleSplit): Added.
  9678. * UserInterface/Main.css:
  9679. (#split-content-browser): Added.
  9680. * UserInterface/Main.html: Added #split-content-browser element.
  9681. * UserInterface/Main.js:
  9682. (WebInspector.contentLoaded): Create settings and the split content browser.
  9683. (WebInspector.prefersUsingSplitConsole): Added.
  9684. (WebInspector.isShowingSplitConsole): Added.
  9685. (WebInspector.toggleSplitConsole): Added.
  9686. (WebInspector.showSplitConsole): Added.
  9687. (WebInspector.hideSplitConsole): Added.
  9688. (WebInspector.showFullHeightConsole): Added.
  9689. (WebInspector.isShowingConsoleView): Added.
  9690. (WebInspector.showConsoleView): Call showSplitConsole or showFullHeightConsole.
  9691. (WebInspector.toggleConsoleView): Added.
  9692. (WebInspector._contentBrowserCurrentContentViewDidChange): Added. Update the console
  9693. button activated state.
  9694. 2013-02-01 Joseph Pecoraro <pecoraro@apple.com>
  9695. <rdar://problem/12808694> Enter and Shift+Enter should search forward and backwards
  9696. Reviewed by Antoine Quint.
  9697. * UserInterface/FindBanner.js:
  9698. (WebInspector.FindBanner):
  9699. Initialize new member variables.
  9700. (WebInspector.FindBanner.prototype._inputFieldKeyDown):
  9701. (WebInspector.FindBanner.prototype._inputFieldKeyUp):
  9702. Track when the shift key is down inside the search field. Also track
  9703. when the enter key is pressed to trigger the input's "search" event.
  9704. We only want to respect shift when the user hits enter to search.
  9705. (WebInspector.FindBanner.prototype._inputFieldSearch):
  9706. If the search value stayed the same, and there are search results,
  9707. and the user hit enter, then search forwards or backwards.
  9708. 2013-01-31 Antoine Quint <graouts@apple.com>
  9709. Followup fixes after <rdar://problem/11279186> REGRESSION (Safari 6): Timeline
  9710. view missing type filters. Addresses the good feedback from JoePeck.
  9711. Reviewed by Timothy Hatcher.
  9712. * UserInterface/TimelineDataGrid.js:
  9713. (WebInspector.TimelineDataGrid):
  9714. (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
  9715. * UserInterface/TimelinesContentView.js:
  9716. 2013-01-31 Antoine Quint <graouts@apple.com>
  9717. <rdar://problem/13085826> Add stubs for new Page protocol events (frameStartedLoading, etc.)
  9718. WebCore added a bunch of Page events in http://trac.webkit.org/changeset/140649. We're
  9719. registering them and providing stub handlers until we actually do something with them.
  9720. This removes some annoying errors in the Inception console output.
  9721. Reviewed by Timothy Hatcher.
  9722. * UserInterface/InspectorBackendCommands.js:
  9723. * UserInterface/PageObserver.js:
  9724. (WebInspector.PageObserver.prototype.frameDetached):
  9725. (WebInspector.PageObserver.prototype.frameStartedLoading):
  9726. (WebInspector.PageObserver.prototype.frameStoppedLoading):
  9727. (WebInspector.PageObserver.prototype.frameScheduledNavigation):
  9728. (WebInspector.PageObserver.prototype.frameClearedScheduledNavigation):
  9729. 2013-01-31 Antoine Quint <graouts@apple.com>
  9730. Followup fix to <rdar://problem/10981607> REGRESSION (Safari 6): CSS and JavaScript profiles need a visible way to toggle between absolute times and percentages.
  9731. * UserInterface/ProfileView.js:
  9732. (WebInspector.ProfileView):
  9733. 2013-01-30 Antoine Quint <graouts@apple.com>
  9734. <rdar://problem/13115633> JavaScript profiles percentage values don't have the "%" symbol in them
  9735. Ensure we add the "%" symbol to values reported in the JS profile data
  9736. grid when percents are used.
  9737. Reviewed by Timothy Hatcher.
  9738. * Localizations/en.lproj/localizedStrings.js:
  9739. * UserInterface/ProfileDataGridTree.js:
  9740. (WebInspector.ProfileDataGridNode.prototype.get data):
  9741. 2013-01-30 Antoine Quint <graouts@apple.com>
  9742. <rdar://problem/13101516> REGRESSION: JavaScript profile recorded from Web Inspector UI never finishes
  9743. Two changes made in WebCore broke our support for JavaScript profiling. The first introduced by
  9744. http://trac.webkit.org/changeset/126580 was that ProfilerAgent.getProfileHeaders() needed to be
  9745. called for any addProfileHeader event to be dispatched to the front-end. The second issue was
  9746. introduced by http://trac.webkit.org/changeset/139998 which changed the backend API in a non-
  9747. backward-compatible way so that ProfilerAgent.getProfile() was split in two methods:
  9748. getCPUProfile() and getHeapSnapshot().
  9749. This patch simply adds a call to ProfilerAgent.getProfileHeaders() as soon as the ProfilerAgent
  9750. is enabled and also changes the backend we register and call to get the profile to use the
  9751. most current WebCore API.
  9752. Reviewed by Timothy Hatcher.
  9753. * UserInterface/InspectorBackendCommands.js:
  9754. * UserInterface/JavaScriptProfileView.js:
  9755. (WebInspector.JavaScriptProfileView):
  9756. * UserInterface/ProfileManager.js:
  9757. (WebInspector.ProfileManager):
  9758. 2013-01-29 Timothy Hatcher <timothy@apple.com>
  9759. Stop showing "undefined" and empty scope bar items in the Timeline view.
  9760. <rdar://problem/13109468>
  9761. Reviewed by Joseph Pecoraro.
  9762. * UserInterface/TimelinesContentView.js:
  9763. (WebInspector.TimelinesContentView.prototype._makeColumnScopeBar): Check the type of the value,
  9764. not the type of the key.
  9765. 2013-01-29 Antoine Quint <graouts@apple.com>
  9766. <rdar://problem/11279186> REGRESSION (Safari 6): Timeline view missing type filters
  9767. We now add a ScopeBar above the data grid shown for the currently selected record
  9768. type as the data grid is hovered. The filtered type is set by adding a .scopeBar
  9769. property on the column descriptor and the filtering code is ready to be able to
  9770. deal with multiple filterable types per data grid if/when we decide to do this.
  9771. However, the UI code only knows how to handle one filterable column per data grid
  9772. as it stands. The scope bar showing above the data grid fits snuggly where the timeline
  9773. would usually show and has a 10px invisible padding at the top to ensure the user
  9774. doesn't mouse out of it too easily.
  9775. The hot path _updatePendingRecordsWithNewBounds was updated to filter the pending
  9776. records taking into account the current filters, and a new _refreshAllRecordsForCurrentDataGrid
  9777. method was added to deal with changes of filters, which takes a less optimized and
  9778. more brutal path.
  9779. Reviewed by Timothy Hatcher.
  9780. * UserInterface/ScopeBar.js:
  9781. (WebInspector.ScopeBar.prototype.get defaultItem):
  9782. * UserInterface/TimelineDataGrid.js:
  9783. (WebInspector.TimelineDataGrid):
  9784. (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
  9785. * UserInterface/TimelinesContentView.css:
  9786. (.content-view.timelines > .data-grid > .navigation-bar-container):
  9787. (.content-view.timelines > .data-grid:hover > .navigation-bar-container):
  9788. (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
  9789. * UserInterface/TimelinesContentView.js:
  9790. (WebInspector.TimelinesContentView):
  9791. (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
  9792. (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh):
  9793. (WebInspector.TimelinesContentView.prototype._makeColumnScopeBar):
  9794. (WebInspector.TimelinesContentView.prototype._dataGridFiltersDidChange):
  9795. (WebInspector.TimelinesContentView.prototype._refreshAllRecordsForCurrentDataGrid):
  9796. (WebInspector.TimelinesContentView.prototype.filterableValueForRecordAndIdentifier):
  9797. (WebInspector.TimelinesContentView.prototype._filterRecordsWithType):
  9798. 2013-01-29 Antoine Quint <graouts@apple.com>
  9799. <rdar://problem/10981607> REGRESSION (Safari 6): CSS and JavaScript profiles need a visible way to toggle between absolute times and percentages
  9800. Refactoring the CSSSelectorProfileView and JavaScriptProfileView classes to both
  9801. inherit from the new ProfileView class which provide a navigation bar item to
  9802. toggle how times are displayed (absolute times vs. a percentage) via a % icon.
  9803. This was also the chance to simplify the settings used in the JavaScriptProfileView
  9804. which used three different settings for the self, total and average columns. Now these
  9805. columns shared the same setting.
  9806. Note that part of this patch is speculative due to <rdar://problem/13101516> REGRESSION:
  9807. Profile recorded from Web Inspector UI never finishes.
  9808. Reviewed by Timothy Hatcher.
  9809. * Localizations/en.lproj/localizedStrings.js:
  9810. * UserInterface/CSSSelectorProfileView.js:
  9811. (WebInspector.CSSSelectorProfileView):
  9812. (WebInspector.CSSSelectorProfileView.prototype.toggleTimeDisplay):
  9813. (WebInspector.CSSSelectorProfileView.prototype._sortProfile):
  9814. * UserInterface/Images/Percent.pdf: Added.
  9815. * UserInterface/JavaScriptProfileView.js:
  9816. (WebInspector.JavaScriptProfileView.profileCallback):
  9817. (WebInspector.JavaScriptProfileView):
  9818. (WebInspector.JavaScriptProfileView.prototype.toggleTimeDisplay):
  9819. * UserInterface/Main.html:
  9820. * UserInterface/ProfileDataGridTree.js:
  9821. (WebInspector.ProfileDataGridNode.prototype.get data):
  9822. * UserInterface/ProfileView.js: Added.
  9823. (WebInspector.ProfileView):
  9824. (WebInspector.ProfileView.prototype.get navigationItems):
  9825. (WebInspector.ProfileView.prototype.get profile):
  9826. (WebInspector.ProfileView.prototype.set profile):
  9827. (WebInspector.ProfileView.prototype.toggleTimeDisplay):
  9828. 2013-01-26 Timothy Hatcher <timothy@apple.com>
  9829. Update CodeMirror to from 3.0 to 3.0.2.
  9830. https://github.com/marijnh/CodeMirror/compare/v3.0...v3.02
  9831. Reviewed by Ricky Mondello.
  9832. * UserInterface/External/CodeMirror/LICENSE: Updated.
  9833. * UserInterface/External/CodeMirror/codemirror.css: Updated.
  9834. * UserInterface/External/CodeMirror/codemirror.js: Updated.
  9835. * UserInterface/External/CodeMirror/css.js: Updated.
  9836. * UserInterface/External/CodeMirror/javascript.js: Updated.
  9837. * UserInterface/External/CodeMirror/runmode.js: Updated.
  9838. * UserInterface/External/CodeMirror/searchcursor.js: Updated.
  9839. * UserInterface/External/CodeMirror/xml.js: Updated.
  9840. * UserInterface/TextEditor.css:
  9841. (.text-editor > .CodeMirror pre): Dropped the ":not(.CodeMirror-cursor)".
  9842. Since CodeMirror-cursor is now a div.
  9843. 2013-01-25 Timothy Hatcher <timothy@apple.com>
  9844. Account for a difference in how frames load about:blank.
  9845. There was a change in how about:blank frame loads are reported over the Inspector
  9846. protocol that was causing a far reaching exception to break parts of the Inspector.
  9847. <rdar://problem/13067806> REGRESSION: Timeline fail to record anything in some cases
  9848. Reviewed by Antoine Quint.
  9849. * UserInterface/FrameResourceManager.js:
  9850. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): If the frame isn't known, then
  9851. create a new resource which will make a new frame. Mark is as loaded at the end too since we don't
  9852. expect any more events about the load finishing for these frames.
  9853. 2013-01-24 Timothy Hatcher <timothy@apple.com>
  9854. Reduce the number layouts and style recalculations when switching views or updating
  9855. the navigation bar when the selection changes.
  9856. <rdar://problem/12975185> 30 second hang inspecting scrolling perf results page
  9857. <rdar://problem/11349044> Changing element selection in the Web Inspector hangs
  9858. for ~2s because JavaScript forces 27 layouts
  9859. Reviewed by Joseph Pecoraro.
  9860. * UserInterface/HierarchicalPathNavigationItem.js:
  9861. (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Use updateLayoutSoon.
  9862. * UserInterface/NavigationBar.js:
  9863. (WebInspector.NavigationBar.prototype.insertNavigationItem): Use updateLayoutSoon. Remove explicit
  9864. call to _updateStyle and set _needsStyleUpdated instead.
  9865. (WebInspector.NavigationBar.prototype.removeNavigationItem): Ditto.
  9866. (WebInspector.NavigationBar.prototype.updateLayoutSoon): Added.
  9867. (WebInspector.NavigationBar.prototype.updateLayoutSoon.update): Added.
  9868. (WebInspector.NavigationBar.prototype.updateLayout): Clear _needsLayout. Call _updateStyle if
  9869. _needsStyleUpdated is true.
  9870. (WebInspector.NavigationBar.prototype._updateStyle): Clear _needsStyleUpdated.
  9871. * UserInterface/NavigationItem.js:
  9872. (WebInspector.NavigationItem.prototype.set hidden): Use updateLayoutSoon.
  9873. 2013-01-24 Timothy Hatcher <timothy@apple.com>
  9874. Show the resource and line info in the Initiator column, next to the function name.
  9875. This helps further identify which file and line the event occurred on without needing
  9876. to hover for the tooltip.
  9877. Reviewed by Joseph Pecoraro.
  9878. * UserInterface/LayoutTimelineDataGridNode.js:
  9879. (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent): Add a subtitle
  9880. element so the resource name is visible.
  9881. * UserInterface/TimelinesContentView.css:
  9882. (.content-view.timelines > .data-grid td .subtitle::before): Added. Show a emdash
  9883. before the subtitle.
  9884. 2013-01-23 Timothy Hatcher <timothy@apple.com>
  9885. Make editing CSS resources work and update the page live.
  9886. <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
  9887. Reviewed by Joseph Pecoraro.
  9888. * UserInterface/CSSStyleManager.js:
  9889. (WebInspector.CSSStyleManager):
  9890. (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.gotStyleSheetText): Implement the FIXME.
  9891. (WebInspector.CSSStyleManager.prototype._lookupStyleSheetIdentifiersForResource): Added.
  9892. (WebInspector.CSSStyleManager.prototype._lookupStyleSheetIdentifiers): Added.
  9893. (WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier): Added.
  9894. (WebInspector.CSSStyleManager.prototype._resourceContentDidChange): Added.
  9895. (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges): Added.
  9896. (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetIdentifiersFound): Added.
  9897. * UserInterface/SourceCode.js:
  9898. (WebInspector.SourceCode.prototype.set currentRevision): Fire ContentDidChange event.
  9899. (WebInspector.SourceCode.prototype.revisionContentDidChange): Ditto.
  9900. (WebInspector.SourceCode.prototype._processContent): Ignore content change events for original content.
  9901. * UserInterface/SourceCodeRevision.js:
  9902. (WebInspector.SourceCodeRevision.prototype.set content): Call revisionContentDidChange on SourceCode.
  9903. * UserInterface/TextEditor.js:
  9904. (WebInspector.TextEditor): Listen for change event.
  9905. (WebInspector.TextEditor.prototype.set string): Ignore change event when setting the string.
  9906. (WebInspector.TextEditor.prototype.get readOnly): Added.
  9907. (WebInspector.TextEditor.prototype.set readOnly): Added.
  9908. (WebInspector.TextEditor.prototype._contentChanged): Added.
  9909. * UserInterface/TextResourceContentView.js:
  9910. (WebInspector.TextResourceContentView): Listen for SourceCode ContentDidChange event.
  9911. (WebInspector.TextResourceContentView.prototype.closed): Remove ContentDidChange event listener.
  9912. (WebInspector.TextResourceContentView.prototype._contentWillPopulate): Make editor writable for CSS.
  9913. (WebInspector.TextResourceContentView.prototype._sourceCodeContentDidChange): Added. Update editor content.
  9914. (WebInspector.TextResourceContentView.prototype._textEditorContentDidChange): Added. Update source code content.
  9915. 2013-01-22 Timothy Hatcher <timothy@apple.com>
  9916. Clean up how CSSStyleManager tracks stylesheet changes.
  9917. Replaces _fireStyleSheetChanged with noteStyleSheetChanged and populates stylesheet
  9918. identifiers for later use.
  9919. <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
  9920. Reviewed by Joseph Pecoraro.
  9921. * UserInterface/CSSProperty.js:
  9922. (WebInspector.CSSProperty.prototype.callback): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
  9923. (WebInspector.CSSProperty.prototype.setText): Ditto.
  9924. (WebInspector.CSSProperty.prototype.setDisabled): Ditto.
  9925. * UserInterface/CSSStyleDeclaration.js:
  9926. (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
  9927. * UserInterface/CSSStyleManager.js:
  9928. (WebInspector.CSSStyleManager):
  9929. (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged): Added.
  9930. (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.gotStyleSheetText): Added.
  9931. (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.syleSheetsFetched): Added.
  9932. (WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets): Added. Populate the identifier maps.
  9933. (WebInspector.CSSStyleManager.prototype.setRuleSelector): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
  9934. (WebInspector.CSSStyleManager.prototype.addRule): Ditto.
  9935. * UserInterface/CSSStyleSheet.js: Removed.
  9936. * UserInterface/Main.html: Removed CSSStyleSheet.js.
  9937. 2013-01-22 Timothy Hatcher <timothy@apple.com>
  9938. Add a BranchManager class for tracking various branches.
  9939. There are two initial branches -- Original and Working Copy. Currently
  9940. the Working Copy is always the current branch, but this will be controllable
  9941. from the user interface at some point.
  9942. <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
  9943. Reviewed by Joseph Pecoraro.
  9944. * Localizations/en.lproj/localizedStrings.js: Updated.
  9945. * UserInterface/BranchManager.js: Added.
  9946. (WebInspector.BranchManager):
  9947. (WebInspector.BranchManager.prototype.get branches):
  9948. (WebInspector.BranchManager.prototype.get currentBranch):
  9949. (WebInspector.BranchManager.prototype.set currentBranch):
  9950. (WebInspector.BranchManager.prototype.createBranch):
  9951. (WebInspector.BranchManager.prototype.deleteBranch):
  9952. * UserInterface/Main.html:
  9953. * UserInterface/Main.js:
  9954. (WebInspector.contentLoaded): Instantiate BranchManager.
  9955. 2013-01-22 Timothy Hatcher <timothy@apple.com>
  9956. Add a SourceCodeRevision class for recording changes to SourceCode objects.
  9957. Offloads the the content and contentIsBase64Encoded properties to SourceCodeRevision.
  9958. SourceCode now creates an original revision that holds the original content. In addition
  9959. to the original revision, there is a current revision that can be set to point to different
  9960. content based on the original.
  9961. <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
  9962. Reviewed by Joseph Pecoraro.
  9963. * UserInterface/Branch.js:
  9964. (WebInspector.Branch.prototype.revisionForRepresentedObject): Added. Helper for finding or
  9965. creating a new revision for an object.
  9966. * UserInterface/Main.html:
  9967. * UserInterface/SourceCode.js:
  9968. (WebInspector.SourceCode):
  9969. (WebInspector.SourceCode.prototype.get originalRevision): Added.
  9970. (WebInspector.SourceCode.prototype.get currentRevision): Added.
  9971. (WebInspector.SourceCode.prototype.set currentRevision): Added.
  9972. (WebInspector.SourceCode.prototype.get content): Use currentRevision.
  9973. (WebInspector.SourceCode.prototype.get contentIsBase64Encoded): Use currentRevision.
  9974. (WebInspector.SourceCode.prototype._processContent): Set originalRevision content.
  9975. * UserInterface/SourceCodeRevision.js: Added.
  9976. (WebInspector.SourceCodeRevision):
  9977. (WebInspector.SourceCodeRevision.prototype.get sourceCode):
  9978. (WebInspector.SourceCodeRevision.prototype.get content):
  9979. (WebInspector.SourceCodeRevision.prototype.set content):
  9980. (WebInspector.SourceCodeRevision.prototype.get contentIsBase64Encoded):
  9981. (WebInspector.SourceCodeRevision.prototype.set contentIsBase64Encoded):
  9982. (WebInspector.SourceCodeRevision.prototype.apply): Set currentRevision to point to this.
  9983. (WebInspector.SourceCodeRevision.prototype.revert): Set currentRevision to point to the original.
  9984. (WebInspector.SourceCodeRevision.prototype.copy): Copy the content and create a new SourceCodeRevision.
  9985. 2013-01-22 Timothy Hatcher <timothy@apple.com>
  9986. Add a BranchManager class for tracking various branches.
  9987. There are two initial branches -- Original and Working Copy. Currently
  9988. the Working Copy is always the current branch, but this will be controllable
  9989. from the user interface at some point.
  9990. <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
  9991. Reviewed by Joseph Pecoraro.
  9992. * Localizations/en.lproj/localizedStrings.js: Updated.
  9993. * UserInterface/BranchManager.js: Added.
  9994. (WebInspector.BranchManager):
  9995. (WebInspector.BranchManager.prototype.get branches):
  9996. (WebInspector.BranchManager.prototype.get currentBranch):
  9997. (WebInspector.BranchManager.prototype.set currentBranch):
  9998. (WebInspector.BranchManager.prototype.createBranch):
  9999. (WebInspector.BranchManager.prototype.deleteBranch):
  10000. * UserInterface/Main.html:
  10001. * UserInterface/Main.js:
  10002. (WebInspector.contentLoaded): Instantiate BranchManager.
  10003. 2013-01-22 Timothy Hatcher <timothy@apple.com>
  10004. Add a Branch and Revision class for tracking edits in the Inspector.
  10005. These classes are not used yet and will be used in subsequent changes.
  10006. A branch holds revisions that are differences from the original page.
  10007. Concrete revision subclasses will know the specifics about the edited
  10008. part of the page and how to apply or revert the change.
  10009. <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
  10010. Reviewed by Joseph Pecoraro.
  10011. * UserInterface/Branch.js: Added.
  10012. (WebInspector.Branch):
  10013. (WebInspector.Branch.prototype.get displayName):
  10014. (WebInspector.Branch.prototype.set displayName):
  10015. (WebInspector.Branch.prototype.get revisions):
  10016. (WebInspector.Branch.prototype.get locked):
  10017. (WebInspector.Branch.prototype.addRevision):
  10018. (WebInspector.Branch.prototype.removeRevision):
  10019. (WebInspector.Branch.prototype.reset):
  10020. (WebInspector.Branch.prototype.apply):
  10021. (WebInspector.Branch.prototype.revert):
  10022. (WebInspector.Branch.prototype.lock):
  10023. (WebInspector.Branch.prototype.unlock):
  10024. * UserInterface/Main.html:
  10025. * UserInterface/Revision.js: Added.
  10026. (WebInspector.Revision):
  10027. (WebInspector.Revision.prototype.apply):
  10028. (WebInspector.Revision.prototype.revert):
  10029. (WebInspector.Revision.prototype.copy):
  10030. 2013-01-22 Timothy Hatcher <timothy@apple.com>
  10031. Move contentURL from SourceCode to Resource since _mimeType is
  10032. only available on Resource.
  10033. Reviewed by Antoine Quint.
  10034. * UserInterface/Resource.js:
  10035. (WebInspector.Resource.prototype.get contentURL): Added.
  10036. * UserInterface/SourceCode.js:
  10037. (WebInspector.SourceCode.prototype.get contentURL): Removed.
  10038. 2013-01-23 Antoine Quint <graouts@apple.com>
  10039. <rdar://problem/13069440> Switching away from debugger using keyboard shortcut retains popover on screen
  10040. Dismiss the popover upon hiding the debugger.
  10041. Reviewed by Timothy Hatcher.
  10042. * UserInterface/SourceCodeTextEditor.js:
  10043. (WebInspector.SourceCodeTextEditor.prototype.hidden):
  10044. 2013-01-23 Antoine Quint <graouts@apple.com>
  10045. <rdar://problem/13059630> Move debugger popover display support to SourceCodeTextEditor
  10046. Split code between TextEditor and SourceCodeTextEditor such that TextEditor handles all
  10047. the user interaction and the interfacing with CodeMirror and notifies subclasses using
  10048. the .tokenWasHovered() method and keeping the currently hovered token in .hoveredToken.
  10049. This token contains the bounds of the hovered token as well as its expression, type,
  10050. start and end characters information.
  10051. Reviewed by Timothy Hatcher.
  10052. * UserInterface/SourceCodeTextEditor.css:
  10053. (.popover .debugger-popover-content):
  10054. (.popover .expandable):
  10055. (.popover .debugger-popover-content .title):
  10056. (.popover .debugger-popover-content .body):
  10057. (.popover .debugger-popover-content.function .body):
  10058. * UserInterface/SourceCodeTextEditor.js:
  10059. (WebInspector.SourceCodeTextEditor):
  10060. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  10061. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
  10062. (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
  10063. (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
  10064. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
  10065. (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
  10066. (WebInspector.SourceCodeTextEditor.prototype._showPopover):
  10067. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
  10068. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
  10069. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
  10070. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForString):
  10071. (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber):
  10072. (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
  10073. * UserInterface/TextEditor.css:
  10074. (.text-editor > .CodeMirror .hovered-token-highlight):
  10075. (@-webkit-keyframes text-editor-hovered-token-highlight-fadeout):
  10076. * UserInterface/TextEditor.js:
  10077. (WebInspector.TextEditor):
  10078. (WebInspector.TextEditor.prototype.startTrackingTokenHovering):
  10079. (WebInspector.TextEditor.prototype.stopTrackingTokenHovering):
  10080. (WebInspector.TextEditor.prototype.handleEvent):
  10081. (WebInspector.TextEditor.prototype.highlightHoveredToken):
  10082. (WebInspector.TextEditor.prototype.removeHighlightOnHoveredToken):
  10083. (WebInspector.TextEditor.prototype.tokenWasHovered):
  10084. (WebInspector.TextEditor.prototype._openClickedLinks):
  10085. (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
  10086. (WebInspector.TextEditor.prototype._mouseMovedOutOfEditor):
  10087. (WebInspector.TextEditor.prototype._checkHoveredToken):
  10088. 2013-01-22 Antoine Quint <graouts@apple.com>
  10089. <rdar://problem/13059425> Console filters should persist across sessions
  10090. Make ScopeBarItem save their selected state in a WebInspector.Setting that
  10091. we read from to set the initial state. This change requires consumers of the
  10092. ScopeBar class to ensure they don't just rely on selection change events
  10093. but also run an initial update to match selected ScopeBarItems upon creation,
  10094. so we update LogContentView to do this.
  10095. Reviewed by Timothy Hatcher.
  10096. * UserInterface/LogContentView.js:
  10097. (WebInspector.LogContentView):
  10098. (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
  10099. * UserInterface/ScopeBar.js:
  10100. (WebInspector.ScopeBar):
  10101. (WebInspector.ScopeBar.prototype.get selectedItems):
  10102. (WebInspector.ScopeBar.prototype._populate):
  10103. (WebInspector.ScopeBar.prototype._itemSelectionDidChange):
  10104. * UserInterface/ScopeBarItem.js:
  10105. (WebInspector.ScopeBarItem):
  10106. (WebInspector.ScopeBarItem.prototype.get selected):
  10107. (WebInspector.ScopeBarItem.prototype.setSelected):
  10108. (WebInspector.ScopeBarItem.prototype._markElementSelected):
  10109. 2013-01-22 Antoine Quint <graouts@apple.com>
  10110. <rdar://problem/11651957> REGRESSION (Safari 6): Does not show var value on hover in the debugger
  10111. Display a popover for any variable or function definition in the text editor
  10112. hovered long enough (500ms) during a debugging session. The popover contains
  10113. the expression as evaluated by the DebuggerAgent. Each value type has a specialized
  10114. display as borrowed from OpenSource code (from ObjectPopoverHelper) and adapted to fit
  10115. our coding style.
  10116. We do a fair bit of nifty work to avoid unwanted actions. For instance, we track mouseout
  10117. events to identify when the user mouses out of the editor so that we can reset the hover
  10118. state and avoid having whatever was the last hovered token show a popover even though we
  10119. may have exited the editor along the way. Additionally, we track the pressed state of the
  10120. mouse button to avoid having the popover show during a selection.
  10121. We're also making various enhancements to the Popover class to support the attachment of
  10122. popovers to tokens in the TextEditor as the debugger is paused. Here are the highlights:
  10123. - adopt UIKit-like terminology for present/dismiss methods.
  10124. - let consumers of the Popover API provide bounds instead of an element as a reference to
  10125. which the popover should be attached, removing the dependency on having an element to work with.
  10126. - make the popover's element private since it really needs not to be customised as presentation
  10127. is fully managed by the popover itself, however allow a `content` element to be provided to
  10128. the .present() method and letting the popover host it as needed.
  10129. - no longer remove the popover on window blur as OpenSource leaves it on display and it makes
  10130. debugging of the popover difficult.
  10131. - handle padding of the popover frame in code for computations of the tighter bounding box
  10132. as we can't have it done in CSS until we already know what edge we end up using for the popover.
  10133. - begin to offer a delegation protocol for popovers, right now willDismiss / didDismiss.
  10134. - horizontal and vertically align content that is smaller than the minimal bounds of the popover.
  10135. Reviewed by Joseph Pecoraro and Timothy Hatcher.
  10136. * UserInterface/Main.html:
  10137. * UserInterface/Popover.css:
  10138. (.popover):
  10139. (.popover > .container):
  10140. (.popover > .container.center):
  10141. (.popover.arrow-up > .container):
  10142. (.popover.arrow-right > .container):
  10143. (.popover.arrow-down > .container):
  10144. (.popover.arrow-left > .container):
  10145. * UserInterface/Popover.js:
  10146. (WebInspector.Popover):
  10147. (WebInspector.Popover.prototype.set frame):
  10148. (WebInspector.Popover.prototype.present):
  10149. (WebInspector.Popover.prototype.dismiss):
  10150. (WebInspector.Popover.prototype.handleEvent):
  10151. (WebInspector.Popover.prototype._cssClassNameForEdge):
  10152. (WebInspector.Popover.prototype._bestFrameForEdge):
  10153. * UserInterface/TextEditor.css:
  10154. (.text-editor > .CodeMirror .popover-highlight):
  10155. (@-webkit-keyframes text-editor-popover-highlight-fadeout):
  10156. (to):
  10157. (.popover .debugger-popover-content):
  10158. (.popover .expandable):
  10159. (.popover .debugger-popover-content .title):
  10160. (.popover .debugger-popover-content .body):
  10161. (.popover .debugger-popover-content.function .body):
  10162. * UserInterface/TextEditor.js:
  10163. (WebInspector.TextEditor):
  10164. (WebInspector.TextEditor.prototype._openClickedLinks):
  10165. (WebInspector.TextEditor.prototype._debuggerDidPause):
  10166. (WebInspector.TextEditor.prototype._debuggerDidResume):
  10167. (WebInspector.TextEditor.prototype._debuggerActiveCallFrameDidChange):
  10168. (WebInspector.TextEditor.prototype.handleEvent):
  10169. (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
  10170. (WebInspector.TextEditor.prototype._mouseMovedOutOfEditor):
  10171. (WebInspector.TextEditor.prototype._mouseButtonWasPressedOverEditor):
  10172. (WebInspector.TextEditor.prototype._mouseButtonWasReleasedOverEditor):
  10173. (WebInspector.TextEditor.prototype._windowLostFocus):
  10174. (WebInspector.TextEditor.prototype._tokenWasHovered):
  10175. (WebInspector.TextEditor.prototype._populateCallback):
  10176. (WebInspector.TextEditor.prototype._showPopover):
  10177. (WebInspector.TextEditor.prototype._showPopoverForFunction.didGetDetails):
  10178. (WebInspector.TextEditor.prototype._showPopoverForFunction):
  10179. (WebInspector.TextEditor.prototype._showPopoverForObject):
  10180. (WebInspector.TextEditor.prototype._showPopoverForString):
  10181. (WebInspector.TextEditor.prototype._showPopoverForNumber):
  10182. (WebInspector.TextEditor.prototype.willDismissPopover):
  10183. 2013-01-22 Antoine Quint <graouts@apple.com>
  10184. <rdar://problem/12243633> REGRESSION (Safari 6): Console missing type filters
  10185. Adding a new ScopeBar subclass of NavigationItem to allow the display of scope
  10186. options in a navigation bar. Use this new class in LogContentView to display
  10187. All / Errors / Warnings / Logs options in the right part of the view's navigation bar.
  10188. Reviewed by Joseph Pecoraro.
  10189. * Localizations/en.lproj/localizedStrings.js:
  10190. * UserInterface/ContentBrowser.js:
  10191. (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
  10192. * UserInterface/LogContentView.css:
  10193. (.console-messages.supress-logs .console-log-level):
  10194. * UserInterface/LogContentView.js:
  10195. (WebInspector.LogContentView):
  10196. (WebInspector.LogContentView.prototype.get navigationItems):
  10197. (WebInspector.LogContentView.prototype._clearLog):
  10198. (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange.toggle):
  10199. (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
  10200. * UserInterface/Main.html:
  10201. * UserInterface/ScopeBar.css: Added.
  10202. (.scope-bar):
  10203. (.scope-bar > li):
  10204. (.scope-bar > li:active):
  10205. (.scope-bar > li:hover):
  10206. (.scope-bar > li.selected):
  10207. * UserInterface/ScopeBar.js: Added.
  10208. (WebInspector.ScopeBar):
  10209. (WebInspector.ScopeBar.prototype.item):
  10210. (WebInspector.ScopeBar.prototype._populate):
  10211. (WebInspector.ScopeBar.prototype._itemSelectionDidChange):
  10212. * UserInterface/ScopeBarItem.js: Added.
  10213. (WebInspector.ScopeBarItem):
  10214. (WebInspector.ScopeBarItem.prototype.get element):
  10215. (WebInspector.ScopeBarItem.prototype.get selected):
  10216. (WebInspector.ScopeBarItem.prototype.set selected):
  10217. (WebInspector.ScopeBarItem.prototype.setSelected):
  10218. (WebInspector.ScopeBarItem.prototype._clicked):
  10219. 2013-01-17 Antoine Quint <graouts@apple.com>
  10220. <rdar://problem/13006824> Provide a Popover class
  10221. Basic Popover class to allow the display of any HTML content within a popover.
  10222. The public API of this class is very simple. Use .showRelativeToElement(element, preferredEdge)
  10223. to display the popover pointing to the provided target element with the provided edge as the
  10224. preferred edge of the target element towards which the popover's arrow should point to.
  10225. The method will check whether it can honour the edge preference based on the available screen
  10226. real estate. As it stands, the popover will constrain its display to the entire Web Inspector
  10227. window, but it could easily be made to match a more constrained space with a new WebInspector.Rect
  10228. parameter or Element reference.
  10229. You can then use .close() to dismiss the popover with an animated transition, although the popover
  10230. will automatically dismiss itself upon user interaction initiated outside of the popover's bounds
  10231. or when the Web Inspector window is no longer focused.
  10232. Additionally, the necessary geometry functions for the Popover class is taken from iAd JS and adapted
  10233. here to fit with the Web Inspector coding style.
  10234. Reviewed by Joseph Pecoraro.
  10235. * UserInterface/Geometry.js: Added.
  10236. (WebInspector.Point):
  10237. (WebInspector.Point.fromEvent):
  10238. (WebInspector.Point.fromEventInElement):
  10239. (WebInspector.Point.prototype.toString):
  10240. (WebInspector.Point.prototype.copy):
  10241. (WebInspector.Point.prototype.equals):
  10242. (WebInspector.Size):
  10243. (WebInspector.Size.prototype.toString):
  10244. (WebInspector.Size.prototype.copy):
  10245. (WebInspector.Size.prototype.equals):
  10246. (WebInspector.Rect):
  10247. (WebInspector.Rect.rectFromClientRect):
  10248. (WebInspector.Rect.prototype.toString):
  10249. (WebInspector.Rect.prototype.copy):
  10250. (WebInspector.Rect.prototype.equals):
  10251. (WebInspector.Rect.prototype.inset):
  10252. (WebInspector.Rect.prototype.minX):
  10253. (WebInspector.Rect.prototype.minY):
  10254. (WebInspector.Rect.prototype.midX):
  10255. (WebInspector.Rect.prototype.midY):
  10256. (WebInspector.Rect.prototype.maxX):
  10257. (WebInspector.Rect.prototype.maxY):
  10258. (WebInspector.Rect.prototype.intersectionWithRect):
  10259. (WebInspector.EdgeInsets):
  10260. (WebInspector.EdgeInsets.prototype.equals):
  10261. (WebInspector.EdgeInsets.prototype.copy):
  10262. * UserInterface/Popover.css: Added.
  10263. (.popover):
  10264. (.popover.arrow-up):
  10265. (.popover.arrow-right):
  10266. (.popover.arrow-down):
  10267. (.popover.arrow-left):
  10268. (.popover.fade-out):
  10269. * UserInterface/Popover.js: Added.
  10270. (WebInspector.Popover):
  10271. (WebInspector.Popover.prototype.get element):
  10272. (WebInspector.Popover.prototype.get frame):
  10273. (WebInspector.Popover.prototype.set frame):
  10274. (WebInspector.Popover.prototype.area):
  10275. (WebInspector.Popover.prototype.showRelativeToElement):
  10276. (WebInspector.Popover.prototype.close):
  10277. (WebInspector.Popover.prototype.handleEvent):
  10278. (WebInspector.Popover.prototype._drawBackground):
  10279. (WebInspector.Popover.prototype._bestFrameForEdge):
  10280. (WebInspector.Popover.prototype._drawFrame):
  10281. 2013-01-11 Antoine Quint <graouts@apple.com>
  10282. <rdar://problem/10015674> REGRESSION (Safari 5): Option-click on a disclosure triangle does not deep-expand a DOM subtree (66868)
  10283. Up to now, the TreeElement.prototype.expandRecursively() method would correctly
  10284. expand children recursively based on the provided depth, but would not wait to
  10285. perform this task until all child nodes had been populated, which means that this
  10286. would only work incrementally with one additional level of child nodes being shown
  10287. expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy.
  10288. In order to fix this, we rely on the newly added optional argument to DOMAgent's
  10289. requestChildNodes() method to provide the depth at which we want to retrieve children
  10290. of a given node (see http://trac.webkit.org/changeset/139429). The DOMAgent provides
  10291. a new .getSubtree() method that calls requestChildNodes() with the provided depth.
  10292. Then in DOMTreeElement, we subclass .expandRecursively() to first call DOMAgent's
  10293. new .getSubtree() method and then call the default implementation when all nodes
  10294. have been retrieved from the backend.
  10295. Reviewed by Timothy Hatcher.
  10296. * UserInterface/DOMNode.js:
  10297. (WebInspector.DOMNode.prototype.):
  10298. (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what
  10299. depth we want to retrieve children of a given node from the backend.
  10300. * UserInterface/DOMTreeElement.js:
  10301. (WebInspector.DOMTreeElement.prototype.expandRecursively): Override default implementation
  10302. to first obtain the deepest subtree for the current node so that deep expansion happens
  10303. as expected.
  10304. * UserInterface/InspectorBackendCommands.js: Register the new optional `depth` parameter
  10305. for DOMAgent's .requestChildNodes().
  10306. 2013-01-07 Joseph Pecoraro <pecoraro@apple.com>
  10307. Drive by style fix. Add super constructor call to CSSStyleManager.
  10308. Reviewed by Antoine Quint.
  10309. * UserInterface/CSSStyleManager.js:
  10310. (WebInspector.CSSStyleManager):
  10311. No functional difference, but I just noticed a missing call.
  10312. 2013-01-07 Joseph Pecoraro <pecoraro@apple.com>
  10313. <rdar://problem/12967231> extract-localizable-js-strings should warn about improper WebInspector.UIString uses
  10314. Reviewed by David Kilzer.
  10315. * Localizations/en.lproj/localizedStrings.js:
  10316. Add missing strings.
  10317. * UserInterface/ApplicationCacheFrameContentView.js:
  10318. (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback):
  10319. Remove a comment containing a UIString call. This is not needed for Safari.
  10320. * UserInterface/DatabaseContentView.js:
  10321. (WebInspector.DatabaseContentView.prototype._queryError):
  10322. Use WebInspector.UIString("...").format syntax so the string is not missed.
  10323. 2013-01-07 Joseph Pecoraro <pecoraro@apple.com>
  10324. <rdar://problem/12964366> LayerTreeSidebarPanel._buildLayerInfoSection is too clever for update-safari-localizable-string / extract-localizable-js-strings
  10325. Reviewed by David Kilzer.
  10326. * Localizations/en.lproj/localizedStrings.js:
  10327. * UserInterface/LayerTreeSidebarPanel.js:
  10328. (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
  10329. (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
  10330. Ensure all WebInspector.UIString uses contain a string literal, which
  10331. is what extract-localizable-js-strings expects.
  10332. 2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
  10333. <rdar://problem/12961674> Resizing QuickConsole drawer may need to refresh CodeMirror editor for new visible size
  10334. The CodeMirror TextEditor only has DOM elements for visible lines, with
  10335. some buffer. It needs to be updated when the visible (scroll dimensions)
  10336. of its content area are updated. The content view's dimensions flex with
  10337. the size of the QuickConsole. So, when the QuickConsole resizes we
  10338. should update the layout of the content browser.
  10339. Reviewed by Antoine Quint.
  10340. * UserInterface/Main.js:
  10341. (WebInspector.contentLoaded):
  10342. (WebInspector._quickConsoleDidResize):
  10343. Observe when the quick console resizes and update the layout of the content browser.
  10344. * UserInterface/QuickConsole.js:
  10345. (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
  10346. (WebInspector.QuickConsole.prototype._isResizing):
  10347. Whenever we resize we go through this method. Dispatch the resize event.
  10348. We may take the early path if we are resizing manually, in that case the
  10349. new height would have been set in the mouse handler.
  10350. * UserInterface/ScriptContentView.js:
  10351. (WebInspector.ScriptContentView.prototype.updateLayout):
  10352. * UserInterface/TextResourceContentView.js:
  10353. (WebInspector.TextResourceContentView.prototype.updateLayout):
  10354. In content views containing text editors be sure to pass update layout
  10355. on to the text editor to refresh the CodeMirror editor.
  10356. 2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
  10357. <rdar://problem/12961455> "No Style Properties" text in styles HTML Attributes sidebar should not be monospace
  10358. Adjust the styles for the sidebar so that things look a bit nicer.
  10359. Reviewed by Antoine Quint.
  10360. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  10361. (.sidebar > .panel.details.css-style .styles-section):
  10362. Make the minimum size 17px. This makes the HTML attributes section not
  10363. look like there is extra padding at the bottom. This also reduces the
  10364. height of empty sections a bit, saving vertical space.
  10365. * UserInterface/DetailsSection.css:
  10366. (.details-section > .content > .group > .row.empty.syntax-highlighted):
  10367. The HTML Attributes section is .syntax-highlighted. Ignore the fonts it
  10368. sets and revert back to the normal details section font.
  10369. (.details-section > .content > .group > .row.properties:not(.empty)):
  10370. Remove extra padding on properties sections when its the empty message.
  10371. 2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
  10372. Skip document nodes when searching.
  10373. Reviewed by Antoine Quint.
  10374. * UserInterface/ResourceSidebarPanel.js:
  10375. (WebInspector.ResourceSidebarPanel.prototype.performSearch.domSearchResults):
  10376. (WebInspector.ResourceSidebarPanel.prototype.performSearch.domCallback):
  10377. (WebInspector.ResourceSidebarPanel.prototype.performSearch):
  10378. 2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
  10379. <rdar://problem/12956057> REGRESSION: Cannot develop nodes in the DOM tree inspector for dynamically-generated content (106080)
  10380. Handle a null ownerDocument to avoid an error. This worked previously
  10381. because each backend message was dispatched individually via setInterval.
  10382. Now however, they are batched after a setTimeout so an earlier uncaught
  10383. exception can break / prevent handling of other messages in that batch.
  10384. Reviewed by Ricky Mondello.
  10385. * UserInterface/DOMTreeElement.js:
  10386. (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
  10387. 2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
  10388. <rdar://problem/12959910> Uncaught Error in LayerTreeSidebar breaks all right sidebars
  10389. In SidebarPanel.prototype.hidden the parentSidebar might be null. In
  10390. those cases, LayerTreeSidebarPanel could cause an error that would
  10391. make changing the right sidebar impossible.
  10392. The error was happening if the sidebar panel was removed instead of
  10393. being hidden. Removed meaning the content view changes and the sidebar
  10394. panel is no longer relevant. Hidden meaning the user just switched
  10395. to a different sidebar panel.
  10396. The fix checks if parentSidebar exists when the panel is being hidden,
  10397. but we also make sure to remove our event listener if the parentSidebar
  10398. is being cleared with a new willRemove method.
  10399. Reviewed by Antoine Quint.
  10400. * UserInterface/Sidebar.js:
  10401. (WebInspector.Sidebar.prototype.removeSidebarPanel):
  10402. * UserInterface/SidebarPanel.js:
  10403. (WebInspector.SidebarPanel.prototype.willRemove):
  10404. Give the sidebar panel an opportunity to handle the parentSidebar being cleared.
  10405. * UserInterface/LayerTreeSidebarPanel.js:
  10406. (WebInspector.LayerTreeSidebarPanel.prototype.shown):
  10407. Assert that there is a parent sidebar when we are shown.
  10408. (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
  10409. If there is a parent sidebar and we are hidden, the user is just switching
  10410. sidebars, and we can remove the listener.
  10411. (WebInspector.LayerTreeSidebarPanel.prototype.willRemove):
  10412. If the parent sidebar is being cleared remove our listener, if it existed.
  10413. 2013-01-05 Dan Bernstein <mitz@apple.com>
  10414. Updated localizable strings.
  10415. * Localizations/en.lproj/localizedStrings.js: Let update-safari-localizable-string
  10416. remove one entry and one empty line.
  10417. 2012-12-20 Antoine Quint <graouts@apple.com>
  10418. Add missing localizedString that I forgot in the previous patch for
  10419. <rdar://problem/12908978> Layer Tree: resize data grid upon width change.
  10420. * Localizations/en.lproj/localizedStrings.js:
  10421. 2012-12-19 Antoine Quint <graouts@apple.com>
  10422. <rdar://problem/12908978> Layer Tree: resize data grid upon width change
  10423. Listen to width change events on the parent sidebar as the layer tree panel
  10424. is shown, and do the opposite operation when it's hidden. Upon a width change,
  10425. call .autoSizeColumns() on the data grid so that the separators are correctly
  10426. positioned.
  10427. In this patch we also change the string used to show the paint count from
  10428. "Paint Count" to "Paints" which makes the data grid look much better.
  10429. Reviewed by Joseph Pecoraro.
  10430. * Localizations/en.lproj/localizedStrings.js:
  10431. * UserInterface/LayerTreeSidebarPanel.js:
  10432. (WebInspector.LayerTreeSidebarPanel.prototype.shown):
  10433. (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
  10434. (WebInspector.LayerTreeSidebarPanel.prototype._widthDidChange):
  10435. (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
  10436. (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
  10437. (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
  10438. 2012-12-19 Antoine Quint <graouts@apple.com>
  10439. <rdar://problem/12646424> Show redraw counts in layer tree inspector
  10440. Simply add a new "Paint Count" field in the layer info and data grid to display
  10441. the contents of the .paintCount property provided by the back-end, which had already
  10442. landed in WebCore with <rdar://problem/12882763>.
  10443. Reviewed by Joseph Pecoraro.
  10444. * Localizations/en.lproj/localizedStrings.js:
  10445. * UserInterface/LayerTreeDataGridNode.js:
  10446. (WebInspector.LayerTreeDataGridNode.prototype.set layer):
  10447. * UserInterface/LayerTreeSidebarPanel.js:
  10448. (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
  10449. (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
  10450. (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
  10451. 2012-12-19 Antoine Quint <graouts@apple.com>
  10452. <rdar://problem/12031104> Show which elements are layer-backed
  10453. This is the front-end part of the work started on the backend with
  10454. https://bugs.webkit.org/show_bug.cgi?id=103513. We now provide a
  10455. new details sidebar for the inspected element which lists the characteristics
  10456. of its backing RenderLayer (metrics, amount of memory used and whether it is
  10457. composited in hardware) and all child RenderLayers, with the option of only
  10458. showing layers composited in hardware. At the bottom of the pane, we also have
  10459. a status bar indicating the total number of layers for the selected node and
  10460. its descendants as well as the total amount of memory used.
  10461. The list of child layers allows the developer to select a node to see it
  10462. highlighted on the page, and to click an arrow icon to jump to the layer's
  10463. associated node in the DOM tree.
  10464. Reviewed by Joseph Pecoraro.
  10465. * Localizations/en.lproj/localizedStrings.js:
  10466. * UserInterface/InspectorBackendCommands.js:
  10467. * UserInterface/LayerTreeDataGridNode.js: Added. DataGridNode custom subclass for the type of data grid nodes
  10468. we show in the child layers data grid.
  10469. (WebInspector.LayerTreeDataGridNode):
  10470. (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
  10471. (WebInspector.LayerTreeDataGridNode.prototype.set layer):
  10472. (WebInspector.LayerTreeDataGridNode.prototype._createNodeCellContent):
  10473. (WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
  10474. * UserInterface/LayerTreeManager.js: Added.
  10475. (WebInspector.LayerTreeManager):
  10476. (WebInspector.LayerTreeManager.prototype.get supported):
  10477. (WebInspector.LayerTreeManager.prototype.layerTreeMutations): Obtain the complete
  10478. list of mutations between two flattened layer trees.
  10479. (WebInspector.LayerTreeManager.prototype.refreshLayerTree): Retrieve the current layer
  10480. tree from the backend, eventually triggering a layerTreeDidChange event as a result.
  10481. (WebInspector.LayerTreeManager.prototype.flattenedLayerTree):
  10482. (WebInspector.LayerTreeManager.prototype.):
  10483. (WebInspector.LayerTreeManager.prototype.layersForNode): Obtain the layer associated to
  10484. the provided node, if any, and a list of child layers, if any.
  10485. (WebInspector.LayerTreeManager.prototype.layerTreeDidChange):
  10486. (WebInspector.LayerTreeManager.prototype.var):
  10487. (WebInspector.LayerTreeManager.prototype._obtainNodeIdsForLayerIds): Obtain the node ids
  10488. for the provided layer ids from the backend.
  10489. * UserInterface/LayerTreeObserver.js: Added.
  10490. (WebInspector.LayerTreeObserver): Listen to "layerTreeDidChange" events triggered by the
  10491. LayerTreeAgent exposed by WebCore.
  10492. (WebInspector.LayerTreeObserver.prototype.layerTreeDidChange): Inform the layer tree manager
  10493. that the layer tree has changed.
  10494. * UserInterface/LayerTreeSidebarPanel.css: Added.
  10495. * UserInterface/LayerTreeSidebarPanel.js: Added.
  10496. (WebInspector.LayerTreeSidebarPanel):
  10497. (WebInspector.LayerTreeSidebarPanel.prototype.shown):
  10498. (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
  10499. (WebInspector.LayerTreeSidebarPanel.prototype.refresh):
  10500. (WebInspector.LayerTreeSidebarPanel.prototype.supportsDOMNode): Element nodes only are supported.
  10501. (WebInspector.LayerTreeSidebarPanel.prototype._layerTreeDidChange): Event handler for the
  10502. "layerTreeDidChange" triggered by the layer tree manager.
  10503. (WebInspector.LayerTreeSidebarPanel.prototype._buildCheckbox): Build the checkbox controlling
  10504. the option to only show layers composited in hardware.
  10505. (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection): Build the top section
  10506. containing information about the inspected node's layer, if any.
  10507. (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection): Build the middle section
  10508. containing the data grid showing the list of child layers, if any.
  10509. (WebInspector.LayerTreeSidebarPanel.prototype._buildBottomBar): Build the status bar displayed
  10510. at the bottom showing the total number of layers for the inspected node and the amount of
  10511. memory used.
  10512. (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid.comparator):
  10513. (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
  10514. (WebInspector.LayerTreeSidebarPanel.prototype._selectedDataGridNodeChanged):
  10515. (WebInspector.LayerTreeSidebarPanel.prototype._dataGridGainedFocus):
  10516. (WebInspector.LayerTreeSidebarPanel.prototype._dataGridLostFocus):
  10517. (WebInspector.LayerTreeSidebarPanel.prototype._dataGridWasClicked):
  10518. (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
  10519. (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGridFilter):
  10520. (WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers): Callback for the call
  10521. made to .layersForNode() on the manager, triggers an update of all of the information reported
  10522. in the panel.
  10523. (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection): Update only the top section.
  10524. (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid): Update only the data grid.
  10525. (WebInspector.LayerTreeSidebarPanel.prototype._dataGridNodeForLayer): Generate a node for the data
  10526. grid for the provided layer.
  10527. (WebInspector.LayerTreeSidebarPanel.prototype._updateMetrics): Update only the bottom status bar.
  10528. * UserInterface/Main.html:
  10529. * UserInterface/Main.js:
  10530. (WebInspector.contentLoaded):
  10531. 2012-12-04 Timothy Hatcher <timothy@apple.com>
  10532. Prevent lines from highlighting again if the user scrolls with a line highlighted.
  10533. This switches off of a webkitAnimationEnd event listener because the line element might
  10534. be removed if the user scrolls during the animation. In that case webkitAnimationEnd isn't
  10535. fired, and the line would highlight again the next time it scrolls into view.
  10536. Reviewed by Ricky Mondello.
  10537. * UserInterface/TextEditor.js:
  10538. (WebInspector.TextEditor.prototype.removeStyleClass): Removed event listener code.
  10539. (WebInspector.TextEditor.prototype.revealAndHighlightLine): Schedule a timeout instead
  10540. of an event listener.
  10541. 2012-12-04 Timothy Hatcher <timothy@apple.com>
  10542. Delay revealing a line until visible and the line exists.
  10543. This regressed when we switched to CodeMirror.
  10544. Reviewed by Joseph Pecoraro.
  10545. * UserInterface/TextEditor.js:
  10546. (WebInspector.TextEditor.prototype.set string.update): Call _revealPendingLineIfPossible.
  10547. (WebInspector.TextEditor.prototype.shown.update): Call _revealPendingLineIfPossible.
  10548. (WebInspector.TextEditor.prototype._revealPendingLineIfPossible): Store the line number
  10549. and requested range until visible and the line exists.
  10550. 2012-12-03 Dean Jackson <dino@apple.com>
  10551. Followup on <rdar://problem/11492568> Show shadow DOM elements
  10552. Reviewed by Joseph Pecoraro.
  10553. * Localizations/en.lproj/localizedStrings.js: New string for "Shadow Content".
  10554. * UserInterface/DOMNode.js:
  10555. (WebInspector.DOMNode): Only create the _shadowRoots if necessary.
  10556. (WebInspector.DOMNode.prototype.hasChildNodes): Test for existence of _shadowRoots.
  10557. (WebInspector.DOMNode.prototype.hasShadowRoots): Ditto.
  10558. (WebInspector.DOMNode.prototype._insertChild): Ditto.
  10559. (WebInspector.DOMNode.prototype._setChildrenPayload): Ditto.
  10560. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  10561. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName): Handle Document Fragment in switch.
  10562. * UserInterface/DOMTreeElement.js: Use new UIString.
  10563. * UserInterface/DOMTreeElementPathComponent.js: Handle Document Fragment in switch.
  10564. (WebInspector.DOMTreeElementPathComponent):
  10565. 2012-12-03 Dean Jackson <dino@apple.com>
  10566. Allow inspection of Shadow DOM elements in Web Inspector
  10567. <rdar://problem/11492568> Show shadow DOM elements
  10568. Reviewed by Tim Hatcher.
  10569. Add the Shadow DOM fragments to the DOM tree view. This allows
  10570. us to inspect things like HTML5 Media captions and controls.
  10571. Expose the setting via a checkbox in the context menu on the DOM
  10572. tree view (which requires a reload if changed). Luckily the
  10573. inspector protocol already provided all the Shadow DOM data so
  10574. this was purely a UI change.
  10575. * Localizations/en.lproj/localizedStrings.js: New menu item.
  10576. * UserInterface/DOMNode.js:
  10577. (WebInspector.DOMNode): New parameter to constructor: "isInShadowTree".
  10578. (WebInspector.DOMNode.prototype.hasChildNodes): Check for shadow children too.
  10579. (WebInspector.DOMNode.prototype.hasShadowRoots): New method.
  10580. (WebInspector.DOMNode.prototype.isInShadowTree): New method.
  10581. (WebInspector.DOMNode.prototype._insertChild): Inherit the shadow state as constructing children.
  10582. (WebInspector.DOMNode.prototype._setChildrenPayload): Ditto.
  10583. * UserInterface/DOMObserver.js:
  10584. (WebInspector.DOMObserver.prototype.shadowRootPushed): Answer the protocol calls.
  10585. (WebInspector.DOMObserver.prototype.shadowRootPopped): Ditto.
  10586. * UserInterface/DOMTreeElement.js:
  10587. (WebInspector.DOMTreeElement.prototype._buildTagDOM): Document Fragments get a special style if they are shadow root elements.
  10588. (WebInspector.DOMTreeElement.prototype._singleTextChild): Return early if in shadow DOM.
  10589. * UserInterface/DOMTreeManager.js:
  10590. (WebInspector.DOMTreeManager.prototype._setDocument): Use new parameter when constructing DOMNode.
  10591. (WebInspector.DOMTreeManager.prototype._setDetachedRoot): Ditto.
  10592. * UserInterface/DOMTreeOutline.js:
  10593. (WebInspector.DOMTreeOutline):
  10594. (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Add a new checkbox to toggle the Shadow DOM visibility.
  10595. (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
  10596. (WebInspector.DOMTreeOutline.prototype._toggleShowShadowDOM):
  10597. * UserInterface/LogContentView.css:
  10598. (.webkit-html-fragment.shadow): New style for shadow root fragments.
  10599. 2012-12-02 Timothy Hatcher <timothy@apple.com>
  10600. Linkify "src" and "href" attributes in HTML/SVG/XML resources.
  10601. This extends the XML tokenizer to change the style of the string following
  10602. "src" and "href" attributes into links.
  10603. Reviewed by Joseph Pecoraro.
  10604. * UserInterface/CodeMirrorAdditions.js:
  10605. (tokenizeLinkString): Added.
  10606. (tokenizeEndOfLinkString): Added.
  10607. (extendedXMLToken): Added.
  10608. * UserInterface/SyntaxHighlightingDefaultTheme.css:
  10609. (.cm-s-default .cm-link): Added.
  10610. (.cm-s-default .cm-link:hover): Added.
  10611. * UserInterface/TextEditor.js:
  10612. (WebInspector.TextEditor): Added click event listener for _openClickedLinks.
  10613. (WebInspector.TextEditor.prototype._openClickedLinks): Added.
  10614. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10615. Use CodeMirror to syntax highlight strings used for the DOM tree.
  10616. Reviewed by Joseph Pecoraro.
  10617. * UserInterface/SyntaxHighlightingSupport.js:
  10618. (WebInspector.syntaxHighlightStringAsDocumentFragment): Use CodeMirror.runMode.
  10619. (WebInspector.syntaxHighlightStringAsDocumentFragment.appendText): Added. Create nodes based on the style.
  10620. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10621. Use WebInspector.CSSKeywordCompletions instead of WebInspector.SourceTokenizer to decide what
  10622. is a keyword in the Style details sidebar.
  10623. Reviewed by Jon Honeycutt.
  10624. * UserInterface/StylePropertyTreeElement.js:
  10625. (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Get the keywords.
  10626. (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processKeyword): Use the keywords
  10627. for the current property.
  10628. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10629. Hook up issues using CodeMirror.
  10630. Reviewed by Joseph Pecoraro.
  10631. * UserInterface/SourceCodeTextEditor.css:
  10632. (.source-code.text-editor > .CodeMirror .error): Renamed.
  10633. (.source-code.text-editor > .CodeMirror .warning): Renamed.
  10634. * UserInterface/SourceCodeTextEditor.js:
  10635. (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Moved issue population from here.
  10636. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): ... to here.
  10637. (WebInspector.SourceCodeTextEditor.prototype._issueWasAdded): Call _addIssue.
  10638. (WebInspector.SourceCodeTextEditor.prototype._addIssue): Renamed from _addIssueToLine. Use
  10639. addStyleClassToLine to add the styles.
  10640. (WebInspector.SourceCodeTextEditor.prototype._addIssueToLineNumberMap): Merged with _addIssue.
  10641. * UserInterface/TextEditor.js:
  10642. (WebInspector.TextEditor.prototype.addStyleClassToLine): Added.
  10643. (WebInspector.TextEditor.prototype.removeStyleClassFromLine): Added.
  10644. (WebInspector.TextEditor.prototype.toggleStyleClassForLine): Added.
  10645. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10646. Hook up breakpoints using CodeMirror.
  10647. Reviewed by Joseph Pecoraro.
  10648. * UserInterface/CodeMirrorAdditions.js: Added hasLineClass and toggleLineClass extensions.
  10649. * UserInterface/SourceCodeTextEditor.js:
  10650. (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Call setBreakpointInfoForLine
  10651. for each breakpoint.
  10652. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Removed.
  10653. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Removed delete here
  10654. since calling removeBreakpoint will fire an event that causes us to delete the breakpoint.
  10655. Deleting early was causing an assert in the event handler.
  10656. * UserInterface/TextEditor.css:
  10657. (.text-editor > .CodeMirror .has-breakpoint:not(.breakpoint-disabled) .CodeMirror-linenumber): Added.
  10658. (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before): Added.
  10659. (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before): Added.
  10660. (.text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before): Added.
  10661. (.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after): Added.
  10662. (.text-editor > .CodeMirror .execution-line pre): Added.
  10663. * UserInterface/TextEditor.js:
  10664. (WebInspector.TextEditor): Added "gutterClick" event listener.
  10665. (WebInspector.TextEditor.prototype.set string):
  10666. (WebInspector.TextEditor.prototype.set string.updateStyles): Update the execution line and breakpoints
  10667. now that we might have content for that line.
  10668. (WebInspector.TextEditor.prototype.get executionLineNumber):
  10669. (WebInspector.TextEditor.prototype.set executionLineNumber):
  10670. (WebInspector.TextEditor.prototype.setBreakpointInfoForLine):
  10671. (WebInspector.TextEditor.prototype._updateExecutionLine): Added.
  10672. (WebInspector.TextEditor.prototype._addBreakpointToLineWithInfo): Added.
  10673. (WebInspector.TextEditor.prototype._setBreakpointStylesOnLineWithInfo): Added.
  10674. (WebInspector.TextEditor.prototype._removeBreakpointFromLine.updateStyles): Added.
  10675. (WebInspector.TextEditor.prototype._removeBreakpointFromLine): Added.
  10676. (WebInspector.TextEditor.prototype._gutterMouseDown): Added.
  10677. (WebInspector.TextEditor.prototype._documentMouseMoved): Added.
  10678. (WebInspector.TextEditor.prototype._documentMouseUp): Added.
  10679. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10680. Hook up search using CodeMirror.
  10681. Reviewed by Joseph Pecoraro.
  10682. * UserInterface/SourceCodeTextEditor.js:
  10683. (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch): Move off of textContent and AttributedString.
  10684. Use addSearchResults instead of the individual addSearchResultRange.
  10685. * UserInterface/TextEditor.css:
  10686. (.text-editor .bouncy-highlight): Added.
  10687. (@-webkit-keyframes text-editor-bouncy): Added.
  10688. * UserInterface/TextEditor.js:
  10689. (WebInspector.TextEditor.prototype.performSearch): Create a search cursor.
  10690. (WebInspector.TextEditor.prototype.performSearch.batchSearch): Use the search cursor to find matches in
  10691. the slow path. Stop using _textContent.
  10692. (WebInspector.TextEditor.prototype.addSearchResults): Renamed from addSearchResultRange.
  10693. (WebInspector.TextEditor.prototype.addSearchResults.markRanges): Added. Mark the ranges in a CodeMirror
  10694. operation to get better performance.
  10695. (WebInspector.TextEditor.prototype.searchCleared): Clear the marked text ranges.
  10696. (WebInspector.TextEditor.prototype.revealPreviousSearchResult): Call _revealSearchResult.
  10697. (WebInspector.TextEditor.prototype.revealNextSearchResult): Ditto.
  10698. (WebInspector.TextEditor.prototype.line): Added.
  10699. (WebInspector.TextEditor.prototype._revealSearchResult): Added.
  10700. (WebInspector.TextEditor.prototype._revealSearchResult.animationEnded): Added.
  10701. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10702. Hook up the basics of CodeMirror in TextEditor.
  10703. Reviewed by Joseph Pecoraro.
  10704. * UserInterface/SourceCodeTextEditor.js:
  10705. (WebInspector.SourceCodeTextEditor.prototype.textEditorLineContentUpdated): Removed.
  10706. * UserInterface/SyntaxHighlightingDefaultTheme.css: Added CodeMirror selectors.
  10707. * UserInterface/TextEditor.css:
  10708. (.text-editor > .CodeMirror): Added. Reset box-sizing to content-box.
  10709. (.text-editor > .CodeMirror *): Added. Ditto.
  10710. (.text-editor > .CodeMirror .CodeMirror-lines): Added.
  10711. (.text-editor > .CodeMirror pre): Added.
  10712. (.text-editor > .CodeMirror .CodeMirror-selected): Added.
  10713. (.text-editor > .CodeMirror .CodeMirror-focused .CodeMirror-selected): Added.
  10714. (.text-editor > .CodeMirror textarea): Added. Prevent pointer events to make right
  10715. click Inspect Element hit the line instead of the input area.
  10716. (.text-editor > .CodeMirror .CodeMirror-gutters): Added.
  10717. (.text-editor > .CodeMirror .CodeMirror-linenumber): Added.
  10718. (.text-editor > .CodeMirror .highlighted): Added.
  10719. (@-webkit-keyframes text-editor-highlight-fadeout):
  10720. * UserInterface/TextEditor.js:
  10721. (WebInspector.TextEditor):
  10722. (WebInspector.TextEditor.prototype.get string):
  10723. (WebInspector.TextEditor.prototype.set string):
  10724. (WebInspector.TextEditor.prototype.get selectedTextRange):
  10725. (WebInspector.TextEditor.prototype.set selectedTextRange):
  10726. (WebInspector.TextEditor.prototype.get mimeType):
  10727. (WebInspector.TextEditor.prototype.set mimeType):
  10728. (WebInspector.TextEditor.prototype.revealLine): Set the cursor position and highlight the line.
  10729. (WebInspector.TextEditor.prototype.updateLayout): Call refresh to let CodeMirror know we might have changed size.
  10730. (WebInspector.TextEditor.prototype.shown): Ditto.
  10731. (WebInspector.TextEditor.prototype._textRangeFromCodeMirrorPosition): Added.
  10732. (WebInspector.TextEditor.prototype._codeMirrorPositionFromTextRange): Added.
  10733. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10734. Remove TextEditor implementation and supporting classes for syntax highlighting.
  10735. Rubber-stamped by Jon Honeycutt.
  10736. * UserInterface/AttributedString.js: Removed.
  10737. * UserInterface/CSSSourceTokenizer.js: Removed.
  10738. * UserInterface/HTMLSourceTokenizer.js: Removed.
  10739. * UserInterface/JavaScriptSourceTokenizer.js: Removed.
  10740. * UserInterface/Main.html: Removed deleted files.
  10741. * UserInterface/ScriptContentView.js:
  10742. * UserInterface/SourceTokenizer.js: Removed.
  10743. * UserInterface/SyntaxHighlighter.js: Removed.
  10744. * UserInterface/SyntaxHighlightingSupport.js:
  10745. (WebInspector.syntaxHighlightStringAsDocumentFragment): Cleared.
  10746. * UserInterface/TextContent.js: Removed.
  10747. * UserInterface/TextEditor.css: Removed most rules.
  10748. * UserInterface/TextEditor.js:
  10749. (WebInspector.TextEditor): Cleared.
  10750. (WebInspector.TextEditor.prototype.get string): Cleared.
  10751. (WebInspector.TextEditor.prototype.set string): Cleared.
  10752. (WebInspector.TextEditor.prototype.get selectedTextRange): Cleared.
  10753. (WebInspector.TextEditor.prototype.set selectedTextRange): Cleared.
  10754. (WebInspector.TextEditor.prototype.get mimeType): Cleared.
  10755. (WebInspector.TextEditor.prototype.set mimeType): Cleared.
  10756. (WebInspector.TextEditor.prototype.get executionLineNumber): Cleared.
  10757. (WebInspector.TextEditor.prototype.set executionLineNumber): Cleared.
  10758. (WebInspector.TextEditor.prototype.performSearch.batchSearch): Cleared.
  10759. (WebInspector.TextEditor.prototype.performSearch): Cleared.
  10760. (WebInspector.TextEditor.prototype.addSearchResultRange): Cleared.
  10761. (WebInspector.TextEditor.prototype.searchCleared): Cleared.
  10762. (WebInspector.TextEditor.prototype.revealPreviousSearchResult): Cleared.
  10763. (WebInspector.TextEditor.prototype.revealNextSearchResult): Cleared.
  10764. (WebInspector.TextEditor.prototype.revealLine): Cleared.
  10765. (WebInspector.TextEditor.prototype.updateLayout): Cleared.
  10766. (WebInspector.TextEditor.prototype.shown): Cleared.
  10767. (WebInspector.TextEditor.prototype.hidden): Cleared.
  10768. (WebInspector.TextEditor.prototype.setBreakpointInfoForLine): Cleared.
  10769. * UserInterface/TextResourceContentView.js:
  10770. (WebInspector.TextResourceContentView.prototype.get scrollableElements): Removed.
  10771. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10772. Extend CodeMirror to allow syntax highlighting styles based on the mode.
  10773. By default CodeMirror defines syntax highlighting styles based on token
  10774. only and shared styles between modes. This limiting and does not match
  10775. what we have done in the Web Inspector. So this modifies the XML, CSS
  10776. and JavaScript modes to supply two styles for each token. One for the
  10777. token and one with the mode name.
  10778. Reviewed by Joseph Pecoraro.
  10779. * UserInterface/CodeMirrorAdditions.js: Added.
  10780. * UserInterface/Main.html: Included CodeMirrorAdditions.js.
  10781. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10782. Define extra MIME-types for CodeMirror's syntax highlighting modes.
  10783. Reviewed by Jon Honeycutt.
  10784. * UserInterface/Main.js:
  10785. (WebInspector.contentLoaded): Define extra MIME-types for XML, HTML, SVG,
  10786. JSON and JavaScript.
  10787. 2012-11-30 Timothy Hatcher <timothy@apple.com>
  10788. Update CodeMirror from 3.0 beta 2 to 3.0 release candidate 2.
  10789. Rubber-stamped by Jon Honeycutt.
  10790. * UserInterface/External/CodeMirror/codemirror.css: Updated.
  10791. * UserInterface/External/CodeMirror/codemirror.js: Updated.
  10792. * UserInterface/External/CodeMirror/htmlmixed.js: Updated.
  10793. * UserInterface/External/CodeMirror/javascript.js: Updated.
  10794. * UserInterface/External/CodeMirror/matchbrackets.js: Updated.
  10795. * UserInterface/External/CodeMirror/xml.js: Updated.
  10796. 2012-11-22 Timothy Hatcher <timothy@apple.com>
  10797. Fix a perl script error that was preventing resources from being
  10798. copied on production builds.
  10799. Perl thought the [\t ] that followed $tagExpression meant that
  10800. tagExpression should be @tagExpression.
  10801. * Scripts/combine-resources.pl:
  10802. (concatinateFiles): Split the replacementExpression string into parts
  10803. and concat it to prevent this. Fix a typo too.
  10804. 2012-11-18 Timothy Hatcher <timothy@apple.com>
  10805. Include CodeMirror in the Web Inspector.
  10806. This also teaches the scripts we use to copy the CodeMirror resources and skip them
  10807. when we concatenate our scripts/styles.
  10808. Rubber-stamped by Antoine Quint.
  10809. * Scripts/combine-resources.pl:
  10810. (concatinateFiles): Skip External files. Smartly replace the first concatenated file's tag
  10811. so we don't mix the order of style and script loading.
  10812. * Scripts/copy-user-interface-resources.sh:
  10813. * UserInterface/Main.html: Included CodeMirror files.
  10814. 2012-11-18 Timothy Hatcher <timothy@apple.com>
  10815. Add CodeMirror to the Web Inspector.
  10816. Open Source Software use approved by Joyce Chow on 11/16/2012.
  10817. Part of: <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
  10818. Rubber-stamped by Antoine Quint.
  10819. * UserInterface/External/CodeMirror/LICENSE: Added.
  10820. * UserInterface/External/CodeMirror/codemirror.css: Added.
  10821. * UserInterface/External/CodeMirror/codemirror.js: Added.
  10822. * UserInterface/External/CodeMirror/css.js: Added.
  10823. * UserInterface/External/CodeMirror/htmlmixed.js: Added.
  10824. * UserInterface/External/CodeMirror/javascript.js: Added.
  10825. * UserInterface/External/CodeMirror/matchbrackets.js: Added.
  10826. * UserInterface/External/CodeMirror/overlay.js: Added.
  10827. * UserInterface/External/CodeMirror/runmode.js: Added.
  10828. * UserInterface/External/CodeMirror/searchcursor.js: Added.
  10829. * UserInterface/External/CodeMirror/xml.js: Added.
  10830. 2012-11-17 Timothy Hatcher <timothy@apple.com>
  10831. Hide the toolbar labels if there isn't enough room to show them.
  10832. Reviewed by Brady Eidson.
  10833. * UserInterface/ButtonToolbarItem.css:
  10834. (.toolbar.collapsed .item.button > .label): Added.
  10835. * UserInterface/Main.js:
  10836. (WebInspector.contentLoaded): Added event listener for window resize.
  10837. (WebInspector._windowResized): Added. Update the toolbar layout.
  10838. * UserInterface/Toolbar.js:
  10839. (WebInspector.Toolbar.prototype.set displayMode): Update the toolbar layout.
  10840. (WebInspector.Toolbar.prototype.set sizeMode): Ditto.
  10841. 2012-11-17 Timothy Hatcher <timothy@apple.com>
  10842. Keep toolbar items in constant positions as items are added or removed.
  10843. This keeps centered items in the center and adds the items on the right in reverse
  10844. order since right most items are more stable as context changes. Also vertically stack
  10845. the close and undock button if the toolbar is tall enough to fit them.
  10846. Reviewed by Dan Bernstein.
  10847. * UserInterface/ControlToolbarItem.css:
  10848. (.toolbar .item.control):
  10849. (.toolbar.small-size .item.control):
  10850. (.toolbar.icon-only .item.control):
  10851. (.toolbar .item.control:hover):
  10852. (.toolbar .item.control:active):
  10853. * UserInterface/Main.js:
  10854. (WebInspector.contentLoaded): Use addToolbarItem instead of addNavigationItem. Add the
  10855. detail sidebar items in reverse order.
  10856. * UserInterface/NavigationBar.js:
  10857. (WebInspector.NavigationBar.prototype.addNavigationItem): Added parentElement argument.
  10858. (WebInspector.NavigationBar.prototype.insertNavigationItem): Added parentElement argument.
  10859. Use the nextSibling only if it is in the same parent element.
  10860. (WebInspector.NavigationBar.prototype.removeNavigationItem): Use remove to remove the element.
  10861. * UserInterface/Toolbar.css:
  10862. (.toolbar .control-section): Added.
  10863. (.toolbar.label-only .control-section): Added.
  10864. (.toolbar .item-section): Added.
  10865. (.toolbar .item-section:not(.center)): Added.
  10866. (.toolbar .item-section.left): Added.
  10867. (.toolbar .item-section.center): Added.
  10868. (.toolbar .item-section.right): Added.
  10869. * UserInterface/Toolbar.js:
  10870. (WebInspector.Toolbar): Create the four sections.
  10871. (WebInspector.Toolbar.prototype.addToolbarItem): Added.
  10872. * UserInterface/Utilities.js:
  10873. (Element.prototype.remove): Added only if the engine does not have it. This is needed
  10874. for iAd Producer, which uses an older WebKit.
  10875. 2012-11-17 Timothy Hatcher <timothy@apple.com>
  10876. Change ".navigation-bar > .item" and ".toolbar > .item" selectors into ".navigation-bar .item"
  10877. and ".toolbar .item" so we can have intermediary elements between the bar and item.
  10878. Reviewed by Dan Bernstein.
  10879. * UserInterface/ActivateButtonNavigationItem.js:
  10880. (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
  10881. * UserInterface/ButtonNavigationItem.css:
  10882. (.navigation-bar .item.button):
  10883. (.navigation-bar .item.button > .glyph):
  10884. (body.window-inactive .navigation-bar .item.button:not(.suppress-emboss) > .glyph):
  10885. (.navigation-bar .item.button.disabled > .glyph):
  10886. (body.window-inactive .navigation-bar .item.button.disabled:not(.suppress-emboss) > .glyph):
  10887. (.navigation-bar .item.button.suppress-emboss > .glyph):
  10888. (.navigation-bar .item.button.suppress-emboss:active > .glyph):
  10889. (.navigation-bar .item.button.suppress-emboss.disabled > .glyph):
  10890. (.navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
  10891. * UserInterface/ButtonNavigationItem.js:
  10892. (WebInspector.ButtonNavigationItem.prototype.generateStyleText):
  10893. * UserInterface/ButtonToolbarItem.css:
  10894. (.toolbar .item.button):
  10895. (.toolbar.icon-and-label-vertical .item.button):
  10896. (.toolbar.icon-and-label-horizontal .item.button):
  10897. (.toolbar .item.button > .glyph):
  10898. (.toolbar.small-size .item.button > .glyph):
  10899. (.toolbar.label-only .item.button > .glyph):
  10900. (.toolbar .item.button > .label):
  10901. (.toolbar.label-only .item.activate.button.activated > .label):
  10902. (.toolbar.icon-and-label-horizontal .item.button > .label):
  10903. * UserInterface/ControlToolbarItem.css:
  10904. (.toolbar .item.control):
  10905. (.toolbar .item.control:hover):
  10906. (.toolbar .item.control:active):
  10907. (.toolbar .item.control > .glyph):
  10908. (body.window-inactive .toolbar .item.control):
  10909. (body.window-inactive .toolbar .item.control.disabled):
  10910. * UserInterface/DividerNavigationItem.css:
  10911. (.navigation-bar .item.divider):
  10912. * UserInterface/FlexibleSpaceNavigationItem.css:
  10913. (.toolbar .item.flexible-space):
  10914. * UserInterface/NavigationBar.css:
  10915. (.navigation-bar .item):
  10916. * UserInterface/RadioButtonNavigationItem.css:
  10917. (.navigation-bar .item.radio.button):
  10918. (.navigation-bar.collapsed .item.radio.button):
  10919. (.navigation-bar .item.radio.button.selected):
  10920. (.navigation-bar.collapsed .item.radio.button.selected):
  10921. * UserInterface/RadioButtonNavigationItem.js:
  10922. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
  10923. * UserInterface/Toolbar.css:
  10924. (.toolbar .control-section):
  10925. 2012-11-17 Timothy Hatcher <timothy@apple.com>
  10926. Make the close and undock buttons in the docked Web Inspector better match
  10927. the style of the undock button and the iTunes 11 mini-player controls.
  10928. Reviewed by Dan Bernstein.
  10929. * UserInterface/ControlToolbarItem.css:
  10930. (.toolbar > .item.control): 50% opacity.
  10931. (.toolbar > .item.control:hover): Added. 90% opacity.
  10932. (.toolbar > .item.control:active): Added. 100% opacity.
  10933. (body.window-inactive .toolbar > .item.control): 35% opacity.
  10934. (.toolbar > .item.control.disabled): 35% opacity.
  10935. (body.window-inactive .toolbar > .item.control.disabled): 20% opacity.
  10936. * UserInterface/Images/Undock.pdf: Rounded the corners a bit.
  10937. 2012-11-16 Timothy Hatcher <timothy@apple.com>
  10938. Renamed the Breakpoint sidebar to Debugger and give it a new icon.
  10939. Also removed unused images from previous sidebar panels.
  10940. Reviewed by Brian Weinstein.
  10941. * Localizations/en.lproj/localizedStrings.js: Updated.
  10942. * UserInterface/DebuggerSidebarPanel.js: Renamed from WebInspector/UserInterface/BreakpointSidebarPanel.js.
  10943. (WebInspector.DebuggerSidebarPanel): Updated the keyboard shortcut to be Control-3.
  10944. * UserInterface/Images/NavigationItemBreakpoint.pdf: Removed.
  10945. * UserInterface/Images/NavigationItemBug.pdf: Added.
  10946. * UserInterface/Images/NavigationItemFunction.pdf: Removed.
  10947. * UserInterface/Images/NavigationItemThreads.pdf: Removed.
  10948. * UserInterface/InstrumentSidebarPanel.js:
  10949. (WebInspector.InstrumentSidebarPanel): Updated the keyboard shortcut to be Control-2.
  10950. * UserInterface/Main.html: Renamed BreakpointSidebarPanel to DebuggerSidebarPanel.
  10951. * UserInterface/Main.js:
  10952. (WebInspector.contentLoaded): Ditto.
  10953. (WebInspector._debuggerDidPause): Ditto.
  10954. 2012-11-16 Timothy Hatcher <timothy@apple.com>
  10955. Merge the Debug sidebar panel into Breakpoints sidebar panel.
  10956. Reviewed by Brian Weinstein.
  10957. * UserInterface/BreakpointSidebarPanel.js:
  10958. (WebInspector.BreakpointSidebarPanel): Added CallFramesDidChange event listener. Create the content tree
  10959. outline and section for the Call Stack.
  10960. (WebInspector.BreakpointSidebarPanel.prototype._debuggerCallFramesDidChange): Added.
  10961. (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Support CallFrameTreeElement.
  10962. * UserInterface/DebugSidebarPanel.js: Removed.
  10963. * UserInterface/Main.html: Removed DebugSidebarPanel.
  10964. * UserInterface/Main.js:
  10965. (WebInspector.contentLoaded): Removed DebugSidebarPanel.
  10966. (WebInspector._debuggerDidPause): Show the BreakpointSidebarPanel instead.
  10967. 2012-11-16 Timothy Hatcher <timothy@apple.com>
  10968. Place breakpoints into a section in preparation of merging the Debug and Breakpoints sidebars.
  10969. Reviewed by Brian Weinstein.
  10970. * UserInterface/BreakpointSidebarPanel.js:
  10971. (WebInspector.BreakpointSidebarPanel): Store contentTreeOutline as _breakpointsContentTreeOutline.
  10972. Make a DetailsSection and put the content tree in its only row.
  10973. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Use _breakpointsContentTreeOutline.
  10974. (WebInspector.BreakpointSidebarPanel.prototype._scriptsCleared): Ditto.
  10975. (WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Ditto.
  10976. 2012-11-13 Timothy Hatcher <timothy@apple.com>
  10977. Make dragging the Web Inspector window in the toolbar move the window.
  10978. <rdar://problem/12688599> Should be able to drag to move Web Inspector window from empty parts of toolbar
  10979. Reviewed by Ricky Mondello.
  10980. * UserInterface/Main.js:
  10981. (WebInspector.contentLoaded): Changed mousedown event listener to _toolbarMouseDown.
  10982. (WebInspector._toolbarMouseDown): Added. Call _moveWindowMouseDown or _dockedResizerMouseDown.
  10983. (WebInspector._moveWindowMouseDown): Added.
  10984. (WebInspector._moveWindowMouseDown.toolbarDrag): Added.
  10985. (WebInspector._moveWindowMouseDown.toolbarDragEnd): Added.
  10986. 2012-11-13 Jeff Miller <jeffm@apple.com>
  10987. Regenerated localizedStrings.js, which was out-of-date.
  10988. * Localizations/en.lproj/localizedStrings.js:
  10989. 2012-11-13 Timothy Hatcher <timothy@apple.com>
  10990. Disable sub-pixel antialiasing in the Web Inspector toolbar when in window mode.
  10991. This portion of the window has no background (showing the window chrome). So text rendered
  10992. here does not look good when sub-pixel antialiased.
  10993. Reviewed by Antoine Quint.
  10994. * UserInterface/Toolbar.css:
  10995. (body:not(.docked) .toolbar): Added. Set -webkit-font-smoothing: antialiased.
  10996. 2012-11-12 Timothy Hatcher <timothy@apple.com>
  10997. Don't show the dock button in the toolbar now that it is in the window title bar.
  10998. Reviewed by Antoine Quint.
  10999. * UserInterface/InspectorFrontendAPI.js:
  11000. (InspectorFrontendAPI.setDockingUnavailable): Empty stub now.
  11001. * UserInterface/Main.js:
  11002. (WebInspector.contentLoaded): Changed the dock toggle into an undock button.
  11003. (WebInspector.updateDockedState): Removed use of dockToggleButtonNavigationItem.
  11004. Removed call to _updateDockToggleButtonVisibility.
  11005. (WebInspector.setDockingUnavailable): Removed.
  11006. (WebInspector._updateDockToggleButtonVisibility): Removed.
  11007. (WebInspector._undock): Renamed from _toggleDockedState. Only undock now.
  11008. (WebInspector._updateDockNavigationItems): Update undockButtonNavigationItem too.
  11009. 2012-11-11 Timothy Hatcher <timothy@apple.com>
  11010. Give WebInspector.ContentBrowser the ability to not have back and forward buttons.
  11011. This will be used for the ContentBrowser in the quick console area.
  11012. Reviewed by Antoine Quint.
  11013. * UserInterface/ContentBrowser.js:
  11014. (WebInspector.ContentBrowser): Added disableBackForward argument. Don't create the buttons
  11015. or keyboard shortcuts if disableBackForward is true.
  11016. (WebInspector.ContentBrowser.prototype._updateBackForwardButtons): Return early if the buttons
  11017. don't exist and there is nothing to update.
  11018. 2012-11-11 Timothy Hatcher <timothy@apple.com>
  11019. Fix some flashing while scrolling the Web Inspector when docked.
  11020. When docked the toolbar isn't transparent, so we can have a background
  11021. on the body which fixes the flashing. This isn't an issue in when undocked.
  11022. This also isn't an issue with accelerated composting, which we should turn
  11023. on for the Inspector in <rdar://problem/12676223>.
  11024. Reviewed by Anders Carlsson.
  11025. * UserInterface/Main.css:
  11026. (body.docked): Set the background-color to white.
  11027. 2012-11-11 Timothy Hatcher <timothy@apple.com>
  11028. Fix an exception that was causing the Web Inspector to fail when trying to debug a script.
  11029. The fact that we don't know about a script in a call frame is really a deeper bug. But this
  11030. at least makes things gracefully keep working. The deeper issue is <rdar://problem/12679475>.
  11031. <rdar://problem/12676344> Web Inspector gets stuck trying to debug an exception
  11032. Reviewed by Dean Jackson.
  11033. * UserInterface/DebuggerManager.js:
  11034. (WebInspector.DebuggerManager.prototype.debuggerDidPause): Continue if the SourceCodeLocation
  11035. ended up being null. This prevents an exception later.
  11036. (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload): Return null if
  11037. the script was not found.
  11038. 2012-11-11 Timothy Hatcher <timothy@apple.com>
  11039. Remove the Log navigation sidebar.
  11040. Create a single LogContentView to be shown for the console. Previous sessions are now shown
  11041. inline like the quick console (with a divider between them).
  11042. The ultimate goal here is to merge the quick console and the full height console.
  11043. Reviewed by Dean Jackson.
  11044. * Localizations/en.lproj/localizedStrings.js: Updated.
  11045. * UserInterface/InspectorFrontendAPI.js:
  11046. (InspectorFrontendAPI.showConsole): Call WebInspector.showConsoleView.
  11047. * UserInterface/LogContentView.js:
  11048. (WebInspector.LogContentView): Add event listeners that were in LogSidebarPanel.
  11049. (WebInspector.LogContentView.prototype.shown): Removed disabled check.
  11050. (WebInspector.LogContentView.prototype._sessionsCleared): Added.
  11051. (WebInspector.LogContentView.prototype._sessionStarted): Added.
  11052. (WebInspector.LogContentView.prototype._messageAdded): Added.
  11053. (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated): Added.
  11054. (WebInspector.LogContentView.prototype._handleContextMenuEvent): Removed disabled check.
  11055. (WebInspector.LogContentView.prototype._activeLogCleared): Ditto.
  11056. (WebInspector.LogContentView.prototype._clearLog): Ditto.
  11057. * UserInterface/LogSidebarPanel.js: Removed.
  11058. * UserInterface/LogTreeElement.js:
  11059. (WebInspector.LogTreeElement): Change "Current Log" to "Console".
  11060. * UserInterface/Main.html: Removed LogSidebarPanel.js.
  11061. * UserInterface/Main.js:
  11062. (WebInspector.contentLoaded): Removed LogSidebarPanel use. Create a Console toolbar button.
  11063. Handle the last content cookie for the console.
  11064. (WebInspector.sidebarPanelForRepresentedObject): Return null for the console.
  11065. (WebInspector.contentBrowserTreeElementForRepresentedObject): Return the special tree element
  11066. for the console.
  11067. (WebInspector.showConsoleView): Added.
  11068. (WebInspector._updateCurrentContentViewCookie): Set a special cookie for the console view.
  11069. 2012-11-11 Timothy Hatcher <timothy@apple.com>
  11070. Add reload and inspect toolbar buttons.
  11071. <rdar://problem/11187904> REGRESSION (Safari 6): Inspect node button should always be available
  11072. Reviewed by Dean Jackson.
  11073. * Localizations/en.lproj/localizedStrings.js: Updated.
  11074. * UserInterface/FrameContentView.js:
  11075. (WebInspector.FrameContentView): Removed _inspectModeButtonNavigationItem.
  11076. (WebInspector.FrameContentView.prototype.get navigationItems): Ditto.
  11077. * UserInterface/Images/Reload.pdf: Added.
  11078. * UserInterface/Main.js:
  11079. (WebInspector.contentLoaded): Create the reload and inspect toolbar buttons.
  11080. (WebInspector._inspectModeStateChanged): Added.
  11081. (WebInspector._toggleInspectMode): Added.
  11082. (WebInspector._reloadPageClicked): Added.
  11083. 2012-11-11 Timothy Hatcher <timothy@apple.com>
  11084. Use sticky positioning for the section headers in the Details sidebar.
  11085. To make this work I had to dynamically generate style rules based on the
  11086. current height of the toolbar (now that it is dynamic). Kind of gross, but
  11087. the end result is really nice!
  11088. While I was at it I bumped the height of the headers to 23px to match the
  11089. other bars. That way when they are at the top everything lines up nicely.
  11090. <rdar://problem/12611547> Consider using sticky positioning for sidebar section headers
  11091. Reviewed by Dean Jackson.
  11092. * UserInterface/DetailsSection.css:
  11093. (.details-section > .header): Bump the height and padding up.
  11094. * UserInterface/Main.js:
  11095. (WebInspector.updateDockedState): Call _updateStickyPostionStyles.
  11096. (WebInspector._updateStickyPostionStyles): Added.
  11097. (WebInspector._toolbarDisplayModeDidChange): Call _updateStickyPostionStyles.
  11098. (WebInspector._toolbarSizeModeDidChange): Ditto.
  11099. * UserInterface/Utilities.js:
  11100. (Element.prototype.totalOffsetLeft): Use getBoundingClientRect for better results.
  11101. (Element.prototype.totalOffsetTop): Ditto.
  11102. 2012-11-10 Timothy Hatcher <timothy@apple.com>
  11103. Don't deselect the selected row when refreshing the Network data grid.
  11104. This preserves selection during refreshes that happen while loading the page.
  11105. It also prevents notifying that the selectionPathComponents changed which causes
  11106. the details sidebar to refresh and hide because there was no selection.
  11107. <rdar://problem/12603744> Details sidebar auto-closes while trying to read it on a loading page
  11108. Reviewed by Dean Jackson.
  11109. * UserInterface/TimelinesContentView.js:
  11110. (WebInspector.TimelinesContentView.prototype._selectedNodeChanged): Return early if _ignoreSelectionEvent.
  11111. (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds): Save and restore the
  11112. selectedNode if it was refreshed.
  11113. (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Set _ignoreSelectionEvent while
  11114. updating the data grid.
  11115. 2012-11-10 Timothy Hatcher <timothy@apple.com>
  11116. Don't crossfade the indeterminate progress spinner.
  11117. <rdar://problem/12676407> Web Inspector shouldn't cross-fade its "discrete" spinner
  11118. Reviewed by Dan Bernstein.
  11119. * UserInterface/IndeterminateProgressSpinner.css:
  11120. (.indeterminate-progress-spinner): Use -webkit-animation-timing-function: step-start.
  11121. 2012-11-10 Timothy Hatcher <timothy@apple.com>
  11122. Prevent the details sidebar from ever being shown empty.
  11123. This removes the setting to auto hide when empty and always hides when empty.
  11124. Reviewed by Antoine Quint.
  11125. * UserInterface/Main.js:
  11126. (WebInspector.contentLoaded): Removed _detailsSidebarAutoHideWhenEmptySetting and start the
  11127. details sidebar out in the collapsed state.
  11128. (WebInspector._sidebarCollapsedStateDidChange): Don't remember the collapsed state if
  11129. _ignoreDetailsSidebarPanelCollapsedEvent is set. This is for ignoring programatic changes.
  11130. (WebInspector._contentBrowserRepresentedObjectsDidChange): Removed _detailsSidebarAutoHideWhenEmptySetting.
  11131. 2012-11-10 Timothy Hatcher <timothy@apple.com>
  11132. Don't draw a background on the toolbar when the window is inactive.
  11133. We want to show through to the window chrome in this case too.
  11134. Reviewed by Dan Bernstein.
  11135. * UserInterface/Toolbar.css:
  11136. (body.window-inactive .toolbar): Removed background-image.
  11137. 2012-11-10 Timothy Hatcher <timothy@apple.com>
  11138. Move the time bar to the bottom so the sidebar elements align with the timelines again.
  11139. Now that the sidebars don't have a navigation bar, everything is shifted higher in the sidebar.
  11140. This caused a misalignment in the timeline view. The best solution is to move the time bar to the
  11141. bottom so the timeline overviews line up with the tree elements in the sidebar again. The Profiles
  11142. sidebar header does not align with the data grid header anymore, but that does not matter as much.
  11143. Maybe later we can add a summary or zoom slider to sidebar, shifting Profiles down again.
  11144. To make the time bar not be as distracting the background is now white and the markers fade out.
  11145. The fade points in the direction of the graph, up for the overview and down for the network graph.
  11146. This prevents the lines from touching since the two time bars are now next to each other.
  11147. Reviewed by Ricky Mondello.
  11148. * UserInterface/NetworkDataGrid.css:
  11149. (.network-timeline-decorations > .header):
  11150. (.network-timeline-decorations > .header > .divider):
  11151. (.network-timeline-decorations:not(.sort-active) > .header > .divider:last-child):
  11152. (.network-timeline-decorations > .header > .divider > .label):
  11153. * UserInterface/TimelineDecorations.css:
  11154. (.timeline-decorations > .header):
  11155. (.timeline-decorations > .header > .divider):
  11156. (.timeline-decorations > .header > .divider:last-child):
  11157. (.timeline-decorations > .header > .divider > .label):
  11158. * UserInterface/TimelineOverview.js:
  11159. (WebInspector.TimelineOverview):
  11160. * UserInterface/Toolbar.css:
  11161. 2012-11-10 Timothy Hatcher <timothy@apple.com>
  11162. Merge the Storage sidebar into the Resources sidebar.
  11163. Most of this is just copied from StorageSidebarPanel with trivial tweaks to work
  11164. inside of ResourceSidebarPanel.
  11165. Reviewed by Antoine Quint.
  11166. * UserInterface/ApplicationCacheFrameTreeElement.js:
  11167. (WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles):
  11168. * UserInterface/InspectorObserver.js:
  11169. (WebInspector.InspectorObserver.prototype.inspect):
  11170. * UserInterface/Main.html:
  11171. * UserInterface/Main.js:
  11172. (WebInspector.contentLoaded):
  11173. (WebInspector.sidebarPanelForRepresentedObject):
  11174. * UserInterface/ResourceSidebarPanel.js:
  11175. (WebInspector.ResourceSidebarPanel):
  11176. (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
  11177. (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie.finalizeCookieChecking):
  11178. (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie):
  11179. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
  11180. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
  11181. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
  11182. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
  11183. (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
  11184. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
  11185. (WebInspector.ResourceSidebarPanel.prototype._domNodeWasInspected):
  11186. (WebInspector.ResourceSidebarPanel.prototype._checkStorageTreeElementAgainstPendingContentViewCookie):
  11187. (WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasAdded):
  11188. (WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasInspected):
  11189. (WebInspector.ResourceSidebarPanel.prototype._databaseWasAdded):
  11190. (WebInspector.ResourceSidebarPanel.prototype._databaseWasInspected):
  11191. (WebInspector.ResourceSidebarPanel.prototype._cookieStorageObjectWasAdded):
  11192. (WebInspector.ResourceSidebarPanel.prototype._frameManifestAdded):
  11193. (WebInspector.ResourceSidebarPanel.prototype._frameManifestRemoved):
  11194. (WebInspector.ResourceSidebarPanel.prototype._compareTreeElements):
  11195. (WebInspector.ResourceSidebarPanel.prototype._addStorageChild):
  11196. (WebInspector.ResourceSidebarPanel.prototype._storageCleared):
  11197. * UserInterface/StorageSidebarPanel.js: Removed.
  11198. 2012-11-09 Timothy Hatcher <timothy@apple.com>
  11199. Remove the Issues sidebar.
  11200. It might come back in some form in the new Debugger sidebar if there is demand.
  11201. But it has proven to not be that helpful in its current form.
  11202. Reviewed by Antoine Quint.
  11203. * UserInterface/IssueIcons.css: Removed.
  11204. * UserInterface/IssueSidebarPanel.js: Removed.
  11205. * UserInterface/IssueTreeElement.js: Removed.
  11206. * UserInterface/Main.html:
  11207. * UserInterface/Main.js:
  11208. (WebInspector.contentLoaded):
  11209. 2012-11-09 Timothy Hatcher <timothy@apple.com>
  11210. Add placeholders to all the search and filter fields in the navigation sidebars.
  11211. <rdar://problem/11113717> Two search-related fields in the Search sidebar is confusing
  11212. Reviewed by Dan Bernstein.
  11213. * Localizations/en.lproj/localizedStrings.js: Updated.
  11214. * UserInterface/BreakpointSidebarPanel.js:
  11215. (WebInspector.BreakpointSidebarPanel):
  11216. * UserInterface/DebugSidebarPanel.js:
  11217. (WebInspector.DebugSidebarPanel):
  11218. * UserInterface/FilterBar.js:
  11219. (WebInspector.FilterBar.prototype.get placeholder): Added.
  11220. (WebInspector.FilterBar.prototype.set placeholder): Added.
  11221. * UserInterface/InstrumentSidebarPanel.js:
  11222. (WebInspector.InstrumentSidebarPanel):
  11223. * UserInterface/LogSidebarPanel.js:
  11224. (WebInspector.LogSidebarPanel):
  11225. * UserInterface/ResourceSidebarPanel.js:
  11226. (WebInspector.ResourceSidebarPanel):
  11227. * UserInterface/StorageSidebarPanel.js:
  11228. (WebInspector.StorageSidebarPanel):
  11229. 2012-11-09 Timothy Hatcher <timothy@apple.com>
  11230. Merge the Search sidebar into the Resources sidebar.
  11231. Most of this is just copied from SearchSidebarPanel with trivial tweaks to work
  11232. inside of ResourceSidebarPanel.
  11233. Rubber-stamped by Antoine Quint.
  11234. * UserInterface/Main.html:
  11235. * UserInterface/Main.js:
  11236. (WebInspector.contentLoaded):
  11237. * UserInterface/ResourceSidebarPanel.css: Added.
  11238. * UserInterface/ResourceSidebarPanel.js:
  11239. (WebInspector.ResourceSidebarPanel):
  11240. (WebInspector.ResourceSidebarPanel.prototype.get contentTreeOutlineToAutoPrune):
  11241. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
  11242. (WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon):
  11243. (WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder):
  11244. (WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback):
  11245. (WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback):
  11246. (WebInspector.ResourceSidebarPanel.prototype.performSearch.domSearchResults):
  11247. (WebInspector.ResourceSidebarPanel.prototype.performSearch.domCallback):
  11248. (WebInspector.ResourceSidebarPanel.prototype.performSearch):
  11249. (WebInspector.ResourceSidebarPanel.prototype._searchFieldChanged):
  11250. (WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForResource):
  11251. (WebInspector.ResourceSidebarPanel.prototype._focusSearchField):
  11252. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
  11253. (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
  11254. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
  11255. * UserInterface/SearchSidebarPanel.css: Removed.
  11256. * UserInterface/SearchSidebarPanel.js: Removed.
  11257. 2012-11-09 Timothy Hatcher <timothy@apple.com>
  11258. Allow setting the contentTreeOutline of a WebInspector.NavigationSidebarPanel.
  11259. This will allow one sidebar to manage multiple content trees, so we can merge
  11260. Resources and Search into one.
  11261. Reviewed by Antoine Quint.
  11262. * UserInterface/NavigationSidebarPanel.js:
  11263. (WebInspector.NavigationSidebarPanel): Use createContentTreeOutline.
  11264. (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Use .element.
  11265. (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline): Added.
  11266. (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineToAutoPrune): Added.
  11267. (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): Added.
  11268. (WebInspector.NavigationSidebarPanel.prototype.show): Use contentTreeOutlineElement.
  11269. (WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Use the
  11270. new contentTreeOutlineToAutoPrune property.
  11271. * UserInterface/TreeOutline.js:
  11272. (TreeOutline): Set .element for public use.
  11273. 2012-11-09 Nathan de Vries <ndevries@apple.com>
  11274. Fix for <rdar://problem/11498628> Can inadvertently copy part of the UI
  11275. when attempting to copy the Full URL of a resource
  11276. Ensure that when a value in the details side pane is triple-tapped to
  11277. select the whole value, the label from the following row is not included
  11278. in the selection.
  11279. The table-cell selection issue will be addressed properly in
  11280. <rdar://problem/12668870> Triple-clicking text within a <div> set to
  11281. "display: table-cell" selects text outside the cell
  11282. Reviewed by Timothy Hatcher.
  11283. * UserInterface/DetailsSectionSimpleRow.js:
  11284. (WebInspector.DetailsSectionSimpleRow): Add a click handler to the value
  11285. cell and adjust the selection range on triple-click if it extends beyond
  11286. the cell.
  11287. 2012-11-09 Joseph Pecoraro <pecoraro@apple.com>
  11288. <rdar://problem/12526413> Compositing borders button does not work for iOS 6 (should be suppressed or dimmed)
  11289. Reviewed by Jon Honeycutt.
  11290. Disable the toggle compositing borders navigation button when debugging
  11291. an iOS 6 device, which doesn't have backend support for it.
  11292. * UserInterface/FrameContentView.js:
  11293. (WebInspector.FrameContentView.prototype._toggleCompositingBorders):
  11294. (WebInspector.FrameContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
  11295. 2012-11-09 Joseph Pecoraro <pecoraro@apple.com>
  11296. <rdar://problem/12462428> Make the Safari Curie Web Inspector compatible with iOS 6
  11297. Reviewed by Timothy Hatcher.
  11298. In production builds be sure to copy over resources that are
  11299. dynamically loaded in the frontend, and aren't explicitly loaded
  11300. by Main.html.
  11301. * Scripts/copy-user-interface-resources.sh:
  11302. 2012-11-09 Joseph Pecoraro <pecoraro@apple.com>
  11303. <rdar://problem/12462428> Make the Safari Curie Web Inspector compatible with iOS 6
  11304. Reviewed by Timothy Hatcher.
  11305. In this change the inspector frontend will load a backend commands file
  11306. that is exactly compatible with the backend it is communicating with.
  11307. When loading the frontend for a remote session the RWI frontend host
  11308. can suggest a more specific InspectorBackendCommands file to load.
  11309. For non-remote session, or non-legacy remote session
  11310. the default InspectorBackendCommands.js file is loaded.
  11311. This approach has some benefits:
  11312. - loading the exact set of backend commands allows backend feature
  11313. detection by simply checking if the "BackendAgent.<method>" exists.
  11314. Therefore you immediately get errors if you use a backend agent
  11315. method without feature detecting it.
  11316. - by having Legacy InspectorBackendCommands files checked in it is
  11317. easier to see exactly what an older version of iOS supported and
  11318. when functions were added / removed.
  11319. And drawbacks:
  11320. - if a protocol message changes in some way (renamed params, gains or
  11321. loses params, reorders params, changes to multiple methods, etc) we
  11322. may need to do extra work to ensure compatibility with older devices.
  11323. Like we've already seen with Database SQL handling.
  11324. Timothy Hatcher already addressed all of the iOS 6 protocol changes so far.
  11325. * UserInterface/LoadInspectorBackendCommands.js: Added.
  11326. Load either the default InspectorBackendCommands.js or the one exposed
  11327. by InspectorFrontendHost.inspectorBackendCommandsURL() in remote sessions.
  11328. * UserInterface/Main.html:
  11329. Remove InspectorBackendLegacyCommands, add in LoadInspectorBackendCommands.
  11330. * UserInterface/InspectorBackendLegacyCommands.js: Removed.
  11331. * UserInterface/Legacy/6.0/InspectorBackendCommands.js: Added.
  11332. This is the complete InspectorBackendCommands supported by iOS 6.
  11333. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11334. Fix an exception that started happening in the Web Inspector, that broke everything.
  11335. Revision 133862 of WebCore started looking for InspectorFrontendAPI.dispatchMessageAsync.
  11336. So we need to implement thta method to make things work again. There are a few other
  11337. methods that needed added to InspectorFrontendAPI too.
  11338. Reviewed by Antoine Quint.
  11339. * UserInterface/InspectorFrontendAPI.js:
  11340. (InspectorFrontendAPI.contextMenuItemSelected): Added.
  11341. (InspectorFrontendAPI.contextMenuCleared): Added.
  11342. (InspectorFrontendAPI.dispatchMessageAsync): Added.
  11343. (InspectorFrontendAPI.dispatchMessage): Added.
  11344. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11345. Default to horizontal labels and small icons for the toolbar when docked.
  11346. This also remembers the toolbar modes for docked and undocked if the user changes them.
  11347. Reviewed by Ricky Mondello.
  11348. * UserInterface/Main.js:
  11349. (WebInspector.contentLoaded): Listen for the new toolbar events and create the settings.
  11350. (WebInspector.updateDockedState): Change the modes using the settings based on docked state.
  11351. (WebInspector._toolbarDisplayModeDidChange): Added. Store the mode in the setting.
  11352. (WebInspector._toolbarSizeModeDidChange): Added. Ditto.
  11353. * UserInterface/Toolbar.js:
  11354. (WebInspector.Toolbar.prototype.set displayMode): Fire the DisplayModeDidChange event.
  11355. (WebInspector.Toolbar.prototype.set sizeMode): Fire the SizeModeDidChange event.
  11356. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11357. Fix an exception that was preventing console expression from evaluating.
  11358. This exposed a deeper issue where we were not using the origin property for DOM storage
  11359. objects and still looking for the host property.
  11360. There also seems to be a backend issue where local storage is showing up twice.
  11361. https://bugs.webkit.org/show_bug.cgi?id=101643
  11362. <rdar://problem/12656188> Can't evaluate expressions in the console on this npr.org page
  11363. Reviewed by Ricky Mondello.
  11364. * UserInterface/DOMStorageObserver.js:
  11365. (WebInspector.DOMStorageObserver.prototype.addDOMStorage): Look for origin and parse
  11366. the host out of it since our code still expects the host.
  11367. * UserInterface/StorageSidebarPanel.js:
  11368. (WebInspector.StorageSidebarPanel.prototype._compareTreeElementsByMainTitle): Assert
  11369. that the mainTitle is not empty/null/undefined. Handle it anyway just in case.
  11370. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11371. Update the Web Inspector strings for all the string changes in the last few revisions.
  11372. Part of:
  11373. <rdar://problem/10947541> Navigation bar buttons are too small
  11374. <rdar://problem/12294575> Navigation bar button icons are difficult to identify
  11375. <rdar://problem/12589291> Navigation bar buttons are unlabeled
  11376. Reviewed by Ricky Mondello.
  11377. * Localizations/en.lproj/localizedStrings.js: Updated.
  11378. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11379. Add the sidebar panel toolbar items and dock controls to the toolbar.
  11380. Part of:
  11381. <rdar://problem/10947541> Navigation bar buttons are too small
  11382. <rdar://problem/12294575> Navigation bar button icons are difficult to identify
  11383. <rdar://problem/12589291> Navigation bar buttons are unlabeled
  11384. Reviewed by Ricky Mondello.
  11385. * UserInterface/Main.js:
  11386. (WebInspector.contentLoaded):
  11387. (WebInspector._updateDockToggleButtonVisibility):
  11388. (WebInspector._updateDockNavigationItems):
  11389. (WebInspector._contentBrowserRepresentedObjectsDidChange):
  11390. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11391. Remove the toggle sidebar buttons and keyboard shortcuts.
  11392. Part of:
  11393. <rdar://problem/10947541> Navigation bar buttons are too small
  11394. <rdar://problem/12294575> Navigation bar button icons are difficult to identify
  11395. <rdar://problem/12589291> Navigation bar buttons are unlabeled
  11396. Reviewed by Ricky Mondello.
  11397. * UserInterface/Main.js:
  11398. (WebInspector.contentLoaded):
  11399. (WebInspector._navigationSidebarPanelSelected):
  11400. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11401. Don't have sidebars manage and display a NavigationBar anymore.
  11402. This removes the navigation bar from Sidebar and makes each SidebarPanel have a toolbar item instead.
  11403. To work with the toolbar item the display names and tooltips have been tweaked. The toolbar items
  11404. are not used in the toolbar yet.
  11405. Part of:
  11406. <rdar://problem/10947541> Navigation bar buttons are too small
  11407. <rdar://problem/12294575> Navigation bar button icons are difficult to identify
  11408. <rdar://problem/12589291> Navigation bar buttons are unlabeled
  11409. Reviewed by Ricky Mondello.
  11410. * UserInterface/AppearanceDetailsSidebarPanel.js:
  11411. (WebInspector.AppearanceDetailsSidebarPanel):
  11412. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  11413. (WebInspector.ApplicationCacheDetailsSidebarPanel):
  11414. * UserInterface/BreakpointSidebarPanel.js:
  11415. (WebInspector.BreakpointSidebarPanel):
  11416. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  11417. (WebInspector.CSSStyleDetailsSidebarPanel):
  11418. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  11419. (WebInspector.DOMNodeDetailsSidebarPanel):
  11420. * UserInterface/DebugSidebarPanel.js:
  11421. (WebInspector.DebugSidebarPanel):
  11422. * UserInterface/DetailsSidebarPanel.js:
  11423. (WebInspector.DetailsSidebarPanel):
  11424. * UserInterface/InstrumentSidebarPanel.js:
  11425. (WebInspector.InstrumentSidebarPanel):
  11426. * UserInterface/IssueSidebarPanel.js:
  11427. (WebInspector.IssueSidebarPanel):
  11428. * UserInterface/LogSidebarPanel.js:
  11429. (WebInspector.LogSidebarPanel):
  11430. * UserInterface/NavigationSidebarPanel.js:
  11431. (WebInspector.NavigationSidebarPanel):
  11432. (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
  11433. (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
  11434. (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
  11435. (WebInspector.NavigationSidebarPanel.prototype.shown):
  11436. (WebInspector.NavigationSidebarPanel.prototype.hidden):
  11437. (WebInspector.NavigationSidebarPanel.prototype._updateToolbarItemVisibility):
  11438. * UserInterface/ResourceDetailsSidebarPanel.js:
  11439. (WebInspector.ResourceDetailsSidebarPanel):
  11440. * UserInterface/ResourceSidebarPanel.js:
  11441. (WebInspector.ResourceSidebarPanel):
  11442. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  11443. (WebInspector.ScopeChainDetailsSidebarPanel):
  11444. * UserInterface/SearchSidebarPanel.js:
  11445. (WebInspector.SearchSidebarPanel):
  11446. * UserInterface/Sidebar.css:
  11447. (.sidebar > .panel):
  11448. (.sidebar.right):
  11449. * UserInterface/Sidebar.js:
  11450. (WebInspector.Sidebar):
  11451. (WebInspector.Sidebar.prototype.addSidebarPanel):
  11452. (WebInspector.Sidebar.prototype.removeSidebarPanel):
  11453. (WebInspector.Sidebar.prototype.set selectedSidebarPanel):
  11454. (WebInspector.Sidebar.prototype.get minimumWidth):
  11455. (WebInspector.Sidebar.prototype.set width):
  11456. (WebInspector.Sidebar.prototype.set collapsed):
  11457. * UserInterface/SidebarPanel.js:
  11458. (WebInspector.SidebarPanel):
  11459. (WebInspector.SidebarPanel.prototype.get toolbarItem):
  11460. (WebInspector.SidebarPanel.prototype.get visible):
  11461. (WebInspector.SidebarPanel.prototype.hide):
  11462. (WebInspector.SidebarPanel.prototype.toggle):
  11463. (WebInspector.SidebarPanel.prototype.added):
  11464. (WebInspector.SidebarPanel.prototype.removed):
  11465. (WebInspector.SidebarPanel.prototype.hidden):
  11466. (WebInspector.SidebarPanel.prototype.visibilityDidChange):
  11467. * UserInterface/StorageSidebarPanel.js:
  11468. (WebInspector.StorageSidebarPanel):
  11469. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11470. Rename the QuickConsole toolbar style class so it does not conflict with the new Toolbar class.
  11471. Part of:
  11472. <rdar://problem/10947541> Navigation bar buttons are too small
  11473. <rdar://problem/12294575> Navigation bar button icons are difficult to identify
  11474. <rdar://problem/12589291> Navigation bar buttons are unlabeled
  11475. Reviewed by Ricky Mondello.
  11476. * UserInterface/QuickConsole.css:
  11477. (.quick-console > .quick-console-toolbar):
  11478. (.quick-console > .quick-console-toolbar > .text-prompt):
  11479. (.quick-console > .quick-console-toolbar > .navigation-bar-container):
  11480. (.quick-console > .quick-console-toolbar > .navigation-bar-container > .navigation-bar-spacer):
  11481. (.quick-console > .quick-console-toolbar > .navigation-bar-container > .navigation-bar):
  11482. (.quick-console > .quick-console-toolbar.scroll-divider):
  11483. (.quick-console > .quick-console-toolbar > .text-prompt > .javascript-prompt):
  11484. * UserInterface/QuickConsole.js:
  11485. 2012-11-08 Timothy Hatcher <timothy@apple.com>
  11486. Add a toolbar class and toolbar item classes to the Web Inspector.
  11487. The toolbar and item inherits most of the functionality from the existing NavigationBar and ButtonNavigationItem.
  11488. This also makes the toolbar be the resize area when docked. No items are added to the toolbar yet.
  11489. Part of:
  11490. <rdar://problem/10947541> Navigation bar buttons are too small
  11491. <rdar://problem/12294575> Navigation bar button icons are difficult to identify
  11492. <rdar://problem/12589291> Navigation bar buttons are unlabeled
  11493. Reviewed by Ricky Mondello.
  11494. * UserInterface/ActivateButtonToolbarItem.js: Added.
  11495. (WebInspector.ActivateButtonToolbarItem):
  11496. (WebInspector.ActivateButtonToolbarItem.prototype.get label):
  11497. (WebInspector.ActivateButtonToolbarItem.prototype.set label):
  11498. * UserInterface/ButtonToolbarItem.css: Added.
  11499. (.toolbar > .item.button):
  11500. (.toolbar.icon-and-label-vertical > .item.button):
  11501. (.toolbar.icon-and-label-horizontal > .item.button):
  11502. (.toolbar > .item.button > .glyph):
  11503. (.toolbar.small-size > .item.button > .glyph):
  11504. (.toolbar.label-only > .item.button > .glyph):
  11505. (.toolbar > .item.button > .label):
  11506. (.toolbar.label-only > .item.activate.button.activated > .label):
  11507. (.toolbar.icon-and-label-horizontal > .item.button > .label):
  11508. (.toolbar.icon-only > .item.button > .label):
  11509. (body.window-inactive .toolbar > .item.button):
  11510. (.toolbar > .item.button.disabled):
  11511. (body.window-inactive .toolbar > .item.button.disabled):
  11512. * UserInterface/ButtonToolbarItem.js: Added.
  11513. (WebInspector.ButtonToolbarItem):
  11514. (WebInspector.ButtonToolbarItem.prototype.get label):
  11515. (WebInspector.ButtonToolbarItem.prototype.set label):
  11516. * UserInterface/ControlToolbarItem.css: Added.
  11517. (.toolbar > .item.control):
  11518. (.toolbar.icon-and-label-vertical > .item.control):
  11519. (.toolbar > .item.control:not(.hidden) + .item.control):
  11520. (.toolbar > .item.control > .glyph):
  11521. (body.window-inactive .toolbar > .item.control > .glyph):
  11522. (.toolbar > .item.control.disabled > .glyph):
  11523. (body.window-inactive .toolbar > .item.control.disabled > .glyph):
  11524. * UserInterface/ControlToolbarItem.js: Added.
  11525. (WebInspector.ControlToolbarItem):
  11526. * UserInterface/Main.css:
  11527. (body):
  11528. (#toolbar):
  11529. (body.docked #toolbar):
  11530. (body.docked #toolbar .item:not(.flexible-space)):
  11531. (#main):
  11532. * UserInterface/Main.html:
  11533. * UserInterface/Main.js:
  11534. (WebInspector.contentLoaded):
  11535. (WebInspector._reloadPageIgnoringCache):
  11536. (WebInspector._copy):
  11537. * UserInterface/ToggleControlToolbarItem.js: Added.
  11538. (WebInspector.ToggleControlToolbarItem):
  11539. * UserInterface/Toolbar.css: Added.
  11540. (.toolbar):
  11541. (.toolbar.icon-and-label-vertical):
  11542. (.toolbar.icon-and-label-vertical.small-size):
  11543. (.toolbar.icon-only):
  11544. (.toolbar.label-only):
  11545. (body.docked .toolbar):
  11546. (body.window-inactive .toolbar):
  11547. (.toolbar > .item):
  11548. * UserInterface/Toolbar.js: Added.
  11549. (WebInspector.Toolbar):
  11550. (WebInspector.Toolbar.prototype.get displayMode):
  11551. (WebInspector.Toolbar.prototype.set displayMode):
  11552. (WebInspector.Toolbar.prototype.get sizeMode):
  11553. (WebInspector.Toolbar.prototype.set sizeMode):
  11554. (WebInspector.Toolbar.prototype._handleContextMenuEvent):
  11555. (WebInspector.Toolbar.prototype._changeDisplayMode):
  11556. (WebInspector.Toolbar.prototype._toggleSmallIcons):
  11557. 2012-11-07 Timothy Hatcher <timothy@apple.com>
  11558. Make the Web Inspector correctly reflect the docked state again.
  11559. The query parameter changed in r133393. The front-end needs to look for the
  11560. new dockSide parameter instead of docked.
  11561. Reviewed by Jon Honeycutt.
  11562. * UserInterface/Main.js:
  11563. (WebInspector.contentLoaded): Look for dockSide === "bottom".
  11564. 2012-11-05 Timothy Hatcher <timothy@apple.com>
  11565. Change the point to inspect button icon from a hand to a crosshair.
  11566. Reviewed by Dan Bernstein.
  11567. * UserInterface/FrameContentView.js:
  11568. (WebInspector.FrameContentView): Use Crosshair.pdf instead of Hand.pdf.
  11569. * UserInterface/Images/Crosshair.pdf: Added.
  11570. * UserInterface/Images/Hand.pdf: Removed.
  11571. 2012-11-04 Timothy Hatcher <timothy@apple.com>
  11572. Fix the line numbers in the JavaScript & Events timeline; make them 0-based.
  11573. The rest of the Web Inspector expects 0-based line numbers. But the line numbers in the
  11574. JavaScript & Events timeline come in 1-based. We were displaying them correctly before,
  11575. but clicking the go-to arrow would instead highlight the next line in the source.
  11576. Reviewed by Joseph Pecoraro.
  11577. * UserInterface/ScriptTimelineDataGridNode.js:
  11578. (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Correctly display the now
  11579. 0-based line number. Also add the line number to the tooltip to match what we do elsewhere.
  11580. (WebInspector.ScriptTimelineDataGridNode.prototype._goToResource): Only pass the lineNumber if it
  11581. isn't the first line.
  11582. * UserInterface/TimelineManager.js:
  11583. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Subtract 1 from the line numbers
  11584. coming in over the protocol before using them elsewhere in the Inspector.
  11585. 2012-11-04 Timothy Hatcher <timothy@apple.com>
  11586. Rename ContentView.keepElementsScrolledToTheBottom to ContentView.shouldKeepElementsScrolledToBottom.
  11587. Reviewed by Dan Bernstein.
  11588. * UserInterface/ContentView.js:
  11589. (WebInspector.ContentView.prototype.get shouldKeepElementsScrolledToBottom):
  11590. * UserInterface/ContentViewContainer.js:
  11591. (WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView):
  11592. * UserInterface/LogContentView.js:
  11593. (WebInspector.LogContentView.prototype.get shouldKeepElementsScrolledToBottom):
  11594. * UserInterface/TimelinesContentView.js:
  11595. (WebInspector.TimelinesContentView.prototype.get shouldKeepElementsScrolledToBottom):
  11596. 2012-11-04 Timothy Hatcher <timothy@apple.com>
  11597. Save and restore the timeline scroll positions when going back and forth between views.
  11598. Reviewed by Dan Bernstein and Joseph Pecoraro.
  11599. * UserInterface/TimelinesContentView.js:
  11600. (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Save and restore
  11601. the scroll position when swapping the DataGrids.
  11602. (WebInspector.TimelinesContentView.prototype.get scrollableElements): Added.
  11603. (WebInspector.TimelinesContentView.prototype.get keepElementsScrolledToTheBottom): Added.
  11604. 2012-11-04 Timothy Hatcher <timothy@apple.com>
  11605. Show the Initiator for the layout and style events in the Layout and Rendering timeline.
  11606. This removes the Area column to make room.
  11607. <rdar://problem/10935408> PARITY (WebKit Web Inspector): Add initiator information to the timeline
  11608. data grids (e.g. JS stacks for RecalcStyle, Layout and Painting)
  11609. Reviewed by Ricky Mondello and Joseph Pecoraro.
  11610. * Localizations/en.lproj/localizedStrings.js: Updated.
  11611. * UserInterface/CallFrame.js:
  11612. (WebInspector.CallFrame): Added nativeCode parameter. Allow more null parameters in asserts.
  11613. (WebInspector.CallFrame.prototype.get nativeCode): Ditto.
  11614. * UserInterface/LayoutTimelineDataGridNode.js:
  11615. (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent): Removed "area" and added
  11616. "initiatorCallFrame" support.
  11617. * UserInterface/LayoutTimelineRecord.js:
  11618. (WebInspector.LayoutTimelineRecord): Added callFrames parameter.
  11619. (WebInspector.LayoutTimelineRecord.prototype.get callFrames): Added.
  11620. (WebInspector.LayoutTimelineRecord.prototype.get initiatorCallFrame): Added.
  11621. * UserInterface/Main.js:
  11622. (WebInspector.createSourceCodeLocationLink): Added helper.
  11623. * UserInterface/TimelineManager.js:
  11624. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Build CallFrames from the
  11625. record stack trace.
  11626. (WebInspector.TimelineManager.prototype._callFramesFromPayload): Added.
  11627. (WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame): Added.
  11628. * UserInterface/TimelinesContentView.css:
  11629. (.content-view.timelines > .data-grid td .subtitle): Added.
  11630. (.content-view.timelines > .data-grid:focus tr.selected td .subtitle): Added.
  11631. (.content-view.timelines > .data-grid td .icon): Simplified selector to work with any column.
  11632. * UserInterface/TimelinesContentView.js:
  11633. (WebInspector.TimelinesContentView): Added Initiator column.
  11634. (WebInspector.TimelinesContentView.prototype._sortComparator): Added support for comparing CallFrame.
  11635. 2012-11-03 Timothy Hatcher <timothy@apple.com>
  11636. Rename ScriptLocation to SourceCodeLocation so it can be reused for more generic stack traces.
  11637. Rubber-stamped by Dan Bernstein.
  11638. * UserInterface/CallFrame.js:
  11639. (WebInspector.CallFrame):
  11640. (WebInspector.CallFrame.prototype.get sourceCodeLocation):
  11641. * UserInterface/CallFrameTreeElement.js:
  11642. (WebInspector.CallFrameTreeElement):
  11643. * UserInterface/DebugSidebarPanel.js:
  11644. (WebInspector.DebugSidebarPanel.prototype._treeElementSelected):
  11645. * UserInterface/DebuggerManager.js:
  11646. (WebInspector.DebuggerManager.prototype.debuggerDidPause):
  11647. (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
  11648. * UserInterface/Main.html:
  11649. * UserInterface/SourceCodeLocation.js: Renamed from WebInspector/UserInterface/ScriptLocation.js.
  11650. (WebInspector.SourceCodeLocation):
  11651. (WebInspector.SourceCodeLocation.prototype.get sourceCode):
  11652. (WebInspector.SourceCodeLocation.prototype.get lineNumber):
  11653. (WebInspector.SourceCodeLocation.prototype.get columnNumber):
  11654. * UserInterface/SourceCodeTextEditor.js:
  11655. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
  11656. (WebInspector.SourceCodeTextEditor.prototype._matchesSourceCodeLocation):
  11657. 2012-11-03 Timothy Hatcher <timothy@apple.com>
  11658. Start showing "Invalidate Styles" and "Invalidate Layout" in the Layout and Rendering timeline.
  11659. These records will be the one showing the initiator (back trace) information.
  11660. Part of: <rdar://problem/10935408> PARITY (WebKit Web Inspector): Add initiator information to the timeline
  11661. data grids (e.g. JS stacks for RecalcStyle, Layout and Painting)
  11662. Reviewed by Joseph Pecoraro.
  11663. * Localizations/en.lproj/localizedStrings.js: Updated.
  11664. * UserInterface/LayoutTimelineRecord.js:
  11665. (WebInspector.LayoutTimelineRecord.EventType.displayName): Support InvalidateStyles and InvalidateLayout.
  11666. * UserInterface/TimelineManager.js:
  11667. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Handle "ScheduleStyleRecalculation"
  11668. and "InvalidateLayout" and create records for them.
  11669. 2012-11-03 Timothy Hatcher <timothy@apple.com>
  11670. Round width and height in the metrics sidebar to the nearest hundredth.
  11671. Width and height were missed when the other metrics started to be rounded. This also fixes
  11672. editing by using the unrounded value instead of keeping the tilde. Also append "px" when
  11673. updating the style if there is a decimal value.
  11674. Reviewed by Joseph Pecoraro.
  11675. * UserInterface/BoxModelDetailsSectionRow.js:
  11676. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): Added. Moved from
  11677. the createBoxPartElement function.
  11678. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement): Use createElement.
  11679. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement): Renamed
  11680. from getContentAreaWidthPx. Use createElement.
  11681. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement): Renamed
  11682. from getContentAreaHeightPx. Use createElement.
  11683. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics): Use createContentAreaWidthElement
  11684. and createContentAreaHeightElement instead.
  11685. (WebInspector.BoxModelDetailsSectionRow.prototype._startEditing): If the target element has a title use
  11686. it as the editing value since the current text is likely truncated/rounded.
  11687. (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput): Account for decimals values.
  11688. 2012-11-03 Timothy Hatcher <timothy@apple.com>
  11689. Clear the quick console when navigating to another page.
  11690. When reloading the same page we insert a divider.
  11691. <rdar://problem/11194811> Quick Console does not clear on navigation/refresh
  11692. Reviewed by Joseph Pecoraro.
  11693. * UserInterface/ConsoleGroup.js:
  11694. (WebInspector.ConsoleGroup): Added newSession parameter and style class.
  11695. * UserInterface/JavaScriptLogViewController.js:
  11696. (WebInspector.JavaScriptLogViewController): Removed group creation and call startNewSession.
  11697. (WebInspector.JavaScriptLogViewController.prototype.clear): Call startNewSession passing true.
  11698. (WebInspector.JavaScriptLogViewController.prototype.startNewSession): Added. Moved parts
  11699. from clear and the constructor.
  11700. * UserInterface/LogContentView.css:
  11701. (.console-messages > .console-group:last-of-type .console-user-command): Added.
  11702. (.console-message, .console-user-command): Removed border-bottom.
  11703. (.console-message:not(:last-child), .console-user-command:not(:last-child)): Added.
  11704. (.console-group:not(:first-child)): Added.
  11705. (.console-group.new-session): Added.
  11706. * UserInterface/LogContentView.js:
  11707. (WebInspector.LogContentView.prototype._activeLogCleared): Check isWaitingForResult
  11708. to make sure this was the console that requested the clear.
  11709. * UserInterface/QuickConsole.css:
  11710. (.quick-console > .toolbar): Added shadow to look like a border on the toolbar. This
  11711. is needed now that the last console message does not have a bottom-border.
  11712. * UserInterface/QuickConsole.js:
  11713. (WebInspector.QuickConsole):
  11714. (WebInspector.QuickConsole.prototype.didClearMessages): Clear _lastMessage and _lastMessageIgnored.
  11715. (WebInspector.QuickConsole.prototype._activeLogCleared): Check isWaitingForResult
  11716. to make sure this was the console that requested the clear.
  11717. (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated):
  11718. (WebInspector.QuickConsole.prototype._logsCleared): Added.
  11719. (WebInspector.QuickConsole.prototype._sessionStarted): Added.
  11720. 2012-10-31 Timothy Hatcher <timothy@apple.com>
  11721. Don't show 'undefined' in the console after sending the clear() command.
  11722. Reviewed by Ada Chan.
  11723. * UserInterface/JavaScriptLogViewController.js:
  11724. (WebInspector.JavaScriptLogViewController): Set _cleared to true.
  11725. (WebInspector.JavaScriptLogViewController.prototype.clear): Ditto.
  11726. (WebInspector.JavaScriptLogViewController.prototype.printResult): Return early if _cleared.
  11727. (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Set _cleared to false.
  11728. 2012-10-31 Timothy Hatcher <timothy@apple.com>
  11729. Allow independently clearing either the log view or the quick console.
  11730. This fixes up the clearing process and mostly decouples it from LogManager.
  11731. The ActiveLogCleared event is now only used to honor the clear() command.
  11732. This also adds the Clear Log context menu item to the Quick Console.
  11733. Reviewed by Antoine Quint.
  11734. * UserInterface/JavaScriptLogViewController.js:
  11735. (WebInspector.JavaScriptLogViewController.prototype.clear): Focus the prompt
  11736. and call the new didClearMessages delegate function.
  11737. (WebInspector.JavaScriptLogViewController.prototype._requestClearMessages): Removed.
  11738. (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown): Call clear
  11739. instead of _requestClearMessages.
  11740. * UserInterface/LogContentView.js:
  11741. (WebInspector.LogContentView.prototype.didClearMessages): Added. Tell LogManager.
  11742. (WebInspector.LogContentView.prototype._activeLogCleared): Only clear this log if
  11743. it is being used at the time.
  11744. (WebInspector.LogContentView.prototype._clearLog): Call clear instead of requestClearMessages.
  11745. * UserInterface/QuickConsole.js:
  11746. (WebInspector.QuickConsole.prototype.didClearMessages): Added.
  11747. (WebInspector.QuickConsole.prototype.didAppendConsoleMessage): Set _cleared to false.
  11748. (WebInspector.QuickConsole.prototype._viewContainerHandleContextMenuEvent): Added Clear Log
  11749. context menu item.
  11750. (WebInspector.QuickConsole.prototype._clearLog): Added.
  11751. (WebInspector.QuickConsole.prototype._activeLogCleared): Only clear this log if it is
  11752. being used at the time. Move code from here to didClearMessages.
  11753. (WebInspector.QuickConsole.prototype._messageAdded): Even if we show the message,
  11754. remember it in case we get an updated repeat count later.
  11755. (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated):
  11756. 2012-10-31 Timothy Hatcher <timothy@apple.com>
  11757. Add an option to make the Quick Console only show messages while actively debugging.
  11758. This adds a context menu item to toggle the option. When "Always Show Console Messages"
  11759. is unchecked then console messages will only show when evaluating and expression or
  11760. stepping through code in the debugger. The default is to always show messages.
  11761. <rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
  11762. Reviewed by Brian Weinstein.
  11763. * Localizations/en.lproj/localizedStrings.js: Updated.
  11764. * UserInterface/JavaScriptLogViewController.js:
  11765. (WebInspector.JavaScriptLogViewController.prototype.isWaitingForResult): Added.
  11766. (WebInspector.JavaScriptLogViewController.prototype._appendCommand): Set _waitingForResult.
  11767. (WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult): Clear _waitingForResult.
  11768. * UserInterface/QuickConsole.js:
  11769. (WebInspector.QuickConsole): Added event listeners for the contextmenu event.
  11770. (WebInspector.QuickConsole.prototype._viewContainerHandleContextMenuEvent): Added. Create and
  11771. show the context menu with the new option.
  11772. (WebInspector.QuickConsole.prototype._toggleAlwaysShowConsoleMessages): Added. Toggle the setting.
  11773. (WebInspector.QuickConsole.prototype._activeLogCleared): Clear the ignored emssage.
  11774. (WebInspector.QuickConsole.prototype._shouldAddNewMessage): Added.
  11775. (WebInspector.QuickConsole.prototype._messageAdded): Check _shouldAddNewMessage before appending.
  11776. Squirrel away the ignored message incase we need to show it later.
  11777. (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated): Check _shouldAddNewMessage.
  11778. Appended the squirreled away the ignored message first.
  11779. 2012-10-30 Timothy Hatcher <timothy@apple.com>
  11780. Remember and restore the console history between page reloads and Web Inspector sessions.
  11781. <rdar://problem/11343640> REGRESSION (Safari 6): Log panel console history of commands
  11782. (up/down arrows) lost after page navigation
  11783. Reviewed by Brian Weinstein.
  11784. * UserInterface/JavaScriptLogViewController.js:
  11785. (WebInspector.JavaScriptLogViewController): Create the setting and initialize the prompt.
  11786. (WebInspector.JavaScriptLogViewController.prototype.printResult): Update the history setting
  11787. with the last 30 commands.
  11788. * UserInterface/LogContentView.js:
  11789. (WebInspector.LogContentView): Pass a history setting identifier.
  11790. * UserInterface/QuickConsole.js:
  11791. (WebInspector.QuickConsole): Ditto.
  11792. 2012-10-30 Timothy Hatcher <timothy@apple.com>
  11793. Echo console messages to the Web Inspector's quick console.
  11794. <rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
  11795. Reviewed by Ada Chan.
  11796. * UserInterface/QuickConsole.js:
  11797. (WebInspector.QuickConsole): Listen for MessageAdded and PreviousMessageRepeatCountUpdated.
  11798. (WebInspector.QuickConsole.prototype.didAppendConsoleMessage): Only auto expand and scroll down
  11799. for result messages.
  11800. (WebInspector.QuickConsole.prototype._messageAdded): Added. Call through.
  11801. (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated): Added. Call through.
  11802. 2012-10-30 Timothy Hatcher <timothy@apple.com>
  11803. Make JavaScriptLogViewController keep track of the previous message and repeat counts.
  11804. Part of: <rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
  11805. Reviewed by Ada Chan.
  11806. * UserInterface/JavaScriptLogViewController.js:
  11807. (WebInspector.JavaScriptLogViewController): Don't store _messages, it wasn't used. Added _previousMessage
  11808. and _repeatCountWasInterrupted.
  11809. (WebInspector.JavaScriptLogViewController.prototype.clear): Reset _previousMessage and _repeatCountWasInterrupted.
  11810. (WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage): Clone the message since there might be
  11811. multiple clients using the message, and since the message has a DOM element it can't be two places at once.
  11812. (WebInspector.JavaScriptLogViewController.prototype.updatePreviousMessageRepeatCount): Added. Moved from LogManager.
  11813. (WebInspector.JavaScriptLogViewController.prototype._appendCommand): Pass true to _appendConsoleMessage to set the
  11814. _repeatCountWasInterrupted flag and not set _previousMessage.
  11815. (WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult): Ditto.
  11816. (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Set _repeatCountWasInterrupted and only
  11817. set _previousMessage when repeatCountWasInterrupted is false. Don't store _messages, it wasn't used.
  11818. * UserInterface/LogContentView.js:
  11819. (WebInspector.LogContentView.prototype.updatePreviousMessageRepeatCount): Added. Call through.
  11820. * UserInterface/LogManager.js:
  11821. (WebInspector.LogManager): Remove initialize call.
  11822. (WebInspector.LogManager.prototype.initialize): Removed. Not needed.
  11823. (WebInspector.LogManager.prototype.messageWasAdded): Dispatch the message in an object, not as data directly.
  11824. Assert the message was not used directly, it should be cloned.
  11825. (WebInspector.LogManager.prototype.messagesCleared): Removed call to initialize.
  11826. (WebInspector.LogManager.prototype.messageRepeatCountUpdated): MOved to JavaScriptLogViewController.
  11827. Fire PreviousMessageRepeatCountUpdated event instead.
  11828. (WebInspector.LogManager.prototype._mainResourceDidChange): Removed initialize call.
  11829. (WebInspector.LogManager.prototype._addMessage): Removed.
  11830. * UserInterface/LogSidebarPanel.js:
  11831. (WebInspector.LogSidebarPanel): Added event listener for PreviousMessageRepeatCountUpdated.
  11832. (WebInspector.LogSidebarPanel.prototype._messageAdded): Get message off data object. Update comment.
  11833. (WebInspector.LogSidebarPanel.prototype._previousMessageRepeatCountUpdated): Added. Call through to current view.
  11834. 2012-10-30 Timothy Hatcher <timothy@apple.com>
  11835. Change the icons for Debug, Storage and Log navigators.
  11836. This also renamed Debug Navigator to Call Stack Navigator and moved
  11837. it and Issue to the end of the list since they are not always visible.
  11838. I updated the keyboard shortcut numbers to match the new order.
  11839. For better balance, I updated the Breakpoint and Issue icons.
  11840. To help clarify these navigation items I added "Navigator" or "Details"
  11841. to the tooltips, so they are no longer just singular word tooltips.
  11842. <rdar://problem/11991020> Debug icon is unintuitive, consider a new icon
  11843. <rdar://problem/12598939> Storage icon is unintuitive, consider a new icon
  11844. <rdar://problem/12596756> Log icon is unintuitive, consider a new icon
  11845. Reviewed by Conrad Shultz.
  11846. * Localizations/en.lproj/localizedStrings.js: Updated.
  11847. * UserInterface/AppearanceDetailsSidebarPanel.js:
  11848. (WebInspector.AppearanceDetailsSidebarPanel):
  11849. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  11850. (WebInspector.ApplicationCacheDetailsSidebarPanel):
  11851. * UserInterface/BreakpointSidebarPanel.js:
  11852. (WebInspector.BreakpointSidebarPanel):
  11853. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  11854. (WebInspector.CSSStyleDetailsSidebarPanel):
  11855. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  11856. (WebInspector.DOMNodeDetailsSidebarPanel):
  11857. * UserInterface/DebugSidebarPanel.js:
  11858. (WebInspector.DebugSidebarPanel):
  11859. * UserInterface/Images/NavigationItemBreakpoint.pdf: Changed.
  11860. * UserInterface/Images/NavigationItemFunction.pdf: Added.
  11861. * UserInterface/Images/NavigationItemLog.pdf: Changed.
  11862. * UserInterface/Images/NavigationItemStorage.pdf: Changed.
  11863. * UserInterface/Images/NavigationItemWarning.pdf: Changed.
  11864. * UserInterface/InstrumentSidebarPanel.js:
  11865. (WebInspector.InstrumentSidebarPanel):
  11866. * UserInterface/IssueSidebarPanel.js:
  11867. (WebInspector.IssueSidebarPanel):
  11868. * UserInterface/LogSidebarPanel.js:
  11869. (WebInspector.LogSidebarPanel):
  11870. * UserInterface/Main.js:
  11871. (WebInspector.contentLoaded):
  11872. * UserInterface/ResourceDetailsSidebarPanel.js:
  11873. (WebInspector.ResourceDetailsSidebarPanel):
  11874. * UserInterface/ResourceSidebarPanel.js:
  11875. (WebInspector.ResourceSidebarPanel):
  11876. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  11877. (WebInspector.ScopeChainDetailsSidebarPanel):
  11878. * UserInterface/SearchSidebarPanel.js:
  11879. (WebInspector.SearchSidebarPanel):
  11880. * UserInterface/StorageSidebarPanel.js:
  11881. (WebInspector.StorageSidebarPanel):
  11882. 2012-10-28 Mark Rowe <mrowe@apple.com>
  11883. Remove references to unsupported OS and Xcode versions.
  11884. Reviewed by Dan Bernstein.
  11885. * Configurations/Base.xcconfig:
  11886. * Configurations/CompilerVersion.xcconfig: Removed.
  11887. * WebInspectorUI.xcodeproj/project.pbxproj: Remove reference to CompilerVersion.xcconfig.
  11888. 2012-10-29 Timothy Hatcher <timothy@apple.com>
  11889. Make the Web Inspector's clear() command work in the console again.
  11890. <rdar://problem/11007383> REGRESSION (Safari 6): Should be able to clear current console log via clear() command
  11891. Reviewed by Ada Chan.
  11892. * UserInterface/ConsoleObserver.js:
  11893. (WebInspector.ConsoleObserver.prototype.messagesCleared): Call LogManager.messagesCleared.
  11894. * UserInterface/LogManager.js:
  11895. (WebInspector.LogManager.prototype.messageWasAdded): Added comment about ConsoleObserver.
  11896. (WebInspector.LogManager.prototype.messagesCleared): Added. Moved from requestClearMessages.
  11897. (WebInspector.LogManager.prototype.messageRepeatCountUpdated): Added comment about ConsoleObserver.
  11898. (WebInspector.LogManager.prototype.requestClearMessages): Removed clearing since that happens
  11899. in messagesCleared now in response to the request.
  11900. 2012-10-29 Timothy Hatcher <timothy@apple.com>
  11901. Allow resizing the docked Web Inspector from any empty space in the navigation bars.
  11902. <rdar://problem/11964849> REGRESSION (Safari 6): Resizing the docked Web Inspector is not easy
  11903. Reviewed by Ada Chan.
  11904. * UserInterface/Main.css:
  11905. (body.docked #details-sidebar > .navigation-bar): Show row-resize cursor.
  11906. (body.docked #details-sidebar > .navigation-bar .item:not(.flexible-space)): Reset the cursor to default.
  11907. * UserInterface/Main.js:
  11908. (WebInspector.contentLoaded): Add event listeners to the navigation bars.
  11909. 2012-10-28 Timothy Hatcher <timothy@apple.com>
  11910. Use a specific icon for application cache manifests instead of the generic document icon.
  11911. <rdar://problem/11427380> In Storage navigator Application Cache icon should be better than a generic document icon
  11912. Reviewed by Ricky Mondello.
  11913. * UserInterface/ApplicationCacheIcons.css:
  11914. (.application-cache-manifest .icon): Use the new icons.
  11915. * UserInterface/Images/ApplicationCacheManifest.png: Added.
  11916. * UserInterface/Images/ApplicationCacheManifest@2x.png: Added.
  11917. 2012-10-28 Joseph Pecoraro <pecoraro@apple.com>
  11918. Make radio navigation buttons only switch for the left mouse button.
  11919. <rdar://problem/11795081> Right-clicking navigator icons produces unexpected results
  11920. Reviewed by Timothy Hatcher.
  11921. * UserInterface/NavigationBar.js:
  11922. (WebInspector.NavigationBar.prototype._mouseDown): Return early if event.button !== 0.
  11923. (WebInspector.NavigationBar.prototype._mouseMoved): Assert event.button !== 0.
  11924. (WebInspector.NavigationBar.prototype._mouseUp): Ditto.
  11925. 2012-10-27 Timothy Hatcher <timothy@apple.com>
  11926. Make the network timeline bars and callouts HiDPI compliant.
  11927. <rdar://problem/10643175> Timeline pills/callouts should be made HiDPI compliant
  11928. Reviewed by Sam Weinig.
  11929. * UserInterface/Images/NetworkBarBlue.png: Added.
  11930. * UserInterface/Images/NetworkBarBlue@2x.png: Added.
  11931. * UserInterface/Images/NetworkBarGray.png: Added.
  11932. * UserInterface/Images/NetworkBarGray@2x.png: Added.
  11933. * UserInterface/Images/NetworkBarGreen.png: Added.
  11934. * UserInterface/Images/NetworkBarGreen@2x.png: Added.
  11935. * UserInterface/Images/NetworkBarLabelCalloutLeft.pdf: Added.
  11936. * UserInterface/Images/NetworkBarLabelCalloutRight.pdf: Added.
  11937. * UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf: Added.
  11938. * UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf: Added.
  11939. * UserInterface/Images/NetworkBarOrange.png: Added.
  11940. * UserInterface/Images/NetworkBarOrange@2x.png: Added.
  11941. * UserInterface/Images/NetworkBarPurple.png: Added.
  11942. * UserInterface/Images/NetworkBarPurple@2x.png: Added.
  11943. * UserInterface/Images/NetworkBarRed.png: Added.
  11944. * UserInterface/Images/NetworkBarRed@2x.png: Added.
  11945. * UserInterface/Images/NetworkBarWhiteFlat.png: Added.
  11946. * UserInterface/Images/NetworkBarWhiteFlat@2x.png: Added.
  11947. * UserInterface/Images/NetworkBarYellow.png: Added.
  11948. * UserInterface/Images/NetworkBarYellow@2x.png: Added.
  11949. * UserInterface/Images/NetworkHollowBarBlue.png: Added.
  11950. * UserInterface/Images/NetworkHollowBarBlue@2x.png: Added.
  11951. * UserInterface/Images/NetworkHollowBarGray.png: Added.
  11952. * UserInterface/Images/NetworkHollowBarGray@2x.png: Added.
  11953. * UserInterface/Images/NetworkHollowBarGreen.png: Added.
  11954. * UserInterface/Images/NetworkHollowBarGreen@2x.png: Added.
  11955. * UserInterface/Images/NetworkHollowBarOrange.png: Added.
  11956. * UserInterface/Images/NetworkHollowBarOrange@2x.png: Added.
  11957. * UserInterface/Images/NetworkHollowBarPurple.png: Added.
  11958. * UserInterface/Images/NetworkHollowBarPurple@2x.png: Added.
  11959. * UserInterface/Images/NetworkHollowBarRed.png: Added.
  11960. * UserInterface/Images/NetworkHollowBarRed@2x.png: Added.
  11961. * UserInterface/Images/NetworkHollowBarYellow.png: Added.
  11962. * UserInterface/Images/NetworkHollowBarYellow@2x.png: Added.
  11963. * UserInterface/Images/graphLabelCalloutLeft.png: Removed.
  11964. * UserInterface/Images/graphLabelCalloutLeftWhite.png: Removed.
  11965. * UserInterface/Images/graphLabelCalloutRight.png: Removed.
  11966. * UserInterface/Images/graphLabelCalloutRightWhite.png: Removed.
  11967. * UserInterface/Images/timelineHollowPillBlue.png: Removed.
  11968. * UserInterface/Images/timelineHollowPillGray.png: Removed.
  11969. * UserInterface/Images/timelineHollowPillGreen.png: Removed.
  11970. * UserInterface/Images/timelineHollowPillOrange.png: Removed.
  11971. * UserInterface/Images/timelineHollowPillPurple.png: Removed.
  11972. * UserInterface/Images/timelineHollowPillRed.png: Removed.
  11973. * UserInterface/Images/timelineHollowPillYellow.png: Removed.
  11974. * UserInterface/Images/timelinePillBlue.png: Removed.
  11975. * UserInterface/Images/timelinePillGray.png: Removed.
  11976. * UserInterface/Images/timelinePillGreen.png: Removed.
  11977. * UserInterface/Images/timelinePillOrange.png: Removed.
  11978. * UserInterface/Images/timelinePillPurple.png: Removed.
  11979. * UserInterface/Images/timelinePillRed.png: Removed.
  11980. * UserInterface/Images/timelinePillWhiteFlat.png: Removed.
  11981. * UserInterface/Images/timelinePillYellow.png: Removed.
  11982. * UserInterface/NetworkTimeline.css:
  11983. (.network-graph-label.before):
  11984. (.network-graph-label.before::after):
  11985. (.network-graph-label.after):
  11986. (.network-graph-label.after::before):
  11987. (.network-graph-bar):
  11988. (.resource-cached .network-graph-bar):
  11989. (.network-resource-type-document .network-graph-bar):
  11990. (.network-resource-type-document.resource-cached .network-graph-bar):
  11991. (.network-resource-type-stylesheet .network-graph-bar):
  11992. (.network-resource-type-stylesheet.resource-cached .network-graph-bar):
  11993. (.network-resource-type-image .network-graph-bar):
  11994. (.network-resource-type-image.resource-cached .network-graph-bar):
  11995. (.network-resource-type-font .network-graph-bar):
  11996. (.network-resource-type-font.resource-cached .network-graph-bar):
  11997. (.network-resource-type-script .network-graph-bar):
  11998. (.network-resource-type-script.resource-cached .network-graph-bar):
  11999. (.network-resource-type-xhr .network-graph-bar):
  12000. (.network-resource-type-xhr.resource-cached .network-graph-bar):
  12001. (.network-resource-type-other .network-graph-bar):
  12002. (.network-resource-type-other.resource-cached .network-graph-bar):
  12003. (.data-grid:focus tr.selected .network-graph-bar):
  12004. (.data-grid:focus tr.selected .resource-cached .network-graph-bar):
  12005. (.data-grid:focus tr.selected .network-graph-label.before::after):
  12006. (.data-grid:focus tr.selected .network-graph-label.after::before):
  12007. 2012-10-26 Timothy Hatcher <timothy@apple.com>
  12008. Clear the issue navigator sidebar when the active log is cleared.
  12009. Reviewed by Ada Chan.
  12010. * UserInterface/IssueManager.js:
  12011. (WebInspector.IssueManager): Listen for the ActiveLogCleared event.
  12012. (WebInspector.IssueManager.prototype.initialize): Dispatch the Cleared event.
  12013. (WebInspector.IssueManager.prototype._activeLogCleared): Added. Call initialize.
  12014. (WebInspector.IssueManager.prototype._mainResourceDidChange): Just call initialize
  12015. since it now dispatches the Cleared event.
  12016. * UserInterface/Main.js:
  12017. (WebInspector.contentLoaded): Create logManager before issueManager so IssueManager
  12018. can listen for the ActiveLogCleared event.
  12019. 2012-10-26 Timothy Hatcher <timothy@apple.com>
  12020. Clean up LogContentView and make clearing the console have straightforward code path.
  12021. The icon for the trashcan was also 1px too low and not embossed.
  12022. Reviewed by Brian Weinstein.
  12023. * UserInterface/Images/NavigationItemTrash.pdf: Updated.
  12024. * UserInterface/LogContentView.css:
  12025. (.console-messages): Changed from #console-messages.
  12026. (.console-messages a): Ditto.
  12027. (.console-messages a:hover): Ditto.
  12028. * UserInterface/LogContentView.js:
  12029. (WebInspector.LogContentView): Don't set ids on elements. Remove unused className.
  12030. Directly listen for the ActiveLogCleared event. Remove true from the end of the
  12031. ButtonNavigationItem for the clear button to make it embossed.
  12032. (WebInspector.LogContentView.prototype.disable): Set _disabled. Also disable the clear
  12033. button and add a FIXME.
  12034. (WebInspector.LogContentView.prototype.consoleCleared): Removed. Replaced by _activeLogCleared.
  12035. (WebInspector.LogContentView.prototype.closed): Added.
  12036. (WebInspector.LogContentView.prototype.didAppendConsoleMessage): Removed. Stop firing
  12037. and event no one listens for.
  12038. (WebInspector.LogContentView.prototype._handleContextMenuEvent): Use _clearLog. Don't
  12039. add the context menu item for disabled logs.
  12040. (WebInspector.LogContentView.prototype._requestClearMessages): Removed. Replaced by _clearLog.
  12041. (WebInspector.LogContentView.prototype._activeLogCleared): Added.
  12042. (WebInspector.LogContentView.prototype._clearLog): Call WebInspector.logManager.requestClearMessages
  12043. and wait for the ActiveLogCleared event.
  12044. * UserInterface/LogSidebarPanel.js:
  12045. (WebInspector.LogSidebarPanel): Removed ActiveLogCleared event listener.
  12046. (WebInspector.LogSidebarPanel.prototype._activeLogCleared): Removed.
  12047. 2012-10-26 Timothy Hatcher <timothy@apple.com>
  12048. Update all of the generated icons in the Web Inspector when the device pixel ratio changes.
  12049. <rdar://problem/12579083> Update generated images as the window moves between 1x and 2x screens
  12050. Reviewed by Ricky Mondello.
  12051. * UserInterface/ImageUtilities.js:
  12052. (generateColoredImagesForCSS): Added matchMedia listener.
  12053. (generateColoredImagesForCSS.generateImages): Renamed from imageLoaded.
  12054. (generateEmbossedImages): Added matchMedia listener.
  12055. (generateEmbossedImages._generateImages): Renamed from _imageLoaded.
  12056. 2012-10-25 Timothy Hatcher <timothy@apple.com>
  12057. Make ImageUtilities.js in Web Inspector webkitGetImageDataHD and webkitGetImageDataHD.
  12058. Since the 2x canvas approach was no longer working we now only generate one canvas that
  12059. matches the device pixel ratio. This does not properly update as the Web Inspector
  12060. changes screens, and that is tracked by <rdar://problem/12579083>.
  12061. The icons are still blurry in HiDPI, and that is tracked by <rdar://problem/12574189>.
  12062. <rdar://problem/12579056> Update ImageUtilities.js to properly work in HIDPI
  12063. Reviewed by Antoine Quint.
  12064. * UserInterface/ActivateButtonNavigationItem.js:
  12065. (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Remove 2x selectors.
  12066. * UserInterface/ButtonNavigationItem.js:
  12067. (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Ditto.
  12068. * UserInterface/RadioButtonNavigationItem.js:
  12069. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Ditto.
  12070. * UserInterface/CSSStyleDetailsSidebarPanel.css: Remove 2x selectors and media queries.
  12071. * UserInterface/DOMTreeOutline.css: Ditto.
  12072. * UserInterface/DataGrid.css: Ditto.
  12073. * UserInterface/DetailsSection.css: Ditto.
  12074. * UserInterface/LogContentView.css: Ditto.
  12075. * UserInterface/Main.css: Ditto.
  12076. * UserInterface/NavigationSidebarPanel.css: Ditto.
  12077. * UserInterface/Section.css: Ditto.
  12078. * UserInterface/TimelinesContentView.css: Ditto.
  12079. * UserInterface/ImageUtilities.js:
  12080. (generateColoredImage): Use webkitGetImageDataHD and webkitPutImageDataHD.
  12081. (generateColoredImagesForCSS): Stop generating 2x versions.
  12082. (generateEmbossedImages): Stop generating 2x versions. Use webkitGetImageDataHD and
  12083. webkitPutImageDataHD.
  12084. 2012-10-25 Korhan Bircan <kbircan@apple.com>
  12085. Fix for "<rdar://problem/12120092> REGRESSION (Safari 6): No button to clear the Log view or Quick Console".
  12086. Reviewed by Timothy Hatcher.
  12087. There's no "Clear Console" button in the log content view and we only support Command-K shortcut
  12088. to clear the console. This is a missing feature that has been mentioned a few times on Twitter
  12089. and Stack Overflow. This patch adds a "Clear Console" button in the navigation bar where we think
  12090. is a good place for discoverability.
  12091. We can likely do the same for the Quick Console once we decide where the best place to put the
  12092. button is.
  12093. * Localizations/en.lproj/localizedStrings.js: Regenerated after adding the tooltip.
  12094. * UserInterface/Images/NavigationItemTrash.pdf: Added.
  12095. * UserInterface/LogContentView.js:
  12096. Added a navigation item button with a trashcan icon for clearing the console log.
  12097. Renamed context menu tooltip from "Clear Console" to "Clear Log" for consistency.
  12098. 2012-10-25 Timothy Hatcher <timothy@apple.com>
  12099. Correct the blurriness of the Close, Dock and Undock navigation items in the Web Inspector.
  12100. <rdar://problem/12573816> Close, Dock and Undock navigation items are blurry
  12101. Reviewed by Dan Bernstein.
  12102. * UserInterface/ButtonNavigationItem.js:
  12103. (WebInspector.ButtonNavigationItem.prototype._generateImages): Pass _imageHeight instead of _imageWidth again.
  12104. 2012-10-25 Timothy Hatcher <timothy@apple.com>
  12105. Darken the blue used for Web Inspector active navigation items to have better contrast.
  12106. This also adds a slight glow to simulate that these buttons have a blue light.
  12107. Reviewed by Antoine Quint.
  12108. * UserInterface/ImageUtilities.js:
  12109. (._createEmbossedCanvasImage): Tweak the colors and add a glow.
  12110. 2012-10-24 Timothy Hatcher <timothy@apple.com>
  12111. Hide empty navigation sidebars in the Web Inspector until they have content.
  12112. This hides Issues, Debug and Storage if they are empty. This frees up the navigation
  12113. bar and makes it less intimidating in most cases.
  12114. <rdar://problem/12569339> Empty navigation sidebars should be hidden until they have content.
  12115. Rubber-stamped by Antoine Quint.
  12116. * UserInterface/DebugSidebarPanel.js:
  12117. (WebInspector.DebugSidebarPanel.prototype._showNotPausedEmptyContentPlaceholder): Pass true
  12118. to showEmptyContentPlaceholder to indicate the navigation item should be hidden too.
  12119. * UserInterface/IssueSidebarPanel.js:
  12120. (WebInspector.IssueSidebarPanel): Pass true to NavigationSidebarPanel for auto-hiding.
  12121. * UserInterface/NavigationItem.js:
  12122. (WebInspector.NavigationItem.prototype.set hidden): Update layout os items expand and collapse
  12123. as the space available changes.
  12124. * UserInterface/NavigationSidebarPanel.js:
  12125. (WebInspector.NavigationSidebarPanel): Start the navigation bar out as hidden if auto-hiding.
  12126. (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): Call
  12127. _updateNavigationItemVisibility after setting _hideNavigationItemWhenEmpty.
  12128. (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder): Ditto.
  12129. (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder): Call
  12130. _updateNavigationItemVisibility.
  12131. (WebInspector.NavigationSidebarPanel.prototype.shown): Force navigation item visible.
  12132. (WebInspector.NavigationSidebarPanel.prototype.hidden): Added. Call _updateNavigationItemVisibility.
  12133. (WebInspector.NavigationSidebarPanel.prototype._updateNavigationItemVisibility): Added.
  12134. * UserInterface/StorageSidebarPanel.js:
  12135. (WebInspector.StorageSidebarPanel): Pass true to NavigationSidebarPanel for auto-hiding.
  12136. 2012-10-24 Timothy Hatcher <timothy@apple.com>
  12137. Make Command-Shift-C toggle the "point to inspect" mode.
  12138. This shortcut originates from Firebug and is also available in Chrome. To make this work
  12139. I had to make DOMTreeManager keep track of the state and fire an event when it changed.
  12140. That way the global shortcut could toggle the mode even if there isn't a FrameContentView.
  12141. This also allows all the FrameContentViews to keep in sync with the global switch.
  12142. <rdar://problem/6275138> Inspect clicked element needs a keyboard shortcut
  12143. Reviewed by Joseph Pecoraro.
  12144. * Localizations/en.lproj/localizedStrings.js: Updated.
  12145. * UserInterface/DOMTreeManager.js:
  12146. (WebInspector.DOMTreeManager.prototype.inspectElement): Fire InspectModeStateChanged.
  12147. (WebInspector.DOMTreeManager.prototype.get inspectModeEnabled): Added.
  12148. (WebInspector.DOMTreeManager.prototype.set inspectModeEnabled.callback): Added.
  12149. Handle the error case and fire InspectModeStateChanged.
  12150. (WebInspector.DOMTreeManager.prototype.set inspectModeEnabled): Changed from
  12151. setInspectModeEnabled into a setter. Use an internal callback.
  12152. * UserInterface/FrameContentView.js:
  12153. (WebInspector.FrameContentView.prototype.get navigationItems): Renamed _nodeSearchActivateButtonNavigationItem
  12154. to _inspectModeButtonNavigationItem.
  12155. (WebInspector.FrameContentView.prototype.shown): Removed call to _setNodeSearchEnabled.
  12156. (WebInspector.FrameContentView.prototype._inspectModeStateChanged): Renamed from _setNodeSearchEnabled.
  12157. (WebInspector.FrameContentView.prototype._toggleNodeSearch): Toggle WebInspector.domTreeManager.inspectModeEnabled
  12158. and listen for the event instead of a callback.
  12159. * UserInterface/Main.js:
  12160. (WebInspector.contentLoaded): Create a shortcut for inspect mode.
  12161. (WebInspector._toggleInspectMode): Added.
  12162. 2012-10-24 Timothy Hatcher <timothy@apple.com>
  12163. Make it easy to have different tooltips for toggle buttons in the Web Inspector.
  12164. Also tweak the wording of the hand button in an attempt to keep it clear and terse.
  12165. Reviewed by Jeff Miller.
  12166. * Localizations/en.lproj/localizedStrings.js: Updated.
  12167. * UserInterface/ActivateButtonNavigationItem.js:
  12168. (WebInspector.ActivateButtonNavigationItem): Take an activatedToolTip param in addition to
  12169. defaultToolTip and store them.
  12170. (WebInspector.ActivateButtonNavigationItem.prototype.get defaultToolTip): Added.
  12171. (WebInspector.ActivateButtonNavigationItem.prototype.get activatedToolTip): Added.
  12172. (WebInspector.ActivateButtonNavigationItem.prototype.set activated): Switch the tooltips.
  12173. * UserInterface/FrameContentView.js:
  12174. (WebInspector.FrameContentView): Pass in alternate tooltips for the navigation items.
  12175. * UserInterface/Main.js:
  12176. (WebInspector.contentLoaded): Setup the tooltips when the navigation items are created.
  12177. (WebInspector.updateDockedState): Remove toolTip manipulation.
  12178. (WebInspector._sidebarCollapsedStateDidChange): Ditto.
  12179. * UserInterface/QuickConsole.js:
  12180. (WebInspector.QuickConsole): Setup the tooltips when the navigation items are created.
  12181. (WebInspector.QuickConsole.prototype.set collapsed): Remove toolTip manipulation.
  12182. (WebInspector.QuickConsole.prototype._debuggerDidPause): Ditto.
  12183. (WebInspector.QuickConsole.prototype._debuggerDidResume): Ditto.
  12184. * UserInterface/ToggleButtonNavigationItem.js:
  12185. (WebInspector.ToggleButtonNavigationItem):Take an alternateToolTip param in addition to
  12186. defaultToolTip and store them.
  12187. (WebInspector.ToggleButtonNavigationItem.prototype.get defaultToolTip): Added.
  12188. (WebInspector.ToggleButtonNavigationItem.prototype.get alternateToolTip): Added.
  12189. (WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Switch the tooltips.
  12190. 2012-10-25 Antoine Quint <graouts@apple.com>
  12191. Customise the word-wrapping behaviour to break even when there is no space in the text
  12192. typed into the console (W3C spec at http://www.w3.org/TR/css3-text/#overflow-wrap)
  12193. <rdar://problem/12331949> Quick console text overlaps debugging controls
  12194. Reviewed by Timothy Hatcher.
  12195. * UserInterface/JavaScriptTextPrompt.css:
  12196. (.javascript-prompt):
  12197. 2012-10-24 Antoine Quint <graouts@apple.com>
  12198. Add the "active-focus" state as a shared state for all button navigation items and use that state as well
  12199. as the "focus" state regardless of keyboard focus.
  12200. <rdar://problem/11742049> Web Inspector navigation bar buttons need a more noticeable selected state
  12201. Reviewed by Timothy Hatcher.
  12202. * UserInterface/ActivateButtonNavigationItem.js: Stop using custom states and use the shared states defined in
  12203. ButtonNavigationItem.
  12204. (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
  12205. * UserInterface/ButtonNavigationItem.js: Add the "active-focus" from ActivateButtonNavigationItem.
  12206. * UserInterface/RadioButtonNavigationItem.js: Use the "focus" state even when we're not using keyboard focus
  12207. and use the "active-focus" state when we're pressing the button as well.
  12208. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
  12209. 2012-10-23 Timothy Hatcher <timothy@apple.com>
  12210. Make "Inspect Element" and the inspect() console API switch the sidebar to match the content view.
  12211. Reviewed by Joseph Pecoraro.
  12212. * UserInterface/InspectorObserver.js:
  12213. (WebInspector.InspectorObserver.prototype.inspect): Select the resourceSidebarPanel or
  12214. the storageSidebarPanel depending on the type of object being inspected.
  12215. 2012-10-23 Timothy Hatcher <timothy@apple.com>
  12216. Fix event listener links and make them work with anonymous scripts.
  12217. <rdar://problem/12557978> REGRESSION: Event listener function links are displayed as
  12218. numbers and don't work
  12219. Reviewed by Joseph Pecoraro.
  12220. * Localizations/en.lproj/localizedStrings.js: Updated.
  12221. * UserInterface/DebuggerManager.js:
  12222. (WebInspector.DebuggerManager.prototype.reset): Call Script.resetUniqueDisplayNameNumbers. This
  12223. way the anonymous scripts scripts start back at 1 when you reload or load a new page.
  12224. * UserInterface/EventListenerSectionGroup.js:
  12225. (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): In the past scriptId
  12226. could be a URL. Now it is always a script identifier. So try looking up the resource by URL
  12227. if a script can't be found directly. Use WebInspector.createSourceCodeLink.
  12228. * UserInterface/Main.css:
  12229. (.go-to-link): Added cursor: pointer for cases when the link has no href.
  12230. * UserInterface/Main.js:
  12231. (WebInspector.createSourceCodeLink): Added.
  12232. (WebInspector.createSourceCodeLink.showSourceCode): Added.
  12233. * UserInterface/Resource.js:
  12234. (WebInspector.Resource.prototype.get displayName): Added.
  12235. * UserInterface/Script.js:
  12236. (WebInspector.Script.resetUniqueDisplayNameNumbers): Added.
  12237. (WebInspector.Script.prototype.get displayName): Added.
  12238. * UserInterface/ScriptTreeElement.js:
  12239. (WebInspector.ScriptTreeElement): Use the displayName getter for mainTitle.
  12240. * UserInterface/SourceCode.js:
  12241. (WebInspector.SourceCode.prototype.get displayName): Added.
  12242. 2012-10-22 Timothy Hatcher <timothy@apple.com>
  12243. Make docking/undocking the Web Inspector work again.
  12244. <rdar://problem/12554785> REGRESSION (r132045): Docking/undocking does not work
  12245. Reviewed by Dan Bernstein.
  12246. * UserInterface/InspectorFrontendAPI.js:
  12247. (InspectorFrontendAPI.setAttachedWindow): Removed.
  12248. (InspectorFrontendAPI.setDockSide): Added.
  12249. * UserInterface/Main.js:
  12250. (WebInspector._toggleDockedState): Use InspectorFrontendHost.requestSetDockSide.
  12251. 2012-10-22 Joseph Pecoraro <pecoraro@apple.com>
  12252. <rdar://problem/12540519> Should be able to copy text from datagrid easier
  12253. Reviewed by Timothy Hatcher.
  12254. Have a DataGrid handle a copy event if the last selection was in the
  12255. DataGrid and it has a selected row. Also add a "Copy Row" context menu.
  12256. * Localizations/en.lproj/localizedStrings.js:
  12257. Add "Copy Row" context menu string.
  12258. * UserInterface/DataGrid.js:
  12259. (WebInspector.DataGrid):
  12260. (WebInspector.DataGrid.prototype._contextMenuInDataTable):
  12261. Add "Copy Row" context menu item if the node is selectable.
  12262. (WebInspector.DataGrid.prototype._copyTextForDataGridNode):
  12263. Return a tab separated list of values. This uses the original data from
  12264. which the node is created. In some cases, like the instrument navigator's
  12265. datagrids, this may not match the final DataGrid row's content.
  12266. (WebInspector.DataGrid.prototype._beforeCopy):
  12267. (WebInspector.DataGrid.prototype._copy):
  12268. Allow copy when the event is inside the datagrid, there is no range
  12269. selection, and we have a selected row.
  12270. (WebInspector.DataGrid.prototype._copyRow):
  12271. Directly copy an individual row.
  12272. * UserInterface/Main.js:
  12273. (WebInspector.contentLoaded):
  12274. Remove useCapture from the main document's beforecopy handler.
  12275. 2012-10-22 Timothy Hatcher <timothy@apple.com>
  12276. Make the Web Inspector fast!
  12277. Use a timeout instead of an interval to prevent being capped on the time between protocol messages.
  12278. Only one timeout is created and the whole queue is dispatched when the timer fires. This prevents
  12279. creating potentially hundreds of timers that were all firing at the same time.
  12280. <rdar://problem/11759145> REGRESSION (Safari 6): console.log() exhibits extremely long delay (slow)
  12281. when many javascript files have just been loaded
  12282. Reviewed by Joseph Pecoraro.
  12283. * UserInterface/Main.js:
  12284. (WebInspector.dispatchNextQueuedMessageFromBackend): Removed interval code.
  12285. (WebInspector.dispatchMessageFromBackend): Use setTimeout instead of setInterval. Updated the comment
  12286. and removed the reentrancy part, which isn't possible since the backend also has a queue with a timer.
  12287. 2012-10-22 Timothy Hatcher <timothy@apple.com>
  12288. Make WebInspector.JavaScriptLogViewController be responsible for scrolling to the bottom,
  12289. since it can check before new messages are added to know if a scroll is needed.
  12290. This fixes a bug where we were not auto scrolling down if you were at the bottom.
  12291. <rdar://problem/12049983> REGRESSION (Safari 6): Console doesn't autoscroll when it should
  12292. Reviewed by John Sullivan.
  12293. * UserInterface/JavaScriptLogViewController.js:
  12294. (WebInspector.JavaScriptLogViewController): Store element as _element.
  12295. (WebInspector.JavaScriptLogViewController.prototype.isScrolledToBottom): Added.
  12296. (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom.delayedWork): Added.
  12297. Do the actual scroll here.
  12298. (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom): Added. Don't scroll
  12299. immediately so we are not causing excessive layouts.
  12300. (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Remember if we
  12301. were scrolled to the bottom before appending the message. This was the bug, before the delegate
  12302. didAppendConsoleMessage was checking and that was after the content was appended and we were
  12303. never scrolled to the bottom at that point.
  12304. * UserInterface/LogContentView.js:
  12305. (WebInspector.LogContentView.prototype.didAppendConsoleMessage): Don't try to scroll, it is
  12306. now handled by JavaScriptLogViewController.
  12307. (WebInspector.LogContentView.prototype._isScrollIntoViewScheduled): Removed.
  12308. (WebInspector.LogContentView.prototype._scheduleScrollIntoView): Removed.
  12309. (WebInspector.LogContentView.prototype._immediatelyScrollIntoView): Removed.
  12310. (WebInspector.LogContentView.prototype._cancelScheduledScrollIntoView): Removed.
  12311. * UserInterface/QuickConsole.js:
  12312. (WebInspector.QuickConsole.prototype._isScrolledToBottom): Call through to JavaScriptLogViewController.
  12313. (WebInspector.QuickConsole.prototype._scrollToBottom): Ditto.
  12314. 2012-10-22 Timothy Hatcher <timothy@apple.com>
  12315. Make WebInspector.JavaScriptLogViewController create the top WebInspector.ConsoleGroup.
  12316. JavaScriptLogViewController now takes the parent element so it controls more of the DOM. This will
  12317. be needed to control the scroll state instead of having LogContentView and QuickConsole do it.
  12318. Part of: <rdar://problem/12049983> REGRESSION (Safari 6): Console doesn't autoscroll when it should
  12319. Reviewed by John Sullivan.
  12320. * UserInterface/JavaScriptLogViewController.js:
  12321. (WebInspector.JavaScriptLogViewController): Don't take in a ConsoleGroup, create it internally.
  12322. Insert or append the ConsoleGroup into the parentElement.
  12323. * UserInterface/LogContentView.js:
  12324. (WebInspector.LogContentView): Don't make the ConsoleGroup, just get it from _logViewController.
  12325. Create and assign this.prompt first so it is in the DOM before making the _logViewController.
  12326. * UserInterface/QuickConsole.js:
  12327. (WebInspector.QuickConsole): Don't make the ConsoleGroup.
  12328. 2012-10-21 Timothy Hatcher <timothy@apple.com>
  12329. Prevent the scroll position from changing when rebuilding the styles sidebar.
  12330. <rdar://problem/12544009> The Styles details sidebar scrolls to the top after editing a property
  12331. Reviewed by Dan Bernstein.
  12332. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  12333. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Save and restore scrollTop.
  12334. 2012-10-20 Timothy Hatcher <timothy@apple.com>
  12335. Add an "Inherited Styles" section to the Style details sidebar.
  12336. <rdar://problem/11981468> REGRESSION (Safari 6): Inspector does not show Inherited Style Rules
  12337. Reviewed by Ricky Mondello.
  12338. * Localizations/en.lproj/localizedStrings.js: Updated.
  12339. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  12340. (.sidebar > .panel.details.css-style .styles-section.inherited .properties .inherited): Added.
  12341. Hides non-iherited properties for inherited rules.
  12342. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  12343. (WebInspector.CSSStyleDetailsSidebarPanel): Create and add the Inherited Styles section.
  12344. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection):
  12345. Pass styleRule.isInherited instead of always passing false.
  12346. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createRuleGroups): Added.
  12347. Factored out of createMatchedRuleGroups for reuse by inherited rules.
  12348. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups):
  12349. Use the factored out createRuleGroups function.
  12350. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Append inherited rules
  12351. to inheritedStyleRules for later use. Walk the inheritedStyleRules and create the sections and groups.
  12352. * UserInterface/DetailsSection.css:
  12353. (.details-section > .header): Reduce right padding, it was too wide.
  12354. (.details-section > .header > .node-link, .details-section > .header > .go-to-arrow): Added.
  12355. Float right to position the arrow on the right side of the title.
  12356. (.details-section > .header .go-to-arrow): Added. Adjust the size and margin to better fit the header.
  12357. * UserInterface/StylePropertiesSection.js:
  12358. (WebInspector.StylePropertiesSection): Changed "show-inherited" to just "inherited". This reduces the
  12359. confusion with the computed style "show-inherited" class.
  12360. 2012-10-20 Timothy Hatcher <timothy@apple.com>
  12361. Make the console log stay active when navigating to a new page if one was showing.
  12362. <rdar://problem/12542303> DOM Tree forces itself visible when navigating to a new page while looking at a Log
  12363. Reviewed by Ricky Mondello.
  12364. * UserInterface/LogManager.js:
  12365. (WebInspector.LogManager.prototype._mainResourceDidChange): Only send SessionStarted or Cleared,
  12366. not both. This way listeners of Cleared can start the new session with some context.
  12367. * UserInterface/LogSidebarPanel.js:
  12368. (WebInspector.LogSidebarPanel.prototype._startSession): Added. Factored out of _sessionStarted.
  12369. Honor the forceActiveContentView parameter when deciding to show the content view.
  12370. (WebInspector.LogSidebarPanel.prototype._sessionStarted): Call _startSession.
  12371. (WebInspector.LogSidebarPanel.prototype._logsCleared): Remember if we were showing a log before
  12372. closing all the logs. Call _startSession can force the content view to be active if we were
  12373. showing a log before.
  12374. 2012-10-20 Timothy Hatcher <timothy@apple.com>
  12375. Make Encoded and Transfer Size update when the values change during page load.
  12376. Renamed Encoded Size to Transfer Size to avoid confusion in cases where it isn't encoded. Also
  12377. the value includes the response headers size, which is the only size when showing a 304. This
  12378. is consistent with the title of the Transferred column in the Network Timeline.
  12379. <rdar://problem/12542122> Encoded and Decoded Size doesn't update in the Resource details sidebar
  12380. Reviewed by Joseph Pecoraro.
  12381. * Localizations/en.lproj/localizedStrings.js: Updated.
  12382. * UserInterface/Resource.js:
  12383. (WebInspector.Resource.prototype.get transferSize): Move the 304 check before the cached
  12384. check since we mark 304 loads as cached now, but there still was network transfer of headers.
  12385. (WebInspector.Resource.prototype.updateForResponse): Fire TransferSizeDidChange for 304 and
  12386. if we have a Content-Length.
  12387. (WebInspector.Resource.prototype.increaseSize): Fire TransferSizeDidChange if we don't have
  12388. a _transferSize and it isn't a 304 or Content-Length is missing.
  12389. (WebInspector.Resource.prototype.markAsCached): Fire TransferSizeDidChange when not a 304.
  12390. * UserInterface/ResourceDetailsSidebarPanel.js:
  12391. (WebInspector.ResourceDetailsSidebarPanel): Renamed "Encoded Size" to "Transfer Size".
  12392. (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Listen for SizeDidChange and
  12393. TransferSizeDidChange events.
  12394. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshDecodedSize and
  12395. _refreshTransferSize.
  12396. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Use emDash
  12397. in more places. Removed valueForSize and updating of size rows.
  12398. (WebInspector.ResourceDetailsSidebarPanel.prototype._valueForSize): Added.
  12399. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize): Added.
  12400. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize): Added.
  12401. 2012-10-19 Timothy Hatcher <timothy@apple.com>
  12402. Make the Scope Chain details sidebar update when continuing in a loop.
  12403. <rdar://problem/11828667> REGRESSION (Safari 6): Variables do not update when continuing in a loop
  12404. Reviewed by Joseph Pecoraro.
  12405. * UserInterface/SourceCodeTextEditor.js:
  12406. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Don't return early if the line
  12407. number didn't change. The execution state still could have changed.
  12408. * UserInterface/TextEditor.js:
  12409. (WebInspector.TextEditor.prototype.set executionLineNumber): Only return early if there isn't a line
  12410. number and that isn't changing. Still dispatch the event even if the number didn't change. The execution
  12411. state still could have changed.
  12412. 2012-10-19 Timothy Hatcher <timothy@apple.com>
  12413. Better support for complex Content-Types in the Post Data section.
  12414. This change splits out the charset and boundary info from the Content-Type and
  12415. displays that info on separate rows. It also handles zero size data since the
  12416. backend does not send data if there are any files present.
  12417. Part of: <rdar://problem/6716080> REGRESSION (Safari 6): Missing POST request data
  12418. Reviewed by Joseph Pecoraro.
  12419. * Localizations/en.lproj/localizedStrings.js: Updated.
  12420. * UserInterface/DetailsSection.css:
  12421. (.details-section > .content > .group > .row.simple.data > .value): Added.
  12422. * UserInterface/DetailsSectionSimpleRow.js:
  12423. (WebInspector.DetailsSectionSimpleRow.prototype.set value): Set the data class name
  12424. if the value does not have any spaces for good word breaking. This will allow breaking
  12425. on every character, which looks better for the boundary post data string.
  12426. * UserInterface/ResourceDetailsSidebarPanel.js:
  12427. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection): Parse
  12428. the content type into MIME-type and the boundary and/or charset.
  12429. 2012-10-19 Timothy Hatcher <timothy@apple.com>
  12430. Add the first part of showing POST data: simple data in the Resource details sidebar.
  12431. Part of: <rdar://problem/6716080> REGRESSION (Safari 6): Missing POST request data
  12432. Reviewed by Dean Jackson.
  12433. * Localizations/en.lproj/localizedStrings.js: Updated.
  12434. * UserInterface/FrameResourceManager.js:
  12435. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Removed optional parameters
  12436. when making a Resource.
  12437. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along postData.
  12438. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null for postData.
  12439. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added parameter for postData.
  12440. Pass along postData to Resource constructor.
  12441. (WebInspector.FrameResourceManager.prototype._createFrame): Removed optional parameters
  12442. when making a Resource.
  12443. (WebInspector.FrameResourceManager.prototype._createResource): Ditto.
  12444. * UserInterface/Resource.js:
  12445. (WebInspector.Resource): Added postData parameter. Store the _postData.
  12446. (WebInspector.Resource.prototype.get postData): Added.
  12447. (WebInspector.Resource.prototype.get postDataContentType): Added.
  12448. * UserInterface/ResourceDetailsSidebarPanel.js:
  12449. (WebInspector.ResourceDetailsSidebarPanel): Create _postDataSection. Don't show _queryParametersSection
  12450. by default, it is now added or removed in _refreshURL.
  12451. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshPostDataSection.
  12452. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): Show and hide the query
  12453. parameters section based on the query string.
  12454. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection): Added.
  12455. 2012-10-19 Timothy Hatcher <timothy@apple.com>
  12456. Support text/x-javascript and other MIME-types as scripts.
  12457. The code was also throwing an exception for unknown MIME-types, which was causing
  12458. the view displaying the Resource to not show anything. Now we just log an error
  12459. and return null so plain text will be shown for unknown types.
  12460. <rdar://problem/11961403> REGRESSION (Safari 6): XHR response is blank for some
  12461. sites (including store.apple.com)
  12462. Reviewed by Antoine Quint.
  12463. * UserInterface/Resource.js:
  12464. (WebInspector.Resource.Type._mimeTypeMap): Added application/x-json and variants.
  12465. * UserInterface/SourceTokenizer.js:
  12466. (WebInspector.SourceTokenizer): Added application/x-json and variants. Changed a throw
  12467. into a console.error with a return of null.
  12468. 2012-10-19 Timothy Hatcher <timothy@apple.com>
  12469. Properly clear the special script folders after a reload so old scripts don't stay around.
  12470. <rdar://problem/11329600> REGRESSION (Safari 6): Special scripts duplicate for each reload
  12471. Reviewed by Antoine Quint.
  12472. * UserInterface/ResourceSidebarPanel.js:
  12473. (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): Set each folder to null so they will be
  12474. recreated instead of reused the next time there is a script to show.
  12475. =2012-10-18 Timothy Hatcher <timothy@apple.com>
  12476. Fix an issue where the Inspector would show duplicate broken resources if you opened it
  12477. while the page was still loading.
  12478. <rdar://problem/11328818> Broken resources if you open the inspector while the page is loading
  12479. Reviewed by Joseph Pecoraro.
  12480. * UserInterface/FrameResourceManager.js:
  12481. (WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache): Add a comment
  12482. about why we might not have a resource.
  12483. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Don't try to make a
  12484. resource here since we missed the resourceRequestWillBeSent call. It just caused duplicate resources
  12485. and broken ones too. Add a comment and return early.
  12486. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData): Add a comment about why we
  12487. might not have a resource. Removed an assert.
  12488. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Ditto.
  12489. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
  12490. 2012-10-18 Joseph Pecoraro <pecoraro@apple.com>
  12491. Add missing color aware CSS properties.
  12492. Reviewed by Timothy Hatcher.
  12493. * UserInterface/CSSKeywordCompletions.js:
  12494. 2012-10-18 Joseph Pecoraro <pecoraro@apple.com>
  12495. In cases where the search term is a CSS Selector or XPath query and
  12496. not a textual match we were not adding a sidebar entry. In such cases
  12497. add a sidebar entry and highlight the entire title.
  12498. <rdar://problem/12522494> Searching "link[href]" in search navigator has missing sidebar items
  12499. Reviewed by Timothy Hatcher.
  12500. * UserInterface/SearchSidebarPanel.js:
  12501. (WebInspector.SearchSidebarPanel.performSearch.domCallback.domSearchResults):
  12502. First check for partial highlights in textual matches. If none were
  12503. found, this is a Selector or XPath match, and we highlight it entirely.
  12504. 2012-10-18 Timothy Hatcher <timothy@apple.com>
  12505. Harden the Web Inspector a bit with a Content Security Policy header.
  12506. By default only load content from 'self'. Allow external loading of images, media and
  12507. fonts; because large resources are not sent over the inspector protocol. Allow inline
  12508. styles and eval for scripts.
  12509. Reviewed by Joseph Pecoraro.
  12510. * UserInterface/Main.html:
  12511. 2012-10-17 Timothy Hatcher <timothy@apple.com>
  12512. Improve error reporting for Inspector protocol errors.
  12513. Reviewed by Dean Jackson.
  12514. * UserInterface/InspectorBackend.js:
  12515. (InspectorBackendClass.prototype.reportProtocolError): Log the message of the error
  12516. object, not the error object itself.
  12517. 2012-10-17 Antoine Quint <graouts@apple.com>
  12518. We now display a new section in the resource details sidebar panel for the image size when we're inspecting
  12519. an image resource. To facilitate this, we add a new .getImageSize() method on Resource which creates an
  12520. <img> element to load the base64 version of the image as it was loaded and use the loaded element to query
  12521. the intrinsic image metrics.
  12522. <rdar://problem/11247288> REGRESSION (Safari 6): Width and height size info for image resources is missing
  12523. Reviewed by Timothy Hatcher.
  12524. * Localizations/en.lproj/localizedStrings.js:
  12525. * UserInterface/Resource.js:
  12526. (WebInspector.Resource.prototype.markAsFailed):
  12527. (WebInspector.Resource.prototype.getImageSize.imageDidLoad):
  12528. (WebInspector.Resource.prototype.getImageSize):
  12529. * UserInterface/ResourceDetailsSidebarPanel.js:
  12530. (WebInspector.ResourceDetailsSidebarPanel):
  12531. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
  12532. (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
  12533. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
  12534. 2012-10-16 Mark Rowe <mrowe@apple.com>
  12535. Add a configuration setting to control whether resources in the
  12536. Web Inspector framework are combined and minified.
  12537. Reviewed by Timothy Hatcher.
  12538. This allows non-Production builds to enable this functionality if desired.
  12539. * Configurations/WebInspectorFramework.xcconfig:
  12540. * Scripts/copy-user-interface-resources.sh:
  12541. 2012-10-16 Timothy Hatcher <timothy@apple.com>
  12542. Fix an exception and properly deactivate the node search button after a node is inspected.
  12543. <rdar://problem/12507181> Remnant mention of .nodeSearchActivateButtonNavigationItem in Main.js
  12544. Reviewed by Ricky Mondello.
  12545. * UserInterface/FrameContentView.js:
  12546. (WebInspector.FrameContentView): Added DOMNodeWasInspected event listener.
  12547. (WebInspector.FrameContentView.prototype._domNodeWasInspected): Added. Deactivate the node search button.
  12548. * UserInterface/Main.js:
  12549. (WebInspector._domNodeWasInspected): Always call InspectorFrontendHost.bringToFront(). This is good
  12550. for the Inspect Element context menu item in windowed mode too.
  12551. 2012-10-16 Timothy Hatcher <timothy@apple.com>
  12552. Fix the dock buttons in the Web Inspector navigation bar when opening the Inspector with the left sidebar hidden.
  12553. <rdar://problem/12509577> REGRESSION: Dock navigation items are in the wrong place if the
  12554. Inspector is opened with the left sidebar hidden
  12555. Reviewed by Ricky Mondello.
  12556. * UserInterface/Main.js:
  12557. (WebInspector._updateDockNavigationItems): Only do this work if needed by checking if the close button is not
  12558. in the right place. This function can be called multiple times, and the concat can cause the items to be
  12559. inserted into the leftNavigationItems array multiple times.
  12560. 2012-10-16 Antoine Quint <graouts@apple.com>
  12561. Adding decoded and encoded sizes as a new group in the Request & Response panel in
  12562. the resource details sidebar panel. To make the reported sizes more legible, we also
  12563. make a small change in Number.bytesToString() such that we have a space between the
  12564. value and the unit, just like what the Get Info panel does in the Finder.
  12565. <rdar://problem/12508215> Add decoded and encoded sizes to Request & Response panel
  12566. Reviewed by Timothy Hatcher.
  12567. * Localizations/en.lproj/localizedStrings.js:
  12568. * UserInterface/ResourceDetailsSidebarPanel.js:
  12569. (WebInspector.ResourceDetailsSidebarPanel):
  12570. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse.valueForSize):
  12571. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
  12572. * UserInterface/Utilities.js:
  12573. (Number.string_appeared_here.value):
  12574. 2012-10-16 Antoine Quint <graouts@apple.com>
  12575. We add a new method to sync the state of the compositing borders button to the WebCore page settings
  12576. when a frame content view is shown in the Web Inspector UI. We also add a new backend command to complement
  12577. the OpenSource patch for https://bugs.webkit.org/show_bug.cgi?id=99458 which is also out for review.
  12578. <rdar://problem/12498181> "Show compositing borders" button is not activated when inspector is re-opened
  12579. Reviewed by Timothy Hatcher.
  12580. * UserInterface/FrameContentView.js:
  12581. (WebInspector.FrameContentView.prototype.shown):
  12582. (WebInspector.FrameContentView.prototype._toggleCompositingBorders):
  12583. (WebInspector.FrameContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
  12584. * UserInterface/InspectorBackendCommands.js:
  12585. 2012-10-16 Antoine Quint <graouts@apple.com>
  12586. Add a new .highlight() method on TextEditorChunk which applies a simple CSS
  12587. animation to the HTML element for the text chunk, and call this method in
  12588. TextEditor's revealLine() method. Since the CSS class we're applying is only
  12589. meant to be transitory, we remove the CSS class name upon completion of the
  12590. animation.
  12591. <rdar://problem/12349298> REGRESSION (Safari 6): When clicking a file/line link
  12592. in the console the line is not highlighted in the source
  12593. Reviewed by Timothy Hatcher.
  12594. * UserInterface/TextEditor.css:
  12595. (.text-editor-text-chunk.highlighted):
  12596. (@-webkit-keyframes fadeout):
  12597. * UserInterface/TextEditor.js:
  12598. (WebInspector.TextEditor.prototype.revealLine):
  12599. (WebInspector.TextEditorTextChunk.prototype.updateContent):
  12600. (WebInspector.TextEditorTextChunk.prototype.highlight):
  12601. 2012-10-15 Timothy Hatcher <timothy@apple.com>
  12602. Fix an exception in ContentBrowser._updateContentViewNavigationItems that was causing resource to not be cleared.
  12603. <rdar://problem/12501269> REGRESSION: Reloading or loading a new page does not clear previous resources
  12604. Reviewed by Antoine Quint.
  12605. * UserInterface/ContentBrowser.js:
  12606. (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): The currentContentView can be
  12607. null when this is called. In that case just clear _currentContentViewNavigationItems and return early.
  12608. 2012-10-15 Timothy Hatcher <timothy@apple.com>
  12609. Remove extra line breaks before color values when copying from the style sidebar.
  12610. <rdar://problem/12506099> When copying style rule sets from the sidebar,
  12611. line breaks are inserted in the middle of each line
  12612. Reviewed by Simon Fraser.
  12613. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  12614. (.sidebar > .panel.details.css-style .swatch): Improve spacing and alignment since
  12615. having swatch-inner as an inline-block affects layout slightly.
  12616. (.sidebar > .panel.details.css-style .swatch-inner): Change display from block to
  12617. inline-block. This fixes the bug by making WebKit not insert a newline for the block.
  12618. 2012-10-15 Timothy Hatcher <timothy@apple.com>
  12619. Treat SVG main resources as documents and syntax highlight them using the HTML tokenizer.
  12620. SVG subresources are still treated as images and preview as such. This matches how the
  12621. WebKit Web Inspector treats SVGs.
  12622. <rdar://problem/11332688> REGRESSION (Safari 6): Source code view shows SVG image instead of source
  12623. Reviewed by Ada Chan and Dan Bernstein.
  12624. * UserInterface/Resource.js:
  12625. (WebInspector.Resource.Type._mimeTypeMap): Added image/svg+xml
  12626. * UserInterface/SourceTokenizer.js:
  12627. (WebInspector.SourceTokenizer): Use HTMLSourceTokenizer for image/svg+xml.
  12628. 2012-10-14 Jeff Miller <jeffm@apple.com>
  12629. Regenerate localizedStrings.js after r45263.
  12630. * Localizations/en.lproj/localizedStrings.js:
  12631. Regenerated.
  12632. 2012-10-13 Timothy Hatcher <timothy@apple.com>
  12633. Avoid direct manipulation of the ContentBrowser and Sidebar navigation bars in Main.js.
  12634. <rdar://problem/12494193> Main.js should not modify the navigationBars directly
  12635. Reviewed by Antoine Quint.
  12636. * UserInterface/ContentBrowser.js:
  12637. (WebInspector.ContentBrowser): Added _leftNavigationItems and _rightNavigationItems.
  12638. (WebInspector.ContentBrowser.prototype.get leftNavigationItems): Added.
  12639. (WebInspector.ContentBrowser.prototype.set leftNavigationItems): Added.
  12640. (WebInspector.ContentBrowser.prototype.get rightNavigationItems): Added.
  12641. (WebInspector.ContentBrowser.prototype.set rightNavigationItems): Added.
  12642. (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): Fix a
  12643. FIXME when calculating the insertionIndex by using _rightNavigationItems.
  12644. * UserInterface/Main.js:
  12645. (WebInspector.contentLoaded): Use leftNavigationItems and rightNavigationItems
  12646. instead of direct manipulation of the navigation bar.
  12647. (WebInspector._updateDockNavigationItems): Ditto.
  12648. * UserInterface/NavigationBar.js:
  12649. (WebInspector.NavigationBar.prototype.insertNavigationItem): Remove the item if it
  12650. is already in another NavigationBar.
  12651. * UserInterface/Sidebar.js:
  12652. (WebInspector.Sidebar): Added _leftNavigationItems and _rightNavigationItems.
  12653. (WebInspector.Sidebar.prototype.insertSidebarPanel): Don't use addNavigationItem
  12654. since that would go after the right items.
  12655. (WebInspector.Sidebar.prototype.get leftNavigationItems): Added.
  12656. (WebInspector.Sidebar.prototype.set leftNavigationItems): Added.
  12657. (WebInspector.Sidebar.prototype.get rightNavigationItems): Added.
  12658. (WebInspector.Sidebar.prototype.set rightNavigationItems): Added.
  12659. 2012-10-13 Antoine Quint <graouts@apple.com>
  12660. We add a new navigation item to the FrameContentView to toggle composition debug options using
  12661. the page's settings. To facilitate that, we added a new method in InspectorPageAgent to allow
  12662. to tap into WebCore and change those settings. That work is covered by an OpenSource patch for
  12663. https://bugs.webkit.org/show_bug.cgi?id=99253.
  12664. <rdar://problem/10358004> Would like ability to turn layer borders on/off via the Web Inspector
  12665. Reviewed by Timothy Hatcher.
  12666. * Localizations/en.lproj/localizedStrings.js:
  12667. * UserInterface/FrameContentView.js:
  12668. (WebInspector.FrameContentView.prototype.get navigationItems):
  12669. (WebInspector.FrameContentView.prototype.shown):
  12670. (WebInspector.FrameContentView.prototype._toggleNodeSearch):
  12671. (WebInspector.FrameContentView.prototype._toggleCompositingBorders):
  12672. * UserInterface/Images/NavigationItemLayers.pdf: Added.
  12673. * UserInterface/InspectorBackendCommands.js:
  12674. 2012-10-12 Antoine Quint <graouts@apple.com>
  12675. We remove the code that manages the display of the "node inspection by selection" toggle navigation
  12676. item from Main.js and let the ContentBrowser add and remove navigation items registered on the ContentView
  12677. instance made the current content view.
  12678. <rdar://problem/12487959> Let content views provide navigation items to the content browser.
  12679. Reviewed by Timothy Hatcher.
  12680. * UserInterface/ContentBrowser.js:
  12681. (WebInspector.ContentBrowser):
  12682. (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems.var):
  12683. (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
  12684. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
  12685. * UserInterface/ContentView.js:
  12686. (WebInspector.ContentView.prototype.get navigationItems):
  12687. * UserInterface/FrameContentView.js:
  12688. (WebInspector.FrameContentView.prototype.get navigationItems):
  12689. (WebInspector.FrameContentView.prototype.shown):
  12690. (WebInspector.FrameContentView.prototype._pathComponentSelected):
  12691. (WebInspector.FrameContentView.prototype._setNodeSearchEnabled):
  12692. (WebInspector.FrameContentView.prototype._toggleNodeSearch):
  12693. * UserInterface/Main.js:
  12694. (WebInspector.contentLoaded):
  12695. 2012-10-12 Timothy Hatcher <timothy@apple.com>
  12696. Update the CSSKeywordCompletions.InheritedProperties list.
  12697. <rdar://problem/12371756> Computed -webkit-font-smoothing should appear in Inspector
  12698. Rubber-stamped by Brian Weinstein.
  12699. * UserInterface/CSSKeywordCompletions.js:
  12700. (WebInspector.CSSKeywordCompletions.InheritedProperties): Updated from CSSProperty::isInheritedProperty
  12701. from WebCore. The old list was from an old CSS 2.1 list.
  12702. 2012-10-12 Timothy Hatcher <timothy@apple.com>
  12703. Don't overdraw the DataGrid sort indicator each time a DataGrid is created.
  12704. <rdar://problem/12488653> DataGrid sort indicator keeps getting darker
  12705. Reviewed by John Sullivan.
  12706. * UserInterface/DataGrid.js:
  12707. (WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Store _generatedSortIndicatorImages
  12708. on the WebInspector.DataGrid constructor so it only generates the images once. Use a solid color for the
  12709. arrows. The previous color was too light now that it isn't overdrawing.
  12710. 2012-10-11 Timothy Hatcher <timothy@apple.com>
  12711. Show the HTTP method, cached and HTTP status code/text in the Resource details sidebar.
  12712. This fixes two cases where the resource was not marked as cached; when loaded from the
  12713. disk cache and when there is a 304 response.
  12714. <rdar://problem/11256645> REGRESSION (Safari 6): No HTTP method shown
  12715. Reviewed by Ricky Mondello.
  12716. * Localizations/en.lproj/localizedStrings.js: Updated.
  12717. * UserInterface/FrameResourceManager.js:
  12718. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along the method.
  12719. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null
  12720. for the request method.
  12721. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Mark as cached
  12722. when loaded from the disk cache.
  12723. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Pass along the method.
  12724. * UserInterface/Resource.js:
  12725. (WebInspector.Resource): Added requestMethod and store it.
  12726. (WebInspector.Resource.prototype.get requestMethod): Added.
  12727. (WebInspector.Resource.prototype.updateForResponse): Renamed ResponseHeadersDidChange event to
  12728. ResponseReceived since it represents more than headers.
  12729. (WebInspector.Resource.prototype.markAsCached): Fire CacheStatusDidChange event.
  12730. * UserInterface/ResourceDetailsSidebarPanel.js:
  12731. (WebInspector.ResourceDetailsSidebarPanel): Create new rows and section.
  12732. (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Listen for new events.
  12733. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshRequestAndResponse
  12734. instead of _refreshResponseHeaders.
  12735. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Added.
  12736. Update the new section and also call _refreshResponseHeaders.
  12737. 2012-10-11 Antoine Quint <graouts@apple.com>
  12738. Identify floating value and display a rounded value to the 100th in the box model
  12739. section with a thumbnail showing the full value. Here are screenshots of before
  12740. after applying this patch for margins with a floating value.
  12741. <rdar://problem/12478166> Box Model section can show values overlapping their label
  12742. Reviewed by Timothy Hatcher.
  12743. * UserInterface/BoxModelDetailsSectionRow.js
  12744. 2012-10-11 Antoine Quint <graouts@apple.com>
  12745. Make headers in the details section use an ellipsis overflow style.
  12746. <rdar://problem/12478151> Class names in the list of inherited classes in the Node
  12747. sidebar can overflow
  12748. Reviewed by Timothy Hatcher.
  12749. * UserInterface/DetailsSection.css
  12750. 2012-10-10 Timothy Hatcher <timothy@apple.com>
  12751. Prevent searches from breaking links in the Source Code view of the Web Inspector.
  12752. This changes how the syntax highlighter appends tokens and search results. The token
  12753. elements are now created in whole before processing the inner text and search results.
  12754. Before the DOM would end up being flatter, but it caused multiple links to be created
  12755. if a search result was in the middle. The links were broken too because it only knew
  12756. about the fragment of the text and it resolved the absolute URL on that.
  12757. <rdar://problem/12461082> Searching in Safari's Web Inspector breaks links in source
  12758. Reviewed by Joseph Pecoraro.
  12759. * UserInterface/SyntaxHighlightingSupport.js:
  12760. (WebInspector.createSyntaxHighlightedDocumentFragment):
  12761. (WebInspector.createSyntaxHighlightedDocumentFragment.createTextNode):
  12762. (WebInspector.createSyntaxHighlightedDocumentFragment.appendText):
  12763. (WebInspector.createSyntaxHighlightedDocumentFragment.appendToken):
  12764. 2012-10-10 Timothy Hatcher <timothy@apple.com>
  12765. Make DOM storage refresh on update when inspecting iOS 6 devices.
  12766. <rdar://problem/12472491> REGRESSION: DOM Storage does not refresh when inspecting iOS 6
  12767. Reviewed by Brian Weinstein.
  12768. * UserInterface/DOMStorageObserver.js:
  12769. (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Added. Call domStorageUpdated.
  12770. * UserInterface/InspectorBackendLegacyCommands.js: Registered DOMStorage.updateDOMStorage event.
  12771. 2012-10-10 Timothy Hatcher <timothy@apple.com>
  12772. Make database inspection work with Curie and keep it backwards compatible with iOS 6.
  12773. <rdar://problem/12463671> REGRESSION: Database inspection is broken
  12774. Reviewed by Brian Weinstein.
  12775. * Localizations/en.lproj/localizedStrings.js: Updated.
  12776. * UserInterface/DatabaseObject.js:
  12777. (WebInspector.DatabaseObject.prototype.executeSQL): Set expectsResultObject on the callback.
  12778. (WebInspector.DatabaseObject.prototype.executeSQL.queryCallback): Added.
  12779. (WebInspector.DatabaseObject.prototype.executeSQL.callback): Reworked for compatibility
  12780. by using the result object.
  12781. * UserInterface/DatabaseObserver.js:
  12782. (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Added.
  12783. (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Added.
  12784. * UserInterface/InspectorBackend.js:
  12785. (InspectorBackendClass.prototype.dispatch): See if the callback needs the result
  12786. object by checking for expectsResultObject.
  12787. * UserInterface/InspectorBackendLegacyCommands.js: Added.
  12788. * UserInterface/Main.html: Included InspectorBackendLegacyCommands.js.
  12789. 2012-10-09 Timothy Hatcher <timothy@apple.com>
  12790. When using "Inspect Element", select the Style details sidebar panel if one of the DOM
  12791. details sidebar panels isn't already selected.
  12792. <rdar://problem/12239441> REGRESSION (Safari 6): "Inspect Element" shows Resource
  12793. details instead of useful Style details
  12794. Reviewed by John Sullivan.
  12795. * UserInterface/Main.js:
  12796. (WebInspector._domNodeWasInspected): Set this.detailsSidebar.selectedSidebarPanel
  12797. to this.cssStyleDetailsSidebarPanel if the current sidebar ins't an instance of
  12798. the WebInspector.DOMDetailsSidebarPanel prototype.
  12799. 2012-10-09 Timothy Hatcher <timothy@apple.com>
  12800. Make the Style details sidebar work again after recent protocol changes.
  12801. This change makes the Web Inspector work with Curie's Inspector protocol as well
  12802. as maintaining backwards compatibility with iOS 6.
  12803. <rdar://problem/12281730> REGRESSION (r129470): Nothing is showing in the Style sidebar
  12804. Reviewed by Ricky Mondello.
  12805. * UserInterface/BoxModelDetailsSectionRow.js:
  12806. (WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Removed forcedPseudoClasses
  12807. from the call to getComputedStyleAsync, because it was always ignored.
  12808. * UserInterface/CSSRule.js:
  12809. (WebInspector.CSSRule): Support selectorList and selectorText.
  12810. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  12811. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Removed
  12812. forcedPseudoClasses from the calls to getComputedStyleAsync and getMatchedStylesAsync.
  12813. Fallback to empty array for matchedCSSRules.
  12814. * UserInterface/CSSStyleManager.js:
  12815. (WebInspector.CSSStyleManager.parseRuleArrayPayload): The protocol had just an array of
  12816. rules, now it is an array of matches that have a 'rule' property. Support both.
  12817. (WebInspector.CSSStyleManager.prototype.forcedPseudoClasses): Removed.
  12818. (WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync): Removed forcedPseudoClasses
  12819. parameter. The protocol used 'rules' as a property, now it is 'matches'. Support both.
  12820. Use invoke() when calling CSSAgent.getMatchedStylesForNode since forcedPseudoClasses was removed
  12821. as an parameter, and invoke uses parameter names instead of parameter order.
  12822. (WebInspector.CSSStyleManager.prototype.getComputedStyleAsync): Removed forcedPseudoClasses
  12823. parameter. Use invoke() here too.
  12824. 2012-10-09 Timothy Hatcher <timothy@apple.com>
  12825. Update InspectorBackendCommands.js to r130785 of the Inspector protocol.
  12826. <rdar://problem/12463786>
  12827. Some features need to be updated to work with these changes:
  12828. <rdar://problem/12281730> REGRESSION (r129470): Nothing is showing in the Style sidebar
  12829. <rdar://problem/12463671> REGRESSION: Database inspection is broken
  12830. <rdar://problem/12463631> REGRESSION: Subframes don't show the correct DOM (always the main frame's DOM)
  12831. Reviewed by Ricky Mondello.
  12832. * UserInterface/CSSObserver.js:
  12833. (WebInspector.CSSObserver.prototype.namedFlowCreated): Added stub.
  12834. (WebInspector.CSSObserver.prototype.namedFlowRemoved): Added stub.
  12835. (WebInspector.CSSObserver.prototype.regionLayoutUpdated): Added stub.
  12836. * UserInterface/DOMStorageObserver.js:
  12837. (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Removed.
  12838. * UserInterface/DatabaseObserver.js:
  12839. (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Removed.
  12840. (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Removed.
  12841. * UserInterface/DebuggerObserver.js:
  12842. (WebInspector.DebuggerObserver.prototype.scriptParsed): Added sourceMapURL and hasSourceURL arguments.
  12843. * UserInterface/InspectorBackendCommands.js: Updated to r130785.
  12844. * UserInterface/InspectorObserver.js:
  12845. (WebInspector.InspectorObserver.prototype.didCreateWorker): Removed.
  12846. (WebInspector.InspectorObserver.prototype.didDestroyWorker): Removed.
  12847. 2012-10-04 Mark Rowe <mrowe@apple.com>
  12848. Take Xcode's suggestions for changes to our internal Xcode projects.
  12849. Rubber-stamped by John Sullivan.
  12850. Xcode 4.5 suggests enabling several new warnings in most of our projects. While doing this
  12851. I also noticed and removed a number of obsolete configuration settings, and upgraded the
  12852. project format for the few projects that were not using the latest version.
  12853. * Configurations/Base.xcconfig:
  12854. * WebInspectorUI.xcodeproj/project.pbxproj:
  12855. 2012-09-13 Timothy Hatcher <timothy@apple.com>
  12856. Collapse the Computed Style section by default.
  12857. We do remember the state, but lets help people along here and collapse it by default.
  12858. <rdar://problem/12294479>
  12859. Reviewed by Cody Krieger and Mark Rowe.
  12860. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  12861. (WebInspector.CSSStyleDetailsSidebarPanel): Pass true when making the _computedStyleSection
  12862. to make it collapse by default.
  12863. 2012-08-27 Timothy Hatcher <timothy@apple.com>
  12864. Use -webkit-image-set for border-image instead of media queries in the Web Inspector.
  12865. Reviewed by Dan Bernstein.
  12866. * UserInterface/TextEditor.css:
  12867. (.text-editor > .gutter > .line-number > .breakpoint): Use -webkit-image-set.
  12868. (.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint): Ditto.
  12869. (.text-editor > .gutter > .line-number.execution-line::after): Ditto.
  12870. * UserInterface/TimelineOverview.css:
  12871. (.timeline-overview > .timeline .bar): Combine two rules with identical selectors.
  12872. (.timeline-overview > .timeline.timeline-record-type-network .bar): Use -webkit-image-set.
  12873. (.timeline-overview > .timeline.timeline-record-type-layout .bar): Ditto.
  12874. (.timeline-overview > .timeline.timeline-record-type-script .bar): Ditto.
  12875. 2012-08-27 Timothy Hatcher <timothy@apple.com>
  12876. Make the JavaScript & Events timeline pills render correctly in HiDPI.
  12877. <rdar://problem/12183848> JavaScript timeline pill broken in HiDPI
  12878. Reviewed by Dan Bernstein.
  12879. * UserInterface/TimelineOverview.css:
  12880. (.timeline-overview > .timeline.timeline-record-type-script .bar): Changed from
  12881. .timeline-overview > .timeline.timeline-record-type-script > .bar.
  12882. 2012-08-15 Joseph Pecoraro <pecoraro@apple.com>
  12883. Add iOS inheritable properties to the inspector to match
  12884. CSSProperty::isInheritedProperty.
  12885. Reviewed by Brian Weinstein.
  12886. * UserInterface/CSSKeywordCompletions.js:
  12887. 2012-08-16 Timothy Hatcher <timothy@apple.com>
  12888. Save and restore the text selection when modifying the DOM representation of the text.
  12889. <rdar://problem/12059199> Selection is lost when scrolling in the source code view
  12890. Reviewed by Darin Adler.
  12891. * UserInterface/TextEditor.js:
  12892. (WebInspector.TextEditor.prototype.set selectedTextRange): Return early if null is passed.
  12893. This allow the callers to avoid a null check.
  12894. (WebInspector.TextEditor.prototype._breakVisibleTextChunksIntoSingleLineTextChunks):
  12895. Save at the beginning the text selection, and restore it at the end.
  12896. (WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunks): Ditto.
  12897. 2012-08-14 Timothy Hatcher <timothy@apple.com>
  12898. Make the "Show Error Console" and "Show Page Source" menu items also change the selected navigator
  12899. to match the view showing in the content browser.
  12900. <rdar://problem/12058796> Web Inspector comes up in an inconsistent state, always showing the console
  12901. Reviewed by Brian Weinstein.
  12902. * UserInterface/InspectorFrontendAPI.js:
  12903. (InspectorFrontendAPI.showConsole): Select the Log sidebar.
  12904. (InspectorFrontendAPI.showMainResourceForFrame): Select the Resource sidebar.
  12905. 2012-08-03 Timothy Hatcher <timothy@apple.com>
  12906. Disable pause on exception by default.
  12907. Developers are confused that pause on uncaught exceptions is enabled by default.
  12908. <rdar://problem/12025998>
  12909. Reviewed by Jessie Berlin.
  12910. * UserInterface/DebuggerManager.js:
  12911. (WebInspector.DebuggerManager): Change true to false for the "break-on-all-uncaught-exceptions"
  12912. setting default value.
  12913. 2012-08-01 Timothy Hatcher <timothy@apple.com>
  12914. Update CSSKeywordCompletions.js.
  12915. <rdar://problem/12008709>
  12916. Reviewed by Brian Weinstein.
  12917. * UserInterface/CSSKeywordCompletions.js: Merge r124016 from WebKit.
  12918. 2012-08-01 Timothy Hatcher <timothy@apple.com>
  12919. DOMStorageObserver.updateDOMStorage should be DOMStorageObserver.domStorageUpdated.
  12920. "updateDOMStorage" was renamed to "domStorageUpdated" in WebKit r118349. We need to support
  12921. the old and new name for backwards compatibility.
  12922. <rdar://problem/12008490>
  12923. Reviewed by Brian Weinstein.
  12924. * UserInterface/DOMStorageObserver.js:
  12925. (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Added comment. Call domStorageUpdated.
  12926. (WebInspector.DOMStorageObserver.prototype.domStorageUpdated): Added. Does what updateDOMStorage did.
  12927. 2012-07-31 Timothy Hatcher <timothy@apple.com>
  12928. Show the file and line number instead of a go-to arrow for style rules and event listeners.
  12929. <rdar://problem/11347946> REGRESSION (New Web Inspector): Inspector does not show filename/line number for CSS rules
  12930. Reviewed by John Sullivan.
  12931. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  12932. (.sidebar > .panel.details.css-style .styles-section .header .title .media a): Added !important to color. Renamed from .subtitle.
  12933. * UserInterface/DetailsSection.css:
  12934. (.details-section > .content > .group > .row.simple > .label): Remove duplicate padding property, set padding-left to be 6px.
  12935. (.details-section > .content > .group > .row.simple > .value): Set padding-right to be 6px.
  12936. (.details-section > .content > .group > .row.properties): Make left and right padding equal.
  12937. * UserInterface/EventListenerSectionGroup.css:
  12938. (.event-listener-section > .content > .group > .row.simple > .value .go-to-arrow): Removed.
  12939. * UserInterface/EventListenerSectionGroup.js:
  12940. (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): Use WebInspector.createResourceLink.
  12941. * UserInterface/Main.css:
  12942. (.go-to-link): Added.
  12943. (.go-to-link:not(.dont-float)): Added.
  12944. * UserInterface/Main.js:
  12945. (WebInspector.createResourceLink): Added.
  12946. * UserInterface/StylePropertiesSection.js:
  12947. (WebInspector.StylePropertiesSection): Use WebInspector.createResourceLink.
  12948. (WebInspector.StylePropertiesSection.prototype._linkify): Removed.
  12949. (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Use WebInspector.createResourceLink.
  12950. 2012-07-28 Timothy Hatcher <timothy@apple.com>
  12951. Make reloading while viewing a resource in the Web Inspector show the main resource.
  12952. This keeps you looking at resources instead of dumping you into a log or timeline view.
  12953. This was only an issue if you had viewed a log or timeline before viewing a resource.
  12954. <rdar://problem/11981540> Reloading while viewing a resource sometimes switches to the Log or Timeline
  12955. Reviewed by John Sullivan.
  12956. * UserInterface/ResourceSidebarPanel.js:
  12957. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Remember if the current view was one
  12958. that we care about before closing them.
  12959. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork): Show the main frame since
  12960. there is no content view showing or we were showing a resource before.
  12961. 2012-07-28 Timothy Hatcher <timothy@apple.com>
  12962. Make selection of a navigator in the Web Inspector show the last selected content view from that navigator.
  12963. This makes switching between different content quicker, especially for the Resource, Instrument and Log
  12964. navigators which have default initial selections.
  12965. <rdar://problem/10854727> Selecting the Log sidebar should select a log by default
  12966. Reviewed by John Sullivan.
  12967. * UserInterface/InstrumentSidebarPanel.js:
  12968. (WebInspector.InstrumentSidebarPanel): Make the Network Requests timeline selected by default.
  12969. (WebInspector.InstrumentSidebarPanel.prototype.shown):
  12970. (WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected): Deselect any tree element
  12971. in the main content tree outline to prevent two selections in the sidebar.
  12972. (WebInspector.InstrumentSidebarPanel.prototype._profileSelected): Deselect any tree element in the timelines
  12973. tree outline to prevent two selections in the sidebar.
  12974. * UserInterface/LogSidebarPanel.js:
  12975. (WebInspector.LogSidebarPanel.prototype._sessionStarted): Select the Current Log tree element by default the first time.
  12976. * UserInterface/Main.js:
  12977. (WebInspector.contentLoaded): Move some settings above this.navigationSidebar.selectedSidebarPanel to prevent
  12978. an exception from accessing them before they are set. This was triggered by the new code in NavigationSidebarPanel.shown.
  12979. * UserInterface/NavigationSidebarPanel.js:
  12980. (WebInspector.NavigationSidebarPanel.prototype.shown): Reselect the selected tree element to cause the content view
  12981. to be shown as well.
  12982. * UserInterface/ResourceSidebarPanel.js:
  12983. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Select the main frame tree element by default.
  12984. 2012-07-26 Timothy Hatcher <timothy@apple.com>
  12985. Make searching source code via the find banner fast again.
  12986. <rdar://problem/11955081> REGRESSION (New Web Inspector): Searching large resources via Find Banner is dramatically slower than Safari 5
  12987. Reviewed by John Sullivan.
  12988. * UserInterface/SourceCodeTextEditor.js:
  12989. (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch): Added. Uses the backend agents to do a quick search pass before doing
  12990. the inner-line matches.
  12991. * UserInterface/TextEditor.js:
  12992. (WebInspector.TextEditor):
  12993. (WebInspector.TextEditor.prototype.get currentSearchQuery): Added. Needed by SourceCodeTextEditor.customPerformSearch.
  12994. (WebInspector.TextEditor.prototype.performSearch): Use searchCleared to fully clear the previous results.
  12995. (WebInspector.TextEditor.prototype.performSearch.batchSearch): Use addSearchResultRange for adding a new result.
  12996. (WebInspector.TextEditor.prototype.addSearchResultRange): Added. Factored out of performSearch.batchSearch. Calls _updateLineForSearchResultMatchSoon.
  12997. (WebInspector.TextEditor.prototype.searchCleared): Clear _pendingSearchResultLineNumbers.
  12998. (WebInspector.TextEditor.prototype._updateLineForSearchResultMatchSoon): Added. Helper for batching line updates.
  12999. (WebInspector.TextEditor.prototype._updateLineForSearchResultMatchSoon.delayedWork): Added. Factored out of performSearch.batchSearch.
  13000. 2012-07-11 Mark Rowe <mrowe@apple.com>
  13001. Build against the latest SDK when targeting older OS X versions.
  13002. The deployment target is already set to the version that we're targeting, and it's that setting
  13003. which determines which functionality from the SDK is available to us.
  13004. Reviewed by Dan Bernstein.
  13005. * Configurations/Base.xcconfig:
  13006. 2012-06-18 Timothy Hatcher <timothy@apple.com>
  13007. Fix an exception when viewing a JavaScript profile with milliseconds instead of percentages.
  13008. <rdar://problem/11691663> REGRESSION (New Web Inspector): Exception when viewing JavaScript Profile, making profiles unusable
  13009. Reviewed by Brian Weinstein.
  13010. * UserInterface/ProfileDataGridTree.js:
  13011. (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds): Pass true for the last argument of Number.secondsToString.
  13012. 2012-06-16 Timothy Hatcher <timothy@apple.com>
  13013. Show Resource details for the selected row in Network requests.
  13014. <rdar://problem/11683757>
  13015. Reviewed by Joseph Pecoraro.
  13016. * UserInterface/DataGrid.js:
  13017. (WebInspector.DataGridNode.prototype.select): Fire the WebInspector.DataGrid.Event.SelectedNodeChanged event.
  13018. (WebInspector.DataGridNode.prototype.deselect): Ditto.
  13019. * UserInterface/Main.html: Include ResourceTimelineDataGridNodePathComponent.js.
  13020. * UserInterface/ResourceTimelineDataGridNodePathComponent.js: Added.
  13021. (WebInspector.ResourceTimelineDataGridNodePathComponent):
  13022. (WebInspector.ResourceTimelineDataGridNodePathComponent.prototyp.get resourceTimelineDataGridNode):
  13023. (WebInspector.ResourceTimelineDataGridNodePathComponent.prototype.get previousSibling):
  13024. (WebInspector.ResourceTimelineDataGridNodePathComponent.prototype.get nextSibling):
  13025. * UserInterface/TimelinesContentView.js:
  13026. (WebInspector.TimelinesContentView): Add WebInspector.DataGrid.Event.SelectedNodeChanged listener.
  13027. (WebInspector.TimelinesContentView.prototype.get selectionPathComponents): Include a ResourceTimelineDataGridNodePathComponent
  13028. if the selected node is a ResourceTimelineDataGridNode.
  13029. (WebInspector.TimelinesContentView.prototype._dataGridNodePathComponentSelected): Added. Reveal and select the node.
  13030. (WebInspector.TimelinesContentView.prototype._selectedNodeChanged): Dispatch WebInspector.ContentView.Event.SelectionPathComponentsDidChange.
  13031. 2012-06-09 Timothy Hatcher <timothy@apple.com>
  13032. Switch the Web Inspector over to use tab-size for the source code view.
  13033. <rdar://problem/11633291> Use tab-size CSS property in the Web Inspector instead of an inline-block
  13034. Reviewed by Dan Bernstein.
  13035. * UserInterface/SyntaxHighlighter.js:
  13036. (WebInspector.SyntaxHighlighter.CharacterTokens): Removed \t.
  13037. * UserInterface/SyntaxHighlightingDefaultTheme.css:
  13038. (.syntax-highlighted): Added tab-size: 4.
  13039. (.syntax-highlighted .tab): Removed.
  13040. * UserInterface/SyntaxHighlightingSupport.js:
  13041. (WebInspector.createSyntaxHighlightedDocumentFragment): Removed tab token support.
  13042. 2012-06-07 Joseph Pecoraro <pecoraro@apple.com>
  13043. <rdar://problem/11613940> DataGrid column collapser button should have a tooltip
  13044. Reviewed by Darin Adler and Timothy Hatcher.
  13045. * Localizations/en.lproj/localizedStrings.js:
  13046. * UserInterface/DataGrid.js:
  13047. (WebInspector.DataGrid):
  13048. (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
  13049. (WebInspector.DataGrid.prototype._collapserButtonCollapseColumnsToolTip):
  13050. (WebInspector.DataGrid.prototype._collapserButtonExpandColumnsToolTip):
  13051. 2012-05-30 Joseph Pecoraro <pecoraro@apple.com>
  13052. Workaround for: <rdar://problem/11536832> Cannot access content view from Instruments navigator if name of file is truncated
  13053. Implement a workaround so that go-to arrows still work in situations
  13054. where text boxes incorrectly prevent them from being clickable.
  13055. Giving the arrows a z-index always makes them work.
  13056. Reviewed by Timothy hatcher.
  13057. * UserInterface/Main.css:
  13058. (.go-to-arrow):
  13059. 2012-05-25 Joseph Pecoraro <pecoraro@apple.com>
  13060. <rdar://problem/11538965> Breakpoint callframe tooltips show wrong line number
  13061. ScriptLocation lineNumber is 0-based. Convert to 1-based for display.
  13062. Reviewed by Timothy Hatcher.
  13063. * UserInterface/CallFrameTreeElement.js:
  13064. (WebInspector.CallFrameTreeElement):
  13065. 2012-05-24 Timothy Hatcher <timothy@apple.com>
  13066. Make the WebInspector.framework build 32/64-bit universal to match WebKit.
  13067. Since WebKit links against the WebInspector framework, they need to support
  13068. the same architectures. Otherwise, the framework fails to load when soft
  13069. linking and the resources aren't found, which causes an exception/crash.
  13070. <rdar://problem/11373948> Crash opening the Web Inspector in 32-bit apps
  13071. Reviewed by Joseph Pecoraro.
  13072. * Configurations/Base.xcconfig: Set VALID_ARCHS to ARCHS_STANDARD_32_64_BIT.
  13073. * Configurations/DebugRelease.xcconfig: Set ARCHS to ARCHS_STANDARD_32_64_BIT.
  13074. 2012-05-23 Timothy Hatcher <timothy@apple.com>
  13075. Fix some occasional assertions and an exception that happens in CSSStyleDetailsSidebarPanel.
  13076. These can happen if there is an error from the protocol when fetching the CSS rules. Now when
  13077. this happens the sidebar will not show stale data.
  13078. <rdar://problem/11516416>
  13079. Reviewed by Brian Weinstein.
  13080. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  13081. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.matchedStylesCallback): Added fallback values.
  13082. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Ditto.
  13083. 2012-05-22 Timothy Hatcher <timothy@apple.com>
  13084. Fix a regression that would cause resource content to overlap when reloading.
  13085. <rdar://problem/11509620> REGRESSION (r42994): Overlapping content views when navigating
  13086. Reviewed by Kevin Decker.
  13087. * UserInterface/ContentViewContainer.js:
  13088. (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Use oldCurrentContentView
  13089. in the loop. The currentContentView variable is not declared until after the loop, so using currentContentView
  13090. is just comparing to undefined at this point.
  13091. 2012-05-21 Timothy Hatcher <timothy@apple.com>
  13092. Fixes an uncaught exception in WebInspector.ContentBrowser._currentContentViewDidChange.
  13093. This event fires when all content views are closed and there is no longer a current view.
  13094. The code under this listener was not properly null checking the content view.
  13095. <rdar://problem/11467085> ContentBrowser has uncaught exception on reload needs to handle null currentContentView
  13096. Reviewed by Oliver Hunt.
  13097. * UserInterface/ContentBrowser.js:
  13098. (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Added null check for representedObject.
  13099. (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Added null check for contentView.
  13100. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Added null check for currentContentView.
  13101. 2012-05-16 Joseph Pecoraro <pecoraro@apple.com>
  13102. <rdar://problem/11468003> REGRESSION: Error log messages contains wrong line number in jump link
  13103. The Log messages coming from the backend contain the expected, file and 1-based
  13104. line number. In the Safari inspector _linkifyLocation was adjusting this to 0-based
  13105. and using the 0-based line number as the display text. The OpenSource inspector's
  13106. linkifier uses WebInspector.formatLinkText for display text which adds back the 1.
  13107. The Safari inspector does not have that. We can just display the correct line number.
  13108. Reviewed by Timothy Hatcher.
  13109. * UserInterface/ConsoleMessageImpl.js:
  13110. (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
  13111. 2012-05-11 Timothy Hatcher <timothy@apple.com>
  13112. Fix an issue where the DOM Tree and Source Code would overlap.
  13113. <rdar://problem/11329121> REGRESSION (r42567): Overlapping display DOM Tree and Source Code
  13114. Reviewed by Joseph Pecoraro.
  13115. * UserInterface/ContentViewContainer.js:
  13116. (WebInspector.ContentViewContainer.prototype.showContentView): Remove assert and call to _removeContentViewElement.
  13117. The content view is already guaranteed to be removed. The _disassociateFromContentView function now does the assert.
  13118. (WebInspector.ContentViewContainer.prototype.showBackForwardEntry): Return early if it is the same index. Fire the
  13119. CurrentContentViewDidChange event here since _showContentView no longer fires it.
  13120. (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Remove call to _removeContentViewElement.
  13121. Only call _showContentView and fire the CurrentContentViewDidChange event if the content view actually changed.
  13122. (WebInspector.ContentViewContainer.prototype.closeAllContentViews): Remove call to _removeContentViewElement.
  13123. Fire the CurrentContentViewDidChange event here since _showContentView no longer fires it.
  13124. (WebInspector.ContentViewContainer.prototype.shown): Call _showContentView instead of _prepareContentViewToShow.
  13125. (WebInspector.ContentViewContainer.prototype.hidden): Call _hideContentView instead of _prepareContentViewToShow.
  13126. (WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Added assert for visible.
  13127. (WebInspector.ContentViewContainer.prototype._showContentView): Added assert for visible. Removed event dispatch.
  13128. (WebInspector.ContentViewContainer.prototype._hideContentView): Added assert for visible.
  13129. 2012-05-10 Timothy Hatcher <timothy@apple.com>
  13130. Timer events in the WebInspector should show where they were scheduled from.
  13131. Depends on: https://webkit.org/b/86173
  13132. <rdar://problem/11427463>
  13133. Reviewed by John Sullivan.
  13134. * UserInterface/TimelineManager.js:
  13135. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Process TimerFire when the corresponding
  13136. EvaluateScript or FunctionCall record is encountered so we can gather the resource and line number.
  13137. 2012-05-10 Timothy Hatcher <timothy@apple.com>
  13138. Use a static copy of InspectorBackend.js and InspectorBackendCommands.js.
  13139. This fixes a build failure since WebCore renamed the file we were coping.
  13140. For compatibility reasons we should use a static copy of the InspectorBackend instead
  13141. of copying the latest version from WebCore during the build. Using a stable version of
  13142. the InspectorBackend guarantees a constant API for the front-end and protocol level
  13143. changes in WebCore are compatible with older versions of the InspectorBackend.
  13144. <rdar://problem/11426912>
  13145. * Scripts/copy-user-interface-resources.sh: Removed copy commands from derived sources.
  13146. * UserInterface/InspectorBackend.js: Copied from OpenSource r116449.
  13147. * UserInterface/InspectorBackendCommands.js: Ditto.
  13148. * WebInspectorUI.xcodeproj/project.pbxproj: Removed build phase to copy from WebCore.
  13149. 2012-04-26 Timothy Hatcher <timothy@apple.com>
  13150. Update the Web Inspector to work with recent protocol changes.
  13151. <rdar://problem/11329835>
  13152. Reviewed by Joseph Pecoraro.
  13153. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  13154. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Pass undefined for the args parameter of callFunction.
  13155. * UserInterface/DOMTreeElement.js:
  13156. (WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode): Ditto.
  13157. * UserInterface/JavaScriptTextPrompt.js:
  13158. (WebInspector.JavaScriptTextPrompt.prototype.evalInInspectedWindow): Renamed doNotPauseOnExceptions to doNotPauseOnExceptionsAndMuteConsole.
  13159. Pass doNotPauseOnExceptionsAndMuteConsole to evaluateOnCallFrame.
  13160. (WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated): Pass undefined for the args parameter of callFunctionJSON.
  13161. * UserInterface/NetworkObserver.js:
  13162. (WebInspector.NetworkObserver.prototype.requestWillBeSent): Removed stackTrace parameter.
  13163. * UserInterface/RemoteObject.js:
  13164. (WebInspector.RemoteObject.prototype.setPropertyValue): Renamed doNotPauseOnExceptions to doNotPauseOnExceptionsAndMuteConsole.
  13165. Pass true for doNotPauseOnExceptionsAndMuteConsole in RuntimeAgent.callFunctionOn.
  13166. (WebInspector.RemoteObject.prototype.callFunction): Added args parameter and pass it along. Pass true for doNotPauseOnExceptionsAndMuteConsole.
  13167. (WebInspector.RemoteObject.prototype.callFunctionJSON): Ditto.
  13168. 2012-04-20 Joseph Pecoraro <pecoraro@apple.com>
  13169. <rdar://problem/11287053> ApplicationCache sorting Resource column is broken
  13170. The items being sorted in the data grid are ApplicationCacheResources
  13171. from the Inspector protocol. Those resources do not have a "name"
  13172. property. Only "url", "size", and "type".
  13173. Reviewed by Jon Honeycutt.
  13174. * UserInterface/ApplicationCacheFrameContentView.js:
  13175. (WebInspector.ApplicationCacheFrameContentView.prototype._populateDataGrid):
  13176. 2012-04-20 Joseph Pecoraro <pecoraro@apple.com>
  13177. <rdar://problem/11287121> REGRESSION: Inspector window should move to front when you hit a breakpoint
  13178. Reviewed by Dan Bernstein.
  13179. * UserInterface/Main.js:
  13180. (WebInspector._debuggerDidPause):
  13181. 2012-04-18 Timothy Hatcher <timothy@apple.com>
  13182. Fix an regression where issues were replacing the content view when they should be inline.
  13183. This also fixes an regression where issue lines were not highlighting because the style class
  13184. was not being applied, 'undefined' was.
  13185. <rdar://problem/11180526> REGRESSION (r41932-r41943): ResourceContentView was only showing
  13186. an error message and not content
  13187. Reviewed by Brian Weinstein.
  13188. * UserInterface/ResourceContentView.js:
  13189. (WebInspector.ResourceContentView): Only add issue event listener and issues if !managesOwnIssues.
  13190. (WebInspector.ResourceContentView.prototype.closed): Remove issue event listener only if !managesOwnIssues.
  13191. (WebInspector.ResourceContentView.prototype._issueWasAdded): Assert !managesOwnIssues.
  13192. * UserInterface/SourceCodeTextEditor.js:
  13193. (WebInspector.SourceCodeTextEditor.prototype._addIssueToLine): Use the connect object for the style classes.
  13194. * UserInterface/TextResourceContentView.js:
  13195. (WebInspector.TextResourceContentView.get managesOwnIssues): Added. Return true.
  13196. 2012-04-16 Timothy Hatcher <timothy@apple.com>
  13197. Save and restore the scroll position for content views when hiding and showing.
  13198. <rdar://problem/11184241> REGRESSION (New Web Inspector): Console log view scroll offset
  13199. does not follow most recent messages
  13200. Reviewed by Joseph Pecoraro.
  13201. * UserInterface/ApplicationCacheFrameContentView.js:
  13202. (WebInspector.ApplicationCacheFrameContentView.prototype.get scrollableElements): Added.
  13203. * UserInterface/ClusterContentView.js:
  13204. (WebInspector.ClusterContentView.prototype.shown): Call shown directly on the _contentViewContainer.
  13205. (WebInspector.ClusterContentView.prototype.hidden): Ditto for hidden.
  13206. * UserInterface/ContentView.js:
  13207. (WebInspector.ContentView.prototype.get visible): Use a simple boolean.
  13208. (WebInspector.ContentView.prototype.set visible): Ditto.
  13209. (WebInspector.ContentView.prototype.get scrollableElements): Added stub.
  13210. (WebInspector.ContentView.prototype.get keepElementsScrolledToTheBottom): Added stub.
  13211. * UserInterface/ContentViewContainer.css:
  13212. (.content-view-container > .content-view): Removed. Using display: none was pointless since the
  13213. element is removed from the DOM. This prevented saving scroll positions.
  13214. * UserInterface/ContentViewContainer.js:
  13215. (WebInspector.ContentViewContainer.prototype.shown): Added. Calls _prepareContentViewToShow.
  13216. (WebInspector.ContentViewContainer.prototype.hidden): Added. Calls _prepareContentViewToHide.
  13217. (WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView): Added.
  13218. (WebInspector.ContentViewContainer.prototype._restoreScrollPositionsForContentView): Added.
  13219. (WebInspector.ContentViewContainer.prototype._showContentView): Calls _prepareContentViewToShow.
  13220. (WebInspector.ContentViewContainer.prototype._prepareContentViewToShow): Added. Calls
  13221. _restoreScrollPositionsForContentView in addition to the work _showContentView did.
  13222. (WebInspector.ContentViewContainer.prototype._hideContentView): Calls _prepareContentViewToHide.
  13223. (WebInspector.ContentViewContainer.prototype._prepareContentViewToHide): Added. Calls
  13224. _saveScrollPositionsForContentView in addition to the work _hideContentView did.
  13225. * UserInterface/CookieStorageContentView.js:
  13226. (WebInspector.CookieStorageContentView.prototype.get scrollableElements): Added.
  13227. * UserInterface/DOMStorageContentView.js:
  13228. (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added.
  13229. * UserInterface/DOMTreeContentView.js:
  13230. (WebInspector.DOMTreeContentView.prototype.get scrollableElements): Added.
  13231. * UserInterface/DatabaseTableContentView.js:
  13232. (WebInspector.DatabaseTableContentView.prototype.get scrollableElements): Added.
  13233. * UserInterface/LogContentView.js:
  13234. (WebInspector.LogContentView): Removed _scrolledToBottom.
  13235. (WebInspector.LogContentView.prototype.consoleCleared): Removed _scrolledToBottom.
  13236. (WebInspector.LogContentView.prototype.hidden): Removed call to storeScrollPositions.
  13237. (WebInspector.LogContentView.prototype.get scrollableElements): Added.
  13238. (WebInspector.LogContentView.prototype.get keepElementsScrolledToTheBottom): Added.
  13239. * UserInterface/ScriptContentView.js:
  13240. (WebInspector.ScriptContentView.prototype.get scrollableElements): Added.
  13241. * UserInterface/TextEditor.js:
  13242. (WebInspector.TextEditor.prototype.get contentContainerElement): Added.
  13243. * UserInterface/TextResourceContentView.js:
  13244. (WebInspector.TextResourceContentView.prototype.get scrollableElements): Added.
  13245. 2012-04-14 Timothy Hatcher <timothy@apple.com>
  13246. Add support for searching the DOM tree with the Find Banner.
  13247. Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
  13248. code view (no Find banner is present)
  13249. Reviewed by Joseph Pecoraro.
  13250. * UserInterface/DOMTreeContentView.js:
  13251. (WebInspector.DOMTreeContentView.prototype.get supportsSearch): Added. Return true.
  13252. (WebInspector.DOMTreeContentView.prototype.get numberOfSearchResults): Added.
  13253. (WebInspector.DOMTreeContentView.prototype.performSearch): Added. Clear previous results and call
  13254. DOMAgent.performSearch.
  13255. (WebInspector.DOMTreeContentView.prototype.performSearch.searchResultsReady): Store the identifier and
  13256. fire the NumberOfSearchResultsDidChange event.
  13257. (WebInspector.DOMTreeContentView.prototype.searchCleared): Added. Clear the result and state.
  13258. (WebInspector.DOMTreeContentView.prototype.revealPreviousSearchResult): Added. Call _revealSearchResult.
  13259. (WebInspector.DOMTreeContentView.prototype.revealNextSearchResult): Added. Ditto.
  13260. (WebInspector.DOMTreeContentView.prototype._revealSearchResult): Added. Call DOMAgent.getSearchResults.
  13261. (WebInspector.DOMTreeContentView.prototype._revealSearchResult.revealResult): Select the DOM node.
  13262. 2012-04-14 Timothy Hatcher <timothy@apple.com>
  13263. Show the yellow bouncy when highlighting the current search result.
  13264. Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
  13265. code view (no Find banner is present)
  13266. Reviewed by Dan Bernstein.
  13267. * UserInterface/TextEditor.css:
  13268. (.text-editor .bouncy-highlight): Added.
  13269. (@-webkit-keyframes bouncy): Added.
  13270. * UserInterface/TextEditor.js:
  13271. (WebInspector.TextEditor.prototype._revealSearchResultTextRange): Create and add the bouncy element,
  13272. positioned to line up with the search result element.
  13273. 2012-04-13 Timothy Hatcher <timothy@apple.com>
  13274. Support searching via the find banner on text resources and scripts.
  13275. Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
  13276. code view (no Find banner is present)
  13277. Reviewed by Joseph Pecoraro.
  13278. * UserInterface/ScriptContentView.js:
  13279. (WebInspector.ScriptContentView): Add event listener for TextEditor.Event.NumberOfSearchResultsDidChange.
  13280. (WebInspector.ScriptContentView.prototype.get supportsSearch): Return true.
  13281. (WebInspector.ScriptContentView.prototype.get numberOfSearchResults): Forward to _textEditor.
  13282. (WebInspector.ScriptContentView.prototype.performSearch): Ditto.
  13283. (WebInspector.ScriptContentView.prototype.searchCleared): Ditto.
  13284. (WebInspector.ScriptContentView.prototype.revealPreviousSearchResult): Ditto.
  13285. (WebInspector.ScriptContentView.prototype.revealNextSearchResult): Ditto.
  13286. (WebInspector.ScriptContentView.prototype._numberOfSearchResultsDidChange): Added. Fire ContentView.Event.NumberOfSearchResultsDidChange.
  13287. * UserInterface/SyntaxHighlighter.js:
  13288. * UserInterface/SyntaxHighlightingDefaultTheme.css:
  13289. (.supports-find-banner.showing-find-banner .syntax-highlighted .search-result): Added.
  13290. * UserInterface/SyntaxHighlightingSupport.js:
  13291. (WebInspector.createSyntaxHighlightedDocumentFragment.createTokenElement): Added parameter for search result. Append the search-result
  13292. class when needed. Fixes the quoting for links now that the attribute range can be split by a search result.
  13293. (WebInspector.createSyntaxHighlightedDocumentFragment.appendText): Changed to work with enumerateAttributes instead of enumerateAttribute.
  13294. Check for the search result attribute. Call createTokenElement for search results.
  13295. * UserInterface/TextEditor.js:
  13296. (WebInspector.TextEditor.prototype.get numberOfSearchResults): Added.
  13297. (WebInspector.TextEditor.prototype.performSearch): Added. Iterate over the lines in batches to prevent blocking too long.
  13298. (WebInspector.TextEditor.prototype.performSearch.reportNumberOfSearchResultsDidChange):
  13299. (WebInspector.TextEditor.prototype.performSearch.batchSearch): Loop over lines and perform a regex to find matches.
  13300. (WebInspector.TextEditor.prototype.searchCleared): Added. Clear the results and remove the attribute from the lines.
  13301. (WebInspector.TextEditor.prototype.revealPreviousSearchResult): Added. Decrement the index and call _revealSearchResultTextRange.
  13302. (WebInspector.TextEditor.prototype.revealNextSearchResult): Added. Increment the index and call _revealSearchResultTextRange.
  13303. (WebInspector.TextEditor.prototype._revealSearchResultTextRange): Added. Helper for revealPreviousSearchResult and revealNextSearchResult.
  13304. (WebInspector.TextEditor.prototype._removeSearchResultStyles): Added. Query for all the search results and remove the style.
  13305. * UserInterface/TextResourceContentView.js:
  13306. (WebInspector.TextResourceContentView): Add event listener for TextEditor.Event.NumberOfSearchResultsDidChange.
  13307. (WebInspector.TextResourceContentView.prototype.get supportsSearch): Return true.
  13308. (WebInspector.TextResourceContentView.prototype.get numberOfSearchResults): Forward to _textEditor.
  13309. (WebInspector.TextResourceContentView.prototype.performSearch): Ditto.
  13310. (WebInspector.TextResourceContentView.prototype.searchCleared): Ditto.
  13311. (WebInspector.TextResourceContentView.prototype.revealPreviousSearchResult): Ditto.
  13312. (WebInspector.TextResourceContentView.prototype.revealNextSearchResult): Ditto.
  13313. (WebInspector.TextResourceContentView.prototype._numberOfSearchResultsDidChange): Added. Fire ContentView.Event.NumberOfSearchResultsDidChange.
  13314. 2012-04-13 Timothy Hatcher <timothy@apple.com>
  13315. Add keyboard shortcuts for next and previous search results.
  13316. Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree
  13317. and source code view (no Find banner is present)
  13318. Reviewed by Brian Weinstein.
  13319. * UserInterface/FindBanner.js:
  13320. (WebInspector.FindBanner): Added keyboard shortcuts for Command-G and Command-Shift-G.
  13321. 2012-04-05 Timothy Hatcher <timothy@apple.com>
  13322. Add support to WebInspector.ContentView for dealing with the find banner.
  13323. Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and
  13324. source code view (no Find banner is present)
  13325. Reviewed by Joseph Pecoraro.
  13326. * UserInterface/ClusterContentView.js:
  13327. (WebInspector.ClusterContentView):
  13328. (WebInspector.ClusterContentView.prototype.get supportsSearch): Added. Always return true.
  13329. (WebInspector.ClusterContentView.prototype.get numberOfSearchResults): Added. Forward to the current content view.
  13330. (WebInspector.ClusterContentView.prototype.performSearch): Added. Ditto.
  13331. (WebInspector.ClusterContentView.prototype.searchCleared): Added. Ditto.
  13332. (WebInspector.ClusterContentView.prototype.revealPreviousSearchResult): Added. Ditto.
  13333. (WebInspector.ClusterContentView.prototype.revealNextSearchResult): Added. Ditto.
  13334. (WebInspector.ClusterContentView.prototype._currentContentViewDidChange): Dispatch the
  13335. NumberOfSearchResultsDidChange event.
  13336. (WebInspector.ClusterContentView.prototype._contentViewNumberOfSearchResultsDidChange): Re-dispatch
  13337. the NumberOfSearchResultsDidChange event with this content view as the target.
  13338. * UserInterface/ContentBrowser.js:
  13339. (WebInspector.ContentBrowser):
  13340. (WebInspector.ContentBrowser.prototype.findBannerPerformSearch): Added. Forward to the current content view.
  13341. (WebInspector.ContentBrowser.prototype.findBannerSearchCleared): Added. Ditto.
  13342. (WebInspector.ContentBrowser.prototype.findBannerRevealPreviousResult): Added. Ditto.
  13343. (WebInspector.ContentBrowser.prototype.findBannerRevealNextResult): Added. Ditto.
  13344. (WebInspector.ContentBrowser.prototype._showFindBanner): Don't show if the current content view does not support search.
  13345. (WebInspector.ContentBrowser.prototype._contentViewNumberOfSearchResultsDidChange): Added. Update the find banner.
  13346. * UserInterface/ContentView.js:
  13347. (WebInspector.ContentView.prototype.get supportsSearch): Added stub.
  13348. (WebInspector.ContentView.prototype.get numberOfSearchResults): Added stub.
  13349. (WebInspector.ContentView.prototype.performSearch): Added stub.
  13350. (WebInspector.ContentView.prototype.searchCleared): Added stub.
  13351. (WebInspector.ContentView.prototype.revealPreviousSearchResult): Added stub.
  13352. (WebInspector.ContentView.prototype.revealNextSearchResult): Added stub.
  13353. * UserInterface/FindBanner.js:
  13354. (WebInspector.FindBanner): Added event listeners.
  13355. (WebInspector.FindBanner.prototype._inputFieldChanged): Added. Call the delegate.
  13356. (WebInspector.FindBanner.prototype._previousResultButtonClicked): Added. Ditto.
  13357. (WebInspector.FindBanner.prototype._nextResultButtonClicked): Added. Ditto.
  13358. 2012-04-02 Timothy Hatcher <timothy@apple.com>
  13359. Add WebInspector.FindBanner which implements the user interface for searching in content views.
  13360. The banner shows via Command-F and hides with Escape. Searching is not hooked up yet.
  13361. Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the
  13362. DOM tree and source code view (no Find banner is present)
  13363. Reviewed by Brian Weinstein.
  13364. * Localizations/en.lproj/localizedStrings.js: Updated.
  13365. * UserInterface/ContentBrowser.js:
  13366. (WebInspector.ContentBrowser): Create a FindBanner and keyboard shortcut for Command-F.
  13367. (WebInspector.ContentBrowser.prototype._showFindBanner): Added.
  13368. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Change the target element
  13369. of the find banner to the new content view.
  13370. * UserInterface/ContentViewContainer.css:
  13371. (.content-view-container): Added overflow hidden so the find-banner does not show when hidden.
  13372. (.content-view-container > .content-view): Ditto.
  13373. * UserInterface/FindBanner.css: Added.
  13374. * UserInterface/FindBanner.js: Added.
  13375. (WebInspector.FindBanner):
  13376. (WebInspector.FindBanner.prototype.get delegate):
  13377. (WebInspector.FindBanner.prototype.set delegate):
  13378. (WebInspector.FindBanner.prototype.get element):
  13379. (WebInspector.FindBanner.prototype.get inputField):
  13380. (WebInspector.FindBanner.prototype.get searchQuery):
  13381. (WebInspector.FindBanner.prototype.set searchQuery):
  13382. (WebInspector.FindBanner.prototype.get numberOfResults):
  13383. (WebInspector.FindBanner.prototype.set numberOfResults):
  13384. (WebInspector.FindBanner.prototype.get targetElement):
  13385. (WebInspector.FindBanner.prototype.set targetElement.delayedWork):
  13386. (WebInspector.FindBanner.prototype.set targetElement):
  13387. (WebInspector.FindBanner.prototype.show.delayedWork):
  13388. (WebInspector.FindBanner.prototype.show):
  13389. (WebInspector.FindBanner.prototype.hide):
  13390. (WebInspector.FindBanner.prototype._doneButtonClicked):
  13391. (WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
  13392. * UserInterface/Main.html: Included FindBanner.css and FindBanner.js.
  13393. 2012-04-13 Timothy Hatcher <timothy@apple.com>
  13394. Use searchRegex.lastIndex instead of lineMatch.index + searchTerm.length.
  13395. When creating TextRanges in SearchSidebarPanel it is better to use lastIndex instead of the search term length.
  13396. This isn't a bug now, but it could be later when we support regex search queries in addition of plan text searches.
  13397. Reviewed by Brian Weinstein.
  13398. * UserInterface/SearchSidebarPanel.js:
  13399. (WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback.resourceCallback): Use searchRegex.lastIndex.
  13400. (WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback.domSearchResults): Ditto.
  13401. 2012-04-05 Timothy Hatcher <timothy@apple.com>
  13402. Add better support for getting and setting the text selection in WebInspector.TextEditor.
  13403. This will be needed for the find banner support. <rdar://problem/11193282>
  13404. Reviewed by Joseph Pecoraro.
  13405. * UserInterface/TextEditor.js:
  13406. (WebInspector.TextEditor.prototype.get selectedTextRange): Added.
  13407. (WebInspector.TextEditor.prototype.set selectedTextRange): Added.
  13408. (WebInspector.TextEditor.prototype.revealLine): Use the selectedTextRange setter.
  13409. (WebInspector.TextEditor.prototype._textRangeToDOMRange): Added. Use _textPositionToDOMLocation
  13410. to get the start and end and make a new Range.
  13411. (WebInspector.TextEditor.prototype._domRangeToTextRange): Added. Use _domLocationToTextPosition
  13412. to get the start and end and make a new TextRange.
  13413. (WebInspector.TextEditor.prototype._domLocationToTextPosition): Added.
  13414. (WebInspector.TextEditor.prototype._textPositionToDOMLocation): Added.
  13415. (WebInspector.TextEditorTextChunk): Set _textChunk on the element.
  13416. * UserInterface/Utilities.js:
  13417. (Node.prototype.traverseNextTextNode): Added. Copied from OpenSource utilities.js.
  13418. (Node.prototype.rangeBoundaryForOffset): Added. Ditto.
  13419. 2012-04-02 Timothy Hatcher <timothy@apple.com>
  13420. Add support for disabling keyboard shortcuts and unbinding them altogether.
  13421. You might disable a shortcut to make it only apply when a content view is showing, but still
  13422. have the shortcut be global. Also added support for unbinding a shortcut if you need to remove
  13423. it altogether from the document.
  13424. This is likely to be required for find banner support.
  13425. Reviewed by Brian Weinstein.
  13426. * UserInterface/KeyboardShortcut.js:
  13427. (WebInspector.KeyboardShortcut):
  13428. (WebInspector.KeyboardShortcut.prototype.get disabled): Added.
  13429. (WebInspector.KeyboardShortcut.prototype.set disabled): Added.
  13430. (WebInspector.KeyboardShortcut.prototype.unbind): Added. Removes the shortcut from the target.
  13431. (WebInspector.KeyboardShortcut.prototype.matchesEvent): Return early if disabled.
  13432. 2012-04-02 Timothy Hatcher <timothy@apple.com>
  13433. Make it possible to generate colored images at different sizes than the intrinsic image size.
  13434. This is useful when the input image is a PDF and a different size is needed. This support
  13435. is needed for the find banner back/forward arrows.
  13436. Reviewed by Brian Weinstein.
  13437. * UserInterface/ImageUtilities.js:
  13438. (generateColoredImage): Added optional width and height parameters. Use the intrinsic width and
  13439. height as fallback.
  13440. (generateColoredImagesForCSS.generateImage): Pull the width and height out of the specification.
  13441. Use the intrinsic width and height as fallback. Pass the width and height to generateColoredImage
  13442. with a scale of 1 now that the pixelRatio is now premultiplied in the width and height.
  13443. 2012-04-02 Timothy Hatcher <timothy@apple.com>
  13444. Tweak the colors and gradients used by the search sidebar to match other bars in the Web Inspector.
  13445. If only we had variables in CSS...
  13446. Reviewed by John Sullivan.
  13447. * UserInterface/SearchSidebarPanel.css:
  13448. (.sidebar > .panel.search > .search-bar): Tweaked the colors to match the ones in TimelinesContentView.css
  13449. the upcoming FindBanner.css.
  13450. 2012-04-12 Timothy Hatcher <timothy@apple.com>
  13451. Create a funnel point for display names of URLs and hosts, and properly decode lastPathComponent.
  13452. This decodes lastPathComponent as a URL escaped string. The host needs to be decoded as a punycode string,
  13453. but that isn't easily done in JavaScript so <rdar://problem/11237413> tracks that.
  13454. <rdar://problem/11236933> High-ascii web addresses show corrupted in Web Inspector
  13455. Reviewed by Brian Weinstein.
  13456. * UserInterface/ApplicationCacheFrameContentView.js:
  13457. (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback): Remove unused lastPathComponent var.
  13458. * UserInterface/ApplicationCacheFrameTreeElement.js:
  13459. (WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles): Use displayNameForURL and displayNameForHost.
  13460. * UserInterface/ApplicationCacheManifestTreeElement.js:
  13461. (WebInspector.ApplicationCacheManifestTreeElement.prototype._generateTitles): Ditto.
  13462. * UserInterface/CallFrameTreeElement.js:
  13463. (WebInspector.CallFrameTreeElement): Use displayNameForURL.
  13464. * UserInterface/ConsoleMessageImpl.js:
  13465. (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Ditto.
  13466. * UserInterface/CookieStorageTreeElement.js:
  13467. (WebInspector.CookieStorageTreeElement): Use displayNameForHost.
  13468. * UserInterface/DOMStorageTreeElement.js:
  13469. (WebInspector.DOMStorageTreeElement): Ditto.
  13470. (WebInspector.DOMStorageTreeElement.prototype.get name): Ditto.
  13471. * UserInterface/DatabaseHostTreeElement.js:
  13472. (WebInspector.DatabaseHostTreeElement): Ditto.
  13473. (WebInspector.DatabaseHostTreeElement.prototype.get name): Ditto.
  13474. * UserInterface/EventListenerSectionGroup.js:
  13475. (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): Use displayNameForURL.
  13476. * UserInterface/Main.js:
  13477. (WebInspector.displayNameForURL): Added. Use decodeURIComponent for lastPathComponent and displayNameForHost for host.
  13478. (WebInspector.displayNameForHost): Added. Returns the input, with a comment about decoding punycode.
  13479. (WebInspector.updateWindowTitle): Use decodeURIComponent for lastPathComponent and displayNameForHost for host.
  13480. * UserInterface/ProfileDataGridTree.js:
  13481. (WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Use displayNameForURL.
  13482. * UserInterface/ResourceTimelineDataGridNode.js:
  13483. (WebInspector.ResourceTimelineDataGridNode.prototype.get data): Use displayNameForURL and displayNameForHost.
  13484. * UserInterface/ResourceTreeElement.js:
  13485. (WebInspector.ResourceTreeElement.prototype._updateTitles): Ditto.
  13486. * UserInterface/ScriptTimelineDataGridNode.js:
  13487. (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Use displayNameForURL.
  13488. * UserInterface/ScriptTreeElement.js:
  13489. (WebInspector.ScriptTreeElement): Use displayNameForURL and displayNameForHost.
  13490. 2012-04-11 Timothy Hatcher <timothy@apple.com>
  13491. Strip common error message prefixes from the message line in the Issue sidebar.
  13492. The prefix is used to determine the title line, so it redundant to include it in the message.
  13493. And removing it from the message gives more room for the important info of the message.
  13494. <rdar://problem/11219712> Can't see entire content of errors in the Issue sidebar
  13495. Reviewed by Brian Weinstein.
  13496. * Localizations/en.lproj/localizedStrings.js: Updated.
  13497. * UserInterface/IssueMessage.js:
  13498. (WebInspector.IssueMessage): Determine the type based on source and text prefix matching.
  13499. Removed _source property, and added _type to replace it.
  13500. (WebInspector.IssueMessage.Type.displayName): Added.
  13501. (WebInspector.IssueMessage.prototype.get type): Renamed from source and return _type instead.
  13502. * UserInterface/IssueTreeElement.js:
  13503. (WebInspector.IssueTreeElement): Use a switch for the level instead of raw string comparison.
  13504. Use WebInspector.IssueMessage.Type.displayName to get the title.
  13505. (WebInspector.IssueTreeElement.titleForIssue): Removed.
  13506. 2012-04-09 Timothy Hatcher <timothy@apple.com>
  13507. Add keyboard shortcuts for pause/continue, step over, step into and step out.
  13508. This matches Xcode's keyboard shortcuts and also supports the original Web Inspector
  13509. keyboard shortcuts for compatibility.
  13510. <rdar://problem/11205675> Debugger keyboard shortcuts are broken (step into, step over, etc)
  13511. Reviewed by John Sullivan.
  13512. * Localizations/en.lproj/localizedStrings.js: Updated.
  13513. * UserInterface/QuickConsole.js:
  13514. (WebInspector.QuickConsole): Create the KeyboardShortcuts and show them in the tooltips.
  13515. (WebInspector.QuickConsole.prototype.set collapsed): Add the keyboard shortcut to the tooltips.
  13516. (WebInspector.QuickConsole.prototype._debuggerDidPause): Ditto.
  13517. (WebInspector.QuickConsole.prototype._debuggerDidResume): Ditto.
  13518. 2012-04-07 Timothy Hatcher <timothy@apple.com>
  13519. Make the completion popup look like the one in Xcode.
  13520. <rdar://problem/11201824> Console: Autocomplete suggestion list is ugly (has wrong typeface)
  13521. Reviewed by Dan Bernstein.
  13522. * UserInterface/TextPrompt.css:
  13523. (.suggest-box):
  13524. (.suggest-box .container):
  13525. (.suggest-box-content-item):
  13526. (.suggest-box-content-item.selected):
  13527. * UserInterface/TextPrompt.js:
  13528. (WebInspector.TextPrompt.SuggestBox.prototype._updateBoxPosition): Adjusted padding. Impose a max
  13529. height of 160, which turns out to be 10 items.
  13530. 2012-04-07 Timothy Hatcher <timothy@apple.com>
  13531. Make the completion popup work when the console is scrolled.
  13532. <rdar://problem/11184504> "Current Log" console input is way broken when using inline completion popup
  13533. Reviewed by Joseph Pecoraro.
  13534. * UserInterface/Utilities.js:
  13535. (Element.prototype.offsetRelativeToWindow): Removed. boxInWindow was the only client.
  13536. (Element.prototype.boxInWindow): Removed targetWindow parameter, the only client always passed 'window'.
  13537. Use getClientRects instead of the broken offsetRelativeToWindow.
  13538. 2012-04-06 Timothy Hatcher <timothy@apple.com>
  13539. Make console completion behave more like Xcode's auto completion.
  13540. This makes the suggestion popup appear for single items and completions are always shown
  13541. as unselected grey text, not a selected range. The tab key now also accepts the completion.
  13542. <rdar://problem/11201751> Console: Tab to autocomplete does not work
  13543. Reviewed by Joseph Pecoraro.
  13544. * UserInterface/TextPrompt.js:
  13545. (WebInspector.TextPrompt.prototype._completionsReady): Always pass true for canShowForSingleItem when call
  13546. _suggestBox.updateSuggestions.
  13547. (WebInspector.TextPrompt.prototype._completionsReady): Remove the auto completion path. There is now only
  13548. one completion style, handled by applySuggestion.
  13549. (WebInspector.TextPrompt.prototype.applySuggestion): Don't select the completion, do the what _completionsReady
  13550. did for the auto complete path -- create an auto complete element for the grey text.
  13551. (WebInspector.TextPrompt.prototype.tabKeyPressed): Call tabKeyPressed on _suggestBox to accept the completion
  13552. instead of doing nothing.
  13553. 2012-04-06 Timothy Hatcher <timothy@apple.com>
  13554. Make the reload keyboard shortcut work when an input field is focused.
  13555. This makes the reload shortcuts and quick console toggle use the KeyboardShortcut class.
  13556. <rdar://problem/11187008> Web Inspector is very picky about what has to be focused in order to reload the page
  13557. Reviewed by Joseph Pecoraro.
  13558. * UserInterface/Main.js:
  13559. (WebInspector.contentLoaded): Remove keydown event listener. Added reload keyboard shortcuts.
  13560. (WebInspector._reloadPage): Added.
  13561. (WebInspector._reloadPageIgnoringCache): Added.
  13562. * UserInterface/QuickConsole.js:
  13563. (WebInspector.QuickConsole): Added toggle or focus keyboard shortcut.
  13564. (WebInspector.QuickConsole.prototype._toggleOrFocus): Added.
  13565. 2012-04-02 Timothy Hatcher <timothy@apple.com>
  13566. Select the contents of the search field when pressing the Command-Shift-F keyboard shortcut.
  13567. In addition to focusing the field, we now select the contents. This matches behavior of all
  13568. search fields tied to keyboard shortcuts.
  13569. <rdar://problem/11169101>
  13570. Reviewed by Joseph Pecoraro.
  13571. * UserInterface/SearchSidebarPanel.js:
  13572. (WebInspector.SearchSidebarPanel.prototype._focusSearchField): Call select() on the field.
  13573. 2012-04-05 Timothy Hatcher <timothy@apple.com>
  13574. Make clicking search results select the text range again.
  13575. This broke when the TextEditor content element was made user modifiable. When a user modifiable region is blurred
  13576. it loses its selection. To prevent this we make it user modifiable only when focused.
  13577. <rdar://problem/11193282> REGRESSION (r42062): Search results are not selected when clicked in the Search sidebar
  13578. Reviewed by Brian Weinstein.
  13579. * UserInterface/TextEditor.css:
  13580. (.text-editor > .content-container > .content): Removed -webkit-user-modify.
  13581. (.text-editor > .content-container > .content:focus): Added. Set -webkit-user-modify here when focused.
  13582. * UserInterface/TextEditor.js:
  13583. (WebInspector.TextEditor): Set a tabIndex so the content can be focused when not user modifiable.
  13584. 2012-03-31 Joseph Pecoraro <pecoraro@apple.com>
  13585. <rdar://problem/11160188> Headers in resource details sidebar panel should be sortable
  13586. Reviewed by Timothy Hatcher.
  13587. * UserInterface/ResourceDetailsSidebarPanel.js:
  13588. (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator):
  13589. (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid):
  13590. (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
  13591. 2012-03-30 Timothy Hatcher <timothy@apple.com>
  13592. Prevent dragging and dropping everywhere except editable fields in the Web Inspector.
  13593. Reviewed by John Sullivan.
  13594. * UserInterface/Main.js:
  13595. (WebInspector.contentLoaded): Added dragover event listener.
  13596. (WebInspector._dragOver): Added. Prevent the drop from being accepted unless the target
  13597. is an editable field.
  13598. 2012-03-30 Timothy Hatcher <timothy@apple.com>
  13599. Make revealing line numbers in the Web Inspector work again in all cases.
  13600. This removes line number revealing from SourceCodeTextEditor and merges the extra logic that
  13601. SourceCodeTextEditor had down into TextEditor. The problem was in WebInspector.TextEditor.shown,
  13602. where _lineNumberToReveal was being deleted before SourceCodeTextEditor could use it.
  13603. <rdar://problem/11148983> REGRESSION: Debugger does not scroll execution line into view when
  13604. pausing in the debugger
  13605. Reviewed by Brian Weinstein.
  13606. * UserInterface/SourceCodeTextEditor.js:
  13607. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): Remove call to
  13608. _revealPendingLineIfPossible.
  13609. * UserInterface/TextEditor.js:
  13610. (WebInspector.TextEditor.prototype.shown): Call _revealPendingLineIfPossible instead of revealLine.
  13611. (WebInspector.TextEditor.prototype.revealLine): Delete _lineNumberToReveal now that the reveal
  13612. is likely to happen.
  13613. (WebInspector.TextEditor.prototype._revealPendingLineIfPossible): Added.
  13614. (WebInspector.TextEditor.prototype._reset): Call _revealPendingLineIfPossible.
  13615. 2012-03-29 Timothy Hatcher <timothy@apple.com>
  13616. Switch to the new current log when reloading the page while viewing the current log.
  13617. <rdar://problem/11145724> Reloading the page should switch to Current Log
  13618. Reviewed by Brian Weinstein.
  13619. * UserInterface/LogSidebarPanel.js:
  13620. (WebInspector.LogSidebarPanel.prototype._sessionStarted): Select the new Current Log
  13621. if the current view is the previously active content view.
  13622. 2012-03-29 Joseph Pecoraro <pecoraro@apple.com>
  13623. <rdar://problem/10657781> Remote Inspector: Improve Generic Searching for Node "Inspect Element Eyeglass"
  13624. Match Open Source and add the two second highlight for inspected
  13625. nodes. This is very useful for the Remote Inspector when using
  13626. node searching.
  13627. Reviewed by Timothy Hatcher.
  13628. * UserInterface/Main.js:
  13629. (WebInspector._domNodeWasInspected):
  13630. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13631. Add keyboard shortcuts for back and forward in the content browser.
  13632. The shortcuts are Command-Control-Left and Command-Control-Right.
  13633. Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
  13634. Reviewed by Joseph Pecoraro.
  13635. * Localizations/en.lproj/localizedStrings.js: Updated.
  13636. * UserInterface/ContentBrowser.js:
  13637. (WebInspector.ContentBrowser): Create the KeyboardShortcuts and add the shortcut to the button tooltips.
  13638. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13639. Add keyboard shortcuts for toggling the navigation and details sidebars.
  13640. The shortcuts are Control-0 and Control-Shift-0.
  13641. Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
  13642. Reviewed by Joseph Pecoraro.
  13643. * Localizations/en.lproj/localizedStrings.js: Updated.
  13644. * UserInterface/Main.js:
  13645. (WebInspector.contentLoaded): Create the KeyboardShortcuts.
  13646. (WebInspector._leftSidebarToggleButtonToolTip): Include the keyboard shortcut.
  13647. (WebInspector._rightSidebarToggleButtonToolTip): Ditto.
  13648. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13649. Add keyboard shortcuts for the details sidebar panels.
  13650. The shortcuts are Control-Shift-1, Control-Shift-2, etc.
  13651. Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
  13652. Reviewed by Joseph Pecoraro.
  13653. * UserInterface/AppearanceDetailsSidebarPanel.js:
  13654. (WebInspector.AppearanceDetailsSidebarPanel): Pass "4" as the keyboard shortcut key.
  13655. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  13656. (WebInspector.CSSStyleDetailsSidebarPanel): Pass "3" as the keyboard shortcut key.
  13657. * UserInterface/DOMDetailsSidebarPanel.js:
  13658. (WebInspector.DOMDetailsSidebarPanel): Pass the keyboard shortcut key through.
  13659. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  13660. (WebInspector.DOMNodeDetailsSidebarPanel): Pass "2" as the keyboard shortcut key.
  13661. * UserInterface/DetailsSidebarPanel.js:
  13662. (WebInspector.DetailsSidebarPanel): Create a KeyboardShortcut and add it to the displayName.
  13663. * UserInterface/ResourceDetailsSidebarPanel.js:
  13664. (WebInspector.ResourceDetailsSidebarPanel): Pass "1" as the keyboard shortcut key.
  13665. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  13666. (WebInspector.ScopeChainDetailsSidebarPanel): Pass "5" as the keyboard shortcut key.
  13667. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13668. Add keyboard shortcuts for the navigation sidebar panels.
  13669. The shortcuts are Control-1, Control-2, etc. We don't use Command to prevent conflicting with
  13670. Safari's existing bookmarks bar commands.
  13671. Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
  13672. Reviewed by Joseph Pecoraro.
  13673. * Localizations/en.lproj/localizedStrings.js: Updated.
  13674. * UserInterface/BreakpointSidebarPanel.js:
  13675. (WebInspector.BreakpointSidebarPanel): Pass "7" as the keyboard shortcut key.
  13676. * UserInterface/DebugSidebarPanel.js:
  13677. (WebInspector.DebugSidebarPanel): Pass "6" as the keyboard shortcut key.
  13678. * UserInterface/InstrumentSidebarPanel.js:
  13679. (WebInspector.InstrumentSidebarPanel): Pass "3" as the keyboard shortcut key.
  13680. * UserInterface/IssueSidebarPanel.js:
  13681. (WebInspector.IssueSidebarPanel): Pass "5" as the keyboard shortcut key.
  13682. * UserInterface/LogSidebarPanel.js:
  13683. (WebInspector.LogSidebarPanel): Pass "8" as the keyboard shortcut key.
  13684. * UserInterface/NavigationSidebarPanel.js:
  13685. (WebInspector.NavigationSidebarPanel): Create a KeyboardShortcut and add it to the displayName.
  13686. * UserInterface/ResourceSidebarPanel.js:
  13687. (WebInspector.ResourceSidebarPanel): Pass "1" as the keyboard shortcut key.
  13688. * UserInterface/SearchSidebarPanel.js:
  13689. (WebInspector.SearchSidebarPanel): Pass "4" as the keyboard shortcut key.
  13690. * UserInterface/StorageSidebarPanel.js:
  13691. (WebInspector.StorageSidebarPanel): Pass "2" as the keyboard shortcut key.
  13692. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13693. Make it easier to properly show a sidebar panel in the Web Inspector.
  13694. This adds a show function to SidebarPanel that reveals the Sidebar if needed and selects
  13695. the sidebar panel. For navigation sidebar panels it also focuses the TreeOutline.
  13696. Reviewed by Joseph Pecoraro.
  13697. * UserInterface/InspectorFrontendAPI.js:
  13698. (InspectorFrontendAPI.stopProfilingJavaScript): Use show().
  13699. * UserInterface/Main.js:
  13700. (WebInspector._debuggerDidPause): Use show().
  13701. * UserInterface/NavigationSidebarPanel.js:
  13702. (WebInspector.NavigationSidebarPanel.prototype.show): Added. Call the superclass show and focus the tree.
  13703. * UserInterface/SearchSidebarPanel.js:
  13704. (WebInspector.SearchSidebarPanel.prototype._focusSearchField): Use show().
  13705. * UserInterface/Sidebar.js:
  13706. (WebInspector.Sidebar.prototype.addSidebarPanel): Use insertSidebarPanel.
  13707. (WebInspector.Sidebar.prototype.insertSidebarPanel): Set the _parentSidebar to this.
  13708. (WebInspector.Sidebar.prototype.removeSidebarPanel): Set the _parentSidebar to null.
  13709. * UserInterface/SidebarPanel.js:
  13710. (WebInspector.SidebarPanel.prototype.get parentSidebar): Added.
  13711. (WebInspector.SidebarPanel.prototype.show): Added.
  13712. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13713. Add support to WebInspector.KeyboardShortcut for specifying a target element and callback.
  13714. This adds support for Command-Shift-F to focus the search field as the first shortcut.
  13715. Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
  13716. Reviewed by Joseph Pecoraro.
  13717. * UserInterface/KeyboardShortcut.js:
  13718. (WebInspector.KeyboardShortcut): Added targetElement and callback parameters. Register a keydown listener.
  13719. (WebInspector.KeyboardShortcut._handleKeyDown): Added. Walk the tree from the target and check for matching
  13720. keyboard shortcuts.
  13721. (WebInspector.KeyboardShortcut.prototype.get callback): Added.
  13722. * UserInterface/SearchSidebarPanel.js:
  13723. (WebInspector.SearchSidebarPanel): Create a KeyboardShortcut for Command-Shift-F to focus the search field.
  13724. (WebInspector.SearchSidebarPanel.prototype._focusSearchFiled): Added.
  13725. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13726. Reintroduce WebInspector.KeyboardShortcut as a proper class.
  13727. Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
  13728. Reviewed by Joseph Pecoraro.
  13729. * UserInterface/EditingSupport.js:
  13730. (WebInspector.startEditing.defaultFinishHandler): Use KeyboardShortcut.Key.Escape.keyCode instead of
  13731. KeyboardShortcut.Keys.Esc.code.
  13732. * UserInterface/JavaScriptLogViewController.js:
  13733. (WebInspector.JavaScriptLogViewController): Remove the _shortcuts object and assign individual shortcuts.
  13734. (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown): Call matchesEvent on each shortcut.
  13735. * UserInterface/KeyboardShortcut.js: Added.
  13736. (WebInspector.KeyboardShortcut):
  13737. (WebInspector.Key):
  13738. (WebInspector.Key.prototype.get keyCode):
  13739. (WebInspector.Key.prototype.get displayName):
  13740. (WebInspector.Key.prototype.toString):
  13741. (WebInspector.KeyboardShortcut.prototype.get modifiers):
  13742. (WebInspector.KeyboardShortcut.prototype.get key):
  13743. (WebInspector.KeyboardShortcut.prototype.get displayName):
  13744. (WebInspector.KeyboardShortcut.prototype.matchesEvent):
  13745. * UserInterface/StylePropertyTreeElement.js:
  13746. (WebInspector.StylePropertyTreeElement.prototype.editingNameValueKeyDown): Use KeyboardShortcut.Key
  13747. instead of KeyboardShortcut.Keys.
  13748. 2012-03-28 Timothy Hatcher <timothy@apple.com>
  13749. Remove WebInspector.KeyboardShortcut, soon to be replaced by a better version.
  13750. Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
  13751. Reviewed by Joseph Pecoraro.
  13752. * UserInterface/KeyboardShortcut.js: Removed.
  13753. 2012-03-26 Timothy Hatcher <timothy@apple.com>
  13754. Fix an issue where Inspect Element would sometimes not stick and the DOM node selection would revert to
  13755. the previous selected DOM node.
  13756. <rdar://problem/11122326> Using the Inspect Element content menu sometimes fails to select the right DOM node
  13757. Reviewed by Joseph Pecoraro.
  13758. * UserInterface/DOMTreeContentView.js:
  13759. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode): Return early if the DOM tree
  13760. has a selection already. A selection can be made while waiting for the async reply.
  13761. 2012-03-26 Timothy Hatcher <timothy@apple.com>
  13762. Add some missing checks to the DOMNodeDetailsSidebarPanel.
  13763. This prevents updating the interface if the DOM node selection changed while waiting for a response about
  13764. the previous node from the backend.
  13765. Reviewed by Ada Chan.
  13766. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  13767. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Return early if the
  13768. DOM node does not match the current DOM node. The DOM node changed while we were waiting for the async response.
  13769. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Ditto.
  13770. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback): Ditto.
  13771. 2012-03-25 Timothy Hatcher <timothy@apple.com>
  13772. Use DetailsSectionPropertiesRow for the DOM node Properties section.
  13773. Reviewed by Joseph Pecoraro.
  13774. * UserInterface/DOMNodeDetailsSidebarPanel.css: Removed.
  13775. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  13776. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Create a
  13777. DetailsSection and DetailsSectionPropertiesRow for each prototype.
  13778. * UserInterface/DetailsSection.css: Set margin-bottom to -1px so nested section borders
  13779. collapse into a single border.
  13780. (.details-section):
  13781. * UserInterface/Main.html: Removed DOMNodeDetailsSidebarPanel.css.
  13782. 2012-03-24 Timothy Hatcher <timothy@apple.com>
  13783. Make Select All only select the text content of the resource.
  13784. To do this content element needs to either be in an iframe or editable. Working with frames is
  13785. pretty annoying, so making the content editable was the best option. But since we don't support
  13786. editing resources yet, we need to prevent the editing from occurring.
  13787. <rdar://problem/11039596> REGRESSION (New Web Inspector): Select all while viewing source selects
  13788. info in Details sidebar
  13789. Reviewed by Dan Bernstein.
  13790. * UserInterface/TextEditor.css:
  13791. (.text-editor > .content-container > .content): Added -webkit-user-modify: read-write-plaintext-only.
  13792. * UserInterface/TextEditor.js:
  13793. (WebInspector.TextEditor): Added event listeners for keydown, textInput and webkitEditableContentChanged.
  13794. (WebInspector.TextEditor.prototype._preventKeyDown): Added. Allow command keys and page up, page down,
  13795. home, end, up, down, left, right.
  13796. (WebInspector.TextEditor.prototype._preventTextInput): Added. Prevent paste and other input.
  13797. (WebInspector.TextEditor.prototype._editableContentChanged): Added. Do a reset if this happens.
  13798. 2012-03-24 Timothy Hatcher <timothy@apple.com>
  13799. Remove WebInspector.isMac() and the dead code that came with it.
  13800. Rubber-stamped by Dan Bernstein.
  13801. * UserInterface/EditingSupport.js:
  13802. (WebInspector.startEditing.defaultFinishHandler):
  13803. (WebInspector.setCurrentFocusElement):
  13804. * UserInterface/KeyboardShortcut.js:
  13805. (WebInspector.KeyboardShortcut._modifiersToString):
  13806. * UserInterface/TextPrompt.js:
  13807. (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
  13808. 2012-03-22 Timothy Hatcher <timothy@apple.com>
  13809. Make the Web Inspector DataGrid sort indicator be HiDPI compliant.
  13810. Part of: <rdar://problem/10643175> DataGrid sort indicator arrow and Timeline pills/callouts should be made HiDPI compliant
  13811. Reviewed by Joseph Pecoraro.
  13812. * UserInterface/DataGrid.css:
  13813. (.data-grid th.sort-ascending > div:first-child::after): Use the canvas based image.
  13814. (.data-grid th.sort-descending > div:first-child::after): Ditto.
  13815. * UserInterface/DataGrid.js:
  13816. (WebInspector.DataGrid): Call _generateSortIndicatorImagesIfNeeded.
  13817. (WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Added.
  13818. * UserInterface/Images/SortIndicatorDownArrow.pdf: Added.
  13819. * UserInterface/Images/SortIndicatorUpArrow.pdf: Added.
  13820. * UserInterface/Images/treeDownTriangleBlack.png: Removed.
  13821. * UserInterface/Images/treeUpTriangleBlack.png: Removed.
  13822. 2012-03-22 Timothy Hatcher <timothy@apple.com>
  13823. Make the rest of the disclosure triangles in the Web Inspector HiDPI compliant.
  13824. Part of: <rdar://problem/10643175> Some disclosure triangles and Timeline pills should be made HiDPI compliant
  13825. Reviewed by Joseph Pecoraro.
  13826. * UserInterface/Images/DisclosureTriangleTinyClosed.pdf: Added.
  13827. * UserInterface/Images/DisclosureTriangleTinyOpen.pdf: Added.
  13828. * UserInterface/Images/disclosureTriangleSmallDown.png: Removed.
  13829. * UserInterface/Images/disclosureTriangleSmallRight.png: Removed.
  13830. * UserInterface/Images/treeDownTriangleWhite.png: Removed.
  13831. * UserInterface/Images/treeRightTriangleBlack.png: Removed.
  13832. * UserInterface/Images/treeRightTriangleWhite.png: Removed.
  13833. * UserInterface/ConsoleGroup.js:
  13834. (WebInspector.ConsoleGroup): Delete bracket element. It was ugly and sooo Windows...
  13835. * UserInterface/Main.js:
  13836. (WebInspector.contentLoaded): Call _generateDisclosureTriangleImages.
  13837. (WebInspector._generateDisclosureTriangleImages): Added. Generate images for small and tiny.
  13838. * UserInterface/CSSStyleDetailsSidebarPanel.css: Use the canvas based disclosure triangles.
  13839. * UserInterface/DOMTreeOutline.css: Ditto.
  13840. * UserInterface/DataGrid.css: Ditto.
  13841. * UserInterface/Section.css: Ditto.
  13842. * UserInterface/LogContentView.css: Ditto. Also delete the bracket style rules.
  13843. 2012-03-22 Joseph Pecoraro <pecoraro@apple.com>
  13844. <rdar://problem/10391969> Remote Inspector: Add CSS Completion for iOS Properties
  13845. Add CSS auto-completion keywords for iOS properties.
  13846. Add "touch" to the list of syntax highlighted value keywords.
  13847. Reviewed by Timothy Hatcher.
  13848. * UserInterface/CSSKeywordCompletions.js:
  13849. * UserInterface/CSSSourceTokenizer.js:
  13850. (WebInspector.CSSSourceTokenizer):
  13851. 2012-03-21 Timothy Hatcher <timothy@apple.com>
  13852. Use -webkit-image-set instead of media queries in the Web Inspector.
  13853. This patch also uses separate border-image-slice and border-image-source properties to
  13854. avoid duplicate slice numbers in each rule.
  13855. I didn't use image-set for the border-image cases since you still need a media query
  13856. for the 2x slice numbers.
  13857. Reviewed by Jon Honeycutt.
  13858. * UserInterface/ApplicationCacheIcons.css:
  13859. (.application-cache-manifest .icon): Use -webkit-image-set.
  13860. (.application-cache-frame .icon): Ditto.
  13861. * UserInterface/CookieIcon.css:
  13862. (.cookie-icon .icon): Use -webkit-image-set.
  13863. * UserInterface/DOMStorageIcons.css:
  13864. (.local-storage-icon .icon): Use -webkit-image-set.
  13865. (.session-storage-icon .icon): Ditto.
  13866. * UserInterface/DatabaseIcon.css:
  13867. (.database-icon .icon): Use -webkit-image-set.
  13868. * UserInterface/DatabaseTableIcon.css:
  13869. (.database-table-icon .icon): Use -webkit-image-set.
  13870. * UserInterface/FolderIcon.css:
  13871. (.folder-icon .icon): Use -webkit-image-set.
  13872. * UserInterface/InstrumentIcons.css:
  13873. (.network-icon .icon): Use -webkit-image-set.
  13874. (.colors-icon .icon): Ditto.
  13875. (.script-icon .icon): Ditto.
  13876. (.stopwatch-icon .icon):
  13877. (.profile-icon .icon): Use -webkit-image-set.
  13878. * UserInterface/InstrumentSidebarPanel.css:
  13879. (.sidebar > .panel.instrument > .title-bar > .record-glyph): Use -webkit-image-set.
  13880. (.sidebar > .panel.instrument > .title-bar > .record-glyph.recording): Ditto.
  13881. (.sidebar > .panel.instrument > .title-bar > .record-glyph:hover): Ditto.
  13882. (.sidebar > .panel.instrument > .title-bar > .record-glyph.recording:hover): Ditto.
  13883. (.sidebar > .panel.instrument > .title-bar > .record-glyph.forced): Ditto.
  13884. (.sidebar > .panel.instrument > .title-bar > .record-glyph.recording.forced): Ditto.
  13885. * UserInterface/LogIcon.css:
  13886. (.log-icon .icon): Use -webkit-image-set.
  13887. * UserInterface/ResourceIcons.css:
  13888. (.resource-icon .icon): Use -webkit-image-set.
  13889. (.resource-icon.resource-type-document .icon): Ditto.
  13890. (.resource-icon.resource-type-image .icon): Ditto.
  13891. (.resource-icon.resource-type-font .icon): Ditto.
  13892. (.resource-icon.resource-type-stylesheet .icon): Ditto.
  13893. (.resource-icon.resource-type-script .icon): Ditto.
  13894. (.anonymous-script-icon .icon): Ditto.
  13895. * UserInterface/TextEditor.css:
  13896. (.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint): Use border-image-source.
  13897. * UserInterface/TimelineOverview.css:
  13898. (.timeline-overview > .timeline .bar): Use border-image-slice.
  13899. (.timeline-overview > .timeline.timeline-record-type-network .bar): Use border-image-source.
  13900. (.timeline-overview > .timeline.timeline-record-type-layout .bar): Ditto.
  13901. (.timeline-overview > .timeline.timeline-record-type-script .bar): Ditto.
  13902. 2012-03-21 Timothy Hatcher <timothy@apple.com>
  13903. Make the Web Inspector navigation bar and some disclosure triangles HiDPI aware again.
  13904. This regressed when HiDPI canvas was turned off by <rdar://problem/10887881>. This change also uses
  13905. media queries, so dragging the Web Inspector between different DPI monitors will correctly switch.
  13906. <rdar://problem/11091555> HiDPI: Many small icons in new Web Inspector are blurry in HiDPI
  13907. Reviewed by Joseph Pecoraro.
  13908. * UserInterface/ActivateButtonNavigationItem.js:
  13909. (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
  13910. * UserInterface/ButtonNavigationItem.js:
  13911. (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
  13912. * UserInterface/DetailsSection.css:
  13913. (.details-section > .header::before): Set background-size.
  13914. (.details-section > .header:not(.mouse-over-options-element):active::before): Added 2x version.
  13915. (.details-section.collapsed > .header::before): Ditto.
  13916. (.details-section.collapsed > .header:not(.mouse-over-options-element):active::before): Ditto.
  13917. * UserInterface/ImageUtilities.js:
  13918. (generateColoredImage): Added scale parameter. Multiply width and height by scale.
  13919. (generateColoredImagesForCSS.imageLoaded): Call generateImage for each pixel ratio.
  13920. (generateColoredImagesForCSS.generateImage): Added pixelRatio parameter. Multiply the shadow values by pixelRatio.
  13921. Pass the pixelRation to generateColoredImage.
  13922. (generateColoredImagesForCSS): Remove depth and scale.
  13923. (generateEmbossedImages._imageLoaded): Call _createEmbossedCanvasImage for each pixel ratio.
  13924. (generateEmbossedImages._createEmbossedCanvasImage): Added pixelRatio parameter. Define the depth. Multiply the
  13925. width and height by pixelRatio. Use width and height instead of image.width and image.height through out.
  13926. (generateEmbossedImages._invertMaskImage): Added width and height parameters. Use instead of image.width and image.height.
  13927. (generateEmbossedImages._applyImageMask): Remove unused HTMLCanvasElement as input code path.
  13928. * UserInterface/Main.css:
  13929. (.go-to-arrow:active): Added 2x version.
  13930. (:focus .selected .go-to-arrow): Added 2x version.
  13931. (:focus .selected .go-to-arrow:active): Added 2x version.
  13932. * UserInterface/NavigationSidebarPanel.css:
  13933. (.navigation-sidebar-panel-content-tree-outline .item .disclosure-button): Set background-size.
  13934. (.navigation-sidebar-panel-content-tree-outline .item.selected .disclosure-button): Added 2x version.
  13935. (.navigation-sidebar-panel-content-tree-outline .item.expanded .disclosure-button): Added 2x version.
  13936. (.navigation-sidebar-panel-content-tree-outline .item.selected.expanded .disclosure-button): Added 2x version.
  13937. * UserInterface/RadioButtonNavigationItem.js:
  13938. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
  13939. * UserInterface/TimelinesContentView.css:
  13940. (.content-view.timelines > .data-grid th.collapser > .collapser-button): Set background-size.
  13941. (.content-view.timelines > .data-grid th.collapser > .collapser-button:active): Added 2x version.
  13942. (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button): Added 2x version.
  13943. (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button:active): Added 2x version.
  13944. 2012-03-20 Timothy Hatcher <timothy@apple.com>
  13945. Don't allow setting breakpoints for resource types that are not Script or Document.
  13946. <rdar://problem/11044410> Should not be allowed to set breakpoints on CSS resources
  13947. Reviewed by Brian Weinstein.
  13948. * UserInterface/SourceCodeTextEditor.js:
  13949. (WebInspector.SourceCodeTextEditor): Don't add event listeners unless _supportsDebugging is true.
  13950. (WebInspector.SourceCodeTextEditor.prototype.close): Remove event listeners inside if _supportsDebugging block.
  13951. (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Don't add breakpoints unless _supportsDebugging.
  13952. (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus): Assert _supportsDebugging.
  13953. (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved): Ditto.
  13954. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Ditto.
  13955. (WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint): Ditto.
  13956. (WebInspector.SourceCodeTextEditor.prototype.get _supportsDebugging): Added.
  13957. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Return early if !_supportsDebugging.
  13958. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): Ditto.
  13959. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Assert and return early if !_supportsDebugging.
  13960. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved): Ditto.
  13961. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled): Ditto.
  13962. 2012-03-20 Timothy Hatcher <timothy@apple.com>
  13963. Add and remove the window-inactive style class so controls, row selections, and backgrounds use their inactive colors.
  13964. <rdar://problem/11064364> Inspector controls (bars and buttons) have active appearance in inactive windows
  13965. Reviewed by Brian Weinstein.
  13966. * UserInterface/ButtonNavigationItem.css:
  13967. (body.window-inactive .navigation-bar > .item.button:not(.suppress-emboss) > .glyph):
  13968. (.navigation-bar > .item.button.disabled > .glyph):
  13969. (body.window-inactive .navigation-bar > .item.button.disabled:not(.suppress-emboss) > .glyph):
  13970. (.navigation-bar > .item.button.suppress-emboss > .glyph):
  13971. (.navigation-bar > .item.button.suppress-emboss:active > .glyph):
  13972. (.navigation-bar > .item.button.suppress-emboss.disabled > .glyph): Moved from QuickConsole.css.
  13973. * UserInterface/DataGrid.css:
  13974. (body.window-inactive .data-grid th.sort-descending): Fixed the selector to use window-inactive.
  13975. * UserInterface/Main.js:
  13976. (WebInspector.contentLoaded): Added window event listeners for blur and focus.
  13977. (WebInspector.updateDockedState): Remove the window-inactive class when docking, just in case.
  13978. (WebInspector._windowFocused): Added.
  13979. (WebInspector._windowBlurred): Added.
  13980. * UserInterface/QuickConsole.css: Moved the disabled button style to ButtonNavigationItem.css.
  13981. 2012-03-19 Timothy Hatcher <timothy@apple.com>
  13982. Support showing and working with Script breakpoints from the Breakpoint sidebar.
  13983. Part of: <rdar://problem/11075565> REGRESSION (New Web Inspector): Injected extension content scripts are not shown
  13984. Reviewed by Joseph Pecoraro.
  13985. * UserInterface/BreakpointSidebarPanel.js:
  13986. (WebInspector.BreakpointSidebarPanel):
  13987. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Refactor code to work in terms on both Resource and Script.
  13988. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForSourceCode): Renamed from _addBreakpointsForResource.
  13989. (WebInspector.BreakpointSidebarPanel.prototype._resourceAdded): Use _addBreakpointsForSourceCode.
  13990. (WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Ditto.
  13991. (WebInspector.BreakpointSidebarPanel.prototype._scriptAdded): Added. Call _addBreakpointsForSourceCode if this script isn't
  13992. backed by a Resource.
  13993. (WebInspector.BreakpointSidebarPanel.prototype._scriptsCleared): Added. Remove all ScriptTreeElements.
  13994. (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Refactored to work with either Resource or Script.
  13995. * UserInterface/DebuggerManager.js:
  13996. (WebInspector.DebuggerManager.prototype.scriptForIdentifier): Added.
  13997. (WebInspector.DebuggerManager.prototype.scriptsForURL): Added.
  13998. (WebInspector.DebuggerManager.prototype._setBreakpoint): Set the breakpoint correctly for Script's without URLs.
  13999. 2012-03-19 Timothy Hatcher <timothy@apple.com>
  14000. Show Scripts in the Resource sidebar at the top level.
  14001. These scripts are grouped into 3 folders: Extension Scripts, Extra Scripts and Anonymous Scripts.
  14002. <rdar://problem/11075565> REGRESSION (New Web Inspector): Injected extension content scripts are not shown
  14003. Reviewed by Joseph Pecoraro.
  14004. * Localizations/en.lproj/localizedStrings.js: Updated.
  14005. * UserInterface/DebuggerManager.js:
  14006. (WebInspector.DebuggerManager.prototype.reset): Fire ScriptsCleared event.
  14007. (WebInspector.DebuggerManager.prototype.scriptDidParse): Fire ScriptAdded event. Pass isContentScript
  14008. to the Script constructor.
  14009. * UserInterface/Images/ClippingJS.png: Added.
  14010. * UserInterface/Images/ClippingJS@2x.png: Added.
  14011. * UserInterface/Main.html: Included ScriptTreeElement.js.
  14012. * UserInterface/ResourceIcons.css:
  14013. (.anonymous-script-icon .icon): Added.
  14014. * UserInterface/ResourceSidebarPanel.js:
  14015. (WebInspector.ResourceSidebarPanel): Added event listeners for ScriptAdded and ScriptsCleared.
  14016. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Create a tree element for
  14017. the anonymous script.
  14018. (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): Create a tree element for scripts with URLs.
  14019. (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): Remove the script folders.
  14020. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Support ScriptTreeElement.
  14021. * UserInterface/Script.js:
  14022. (WebInspector.Script): Added injected parameter.
  14023. (WebInspector.Script.prototype.get injected): Added.
  14024. * UserInterface/ScriptTreeElement.js: Added.
  14025. (WebInspector.ScriptTreeElement):
  14026. (WebInspector.ScriptTreeElement.prototype.get script):
  14027. 2012-03-19 Timothy Hatcher <timothy@apple.com>
  14028. Add WebInspector.ScriptContentView for showing content of Script objects.
  14029. Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
  14030. breakpoint is hit while loading the page
  14031. Reviewed by Joseph Pecoraro.
  14032. * UserInterface/ContentView.js:
  14033. (WebInspector.ContentView): Added case for Script.
  14034. (WebInspector.ContentView.isViewable): Ditto.
  14035. * UserInterface/DebugSidebarPanel.js:
  14036. (WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Simplify and use ResourceSidebarPanel.showSourceCode.
  14037. * UserInterface/Main.html:
  14038. * UserInterface/Main.js:
  14039. (WebInspector.sidebarPanelForRepresentedObject):
  14040. * UserInterface/ResourceSidebarPanel.js:
  14041. (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Update assert for ScriptContentView.
  14042. (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie): Move a variable down below an early return.
  14043. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Updated to work with Scripts.
  14044. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Close all ScriptContentViews.
  14045. * UserInterface/ScriptContentView.css: Added.
  14046. (.content-view.script > .text-editor):
  14047. * UserInterface/ScriptContentView.js: Added. Copied mostly from TextResourceContentView.
  14048. (WebInspector.ScriptContentView):
  14049. (WebInspector.ScriptContentView.prototype.get script):
  14050. (WebInspector.ScriptContentView.prototype.get textEditor):
  14051. (WebInspector.ScriptContentView.prototype.get supplementalRepresentedObjects):
  14052. (WebInspector.ScriptContentView.prototype.revealLine):
  14053. (WebInspector.ScriptContentView.prototype.shown):
  14054. (WebInspector.ScriptContentView.prototype.hidden):
  14055. (WebInspector.ScriptContentView.prototype.closed):
  14056. (WebInspector.ScriptContentView.prototype._contentWillPopulate):
  14057. (WebInspector.ScriptContentView.prototype._executionLineNumberDidChange):
  14058. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14059. Hide line numbers for blank lines when showing inline scripts while the debugger is paused.
  14060. When paused in the debugger we sometimes can only show the scripts for the HTML file. When
  14061. this happens the scripts are the only thing visible (in their final position) with blank
  14062. lines for the earlier HTML content. This hides the line numbers for those blank lines
  14063. to provide a clue to the user that they shouldn't expect content there.
  14064. Reviewed by Brian Weinstein.
  14065. * UserInterface/SourceCodeTextEditor.js:
  14066. (WebInspector.SourceCodeTextEditor): Start with the first line as invalid, before a populate there
  14067. is always a blank first line.
  14068. (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Clear the invalid line numbers.
  14069. (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
  14070. Add blank lines to the invalid line numbers map.
  14071. (WebInspector.SourceCodeTextEditor.prototype.textEditorShouldHideLineNumber): Added. Check the invalid
  14072. line numbers map.
  14073. * UserInterface/TextEditor.js:
  14074. (WebInspector.TextEditor.prototype.updateLayout): Added force parameter and pass it to _updateLineNumbers.
  14075. (WebInspector.TextEditor.prototype._reset): Pass true to updateLayout.
  14076. (WebInspector.TextEditor.prototype._updateLineNumbers): Added force parameter. Always rebuild the line numbers
  14077. when this is true.
  14078. (WebInspector.TextEditor.prototype._lineNumberTextContent): Added. Helper.
  14079. (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Use _lineNumberTextContent.
  14080. (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Ditto.
  14081. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14082. Remove duplicate copies of _checkForOldResources and put it in the NavigationSidebarPanel base class.
  14083. Now that the individual _checkForOldResources functions don't access different URL maps, this code
  14084. can now be shared down in NavigationSidebarPanel.
  14085. Reviewed by John Sullivan.
  14086. * UserInterface/BreakpointSidebarPanel.js:
  14087. (WebInspector.BreakpointSidebarPanel): Removed event listeners for _checkForOldResources.
  14088. (WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Remove call to _checkForOldResources.
  14089. (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources): Removed.
  14090. * UserInterface/IssueSidebarPanel.js:
  14091. (WebInspector.IssueSidebarPanel): Removed event listeners for _checkForOldResources.
  14092. (WebInspector.IssueSidebarPanel.prototype._checkForOldResources): Removed.
  14093. * UserInterface/NavigationSidebarPanel.js:
  14094. (WebInspector.NavigationSidebarPanel): Added event listeners for _checkForOldResources.
  14095. (WebInspector.NavigationSidebarPanel.prototype._checkForOldResources): Added.
  14096. (WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
  14097. * UserInterface/SearchSidebarPanel.js:
  14098. (WebInspector.SearchSidebarPanel): Removed event listeners for _checkForOldResources.
  14099. (WebInspector.SearchSidebarPanel.prototype._checkForOldResources): Removed.
  14100. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14101. Simplify IssueSidebarPanel and SearchSidebarPanel by using TreeOutline.getCachedTreeElement to
  14102. find existing ResourceTreeElements.
  14103. Reviewed by Brian Weinstein.
  14104. * UserInterface/IssueSidebarPanel.js:
  14105. (WebInspector.IssueSidebarPanel): Removed _issueRootElements.
  14106. (WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Use getCachedTreeElement to find
  14107. the existing ResourceTreeElement.
  14108. (WebInspector.IssueSidebarPanel.prototype._issuesCleared): Removed _issueRootElements reference.
  14109. (WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Ditto.
  14110. * UserInterface/SearchSidebarPanel.js:
  14111. (WebInspector.SearchSidebarPanel): Removed _resourceSearchResultMap.
  14112. (WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Removed _resourceSearchResultMap
  14113. reference. Use getCachedTreeElement to find the existing ResourceTreeElement.
  14114. (WebInspector.SearchSidebarPanel.prototype._checkForOldResources.delayedWork):
  14115. Removed _resourceSearchResultMap reference.
  14116. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14117. Simplify BreakpointSidebarPanel by using TreeOutline.getCachedTreeElement to find existing
  14118. the BreakpointTreeElements and ResourceTreeElements.
  14119. Reviewed by Brian Weinstein.
  14120. * UserInterface/BreakpointSidebarPanel.js:
  14121. (WebInspector.BreakpointSidebarPanel): Removed _resourceTreeElementURLMap.
  14122. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Use getCachedTreeElement to
  14123. find the existing ResourceTreeElement.
  14124. (WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Use getCachedTreeElement to
  14125. find the BreakpointTreeElement to remove.
  14126. (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources.delayedWork): Removed
  14127. _resourceTreeElementURLMap reference.
  14128. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14129. Fix some exceptions I hit while adding ScriptContentView.
  14130. Add some null checks at the callers of sidebarPanelForRepresentedObject, since sidebarPanelForRepresentedObject
  14131. can return null when the representedObject is unknown. The sidebarPanelForRepresentedObject function logs an
  14132. error to the console when it returns null. So the exceptions were just more noise.
  14133. Reviewed by John Sullivan.
  14134. * UserInterface/Main.js:
  14135. (WebInspector.contentBrowserTreeElementForRepresentedObject): Null check the result of sidebarPanelForRepresentedObject.
  14136. (WebInspector._updateCurrentContentViewCookie): Ditto.
  14137. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14138. Fix an issue where the execution line was not highlighted for single line scripts.
  14139. Reviewed by Brian Weinstein.
  14140. * UserInterface/TextEditor.js:
  14141. (WebInspector.TextEditor.prototype._reset): Add ExecutionLineStyleClassName to the text chunk element
  14142. if the chunk is one line and it is the execution line.
  14143. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14144. Rename ResourceSidebarPanel.showResourceSourceCode to ResourceSidebarPanel.showSourceCode.
  14145. This is prep for making ResourceSidebarPanel be responsible for showing Scripts.
  14146. Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
  14147. breakpoint is hit while loading the page
  14148. Reviewed by Joseph Pecoraro.
  14149. * UserInterface/BreakpointSidebarPanel.js:
  14150. (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected):
  14151. * UserInterface/DebugSidebarPanel.js:
  14152. * UserInterface/IssueSidebarPanel.js:
  14153. (WebInspector.IssueSidebarPanel.prototype._treeElementSelected):
  14154. * UserInterface/Main.js:
  14155. (WebInspector.openURL):
  14156. * UserInterface/ResourceSidebarPanel.js:
  14157. (WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Renamed from showResourceSourceCode. Changed
  14158. to not assume we are dealing with a Resource.
  14159. * UserInterface/ResourceTimelineDataGridNode.js:
  14160. (WebInspector.ResourceTimelineDataGridNode.prototype._goToResource):
  14161. * UserInterface/ScriptTimelineDataGridNode.js:
  14162. (WebInspector.ScriptTimelineDataGridNode.prototype._goToResource):
  14163. * UserInterface/SearchSidebarPanel.js:
  14164. (WebInspector.SearchSidebarPanel.prototype._treeElementSelected):
  14165. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14166. Prevent double dividers in the navigation bar when viewing a non-frame content view.
  14167. The node search navigation item is hidden when not on a frame content view, but that causes
  14168. the adjacent dividers to come together. We need to hide one divider in this case.
  14169. Reviewed by Brian Weinstein.
  14170. * UserInterface/Main.js:
  14171. (WebInspector.contentLoaded): Remember the divider to the left of the node search item.
  14172. (WebInspector._currentContentViewDidChange): Hide the divider too.
  14173. 2012-03-18 Timothy Hatcher <timothy@apple.com>
  14174. Show script content when the debugger pauses on a resource that hasn't populated its full content yet.
  14175. Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
  14176. breakpoint is hit while loading the page
  14177. Reviewed by Joseph Pecoraro.
  14178. * UserInterface/DebuggerManager.js:
  14179. (WebInspector.DebuggerManager):
  14180. (WebInspector.DebuggerManager.prototype.scriptsForResource): Added.
  14181. (WebInspector.DebuggerManager.prototype.reset): Clear _scriptURLMap.
  14182. (WebInspector.DebuggerManager.prototype.scriptDidParse): Don't add the script again if it is already known.
  14183. Add scripts with URLs to _scriptURLMap.
  14184. * UserInterface/SourceCodeTextEditor.js:
  14185. (WebInspector.SourceCodeTextEditor): Call _activeCallFrameDidChange to update the execution line and request
  14186. script content if needed.
  14187. (WebInspector.SourceCodeTextEditor.prototype.revealLine): Store the line number if we don't have the line needed
  14188. to show yet. Delete the stored values if we call through to TextEditor.
  14189. (WebInspector.SourceCodeTextEditor.prototype._revealPendingLineIfPossible): Don't delete the stored values here.
  14190. Return early if we don't have the line needed.
  14191. (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Added.
  14192. (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): Added.
  14193. (WebInspector.SourceCodeTextEditor.prototype._populateWithContent): Added.
  14194. (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Set _fullContentPopulated and call _populateWithContent.
  14195. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Call _populateWithInlineScriptContent or
  14196. _populateWithScriptContent for Resource source code.
  14197. (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent): Added. Request the content for all
  14198. the scripts for this URL.
  14199. (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable): Concat the scripts
  14200. together, adding the script tags.
  14201. (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent): Added. Request the single script content.
  14202. (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent.scriptContentAvailable): Set _fullContentPopulated
  14203. and call _populateWithContent.
  14204. * UserInterface/TextResourceContentView.js:
  14205. (WebInspector.TextResourceContentView): Listen for the ContentWillPopulate event.
  14206. (WebInspector.TextResourceContentView.prototype._contentWillPopulate): Renamed from contentAvailable. Do nothing if the text
  14207. editor is already added.
  14208. 2012-03-16 Timothy Hatcher <timothy@apple.com>
  14209. Factor most of TextResourceContentView out into SourceCodeTextEditor, a new TextEditor subclass.
  14210. This is prep work for making a ScriptContentView to show Scripts before the resource loads.
  14211. Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not
  14212. show when a breakpoint is hit while loading the page
  14213. Reviewed by Joseph Pecoraro.
  14214. * UserInterface/IssueManager.js:
  14215. (WebInspector.IssueManager.prototype.issuesForSourceCode): Renamed from issuesForResource.
  14216. * UserInterface/Main.html: Included SourceCodeTextEditor.js and SourceCodeTextEditor.css.
  14217. * UserInterface/ResourceContentView.js:
  14218. (WebInspector.ResourceContentView): Use issuesForSourceCode.
  14219. * UserInterface/SourceCodeTextEditor.css: Copied from TextResourceContentView.css.
  14220. (.source-code.text-editor .text-editor-text-chunk.error):
  14221. (.source-code.text-editor .text-editor-text-chunk.warning):
  14222. * UserInterface/SourceCodeTextEditor.js: Added.
  14223. (WebInspector.SourceCodeTextEditor):
  14224. (WebInspector.SourceCodeTextEditor.prototype.get sourceCode):
  14225. (WebInspector.SourceCodeTextEditor.prototype.revealLine): Copied from TextResourceContentView.
  14226. (WebInspector.SourceCodeTextEditor.prototype.shown): Call _revealPendingLineIfPossible.
  14227. (WebInspector.SourceCodeTextEditor.prototype.close): Remove event listeners.
  14228. (WebInspector.SourceCodeTextEditor.prototype._revealPendingLineIfPossible): Helper.
  14229. (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Copied from TextResourceContentView.
  14230. (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus): Ditto.
  14231. (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved): Ditto.
  14232. (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Ditto.
  14233. (WebInspector.SourceCodeTextEditor.prototype._matchesScriptLocation): Helper.
  14234. (WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint): Helper.
  14235. (WebInspector.SourceCodeTextEditor.prototype._matchesIssue): Helper.
  14236. (WebInspector.SourceCodeTextEditor.prototype._issueWasAdded): Copied from TextResourceContentView.
  14237. (WebInspector.SourceCodeTextEditor.prototype._addIssueToLineNumberMap): Helper.
  14238. (WebInspector.SourceCodeTextEditor.prototype._addIssueToLine): Copied from TextResourceContentView.
  14239. (WebInspector.SourceCodeTextEditor.prototype._breakpointInfoForBreakpoint): Ditto.
  14240. (WebInspector.SourceCodeTextEditor.prototype.textEditorBaseURL): Ditto.
  14241. (WebInspector.SourceCodeTextEditor.prototype.textEditorLineContentUpdated): Ditto.
  14242. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Ditto.
  14243. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): Ditto.
  14244. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Ditto.
  14245. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved): Ditto.
  14246. (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled): Ditto.
  14247. * UserInterface/TextEditor.js:
  14248. (WebInspector.TextEditor): Call the Object constructor.
  14249. (WebInspector.TextEditor.prototype.set executionLineNumber): Fire the ExecutionLineNumberDidChange event.
  14250. * UserInterface/TextResourceContentView.css:
  14251. (.text-editor .text-editor-text-chunk.error): Removed.
  14252. (.text-editor .text-editor-text-chunk.warning): Removed.
  14253. * UserInterface/TextResourceContentView.js:
  14254. (WebInspector.TextResourceContentView): Listen for the ExecutionLineNumberDidChange event.
  14255. (WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects): If the SourceCodeTextEditor
  14256. has an executionLineNumber, we can assume it is always the active call frame.
  14257. (WebInspector.TextResourceContentView.prototype.contentAvailable): Just remove the spinner or error message
  14258. and append the text editor.
  14259. (WebInspector.TextResourceContentView.prototype.revealLine): Just call revealLine on the text editor.
  14260. (WebInspector.TextResourceContentView.prototype.closed): Call close on the text editor.
  14261. (WebInspector.TextResourceContentView.prototype._executionLineNumberDidChange): Added.
  14262. 2012-03-15 Timothy Hatcher <timothy@apple.com>
  14263. Allow breakpoints to be set for a Resource or a Script.
  14264. This is prep for making a TextEditor subclass that works with either a Script or a Resource.
  14265. Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not
  14266. show when a breakpoint is hit while loading the page
  14267. Reviewed by Joseph Pecoraro.
  14268. * UserInterface/Breakpoint.js:
  14269. (WebInspector.Breakpoint): Make the constructor take a SourceCode object instead of a URL.
  14270. (WebInspector.Breakpoint.prototype.get scriptIdentifier): Added.
  14271. (WebInspector.Breakpoint.prototype.get info): Updated the comment.
  14272. * UserInterface/BreakpointSidebarPanel.js:
  14273. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForResource): Use breakpointsForSourceCode.
  14274. * UserInterface/DebuggerManager.js:
  14275. (WebInspector.DebuggerManager):
  14276. (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode): Renamed from breakpointsForURL. Takes
  14277. a SourceCode object and looks up by url or id.
  14278. (WebInspector.DebuggerManager.prototype.addBreakpoint): Don't assume there is a url. Adds the breakpoint
  14279. to the URL map and/or the script identifier map.
  14280. (WebInspector.DebuggerManager.prototype.removeBreakpoint): Ditto for removal.
  14281. (WebInspector.DebuggerManager.prototype._saveBreakpoints): Skips breakpoints without URLs.
  14282. * UserInterface/TextResourceContentView.js:
  14283. (WebInspector.TextResourceContentView.prototype.contentAvailable): Use breakpointsForSourceCode.
  14284. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded): Pass the resource to the
  14285. Breakpoint constructor instead of the URL.
  14286. 2012-03-17 Timothy Hatcher <timothy@apple.com>
  14287. Use Date.toLocaleString() to format the date in the Exprires column of the Cookies view.
  14288. <rdar://problem/9628659> Expires date in the Cookies view should be localized
  14289. Reviewed by Ada Chan.
  14290. * UserInterface/CookieStorageContentView.js:
  14291. (WebInspector.CookieStorageContentView.prototype._rebuildTable): Use toLocaleString().
  14292. 2012-03-16 Joseph Pecoraro <pecoraro@apple.com>
  14293. Give each Timeline DataGrid a chance to react to EventMarkers.
  14294. If another timeline data grid was active when event markers arrived,
  14295. then switching to the Network data grid was not showing those event
  14296. markers. Give each Timeline data grid a chance to react to the
  14297. event marker, not just the active data grid.
  14298. Reviewed by Timothy Hatcher.
  14299. * UserInterface/TimelinesContentView.js:
  14300. (WebInspector.TimelinesContentView):
  14301. (WebInspector.TimelinesContentView.prototype._recordingStarted):
  14302. (WebInspector.TimelinesContentView.prototype._recordedEventMarker):
  14303. (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecordsAndEventMarkers):
  14304. 2012-03-16 Joseph Pecoraro <pecoraro@apple.com>
  14305. Workaround sporatic double thick border appearing in collapsed columns.
  14306. Occasionally the Networks data grid will show a double thick border where
  14307. the collapsed, 0-width, columns were. Workaround this by just hiding the
  14308. border for collapsed columns.
  14309. Reviewed by Timothy Hatcher.
  14310. * UserInterface/TimelinesContentView.css:
  14311. (.content-view.timelines > .data-grid.collapsed-details td.column-group-details:not(:last-child)):
  14312. * UserInterface/NetworkDataGrid.js:
  14313. (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
  14314. 2012-03-15 Timothy Hatcher <timothy@apple.com>
  14315. Make the Quick Console toolbar buttons pin to the bottom when doing multi-line input.
  14316. Also make the scrollbars not interfere if the user has old-school scrollbars.
  14317. Reviewed by Joseph Pecoraro.
  14318. * UserInterface/QuickConsole.css:
  14319. (.quick-console): Specify overflow-x and overflow-y separately. Use auto instead of scroll.
  14320. (.quick-console > .view-container): Use auto instead of scroll.
  14321. (.quick-console > .toolbar > .navigation-bar-container): Added.
  14322. (.quick-console > .toolbar > .navigation-bar-container > .navigation-bar-spacer): Added.
  14323. (.quick-console > .toolbar > .navigation-bar-container > .navigation-bar): Updated the selector.
  14324. (.quick-console > .toolbar > .navigation-bar-container > .navigation-bar > .item.button.disabled > .glyph): Ditto.
  14325. * UserInterface/QuickConsole.js:
  14326. (WebInspector.QuickConsole): Create navigation bar container and spacer.
  14327. 2012-03-15 Joseph Pecoraro <pecoraro@apple.com>
  14328. <rdar://problem/11049672> Delete key should delete selected breakpoint in sidebar
  14329. - Delete key removes the breakpoint.
  14330. - Enter / Space toggles the breakpoint.
  14331. - All Exceptions and Uncaught Exceptions breakpoints cannot be removed
  14332. and will beep if the user attempts to delete them.
  14333. Reviewed by Timothy Hatcher.
  14334. * UserInterface/TreeOutline.js:
  14335. (TreeOutline.prototype._treeKeyDown):
  14336. Expose onspace like onenter and ondelete.
  14337. * UserInterface/BreakpointTreeElement.js:
  14338. (WebInspector.BreakpointTreeElement.prototype.ondelete):
  14339. (WebInspector.BreakpointTreeElement.prototype.onenter):
  14340. (WebInspector.BreakpointTreeElement.prototype.onspace):
  14341. Implement default TreeElement handlers for keys.
  14342. * UserInterface/DebuggerManager.js:
  14343. (WebInspector.DebuggerManager.prototype.removeBreakpoint):
  14344. (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
  14345. Ensure we never try to remove the custom breakpoints.
  14346. * UserInterface/TextResourceContentView.js:
  14347. (WebInspector.TextResourceContentView):
  14348. (WebInspector.TextResourceContentView.prototype._breakpointRemoved):
  14349. When a breakpoint is removed update the ContentView and TextEditor.
  14350. 2012-03-15 Joseph Pecoraro <pecoraro@apple.com>
  14351. <rdar://problem/11050670> REGRESSION (New Web Inspector): Add Inspect Element button (magnifying glass button)
  14352. Only show the button when a FrameView (DOM Tree / Source Code) is available.
  14353. When switching away from a FrameView make sure to disable node searching
  14354. if it was active. Also since the nav bar may have changed size have the
  14355. content browser update its navigation bar layout.
  14356. If this happens more in the future the buttons should be owned by the
  14357. individual ContentViews instead of WebInspector.
  14358. Reviewed by Timothy Hatcher.
  14359. * UserInterface/Main.js:
  14360. (WebInspector.contentLoaded):
  14361. (WebInspector._currentContentViewDidChange):
  14362. 2012-03-15 Joseph Pecoraro <pecoraro@apple.com>
  14363. <rdar://problem/11050670> REGRESSION (New Web Inspector): Add Inspect Element button (magnifying glass button)
  14364. Add an on/off button for node searching.
  14365. Reviewed by Timothy Hatcher.
  14366. * UserInterface/ActivateButtonNavigationItem.js: Added.
  14367. (WebInspector.ActivateButtonNavigationItem):
  14368. (WebInspector.ActivateButtonNavigationItem.prototype.get activated):
  14369. (WebInspector.ActivateButtonNavigationItem.prototype.set activated):
  14370. (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
  14371. ActivateButton uses the normal "Focus" style when "Activated". It
  14372. then includes a darker version of "Focus" for "Activated:active".
  14373. * UserInterface/ButtonNavigationItem.js:
  14374. (WebInspector.ButtonNavigationItem.prototype._generateImages):
  14375. Allow for more flexible subclassing.
  14376. * UserInterface/ImageUtilities.js:
  14377. (generateEmbossedImages._imageLoaded):
  14378. (generateEmbossedImages._createEmbossedCanvasImage):
  14379. Create a FocusDark style if requested.
  14380. * UserInterface/Images/Hand.pdf: Added.
  14381. * UserInterface/Main.html:
  14382. * UserInterface/Main.js:
  14383. (WebInspector.contentLoaded):
  14384. (WebInspector._domNodeWasInspected):
  14385. (WebInspector._toggleNodeSearch.callback):
  14386. (WebInspector._toggleNodeSearch):
  14387. Add the button to the right.
  14388. 2012-03-14 Timothy Hatcher <timothy@apple.com>
  14389. Fix typo of the servicePendingContentRequests function was mentioned in review but I forgot to save the file.
  14390. * UserInterface/Resource.js:
  14391. (WebInspector.Resource.prototype.markAsFailed): Fix typo of servicePendingContentRequests.
  14392. 2012-03-14 Joseph Pecoraro <pecoraro@apple.com>
  14393. <rdar://problem/10935394> REGRESSION (New Web Inspector): load and DOMContentLoaded event lines are not shown in the Timeline overview
  14394. <rdar://problem/10935417> REGRESSION (New Web Inspector): developer generated timestamps are not shown in the Timeline overview
  14395. Add event marker decorations to the TimelineOverview.
  14396. Reviewed by Timothy Hatcher.
  14397. * UserInterface/TimelineDecorations.css:
  14398. (.timeline-decorations > .event-markers > .event-marker.timestamp):
  14399. Make markTimeline/timeStamp green instead of yellow. Easier to see.
  14400. * UserInterface/TimelineDecorations.js:
  14401. (WebInspector.TimelineDecorations.prototype.clear):
  14402. Clearing should also remove visible EventMarkers.
  14403. * UserInterface/TimelineOverview.css:
  14404. (.timeline-overview .timeline-decorations > .event-markers):
  14405. (.timeline-overview .timeline-decorations > .event-markers > .event-marker-tooltip):
  14406. * UserInterface/TimelinesContentView.js:
  14407. (WebInspector.TimelinesContentView.prototype._recordedEventMarker):
  14408. Pass event markers on to the TimelineOverview.
  14409. * UserInterface/TimelineOverview.js:
  14410. (WebInspector.TimelineOverview.prototype.update):
  14411. (WebInspector.TimelineOverview.prototype.addTimelineEventMarker):
  14412. Have the decorator draw event markers.
  14413. 2012-03-14 Timothy Hatcher <timothy@apple.com>
  14414. Provide a way to request content from a Script.
  14415. Factor out the content requesting parts of Resource down into a SourceCode class that
  14416. both Resource and Script now inherit from.
  14417. Part of: <rdar://problem/11047982> REGRESSION: Page source does not show when a breakpoint
  14418. is hit while loading the page
  14419. Reviewed by Joseph Pecoraro.
  14420. * UserInterface/Main.html: Included SourceCode.js.
  14421. * UserInterface/Resource.js:
  14422. (WebInspector.Resource):
  14423. (WebInspector.Resource.prototype.canRequestContentFromBackend): Added.
  14424. (WebInspector.Resource.prototype.requestContentFromBackend): Added.
  14425. (WebInspector.Resource.prototype.markAsFinished): Call requestContentFromBackendIfNeeded.
  14426. (WebInspector.Resource.prototype.markAsFailed): Call servicePendingContentRequests with force.
  14427. * UserInterface/Script.js:
  14428. (WebInspector.Script):
  14429. (WebInspector.Script.prototype.canRequestContentFromBackend): Added.
  14430. (WebInspector.Script.prototype.requestContentFromBackend): Added.
  14431. * UserInterface/SourceCode.js: Added.
  14432. (WebInspector.SourceCode):
  14433. (WebInspector.SourceCode.prototype.get content):
  14434. (WebInspector.SourceCode.prototype.get contentIsBase64Encoded):
  14435. (WebInspector.SourceCode.prototype.get contentURL):
  14436. (WebInspector.SourceCode.prototype.requestContent):
  14437. (WebInspector.SourceCode.prototype.canRequestContentFromBackend):
  14438. (WebInspector.SourceCode.prototype.requestContentFromBackend):
  14439. (WebInspector.SourceCode.prototype.requestContentFromBackendIfNeeded):
  14440. (WebInspector.SourceCode.prototype.servicePendingContentRequests):
  14441. (WebInspector.SourceCode.prototype._processContent):
  14442. 2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
  14443. <rdar://problem/11044135> Quick Console should handle multiline input better
  14444. The QuickConsole consists of two pieces in a fixed height. The toolbar with
  14445. JavaScript prompt, and the output content view container. The console itself
  14446. grows to a maximum size (75% of the total window size or user specified by
  14447. resizing). When handling multiline input the toolbar containing the prompt
  14448. is allowed to grow, pushing up the content. When the maximum is reached the
  14449. content will scroll under it, and likewise the multiline JavaScript prompt
  14450. will eventually scroll under it.
  14451. Reviewed by Timothy Hatcher.
  14452. * UserInterface/JavaScriptLogViewController.js:
  14453. (WebInspector.JavaScriptLogViewController):
  14454. (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
  14455. (WebInspector.JavaScriptLogViewController.prototype._promptHistoryChange):
  14456. (WebInspector.JavaScriptLogViewController.prototype._promptPasteboardEvent):
  14457. (WebInspector.JavaScriptLogViewController.prototype._detectPromptHeightChanges.afterEvent):
  14458. (WebInspector.JavaScriptLogViewController.prototype._detectPromptHeightChanges):
  14459. * UserInterface/TextPrompt.js:
  14460. (WebInspector.TextPrompt):
  14461. (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
  14462. In order to detect with the input prompt changes height, we hook into
  14463. a number of events. Keydown, cut/paste, and TextPrompt history changes.
  14464. * UserInterface/QuickConsole.css:
  14465. (.quick-console):
  14466. (.quick-console.collapsed):
  14467. Let the console scroll when multiline input fills the entire console.
  14468. To allow multiline input when collapsed remove !important from height.
  14469. * UserInterface/QuickConsole.js:
  14470. (WebInspector.QuickConsole):
  14471. (WebInspector.QuickConsole.prototype.set collapsed):
  14472. (WebInspector.QuickConsole.prototype.get multiline):
  14473. (WebInspector.QuickConsole.prototype.get collapsedHeight):
  14474. Use constants where possible for height values.
  14475. (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
  14476. (WebInspector.QuickConsole.prototype.promptDidChangeHeight):
  14477. Responds to actions that will most like require resizes.
  14478. (WebInspector.QuickConsole.prototype._updateToolbarSize):
  14479. Update the toolbar size if the prompt size changed.
  14480. (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
  14481. Update the view container's size when single line or multiline.
  14482. 2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
  14483. Tweak quick console focusing.
  14484. Reviewed by Timothy Hatcher.
  14485. * UserInterface/QuickConsole.js:
  14486. (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
  14487. This didn't appear to work for all actions. Ignore the caret checking,
  14488. and more proactively focus as long as there is no selection.
  14489. 2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
  14490. Minor quick console mouse improvements.
  14491. Allow selection in the messages output.
  14492. Clicking in the messages output focuses the prompt if there is no
  14493. selection. This matches LogContentView.
  14494. Reviewed by Timothy Hatcher.
  14495. * UserInterface/QuickConsole.css:
  14496. (.quick-console > .view-container):
  14497. * UserInterface/QuickConsole.js:
  14498. (WebInspector.QuickConsole):
  14499. (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
  14500. 2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
  14501. Event marker lines should not overlap the quick console.
  14502. Reviewed by Brian Weinstein.
  14503. * UserInterface/TimelineDecorations.css:
  14504. (.timeline-decorations > .event-markers):
  14505. 2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
  14506. Renamed isFocused() to a focused getter based on earlier review feedback.
  14507. Reviewed by Brian Weinstein.
  14508. * UserInterface/JavaScriptTextPrompt.js:
  14509. (WebInspector.JavaScriptTextPrompt.prototype.get focused):
  14510. * UserInterface/LogContentView.js:
  14511. (WebInspector.LogContentView.prototype.consoleCleared):
  14512. * UserInterface/Main.js:
  14513. (WebInspector._keydown):
  14514. * UserInterface/QuickConsole.js:
  14515. (WebInspector.QuickConsole.prototype._activeLogCleared):
  14516. 2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
  14517. Converge to a single RecordedEventMarker event based on earlier review feedback.
  14518. Reviewed by Timothy Hatcher.
  14519. * UserInterface/TimelineManager.js:
  14520. (WebInspector.TimelineManager):
  14521. (WebInspector.TimelineManager.prototype.startRecording):
  14522. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  14523. (WebInspector.TimelineManager.prototype.eventRecorded):
  14524. * UserInterface/TimelinesContentView.js:
  14525. (WebInspector.TimelinesContentView):
  14526. 2012-03-13 Timothy Hatcher <timothy@apple.com>
  14527. Make profiles work again while retaining the correct insertion order in the Timeline DataGrids.
  14528. This reverts most of r41172 and fixes the single issue from the open source version of the code.
  14529. When there isn't a previousGridNode that means we need to insert at the top of the DataGrid.
  14530. But the open source code was missing the !previousGridNode check, causing elements to append
  14531. at the end instead.
  14532. <rdar://problem/10960578> REGRESSION (r41172): DOM exceptions when showing profile data grid
  14533. Reviewed by Brian Weinstein.
  14534. * UserInterface/DataGrid.js:
  14535. (WebInspector.DataGridNode.prototype._attach): Revert r41172 and add a check for !previousGridNode.
  14536. 2012-03-13 Timothy Hatcher <timothy@apple.com>
  14537. Don't follow links when they are being edited by the user.
  14538. Inspired by the fix for https://webkit.org/b/60814.
  14539. Reviewed by Joseph Pecoraro.
  14540. * UserInterface/DOMTreeContentView.js:
  14541. (WebInspector.DOMTreeContentView.prototype._mouseWasClicked): Call isBeingEdited and return early if true.
  14542. * UserInterface/EditingSupport.js:
  14543. (WebInspector.isBeingEdited): Check ancestor elements too.
  14544. * UserInterface/Main.js:
  14545. (WebInspector.handlePossibleLinkClick): Call isBeingEdited and return early if true.
  14546. 2012-03-13 Timothy Hatcher <timothy@apple.com>
  14547. Remove duplicate code for the handling clicked links.
  14548. Reviewed by Joseph Pecoraro.
  14549. * UserInterface/CSSSelectorProfileView.js:
  14550. (WebInspector.CSSSelectorProfileView): Removed click event listener.
  14551. (WebInspector.CSSSelectorProfileView.prototype._mouseWasClicked): Removed.
  14552. * UserInterface/DOMDetailsSidebarPanel.js:
  14553. (WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Use handlePossibleLinkClick.
  14554. * UserInterface/DOMTreeContentView.js:
  14555. (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Pass along the lineNumber.
  14556. * UserInterface/JavaScriptProfileView.js:
  14557. (WebInspector.JavaScriptProfileView): Removed click event listener.
  14558. (WebInspector.JavaScriptProfileView.prototype._mouseWasClicked): Removed.
  14559. * UserInterface/LogContentView.js:
  14560. (WebInspector.LogContentView): Removed click event listener.
  14561. (WebInspector.LogContentView.prototype._messagesClicked): Removed.
  14562. * UserInterface/Main.js:
  14563. (WebInspector.handlePossibleLinkClick): Added.
  14564. (WebInspector._mouseWasClicked): Call handlePossibleLinkClick.
  14565. * UserInterface/QuickConsole.js:
  14566. (WebInspector.QuickConsole): Removed click event listener.
  14567. (WebInspector.QuickConsole.prototype._messagesClicked): Removed.
  14568. * UserInterface/ResourceContentView.js:
  14569. (WebInspector.ResourceContentView.prototype._mouseWasClicked): Use handlePossibleLinkClick.
  14570. 2012-03-13 Timothy Hatcher <timothy@apple.com>
  14571. Properly bind and unbind every DOMNode to DOMTreeManager.
  14572. Merges the fix for https://webkit.org/b/78116 from open source (r107093).
  14573. Reviewed by Joseph Pecoraro.
  14574. * UserInterface/DOMNode.js:
  14575. (WebInspector.DOMNode): Inserts the node into the DOMTreeManager map here. So all
  14576. the callers don't need to do it.
  14577. * UserInterface/DOMTreeManager.js:
  14578. (WebInspector.DOMTreeManager.prototype._setDocument): Removed binding code.
  14579. (WebInspector.DOMTreeManager.prototype._setDetachedRoot): Ditto.
  14580. (WebInspector.DOMTreeManager.prototype._setChildNodes): Removed call to _bindNodes.
  14581. (WebInspector.DOMTreeManager.prototype._bindNodes): Removed.
  14582. (WebInspector.DOMTreeManager.prototype._childNodeRemoved): Call _unbind.
  14583. (WebInspector.DOMTreeManager.prototype._unbind): Added. Recursively unbind.
  14584. 2012-03-13 Timothy Hatcher <timothy@apple.com>
  14585. Fix an issue where removing a TreeElement from a TreeOutline would cause the TreeOutline
  14586. to forget all TreeElements that came after the TreeElement that was removed.
  14587. Reviewed by Brian Weinstein.
  14588. * UserInterface/TreeOutline.js:
  14589. (TreeOutline.prototype._forgetChildrenRecursive): Pass parentElement instead of this to
  14590. traverseNextTreeElement, forcing it to stop when it reaches the last descendant of parentElement.
  14591. 2012-03-12 Timothy Hatcher <timothy@apple.com>
  14592. Keep the QuickConsole scroll position pinned to the bottom when changing the height.
  14593. Reviewed by Joseph Pecoraro.
  14594. * UserInterface/QuickConsole.js:
  14595. (WebInspector.QuickConsole.prototype.updateLayout): Scroll to the bottom if we were before the possible height change.
  14596. (WebInspector.QuickConsole.prototype._isScrolledToBottom): Added.
  14597. (WebInspector.QuickConsole.prototype._scrollToBottom): Added.
  14598. (WebInspector.QuickConsole.prototype._resizerMouseDown): Remember if the view was scrolled to the bottom before resize.
  14599. (WebInspector.QuickConsole.prototype._resizerMouseMoved): Scroll to the bottom if we were before resize.
  14600. (WebInspector.QuickConsole.prototype._resizerMouseUp): Delete the flag.
  14601. (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches): Scroll the console element into view that
  14602. was clicked or scroll to the bottom if we were before.
  14603. 2012-03-12 Timothy Hatcher <timothy@apple.com>
  14604. Allow the QuickConsole to shrink in height when it auto grew in height.
  14605. Reviewed by Joseph Pecoraro.
  14606. * UserInterface/QuickConsole.js:
  14607. (WebInspector.QuickConsole.prototype.set collapsed): Reset _userPreferredMaximumHeightWasSetSinceLastToggle back to false.
  14608. (WebInspector.QuickConsole.prototype.set userPreferredMaximumHeight): Set _userPreferredMaximumHeightWasSetSinceLastToggle to true.
  14609. (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider): Return early if _userPreferredMaximumHeightWasSetSinceLastToggle
  14610. is set after calling _updateScrollDivider. Added an allowShrinking parameter.
  14611. (WebInspector.QuickConsole.prototype._viewContainerClick): Update comment. And call _updateViewContainerSizeAndScrollDivider,
  14612. passing true to allow shrinking.
  14613. 2012-03-12 Timothy Hatcher <timothy@apple.com>
  14614. Quick fixes to the QuickConsole styles.
  14615. Reviewed by Joseph Pecoraro.
  14616. * UserInterface/QuickConsole.css:
  14617. (.quick-console): Set overflow to hidden so the toolbar box-shadow does not spill out the sides. Also
  14618. removes a box-shadow that was not doing anything useful.
  14619. (.quick-console > .view-container): Set overflow-x to hidden so the horizontal scrollbar never shows.
  14620. (.quick-console > .toolbar): Set a transition on box-shadow so the shadow animates. Add a base box-shadow
  14621. that has 0 for blur so it animates nicely.
  14622. (.quick-console > .toolbar.scroll-divider): Tweak the shadow so it is rgba() and a larger blur.
  14623. 2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
  14624. Disable the Toggle button when there is no Quick Console content.
  14625. Reviewed by Timothy Hatcher.
  14626. * UserInterface/Main.js:
  14627. (WebInspector._keydown):
  14628. * UserInterface/QuickConsole.css:
  14629. (.quick-console > .toolbar > .navigation-bar > .item.button.disabled > .glyph):
  14630. * UserInterface/QuickConsole.js:
  14631. (WebInspector.QuickConsole):
  14632. (WebInspector.QuickConsole.prototype.toggle):
  14633. (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
  14634. (WebInspector.QuickConsole.prototype._toggleButtonClicked):
  14635. (WebInspector.QuickConsole.prototype._resizerDoubleClicked):
  14636. (WebInspector.QuickConsole.prototype._activeLogCleared):
  14637. 2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
  14638. <rdar://problem/11034808> Esc should focus or toggle the QuickConsole
  14639. Esc will focus the quick console if nothing else is focused and accepting
  14640. input. When focused, Esc will toggle the console's drawer.
  14641. Reviewed by Brian Weinstein.
  14642. * UserInterface/Main.js:
  14643. (WebInspector._keydown):
  14644. Handle the Esc key.
  14645. * UserInterface/QuickConsole.js:
  14646. (WebInspector.QuickConsole.prototype._toggleButtonClicked):
  14647. When the quick console is focused and a user clicks the toggle button,
  14648. the quick console emits a "blur" event even though the caret is still
  14649. inside it and commands can be run. This breaks the "isFocused()" state
  14650. of the field and thus the Esc key toggling the field. So, lets just
  14651. auto-focus the TextPrompt when the toggle button is clicked.
  14652. 2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
  14653. <rdar://problem/11034699> Quick Console should respect clear keyboard shortcuts
  14654. React to the clear active log event but only on the currently active console.
  14655. Reviewed by Brian Weinstein.
  14656. * UserInterface/JavaScriptTextPrompt.js:
  14657. (WebInspector.JavaScriptTextPrompt):
  14658. (WebInspector.JavaScriptTextPrompt.prototype.isFocused):
  14659. (WebInspector.JavaScriptTextPrompt.prototype._focusedPrompt):
  14660. (WebInspector.JavaScriptTextPrompt.prototype._blurredPrompt):
  14661. * UserInterface/LogContentView.js:
  14662. (WebInspector.LogContentView.prototype.consoleCleared):
  14663. * UserInterface/QuickConsole.js:
  14664. (WebInspector.QuickConsole):
  14665. (WebInspector.QuickConsole.prototype._activeLogCleared):
  14666. 2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
  14667. Improve QuickConsole content sizing.
  14668. Make the quick console work like a calculator. The most recent
  14669. result is closest to the console prompt. Older results scroll
  14670. up off the top. Now when resizing, the user is setting their
  14671. preferred maximum size of the drawer.
  14672. Reviewed by Timothy Hatcher.
  14673. * UserInterface/QuickConsole.js:
  14674. (WebInspector.QuickConsole):
  14675. (WebInspector.QuickConsole.prototype.set collapsed):
  14676. (WebInspector.QuickConsole.prototype.get collapsedHeight):
  14677. (WebInspector.QuickConsole.prototype.get minimumUncollapsedHeight):
  14678. (WebInspector.QuickConsole.prototype.get maximumUncollapsedHeight):
  14679. Give comments describing the boundary heights.
  14680. (WebInspector.QuickConsole.prototype.get userPreferredMaximumHeight):
  14681. (WebInspector.QuickConsole.prototype.set userPreferredMaximumHeight):
  14682. Add a convenient function for getting the user preferred sizes.
  14683. (WebInspector.QuickConsole.prototype.set height):
  14684. (WebInspector.QuickConsole.prototype._expandViewContainerSize):
  14685. (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
  14686. (WebInspector.QuickConsole.prototype._updateScrollDivider):
  14687. When setting the height, we typically drop through to updating the
  14688. container size to get the size to fit, and update the scroll divider
  14689. if needed.
  14690. (WebInspector.QuickConsole.prototype._resizerMouseMoved):
  14691. When the user resized, save the height into Settings.
  14692. (WebInspector.QuickConsole.prototype.updateLayout):
  14693. (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
  14694. Times when we need to adjust sizes.
  14695. (WebInspector.QuickConsole.prototype._viewContainerScroll):
  14696. Don't adjust the size, just show/hide the divider.
  14697. (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
  14698. (WebInspector.QuickConsole.prototype._viewContainerClick.afterClickHandling):
  14699. (WebInspector.QuickConsole.prototype._viewContainerClick):
  14700. Adjust the size, but only after any possible work.
  14701. 2012-03-12 Timothy Hatcher <timothy@apple.com>
  14702. Don't break into the debugger when evaluating an expression in the console that triggers an exception.
  14703. The exception will still be logged as the result in the console. We might tweak how this works later,
  14704. but right now breaking into the debugger for this is annoying. This change matches open source.
  14705. Reviewed by Brian Weinstein.
  14706. * UserInterface/JavaScriptLogViewController.js:
  14707. (WebInspector.JavaScriptLogViewController.prototype._appendCommand): Pass true for doNotPauseOnExceptions parameter.
  14708. 2012-03-12 Timothy Hatcher <timothy@apple.com>
  14709. Remove an overzealous assert in DebuggerManager.
  14710. The script identifier can be reused, so just make a new Script and insert it into the map again.
  14711. Reviewed by Brian Weinstein.
  14712. * UserInterface/DebuggerManager.js:
  14713. (WebInspector.DebuggerManager.prototype.scriptDidParse): Removed console.assert.
  14714. 2012-03-12 Timothy Hatcher <timothy@apple.com>
  14715. Clean up the styles for the console and log views.
  14716. Reviewed by Brian Weinstein.
  14717. * UserInterface/JavaScriptTextPrompt.css:
  14718. (.javascript-prompt): Adjust the padding and remove the margin.
  14719. * UserInterface/JavaScriptTextPrompt.js:
  14720. (WebInspector.JavaScriptTextPrompt): Set the text to "" so a "<br>" is inserted into the prompt. This lets the insertion
  14721. caret to position correctly.
  14722. * UserInterface/LogContentView.css:
  14723. (.console-message, .console-user-command): Adjust the padding and remove the margin.
  14724. (.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before):
  14725. Don't use a negative margin, make it a positive one. The padding above makes room.
  14726. (.console-group-messages .section .header::before): Bump up the disclosure triangle, it was 1px too low.
  14727. (.console-group-messages .section .header .title): Reset the line-height to make the logged object not take up extra space.
  14728. * UserInterface/QuickConsole.css:
  14729. (.quick-console > .toolbar > .text-prompt > .javascript-prompt): Reduce top position to better center the prompt.
  14730. 2012-03-12 Timothy Hatcher <timothy@apple.com>
  14731. Fix an issue where the whole Web Inspector Ui would just 1px after typing in the quick console.
  14732. Reviewed by Joseph Pecoraro.
  14733. * UserInterface/QuickConsole.css:
  14734. (.quick-console > .toolbar): Removed -webkit-box-sizing.
  14735. (.quick-console > .toolbar > .navigation-bar): Set the height to 21px so it does not extend out of .toolbar.
  14736. 2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
  14737. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  14738. Give the QuickConsole a LogViewController. The JavaScriptTextPrompt will
  14739. go in the toolbar, and the ViewContainer will hold the ConsoleGroup output.
  14740. Reviewed by Timothy Hatcher.
  14741. * UserInterface/QuickConsole.css:
  14742. (.quick-console):
  14743. (.quick-console > .toolbar > .text-prompt):
  14744. (.quick-console > .toolbar > .text-prompt > .javascript-prompt):
  14745. * UserInterface/QuickConsole.js:
  14746. (WebInspector.QuickConsole):
  14747. (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
  14748. (WebInspector.QuickConsole.prototype._mouseWasClicked):
  14749. 2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
  14750. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  14751. Add a scroll divider box shadow when the Quick Console's view
  14752. contains scrollable content.
  14753. Reviewed by Timothy Hatcher.
  14754. * UserInterface/QuickConsole.css:
  14755. (.quick-console > .view-container):
  14756. (.quick-console > .toolbar.scroll-divider):
  14757. * UserInterface/QuickConsole.js:
  14758. (WebInspector.QuickConsole):
  14759. (WebInspector.QuickConsole.prototype.set collapsed):
  14760. (WebInspector.QuickConsole.prototype.set height):
  14761. (WebInspector.QuickConsole.prototype._resizerMouseUp):
  14762. (WebInspector.QuickConsole.prototype._updateScrollDivider):
  14763. 2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
  14764. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  14765. Add JavaScriptLogViewController class. This holds a JavaScriptTextPrompt
  14766. for input and a ConsoleGroup to put the output of JavaScript commands.
  14767. The idea being that you could swap out either the input source or output
  14768. destination. Currently this class just knows how to deal with JavaScript.
  14769. This moves out most of the remaining JavaScript knowledge from
  14770. LogContentView and puts it into this new controller. There is just one
  14771. delegate message back.
  14772. Reviewed by Timothy Hatcher.
  14773. * UserInterface/JavaScriptLogViewController.js: Added.
  14774. (WebInspector.JavaScriptLogViewController):
  14775. (WebInspector.JavaScriptLogViewController.prototype.constructor.WebInspector.JavaScriptLogViewController.get prompt):
  14776. (WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup):
  14777. (WebInspector.JavaScriptLogViewController.prototype.get currentConsoleGroup):
  14778. (WebInspector.JavaScriptLogViewController.prototype.clear):
  14779. (WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage):
  14780. (WebInspector.JavaScriptLogViewController.prototype._requestClearMessages):
  14781. (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
  14782. (WebInspector.JavaScriptLogViewController.prototype._enterKeyPressed):
  14783. (WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult):
  14784. (WebInspector.JavaScriptLogViewController.prototype._appendCommand):
  14785. (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
  14786. * UserInterface/LogContentView.js:
  14787. (WebInspector.LogContentView):
  14788. (WebInspector.LogContentView.prototype.constructor.WebInspector.LogContentView.messageAdded):
  14789. (WebInspector.LogContentView.prototype.consoleCleared):
  14790. (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
  14791. (WebInspector.LogContentView.prototype._messagesClicked):
  14792. * UserInterface/Main.html:
  14793. 2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
  14794. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  14795. Remove unused OpenSource code from LogContentView.
  14796. Also simplify keyboard shortcut registrations.
  14797. Reviewed by Timothy Hatcher.
  14798. * UserInterface/ConsoleCommandResult.js:
  14799. (WebInspector.ConsoleCommandResult):
  14800. * UserInterface/LogContentView.js:
  14801. (WebInspector.LogContentView):
  14802. (WebInspector.LogContentView.prototype._appendCommand.printResult):
  14803. (WebInspector.LogContentView.prototype._appendCommand):
  14804. 2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
  14805. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  14806. Add OpenSource's ConsoleView copyright headers to JSTextPrompt, ConsoleGroup, and Command files.
  14807. Add OpenSource's ConsoleMessage* copyright headers to ConsoleMessage* files.
  14808. Reviewed by Timothy Hatcher.
  14809. * UserInterface/ConsoleCommand.js:
  14810. * UserInterface/ConsoleCommandResult.js:
  14811. * UserInterface/ConsoleGroup.js:
  14812. * UserInterface/ConsoleMessage.js:
  14813. * UserInterface/ConsoleMessageImpl.js:
  14814. * UserInterface/JavaScriptTextPrompt.js:
  14815. 2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
  14816. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  14817. Split ConsoleGroup, ConsoleCommand, and ConsoleCommandResult into
  14818. separate files and do a tiny bit of cleanup to match the Safari
  14819. frontend style.
  14820. Reviewed by Timothy Hatcher.
  14821. * UserInterface/ConsoleCommand.js: Added.
  14822. (WebInspector.ConsoleCommand):
  14823. (WebInspector.ConsoleCommand.prototype.constructor.WebInspector.ConsoleCommand.clearHighlight):
  14824. (WebInspector.ConsoleCommand.prototype.highlightSearchResults):
  14825. (WebInspector.ConsoleCommand.prototype.matchesRegex):
  14826. (WebInspector.ConsoleCommand.prototype.toMessageElement):
  14827. (WebInspector.ConsoleCommand.prototype._formatCommand):
  14828. * UserInterface/ConsoleCommandResult.js: Added.
  14829. (WebInspector.ConsoleCommandResult):
  14830. (WebInspector.ConsoleCommandResult.prototype.constructor.WebInspector.ConsoleCommandResult.toMessageElement):
  14831. * UserInterface/ConsoleGroup.js: Added.
  14832. (WebInspector.ConsoleGroup):
  14833. (WebInspector.ConsoleGroup.prototype.constructor.WebInspector.ConsoleGroup.addMessage):
  14834. (WebInspector.ConsoleGroup.prototype._titleClicked):
  14835. * UserInterface/ConsoleMessage.js:
  14836. (WebInspector.ConsoleMessage.create):
  14837. * UserInterface/LogContentView.js:
  14838. * UserInterface/Main.html:
  14839. 2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
  14840. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  14841. Extract the JavaScript TextPrompt details into a new class,
  14842. JavaScriptTextPrompt, which is a TextPrompt with JavaScript
  14843. completion logic.
  14844. Reviewed by Timothy Hatcher.
  14845. * UserInterface/JavaScriptTextPrompt.js: Added.
  14846. (WebInspector.JavaScriptTextPrompt):
  14847. (WebInspector.JavaScriptTextPrompt.prototype.constructor.WebInspector.JavaScriptTextPrompt.get promptElement):
  14848. (WebInspector.JavaScriptTextPrompt.prototype.completions):
  14849. (WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated.getCompletions):
  14850. (WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated):
  14851. (WebInspector.JavaScriptTextPrompt.prototype._completions.receivedPropertyNamesFromEval):
  14852. (WebInspector.JavaScriptTextPrompt.prototype._completions.receivedPropertyNames):
  14853. (WebInspector.JavaScriptTextPrompt.prototype._completions):
  14854. (WebInspector.JavaScriptTextPrompt.prototype._reportCompletions):
  14855. * UserInterface/LogContentView.js:
  14856. (WebInspector.LogContentView):
  14857. (WebInspector.LogContentView.prototype.disable):
  14858. (WebInspector.LogContentView.prototype.shown):
  14859. (WebInspector.LogContentView.prototype._scheduleScrollIntoView.scrollIntoView):
  14860. (WebInspector.LogContentView.prototype._scheduleScrollIntoView):
  14861. (WebInspector.LogContentView.prototype._immediatelyScrollIntoView):
  14862. * UserInterface/Main.html:
  14863. 2012-03-10 Joseph Pecoraro <pecoraro@apple.com>
  14864. <rdar://problem/11025039> Console error when right clicking in Console: missing WebInspector.populateHrefContextMenu
  14865. Remove unnecessary or unsupported Console contextmenu options that
  14866. came from OpenSource.
  14867. Reviewed by Timothy Hatcher.
  14868. * UserInterface/LogContentView.js:
  14869. (WebInspector.LogContentView.prototype._handleContextMenuEvent):
  14870. * Localizations/en.lproj/localizedStrings.js:
  14871. 2012-03-11 Timothy Hatcher <timothy@apple.com>
  14872. Don't highlight non-enumerable properties at the top level for Local, Closure, and Catch scopes.
  14873. Those scopes are synthesized scope objects, unlike Global and With scopes.
  14874. Part of: <rdar://problem/10318770>
  14875. Reviewed by Brian Weinstein.
  14876. * UserInterface/ObjectPropertiesSection.js:
  14877. (WebInspector.ObjectPropertyTreeElement.prototype.update): Check for dontHighlightNonEnumerablePropertiesAtTopLevel.
  14878. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  14879. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Set dontHighlightNonEnumerablePropertiesAtTopLevel
  14880. for the Local, Closure, and Catch scopes.
  14881. 2012-03-11 Timothy Hatcher <timothy@apple.com>
  14882. Select and show the Scope Chain details sidebar panel when paused.
  14883. Part of: <rdar://problem/10318770>
  14884. Reviewed by Brian Weinstein.
  14885. * UserInterface/Main.js:
  14886. (WebInspector._debuggerDidPause): Set a flag to show it when available.
  14887. (WebInspector._contentBrowserRepresentedObjectsDidChange): Check for the flag and show the panel.
  14888. 2012-03-11 Timothy Hatcher <timothy@apple.com>
  14889. Populate the Scope Chain details sidebar panel.
  14890. Part of: <rdar://problem/10318770>
  14891. Reviewed by Brian Weinstein.
  14892. * Localizations/en.lproj/localizedStrings.js: Updated.
  14893. * UserInterface/Main.html: Included ScopeVariableTreeElement.js.
  14894. * UserInterface/ScopeChainDetailsSidebarPanel.js:
  14895. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Build ObjectPropertiesSections and DetailsSections
  14896. for each ScopeChainNode in the scope chain.
  14897. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork): Added. Append the DetailsSections.
  14898. * UserInterface/ScopeVariableTreeElement.js: Copied from OpenSource/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js.
  14899. Some code style clean up and modifications to how _expandedProperties and the _propertyIdentifier prefix are accessed.
  14900. 2012-03-11 Timothy Hatcher <timothy@apple.com>
  14901. Clean up the styles for properties sections and support creation without the header element.
  14902. This is needed for the Scope Chain sidebar panel.
  14903. Reviewed by Brian Weinstein.
  14904. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  14905. (.sidebar > .panel.details.css-style .styles-section): Removed padding and background properties.
  14906. (.sidebar > .panel.details.css-style .styles-section .header): Removed background properties.
  14907. (.sidebar > .panel.details.css-style .styles-section.no-header .properties): Added. Reset padding.
  14908. * UserInterface/ComputedStylePropertiesSection.js:
  14909. (WebInspector.ComputedStylePropertiesSection): Call the PropertiesSection constructor after
  14910. some initial setup since Section will now call expand() when there is no header.
  14911. * UserInterface/DOMTreeOutline.js:
  14912. (WebInspector.DOMTreeOutline): Use the syntax-highlighted class name constant.
  14913. * UserInterface/DetailsSection.css:
  14914. (.details-section > .content > .group > .row.properties): Added. Specify padding.
  14915. * UserInterface/DetailsSectionPropertiesRow.js:
  14916. (WebInspector.DetailsSectionPropertiesRow): Add the syntax-highlighted class name.
  14917. * UserInterface/PropertiesSection.js:
  14918. (WebInspector.PropertiesSection): Call the Section constructor after some initial setup since
  14919. Section will now call expand() when there is no header.
  14920. * UserInterface/Section.css:
  14921. (.section.expanded.no-header .properties): Added. Reset padding-left.
  14922. * UserInterface/Section.js:
  14923. (WebInspector.Section): Don't create the header element if there if title and subtitle are not
  14924. strings or Nodes.
  14925. * UserInterface/StylePropertiesSection.js:
  14926. (WebInspector.StylePropertiesSection): Removed syntax-highlighted class name since it is added
  14927. by DetailsSectionPropertiesRow now.
  14928. * UserInterface/SyntaxHighlightingDefaultTheme.css: Removed background-color so this does not cause
  14929. sidebar to be white.
  14930. * UserInterface/SyntaxHighlightingSupport.js: Added syntax-highlighted class name constant.
  14931. * UserInterface/TextEditor.js:
  14932. (WebInspector.TextEditor): Use constant from SyntaxHighlightingSupport.js.
  14933. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  14934. Add the start of the Scope Chain details sidebar panel which will show all the variables
  14935. available when paused in the debugger.
  14936. Part of: <rdar://problem/10318770>
  14937. Reviewed by Joseph Pecoraro.
  14938. * Localizations/en.lproj/localizedStrings.js: Updated.
  14939. * UserInterface/Images/NavigationItemVariable.pdf: Added.
  14940. * UserInterface/Main.html: Included ScopeChainDetailsSidebarPanel.js.
  14941. * UserInterface/Main.js:
  14942. (WebInspector.contentLoaded): Create a ScopeChainDetailsSidebarPanel and include it.
  14943. * UserInterface/ScopeChainDetailsSidebarPanel.js: Added.
  14944. (WebInspector.ScopeChainDetailsSidebarPanel):
  14945. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.inspect): Look for CallFrame objects.
  14946. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.get callFrame):
  14947. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
  14948. (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Needs implemented.
  14949. * UserInterface/TextResourceContentView.js:
  14950. (WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects): Include _callFrame.
  14951. (WebInspector.TextResourceContentView.prototype._updateExecutionLineNumber): Store the activeCallFrame when
  14952. it applies to this resource to we can return it in supplementalRepresentedObjects.
  14953. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  14954. Add support to ContentView for supplemental represented objects.
  14955. Supplemental represented objects can be used to provide more matching choices to the details
  14956. sidebar panels for things that are are not represented as path components in the navigation bar.
  14957. This support will be used to supply the call frame that is active in a TextResourceContentView,
  14958. for the purposes of showing a details sidebar panel with scope chain information.
  14959. Reviewed by Joseph Pecoraro.
  14960. * UserInterface/ClusterContentView.js:
  14961. (WebInspector.ClusterContentView): Listen for the SupplementalRepresentedObjectsDidChange event.
  14962. (WebInspector.ClusterContentView.prototype.get supplementalRepresentedObjects): Added. Pass through
  14963. the current content view's supplementalRepresentedObjects.
  14964. (WebInspector.ClusterContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange): Added.
  14965. Fire the SupplementalRepresentedObjectsDidChange on behalf of the current content view.
  14966. * UserInterface/ContentBrowser.js:
  14967. (WebInspector.ContentBrowser): Listen for the SupplementalRepresentedObjectsDidChange event.
  14968. (WebInspector.ContentBrowser.prototype.get currentRepresentedObjects): Include the current content view's
  14969. supplementalRepresentedObjects if they are not null and not empty.
  14970. (WebInspector.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange): Added.
  14971. Dispatch the CurrentRepresentedObjectsDidChange event soon.
  14972. * UserInterface/ContentView.js:
  14973. (WebInspector.ContentView.prototype.get supplementalRepresentedObjects): Added stub.
  14974. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  14975. Include scope variables when doing autocompletion in the console.
  14976. Part of: <rdar://problem/10318770>
  14977. Reviewed by Joseph Pecoraro.
  14978. * UserInterface/CallFrame.js:
  14979. (WebInspector.CallFrame.prototype.collectScopeChainVariableNames): Added. Walk the scope chain and
  14980. request all the properties for each scope node object.
  14981. (WebInspector.CallFrame.prototype.collectScopeChainVariableNames.propertiesCollected): Added. Add the property
  14982. names to the result and call the callback when pendingRequests is 0.
  14983. * UserInterface/LogContentView.js:
  14984. (WebInspector.LogContentView.prototype._completions): Use CallFrame.collectScopeChainVariableNames.
  14985. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  14986. Support evaluating against the local scope when paused in the debugger.
  14987. Part of: <rdar://problem/10318770>
  14988. Reviewed by Brian Weinstein.
  14989. * UserInterface/LogContentView.js:
  14990. (WebInspector.LogContentView.prototype.evalInInspectedWindow): Use DebuggerAgent.evaluateOnCallFrame
  14991. when there is an active call frame.
  14992. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  14993. Move the flashing prevention code from DebugSidebarPanel to DebuggerManager.
  14994. Part of: <rdar://problem/10318770>
  14995. Reviewed by Brian Weinstein.
  14996. * UserInterface/DebugSidebarPanel.js:
  14997. (WebInspector.DebugSidebarPanel): Listen for the new CallFramesDidChange event instead of
  14998. the Paused and Resumed events.
  14999. (WebInspector.DebugSidebarPanel.prototype._showNotPausedEmptyContentPlaceholder): Added.
  15000. (WebInspector.DebugSidebarPanel.prototype._updateEmptyContentPlaceholder): Updated the message.
  15001. (WebInspector.DebugSidebarPanel.prototype._debuggerCallFramesDidChange): Check for null callFrames
  15002. and call _showNotPausedEmptyContentPlaceholder.
  15003. * UserInterface/DebuggerManager.js:
  15004. (WebInspector.DebuggerManager.prototype.debuggerDidPause): Remove assert, since we might be paused still.
  15005. Clear the delayed resume timeout.
  15006. (WebInspector.DebuggerManager.prototype.debuggerDidResume): Delay clearing the state and firing events.
  15007. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  15008. Add debugger controls for pause, resume, step over, step in, and step out.
  15009. Part of: <rdar://problem/10318770>
  15010. Reviewed by Joseph Pecoraro.
  15011. * Localizations/en.lproj/localizedStrings.js:
  15012. * UserInterface/Images/Pause.pdf: Added.
  15013. * UserInterface/Images/Resume.pdf: Added.
  15014. * UserInterface/Images/StepInto.pdf: Added.
  15015. * UserInterface/Images/StepOut.pdf: Added.
  15016. * UserInterface/Images/StepOver.pdf: Added.
  15017. * UserInterface/QuickConsole.js:
  15018. (WebInspector.QuickConsole): Create the button items.
  15019. (WebInspector.QuickConsole.prototype._debuggerPauseResumeButtonClicked): Added.
  15020. (WebInspector.QuickConsole.prototype._debuggerStepOverButtonClicked): Added.
  15021. (WebInspector.QuickConsole.prototype._debuggerStepIntoButtonClicked): Added.
  15022. (WebInspector.QuickConsole.prototype._debuggerStepOutButtonClicked): Added.
  15023. (WebInspector.QuickConsole.prototype._debuggerDidPause): Added.
  15024. (WebInspector.QuickConsole.prototype._debuggerDidResume): Added.
  15025. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  15026. Use ToggleButtonNavigationItem for the quick console toggle button.
  15027. Also start using the right artwork for the glyph.
  15028. Part of: <rdar://problem/10319586>
  15029. Reviewed by Joseph Pecoraro.
  15030. * UserInterface/Images/ToggleArrowDown.pdf: Added.
  15031. * UserInterface/Images/ToggleArrowUp.pdf: Added.
  15032. * UserInterface/QuickConsole.css: Removed styles to flip the arrow when collapsed.
  15033. * UserInterface/QuickConsole.js:
  15034. (WebInspector.QuickConsole): Use ToggleButtonNavigationItem. Add a divider to the left of the button.
  15035. (WebInspector.QuickConsole.prototype.set collapsed): Change the image for the toggle button.
  15036. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  15037. Remove QuickConsoleButtonNavigationItem and merge its functionality down into ButtonNavigationItem.
  15038. Having a special subclass prevent us from using ToggleButtonNavigationItem without adding another
  15039. special QuickConsoleToggleButtonNavigationItem subclass.
  15040. Part of: <rdar://problem/10319586>
  15041. Reviewed by Joseph Pecoraro.
  15042. * UserInterface/ButtonNavigationItem.css:
  15043. (.navigation-bar > .item.suppress-emboss > .glyph):
  15044. (.navigation-bar > .item.suppress-emboss:active > .glyph):
  15045. (.navigation-bar > .item.button.disabled > .glyph):
  15046. * UserInterface/ButtonNavigationItem.js:
  15047. (WebInspector.ButtonNavigationItem): Call _updateImage and the suppress-emboss style class if needed.
  15048. (WebInspector.ButtonNavigationItem.prototype.set image): Call _updateImage.
  15049. (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Generate a background-size for _suppressEmboss.
  15050. (WebInspector.ButtonNavigationItem.prototype._canvasIdentifier): Added assert.
  15051. (WebInspector.ButtonNavigationItem.prototype._updateImage): Added.
  15052. (WebInspector.ButtonNavigationItem.prototype._generateImages): Added assert.
  15053. * UserInterface/Main.html: Removed QuickConsoleButtonNavigationItem.{css,js}.
  15054. * UserInterface/QuickConsole.js:
  15055. (WebInspector.QuickConsole): Use ButtonNavigationItem.
  15056. * UserInterface/QuickConsoleButtonNavigationItem.css: Removed.
  15057. * UserInterface/QuickConsoleButtonNavigationItem.js: Removed.
  15058. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  15059. Make line numbers in the Breakpoint sidebar be 1-based. Also fixes a couple asserts that the
  15060. breakpoint lineNumber is 0-based.
  15061. Reviewed by Dan Bernstein.
  15062. * UserInterface/Breakpoint.js:
  15063. (WebInspector.Breakpoint): Fix assert.
  15064. (WebInspector.Breakpoint.prototype.set lineNumber): Ditto.
  15065. * UserInterface/BreakpointTreeElement.js:
  15066. (WebInspector.BreakpointTreeElement.prototype._updateMainTitle): Add 1 to the user visible number.
  15067. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  15068. Select the Debug sidebar panel and show the navigation sidebar when the debugger pauses.
  15069. Part of: <rdar://problem/10318770>
  15070. Reviewed by Dan Bernstein.
  15071. * UserInterface/Main.js:
  15072. (WebInspector.contentLoaded): Added Paused event listener.
  15073. (WebInspector._debuggerDidPause): Added.
  15074. 2012-03-10 Timothy Hatcher <timothy@apple.com>
  15075. Highlight the current execution line.
  15076. Part of: <rdar://problem/10318770>
  15077. Reviewed by Joseph Pecoraro.
  15078. * UserInterface/DebugSidebarPanel.js:
  15079. (WebInspector.DebugSidebarPanel.prototype._debuggerDidPause): Select the active call frame tree element.
  15080. (WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Set the active call frame.
  15081. * UserInterface/DebuggerManager.js:
  15082. (WebInspector.DebuggerManager.prototype.get activeCallFrame): Added.
  15083. (WebInspector.DebuggerManager.prototype.set activeCallFrame): Added. Fire ActiveCallFrameDidChange
  15084. (WebInspector.DebuggerManager.prototype.debuggerDidPause): Set _activeCallFrame and fire ActiveCallFrameDidChange.
  15085. (WebInspector.DebuggerManager.prototype.debuggerDidResume): Ditto.
  15086. * UserInterface/Images/InstructionPointer.png: Added.
  15087. * UserInterface/Images/InstructionPointer@2x.png: Added.
  15088. * UserInterface/TextEditor.css:
  15089. (.text-editor > .gutter > .line-number.execution-line::after):
  15090. (.text-editor .text-editor-text-chunk.execution-line):
  15091. * UserInterface/TextEditor.js:
  15092. (WebInspector.TextEditor): Initialize _executionLineNumber to NaN.
  15093. (WebInspector.TextEditor.prototype.get executionLineNumber): Added.
  15094. (WebInspector.TextEditor.prototype.set executionLineNumber): Added. Call _updateExecutionLineNumber.
  15095. (WebInspector.TextEditor.prototype.singleLineElementForLine): Handle a null result from _textChunkForLine.
  15096. (WebInspector.TextEditor.prototype._updateExecutionLineNumber): Added. Removes from the old line and adds to the new.
  15097. (WebInspector.TextEditor.prototype._updateLineNumbers): Make lineNumber 0-based instead of 1-based.
  15098. (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Add 1 for user visible line numbers.
  15099. (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Ditto.
  15100. (WebInspector.TextEditor.prototype._textChunkForLine): Handle negative numbers and NaN.
  15101. (WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Assert the textChunk isn't null.
  15102. * UserInterface/TextResourceContentView.js:
  15103. (WebInspector.TextResourceContentView):
  15104. (WebInspector.TextResourceContentView.prototype.contentAvailable):
  15105. (WebInspector.TextResourceContentView.prototype._updateExecutionLineNumber):
  15106. 2012-03-09 Timothy Hatcher <timothy@apple.com>
  15107. Populate the Debug sidebar with call frames when the debugger pauses.
  15108. Part of: <rdar://problem/10318770>
  15109. Reviewed by Joseph Pecoraro.
  15110. * Localizations/en.lproj/localizedStrings.js: Updated.
  15111. * UserInterface/CallFrameIcons.css: Added.
  15112. (.function-icon .icon):
  15113. (.event-listener-icon .icon):
  15114. * UserInterface/CallFrameTreeElement.js: Added.
  15115. (WebInspector.CallFrameTreeElement):
  15116. (WebInspector.CallFrameTreeElement.prototype.get callFrame):
  15117. * UserInterface/DebugSidebarPanel.js:
  15118. (WebInspector.DebugSidebarPanel):
  15119. (WebInspector.DebugSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
  15120. (WebInspector.DebugSidebarPanel.prototype._debuggerDidPause): Added. Create CallFrameTreeElements.
  15121. (WebInspector.DebugSidebarPanel.prototype._debuggerDidResume): Added. Set a timeout for delayedWork.
  15122. (WebInspector.DebugSidebarPanel.prototype._debuggerDidResume.delayedWork): Added. Remove the tree elements.
  15123. (WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Added. Show the resource source code.
  15124. * UserInterface/Images/EventListener.pdf: Added.
  15125. * UserInterface/Images/Function.pdf: Added.
  15126. * UserInterface/Main.html: Included CallFrameIcons.css and CallFrameTreeElement.js.
  15127. 2012-03-09 Timothy Hatcher <timothy@apple.com>
  15128. Process the call frames when the debugger pauses and create easy to use objects.
  15129. Part of: <rdar://problem/10318770>
  15130. Reviewed by Brian Weinstein.
  15131. * UserInterface/CallFrame.js: Added.
  15132. (WebInspector.CallFrame):
  15133. (WebInspector.CallFrame.prototype.get id):
  15134. (WebInspector.CallFrame.prototype.get scriptLocation):
  15135. (WebInspector.CallFrame.prototype.get functionName):
  15136. (WebInspector.CallFrame.prototype.get thisObject):
  15137. (WebInspector.CallFrame.prototype.get scopeChain):
  15138. * UserInterface/DebuggerManager.js:
  15139. (WebInspector.DebuggerManager.prototype.get callFrames): Added.
  15140. (WebInspector.DebuggerManager.prototype.debuggerDidPause): Process the callFramesPayload.
  15141. (WebInspector.DebuggerManager.prototype.debuggerDidResume): Clear the _callFrames.
  15142. (WebInspector.DebuggerManager.prototype._scriptLocationFromPayload): Added. Helper.
  15143. (WebInspector.DebuggerManager.prototype._scopeChainFromPayload): Added. Helper.
  15144. (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): Added. Helper.
  15145. * UserInterface/Main.html: Included CallFrame.js, ScopeChainNode.js, and ScriptLocation.js.
  15146. * UserInterface/ScopeChainNode.js: Added.
  15147. (WebInspector.ScopeChainNode):
  15148. (WebInspector.ScopeChainNode.prototype.get type):
  15149. (WebInspector.ScopeChainNode.prototype.get object):
  15150. * UserInterface/ScriptLocation.js: Added.
  15151. (WebInspector.ScriptLocation):
  15152. (WebInspector.ScriptLocation.prototype.get script):
  15153. (WebInspector.ScriptLocation.prototype.get lineNumber):
  15154. (WebInspector.ScriptLocation.prototype.get columnNumber):
  15155. 2012-03-09 Timothy Hatcher <timothy@apple.com>
  15156. Track the paused state of the debugger and add functions to pause, resume, and step.
  15157. Part of: <rdar://problem/10318770>
  15158. Reviewed by Brian Weinstein.
  15159. * UserInterface/DebuggerManager.js:
  15160. (WebInspector.DebuggerManager.prototype.get paused): Added.
  15161. (WebInspector.DebuggerManager.prototype.pause): Added.
  15162. (WebInspector.DebuggerManager.prototype.resume): Added.
  15163. (WebInspector.DebuggerManager.prototype.stepOver): Added.
  15164. (WebInspector.DebuggerManager.prototype.stepInto): Added.
  15165. (WebInspector.DebuggerManager.prototype.reset): Reset _paused and fire the Resumed event.
  15166. (WebInspector.DebuggerManager.prototype.debuggerDidPause): Set _paused and fire the Paused event.
  15167. (WebInspector.DebuggerManager.prototype.debuggerDidResume): Set _paused and fire the Resumed event.
  15168. * UserInterface/DebuggerObserver.js:
  15169. (WebInspector.DebuggerObserver.prototype.paused): Call DebuggerManager.debuggerDidPause.
  15170. (WebInspector.DebuggerObserver.prototype.resumed): Call DebuggerManager.debuggerDidResume.
  15171. 2012-03-09 Timothy Hatcher <timothy@apple.com>
  15172. Add WebInspector.Script and create them when scripts are parsed.
  15173. Part of: <rdar://problem/10318770>
  15174. Reviewed by Brian Weinstein.
  15175. * UserInterface/DebuggerManager.js:
  15176. (WebInspector.DebuggerManager):
  15177. (WebInspector.DebuggerManager.prototype.reset): Clear the script map.
  15178. (WebInspector.DebuggerManager.prototype.scriptDidParse): Added. Create a Script instance
  15179. and add it to the id map.
  15180. * UserInterface/DebuggerObserver.js:
  15181. (WebInspector.DebuggerObserver.prototype.scriptParsed): Call DebuggerManager.scriptDidParse.
  15182. * UserInterface/Main.html: Included Script.js.
  15183. * UserInterface/Script.js: Added.
  15184. (WebInspector.Script):
  15185. (WebInspector.Script.prototype.get id):
  15186. (WebInspector.Script.prototype.get range):
  15187. (WebInspector.Script.prototype.get url):
  15188. (WebInspector.Script.prototype.get urlComponents):
  15189. 2012-03-09 Timothy Hatcher <timothy@apple.com>
  15190. Add a way to break on all exceptions and uncaught exceptions.
  15191. Part of: <rdar://problem/10318770&10318777>
  15192. Reviewed by Brian Weinstein and Joseph Pecoraro.
  15193. * Localizations/en.lproj/localizedStrings.js: Updated.
  15194. * UserInterface/BreakpointIcons.css:
  15195. (.breakpoint-exception-icon .icon): Added.
  15196. * UserInterface/BreakpointSidebarPanel.js:
  15197. (WebInspector.BreakpointSidebarPanel): Create BreakpointTreeElements for the two exception breakpoints.
  15198. * UserInterface/BreakpointTreeElement.js:
  15199. (WebInspector.BreakpointTreeElement): Add support for a custom style class and title.
  15200. * UserInterface/DebuggerManager.js:
  15201. (WebInspector.DebuggerManager): Create an all exceptions and and all uncaught exceptions breakpoint.
  15202. (WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint): Added.
  15203. (WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint): Added.
  15204. (WebInspector.DebuggerManager.prototype.breakpointResolved): Remove an overzealous assert.
  15205. (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): Intercept the exception breakpoints
  15206. and call _updateBreakOnExceptionsState after updating the settings.
  15207. (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState): Added. Communicate the state to the
  15208. backend and update resolved state.
  15209. 2012-03-10 Joseph Pecoraro <pecoraro@apple.com>
  15210. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  15211. Allow resizing of the quick console. The quick console behaves like
  15212. sidebars. It toggles collapsed state when double clicked, and opens
  15213. or closes when resizing. The allowed maximum height is 75% of the
  15214. screen. When the window is resized smaller, we may need to shorten
  15215. the console to be within the 75%.
  15216. Remember the height before we collapsed so that if you toggle
  15217. immediately it will restore the height to what it was.
  15218. Reviewed by Timothy Hatcher.
  15219. * UserInterface/Main.js:
  15220. (WebInspector._contentBrowserSizeDidChange):
  15221. * UserInterface/QuickConsole.css:
  15222. (.quick-console):
  15223. (.quick-console > .resizer):
  15224. Position the quick-console resizer like a sidebar resizer. 5px
  15225. wide, with a couple pixels above and below the border.
  15226. * UserInterface/QuickConsole.js:
  15227. (WebInspector.QuickConsole):
  15228. (WebInspector.QuickConsole.prototype.get collapsedHeight):
  15229. (WebInspector.QuickConsole.prototype.get minimumUncollapsedHeight):
  15230. (WebInspector.QuickConsole.prototype.get maximumUncollapsedHeight):
  15231. (WebInspector.QuickConsole.prototype.updateLayout):
  15232. (WebInspector.QuickConsole.prototype.get height):
  15233. (WebInspector.QuickConsole.prototype.set height):
  15234. (WebInspector.QuickConsole.prototype._toggleButtonClicked):
  15235. (WebInspector.QuickConsole.prototype._resizerDoubleClicked):
  15236. (WebInspector.QuickConsole.prototype._resizerMouseDown):
  15237. (WebInspector.QuickConsole.prototype._resizerMouseMoved):
  15238. (WebInspector.QuickConsole.prototype._resizerMouseUp):
  15239. 2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
  15240. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  15241. Pull the console out of ContentBrowser and instead just put it underneath.
  15242. Reviewed by Timothy Hatcher.
  15243. * UserInterface/ContentBrowser.js:
  15244. (WebInspector.ContentBrowser):
  15245. * UserInterface/Main.css:
  15246. (#content):
  15247. * UserInterface/Main.html:
  15248. * UserInterface/Main.js:
  15249. (WebInspector.contentLoaded):
  15250. * UserInterface/QuickConsole.css:
  15251. (#quick-console):
  15252. (#quick-console.collapsed):
  15253. (#quick-console .navigation-bar > .console-toggle):
  15254. (#quick-console.collapsed .navigation-bar > .console-toggle):
  15255. (#quick-console > .quick-console-view-container):
  15256. (#quick-console > .quick-console-toolbar):
  15257. (#quick-console > .quick-console-toolbar > .quick-console-text-prompt):
  15258. (#quick-console > .quick-console-toolbar > .navigation-bar):
  15259. 2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
  15260. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  15261. Add a toggle button to the quick console's navigation bar.
  15262. Reviewed by Timothy Hatcher.
  15263. * Localizations/en.lproj/localizedStrings.js:
  15264. * UserInterface/Main.html:
  15265. Misc changes.
  15266. * UserInterface/ButtonNavigationItem.js:
  15267. (WebInspector.ButtonNavigationItem):
  15268. (WebInspector.ButtonNavigationItem.prototype.get glyphElement):
  15269. Expose glyphElement for QuickConsole buttons to use.
  15270. Add a way to suppress creating embossed images.
  15271. * UserInterface/QuickConsoleButtonNavigationItem.css: Added.
  15272. (.navigation-bar > .item.quick-console-button):
  15273. (.navigation-bar > .item.quick-console-button:active):
  15274. * UserInterface/QuickConsoleButtonNavigationItem.js: Added.
  15275. (WebInspector.QuickConsoleButtonNavigationItem):
  15276. (WebInspector.QuickConsoleButtonNavigationItem.prototype.generateStyleText):
  15277. The QuickConsole buttons are just styled with different opacities. We
  15278. can remove most of the custom NavigationItem styles and set the glyph
  15279. image directly.
  15280. * UserInterface/QuickConsole.css:
  15281. (.quick-console .navigation-bar > .console-toggle):
  15282. (.quick-console.collapsed .navigation-bar > .console-toggle):
  15283. * UserInterface/QuickConsole.js:
  15284. (WebInspector.QuickConsole):
  15285. (WebInspector.QuickConsole.prototype.get collapsed):
  15286. (WebInspector.QuickConsole.prototype.set collapsed):
  15287. (WebInspector.QuickConsole.prototype._toggleButtonClicked):
  15288. Give the console a toggle button.
  15289. 2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
  15290. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  15291. View hierarchy for the quick console:
  15292. <div class="quick-console">
  15293. <!--
  15294. Content view container. When the console adjusts its height this becomes
  15295. visible. This flex fills the vertical space.
  15296. -->
  15297. <div class="view-container"></div>
  15298. <!--
  15299. Toolbar fixed to the bottom. TextPrompt and NavigationBar with buttons.
  15300. Fixed height, position:relative to appear on top, and the text-prompt
  15301. flex fills horizontally.
  15302. -->
  15303. <div class="toolbar">
  15304. <div class="text-prompt" contenteditable="true"></div>
  15305. <div class="navigation-bar"></div>
  15306. </div>
  15307. </div>
  15308. Reviewed by Timothy Hatcher.
  15309. * UserInterface/Main.html:
  15310. * UserInterface/QuickConsole.css:
  15311. (.quick-console):
  15312. (.quick-console.collapsed):
  15313. (.quick-console > .view-container):
  15314. (.quick-console > .toolbar):
  15315. (.quick-console > .toolbar > .text-prompt):
  15316. (.quick-console > .toolbar > .navigation-bar):
  15317. * UserInterface/QuickConsole.js:
  15318. (WebInspector.QuickConsole):
  15319. (WebInspector.QuickConsole.get element):
  15320. * UserInterface/QuickConsoleNavigationBar.js: Added.
  15321. (WebInspector.QuickConsoleNavigationBar):
  15322. (WebInspector.QuickConsoleNavigationBar.prototype.addNavigationItem):
  15323. Add navigation items on the left. Since we will always want the toggle button on the right.
  15324. 2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
  15325. <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
  15326. Add the QuickConsole to the bottom of the ContentBrowser.
  15327. Reviewed by Timothy Hatcher.
  15328. * UserInterface/ContentBrowser.js:
  15329. (WebInspector.ContentBrowser):
  15330. * UserInterface/Main.html:
  15331. * UserInterface/QuickConsole.css: Added.
  15332. (.quick-console):
  15333. (body.window-inactive .navigation-bar):
  15334. * UserInterface/QuickConsole.js: Added.
  15335. (WebInspector.QuickConsole):
  15336. (WebInspector.QuickConsole.prototype.get element):
  15337. 2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
  15338. <rdar://problem/11017753> Sometimes Load event-marker doesn't show up (99%)
  15339. When an event-marker is very close to, but not, the new maximum boundary
  15340. the maximum boundary wasn't being extended to allow for a nice display of
  15341. the event-marker. Now, if the event-marker is within 3% of the maximum
  15342. boundary, then just extend the maximum boundary by 3%.
  15343. Reviewed by Timothy Hatcher.
  15344. * UserInterface/NetworkGraphCalculator.js:
  15345. (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventMarker):
  15346. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15347. Follow up to my previous fix for reloading the page sometimes removes the main resource from breakpoints.
  15348. Not all breakpoints pass in the resource to _addBreakpoint. If resource was undefined it would cause
  15349. a new ResourceTreeElement to be created for each breakpoint.
  15350. Reviewed by Joseph Pecoraro.
  15351. * UserInterface/BreakpointSidebarPanel.js:
  15352. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Lookup the resource first,
  15353. so it can always be compared to the ResourceTreeElement's resource.
  15354. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15355. Follow-up patch to clean up DOMTreeManager events data.
  15356. Always pass the node as "node" and parentNode as "parent". There was
  15357. one case looking for parentNode that was totally wrong.
  15358. Reviewed by Timothy Hatcher.
  15359. * UserInterface/DOMTreeContentView.js:
  15360. (WebInspector.DOMTreeContentView.prototype._domNodeChanged):
  15361. * UserInterface/DOMTreeManager.js:
  15362. (WebInspector.DOMTreeManager.prototype._characterDataModified):
  15363. (WebInspector.DOMTreeManager.prototype._childNodeInserted):
  15364. * UserInterface/DOMTreeUpdater.js:
  15365. (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
  15366. (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
  15367. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15368. <rdar://problem/11005082> Editing node attribute should or HTML should update Path Components
  15369. Update path components when the selected node has an attribute
  15370. or character data change.
  15371. Reviewed by Timothy Hatcher.
  15372. * UserInterface/DOMTreeContentView.js:
  15373. (WebInspector.DOMTreeContentView):
  15374. (WebInspector.DOMTreeContentView.prototype._domNodeChanged):
  15375. In the attribute events the changed node is event.data.node.
  15376. In the character data event the changed node is event.data.
  15377. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15378. <rdar://problem/11014611> Inline Web SQL Database DataGrid resizers are not updated if inspector window resized
  15379. When the window resizes, the ContentView gets an updateLayout. Use this
  15380. opportunity to update the layout of any inline DataGrids so that their
  15381. resizers are positioned correctly.
  15382. Reviewed by Timothy Hatcher.
  15383. * UserInterface/DatabaseContentView.js:
  15384. (WebInspector.DatabaseContentView.prototype.constructor.WebInspector.DatabaseContentView.updateLayout):
  15385. (WebInspector.DatabaseContentView.prototype._appendViewQueryResult):
  15386. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15387. Remove uses of WebInspector.useLowerCaseMenuTitles. On the Safari frontend
  15388. this is always yes and the function doesn't even exist. This code is currently
  15389. unreachable, the change is to fix update-safari-localizable-strings usage.
  15390. Reviewed by Brian Weinstein.
  15391. * Localizations/en.lproj/localizedStrings.js:
  15392. * UserInterface/LogContentView.js:
  15393. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15394. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15395. Tweak the event-markers so they are always behind the network datagrid's
  15396. timeline pills. This is done by making three layers: event-marker (bottom),
  15397. timeline pills (middle), and tooltip div (top).
  15398. Reviewed by Timothy Hatcher.
  15399. * UserInterface/NetworkDataGrid.css:
  15400. (.network-timeline-decorations > .event-markers > .event-marker):
  15401. (.network-datagrid tr > td.timeline-column):
  15402. (.network-timeline-decorations > .event-markers > .event-marker-tooltip):
  15403. Style the three layers, z-indexes.
  15404. * UserInterface/TimelinesContentView.css:
  15405. Remove old z-index.
  15406. * UserInterface/NetworkDataGrid.js:
  15407. (WebInspector.NetworkDataGrid):
  15408. Rename the constants to use the standard "StyleClassName" suffix and
  15409. give the DataGrid a class name.
  15410. * UserInterface/TimelineDecorations.css:
  15411. (.timeline-decorations > .event-markers > .event-marker-tooltip):
  15412. (.timeline-decorations > .event-markers > .event-marker):
  15413. (.timeline-decorations > .event-markers > .event-marker.load-event):
  15414. (.timeline-decorations > .event-markers > .event-marker.dom-content-event):
  15415. (.timeline-decorations > .event-markers > .event-marker.timestamp):
  15416. Drop the "wrapper" element. The event-marker now displays the same as the tooltip div.
  15417. * UserInterface/TimelineDecorations.js:
  15418. (WebInspector.TimelineDecorations.prototype.updateEventMarkers):
  15419. Rename "wrapper" -> "tooltip" and position the tooltip and marker the same.
  15420. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15421. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15422. Remember if the Network DataGrid column group was collapsed or expanded.
  15423. Reviewed by Timothy Hatcher.
  15424. * UserInterface/DataGrid.js:
  15425. (WebInspector.DataGrid.prototype._clickInColumnCollapser):
  15426. (WebInspector.DataGrid.prototype.collapseColumnGroup):
  15427. (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
  15428. Add collapseColumnGroup(name) API to DataGrid and share the
  15429. code with the old path, when the user clicks the button.
  15430. * UserInterface/NetworkDataGrid.js:
  15431. (WebInspector.NetworkDataGrid):
  15432. (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
  15433. On creation load the setting, and save the setting on toggle.
  15434. * UserInterface/TimelinesContentView.js:
  15435. (WebInspector.TimelinesContentView):
  15436. Give all columns a starting width (based on the auto-calculated widths).
  15437. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15438. <rdar://problem/11014578> DOM Storage DataGrids should be sortable
  15439. Allow sorting of both of the DOM Storage DataGrid columns.
  15440. Before sorting nodes, make sure to delete the creation node
  15441. and re-add it in the end.
  15442. Reviewed by Timothy Hatcher.
  15443. * UserInterface/DOMStorageContentView.js:
  15444. (WebInspector.DOMStorageContentView.prototype._updateDataGridForDOMStorageEntries):
  15445. (WebInspector.DOMStorageContentView.prototype._sortDataGrid):
  15446. (WebInspector.DOMStorageContentView.prototype._insertNodesIntoDataGridWithSort.comparator):
  15447. (WebInspector.DOMStorageContentView.prototype._insertNodesIntoDataGridWithSort):
  15448. Share sort code with table creation and sort changed.
  15449. * UserInterface/DataGrid.js:
  15450. (WebInspector.DataGrid.prototype.removeChild):
  15451. When the creation node is removed, delete the reference to it.
  15452. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15453. Rename DataGrid methods and events.
  15454. DataGrid.prototype.updateWidths -> updateLayout
  15455. "sorting changed" event -> WebInspector.DataGrid.Event.SortChanged
  15456. "width changed" event -> WebInspector.DataGrid.Event.DidLayout
  15457. This then also renames the NetworkDataGrid event handlers
  15458. and moves the sorting dispatch function into its only caller.
  15459. Reviewed by Brian Weinstein.
  15460. * UserInterface/ApplicationCacheFrameContentView.js:
  15461. (WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout):
  15462. (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
  15463. * UserInterface/CSSSelectorProfileView.js:
  15464. (WebInspector.CSSSelectorProfileView):
  15465. (WebInspector.CSSSelectorProfileView.prototype.updateLayout):
  15466. * UserInterface/CookieStorageContentView.js:
  15467. (WebInspector.CookieStorageContentView.prototype.updateLayout):
  15468. (WebInspector.CookieStorageContentView.prototype._rebuildTable):
  15469. * UserInterface/DOMStorageContentView.js:
  15470. (WebInspector.DOMStorageContentView.prototype.updateLayout):
  15471. (WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries):
  15472. * UserInterface/DataGrid.js:
  15473. (WebInspector.DataGrid.prototype.autoSizeColumns):
  15474. (WebInspector.DataGrid.prototype.updateLayout):
  15475. (WebInspector.DataGrid.prototype.applyColumnWidthsMap):
  15476. (WebInspector.DataGrid.prototype._clickInHeaderCell):
  15477. (WebInspector.DataGrid.prototype._resizerDragging):
  15478. (WebInspector.DataGrid.prototype._endResizerDragging):
  15479. * UserInterface/DatabaseTableContentView.js:
  15480. (WebInspector.DatabaseTableContentView.prototype.updateLayout):
  15481. (WebInspector.DatabaseTableContentView.prototype._queryFinished):
  15482. * UserInterface/JavaScriptProfileView.js:
  15483. (WebInspector.JavaScriptProfileView.prototype.updateLayout):
  15484. * UserInterface/NetworkDataGrid.js:
  15485. (WebInspector.NetworkDataGrid):
  15486. (WebInspector.NetworkDataGrid.prototype._dataGridSortChanged):
  15487. (WebInspector.NetworkDataGrid.prototype._dataGridDidLayout):
  15488. * UserInterface/TimelinesContentView.js:
  15489. (WebInspector.TimelinesContentView):
  15490. (WebInspector.TimelinesContentView.prototype.constructor.WebInspector.TimelinesContentView.showTimelineForRecordType):
  15491. (WebInspector.TimelinesContentView.prototype.updateLayout):
  15492. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15493. Relayout the selected node when widths change. This is only needed for
  15494. the selected node because currently it is the only node that can be
  15495. displaying labels when the data grid's columns widths change.
  15496. Reviewed by Brian Weinstein.
  15497. * UserInterface/DataGrid.js:
  15498. (WebInspector.DataGridNode.prototype.updateLayout):
  15499. * UserInterface/NetworkDataGrid.js:
  15500. (WebInspector.NetworkDataGrid):
  15501. (WebInspector.NetworkDataGrid.prototype._updateLayout):
  15502. * UserInterface/ResourceTimelineDataGridNode.js:
  15503. (WebInspector.ResourceTimelineDataGridNode.prototype.updateLayout):
  15504. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15505. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15506. Draw the event markers over the Network datagrid.
  15507. Reviewed by Timothy Hatcher.
  15508. * Localizations/en.lproj/localizedStrings.js:
  15509. Tooltip strings for the event-marker lines.
  15510. * UserInterface/NetworkDataGrid.js:
  15511. (WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithEventMarker):
  15512. (WebInspector.NetworkDataGrid.prototype._updateDecorations):
  15513. (WebInspector.NetworkDataGrid.prototype._updateEventMarkers):
  15514. Let the calculator handle updating the bounds and the decorator drawing the markers.
  15515. * UserInterface/NetworkGraphCalculator.js:
  15516. (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventMarker):
  15517. When updating boundaries for event markers its possible that event markers will
  15518. arrive later then resources (onload or console.timeStamp() for example). If such
  15519. an event is more than 10% past the current bounds we don't stretch the bounds
  15520. because it would distort the graph too much. Likewise, if a timestamp will become
  15521. the new maximum extend an extra 3% to provide some white-space past the marker.
  15522. * UserInterface/TimelineDecorations.css:
  15523. (.timeline-decorations > .event-markers):
  15524. (.timeline-decorations > .event-markers > .event-marker-wrapper):
  15525. This wrapper provides a larger surface area for the tooltip. 9px total (4px + 1px + 4px).
  15526. (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker):
  15527. (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.load-event):
  15528. (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.dom-content-event):
  15529. (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.timestamp):
  15530. Different colors for the different types of event-markers.
  15531. * UserInterface/TimelinesContentView.css:
  15532. (.content-view.timelines > .data-grid tr.selected td.timeline-column):
  15533. Make sure the selected timeline datagrid row draws over the event-marker.
  15534. * UserInterface/TimelineDecorations.js:
  15535. (WebInspector.TimelineDecorations):
  15536. (WebInspector.TimelineDecorations.prototype.updateEventMarkers.toolTipForEventMarker):
  15537. (WebInspector.TimelineDecorations.prototype.updateEventMarkers):
  15538. Position and style the event markers within the bounds.
  15539. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15540. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15541. Add TimelineEventMarkers to the Network's TimelineDecorations. They are
  15542. not displayed yet, and the TimelineOverview won't show markers yet.
  15543. Reviewed by Timothy Hatcher.
  15544. * UserInterface/TimelinesContentView.js:
  15545. (WebInspector.TimelinesContentView):
  15546. (WebInspector.TimelinesContentView.prototype._recordedEventMarker):
  15547. Pass incoming event markers to the current datagrid. Only the network data grid uses them.
  15548. (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
  15549. (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecordsAndEventMarkers):
  15550. When updating the bounds of the timeline graph also provide pending event markers
  15551. so that late events (like onload) can stretch the maximum bounds if necessary.
  15552. * UserInterface/TimelineDataGrid.js:
  15553. (WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithEventMarker):
  15554. (WebInspector.TimelineDataGrid.prototype.addTimelineEventMarker):
  15555. Default empty implementations for DataGrids to handle event markers.
  15556. * UserInterface/NetworkDataGrid.js:
  15557. (WebInspector.NetworkDataGrid.prototype.reset):
  15558. (WebInspector.NetworkDataGrid.prototype.addTimelineEventMarker):
  15559. Pass event markers on to the decorations manager. We also need a way to reset now.
  15560. * UserInterface/TimelineDecorations.js:
  15561. (WebInspector.TimelineDecorations):
  15562. (WebInspector.TimelineDecorations.prototype.addTimelineEventMarker):
  15563. Keep track of event makers we may need to display.
  15564. * UserInterface/TimelineOverview.js:
  15565. (WebInspector.TimelineOverview.prototype.clear):
  15566. Add clear, just in case it is needed later. The overview currently doesn't handle event markers.
  15567. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15568. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15569. Add a TimelineEventMarker class for marked timestamps. Current
  15570. event markers that we are interested in are the DOMContent event,
  15571. Load event, and console.timeStamp() calls.
  15572. Reviewed by Timothy Hatcher.
  15573. * UserInterface/Main.html:
  15574. * UserInterface/PageObserver.js:
  15575. (WebInspector.PageObserver.domContentEventFired):
  15576. (WebInspector.PageObserver.prototype.loadEventFired):
  15577. Point out that these are not needed, they are covered by TimelineAgent
  15578. in the Safari frontend.
  15579. * UserInterface/TimelineEventMarker.js: Added.
  15580. (WebInspector.TimelineEventMarker):
  15581. (WebInspector.TimelineEventMarker.prototype.constructor.WebInspector.TimelineEventMarker.get timestamp):
  15582. (WebInspector.TimelineEventMarker.prototype.get type):
  15583. Simple class encapsulating a timestamp and type.
  15584. * UserInterface/TimelineManager.js:
  15585. (WebInspector.TimelineManager):
  15586. (WebInspector.TimelineManager.prototype.get timelineEventMarkers):
  15587. (WebInspector.TimelineManager.prototype.startRecording):
  15588. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
  15589. (WebInspector.TimelineManager.prototype.eventRecorded):
  15590. Keep a record of event markers.
  15591. 2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
  15592. When hiding the dock button also hide the divider between the dock
  15593. button and the sidebar's other navigation items.
  15594. Reviewed by Timothy Hatcher.
  15595. * UserInterface/ButtonNavigationItem.js:
  15596. * UserInterface/Main.js:
  15597. (WebInspector.contentLoaded):
  15598. (WebInspector._updateDockToggleButtonVisibility):
  15599. * UserInterface/NavigationItem.js:
  15600. (WebInspector.NavigationItem.prototype.get hidden):
  15601. (WebInspector.NavigationItem.prototype.set hidden):
  15602. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15603. Reloading the page sometimes removes the main resource from breakpoints.
  15604. The _checkForOldResources function is delayed on the timeout. This caused the
  15605. breakpoints to be appended to a ResourceTreeElement that will soon be removed.
  15606. Reviewed by Brian Weinstein.
  15607. * UserInterface/BreakpointSidebarPanel.js:
  15608. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Create a new ResourceTreeElement
  15609. if the resource is different from the previous ResourceTreeElement.
  15610. * UserInterface/IssueSidebarPanel.js:
  15611. (WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Ditto.
  15612. * UserInterface/SearchSidebarPanel.js:
  15613. (WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Ditto.
  15614. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15615. Communicate breakpoints to the backend and update the resolved state of the breakpoints.
  15616. Part of: <rdar://problem/10318770&10318777>
  15617. Reviewed by Brian Weinstein.
  15618. * UserInterface/Breakpoint.js:
  15619. (WebInspector.Breakpoint): Initialize _id to null.
  15620. (WebInspector.Breakpoint.prototype.get id): Added.
  15621. (WebInspector.Breakpoint.prototype.set id): Added.
  15622. (WebInspector.Breakpoint.prototype.set lineNumber): Report oldLineNumber in the event.
  15623. (WebInspector.Breakpoint.prototype.get info): Updated comment.
  15624. * UserInterface/BreakpointSidebarPanel.js:
  15625. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Mark disabled breakpoints as resolved
  15626. when they are added to the user interface.
  15627. * UserInterface/DebuggerManager.js:
  15628. (WebInspector.DebuggerManager):
  15629. (WebInspector.DebuggerManager.prototype.addBreakpoint): Call _setBreakpoint.
  15630. (WebInspector.DebuggerManager.prototype.removeBreakpoint): Call _removeBreakpoint.
  15631. (WebInspector.DebuggerManager.prototype.breakpointResolved): Added.
  15632. (WebInspector.DebuggerManager.prototype.reset): Added.
  15633. (WebInspector.DebuggerManager.prototype._setBreakpoint): Added. Talk to the DebuggerAgent.
  15634. (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
  15635. (WebInspector.DebuggerManager.prototype._removeBreakpoint): Added. Talk to the DebuggerAgent.
  15636. (WebInspector.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
  15637. (WebInspector.DebuggerManager.prototype._breakpointLineNumberDidChange): Added. Call _removeBreakpoint.
  15638. (WebInspector.DebuggerManager.prototype._breakpointLineNumberDidChange.breakpointRemoved): Call _setBreakpoint.
  15639. (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): Call _removeBreakpoint or _setBreakpoint.
  15640. * UserInterface/DebuggerObserver.js:
  15641. (WebInspector.DebuggerObserver.prototype.globalObjectCleared): Call DebuggerManager.reset.
  15642. (WebInspector.DebuggerObserver.prototype.breakpointResolved): Call DebuggerManager.breakpointResolved.
  15643. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15644. Use "resolved" to describe breakpoints instead of "inactive".
  15645. The term inactive was confusing since we also have disabled. Using resolved better
  15646. describes the property.
  15647. Reviewed by Brian Weinstein.
  15648. * UserInterface/Breakpoint.js:
  15649. (WebInspector.Breakpoint):
  15650. (WebInspector.Breakpoint.prototype.set lineNumber):
  15651. (WebInspector.Breakpoint.prototype.get resolved): Renamed from inactive.
  15652. (WebInspector.Breakpoint.prototype.set resolved): Renamed from inactive.
  15653. (WebInspector.Breakpoint.prototype.get info):
  15654. * UserInterface/BreakpointTreeElement.css:
  15655. (.item.breakpoint .status > .status-image):
  15656. (.item.breakpoint .status > .status-image.resolved):
  15657. * UserInterface/BreakpointTreeElement.js:
  15658. (WebInspector.BreakpointTreeElement):
  15659. (WebInspector.BreakpointTreeElement.prototype._updateStatus):
  15660. * UserInterface/TextEditor.css:
  15661. (.text-editor > .gutter > .line-number > .breakpoint):
  15662. (.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint):
  15663. * UserInterface/TextEditor.js:
  15664. (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo):
  15665. (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement):
  15666. * UserInterface/TextResourceContentView.js:
  15667. (WebInspector.TextResourceContentView):
  15668. (WebInspector.TextResourceContentView.prototype.closed):
  15669. (WebInspector.TextResourceContentView.prototype._updateBreakpointStatus):
  15670. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointInfo):
  15671. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded):
  15672. (WebInspector.TextResourceContentView.prototype.textEditorLineContentUpdated):
  15673. (WebInspector.TextResourceContentView.prototype._textEditorBreakpointInfoForBreakpoint):
  15674. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15675. Fix an assertion and exception that is seen sometimes when opening the Web Inspector.
  15676. The _rebuildSections function is wired up to events. Those events can fire when we don't have
  15677. a selected DOM node. So we need to return early in that case and not assert.
  15678. Reviewed by Brian Weinstein.
  15679. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  15680. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Return early if domNode is null.
  15681. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15682. Fix a merge issue that caused breakpoint lines to not have an icon.
  15683. Part of: <rdar://problem/10318777>
  15684. Reviewed by Brian Weinstein.
  15685. * UserInterface/BreakpointTreeElement.js: Remove the duplicate GenericLineIconStyleClassName that
  15686. had a typo in the value.
  15687. 2012-03-08 Brian Weinstein <bweinstein@apple.com>
  15688. <rdar://problem/11007383> Need a way to clear the current console log.
  15689. Reviewed by Tim Hatcher.
  15690. * UserInterface/LogContentView.js:
  15691. (WebInspector.LogContentView): Call this._registerShortcuts.
  15692. (WebInspector.LogContentView.prototype.consoleCleared): Renamed from _consoleCleared.
  15693. (WebInspector.LogContentView.prototype._registerShortcuts): Remove the shortcut to dump memory, and remove
  15694. the code to set up shortcuts screen.
  15695. (WebInspector.LogContentView.prototype._requestClearMessages): Call to the LogManager.
  15696. (WebInspector.LogContentView.prototype._promptKeyDown): Actually look up the shortcut in the shortcuts
  15697. list.
  15698. * UserInterface/LogManager.js:
  15699. (WebInspector.LogManager.prototype.requestClearMessages): Call clearMessages on the ConsoleAgent, and fire
  15700. an event saying the active log was cleared.
  15701. * UserInterface/LogSidebarPanel.js:
  15702. (WebInspector.LogSidebarPanel): Listen for the active log being cleared.
  15703. (WebInspector.LogSidebarPanel.prototype._activeLogCleared): Call consoleCleared on the active log content view.
  15704. 2012-03-08 Brian Weinstein <bweinstein@apple.com>
  15705. <rdar://problem/11012162> Log repeat counts are not updated when the console is open.
  15706. Reviewed by Tim Hatcher.
  15707. * UserInterface/ConsoleObserver.js:
  15708. (WebInspector.ConsoleObserver.prototype.messageRepeatCountUpdated): Call through to the LogManager.
  15709. * UserInterface/LogContentView.js:
  15710. (WebInspector.LogContentView.prototype._appendCommand): Call LogManager.repeatCountWasInterrupted.
  15711. * UserInterface/LogManager.js:
  15712. (WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize): Initialize whether or
  15713. not the repeat count was interrupted (by the user entering a command in the log content view).
  15714. (WebInspector.LogManager.prototype.messageWasAdded): Create a ConsoleMessage and call _addMessage.
  15715. (WebInspector.LogManager.prototype.messageRepeatCountUpdated): If the repeat count wasn't interrupted,
  15716. update the count. If it was, then clone our message element, and create a new one, and set its repeat
  15717. and ignored count.
  15718. (WebInspector.LogManager.prototype.repeatCountWasInterrupted): Set the flag indicating our repeat count
  15719. was interrupted.
  15720. (WebInspector.LogManager.prototype._addMessage): Add the message to our list of messages, set it as our
  15721. previous message, and fire our event.
  15722. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15723. Update the disabled and inactive state of breakpoints in the TextEditor gutter as they change.
  15724. Part of: <rdar://problem/10318777>
  15725. Reviewed by Joseph Pecoraro.
  15726. * UserInterface/TextEditor.js:
  15727. (WebInspector.TextEditor.prototype.setBreakpointInfoForLine): Added.
  15728. * UserInterface/TextResourceContentView.js:
  15729. (WebInspector.TextResourceContentView): Added event listeners for DisabledStateDidChange and InactiveStateDidChange.
  15730. (WebInspector.TextResourceContentView.prototype.closed): Removed the added event listeners.
  15731. (WebInspector.TextResourceContentView.prototype._updateBreakpointStatus): Added. Calls setBreakpointInfoForLine.
  15732. 2012-03-08 Timothy Hatcher <timothy@apple.com>
  15733. Show the status of each breakpoint in the Breakpoint sidebar. Also update the title when the line number changes.
  15734. Clicking the breakpoint image will toggle the disabled state.
  15735. Part of: <rdar://problem/10318777>
  15736. Reviewed by Joseph Pecoraro.
  15737. * UserInterface/Breakpoint.js:
  15738. * UserInterface/BreakpointTreeElement.css: Added.
  15739. (.item.breakpoint .status > .status-image):
  15740. (.item.breakpoint .status > .status-image.inactive):
  15741. (.item.breakpoint .status > .status-image.disabled):
  15742. * UserInterface/BreakpointTreeElement.js:
  15743. (WebInspector.BreakpointTreeElement):
  15744. (WebInspector.BreakpointTreeElement.prototype._updateMainTitle): Added.
  15745. (WebInspector.BreakpointTreeElement.prototype._updateStatus): Added.
  15746. (WebInspector.BreakpointTreeElement.prototype._statusImageElementMouseDown): Added
  15747. (WebInspector.BreakpointTreeElement.prototype._statusImageElementClicked): Added
  15748. * UserInterface/Images/BreakpointButton.pdf: Added.
  15749. * UserInterface/Images/BreakpointInactiveButton.pdf: Added.
  15750. * UserInterface/Main.html: Included BreakpointTreeElement.css.
  15751. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15752. Fix the AttributedString prototype chain.
  15753. Reviewed by Brian Weinstein.
  15754. * UserInterface/AttributedString.js: Set the AttributedString prototype instead of the SourceTokenizer prototype.
  15755. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15756. Make selecting a breakpoint in the sidebar show the resource and reveal the line.
  15757. Part of: <rdar://problem/10318777>
  15758. Reviewed by Brian Weinstein and Joseph Pecoraro.
  15759. * UserInterface/BreakpointSidebarPanel.js:
  15760. (WebInspector.BreakpointSidebarPanel): Set onselect to _treeElementSelected.
  15761. (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Added.
  15762. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15763. Populate the Breakpoint sidebar with breakpoints.
  15764. Part of: <rdar://problem/10318777>
  15765. Reviewed by Brian Weinstein.
  15766. * Localizations/en.lproj/localizedStrings.js: Updated.
  15767. * UserInterface/BreakpointIcons.css: Added.
  15768. (.breakpoint-generic-line-icon .icon):
  15769. * UserInterface/BreakpointSidebarPanel.js:
  15770. (WebInspector.BreakpointSidebarPanel):
  15771. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Added. Helper.
  15772. (WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForResource): Added. Helper.
  15773. (WebInspector.BreakpointSidebarPanel.prototype._resourceAdded): Added. Call _addBreakpointsForResource.
  15774. (WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Added. Call _addBreakpointsForResource.
  15775. (WebInspector.BreakpointSidebarPanel.prototype._breakpointAdded): Added. Call _addBreakpoint.
  15776. (WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Added. Remove the breakpoint, and resource
  15777. if that was the last breakpoint.
  15778. (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources):
  15779. (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources.delayedWork): Check for detached resources
  15780. and remove them from the tree.
  15781. * UserInterface/BreakpointTreeElement.js: Added.
  15782. (WebInspector.BreakpointTreeElement):
  15783. (WebInspector.BreakpointTreeElement.prototype.get breakpoint):
  15784. * UserInterface/Main.html: Included BreakpointTreeElement.js and BreakpointIcons.css.
  15785. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15786. Rename ResourceSearchMatch.pdf to ResultLine.pdf to be more generic so it can be used by the Breakpoint sidebar.
  15787. Part of: <rdar://problem/10318777>
  15788. Reviewed by Brian Weinstein.
  15789. * UserInterface/Images/ResultLine.pdf: Renamed from WebInspector/UserInterface/Images/ResourceSearchMatch.pdf.
  15790. * UserInterface/SearchIcons.css:
  15791. (.resource-match-icon .icon): Use ResultLine.pdf.
  15792. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15793. Persist breakpoints between sessions.
  15794. Part of: <rdar://problem/10318770&10318777>
  15795. Reviewed by Brian Weinstein and Joseph Pecoraro.
  15796. * UserInterface/Breakpoint.js:
  15797. (WebInspector.Breakpoint): Support taking an info object or url. Make inactive default to true.
  15798. The backend will later mark them as active once they are resolved.
  15799. (WebInspector.Breakpoint.prototype.get info): Added. Returns an object to store.
  15800. * UserInterface/DebuggerManager.js:
  15801. (WebInspector.DebuggerManager): Iterate over the info objects in the setting and make breakpoints.
  15802. (WebInspector.DebuggerManager.prototype.addBreakpoint): Return early if null.
  15803. (WebInspector.DebuggerManager.prototype.removeBreakpoint): Ditto.
  15804. (WebInspector.DebuggerManager.prototype._inspectorClosing): Added. Call _saveBreakpoints.
  15805. (WebInspector.DebuggerManager.prototype._saveBreakpoints): Added. Make an array of info objects
  15806. and save them in the setting.
  15807. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15808. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15809. Bring the padding down to 1px for both sides of the timeline graph.
  15810. This makes the percent widths a little more accurate and matches
  15811. the padding on the timeline overview.
  15812. Reviewed by Timothy Hatcher.
  15813. * UserInterface/TimelinesContentView.css:
  15814. (.content-view.timelines > .data-grid td.timeline-column):
  15815. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15816. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15817. Dynamically determine the width of the localized string
  15818. with similar table heading styles.
  15819. Reviewed by Timothy Hatcher.
  15820. * UserInterface/NetworkDataGrid.js:
  15821. (WebInspector.NetworkDataGrid.prototype._localizedTimelineHeaderWidth):
  15822. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15823. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15824. Improve the header display to only show dividers within the visible range.
  15825. Now, when we show dividers in that range, the first divider always has a left
  15826. border, and the last divider only does when that column is not the active sort.
  15827. Reviewed by Timothy Hatcher.
  15828. * UserInterface/NetworkDataGrid.css:
  15829. (.network-timeline-decorations > .header > .divider:last-child):
  15830. (.network-timeline-decorations:not(.sort-active) > .header > .divider:last-child):
  15831. * UserInterface/NetworkDataGrid.js:
  15832. (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
  15833. * UserInterface/TimelineDecorations.js:
  15834. (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
  15835. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15836. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15837. Changing the sort column might not be enough of a size difference to
  15838. cause the headers to refresh. Force a refresh in this case.
  15839. Reviewed by Timothy Hatcher.
  15840. * UserInterface/NetworkDataGrid.js:
  15841. (WebInspector.NetworkDataGrid.prototype._sortChanged):
  15842. (WebInspector.NetworkDataGrid.prototype._updateDecorations):
  15843. (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
  15844. * UserInterface/TimelineDecorations.js:
  15845. (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
  15846. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15847. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15848. The NetworkDataGrid's timeline graph should only show header
  15849. values when its "details" columns are collapsed. Give
  15850. TimelineDecorations a way to hide header times.
  15851. Reviewed by Timothy Hatcher.
  15852. * UserInterface/NetworkDataGrid.js:
  15853. (WebInspector.NetworkDataGrid):
  15854. (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
  15855. Hide / show the header dividers when columns are collapsed / expanded.
  15856. * UserInterface/TimelineDecorations.js:
  15857. (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
  15858. (WebInspector.TimelineDecorations.prototype.isShowingHeaderDividers):
  15859. (WebInspector.TimelineDecorations.prototype.showHeaderDividers):
  15860. (WebInspector.TimelineDecorations.prototype.hideHeaderDividers):
  15861. Hide / show the header dividers by applying the "hidden" class to the headerElement.
  15862. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15863. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15864. Give the NetworkDataGrid timeline TimelineDecorations. We want to
  15865. make sure that the header labels don't overlap the column header
  15866. "Timeline" on the left or sort / collapse columns button on the right.
  15867. Reviewed by Timothy Hatcher.
  15868. * UserInterface/DataGrid.js:
  15869. (WebInspector.DataGrid.prototype._clickInHeaderCell):
  15870. (WebInspector.DataGrid.prototype._sortChanged):
  15871. (WebInspector.DataGrid.prototype.isColumnSortColumn):
  15872. Expose a way for a subclass to act on sort changes and check
  15873. if a column is the active sort column.
  15874. * UserInterface/Main.html:
  15875. * UserInterface/NetworkDataGrid.css: Added.
  15876. (.network-timeline-decorations):
  15877. (.network-timeline-decorations > .header):
  15878. Give the network timeline decorations some specific styles because
  15879. JavaScript will have to position the decorations.
  15880. * UserInterface/NetworkDataGrid.js:
  15881. (WebInspector.NetworkDataGrid):
  15882. (WebInspector.NetworkDataGrid.prototype.reset):
  15883. (WebInspector.NetworkDataGrid.prototype.update):
  15884. (WebInspector.NetworkDataGrid.prototype.updateWidths):
  15885. (WebInspector.NetworkDataGrid.prototype._sortChanged):
  15886. Update the timeline decorations whenever widths change or content changes.
  15887. (WebInspector.NetworkDataGrid.prototype._localizedTimelineHeaderWidth):
  15888. (WebInspector.NetworkDataGrid.prototype._updateDecorations):
  15889. (WebInspector.NetworkDataGrid.prototype._updateDecorationsPosition):
  15890. (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
  15891. Position the header decorations over the timeline columns, and update the
  15892. header times using our current calculator's bounds.
  15893. * UserInterface/TimelineDecorations.css:
  15894. (.timeline-decorations):
  15895. Allow clicking through all decorations, they are simply overlays.
  15896. * UserInterface/TimelineDecorations.js:
  15897. (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
  15898. Adjust for a left / right padding in which we won't let labels overflow into.
  15899. This can be improved further by packing the labels just into the visible area.
  15900. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15901. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15902. Make the timeline data grids share a common base class so we don't need
  15903. to check for functions before calling them. Only the NetworkDataGrid
  15904. has a graph right now and needs extra calls, other others are empty.
  15905. Reviewed by Timothy Hatcher.
  15906. * UserInterface/TimelinesContentView.js:
  15907. (WebInspector.TimelinesContentView):
  15908. (WebInspector.TimelinesContentView.prototype._recordingStarted):
  15909. (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
  15910. (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecords):
  15911. No need to check if the DataGrid implements a function now.
  15912. Also call update on the datagrid after we update records.
  15913. * UserInterface/TimelineDataGrid.js: Added.
  15914. (WebInspector.TimelineDataGrid):
  15915. (WebInspector.TimelineDataGrid.prototype.constructor.WebInspector.TimelinesDataGrid.get currentCalculator):
  15916. (WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithRecord):
  15917. (WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithDataGridNode):
  15918. (WebInspector.TimelineDataGrid.prototype.reset):
  15919. (WebInspector.TimelineDataGrid.prototype.update):
  15920. Shared base class interface.
  15921. * UserInterface/NetworkDataGrid.js:
  15922. (WebInspector.NetworkDataGrid):
  15923. Extend from TimelineDataGrid instead of DataGrid directly.
  15924. 2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
  15925. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  15926. Refactor the display of timeline headers into a separate file.
  15927. This currently handles drawing the header dividers, but will
  15928. also manage event markers (DOMContent and onload events).
  15929. Reviewed by Timothy Hatcher.
  15930. * UserInterface/Main.html:
  15931. * UserInterface/TimelineOverview.css:
  15932. * UserInterface/TimelineDecorations.css: Added.
  15933. (.timeline-decorations):
  15934. (.timeline-decorations > .header):
  15935. (.timeline-decorations > .header > .divider):
  15936. (.timeline-decorations > .header > .divider:last-child):
  15937. (.timeline-decorations > .header > .divider > .label):
  15938. (.timeline-decorations > .header > .divider:first-child > .label):
  15939. Move timeline-overview header styles to timeline-decorations header styles.
  15940. * UserInterface/TimelineDecorations.js: Added.
  15941. (WebInspector.TimelineDecorations):
  15942. (WebInspector.TimelineDecorations.prototype.constructor.WebInspector.TimelineDecorations.get element):
  15943. (WebInspector.TimelineDecorations.prototype.get headerElement):
  15944. (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
  15945. Manage the header and dividers.
  15946. * UserInterface/TimelineOverview.js:
  15947. (WebInspector.TimelineOverview):
  15948. (WebInspector.TimelineOverview.prototype.clear):
  15949. (WebInspector.TimelineOverview.prototype.update):
  15950. (WebInspector.TimelineOverview.prototype.updateLayout):
  15951. User the decorations class to draw headers over the timeline.
  15952. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15953. Install the Web Inspector user interface files in Production builds again.
  15954. <rdar://problem/10957655>
  15955. Reviewed by Joseph Pecoraro.
  15956. * Scripts/copy-user-interface-resources.sh: Removed early exit and FIXME comment.
  15957. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15958. Implement the TextEditor breakpoint delegates in WebInspector.TextResourceContentView.
  15959. Part of: <rdar://problem/10318770&10318777>
  15960. Reviewed by Brian Weinstein.
  15961. * UserInterface/TextResourceContentView.js:
  15962. (WebInspector.TextResourceContentView.prototype.contentAvailable): Populate the breakpoint
  15963. map by asking the DebuggerManager for all the breakpoints for this URL.
  15964. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointInfo): Added.
  15965. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded): Added.
  15966. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointRemoved): Added.
  15967. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointMoved): Added.
  15968. (WebInspector.TextResourceContentView.prototype.textEditorBreakpointToggled): Added.
  15969. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15970. Add the start of WebInspector.DebuggerManager.
  15971. Part of: <rdar://problem/10318770&10318777>
  15972. Reviewed by Brian Weinstein.
  15973. * UserInterface/DebuggerManager.js: Added.
  15974. (WebInspector.DebuggerManager):
  15975. (WebInspector.DebuggerManager.prototype.get breakpoints):
  15976. (WebInspector.DebuggerManager.prototype.breakpointsForURL):
  15977. (WebInspector.DebuggerManager.prototype.addBreakpoint):
  15978. (WebInspector.DebuggerManager.prototype.removeBreakpoint):
  15979. * UserInterface/Main.html: Incldued DebuggerManager.js.
  15980. * UserInterface/Main.js:
  15981. (WebInspector.contentLoaded): Create an instance of WebInspector.DebuggerManager.
  15982. 2012-03-07 Timothy Hatcher <timothy@apple.com>
  15983. Add WebInspector.Breakpoint.
  15984. Part of: <rdar://problem/10318770&10318777>
  15985. Reviewed by Joseph Pecoraro.
  15986. * UserInterface/Breakpoint.js: Added.
  15987. (WebInspector.Breakpoint):
  15988. (WebInspector.Breakpoint.prototype.get url):
  15989. (WebInspector.Breakpoint.prototype.get lineNumber):
  15990. (WebInspector.Breakpoint.prototype.set lineNumber):
  15991. (WebInspector.Breakpoint.prototype.get inactive):
  15992. (WebInspector.Breakpoint.prototype.set inactive):
  15993. (WebInspector.Breakpoint.prototype.get disabled):
  15994. (WebInspector.Breakpoint.prototype.set disabled):
  15995. * UserInterface/Main.html: Included Breakpoint.js.
  15996. 2012-03-06 Timothy Hatcher <timothy@apple.com>
  15997. Support dragging breakpoints to move them to a new line or to delete them.
  15998. Part of: <rdar://problem/10318770&10318777>
  15999. Reviewed by Joseph Pecoraro.
  16000. * UserInterface/TextEditor.js:
  16001. (WebInspector.TextEditor):
  16002. (WebInspector.TextEditor.prototype._gutterElementMouseDown): Add a new breakpoint
  16003. if the target does not already have one. Otherwise start tracking the existing
  16004. breakpoint for dragging.
  16005. (WebInspector.TextEditor.prototype._documentMouseMoved): Added.
  16006. (WebInspector.TextEditor.prototype._documentMouseUp): Added.
  16007. (WebInspector.TextEditor.prototype._gutterElementMouseUp): Only toggle on mouse up.
  16008. 2012-03-06 Timothy Hatcher <timothy@apple.com>
  16009. Make clicking on the line gutter create and toggle breakpoints.
  16010. Part of: <rdar://problem/10318770&10318777>
  16011. Reviewed by Joseph Pecoraro.
  16012. * UserInterface/TextEditor.js:
  16013. (WebInspector.TextEditor): Added mouseup event listener.
  16014. (WebInspector.TextEditor.prototype._gutterElementMouseUp): Added. Notifies the delegate to add
  16015. or toggle a breakpoint when a line number if clicked.
  16016. 2012-03-06 Timothy Hatcher <timothy@apple.com>
  16017. Add initial support for displaying breakpoints.
  16018. Part of: <rdar://problem/10318770&10318777>
  16019. Reviewed by Joseph Pecoraro.
  16020. * UserInterface/Images/Breakpoint.png: Added.
  16021. * UserInterface/Images/Breakpoint@2x.png: Added.
  16022. * UserInterface/Images/BreakpointInactive.png: Added.
  16023. * UserInterface/Images/BreakpointInactive@2x.png: Added.
  16024. * UserInterface/TextEditor.css:
  16025. (.text-editor > .gutter):
  16026. (.text-editor > .gutter > .line-number.has-breakpoint):
  16027. (.text-editor > .gutter > .line-number.has-breakpoint > .text):
  16028. (.text-editor > .gutter > .line-number.has-breakpoint.breakpoint-disabled > .text):
  16029. (.text-editor > .gutter > .line-number > .breakpoint):
  16030. (.text-editor > .gutter > .line-number.breakpoint-inactive > .breakpoint):
  16031. * UserInterface/TextEditor.js:
  16032. (WebInspector.TextEditor.prototype._updateLineNumbers): Call _addBreakpointElementToLineElementWithInfo
  16033. and _removePossibleBreakpointElementFromLineElement depending on the delegate result.
  16034. (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Added.
  16035. (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Added.
  16036. 2012-03-06 Mark Rowe <mrowe@apple.com>
  16037. <rdar://problem/10873285> Make WebInspector.framework work with staged frameworks
  16038. Install WebInspector.framework in /System/Library/StagedFrameworks/Safari when USE_STAGING_INSTALL_PATH is set to YES.
  16039. Reviewed by Dan Bernstein.
  16040. * Configurations/WebInspectorFramework.xcconfig:
  16041. 2012-03-06 Joseph Pecoraro <pecoraro@apple.com>
  16042. Share duplicated code to get a display name for a node.
  16043. Reviewed by Timothy Hatcher.
  16044. * UserInterface/DOMTreeElementPathComponent.js:
  16045. (WebInspector.DOMTreeElementPathComponent):
  16046. * UserInterface/DOMUtilities.js:
  16047. (WebInspector.displayNameForNode):
  16048. * UserInterface/Main.html:
  16049. 2012-03-06 Joseph Pecoraro <pecoraro@apple.com>
  16050. <rdar://problem/10989550> Inspector should hide docking button when undocked and not allowed to dock (78575)
  16051. Reviewed by Timothy Hatcher.
  16052. * UserInterface/ButtonNavigationItem.js:
  16053. (WebInspector.ButtonNavigationItem.prototype.get hidden):
  16054. (WebInspector.ButtonNavigationItem.prototype.set hidden):
  16055. Allow a button navigation item to be hidden.
  16056. * UserInterface/InspectorFrontendAPI.js:
  16057. (InspectorFrontendAPI.setDockingAvailable):
  16058. * UserInterface/Main.js:
  16059. (WebInspector.contentLoaded):
  16060. (WebInspector.updateDockedState):
  16061. (WebInspector.setDockingAvailable):
  16062. (WebInspector._updateDockToggleButtonVisibility):
  16063. Update the dock toggle button's visibility when it is created,
  16064. when the attached state changes, or when availability changes.
  16065. 2012-03-05 Timothy Hatcher <timothy@apple.com>
  16066. Add WebInspector.BreakpointSidebarPanel and WebInspector.DebugSidebarPanel.
  16067. Start of: <rdar://problem/10318770&10318777>
  16068. Reviewed by Brian Weinstein.
  16069. * UserInterface/BreakpointSidebarPanel.js: Added.
  16070. (WebInspector.BreakpointSidebarPanel):
  16071. * UserInterface/DebugSidebarPanel.js: Added.
  16072. (WebInspector.DebugSidebarPanel):
  16073. * UserInterface/Main.html: Included BreakpointSidebarPanel.js and DebugSidebarPanel.js.
  16074. * UserInterface/Main.js:
  16075. (WebInspector.contentLoaded): Use BreakpointSidebarPanel and DebugSidebarPanel classes.
  16076. 2012-03-05 Joseph Pecoraro <pecoraro@apple.com>
  16077. Follow-up and remove unnecessary outline:none from specific
  16078. data-grids now that this style is the default.
  16079. * UserInterface/ApplicationCacheFrameContentView.css:
  16080. (.content-view.application-cache-frame > .data-grid):
  16081. * UserInterface/CookieStorageContentView.css:
  16082. (.content-view.cookie-storage > .data-grid):
  16083. * UserInterface/DatabaseTableContentView.css:
  16084. (.content-view.database-table > .data-grid):
  16085. * UserInterface/DetailsSection.css:
  16086. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16087. WebSQL Database inline data grids should not have an outline
  16088. when clicked on. The data grid can keep its tabindex, but
  16089. just remove the outline when its focused.
  16090. Reviewed by Brian Weinstein.
  16091. * UserInterface/DataGrid.css:
  16092. (.data-grid):
  16093. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16094. Format the Cookie size column using standard size representations.
  16095. Reviewed by Brian Weinstein.
  16096. * UserInterface/CookieStorageContentView.js:
  16097. (WebInspector.CookieStorageContentView.prototype._rebuildTable):
  16098. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16099. <rdar://problem/10982421> Event Listeners section flashes when switching between nodes
  16100. We no longer need to resolve the node, since the Safari frontend
  16101. doesn't show an ObjectProperties tree. We already have all the
  16102. information we need in the eventListener callback. Removing this
  16103. async call removes the flashing.
  16104. Reviewed by Timothy Hatcher.
  16105. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  16106. * UserInterface/EventListenerSectionGroup.js:
  16107. (WebInspector.EventListenerSectionGroup):
  16108. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16109. We should save state the expanded/collapsed state of different event types.
  16110. Just default to having them collapsed and save the state when they are expanded.
  16111. Rubber-stamped by Timothy Hatcher.
  16112. * UserInterface/DetailsSection.js:
  16113. (WebInspector.DetailsSection):
  16114. * UserInterface/EventListenerSection.js:
  16115. (WebInspector.EventListenerSection):
  16116. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16117. Don't linkify EventListeners without a URL.
  16118. This can happen for EventListeners added through the Inspector's console.
  16119. Reviewed by Timothy Hatcher.
  16120. * UserInterface/EventListenerSectionGroup.js:
  16121. (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
  16122. 2012-03-04 Timothy Hatcher <timothy@apple.com>
  16123. Hook up the Start Timeline Recording Develop menu items.
  16124. Reviewed by Brian Weinstein.
  16125. * UserInterface/InspectorFrontendAPI.js:
  16126. (InspectorFrontendAPI.isTimelineProfilingEnabled): Return WebInspector.timelineManager.recording.
  16127. (InspectorFrontendAPI.setTimelineProfilingEnabled): Show the Instrument panel and timeline, then start recording.
  16128. * UserInterface/Main.js:
  16129. (WebInspector.contentLoaded): Only load the last content view if InspectorFrontendAPI didn't show one.
  16130. * UserInterface/TimelineManager.js:
  16131. (WebInspector.TimelineManager.prototype._mainResourceDidChange): Ignore resource events when there isn't a main frame yet.
  16132. (WebInspector.TimelineManager.prototype._resourceWasAdded): Ditto.
  16133. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16134. <rdar://problem/10981986> Back button should be enabled when link causes a switch between "DOM Tree" and "Source Code"
  16135. Update the back/forward buttons when the path components change.
  16136. Reviewed by Timothy Hatcher.
  16137. * UserInterface/ContentBrowser.js:
  16138. (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
  16139. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16140. Rename WebInspector.domAgent -> WebInspector.domTreeManager.
  16141. This code is currently unreachable.
  16142. Reviewed by Brian Weinstein and Timothy Hatcher.
  16143. * UserInterface/ObjectPropertiesSection.js:
  16144. (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
  16145. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16146. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  16147. Make node name's in the EventListener section links that jump to
  16148. that node. Also, when hovering the node it highlights on the page.
  16149. Reviewed by Timothy Hatcher.
  16150. * UserInterface/DOMUtilites.js: Added.
  16151. (WebInspector.displayNameForNode):
  16152. (WebInspector.linkifyNodeReference):
  16153. Copied from OpenSource's DOMPresentationUtils.js, updated for the new
  16154. frontend, and remove unused code.
  16155. * UserInterface/EventListenerSectionGroup.js:
  16156. (WebInspector.EventListenerSectionGroup.prototype._nodeTextOrLink):
  16157. Use the DOMUtilities method to linkify the node.
  16158. * UserInterface/Main.html:
  16159. * UserInterface/Main.css:
  16160. (.node-link):
  16161. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16162. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  16163. Add event listener information to the DOM Node Details Sidebar panel.
  16164. Reviewed by Timothy Hatcher.
  16165. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  16166. (WebInspector.DOMNodeDetailsSidebarPanel):
  16167. (WebInspector.DOMNodeDetailsSidebarPanel.prototype.constructor.WebInspector.DOMNodeDetailsSidebarPanel.refresh):
  16168. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
  16169. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
  16170. Add a new "Event Listeners" Section and refresh it when the selected node changes.
  16171. Each row in this section is an EventListenerSection.
  16172. * UserInterface/DetailsSection.css:
  16173. (.details-section .details-section > .header):
  16174. Style a nested details section to be gray.
  16175. * UserInterface/DetailsSection.js:
  16176. (WebInspector.DetailsSection):
  16177. Take an extra parameter in the Constructor to avoid saving collapsed states.
  16178. EventListener event type sections will always start out collapsed.
  16179. * UserInterface/EventListenerSection.js: Added.
  16180. (WebInspector.EventListenerSection):
  16181. (WebInspector.EventListenerSection.prototype.constructor.WebInspector.EventListenerSection.addListener):
  16182. EventListenerSection is a specific event type, and contains a group for each listener.
  16183. * UserInterface/EventListenerSectionGroup.js: Added.
  16184. (WebInspector.EventListenerSectionGroup):
  16185. (WebInspector.EventListenerSectionGroup.prototype.constructor.WebInspector.EventListenerSectionGroup.update.updateWithNodeObject):
  16186. (WebInspector.EventListenerSectionGroup.prototype.constructor.WebInspector.EventListenerSectionGroup.update):
  16187. (WebInspector.EventListenerSectionGroup.prototype._nodeTextOrLink):
  16188. (WebInspector.EventListenerSectionGroup.prototype._type):
  16189. (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
  16190. Each listener displays a few rows of information about it. Go-to arrow
  16191. links are provided to jump to the function.
  16192. * UserInterface/EventListenerSectionGroup.css: Added.
  16193. (.event-listener-section > .content > .group > .row.simple > .value .go-to-arrow):
  16194. (.event-listener-section > .content > .group > .row.simple > .value):
  16195. Style the simple row in the section to play nicely with resizing and the go-to arrow.
  16196. * Localizations/en.lproj/localizedStrings.js:
  16197. * UserInterface/Main.html:
  16198. Add new strings and files.
  16199. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16200. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  16201. Rename the DOM Node sidebar's Properties object group and make sure
  16202. to release it when its no longer needed. There will be a separate
  16203. object group for Event Listeners.
  16204. Reviewed by Timothy Hatcher.
  16205. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  16206. (WebInspector.DOMNodeDetailsSidebarPanel):
  16207. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16208. Add missing Copyright entires to the pre-built License.
  16209. Reviewed by Damian Kaleta.
  16210. * Scripts/copy-user-interface-resources.sh:
  16211. 2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
  16212. Fix outline around previously edited DOM element attribute.
  16213. When editing, the tabIndex attribute of the element is set
  16214. to 0 and restored to the old value after editing. In most cases
  16215. the previous value was unset, which returns -1. When cleaning
  16216. up elem.tabIndex = -1 was actually keeping around the tabIndex
  16217. attribute and giving the element an outline when clicked once
  16218. and receiving :focus.
  16219. Instead of restoring the tabIndex to -1, just remove the
  16220. tabIndex attribute and avoid its associated focus behavior.
  16221. Reviewed by Timothy Hatcher.
  16222. * UserInterface/EditingSupport.js:
  16223. (WebInspector.startEditing.cleanUpAfterEditing):
  16224. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16225. Part of <rdar://problem/10981607> CSS and JavaScript profiles need a way to toggle between absolute times and percentages.
  16226. The CSS selector profile code had the ability to switch from percentages to time when the
  16227. user double clicks an element in the "Total" column.
  16228. However, we were accessing a WebInspector setting the wrong way.
  16229. Reviewed by Tim Hatcher.
  16230. * UserInterface/CSSSelectorProfileView.js:
  16231. (WebInspector.CSSSelectorProfileView.prototype._mouseDownInDataGrid): Access the WebInspector setting the right way.
  16232. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16233. Have ConsoleMessageImpl and ProfileDataGridTree use WebInspector.linkifyURLAsNode instead of
  16234. using their own custom code to do the same thing.
  16235. Reviewed by Tim Hatcher.
  16236. * UserInterface/ConsoleMessageImpl.js:
  16237. (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Call WebInspector.linkifyURLAsNode.
  16238. * UserInterface/ProfileDataGridTree.js:
  16239. (WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Ditto.
  16240. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16241. Hook up the links in the CSS selector profile view.
  16242. Rest of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
  16243. Reviewed by Tim Hatcher.
  16244. * UserInterface/CSSSelectorProfileView.js:
  16245. (WebInspector.CSSSelectorDataGridNode.prototype.createCell): Pass the line number to WebInspector.linkifyURLAsNode.
  16246. (WebInspector.CSSSelectorProfileView): Add a click event listener.
  16247. (WebInspector.CSSSelectorProfileView.prototype._mouseWasClicked): Call WebInspector.openURL on the clicked link.
  16248. * UserInterface/Main.js:
  16249. (WebInspector.linkifyURLAsNode): Set the link's lineNumber property to be the passed in line number.
  16250. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16251. Make the columns in all DataGrids resizable.
  16252. This fixes:
  16253. - JavaScript profile views
  16254. - CSS selector profile views
  16255. - Application cache views.
  16256. Reviewed by Tim Hatcher.
  16257. * UserInterface/ApplicationCacheFrameContentView.js:
  16258. (WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout):
  16259. * UserInterface/CSSSelectorProfileView.js:
  16260. (WebInspector.CSSSelectorProfileView.prototype.updateLayout):
  16261. * UserInterface/JavaScriptProfileView.js:
  16262. (WebInspector.JavaScriptProfileView.prototype.updateLayout):
  16263. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16264. Rename some functions to make them more clear that they are for JavaScript.
  16265. Reviewed by Tim Hatcher.
  16266. * UserInterface/ProfileManager.js:
  16267. (WebInspector.ProfileManager.prototype.addJavaScriptProfile): Renamed from addProfile.
  16268. (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile): Renamed from setRecordingProfile.
  16269. * UserInterface/ProfilerObserver.js:
  16270. (WebInspector.ProfilerObserver.prototype.addProfileHeader): Update for naming.
  16271. (WebInspector.ProfilerObserver.prototype.setRecordingProfile): Ditto.
  16272. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16273. Implement the recording of CSS selector profiles, and have them show up in the inspector and be
  16274. selectable.
  16275. There are a few loose ends to clean up after this patch.
  16276. - Some renames in ProfileManager.
  16277. - Make link clicking work in CSS selector profiles.
  16278. More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
  16279. Reviewed by Tim Hatcher.
  16280. * Localizations/en.lproj/localizedStrings.js: Updated localized strings
  16281. * UserInterface/CSSSelectorProfileType.js:
  16282. (WebInspector.CSSSelectorProfileType.prototype.nextProfileId): Returns the available profile ID.
  16283. (WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile): Don't call anything in the profiles panel.
  16284. (WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile): Remove the callback that creates a profile
  16285. header.
  16286. * UserInterface/ContentView.js:
  16287. (WebInspector.ContentView): Change ProfileObject to JavaScriptProfileObject and add a case for CSSSelectorProfileObject.
  16288. (WebInspector.ContentView.isViewable): Ditto.
  16289. * UserInterface/InstrumentSidebarPanel.js:
  16290. (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedOver): Check the CSS selector case.
  16291. (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown): Ditto.
  16292. (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked): Ditto.
  16293. (WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected): Ditto.
  16294. * UserInterface/JavaScriptProfileView.js: Change the assert.
  16295. * UserInterface/Main.html: Add new files.
  16296. * UserInterface/ProfileManager.js:
  16297. (WebInspector.ProfileManager): Create a CSS selector profile type.
  16298. (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Clear the recording CSS
  16299. selector profile.
  16300. (WebInspector.ProfileManager.prototype.isProfilingCSSSelectors): Returns whether or not we are recording a CSS selector
  16301. profile.
  16302. (WebInspector.ProfileManager.prototype.startProfilingCSSSelectors): Start recording a CSS selector profile, and create
  16303. a WebInspector.CSSSelectorProfileObject, and send an event to tell the instrument sidebar panel about it.
  16304. (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors): Stop recording the CSS selector profile, and in the
  16305. callback for when the profile finished, update the information about the CSS selector profile and tell the instrument
  16306. sidebar that the profile was updated.
  16307. (WebInspector.ProfileManager.prototype.addProfile): Create a JavaScriptProfileObject instead of a ProfileObject.
  16308. (WebInspector.ProfileManager.prototype.setRecordingProfile): Ditto.
  16309. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16310. Add subclasses of ProfileObject for CSS Selector profile and JavaScript profiles. They are not used anywhere,
  16311. but they will be to be able to differentiate between the two types of profiles.
  16312. It also gives us a way to store the CSS selector profile data on the CSSSelectorProfileObject.
  16313. Reviewed by Tim Hatcher.
  16314. * UserInterface/CSSSelectorProfileObject.js: Added.
  16315. (WebInspector.CSSSelectorProfileObject):
  16316. (WebInspector.CSSSelectorProfileObject.prototype.constructor.WebInspector.CSSSelectorProfileObject.get data): Returns
  16317. the data.
  16318. (WebInspector.CSSSelectorProfileObject.prototype.set data): Sets the data.
  16319. (WebInspector.CSSSelectorProfileObject.prototype.get totalTime): Returns the total time.
  16320. (WebInspector.CSSSelectorProfileObject.prototype.set totalTime): Sets the total time.
  16321. * UserInterface/JavaScriptProfileObject.js: Added.
  16322. (WebInspector.JavaScriptProfileObject):
  16323. * UserInterface/Main.html: Add new files
  16324. 2012-03-04 Brian Weinstein <bweinstein@apple.com>
  16325. Fix some issues in CSSSelectorProfileView.js to get it running with the new inspector.
  16326. This patch changes the superclass from View -> ContentView, removes instances of the percent button,
  16327. and changes *styleClass -> classList.*.
  16328. More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
  16329. Reviewed by Tim Hatcher.
  16330. * UserInterface/CSSSelectorProfileView.js:
  16331. (WebInspector.CSSSelectorDataGridNode.prototype.get data): Switch the format of a setting.
  16332. (WebInspector.CSSSelectorDataGridNode.prototype.createCell): Use linkifyURLAsNode instead of
  16333. linkifyResourceAsNode (which we don't have).
  16334. (WebInspector.CSSSelectorProfileView): Add an assert, change our superclass type, update the
  16335. setting syntax, and call updateWidths on the data grid.
  16336. (WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents): Use classList.contains.
  16337. 2012-03-02 Brian Weinstein <bweinstein@apple.com>
  16338. Bring in some files from open source.
  16339. More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
  16340. Rubber-stamped by Jing Jin.
  16341. * UserInterface/CSSSelectorProfileType.js: Added. Moved from CSSSelectorProfileView.js to its own file.
  16342. * UserInterface/CSSSelectorProfileView.js: Added. Copied from open source.
  16343. 2012-03-02 Brian Weinstein <bweinstein@apple.com>
  16344. Turn the glyph that starts profiles in the inspector into a select with two options.
  16345. - Start JavaScript Profiling
  16346. - Start CSS Profiling
  16347. JavaScript profiling uses the same codepath as before, and CSS profiling isn't hooked up
  16348. yet, but will be in future patches.
  16349. Start of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
  16350. Reviewed by Tim Hatcher.
  16351. * Localizations/en.lproj/localizedStrings.js: Update localized strings.
  16352. * UserInterface/InstrumentSidebarPanel.css:
  16353. (.sidebar > .panel.instrument > .title-bar > .record-glyph): Add some additional rules so
  16354. this style works for a select and a div.
  16355. * UserInterface/InstrumentSidebarPanel.js:
  16356. (WebInspector.InstrumentSidebarPanel): Change _recordProfileGlyphElement to a select, and add
  16357. options to it.
  16358. (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown): Clear any selection
  16359. the select might have had, and prevent opening the select if we are stopping a profile.
  16360. (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked): Return early if we are
  16361. ignoring this click.
  16362. (WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected): Start a JavaScript profile
  16363. if that was the user's selection, and add a FIXME for starting a CSS profile.
  16364. 2012-03-04 Timothy Hatcher <timothy@apple.com>
  16365. Strike out all properties that did not parse correctly.
  16366. The broken case is if you use: background: -webkit-linear-gradient(...);
  16367. and background: -moz-linear-gradient(...) in the same rule. Before they
  16368. would both be shown normal (except for the warning icon on the -moz line),
  16369. now the -moz property is also striked out.
  16370. Reviewed by Brian Weinstein.
  16371. * UserInterface/CSSStyleDetailsSidebarPanel.css: Added not-parsed-ok to the
  16372. rule that adds text-decoration: line-through to properties.
  16373. 2012-03-04 Timothy Hatcher <timothy@apple.com>
  16374. Syntax highlight values in the Style details sidebar.
  16375. Reviewed by Brian Weinstein.
  16376. * UserInterface/StylePropertyTreeElement.js:
  16377. (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Call numberProcessor instead
  16378. of directly making text nodes for unknown colors and color values.
  16379. (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processKeyword): Added.
  16380. (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processSimpleSyntax): Added.
  16381. (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Add new processors for strings, numbers, and keywords.
  16382. 2012-03-03 Brian Weinstein <bweinstein@apple.com>
  16383. <rdar://problem/10977869> Profile Link in Log View doesn't jump to Profile in Instruments View.
  16384. Give WebInspector.openURL the ability to open URLs with the webkit-profile scheme.
  16385. Reviewed by Tim Hatcher.
  16386. * UserInterface/InstrumentSidebarPanel.js:
  16387. (WebInspector.InstrumentSidebarPanel.prototype.showProfile): Look over the tree elements for one with
  16388. a profile with the matching title and type, and show it.
  16389. * UserInterface/Main.js:
  16390. (WebInspector.openURL): If the URL has the webkit-profile scheme, call InstrumentSidebarPanel.showProfile.
  16391. * UserInterface/ProfileType.js: Add a constant for "webkit-profile".
  16392. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16393. Hide the DOM node highlight when the DOM tree content view is hidden.
  16394. Reviewed by Dan Bernstein.
  16395. * UserInterface/DOMTreeContentView.js:
  16396. (WebInspector.DOMTreeContentView.prototype.hidden): Call WebInspector.domTreeManager.hideDOMNodeHighlight().
  16397. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16398. Reduce flashing in the details sidebar when switching content views.
  16399. This makes sure to fire the represented objects did change event immediately after the content
  16400. view changes so the sidebar updates at the same time as the content view. This is especially important
  16401. if the sidebar is auto showing or hiding.
  16402. Reviewed by Dan Bernstein.
  16403. * UserInterface/ContentBrowser.js:
  16404. (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon):
  16405. Use _dispatchCurrentRepresentedObjectsDidChangeEvent instead of a nested function.
  16406. (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Added.
  16407. Clears the timeout if there is one pending.
  16408. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _dispatchCurrentRepresentedObjectsDidChangeEvent
  16409. instead of _dispatchCurrentRepresentedObjectsDidChangeEventSoon.
  16410. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16411. Auto hide the details sidebar when empty if the user closed it when empty.
  16412. The details sidebar will show again when switching to a content view that has sidebar panels to show.
  16413. If the user shows the sidebar when empty it will not auto hide anymore. If the user hides the sidebar
  16414. when it isn't empty it will stay hidden until manually shown.
  16415. Reviewed by Dan Bernstein.
  16416. * UserInterface/Main.js:
  16417. (WebInspector.contentLoaded): Added setting.
  16418. (WebInspector._sidebarCollapsedStateDidChange): Update setting based on collapsed state and sidebar panel count.
  16419. (WebInspector._contentBrowserRepresentedObjectsDidChange): Show or hide the details sidebar when the sidebar
  16420. panel count changes.
  16421. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16422. Add the "Show All" checkbox to the Computed Style section header.
  16423. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16424. Reviewed by Brian Weinstein.
  16425. * Localizations/en.lproj/localizedStrings.js: Updated.
  16426. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  16427. (.sidebar > .panel.details.css-style .styles-section .properties li): Clean up to better align the text.
  16428. (.sidebar > .panel.details.css-style .styles-section.read-only .properties > li): Ditto.
  16429. (.sidebar > .panel.details.css-style .styles-section.computed-style .properties .inherited): Fixed to work.
  16430. (.sidebar > .panel.details.css-style .details-section.show-all .styles-section.computed-style .properties .inherited): Ditto.
  16431. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16432. (WebInspector.CSSStyleDetailsSidebarPanel): Create the checkbox and label.
  16433. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._computedStyleShowAllCheckboxValueChanged): Added. Toggle the setting
  16434. and show-all class on the computed style section.
  16435. * UserInterface/DetailsSection.css:
  16436. (.details-section > .header:not(.mouse-over-options-element):active::before): Don't show active if the options element is.
  16437. (.details-section.collapsed > .header:not(.mouse-over-options-element):active::before): Ditto.
  16438. (.details-section > .header > label): Added. Generic support for a label and checkbox.
  16439. (.details-section.collapsed > .header > label): Ditto.
  16440. (.details-section > .header > label > input[type="checkbox"]): Ditto.
  16441. * UserInterface/DetailsSection.js:
  16442. (WebInspector.DetailsSection): Make a title element span so it can be updated separately. Append the options element.
  16443. (WebInspector.DetailsSection.prototype.get title): Use the title element.
  16444. (WebInspector.DetailsSection.prototype.set title): Ditto.
  16445. (WebInspector.DetailsSection.prototype._headerElementClicked): Return early if it is within the options element.
  16446. (WebInspector.DetailsSection.prototype._optionsElementMouseDown): Added. Add the mouse-over-options-element class.
  16447. (WebInspector.DetailsSection.prototype._optionsElementMouseUp): Added. Remove the mouse-over-options-element class.
  16448. 2012-03-03 Brian Weinstein <bweinstein@apple.com>
  16449. <rdar://problem/10979339> Links in Log and Profile content views don't take you to the correct line
  16450. r41258 added the ability to jump to a certain line number when opening a resource
  16451. in the inspector by setting the lineNumber property on the link element that will
  16452. be clicked.
  16453. Adopt this for JavaScript profiles and the Log content view.
  16454. Reviewed by Tim Hatcher.
  16455. * UserInterface/ConsoleMessageImpl.js:
  16456. (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Set the line number of the link
  16457. element.
  16458. * UserInterface/JavaScriptProfileView.js:
  16459. (WebInspector.JavaScriptProfileView): Add a mouse listener.
  16460. (WebInspector.JavaScriptProfileView.prototype._mouseWasClicked): Call WebInspector.openURL.
  16461. * UserInterface/LogContentView.js:
  16462. (WebInspector.LogContentView.prototype._mouseWasClicked): Get the line number from the link
  16463. element and pass that line number to WebInspector.openURL.
  16464. * UserInterface/ProfileDataGridTree.js:
  16465. (WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Set the line number of the
  16466. link element.
  16467. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16468. Make $0..$9 work in the new Web Inspector's console.
  16469. Reviewed by Joseph Pecoraro.
  16470. * UserInterface/DOMTreeContentView.js:
  16471. (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Call ConsoleAgent.addInspectedNode
  16472. when the selected DOM node changes.
  16473. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16474. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16475. When we need to refresh all of the rows, we need to make a copy of the
  16476. children array, because the children array gets resorted as the rows
  16477. are updated.
  16478. Reviewed by Timothy Hatcher.
  16479. * UserInterface/TimelinesContentView.js:
  16480. (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
  16481. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16482. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16483. Tweak to prevent hiding a few of the rows on either end of the
  16484. visible bounds. This makes scrolling feel a little bit nicer.
  16485. Reviewed by Timothy Hatcher.
  16486. * UserInterface/TimelinesContentView.js:
  16487. (WebInspector.TimelinesContentView.prototype._updateOffscreenRows):
  16488. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16489. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16490. Style the collapse-button and divider.
  16491. Reviewed by Timothy Hatcher.
  16492. * UserInterface/DataGrid.css:
  16493. (.data-grid th.sortable:not(.mouse-over-collapser):active):
  16494. (.data-grid th.sortable.sort-ascending:not(.mouse-over-collapser):active, .data-grid th.sortable.sort-descending:not(.mouse-over-collapser):active):
  16495. When the collapse-button is moused over, we shouldn't apply the :active
  16496. style to the entire table header cell when its clicked, because the
  16497. user will be clicking on the collapser-button.
  16498. * UserInterface/TimelinesContentView.css:
  16499. (.content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
  16500. (.content-view.timelines > .data-grid th.collapser):
  16501. (.content-view.timelines > .data-grid th.collapser > .divider):
  16502. (.content-view.timelines > .data-grid th.collapser > .collapser-button):
  16503. (.content-view.timelines > .data-grid th.collapser > .collapser-button:active):
  16504. (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button):
  16505. (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button:active):
  16506. (.content-view.timelines > .data-grid th.sort-descending.collapser > div:first-child):
  16507. Style the button to the far right. Adjust the sort indicator
  16508. to be the left of the collapse-button and divider.
  16509. * UserInterface/TimelinesContentView.js:
  16510. (WebInspector.TimelinesContentView):
  16511. (WebInspector.TimelinesContentView.generateEmbossedCollapseImages.canvasIdentifier):
  16512. (WebInspector.TimelinesContentView.generateEmbossedCollapseImages):
  16513. Generate embossed images once for all Timeline DataGrids.
  16514. * UserInterface/DataGrid.js:
  16515. (WebInspector.DataGrid.prototype._mouseoverColumnCollapser):
  16516. (WebInspector.DataGrid.prototype._mouseoutColumnCollapser):
  16517. Add a class to the <th> so that the :active highlight won't take
  16518. affect when the user clicks the collapser button, but does when
  16519. the user clicks on the test of the header cell.
  16520. * UserInterface/ImageUtilities.js:
  16521. (generateEmbossedImages._imageLoaded):
  16522. Make the Focus state optional, and don't generate it if its not needed.
  16523. * UserInterface/Images/LessColumns.pdf: Added.
  16524. * UserInterface/Images/MoreColumns.pdf: Added.
  16525. Images added for the collapse button.
  16526. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16527. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16528. Move generating embossed canvas images into ImageUtilities so
  16529. that it can be shared with DataGrid in the next part. This turns
  16530. all self/this references into parameters.
  16531. Reviewed by Timothy Hatcher.
  16532. * UserInterface/ButtonNavigationItem.js:
  16533. (WebInspector.ButtonNavigationItem.prototype._generateImages):
  16534. * UserInterface/ImageUtilities.js:
  16535. (generateEmbossedImages._imageLoaded):
  16536. (generateEmbossedImages._createEmbossedCanvasImage):
  16537. (generateEmbossedImages._drawImageShadow):
  16538. (generateEmbossedImages._invertMaskImage):
  16539. (generateEmbossedImages._applyImageMask):
  16540. (generateEmbossedImages):
  16541. * UserInterface/Main.html:
  16542. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16543. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16544. Reviewed by Timothy Hatcher.
  16545. * UserInterface/DataGrid.css:
  16546. (.data-grid th):
  16547. When columns were collapsed down to width:0, the <th> content was overflowing.
  16548. <td> already had overflow:hidden, so this just adds it to <th>.
  16549. (.data-grid th.sort-descending > div:first-child):
  16550. (.data-grid th.sort-ascending > div:first-child::after):
  16551. (.data-grid th.sort-descending > div:first-child::after):
  16552. Now that a <th> may have multiple divs, specify that we want the
  16553. sort indicator to show up after the first <div>, before the
  16554. divider and collapse-button.
  16555. * UserInterface/DataGrid.js:
  16556. (WebInspector.DataGrid):
  16557. (WebInspector.DataGrid.prototype.updateWidths):
  16558. Move code into the block that was only used in the block.
  16559. (WebInspector.DataGrid.prototype.columnWidthsMap):
  16560. (WebInspector.DataGrid.prototype.applyColumnWidthsMap):
  16561. A brute force API to get / adjust all column widths.
  16562. (WebInspector.DataGrid.prototype._isColumnVisible):
  16563. (WebInspector.DataGrid.prototype._showColumn):
  16564. (WebInspector.DataGrid.prototype._hideColumn):
  16565. (WebInspector.DataGrid.prototype._positionResizers):
  16566. Rewrite to actually work. Setting a colgroup as hidden or display:none
  16567. was actually ignoring the colgroup alltogether, breaking the normal
  16568. colgroup[i] === column[i] relationship. Setting the width to 0 kept
  16569. the relationship, and hides the column's contents.
  16570. (WebInspector.DataGrid.prototype._clickInHeaderCell):
  16571. (WebInspector.NetworkDataGrid.prototype.willToggleColumnGroup):
  16572. (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
  16573. Handle clicks on the collapser button. Run some optional subclass
  16574. methods so state can be saved and so the column widths can be adjusted.
  16575. * UserInterface/NetworkDataGrid.js:
  16576. (WebInspector.NetworkDataGrid.prototype.willToggleColumnGroup):
  16577. (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
  16578. Handle toggling the column sizes. When collapsing, keep the "Name"
  16579. field the same width that it was. But when expanding, just relayout
  16580. back to whatever the original widths were.
  16581. * UserInterface/TimelinesContentView.js:
  16582. (WebInspector.TimelinesContentView):
  16583. Add rows to a "details" column group and specify a collapser.
  16584. * UserInterface/TimelinesContentView.css:
  16585. (.content-view.timelines > .data-grid .column-group-details):
  16586. Slightly dim the "details" column group.
  16587. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16588. Update offscreen rows after sorting.
  16589. Reviewed by Timothy Hatcher.
  16590. * UserInterface/TimelinesContentView.js:
  16591. (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid):
  16592. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16593. Sorting the Network Timeline column should sort by resource
  16594. response time, falling back to request time. Make this
  16595. the default sort for the DataGrid.
  16596. Reviewed by Timothy Hatcher.
  16597. * UserInterface/ResourceTimelineDataGridNode.js:
  16598. (WebInspector.ResourceTimelineDataGridNode.prototype.get data):
  16599. 2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
  16600. Fix the Timeline Grid sizes for the RemoteDebugger. It looks
  16601. as if this isn't needed anymore and actually displays poorly
  16602. on 10.7.3 WebKit.
  16603. Reviewed by Timothy Hatcher.
  16604. * UserInterface/TimelinesContentView.css:
  16605. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16606. Don't move to editing the next property when pressing return/enter while editing a property value.
  16607. Pressing return/enter still moves to the value when you are editing the property name. If you want
  16608. to edit the next property, that is what tab is for!
  16609. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16610. Reviewed by Brian Weinstein.
  16611. * UserInterface/StylePropertyTreeElement.js:
  16612. (WebInspector.StylePropertyTreeElement.prototype.editingNameValueKeyDown): Support a move direction of "none".
  16613. (WebInspector.StylePropertyTreeElement.prototype.selectElement.editingCommitted): Don't call the moveToNextCallback
  16614. if there is no moveDirection or moveDirection is "none".
  16615. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16616. Override TreeElement.ondblclick instead of having a separate dblclick listener in StylePropertyTreeElement.
  16617. Reviewed by Joseph Pecoraro.
  16618. * UserInterface/StylePropertyTreeElement.js:
  16619. (WebInspector.StylePropertyTreeElement.prototype.onattach): Removed dblclick event listener.
  16620. (WebInspector.StylePropertyTreeElement.prototype.ondblclick): Renamed from _startEditing.
  16621. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16622. Make URLs that go to the main resource of a frame open in the Web Inspector instead of in a new tab.
  16623. Reviewed by Joseph Pecoraro.
  16624. * UserInterface/Main.js:
  16625. (WebInspector.openURL): Check frame.mainResource.url before calling frame.resourceForURL.
  16626. 2012-03-02 Timothy Hatcher <timothy@apple.com>
  16627. Fix an error that was showing in the console and prevented revalidation of styled when DOM attributes are removed.
  16628. Reviewed by Joseph Pecoraro.
  16629. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16630. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesModified): Renamed from _attributesRemovedOrStyleInvalidated
  16631. since _attributesModified is what was registered as the event listener.
  16632. * UserInterface/Object.js:
  16633. (WebInspector.Object.addEventListener): Assert the event type and listener are not null/undefined/empty.
  16634. (WebInspector.Object.removeEventListener): Ditto.
  16635. 2012-03-03 Timothy Hatcher <timothy@apple.com>
  16636. Use a go-to arrow to link to the location of the style rule in the stylesheet resource.
  16637. The text links added a lot of clutter and often collided with the selector in bad ways.
  16638. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16639. Reviewed by Brian Weinstein.
  16640. * UserInterface/CSSStyleDetailsSidebarPanel.css:
  16641. (.sidebar > .panel.details.css-style .styles-section .go-to-arrow): Sized to fit the line. Hidden by default.
  16642. (.sidebar > .panel.details.css-style .styles-section:hover .go-to-arrow): Reveal on hover of the section.
  16643. * UserInterface/StylePropertiesSection.js:
  16644. (WebInspector.StylePropertiesSection.prototype._linkify): Create the go-to arrow instead of a text link.
  16645. 2012-03-02 Timothy Hatcher <timothy@apple.com>
  16646. Show user agent rules in a separate section called "Base Style Rules".
  16647. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16648. Reviewed by Brian Weinstein.
  16649. * Localizations/en.lproj/localizedStrings.js: Updated.
  16650. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16651. (WebInspector.CSSStyleDetailsSidebarPanel): Create the Base Style Rules section.
  16652. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups): Take an array and
  16653. return a modified version of the array instead of fixed modification of the matchedRuleGroups array.
  16654. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Update the user agent section separately.
  16655. * UserInterface/StylePropertiesSection.js:
  16656. (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Don't show an origin for user agent rules, since they are
  16657. in their own section now.
  16658. 2012-03-02 Timothy Hatcher <timothy@apple.com>
  16659. Style the Style details sidebar.
  16660. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16661. Reviewed by Brian Weinstein.
  16662. * UserInterface/CSSStyleDetailsSidebarPanel.css: Added.
  16663. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16664. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection):
  16665. Stop passing false for isFirstSection argument.
  16666. * UserInterface/ComputedStylePropertiesSection.js:
  16667. (WebInspector.ComputedStylePropertiesSection): Update className.
  16668. * UserInterface/DetailsSection.css:
  16669. * UserInterface/Main.html: Included CSSStyleDetailsSidebarPanel.css.
  16670. * UserInterface/StylePropertiesSection.js:
  16671. (WebInspector.StylePropertiesSection): Remove isFirstSection argument.
  16672. * UserInterface/StylePropertyTreeElement.js:
  16673. (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Create and append the expand element for the
  16674. disclosure triangle use for shorthands. Create an inner element for the swatch for transparent colors.
  16675. (WebInspector.StylePropertyTreeElement.prototype.restoreNameElement): Remove "webkit-" class prefix.
  16676. (WebInspector.StylePropertyTreeElement.prototype._isNameElement): Ditto.
  16677. (WebInspector.StylePropertyTreeElement.prototype._isValueElement): Ditto. Return early if it is the expand element.
  16678. (WebInspector.StylePropertyTreeElement.prototype.isEventWithinDisclosureTriangle): Added.
  16679. 2012-03-01 Timothy Hatcher <timothy@apple.com>
  16680. Show an empty content message in the Issue sidebar when there are no issues.
  16681. Reviewed by Brian Weinstein.
  16682. * Localizations/en.lproj/localizedStrings.js: Updated.
  16683. * UserInterface/IssueSidebarPanel.js:
  16684. (WebInspector.IssueSidebarPanel): Call _updateEmptyContentPlaceholder.
  16685. (WebInspector.IssueSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
  16686. (WebInspector.IssueSidebarPanel.prototype._issuesCleared): Call _updateEmptyContentPlaceholder.
  16687. (WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Ditto.
  16688. 2012-03-01 Timothy Hatcher <timothy@apple.com>
  16689. Don't show the same node twice in the navigation bar when the close tag is selected in the DOM tree.
  16690. Reviewed by Brian Weinstein.
  16691. * UserInterface/DOMTreeContentView.js:
  16692. (WebInspector.DOMTreeContentView.prototype.get selectionPathComponents): Skip close tag tree elements.
  16693. 2012-03-01 Timothy Hatcher <timothy@apple.com>
  16694. Update the Style details sidebar when stylesheets, the media query result, or the DOM changes.
  16695. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16696. Reviewed by Brian Weinstein.
  16697. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16698. (WebInspector.CSSStyleDetailsSidebarPanel): Added event listeners for the DOM and CSS changes.
  16699. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _userOperationInProgress): Added.
  16700. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSectionsIfNonUserAction): Added. Call _rebuildSections.
  16701. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesModified): Added. Call _rebuildSectionsIfNonUserAction.
  16702. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesRemoved): Added. Ditto.
  16703. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleInvalidated): Added. Ditto.
  16704. 2012-03-01 Timothy Hatcher <timothy@apple.com>
  16705. Include pseudo elements in the Style details sidebar.
  16706. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16707. Reviewed by Brian Weinstein.
  16708. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16709. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Go through the pseudo elements.
  16710. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection): Broken out from
  16711. createStylePropertiesSectionGroup.
  16712. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSectionGroup): Only create
  16713. the row and group now.
  16714. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups): Added. Creates sections
  16715. and groups for each pseudo element identifier.
  16716. 2012-03-01 Timothy Hatcher <timothy@apple.com>
  16717. Update the computed style and overloaded properties when editing a style property.
  16718. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16719. Reviewed by Brian Weinstein.
  16720. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16721. (WebInspector.CSSStyleDetailsSidebarPanel):
  16722. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSectionGroup):
  16723. Add the StylePropertiesSection to the mainPropertySectionMap.
  16724. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Store direct references to the important
  16725. property sections and add them to the mainPropertySections.
  16726. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshSections): Added.
  16727. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshSections.computedStyleCallback): Iterate over all the property sections
  16728. and build the style rules needed to update overloaded and used properties.
  16729. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._markUsedProperties): Clean up.
  16730. * UserInterface/StylePropertiesSection.js:
  16731. (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): Call _refreshSections.
  16732. (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): Remove reference to WebInspector.panels.elements.
  16733. * UserInterface/StylePropertyTreeElement.js:
  16734. (WebInspector.StylePropertyTreeElement.prototype._updatePane): Use _refreshSections.
  16735. (WebInspector.StylePropertyTreeElement.prototype.toggleEnabled): Use _parentPane.
  16736. (WebInspector.StylePropertyTreeElement.prototype.applyStyleText): Ditto.
  16737. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16738. Fixed localization typo.
  16739. Reviewed by Timothy Hatcher.
  16740. * Localizations/en.lproj/localizedStrings.js:
  16741. * UserInterface/TimelinesContentView.js:
  16742. (WebInspector.TimelinesContentView):
  16743. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16744. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16745. Before we make other improvements at least adjust the timeline graph
  16746. sizes to reasonable sizes.
  16747. Reviewed by Timothy Hatcher.
  16748. * UserInterface/TimelinesContentView.js:
  16749. (WebInspector.TimelinesContentView):
  16750. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16751. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16752. Adopt OpenSource's "offscreen" row hiding for performance.
  16753. Reviewed by Timothy Hatcher.
  16754. * UserInterface/TimelinesContentView.css:
  16755. (.content-view.timelines > .data-grid tr.offscreen):
  16756. (.content-view.timelines > .data-grid tr.offscreen td):
  16757. Ensure offscreen table rows still have a height, and hide their contents.
  16758. * UserInterface/TimelinesContentView.js:
  16759. (WebInspector.TimelinesContentView):
  16760. (WebInspector.TimelinesContentView.prototype.updateLayout):
  16761. (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
  16762. Update offscreen rows when the view resizes, and after we've sorted / added new rows.
  16763. (WebInspector.TimelinesContentView.prototype._updateOffscreenRows):
  16764. Mark data grid table rows outside the visible bounds as "offscreen".
  16765. * UserInterface/ResourceTimelineDataGridNode.js:
  16766. (WebInspector.ResourceTimelineDataGridNode.prototype.select):
  16767. When a user uses keyboard shortcuts and moves up/down to a row that
  16768. was offscreen, the selection happens before the node scrolls into view.
  16769. In order for its layout to work properly it can't be display none,
  16770. so remove the offscreen class preemptively.
  16771. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16772. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16773. Reviewed by Timothy Hatcher.
  16774. * UserInterface/Images/graphLabelCalloutLeft.png: Added.
  16775. * UserInterface/Images/graphLabelCalloutLeftWhite.png: Added.
  16776. * UserInterface/Images/graphLabelCalloutRight.png: Added.
  16777. * UserInterface/Images/graphLabelCalloutRightWhite.png: Added.
  16778. * UserInterface/Images/timelineHollowPillBlue.png: Added.
  16779. * UserInterface/Images/timelineHollowPillGray.png: Added.
  16780. * UserInterface/Images/timelineHollowPillGreen.png: Added.
  16781. * UserInterface/Images/timelineHollowPillOrange.png: Added.
  16782. * UserInterface/Images/timelineHollowPillPurple.png: Added.
  16783. * UserInterface/Images/timelineHollowPillRed.png: Added.
  16784. * UserInterface/Images/timelineHollowPillYellow.png: Added.
  16785. * UserInterface/Images/timelinePillBlue.png: Added.
  16786. * UserInterface/Images/timelinePillGray.png: Added.
  16787. * UserInterface/Images/timelinePillGreen.png: Added.
  16788. * UserInterface/Images/timelinePillOrange.png: Added.
  16789. * UserInterface/Images/timelinePillPurple.png: Added.
  16790. * UserInterface/Images/timelinePillRed.png: Added.
  16791. * UserInterface/Images/timelinePillWhiteFlat.png: Added.
  16792. Open Source images and new white images from Timothy Hatcher.
  16793. There will need to be HiDPI versions of these images.
  16794. * UserInterface/Main.html:
  16795. Added new files.
  16796. * UserInterface/Main.html:
  16797. * UserInterface/NetworkTimeline.css: Added.
  16798. Basic styles copied from Open Source. Minor adjustments for image sizes.
  16799. (.data-grid:focus tr.selected .network-graph-bar):
  16800. (.data-grid:focus tr.selected .resource-cached .network-graph-bar):
  16801. (.data-grid:focus tr.selected .network-graph-bar.waiting):
  16802. (.data-grid:focus tr.selected .network-graph-label):
  16803. (.data-grid:focus tr.selected .network-graph-label.after):
  16804. (.data-grid:focus tr.selected .network-graph-label.before::after):
  16805. (.data-grid:focus tr.selected .network-graph-label.after::before):
  16806. New frontend styles for the network graph when the data grid row is selected.
  16807. This makes the pill, callouts, and text white / blue matching the data grid
  16808. selected style.
  16809. * UserInterface/NetworkDataGrid.js: Added.
  16810. (WebInspector.NetworkDataGrid):
  16811. (WebInspector.NetworkDataGrid.prototype.constructor.WebInspector.NetworkDataGrid.get currentCalculator):
  16812. (WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithRecord):
  16813. (WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithDataGridNode):
  16814. (WebInspector.NetworkDataGrid.prototype.reset):
  16815. NetworkDataGrid has a just a time calculator right now, that adjusts its bounds
  16816. based on resource start time, end times, and on-going load times.
  16817. * UserInterface/ResourceTimelineDataGridNode.js:
  16818. (WebInspector.ResourceTimelineDataGridNode):
  16819. (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
  16820. (WebInspector.ResourceTimelineDataGridNode.prototype._createGraphElement):
  16821. Create and update the network graph elements for the cell content.
  16822. (WebInspector.ResourceTimelineDataGridNode.prototype.select):
  16823. Show the pill labels when the row is selected. Not just onmouseover.
  16824. (WebInspector.ResourceTimelineDataGridNode.prototype._refreshGraph):
  16825. (WebInspector.ResourceTimelineDataGridNode.prototype._refreshLabelPositions):
  16826. Use the provided network calculator shared with the other grid nodes to create
  16827. the appropriate bar for this resource.
  16828. appropriately within the network calculators bounds.
  16829. * UserInterface/TimelinesContentView.js:
  16830. (WebInspector.TimelinesContentView):
  16831. Timeline DataGrids may have embedded timeline graphs that adjust their bounds
  16832. based on the records (start times, max sizes, etc) their content contains.
  16833. Calculator objects manage those bounds. If the current data grid has a
  16834. calculator we do a few extra actions to ensure nice updates.
  16835. (WebInspector.TimelinesContentView.prototype._recordingStarted):
  16836. Reset the data grid's calculators.
  16837. (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
  16838. (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecords):
  16839. (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
  16840. Update the calculator's bounds before updating pending records so that all records
  16841. are drawn with the same, most accurate bounds.
  16842. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16843. <rdar://problem/10960903> Include Network timeline graph in the network data grid
  16844. Reviewed by Timothy Hatcher.
  16845. * Localizations/en.lproj/localizedStrings.js:
  16846. New strings for the tooltips provided by the graph calculator.
  16847. * UserInterface/Main.html:
  16848. * UserInterface/NetworkGraphCalculator.js: Added.
  16849. (WebInspector.NetworkTimeCalculator):
  16850. (WebInspector.NetworkTimeCalculator.prototype.get boundarySpan):
  16851. (WebInspector.NetworkTimeCalculator.prototype.reset):
  16852. (WebInspector.NetworkTimeCalculator.prototype.computeBarGraphPercentages):
  16853. (WebInspector.NetworkTimeCalculator.prototype.computeBarGraphLabels):
  16854. (WebInspector.NetworkTimeCalculator.prototype.updateBoundaries):
  16855. (WebInspector.NetworkTimeCalculator.prototype.formatValue):
  16856. (WebInspector.NetworkTimeCalculator.prototype._lowerBound):
  16857. (WebInspector.NetworkTimeCalculator.prototype._upperBound):
  16858. (WebInspector.NetworkTransferTimeCalculator):
  16859. (WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
  16860. (WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
  16861. (WebInspector.NetworkTransferDurationCalculator):
  16862. (WebInspector.NetworkTransferDurationCalculator.prototype._upperBound):
  16863. Port from OpenSource to work with the new frontend's resource objects.
  16864. * UserInterface/ResourceTimelineRecord.js:
  16865. (WebInspector.ResourceTimelineRecord.prototype.get endTime):
  16866. Move "endTime" resource calculation from here ...
  16867. * UserInterface/Resource.js:
  16868. (WebInspector.Resource.prototype.get lastTimestamp):
  16869. ... to here as "lastTimestamp".
  16870. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16871. Upgrade .hidden to a common case that does display:none.
  16872. This is used throughout the OpenSource frontend to hide elements
  16873. and some existing code already uses it and may not be getting
  16874. the proper treatment.
  16875. Reviewed by Timothy Hatcher.
  16876. * UserInterface/TextEditor.css:
  16877. * UserInterface/NavigationSidebarPanel.css:
  16878. * UserInterface/ApplicationCacheFrameContentView.css:
  16879. * UserInterface/Main.css:
  16880. (.hidden):
  16881. * UserInterface/TextEditor.css:
  16882. This removes new front-end occurrences of "hidden". However
  16883. it did not remove their JavaScript property.
  16884. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16885. Prevent adding a node to the pending refresh list multiple times.
  16886. Reviewed by Timothy Hatcher.
  16887. * UserInterface/TimelinesContentView.js:
  16888. (WebInspector.TimelinesContentView):
  16889. (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
  16890. (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh):
  16891. Flag on the DataGridNode as pending a refresh if we've added it
  16892. to the refresh list and remove the flag after refreshing.
  16893. 2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
  16894. <rdar://problem/10952471> Page should reload when pushing <cmd>+R
  16895. Reviewed by Timothy Hatcher.
  16896. * UserInterface/EditingSupport.js:
  16897. (WebInspector.isEventTargetAnEditableField):
  16898. Add code, similar to Open Source to detect if the event is inside of
  16899. an editable field. Although some TextPrompt's mark their element as
  16900. editing, the Console does not. Nor do <input>s.
  16901. * UserInterface/Main.js:
  16902. (WebInspector.contentLoaded):
  16903. (WebInspector._keydown):
  16904. Add a keydown listener on the document checking for <cmd>+R.
  16905. 2012-03-01 Brian Weinstein <bweinstein@apple.com>
  16906. Finish up JavaScript profiling in the new inspector.
  16907. This patch fixes some loose ends.
  16908. - Profiles started by the user now have the title "JavaScript Profile n".
  16909. - Profile tree elements now have an icon.
  16910. - Selecting "Start Profiling JavaScript" or "Stop Profiling JavaScript" from the Develop menu
  16911. now take you to the instrument sidebar panel.
  16912. Rest of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  16913. Reviewed by Tim Hatcher.
  16914. * Localizations/en.lproj/localizedStrings.js: Update localized strings.
  16915. * UserInterface/Images/Profile.png: Added.
  16916. * UserInterface/Images/Profile@2x.png: Added.
  16917. * UserInterface/InspectorFrontendAPI.js:
  16918. (InspectorFrontendAPI.startProfilingJavaScript): Show the instrument sidebar panel.
  16919. (InspectorFrontendAPI.stopProfilingJavaScript): Ditto.
  16920. * UserInterface/InstrumentIcons.css: Add icons for profile tree elements.
  16921. * UserInterface/InstrumentSidebarPanel.js:
  16922. (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile): Make the title for user generated
  16923. profiles "JavaScript Profile n", instead of just "Profile n".
  16924. (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Use the class name for the icon.
  16925. 2012-03-01 Brian Weinstein <bweinstein@apple.com>
  16926. Clear the list of profiles when the page navigates.
  16927. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  16928. Reviewed by Tim Hatcher.
  16929. * UserInterface/InstrumentSidebarPanel.js:
  16930. (WebInspector.InstrumentSidebarPanel): Add a listener for when the profile manager says the profiles
  16931. were cleared.
  16932. (WebInspector.InstrumentSidebarPanel.prototype._profilesCleared): Remove the tree elements from the sidebar,
  16933. clear the map from profile titles -> tree elements, close all profile content views, and update the empty
  16934. content placeholder.
  16935. * UserInterface/ProfileManager.js:
  16936. (WebInspector.ProfileManager): Add a listener for when the main resource did change.
  16937. (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Remove an unused variable.
  16938. (WebInspector.ProfileManager.prototype._mainResourceDidChange): Call initialize and fire an event saying that profiles
  16939. were cleared.
  16940. 2012-02-29 Brian Weinstein <bweinstein@apple.com>
  16941. Add the ability to start/stop JavaScript profiling from the inspector.
  16942. This patch adds a recording glyph to the profiles title bar (which matches the one in the timelines title bar).
  16943. The button will start and stop JavaScript profiling.
  16944. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  16945. Reviewed by Tim Hatcher.
  16946. * Localizations/en.lproj/localizedStrings.js: Update localized strings.
  16947. * UserInterface/InstrumentSidebarPanel.css: Make all of these rules work for title bars in the instruments
  16948. sidebar panel other than the Timelines title bar. We need these rules for the Profiles title bar as well.
  16949. * UserInterface/InstrumentSidebarPanel.js:
  16950. (WebInspector.InstrumentSidebarPanel): Add a record button and status text next to the profiles sidebar. Also start
  16951. listening for when the profile manager starts and stops profiling.
  16952. (WebInspector.InstrumentSidebarPanel.prototype._profilingStarted): Start the text of the profiling status and add
  16953. a recording style class to the glyph.
  16954. (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded): Clear the text of the profiling status and remove
  16955. the recording style class from the glyph.
  16956. (WebInspector.InstrumentSidebarPanel.prototype._profileGlyphMousedOver): Update the text of the profiling status.
  16957. (WebInspector.InstrumentSidebarPanel.prototype._profileGlyphMousedOut): Ditto.
  16958. (WebInspector.InstrumentSidebarPanel.prototype._profileGlyphClicked): Toggle the profiling state.
  16959. * UserInterface/ProfileManager.js:
  16960. (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Add a flag that represents
  16961. whether or not we are currently profiling.
  16962. (WebInspector.ProfileManager.prototype.setRecordingProfile): Fire events for when we start or stop profiling.
  16963. 2012-02-29 Timothy Hatcher <timothy@apple.com>
  16964. Remember the last selected details sidebar panel and restore it when that panel becomes available.
  16965. Reviewed by Jon Honeycutt.
  16966. * UserInterface/Main.js:
  16967. (WebInspector.contentLoaded): Add event listener for SidebarPanelSelected event.
  16968. (WebInspector._detailsSidebarPanelSelected): Added. Remember the identifier of the selected sidebar panel.
  16969. (WebInspector._contentBrowserRepresentedObjectsDidChange): Ignore selection changes and restore the selection
  16970. when the last selected sidebar panel is reinserted into the sidebar.
  16971. 2012-02-29 Timothy Hatcher <timothy@apple.com>
  16972. Prevent the new Web Inspector resources from installing in production builds since we are
  16973. not enabling the Inspector in DP2.
  16974. Reviewed by Mark Rowe.
  16975. * Scripts/copy-user-interface-resources.sh: Exit early before copying.
  16976. 2012-02-29 Timothy Hatcher <timothy@apple.com>
  16977. Include missing image needed by the Log and Database content views.
  16978. <rdar://problem/10952496> "userInputPreviousIcon.png" resource failed to load in Console
  16979. Reviewed by Dan Bernstein.
  16980. * UserInterface/DatabaseContentView.css:
  16981. (.database-user-query::before): Use UserInputPromptPrevious.pdf.
  16982. * UserInterface/Images/UserInputPromptPrevious.pdf: Added.
  16983. * UserInterface/LogContentView.css:
  16984. (.console-user-command::before): Use UserInputPromptPrevious.pdf.
  16985. 2012-02-29 Timothy Hatcher <timothy@apple.com>
  16986. Go through the style rules and mark the used and overloaded properties.
  16987. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16988. Reviewed by Brian Weinstein.
  16989. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16990. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Call _markUsedProperties and
  16991. pass the result to WebInspector.ComputedStylePropertiesSection.
  16992. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._markUsedProperties): Added. Copied from open source's
  16993. StylesSidebarPane.js file.
  16994. 2012-02-29 Timothy Hatcher <timothy@apple.com>
  16995. Populate the Style sidebar sections after getting all the style info.
  16996. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  16997. Reviewed by Brian Weinstein.
  16998. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  16999. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Build a list of style rules
  17000. that match the cascade order so we can mark used and overloaded properties. Rebuild the sections.
  17001. * UserInterface/CSSStyleManager.js:
  17002. (WebInspector.CSSStyleManager.prototype.getInlineStylesAsync): Merge from open source to work with TOT protocol.
  17003. * UserInterface/StylePropertiesSection.js:
  17004. (WebInspector.StylePropertiesSection): Don't show a selector if selectorText is empty.
  17005. 2012-02-29 Timothy Hatcher <timothy@apple.com>
  17006. Request the style information and store it, then build the sections after the last callback.
  17007. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17008. Reviewed by Brian Weinstein.
  17009. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  17010. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Request the style info.
  17011. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.computedStyleCallback): Store the result.
  17012. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.matchedStylesCallback): Store the result.
  17013. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.inlineStylesCallback): Store the results and
  17014. call buildSections. Since this was the last async call to cssStyleManager, this will always be the last response.
  17015. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Added stub that needs implemented.
  17016. 2012-02-29 Timothy Hatcher <timothy@apple.com>
  17017. Remove the refresh code in the Style sidebar since it needs reworked to properly update in one step.
  17018. The updating needs to be done in one step so the cascade and property priority are taken into account.
  17019. The previous way of updating the sections in three async steps was not going to work.
  17020. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17021. Reviewed by Brian Weinstein.
  17022. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  17023. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Call _rebuildSections.
  17024. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshStyleRules): Removed.
  17025. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshAttributeStyles): Removed.
  17026. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Removed.
  17027. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Added stub that needs implemented.
  17028. 2012-02-28 Timothy Hatcher <timothy@apple.com>
  17029. More work for resource links in the Style details sidebar.
  17030. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17031. Reviewed by Brian Weinstein.
  17032. * UserInterface/DOMDetailsSidebarPanel.js:
  17033. (WebInspector.DOMDetailsSidebarPanel): Make the event listener capture since another listener interferes.
  17034. (WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Pass along the line number.
  17035. * UserInterface/Main.js:
  17036. (WebInspector.openURL): Add support for opening to a line number. Use ResourceSidebarPanel which does all the work.
  17037. * UserInterface/StylePropertiesSection.js:
  17038. (WebInspector.StylePropertiesSection): Use _linkify instead of linkifyResourceAsNode.
  17039. (WebInspector.StylePropertiesSection.prototype._linkify): Added.
  17040. (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Use _linkify instead of linkifyResourceAsNode.
  17041. 2012-02-28 Timothy Hatcher <timothy@apple.com>
  17042. Copy over Color.js from open source and hook it up to the Style details sidebar.
  17043. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17044. Reviewed by Joseph Pecoraro.
  17045. * UserInterface/CSSStyleManager.js:
  17046. (WebInspector.CSSStyleManager): Use WebInspector.Color.Format.
  17047. * UserInterface/Color.js: Copied from OpenSource/Source/WebCore/inspector/front-end/Color.js.
  17048. * UserInterface/Main.html: Included Color.js.
  17049. * UserInterface/StylePropertyTreeElement.js: Use WebInspector.Color.Format.
  17050. 2012-02-28 Timothy Hatcher <timothy@apple.com>
  17051. Get style editing working.
  17052. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17053. Reviewed by Joseph Pecoraro.
  17054. * UserInterface/BoxModelDetailsSectionRow.js:
  17055. (WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown): Use WebInspector.CSSPropertyPrompt.alteredFloatNumber.
  17056. * UserInterface/CSSPropertyPrompt.js:
  17057. (WebInspector.CSSPropertyPrompt):
  17058. (WebInspector.CSSPropertyPrompt.alteredFloatNumber): Moved from BoxModelDetailsSectionRow.
  17059. (WebInspector.CSSPropertyPrompt.alteredHexNumber): Added from Open Source.
  17060. (WebInspector.CSSPropertyPrompt.prototype._handleUpOrDownValue): Use alteredFloatNumber and alteredHexNumber on this class.
  17061. * UserInterface/EditingSupport.js:
  17062. (WebInspector.restoreFocusFromElement): Added from Open Source.
  17063. * UserInterface/Main.html: Included CSSPropertyPrompt.js.
  17064. * UserInterface/StylePropertyTreeElement.js:
  17065. (WebInspector.StylePropertyTreeElement.prototype): Create CSSPropertyPrompt correctly.
  17066. 2012-02-28 Timothy Hatcher <timothy@apple.com>
  17067. Replace more uses of {add,remove,has}StyleClass with classList.{add,remove,contains}.
  17068. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17069. Reviewed by Brian Weinstein.
  17070. * UserInterface/BlankStylePropertiesSection.js:
  17071. (WebInspector.BlankStylePropertiesSection):
  17072. (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
  17073. (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted):
  17074. (WebInspector.BlankStylePropertiesSection.prototype.makeNormal):
  17075. * UserInterface/ProfileDataGridTree.js:
  17076. (WebInspector.ProfileDataGridNode.prototype.createCell):
  17077. * UserInterface/StylePropertiesSection.js:
  17078. (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceDoubleClick):
  17079. 2012-02-28 Timothy Hatcher <timothy@apple.com>
  17080. Make links work in the Style details sidebar.
  17081. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17082. Reviewed by Brian Weinstein.
  17083. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  17084. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshAttributeStyles): Pass the domNode.
  17085. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Ditto.
  17086. * UserInterface/DOMDetailsSidebarPanel.js:
  17087. (WebInspector.DOMDetailsSidebarPanel): Add click event listener.
  17088. (WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Added. Find the parentFrame for
  17089. the inspected DOM node and then call openURL.
  17090. * UserInterface/StylePropertyTreeElement.js:
  17091. (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): Remove references to
  17092. elements panel and fix up the linifying code to work with the new Inspector code.
  17093. 2012-02-29 Brian Weinstein <bweinstein@apple.com>
  17094. Group together profiles with the same name into folders when there is more than
  17095. one of them.
  17096. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17097. Reviewed by Tim Hatcher.
  17098. * Localizations/en.lproj/localizedStrings.js: Update localized strings.
  17099. * UserInterface/InstrumentSidebarPanel.js:
  17100. (WebInspector.InstrumentSidebarPanel): Add a mapping from profile title -> profile tree element (or folder).
  17101. (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Add multiple cases for when
  17102. we add a profile. If it's the first profile with a given name, add it to the sidebar. If there already
  17103. is a folder that represents all profiles with that name, then add the profile to that folder. If there
  17104. is already a profile with that same name, create a folder to represent all profiles with that name,
  17105. and add both the previous profile and the new profile to that folder.
  17106. 2012-02-28 Brian Weinstein <bweinstein@apple.com>
  17107. Make console.profile work and show entries in the instrument sidebar.
  17108. We now enable profiling when we open the web inspector, instead of when we are just told to create
  17109. a profile. This allows console.profile to work when the web inspector is open.
  17110. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17111. Reviewed by Tim Hatcher.
  17112. * UserInterface/ProfileManager.js:
  17113. (WebInspector.ProfileManager): Enable the ProfilerAgent when we start the ProfileManager.
  17114. (WebInspector.ProfileManager.prototype.startProfilingJavaScript): Call startRecordingProfile.
  17115. (WebInspector.ProfileManager.prototype.stopProfilingJavaScript): Don't disable the ProfilerAgent.
  17116. (WebInspector.ProfileManager.prototype.addProfile): If we don't have a recording JavaScript profile (which
  17117. we wouldn't if addProfile was called from console.profile), then create a new ProfileObject and fire an
  17118. event.
  17119. 2012-02-28 Timothy Hatcher <timothy@apple.com>
  17120. Start showing Computed Style in the Style details sidebar.
  17121. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17122. Reviewed by Brian Weinstein.
  17123. * Localizations/en.lproj/localizedStrings.js: Updated.
  17124. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  17125. (WebInspector.CSSStyleDetailsSidebarPanel): Create a Computed Style section.
  17126. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Call _refreshComputedStyle.
  17127. (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Added. Request the computed styles
  17128. then make a ComputedStylePropertiesSection.
  17129. * UserInterface/CSSStyleManager.js:
  17130. (WebInspector.CSSStyleManager): Added setting for color format.
  17131. (WebInspector.CSSStyleManager.prototype.get preferredColorFormat): Added.
  17132. * UserInterface/ComputedStylePropertiesSection.js:
  17133. (WebInspector.ComputedStylePropertiesSection): Replace addStyleClass with classList.add.
  17134. (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace): Ditto.
  17135. * UserInterface/DetailsSection.js:
  17136. (WebInspector.DetailsSection): Make a empty group by default if none are passed in.
  17137. * UserInterface/DetailsSectionPropertiesRow.js: Added.
  17138. (WebInspector.DetailsSectionPropertiesRow):
  17139. (WebInspector.DetailsSectionPropertiesRow.prototype.get propertiesSection):
  17140. (WebInspector.DetailsSectionPropertiesRow.prototype.set propertiesSection):
  17141. * UserInterface/Main.html: Included DetailsSectionPropertiesRow.
  17142. * UserInterface/StylePropertiesSection.js:
  17143. (WebInspector.StylePropertiesSection): Removed single-click experiment.
  17144. * UserInterface/StylePropertyTreeElement.js:
  17145. (WebInspector.StylePropertyTreeElement.prototype.onattach): Removed single-click experiment.
  17146. (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Use CSSStyleManager for the color format.
  17147. Replaced addStyleClass with classList.add and removeStyleClass with classList.remove.
  17148. 2012-02-27 Timothy Hatcher <timothy@apple.com>
  17149. Fix some exceptions when running against shipping WebKit.
  17150. There are no setters for sortOrder or sortColumnIdentifier. Trying to set them use to throw an exception.
  17151. They just are silently ignored in TOT WebKit. The sort info is properly set earlier in the function.
  17152. Reviewed by Joseph Pecoraro.
  17153. * UserInterface/TimelinesContentView.js:
  17154. (WebInspector.TimelinesContentView): Remove sets for sortOrder and sortColumnIdentifier.
  17155. 2012-02-27 Timothy Hatcher <timothy@apple.com>
  17156. Hide the appearance and style details sidebars when the node is not an element.
  17157. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17158. Reviewed by Brian Weinstein.
  17159. * UserInterface/AppearanceDetailsSidebarPanel.js:
  17160. (WebInspector.AppearanceDetailsSidebarPanel.prototype.supportsDOMNode): Added. Support only ELEMENT_NODE types.
  17161. * UserInterface/CSSStyleDetailsSidebarPanel.js:
  17162. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.supportsDOMNode): Added. Support only ELEMENT_NODE types.
  17163. * UserInterface/DOMDetailsSidebarPanel.js:
  17164. (WebInspector.DOMDetailsSidebarPanel.prototype..inspect): Call supportsDOMNode before setting domNode.
  17165. (WebInspector.DOMDetailsSidebarPanel.prototype.supportsDOMNode): Added. Always return true.
  17166. 2012-02-27 Timothy Hatcher <timothy@apple.com>
  17167. Move empty message support from DetailsSectionDataGridRow down to DetailsSectionRow.
  17168. This allows BoxModelDetailsSectionRow to show a properly styled empty message. It will
  17169. also allow other rows in the Style details sidebar to do the same.
  17170. Reviewed by Joseph Pecoraro.
  17171. * UserInterface/BoxModelDetailsSectionRow.js:
  17172. (WebInspector.BoxModelDetailsSectionRow): Pass the emptyMessage to the DetailsSectionRow constructor.
  17173. (WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Use showEmptyMessage.
  17174. (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics): Use hideEmptyMessage
  17175. * UserInterface/DetailsSection.css:
  17176. (.details-section > .content > .group > .row.empty): Removed .data-grid from the selector.
  17177. * UserInterface/DetailsSectionDataGridRow.js:
  17178. (WebInspector.DetailsSectionDataGridRow): Pass the emptyMessage to DetailsSectionRow constructor.
  17179. (WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid): Use showEmptyMessage
  17180. and hideEmptyMessage.
  17181. * UserInterface/DetailsSectionRow.js:
  17182. (WebInspector.DetailsSectionRow): Initialize the _emptyMessage.
  17183. (WebInspector.DetailsSectionRow.prototype.get emptyMessage): Added.
  17184. (WebInspector.DetailsSectionRow.prototype.set emptyMessage): Added.
  17185. (WebInspector.DetailsSectionRow.prototype.showEmptyMessage): Added.
  17186. (WebInspector.DetailsSectionRow.prototype.hideEmptyMessage): Added.
  17187. 2012-02-27 Timothy Hatcher <timothy@apple.com>
  17188. Add WebInspector.CSSStyleDetailsSidebarPanel and make it show up in the details sidebar.
  17189. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17190. Reviewed by Brian Weinstein.
  17191. * UserInterface/CSSStyleDetailsSidebarPanel.js: Added.
  17192. (WebInspector.CSSStyleDetailsSidebarPanel):
  17193. (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
  17194. * UserInterface/Images/NavigationItemCurleyBraces.pdf: Added.
  17195. * UserInterface/Main.html:
  17196. * UserInterface/Main.js:
  17197. (WebInspector.contentLoaded):
  17198. 2012-02-27 Timothy Hatcher <timothy@apple.com>
  17199. Add WebInspector.CSSObserver and wire it up to the InspectorBackend.
  17200. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  17201. Reviewed by Brian Weinstein.
  17202. * UserInterface/CSSObserver.js: Added.
  17203. (WebInspector.CSSObserver):
  17204. (WebInspector.CSSObserver.prototype.mediaQueryResultChanged):
  17205. (WebInspector.CSSObserver.prototype.styleSheetChanged):
  17206. * UserInterface/Main.html: Included CSSObserver.js.
  17207. * UserInterface/Main.js:
  17208. (WebInspector.contentLoaded): Call registerCSSDispatcher with an CSSObserver instance.
  17209. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17210. Add a sane name for user generated profiles.
  17211. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17212. Reviewed by Tim Hatcher.
  17213. * UserInterface/InstrumentSidebarPanel.js:
  17214. (WebInspector.InstrumentSidebarPanel.prototype.addProfile):
  17215. * UserInterface/ProfileManager.js:
  17216. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17217. Create a JavaScriptProfileView when a profile is selected and show it.
  17218. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17219. Reviewed by Tim Hatcher.
  17220. * Localizations/en.lproj/localizedStrings.js: Update localized strings.
  17221. * UserInterface/ContentView.js:
  17222. (WebInspector.ContentView): Add a case for ProfileObject.
  17223. (WebInspector.ContentView.isViewable): Ditto.
  17224. * UserInterface/InstrumentSidebarPanel.js:
  17225. (WebInspector.InstrumentSidebarPanel): Add a listener for when items in the content tree outline are selected.
  17226. (WebInspector.InstrumentSidebarPanel.prototype._profileSelected): Call showContentViewForRepresentedObject on
  17227. the selected ProfileObject.
  17228. * UserInterface/Main.js:
  17229. (WebInspector.sidebarPanelForRepresentedObject): Add a case for ProfileObject.
  17230. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17231. Hook up Start/Stop Profiling JavaScript in the Develop menu, and make each profile show
  17232. up as a sidebar item.
  17233. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17234. Reviewed by Tim Hatcher.
  17235. * UserInterface/InspectorFrontendAPI.js:
  17236. (InspectorFrontendAPI.isProfilingJavaScript): Call into the ProfileManager.
  17237. (InspectorFrontendAPI.startProfilingJavaScript): Ditto.
  17238. (InspectorFrontendAPI.stopProfilingJavaScript): Ditto.
  17239. * UserInterface/InstrumentSidebarPanel.js:
  17240. (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Create a tree element for the added profile.
  17241. (WebInspector.InstrumentSidebarPanel.prototype._profileWasUpdated): Update the title of the tree element for the
  17242. profile that was updated.
  17243. * UserInterface/JavaScriptProfileType.js: Change the value of a constant to match data we get back
  17244. from the Profiler.
  17245. * UserInterface/ProfileManager.js:
  17246. (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Clear the current JavaScript
  17247. profile variable.
  17248. (WebInspector.ProfileManager.prototype.isProfilingJavaScript): Return whether or not we are profiling JavaScript.
  17249. (WebInspector.ProfileManager.prototype.startProfilingJavaScript): Enable the ProfilerAgent, we kick off the profile in
  17250. the callback.
  17251. (WebInspector.ProfileManager.prototype.stopProfilingJavaScript): Stop recording the current profile and disable the
  17252. ProfilerAgent.
  17253. (WebInspector.ProfileManager.prototype.addProfile): Update our temporary recording profile to give it the information about
  17254. the profile that was added, and fire an event that the profile was u pdated.
  17255. (WebInspector.ProfileManager.prototype.setRecordingProfile): Create a temporary profile if needed, and fire an event that
  17256. it was created.
  17257. (WebInspector.ProfileManager.prototype._profilerWasEnabled): Create a JavaScriptProfileType and start recording.
  17258. * UserInterface/ProfilerObserver.js:
  17259. (WebInspector.ProfilerObserver.prototype.addProfileHeader): Call ProfileManager.addProfile.
  17260. (WebInspector.ProfilerObserver.prototype.setRecordingProfile): Call ProfileManager.setRecordingProfile.
  17261. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17262. Add a stub ProfilerObserver and hook it up in Main.js.
  17263. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17264. Reviewed by Tim Hatcher.
  17265. * UserInterface/Main.html: Add new file.
  17266. * UserInterface/Main.js:
  17267. (WebInspector.contentLoaded): Set up the ProfilerObserver.
  17268. * UserInterface/ProfilerObserver.js: Added.
  17269. (WebInspector.ProfilerObserver):
  17270. (WebInspector.ProfilerObserver.prototype.constructor.WebInspector.ProfilerObserver.resetProfiles):
  17271. (WebInspector.ProfilerObserver.prototype.addProfileHeader):
  17272. (WebInspector.ProfilerObserver.prototype.addHeapSnapshotChunk):
  17273. (WebInspector.ProfilerObserver.prototype.finishHeapSnapshot):
  17274. (WebInspector.ProfilerObserver.prototype.setRecordingProfile):
  17275. (WebInspector.ProfilerObserver.prototype.reportHeapSnapshotProgress):
  17276. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17277. Add ProfileType and JavaScriptProfileType to Main.html, since later patches will depend on them.
  17278. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17279. Reviewed by Tim Hatcher.
  17280. * UserInterface/Main.html:
  17281. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17282. Make ProfileDataGridTree work with the changes to the new inspector.
  17283. - Update the way formatted strings are created
  17284. - Changes the settings to use the new inspector's syntax
  17285. - Remove the depedency on the linkifier
  17286. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17287. Reviewed by Tim Hatcher.
  17288. * UserInterface/ProfileDataGridTree.js:
  17289. (WebInspector.ProfileDataGridNode.prototype.get data):
  17290. (WebInspector.ProfileDataGridNode.prototype.linkifyLocation):
  17291. (WebInspector.ProfileDataGridNode.prototype.createCell):
  17292. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17293. Bring in some specialized profile data grid components from open source.
  17294. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17295. Reviewed by Tim Hatcher.
  17296. * UserInterface/BottomUpProfileDataGridTree.js: Added. Copied from open source.
  17297. * UserInterface/ProfileDataGridTree.js: Added. Copied from open source.
  17298. * UserInterface/TopDownProfileDataGridTree.js: Added. Copied from open source.
  17299. * UserInterface/Main.html: Add new files.
  17300. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17301. Add rules from open source for the profile view to JavaScriptProfileView.css.
  17302. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17303. Reviewed by Tim Hatcher.
  17304. * UserInterface/JavaScriptProfileView.css: Added. Copied rules from open source.
  17305. * UserInterface/Main.html: Added file.
  17306. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17307. Clean up JavaScriptProfileView so it can be used in the new inspector.
  17308. This patch:
  17309. - Removes the status bar buttons (adding a FIXME to bring back that functionality)
  17310. - Makes the class inherit from ContentView instead of just View
  17311. - Replaces *styleClass functions with classList.*
  17312. - Changes the settings to use the new inspector's syntax
  17313. Reviewed by Tim Hatcher.
  17314. * UserInterface/JavaScriptProfileView.js:
  17315. (WebInspector.JavaScriptProfileView):
  17316. (WebInspector.JavaScriptProfileView.prototype._changeView):
  17317. (WebInspector.JavaScriptProfileView.prototype._percentClicked):
  17318. (WebInspector.JavaScriptProfileView.prototype._updatePercentButton):
  17319. (WebInspector.JavaScriptProfileView.prototype._focusClicked):
  17320. (WebInspector.JavaScriptProfileView.prototype._excludeClicked):
  17321. (WebInspector.JavaScriptProfileView.prototype._resetClicked):
  17322. (WebInspector.JavaScriptProfileView.prototype._dataGridNodeSelected):
  17323. (WebInspector.JavaScriptProfileView.prototype._dataGridNodeDeselected):
  17324. (WebInspector.JavaScriptProfileView.prototype._mouseDownInDataGrid):
  17325. * UserInterface/Main.html: Add JavaScriptProfileView.
  17326. 2012-02-24 Brian Weinstein <bweinstein@apple.com>
  17327. Add a ProfileObject class, which just holds some data about profiles (type, title, uid, and whether or not
  17328. it is temporary).
  17329. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17330. Reviewed by Tim Hatcher.
  17331. * UserInterface/ProfileObject.js: Added.
  17332. (WebInspector.ProfileObject):
  17333. (WebInspector.ProfileObject.prototype.constructor.WebInspector.ProfileObject.get typeId):
  17334. (WebInspector.ProfileObject.prototype.get title):
  17335. (WebInspector.ProfileObject.prototype.get uid):
  17336. (WebInspector.ProfileObject.prototype.get isTemporary):
  17337. 2012-02-22 Brian Weinstein <bweinstein@apple.com>
  17338. Create a stub ProfileManager and add an initialize method.
  17339. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17340. Reviewed by Tim Hatcher.
  17341. * UserInterface/Main.html: Add new file.
  17342. * UserInterface/Main.js:
  17343. (WebInspector.contentLoaded): Create a profile manager.
  17344. * UserInterface/ProfileManager.js: Added.
  17345. (WebInspector.ProfileManager):
  17346. (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize):
  17347. 2012-02-20 Brian Weinstein <bweinstein@apple.com>
  17348. Rename CPUProfile to JavaScriptProfile.
  17349. More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17350. Reviewed by Tim Hatcher.
  17351. * UserInterface/JavaScriptProfileType.js:
  17352. (WebInspector.JavaScriptProfileType):
  17353. (WebInspector.JavaScriptProfileType.prototype.createView):
  17354. * UserInterface/JavaScriptProfileView.js:
  17355. (WebInspector.JavaScriptProfileView.prototype._changeView.set else):
  17356. 2012-02-20 Brian Weinstein <bweinstein@apple.com>
  17357. Bring in some files from open source.
  17358. Start of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
  17359. Reviewed by Tim Hatcher.
  17360. * UserInterface/JavaScriptProfileType.js: Added. Copied from open source.
  17361. * UserInterface/JavaScriptProfileView.js: Added. Copied from open source.
  17362. * UserInterface/ProfileType.js: Added. Copied from open source.
  17363. 2012-02-26 Timothy Hatcher <timothy@apple.com>
  17364. Use insertionIndexForObjectInListSortedByFunction to efficiently build the timeline data grids.
  17365. Calling _sortCurrentDataGrid for each update was expensive since it removes all the rows and reinserts them.
  17366. Part of: <rdar://problem/10319553&10319567&10319571>
  17367. Reviewed by Joseph Pecoraro.
  17368. * UserInterface/DataGrid.js:
  17369. (WebInspector.DataGridNode.prototype._attach): Fix a bug that prevented inserting the row in the right place.
  17370. * UserInterface/TimelinesContentView.js:
  17371. (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Use insertionIndexForObjectInListSortedByFunction
  17372. when there is a sortColumnIdentifier. Don't call _sortCurrentDataGrid anymore.
  17373. (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Use _sortComparator.
  17374. (WebInspector.TimelinesContentView.prototype._sortComparator): Added. Factored out of _sortCurrentDataGrid.
  17375. 2012-02-26 Timothy Hatcher <timothy@apple.com>
  17376. Show recoding status in the Instrument sidebar and allow manually starting and stopping recording.
  17377. Part of: <rdar://problem/10319553&10319567&10319571>
  17378. Reviewed by Joseph Pecoraro.
  17379. * Localizations/en.lproj/localizedStrings.js: Updated.
  17380. * UserInterface/Images/Recording.png: Added.
  17381. * UserInterface/Images/Recording@2x.png: Added.
  17382. * UserInterface/Images/RecordingHovered.png: Added.
  17383. * UserInterface/Images/RecordingHovered@2x.png: Added.
  17384. * UserInterface/Images/RecordingStopped.png: Added.
  17385. * UserInterface/Images/RecordingStopped@2x.png: Added.
  17386. * UserInterface/InstrumentSidebarPanel.css:
  17387. (.sidebar > .panel.instrument > .title-bar):
  17388. (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph):
  17389. (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording):
  17390. (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph:hover):
  17391. (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording:hover):
  17392. (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.forced):
  17393. (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording.forced):
  17394. (.sidebar > .panel.instrument > .title-bar.timelines > .record-status):
  17395. * UserInterface/InstrumentSidebarPanel.js:
  17396. (WebInspector.InstrumentSidebarPanel): Create glyph and status elements.
  17397. (WebInspector.InstrumentSidebarPanel.prototype._recordingStarted): Added. Update glyph and status.
  17398. (WebInspector.InstrumentSidebarPanel.prototype._recordingStopped): Added. Ditto.
  17399. (WebInspector.InstrumentSidebarPanel.prototype._recordGlyphMousedOver): Added. Clear forced class.
  17400. Update status to reflect what it will be if the button is clicked.
  17401. (WebInspector.InstrumentSidebarPanel.prototype._recordGlyphMousedOut): Added. Restore current status.
  17402. (WebInspector.InstrumentSidebarPanel.prototype._recordGlyphClicked): Added. Add forced class to prevent
  17403. the glyph from showing a confusing status after click.
  17404. 2012-02-26 Timothy Hatcher <timothy@apple.com>
  17405. Draw the overview bar graph at the top of the timeline content view.
  17406. Part of: <rdar://problem/10319553&10319567&10319571>
  17407. Reviewed by Joseph Pecoraro.
  17408. * UserInterface/TimelineOverview.css:
  17409. (.timeline-overview > .timeline > .bar-container):
  17410. (.timeline-overview > .timeline .bar):
  17411. (.timeline-overview > .timeline .bar.waiting):
  17412. (.timeline-overview > .timeline.timeline-record-type-network .bar):
  17413. (.timeline-overview > .timeline.timeline-record-type-layout .bar):
  17414. (.timeline-overview > .timeline.timeline-record-type-script .bar):
  17415. * UserInterface/TimelineOverview.js:
  17416. (WebInspector.TimelineOverview): Create a bar container in each timeline.
  17417. (WebInspector.TimelineOverview.prototype.update): Call _updateTimelineBars for each type.
  17418. (WebInspector.TimelineOverview.prototype._updateTimelineBars): Added.
  17419. (WebInspector.TimelineOverview.prototype._updateTimelineBars.computePercentages): Compute percentages
  17420. for startTime and endTime.
  17421. (WebInspector.TimelineOverview.prototype._updateTimelineBars.computeActivePercentages): Compute percentages
  17422. for endTime and the start of activeDuration.
  17423. (WebInspector.TimelineOverview.prototype._updateTimelineBars.addBar): Create a bar and append it.
  17424. (WebInspector.TimelineOverview.prototype._updateTimelineBars.createBars): Iterate over the records and find
  17425. the distribution on the graph.
  17426. 2012-02-26 Timothy Hatcher <timothy@apple.com>
  17427. Improve auto recording of timeline data so it stops at a reasonable time instead of a fixed 30 seconds.
  17428. Recording will now stop when there has been 1 second of dead time after the load event fires. Or after a
  17429. maximum of 10 seconds after the load event fires. This works well for a number of large and small sites.
  17430. Part of: <rdar://problem/10319553&10319567&10319571>
  17431. Reviewed by Joseph Pecoraro.
  17432. * UserInterface/TimelineManager.js:
  17433. (WebInspector.TimelineManager): Initialize _domContentLoadedEventTime and _loadEventTime.
  17434. (WebInspector.TimelineManager.prototype.get mainFrameLoadEventTime): Added.
  17435. (WebInspector.TimelineManager.prototype.get mainFrameDOMContentLoadedEventTime): Added.
  17436. (WebInspector.TimelineManager.prototype.startRecording): Initialize _domContentLoadedEventTime and _loadEventTime.
  17437. (WebInspector.TimelineManager.prototype.stopRecording): Clear _deadTimeTimeout.
  17438. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Process the MarkLoad and MarkDOMContent records.
  17439. Call _stopAutoRecordingSoon for MarkLoad.
  17440. (WebInspector.TimelineManager.prototype._addRecord): Call _resetAutoRecordingDeadTimeTimeout.
  17441. (WebInspector.TimelineManager.prototype._startAutoRecording): Removed timeout for stopRecording.
  17442. (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon): Added. Start a timeout for the maximum time. Also
  17443. call _resetAutoRecordingDeadTimeTimeout to start watching dead time.
  17444. (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout): Added. Reset the dead time timeout.
  17445. 2012-02-26 Timothy Hatcher <timothy@apple.com>
  17446. Draw the times in the timeline overview header.
  17447. Part of: <rdar://problem/10319553&10319567&10319571>
  17448. Reviewed by Joseph Pecoraro.
  17449. * UserInterface/InstrumentSidebarPanel.css:
  17450. (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item:not(:first-child):not(.selected)): Reduce divider opacity.
  17451. * UserInterface/TimelineOverview.css:
  17452. (.timeline-overview > .header): Added.
  17453. (.timeline-overview > .header > .divider): Added.
  17454. (.timeline-overview > .header > .divider:last-child): Added.
  17455. (.timeline-overview > .header > .divider > .label): Added.
  17456. (.timeline-overview > .header > .divider:first-child > .label): Added.
  17457. (.timeline-overview > .timeline): Added.
  17458. (.timeline-overview > .timeline:not(:first-child)): Added.
  17459. * UserInterface/TimelineOverview.js:
  17460. (WebInspector.TimelineOverview): Create the header element and timeline rows.
  17461. (WebInspector.TimelineOverview.prototype.get recordTypes): Added.
  17462. (WebInspector.TimelineOverview.prototype.clear): Added. Reset the minimum and maximum boundaries. Call _updateHeaderTimes.
  17463. (WebInspector.TimelineOverview.prototype.update): Added. Find the minimum and maximum times. Call _updateHeaderTimes.
  17464. (WebInspector.TimelineOverview.prototype.updateLayout): Added. Call _updateHeaderTimes.
  17465. (WebInspector.TimelineOverview.prototype._updateHeaderTimes): Added. Update the dividers and labels.
  17466. * UserInterface/TimelinesContentView.js:
  17467. (WebInspector.TimelinesContentView.prototype.updateLayout): Call updateLayout on the timeline overview.
  17468. (WebInspector.TimelinesContentView.prototype.timelineOverviewRecordsWithType): Added.
  17469. (WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Don't return early, call _updatePendingRecordsSoon.
  17470. (WebInspector.TimelinesContentView.prototype._updatePendingRecordsSoon): Return early if not visible.
  17471. (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Call update on the timeline overview. Fix if statement.
  17472. (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh): Don't return early, call _updatePendingRecordsSoon.
  17473. 2012-02-25 Timothy Hatcher <timothy@apple.com>
  17474. Add the start of WebInspector.TimelineOverview, the overview graph at the top of the timeline content view.
  17475. Part of: <rdar://problem/10319553&10319567&10319571>
  17476. Reviewed by Joseph Pecoraro.
  17477. * UserInterface/Main.html:
  17478. * UserInterface/TimelineOverview.css: Added.
  17479. (.timeline-overview):
  17480. * UserInterface/TimelineOverview.js: Added.
  17481. (WebInspector.TimelineOverview):
  17482. (WebInspector.TimelineOverview.prototype.get element):
  17483. * UserInterface/TimelinesContentView.css:
  17484. (.content-view.timelines > .timeline-overview):
  17485. * UserInterface/TimelinesContentView.js:
  17486. 2012-02-25 Timothy Hatcher <timothy@apple.com>
  17487. Add a way to jump to resource source code from the Network and Script timeline data grid.
  17488. Part of: <rdar://problem/10319553&10319567>
  17489. Reviewed by Brian Weinstein.
  17490. * UserInterface/DataGrid.js:
  17491. (WebInspector.DataGrid): Remove capture on the click and mousedown events. This allows the go-to
  17492. to prevent row selection in the data grid.
  17493. * UserInterface/ImageUtilities.js:
  17494. (generateColoredImage): Added support for adjusting the alpha by multiplying.
  17495. (generateColoredImagesForCSS.generateImage): Pass along the fillColor alpha.
  17496. * UserInterface/Main.css:
  17497. (.go-to-arrow): Added.
  17498. (.go-to-arrow:active): Added.
  17499. (:focus .selected .go-to-arrow): Added.
  17500. (:focus .selected .go-to-arrow:active): Added.
  17501. * UserInterface/Main.js:
  17502. (WebInspector.createGoToArrowButton.stopPropagation): Added.
  17503. (WebInspector.createGoToArrowButton): Added. Generate the images and button element.
  17504. * UserInterface/ResourceTimelineDataGridNode.js:
  17505. (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Append a go-to button to the name column.
  17506. (WebInspector.ResourceTimelineDataGridNode.prototype._goToResource): Added. Show the resource.
  17507. * UserInterface/ScriptTimelineDataGridNode.js:
  17508. (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Append a go-to button to the resource column.
  17509. (WebInspector.ScriptTimelineDataGridNode.prototype._goToResource): Added. Show the resource and line.
  17510. * UserInterface/TimelinesContentView.css:
  17511. (.content-view.timelines > .data-grid td .go-to-arrow): Added. Float right, hidden by default
  17512. (.content-view.timelines > .data-grid tr:hover .go-to-arrow): Added. Show the button.
  17513. 2012-02-25 Timothy Hatcher <timothy@apple.com>
  17514. Fix some exceptions that occurred when clicking on a resource in the Issues sidebar.
  17515. Reviewed by John Sullivan.
  17516. * UserInterface/TextResourceContentView.js:
  17517. (WebInspector.TextResourceContentView): Move _issues and _contentPopulated above the call to the ResourceContentView
  17518. constructor since addIssue needs them and ResourceContentView populates the issues.
  17519. 2012-02-25 Timothy Hatcher <timothy@apple.com>
  17520. Share code for generating disclosure triangles so it can be used in other places.
  17521. Reviewed by John Sullivan.
  17522. * UserInterface/DetailsSection.js:
  17523. (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded): Use generateColoredImagesForCSS.
  17524. * UserInterface/ImageUtilities.js:
  17525. (generateColoredImagesForCSS): Added. Copied from NavigationSidebarPanel and made generic.
  17526. (generateColoredImagesForCSS.imageLoaded): Added.
  17527. (generateColoredImagesForCSS.generateImage): Added.
  17528. * UserInterface/NavigationSidebarPanel.js:
  17529. (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Use generateColoredImagesForCSS.
  17530. 2012-02-24 Timothy Hatcher <timothy@apple.com>
  17531. Populate the Script data grid in the timeline content view.
  17532. Part of: <rdar://problem/10319567> Implement the Script instrument for the new Web Inspector design
  17533. Reviewed by Brian Weinstein.
  17534. * Localizations/en.lproj/localizedStrings.js: Updated.
  17535. * UserInterface/Main.html: Included ScriptTimelineDataGridNode.js and ScriptTimelineRecord.js.
  17536. * UserInterface/ScriptTimelineDataGridNode.js: Added.
  17537. (WebInspector.ScriptTimelineDataGridNode):
  17538. (WebInspector.ScriptTimelineDataGridNode.prototype.get record):
  17539. (WebInspector.ScriptTimelineDataGridNode.prototype.get data):
  17540. (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
  17541. * UserInterface/ScriptTimelineRecord.js: Added.
  17542. (WebInspector.ScriptTimelineRecord):
  17543. (WebInspector.ScriptTimelineRecord.EventType.displayName):
  17544. (WebInspector.ScriptTimelineRecord.prototype.get eventType):
  17545. (WebInspector.ScriptTimelineRecord.prototype.get details):
  17546. (WebInspector.ScriptTimelineRecord.prototype.get resource):
  17547. (WebInspector.ScriptTimelineRecord.prototype.get lineNumber):
  17548. * UserInterface/TimelineManager.js:
  17549. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Handle script record types.
  17550. (WebInspector.TimelineManager.prototype.eventRecorded): Pass along the parent record to processRecord.
  17551. * UserInterface/TimelinesContentView.css:
  17552. (.content-view.timelines > .data-grid .resource-column .icon): Updated the selector to work with name-column and resource-column.
  17553. * UserInterface/TimelinesContentView.js:
  17554. (WebInspector.TimelinesContentView):
  17555. (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid.comparator): Handle WebInspector.Resource values.
  17556. (WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Create a ScriptTimelineDataGridNode.
  17557. 2012-02-24 Timothy Hatcher <timothy@apple.com>
  17558. Populate the Layout & Rendering data grid in timeline content view.
  17559. Part of: <rdar://problem/10319571> Implement the Rendering instrument for the new Web Inspector design
  17560. Reviewed by Brian Weinstein.
  17561. * Localizations/en.lproj/localizedStrings.js: Updated.
  17562. * UserInterface/LayoutTimelineDataGridNode.js: Added.
  17563. (WebInspector.LayoutTimelineDataGridNode):
  17564. (WebInspector.LayoutTimelineDataGridNode.prototype.get record):
  17565. (WebInspector.LayoutTimelineDataGridNode.prototype.get data):
  17566. (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
  17567. * UserInterface/LayoutTimelineRecord.js: Added.
  17568. (WebInspector.LayoutTimelineRecord):
  17569. (WebInspector.LayoutTimelineRecord.EventType.displayName):
  17570. (WebInspector.LayoutTimelineRecord.prototype.get eventType):
  17571. (WebInspector.LayoutTimelineRecord.prototype.get x):
  17572. (WebInspector.LayoutTimelineRecord.prototype.get y):
  17573. (WebInspector.LayoutTimelineRecord.prototype.get width):
  17574. (WebInspector.LayoutTimelineRecord.prototype.get height):
  17575. (WebInspector.LayoutTimelineRecord.prototype.get area):
  17576. * UserInterface/Main.html: Included LayoutTimelineRecord.js and LayoutTimelineDataGridNode.js.
  17577. * UserInterface/TimelineManager.js:
  17578. (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Create record objects for each type.
  17579. (WebInspector.TimelineManager.prototype.eventRecorded): Iterate over the records.
  17580. * UserInterface/TimelinesContentView.js:
  17581. (WebInspector.TimelinesContentView): Create columns for the Layout data grid.
  17582. (WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Create a LayoutTimelineDataGridNode.
  17583. 2012-02-22 Timothy Hatcher <timothy@apple.com>
  17584. Adjust the output of Number.secondsToString to give higher resolution for < 100ms.
  17585. Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
  17586. Reviewed by Brian Weinstein.
  17587. * Localizations/en.lproj/localizedStrings.js: Updated.
  17588. * UserInterface/Utilities.js:
  17589. (Number.secondsToString): Show more decimal points for < 100ms. Reduce the number of
  17590. decimal points in higher resolution mode as well.
  17591. 2012-02-22 Timothy Hatcher <timothy@apple.com>
  17592. Support sorting the data grids in the timeline view.
  17593. Part of: <rdar://problem/10319553&10319567&10319571>
  17594. Reviewed by Brian Weinstein.
  17595. * UserInterface/DataGrid.css:
  17596. (.data-grid th.sort-descending > div): Add some padding so the sort direction arrow does not overlap the text.
  17597. * UserInterface/Resource.js:
  17598. (WebInspector.Resource): Initialize _cached so it can sort properly.
  17599. * UserInterface/TimelinesContentView.js:
  17600. (WebInspector.TimelinesContentView): Add event listeners for sorting changes.
  17601. (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Call _sortCurrentDataGrid.
  17602. (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Added.
  17603. (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid.comparator): Added.
  17604. 2012-02-22 Timothy Hatcher <timothy@apple.com>
  17605. Separate data from presentation in ResourceTimelineDataGridNode to make it easy to sort using the raw data.
  17606. Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
  17607. Reviewed by Brian Weinstein.
  17608. * UserInterface/DataGrid.js:
  17609. (WebInspector.DataGridNode.prototype.createCell): Make a text node if the content isn't a Node.
  17610. (WebInspector.DataGridNode.prototype.createCellContent): Return raw data. The text node is made by the caller.
  17611. * UserInterface/ResourceTimelineDataGridNode.js:
  17612. (WebInspector.ResourceTimelineDataGridNode.prototype.get data): Return the raw data instead of formatted data.
  17613. (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Format the data based on the column.
  17614. 2012-02-22 Timothy Hatcher <timothy@apple.com>
  17615. Cause network records to update in batches with any new records being added to reduce flashing.
  17616. Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
  17617. Reviewed by Brian Weinstein.
  17618. * UserInterface/ResourceTimelineDataGridNode.js:
  17619. (WebInspector.ResourceTimelineDataGridNode): Update event listeners to call _needsRefresh.
  17620. (WebInspector.ResourceTimelineDataGridNode.prototype.get record): Added.
  17621. (WebInspector.ResourceTimelineDataGridNode.prototype.refresh): Remove timeout check.
  17622. (WebInspector.ResourceTimelineDataGridNode.prototype._needsRefresh): Renamed from _refreshSoon. Fire
  17623. NeedsRefresh event.
  17624. * UserInterface/TimelinesContentView.js:
  17625. (WebInspector.TimelinesContentView): Add event listener for NeedsRefresh.
  17626. (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Call _updatePendingRecords.
  17627. (WebInspector.TimelinesContentView.prototype.shown): Call _updatePendingRecords.
  17628. (WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Call _updatePendingRecordsSoon.
  17629. (WebInspector.TimelinesContentView.prototype._updatePendingRecordsSoon): Renamed from _addPendingRecordsSoon.
  17630. (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Renamed from _addPendingRecords. Also
  17631. refresh pending grid nodes.
  17632. (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh): Added. Store the grid node and
  17633. call _updatePendingRecordsSoon.
  17634. 2012-02-22 Timothy Hatcher <timothy@apple.com>
  17635. Properly record main resources for all frames in the Network timeline.
  17636. Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
  17637. Reviewed by Brian Weinstein.
  17638. * UserInterface/TimelineManager.js:
  17639. (WebInspector.TimelineManager): Change MainFrameDidChange listener to _mainResourceDidChange.
  17640. (WebInspector.TimelineManager.prototype._startAutoRecording): Return true if recording started.
  17641. (WebInspector.TimelineManager.prototype._mainResourceDidChange): Added. Call _startAutoRecording,
  17642. return early if true. Add the main resource as a record if it isn't the auto recording resource.
  17643. 2012-02-22 Timothy Hatcher <timothy@apple.com>
  17644. Always clear records and restart recording when navigating to a new page.
  17645. Part of: <rdar://problem/10319553&10319567&10319571>
  17646. Reviewed by Brian Weinstein.
  17647. * UserInterface/TimelineManager.js:
  17648. (WebInspector.TimelineManager.prototype.stopRecording): Clear _autoRecordingMainResourceRequestIdentifier.
  17649. (WebInspector.TimelineManager.prototype._startAutoRecording): Set _autoRecordingMainResourceRequestIdentifier.
  17650. Don't return early if _autoRecordingMainResourceRequestIdentifier.
  17651. 2012-02-22 Timothy Hatcher <timothy@apple.com>
  17652. Show resource icons and failed loads in the Network data grid.
  17653. Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
  17654. Reviewed by Brian Weinstein.
  17655. * UserInterface/DataGrid.js:
  17656. (WebInspector.DataGridNode.prototype.createCell): Call createCellContent.
  17657. (WebInspector.DataGridNode.prototype.createCellContent): Added. Make a text node.
  17658. * UserInterface/ResourceTimelineDataGridNode.js:
  17659. (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Added. Create a fragment
  17660. for the name column with an icon. Add the error class to all cells for failed loads.
  17661. * UserInterface/TimelinesContentView.css:
  17662. (.content-view.timelines > .data-grid .name-column .icon): Added.
  17663. (.content-view.timelines > .data-grid td.error): Added. Color red.
  17664. (.content-view.timelines > .data-grid tr.selected td.error): Added. Color white.
  17665. 2012-02-21 Timothy Hatcher <timothy@apple.com>
  17666. Start populating the Network timeline data grid with resource load information.
  17667. Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
  17668. Reviewed by Brian Weinstein.
  17669. * Localizations/en.lproj/localizedStrings.js: Updated.
  17670. * UserInterface/Main.html: Included ResourceTimelineDataGridNode.js.
  17671. * UserInterface/Resource.js:
  17672. (WebInspector.Resource): Initialize _responseHeaders to avoid an exception.
  17673. (WebInspector.Resource.prototype.get statusCode): Added.
  17674. (WebInspector.Resource.prototype.get statusText): Added.
  17675. * UserInterface/ResourceTimelineDataGridNode.js: Added.
  17676. (WebInspector.ResourceTimelineDataGridNode):
  17677. (WebInspector.ResourceTimelineDataGridNode.prototype.get data):
  17678. * UserInterface/ResourceTimelineRecord.js:
  17679. (WebInspector.ResourceTimelineRecord): Add event listener for TimestampsDidChange.
  17680. (WebInspector.ResourceTimelineRecord.prototype._dispatchUpdatedEvent): Added. Fire Updated event.
  17681. * UserInterface/TimelinesContentView.css:
  17682. (.content-view.timelines > .data-grid td:last-child):
  17683. (.content-view.timelines > .data-grid td):
  17684. * UserInterface/TimelinesContentView.js:
  17685. (WebInspector.TimelinesContentView): Create the Network data grid headers and populate _pendingRecords.
  17686. (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Call updateWidths
  17687. and _addPendingRecords.
  17688. (WebInspector.TimelinesContentView.prototype.updateLayout): Added.
  17689. (WebInspector.TimelinesContentView.prototype.shown): Call _addPendingRecords.
  17690. (WebInspector.TimelinesContentView.prototype._recordingStarted): Added.
  17691. (WebInspector.TimelinesContentView.prototype._recordAdded): Added.
  17692. (WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Added.
  17693. (WebInspector.TimelinesContentView.prototype._addPendingRecordsSoon): Added.
  17694. (WebInspector.TimelinesContentView.prototype._addPendingRecords): Added.
  17695. (WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Added.
  17696. * UserInterface/Utilities.js:
  17697. (Number.secondsToString): Added. Copied from open source.
  17698. 2012-02-21 Timothy Hatcher <timothy@apple.com>
  17699. Make showing a timeline switch to a different data grid and reflect the selected timeline
  17700. in the sidebar and the navigation bar.
  17701. Also make the timeline show when reopening the inspector when it was showing last time.
  17702. Part of: <rdar://problem/10319553&10319567&10319571>
  17703. Reviewed by Brian Weinstein.
  17704. * UserInterface/InstrumentSidebarPanel.js:
  17705. (WebInspector.InstrumentSidebarPanel): Don't store the tree elements on this. Create a map of tree elements
  17706. based on the the record type.
  17707. (WebInspector.InstrumentSidebarPanel.prototype.showTimeline): Added.
  17708. (WebInspector.InstrumentSidebarPanel.prototype.showTimelineForRecordType): Added. Select the tree element.
  17709. (WebInspector.InstrumentSidebarPanel.prototype.cookieForContentView): Added.
  17710. (WebInspector.InstrumentSidebarPanel.prototype.showContentViewForCookie): Added.
  17711. (WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected):
  17712. * UserInterface/TimelinesContentView.js:
  17713. (WebInspector.TimelinesContentView.createPathComponent): Added.
  17714. (WebInspector.TimelinesContentView): Create the path components and test data grids.
  17715. (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Added. Show the data grid. Update
  17716. the path component. Tell the sidebar panel to select the right tree element.
  17717. (WebInspector.TimelinesContentView.prototype.get selectionPathComponents): Added.
  17718. (WebInspector.TimelinesContentView.prototype.shown): Added.
  17719. (WebInspector.TimelinesContentView.prototype._pathComponentSelected): Added.
  17720. 2012-02-21 Timothy Hatcher <timothy@apple.com>
  17721. Add WebInspector.TimelineRecord and WebInspector.ResourceTimelineRecord. Start recording Network records on load.
  17722. Part of: <rdar://problem/10319553&10319567&10319571>
  17723. Reviewed by Brian Weinstein.
  17724. * UserInterface/Main.html:
  17725. * UserInterface/ResourceTimelineRecord.js: Added.
  17726. (WebInspector.ResourceTimelineRecord):
  17727. (WebInspector.ResourceTimelineRecord.prototype.get resource):
  17728. (WebInspector.ResourceTimelineRecord.prototype.get startTime):
  17729. (WebInspector.ResourceTimelineRecord.prototype.get endTime):
  17730. (WebInspector.ResourceTimelineRecord.prototype.get waitingDuration):
  17731. (WebInspector.ResourceTimelineRecord.prototype.get activeDuration):
  17732. * UserInterface/TimelineManager.js:
  17733. (WebInspector.TimelineManager): Listen for Frame events. Initialize properties.
  17734. (WebInspector.TimelineManager.prototype.get recording): Added.
  17735. (WebInspector.TimelineManager.prototype.get records): Added.
  17736. (WebInspector.TimelineManager.prototype.get recordsWithType): Added.
  17737. (WebInspector.TimelineManager.prototype.startRecording): Clear records. Dispatch RecordingStarted event.
  17738. (WebInspector.TimelineManager.prototype.stopRecording): Clear timeout. Dispatch RecordingStopped event.
  17739. (WebInspector.TimelineManager.prototype._addRecord): Added. Adds record and dispatches RecordAdded event.
  17740. (WebInspector.TimelineManager.prototype._startAutoRecording): Added. Start recording and
  17741. (WebInspector.TimelineManager.prototype._resourceWasAdded): Added. Create a record.
  17742. * UserInterface/TimelineRecord.js: Added.
  17743. (WebInspector.TimelineRecord):
  17744. (WebInspector.TimelineRecord.prototype.get startTime):
  17745. (WebInspector.TimelineRecord.prototype.get endTime):
  17746. (WebInspector.TimelineRecord.prototype.get duration):
  17747. (WebInspector.TimelineRecord.prototype.get waitingDuration):
  17748. (WebInspector.TimelineRecord.prototype.get activeDuration):
  17749. 2012-02-20 Timothy Hatcher <timothy@apple.com>
  17750. Add WebInspector.TimelineObserver and WebInspector.TimelineManager.
  17751. Part of: <rdar://problem/10319553&10319567&10319571>
  17752. Reviewed by Brian Weinstein.
  17753. * UserInterface/Main.html: Included TimelineManager.js and TimelineObserver.js.
  17754. * UserInterface/Main.js: Create an instance of TimelineManager.
  17755. (WebInspector.contentLoaded):
  17756. * UserInterface/TimelineManager.js: Added.
  17757. (WebInspector.TimelineManager):
  17758. (WebInspector.TimelineManager.prototype.startRecording):
  17759. (WebInspector.TimelineManager.prototype.stopRecording):
  17760. (WebInspector.TimelineManager.prototype.eventRecorded):
  17761. * UserInterface/TimelineObserver.js: Added.
  17762. (WebInspector.TimelineObserver):
  17763. (WebInspector.TimelineObserver.prototype.eventRecorded): Call TimelineManager.
  17764. 2012-02-20 Timothy Hatcher <timothy@apple.com>
  17765. Change the names for the Instrument timelines based on feedback from Adam.
  17766. Now: "Network Requests", "Layout & Rendering" and "JavaScript & Events".
  17767. Reviewed by Adam Roben.
  17768. * Localizations/en.lproj/localizedStrings.js: Updated.
  17769. * UserInterface/InstrumentSidebarPanel.js:
  17770. (WebInspector.InstrumentSidebarPanel): Update the tree element titles.
  17771. 2012-02-19 Timothy Hatcher <timothy@apple.com>
  17772. Record network timestamps on WebInspector.Resource along with HTTP response status and sizes.
  17773. Needed for: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
  17774. Reviewed by Joseph Pecoraro.
  17775. * UserInterface/FrameResourceManager.js:
  17776. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Added timestamp parameter.
  17777. (WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache): Added.
  17778. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Added timestamp parameter.
  17779. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
  17780. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData): Added.
  17781. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Added timestamp parameter.
  17782. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
  17783. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
  17784. * UserInterface/NetworkObserver.js:
  17785. (WebInspector.NetworkObserver.prototype.requestWillBeSent): Pass along timestamp.
  17786. (WebInspector.NetworkObserver.prototype.requestServedFromCache): Call markResourceRequestAsServedFromMemoryCache.
  17787. (WebInspector.NetworkObserver.prototype.responseReceived): Pass along timestamp.
  17788. (WebInspector.NetworkObserver.prototype.dataReceived): Call resourceRequestDidReceiveData.
  17789. (WebInspector.NetworkObserver.prototype.loadingFinished): Pass along timestamp.
  17790. (WebInspector.NetworkObserver.prototype.loadingFailed): Ditto.
  17791. (WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Ditto.
  17792. * UserInterface/Resource.js:
  17793. (WebInspector.Resource): Added timestamp parameter.
  17794. (WebInspector.Resource.prototype.get requestSentTimestamp): Added.
  17795. (WebInspector.Resource.prototype.get lastRedirectReceivedTimestamp): Added.
  17796. (WebInspector.Resource.prototype.get responseReceivedTimestamp): Added.
  17797. (WebInspector.Resource.prototype.get lastDataReceivedTimestamp): Added.
  17798. (WebInspector.Resource.prototype.get finishedOrFailedTimestamp): Added.
  17799. (WebInspector.Resource.prototype.get duration): Added.
  17800. (WebInspector.Resource.prototype.get latency): Added.
  17801. (WebInspector.Resource.prototype.get receiveDuration): Added.
  17802. (WebInspector.Resource.prototype.get cached): Added.
  17803. (WebInspector.Resource.prototype.get size): Added.
  17804. (WebInspector.Resource.prototype.get transferSize): Added.
  17805. (WebInspector.Resource.prototype.updateForRedirectResponse): Added timestamp parameter.
  17806. (WebInspector.Resource.prototype.updateForResponse): Ditto.
  17807. (WebInspector.Resource.prototype.increaseSize): Added.
  17808. (WebInspector.Resource.prototype.increaseTransferSize): Added.
  17809. (WebInspector.Resource.prototype.markAsCached): Added.
  17810. (WebInspector.Resource.prototype.markAsFinished): Added timestamp parameter.
  17811. (WebInspector.Resource.prototype.markAsFailed): Ditto.
  17812. 2012-02-19 Timothy Hatcher <timothy@apple.com>
  17813. Show empty content messages for no search results, no recorded profiles and no storage.
  17814. Reviewed by Joseph Pecoraro.
  17815. * Localizations/en.lproj/localizedStrings.js: Updated.
  17816. * UserInterface/InstrumentSidebarPanel.css:
  17817. (.sidebar > .panel.instrument > .empty-content-placeholder): Position with the content.
  17818. * UserInterface/InstrumentSidebarPanel.js:
  17819. (WebInspector.InstrumentSidebarPanel): Call updateEmptyContentPlaceholder.
  17820. * UserInterface/NavigationSidebarPanel.css:
  17821. (.sidebar > .panel.navigation > .empty-content-placeholder): Use a flex box to center the message.
  17822. * UserInterface/NavigationSidebarPanel.js:
  17823. (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder): Added. Helper.
  17824. (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Set and unset _emptyFilterResults.
  17825. * UserInterface/SearchSidebarPanel.css:
  17826. (.sidebar > .panel.search > .empty-content-placeholder): Position with the content.
  17827. * UserInterface/SearchSidebarPanel.js:
  17828. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.updateEmptyContentPlaceholderSoon): Added.
  17829. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.updateEmptyContentPlaceholder): Added.
  17830. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.resourcesCallback.resourceCallback): Call
  17831. updateEmptyContentPlaceholderSoon before any return.
  17832. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.resourcesCallback): Ditto.
  17833. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.domCallback.domSearchResults): Ditto.
  17834. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.domCallback): Ditto.
  17835. * UserInterface/StorageSidebarPanel.js:
  17836. (WebInspector.StorageSidebarPanel): Call _updateEmptyContentPlaceholder.
  17837. (WebInspector.StorageSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
  17838. (WebInspector.StorageSidebarPanel.prototype._addChild): Call _updateEmptyContentPlaceholder.
  17839. (WebInspector.StorageSidebarPanel.prototype._storageCleared): Call _updateEmptyContentPlaceholder.
  17840. 2012-02-19 Timothy Hatcher <timothy@apple.com>
  17841. Make DataGrid have a custom style in the timelines content view.
  17842. Larger headers with matching gradient to the sidebar panel. Also larger rows with a grey alternating row color.
  17843. Part of: <rdar://problem/10319553&10319567&10319571>
  17844. Reviewed by Brian Weinstein.
  17845. * UserInterface/Main.html:
  17846. * UserInterface/TimelinesContentView.css: Added.
  17847. (.content-view.timelines > .data-grid):
  17848. (.content-view.timelines > .data-grid th):
  17849. (.content-view.timelines > .data-grid th:not(:last-child)):
  17850. (.content-view.timelines > .data-grid th.sortable:active):
  17851. (.content-view.timelines > .data-grid th.sort-descending):
  17852. (.content-view.timelines > .data-grid .data-container):
  17853. (.content-view.timelines > .data-grid table.data):
  17854. (.content-view.timelines > .data-grid td):
  17855. (.content-view.timelines > .data-grid td:not(:last-child)):
  17856. * UserInterface/TimelinesContentView.js:
  17857. (WebInspector.TimelinesContentView): Create a dummy DataGrid for position and style testing.
  17858. 2012-02-19 Timothy Hatcher <timothy@apple.com>
  17859. Add an empty content view for the Instrument sidebar timelines.
  17860. Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
  17861. Reviewed by Brian Weinstein.
  17862. * UserInterface/ContentView.js:
  17863. (WebInspector.ContentView): Added check for TimelinesObject.
  17864. (WebInspector.ContentView.isViewable): Added check for TimelinesObject.
  17865. * UserInterface/Images/Stopwatch.png: Added.
  17866. * UserInterface/Images/Stopwatch@2x.png: Added.
  17867. * UserInterface/InstrumentIcons.css:
  17868. (.stopwatch-icon .icon):
  17869. * UserInterface/InstrumentSidebarPanel.js:
  17870. (WebInspector.InstrumentSidebarPanel): Create the _timelinesElement and an instance of TimelinesObject.
  17871. (WebInspector.InstrumentSidebarPanel.prototype.treeElementForRepresentedObject): Added.
  17872. (WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected): Added.
  17873. * UserInterface/Main.html: Included TimelinesContentView.js and TimelinesObject.js.
  17874. * UserInterface/Main.js:
  17875. (WebInspector.sidebarPanelForRepresentedObject): Added check for TimelinesObject.
  17876. * UserInterface/TimelinesContentView.js: Added.
  17877. (WebInspector.TimelinesContentView):
  17878. * UserInterface/TimelinesObject.js: Added.
  17879. (WebInspector.TimelinesObject):
  17880. 2012-02-18 Timothy Hatcher <timothy@apple.com>
  17881. Start implementing the user interface for the Instrument sidebar panel.
  17882. This adds the Loading, Rendering and Scripting tree elements to the top of the sidebar.
  17883. Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
  17884. Reviewed by Brian Weinstein.
  17885. * Localizations/en.lproj/localizedStrings.js: Updated.
  17886. * UserInterface/Images/Colors.png: Added.
  17887. * UserInterface/Images/Colors@2x.png: Added.
  17888. * UserInterface/Images/Network.png: Added.
  17889. * UserInterface/Images/Network@2x.png: Added.
  17890. * UserInterface/Images/Script.png: Added.
  17891. * UserInterface/Images/Script@2x.png: Added.
  17892. * UserInterface/InstrumentIcons.css: Added.
  17893. (.network-icon .icon):
  17894. (.colors-icon .icon):
  17895. (.script-icon .icon):
  17896. * UserInterface/InstrumentSidebarPanel.css: Added.
  17897. (.sidebar > .panel.instrument > .title-bar):
  17898. (.sidebar > .panel.instrument > .title-bar.timelines):
  17899. (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines):
  17900. (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item:not(:first-child):not(.selected)):
  17901. (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item.selected + .item):
  17902. (.sidebar > .panel.instrument > .title-bar.profiles):
  17903. (.sidebar > .panel.instrument > .content):
  17904. * UserInterface/InstrumentSidebarPanel.js:
  17905. (WebInspector.InstrumentSidebarPanel): Create the title abrs and tree outline.
  17906. * UserInterface/Main.html: Included InstrumentSidebarPanel.css and InstrumentIcons.css.
  17907. 2012-02-18 Timothy Hatcher <timothy@apple.com>
  17908. Add support for hiding the disclosure triangle column for sidebar panels that don't have a hierarchy.
  17909. The only panel we have like this right now is Log, but Instrument will also use it.
  17910. Reviewed by Brian Weinstein.
  17911. * UserInterface/LogSidebarPanel.js:
  17912. (WebInspector.LogSidebarPanel): Set HideDisclosureButtonsStyleClassName on the contentTreeOutlineElement.
  17913. * UserInterface/NavigationSidebarPanel.css:
  17914. (.navigation-sidebar-panel-content-tree-outline .item): Remove a margin-top that was pushing all items down
  17915. for no good reason.
  17916. (.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons > .children): Added.
  17917. (.navigation-sidebar-panel-content-tree-outline > .children.hide-disclosure-buttons > .children): Added.
  17918. (.navigation-sidebar-panel-content-tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Added.
  17919. (.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons .item .disclosure-button): Added.
  17920. * UserInterface/NavigationSidebarPanel.js:
  17921. 2012-02-18 Timothy Hatcher <timothy@apple.com>
  17922. Add WebInspector.InstrumentSidebarPanel.
  17923. Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
  17924. Reviewed by Brian Weinstein.
  17925. * UserInterface/InstrumentSidebarPanel.js: Added.
  17926. (WebInspector.InstrumentSidebarPanel):
  17927. * UserInterface/Main.html: Included InstrumentSidebarPanel.js.
  17928. * UserInterface/Main.js:
  17929. (WebInspector.contentLoaded): Create an instance of InstrumentSidebarPanel.
  17930. 2012-02-20 Jeff Miller <jeffm@apple.com>
  17931. Ignore files generated by Xcode inside WebInspectorUI.xcodeproj.
  17932. * WebInspectorUI.xcodeproj: Added property svn:ignore.
  17933. 2012-02-17 Timothy Hatcher <timothy@apple.com>
  17934. Fix a couple of issues where settings were not being retrieved or stored.
  17935. Reviewed by John Sullivan.
  17936. * UserInterface/Setting.js:
  17937. (WebInspector.Setting.prototype.get value): Make a copy of the default value so changes to object values don't modify the default value.
  17938. Switch a use of _name to _localStorageKey when checking if the key in in localStorage.
  17939. (WebInspector.Setting.prototype.set value): Use Object.shallowEqual to better check if objects are equal.
  17940. * UserInterface/Utilities.js:
  17941. (Object.defineProperty): Return early if a or b are null. null is an object, but Object.keys throws for null.
  17942. 2012-02-17 Timothy Hatcher <timothy@apple.com>
  17943. Fix an exception when using the Web Inspector with empty settings.
  17944. Reviewed by Brian Weinstein.
  17945. * UserInterface/DOMTreeContentView.js:
  17946. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Null check this._lastSelectedNodePathSetting.value
  17947. and this._lastSelectedNodePathSetting.value.path.
  17948. 2012-02-17 Timothy Hatcher <timothy@apple.com>
  17949. Prefix the setting keys in localStorage with "com.apple.WebInspector".
  17950. The Web Inspector is loaded from a file url it share localStorage with other local files.
  17951. This prevents conflicting with another key.
  17952. Reviewed by Brian Weinstein.
  17953. * UserInterface/Setting.js:
  17954. (WebInspector.Setting): Set _localStorageKey.
  17955. (WebInspector.Setting.prototype.get value): Use _localStorageKey.
  17956. (WebInspector.Setting.prototype.set value): Ditto.
  17957. 2012-02-17 Timothy Hatcher <timothy@apple.com>
  17958. Cache setting values locally to avoid JSON and localStorage when the value doesn't change often.
  17959. This mimics r107953 from open source with some style cleanup.
  17960. Reviewed by Brian Weinstein.
  17961. * UserInterface/Setting.js:
  17962. (WebInspector.Setting.prototype.get value): Return this._value if it exists.
  17963. (WebInspector.Setting.prototype.set value): Set _value.
  17964. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  17965. Don't store settings in localStorage with values equal to the default value.
  17966. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  17967. Reviewed by Ada Chan.
  17968. * UserInterface/Setting.js:
  17969. (WebInspector.Setting.prototype.set value): Call removeItem if the value equals the default value.
  17970. 2012-02-17 Timothy Hatcher <timothy@apple.com>
  17971. Remember the last selected DOM node between reloads and Inspector sessions.
  17972. Last part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  17973. Reviewed by Brian Weinstein.
  17974. * UserInterface/DOMTreeContentView.js:
  17975. (WebInspector.DOMTreeContentView): Create the setting. Use _requestRootDOMNode.
  17976. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Try to select the last DOM node
  17977. if the URL matches, otherwise just select the body or document element.
  17978. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode): Added.
  17979. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectLastSelectedNode): Added.
  17980. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeInvalidated): Don't set rootDOMNode to null.
  17981. This minimizes DOM tree churn and better matches what the open source inspector does.
  17982. (WebInspector.DOMTreeContentView.prototype._requestRootDOMNode): Added helper.
  17983. (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Remember the selected node path.
  17984. * UserInterface/DOMTreeUpdater.js:
  17985. (WebInspector.DOMTreeUpdater.prototype._reset): Don't set rootDOMNode to null. DOMTreeContentView handles it.
  17986. 2012-02-17 Timothy Hatcher <timothy@apple.com>
  17987. Minimize the number of times DOMTree's RootDOMNodeInvalidated event fires.
  17988. This was causing some DOM tree churn on reload. There is still some churn, but this helps.
  17989. Reviewed by Brian Weinstein.
  17990. * UserInterface/DOMTree.js:
  17991. (WebInspector.DOMTree): Only add extra event listeners when not the main frame.
  17992. (WebInspector.DOMTree.prototype.get frame): Added for good measure, will be needed soon.
  17993. (WebInspector.DOMTree.prototype.requestRootDOMNode): Bump the request identifier.
  17994. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Check the request identifier.
  17995. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Ditto.
  17996. (WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Ditto.
  17997. (WebInspector.DOMTree.prototype._nodeRemoved): Assert not the main frame.
  17998. (WebInspector.DOMTree.prototype._frameMainResourceDidChange): Ditto.
  17999. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18000. Add support to the storage sidebar panel to restore the last content view.
  18001. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18002. Reviewed by Brian Weinstein.
  18003. * UserInterface/StorageSidebarPanel.js:
  18004. (WebInspector.StorageSidebarPanel.prototype.cookieForContentView): Added. Create a cookie based on the
  18005. type of the represented object.
  18006. (WebInspector.StorageSidebarPanel.prototype.showContentViewForCookie.finalizeCookieChecking): Walk all the tree
  18007. elements and match them based on type alone. So if you were looking at cookies on one site, and later open the
  18008. inspector on another site, the new site's cookies will show.
  18009. (WebInspector.StorageSidebarPanel.prototype.showContentViewForCookie): Set a timeout to call finalizeCookieChecking.
  18010. (WebInspector.StorageSidebarPanel.prototype._checkTreeElementAgainstPendingContentViewCookie): Added.
  18011. (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded): Call _checkTreeElementAgainstPendingContentViewCookie.
  18012. (WebInspector.StorageSidebarPanel.prototype._databaseWasAdded): Ditto.
  18013. (WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded): Ditto.
  18014. (WebInspector.StorageSidebarPanel.prototype._frameManifestAdded): Ditto.
  18015. (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Style cleanup.
  18016. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18017. Add support to the log sidebar panel to restore the last content view.
  18018. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18019. Reviewed by Brian Weinstein.
  18020. * UserInterface/LogSidebarPanel.js:
  18021. (WebInspector.LogSidebarPanel.prototype.cookieForContentView): Added.
  18022. (WebInspector.LogSidebarPanel.prototype.showContentViewForCookie): Added.
  18023. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18024. Add support to the resource sidebar panel to restore the last content view and select the resource in the sidebar.
  18025. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18026. Reviewed by Brian Weinstein.
  18027. * UserInterface/ResourceSidebarPanel.js:
  18028. (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Added. Return a cookie with the resource URL.
  18029. (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie): Added. Find the resource by URL and shows it.
  18030. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame): Cleaned up to match showContentViewForCookie.
  18031. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Call showContentViewForCookie if _cookieToShowWhenAvailable.
  18032. (WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): Remove code that moved into showSourceCodeForFrame.
  18033. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18034. Add support for remembering the last content view so it can potentially be restored next session.
  18035. This requires each sidebar to supply a cookie and restore it on load. No sidebars support it yet.
  18036. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18037. Reviewed by Brian Weinstein.
  18038. * UserInterface/Main.js:
  18039. (WebInspector.contentLoaded): Create setting objects for the responsible sidebar panel and cookie.
  18040. (WebInspector.sidebarPanelForRepresentedObject): Added. Broke out of contentBrowserTreeElementForRepresentedObject.
  18041. (WebInspector.contentBrowserTreeElementForRepresentedObject): Use sidebarPanelForRepresentedObject.
  18042. (WebInspector._updateCurrentContentViewCookie): Added. Asks the responsible sidebar panel for a cookie.
  18043. (WebInspector._contentBrowserRepresentedObjectsDidChange): Call _updateCurrentContentViewCookie.
  18044. * UserInterface/NavigationSidebarPanel.js:
  18045. (WebInspector.NavigationSidebarPanel.prototype.cookieForContentView): Added stub.
  18046. (WebInspector.NavigationSidebarPanel.prototype.showContentViewForCookie): Added. Ditto.
  18047. * UserInterface/Sidebar.js:
  18048. (WebInspector.Sidebar.prototype.removeSidebarPanel): Use findSidebarPanel.
  18049. (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Ditto.
  18050. (WebInspector.Sidebar.prototype.findSidebarPanel): Renamed from _findSidebarPanel.
  18051. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18052. Remember what view was last used for frames (DOM Tree or Source Code).
  18053. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18054. Reviewed by Joseph Pecoraro.
  18055. * UserInterface/FrameContentView.js:
  18056. (WebInspector.FrameContentView): Create a setting.
  18057. (WebInspector.FrameContentView.prototype.shown): Use the setting to call _showContentViewForIdentifier.
  18058. (WebInspector.FrameContentView.prototype._identifierForContentView): Added. Helper.
  18059. (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Set the setting value.
  18060. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18061. If the left sidebar is collapsed, then show the dock buttons in the content browser navigation bar.
  18062. Reviewed by Adam Roben.
  18063. * UserInterface/Main.js:
  18064. (WebInspector.contentLoaded): Make a static dockButtonDividerNavigationItem. Remove inserts for the buttons.
  18065. (WebInspector.updateDockedState): Call _updateDockNavigationItems.
  18066. (WebInspector._updateDockNavigationItems): Added. Shows the buttons in the right navigation bar based on
  18067. docked and left sidebar collapsed state.
  18068. (WebInspector._sidebarCollapsedStateDidChange): Call _updateDockNavigationItems.
  18069. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18070. Add a null check in resourceForURL, since the mainFrame can be null if called early enough.
  18071. Reviewed by Joseph Pecoraro.
  18072. * UserInterface/FrameResourceManager.js:
  18073. (WebInspector.FrameResourceManager.prototype.resourceForURL): Null check mainFrame.
  18074. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18075. Add WebInspector.ContentBrowser.Event.CurrentContentViewDidChange.
  18076. Reviewed by Joseph Pecoraro.
  18077. * UserInterface/ContentBrowser.js:
  18078. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Fire the CurrentContentViewDidChange event.
  18079. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18080. Remember the expanded state of frames and folders in the resource sidebar panel.
  18081. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18082. Reviewed by Brian Weinstein.
  18083. * UserInterface/FrameTreeElement.js:
  18084. (WebInspector.FrameTreeElement): Call _updateExpandedSetting.
  18085. (WebInspector.FrameTreeElement.prototype.onexpand): Added. Set the expanded setting value.
  18086. (WebInspector.FrameTreeElement.prototype.oncollapse): Added. Set the expanded setting value.
  18087. (WebInspector.FrameTreeElement.prototype.removeChildren): Delete the folder tree elements.
  18088. (WebInspector.FrameTreeElement.prototype._updateExpandedSetting): Added.
  18089. (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Change the expanded setting since the frame URL has changed.
  18090. (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Removed _shouldExpandWhenFirstChildIsAdded code.
  18091. (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject.createFolderTreeElement): Added.
  18092. Sets up the onexpand and oncollapse listeners and creates a expanded setting.
  18093. (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject): Use createFolderTreeElement.
  18094. (WebInspector.FrameTreeElement.prototype._folderTreeElementExpandedStateChange): Added. Set the expanded setting value.
  18095. * UserInterface/ResourceSidebarPanel.js:
  18096. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Remove a call to expand, that is handled by FrameTreeElement now.
  18097. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18098. Support expanding a TreeElement before it has children, so it will expand once the first child is added.
  18099. Needed for: <rdar://problem/10854042> Remember aspects of the user interface customization
  18100. Reviewed by Brian Weinstein.
  18101. * UserInterface/TreeOutline.js:
  18102. (TreeOutline.prototype.appendChild): Call expand if this is the first child.
  18103. (TreeOutline.prototype.insertChild): Ditto.
  18104. (TreeElement.prototype.expand): Set the expanded flag even if there are no children.
  18105. 2012-02-16 Timothy Hatcher <timothy@apple.com>
  18106. Use a hash of the URL instead of the whole URL for remembering the last page searched.
  18107. This way the URL isn't cluttering localStorage for size and privacy reasons.
  18108. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18109. Reviewed by Adam Roben.
  18110. * UserInterface/SearchSidebarPanel.js:
  18111. (WebInspector.SearchSidebarPanel.prototype.performSearch): Use hash when setting
  18112. the _lastSearchedPageSetting.value.
  18113. (WebInspector.SearchSidebarPanel.prototype._mainFrameDidChange): Use hash when comparing
  18114. with the _lastSearchedPageSetting.value.
  18115. * UserInterface/Utilities.js:
  18116. (String.prototype.hash): Added. Based on wtf/StringHasher.h (SuperFastHash) algorithm.
  18117. 2012-02-15 Timothy Hatcher <timothy@apple.com>
  18118. Remember the search term and rerun the search when re-opening the inspector on the same page.
  18119. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18120. Reviewed by Brian Weinstein.
  18121. * UserInterface/SearchSidebarPanel.js:
  18122. (WebInspector.SearchSidebarPanel): Store the inputElement on the object and add an event
  18123. listener for the MainFrameChanged event. Create the setting objects and restore the search term.
  18124. (WebInspector.SearchSidebarPanel.prototype.performSearch): Broken out from _searchFieldChanged.
  18125. (WebInspector.SearchSidebarPanel.prototype._searchFieldChanged): Call performSearch.
  18126. (WebInspector.SearchSidebarPanel.prototype._mainFrameDidChange): Added. Call performSearch
  18127. if the frame change is the first and the page is the same as the last time.
  18128. 2012-02-15 Timothy Hatcher <timothy@apple.com>
  18129. Remember the filter bar filters for each navigation sidebar panel.
  18130. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18131. Reviewed by Brian Weinstein.
  18132. * UserInterface/FilterBar.js:
  18133. (WebInspector.FilterBar.prototype.set filters): Added.
  18134. * UserInterface/NavigationSidebarPanel.js:
  18135. (WebInspector.NavigationSidebarPanel): Create the filters setting.
  18136. (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Set the filters setting.
  18137. 2012-02-15 Timothy Hatcher <timothy@apple.com>
  18138. Remember the collapsed state of sections in the details sidebar.
  18139. Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
  18140. (sidebar state, last view, etc.)
  18141. Reviewed by Brian Weinstein.
  18142. * UserInterface/AppearanceDetailsSidebarPanel.js:
  18143. (WebInspector.AppearanceDetailsSidebarPanel): Give identifiers to DetailsSections.
  18144. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  18145. (WebInspector.ApplicationCacheDetailsSidebarPanel): Give identifiers to DetailsSections.
  18146. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  18147. (WebInspector.DOMNodeDetailsSidebarPanel): Give identifiers to DetailsSections.
  18148. * UserInterface/DetailsSection.js:
  18149. (WebInspector.DetailsSection): Create a collapsed setting. Set collapsed to the value of the setting.
  18150. (WebInspector.DetailsSection.prototype.get identifier): Added.
  18151. (WebInspector.DetailsSection.prototype.set collapsed): Update the collapsed setting.
  18152. * UserInterface/ResourceDetailsSidebarPanel.js:
  18153. (WebInspector.ResourceDetailsSidebarPanel): Give identifiers to DetailsSections.
  18154. 2012-02-15 Timothy Hatcher <timothy@apple.com>
  18155. Remember the last selected navigation sidebar panel, the sidebar widths and their collapsed state.
  18156. <rdar://problem/10854042> Remember aspects of the user interface customization (sidebar state, last view, etc.)
  18157. Reviewed by Brian Weinstein.
  18158. * UserInterface/Main.js:
  18159. (WebInspector.contentLoaded): Listed for SidebarPanelSelected. Use _sidebarWidthDidChange for WidthDidChange.
  18160. Create setting objects for last selected navigation sidebar panel, the sidebar widths and their collapsed state.
  18161. (WebInspector._sidebarCollapsedStateDidChange): Update the collapsed settings.
  18162. (WebInspector._navigationSidebarPanelSelected): Added. Update the last selected navigation sidebar panel setting.
  18163. (WebInspector._sidebarWidthDidChange): Added. Update the width settings. Call _contentBrowserSizeDidChange.
  18164. * UserInterface/Sidebar.js:
  18165. (WebInspector.Sidebar.prototype.set width): Return early if the width is the same. This avoids sending events
  18166. if the width didn't change.
  18167. (WebInspector.Sidebar.prototype.set collapsed): Return early if the collapsed state is the same. This avoids
  18168. sending events if the collapsed state didn't change.
  18169. 2012-02-15 Timothy Hatcher <timothy@apple.com>
  18170. Add WebInspector.Setting from Open Source.
  18171. <rdar://problem/10854042> Remember aspects of the user interface customization (sidebar state, last view, etc.)
  18172. Reviewed by Brian Weinstein.
  18173. * UserInterface/Main.html: Included Setting.js.
  18174. * UserInterface/Setting.js: Added. Copied partially from OpenSource/Source/WebCore/inspector/front-end/Settings.js.
  18175. (WebInspector.Setting):
  18176. (WebInspector.Setting.prototype.get name):
  18177. (WebInspector.Setting.prototype.get value):
  18178. (WebInspector.Setting.prototype.set value):
  18179. 2012-02-14 Brian Weinstein <bweinstein@apple.com>
  18180. <rdar://problem/10857306> Consider putting "Show Activity" menu item in Develop menu as mitigation for the old Activity window.
  18181. Reviewed by Tim Hatcher.
  18182. * UserInterface/InspectorFrontendAPI.js:
  18183. (InspectorFrontendAPI.showResources): Make the resources panel the selected panel, and make it not collapsed.
  18184. 2012-02-14 Timothy Hatcher <timothy@apple.com>
  18185. Tail truncate the search result title so the tooltip does not get too large.
  18186. <rdar://problem/10843369> Web Inspector should impose limit on tooltip size to avoid insanely large tooltips
  18187. Reviewed by John Sullivan.
  18188. * UserInterface/SearchResultTreeElement.js:
  18189. (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Truncate the title at the end to 50 characters max.
  18190. Use \u2026 instead of the actual ellipsis character since UTF8 in source code makes me nervous.
  18191. 2012-02-14 Timothy Hatcher <timothy@apple.com>
  18192. Show failed resources when first opening the Web Inspector.
  18193. This is the Safari side of the Open Source r107715.
  18194. Follow up to: <rdar://problem/10843653>
  18195. Reviewed by Brian Weinstein.
  18196. * UserInterface/FrameResourceManager.js:
  18197. (WebInspector.FrameResourceManager.prototype._createResource): Set the loaderId for good measure.
  18198. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Check for failed and canceled.
  18199. 2012-02-13 Joseph Pecoraro <pecoraro@apple.com>
  18200. <rdar://problem/10854052> Cmd-C (and Copy menu item) don't work for selected line in DOM Tree
  18201. Allow the current ContentView to handle a "copy" event.
  18202. If the ContentView implements handleCopyEvent and there is
  18203. no window selection, we send the copy event to the ContentView.
  18204. Reviewed by Timothy Hatcher.
  18205. * UserInterface/Main.js:
  18206. (WebInspector.contentLoaded):
  18207. (WebInspector._beforecopy):
  18208. (WebInspector._copy):
  18209. Add support for passing copy event to a ContentView implementing handleCopyEvent.
  18210. * UserInterface/DOMTreeContentView.js:
  18211. (WebInspector.DOMTreeContentView.prototype.handleCopyEvent):
  18212. * UserInterface/FrameContentView.js:
  18213. (WebInspector.FrameContentView.prototype.handleCopyEvent):
  18214. A DOMTreeContentView allows copying the current selected element.
  18215. 2012-02-13 Joseph Pecoraro <pecoraro@apple.com>
  18216. <rdar://problem/10854052> Cmd-C (and Copy menu item) don't work for selected line in DOM Tree
  18217. Merge r105679 from Open Source's frontend to get the "Copy as HTML"
  18218. context menu working.
  18219. Reviewed by Timothy Hatcher.
  18220. * UserInterface/DOMNode.js:
  18221. (WebInspector.DOMNode.prototype.copyNode):
  18222. 2012-02-13 Joseph Pecoraro <pecoraro@apple.com>
  18223. Make RemoteDebugger work on 10.7.3.
  18224. When the front-end is run on an earlier Lion system, such as
  18225. SULionDuchess in RemoteDebugger.app, it fails because
  18226. Function.prototype.bind is unavailable. Since this appears to be the
  18227. only deficiency at the moment, lets define it when its not available.
  18228. Reviewed by Timothy Hatcher.
  18229. * UserInterface/Main.html:
  18230. Move Utilities.js earlier.
  18231. * UserInterface/Utilities.js:
  18232. Provide a Function.prototype.bind implementation when unavailable.
  18233. 2012-02-13 Timothy Hatcher <timothy@apple.com>
  18234. Make failed resources show up with red text in the sidebar and show an error message when selected.
  18235. <rdar://problem/10843653> Failed resources have no visible distinction in the new Web Inspector
  18236. Reviewed by Brian Weinstein.
  18237. * Localizations/en.lproj/localizedStrings.js: Updated.
  18238. * UserInterface/FontResourceContentView.js:
  18239. (WebInspector.FontResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
  18240. * UserInterface/GeneralTreeElement.js:
  18241. (WebInspector.GeneralTreeElement.prototype.addClassName): Added.
  18242. (WebInspector.GeneralTreeElement.prototype.removeClassName): Added.
  18243. * UserInterface/ImageResourceContentView.js:
  18244. (WebInspector.ImageResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
  18245. * UserInterface/Main.css:
  18246. (.message-text-view): Reduced the line-height and added some padding.
  18247. (.message-text-view.error): Changed the color of red to a ddarker shade.
  18248. (.message-text-view.error::before): Added. Show an error icon.
  18249. * UserInterface/Main.html:
  18250. * UserInterface/ResourceContentView.js:
  18251. (WebInspector.ResourceContentView): Added issue event listener and issue code from TextResourceContentView.
  18252. (WebInspector.ResourceContentView.prototype.contentAvailable): Removed resource parameter.
  18253. (WebInspector.ResourceContentView.prototype.addIssue): Added.
  18254. (WebInspector.ResourceContentView.prototype.closed): Remove issue event listener.
  18255. (WebInspector.ResourceContentView.prototype._contentAvailable): Added.
  18256. (WebInspector.ResourceContentView.prototype._issueWasAdded): Added.
  18257. * UserInterface/ResourceTreeElement.css: Added.
  18258. (.item.resource.failed): Color text red.
  18259. (.item.resource.failed .subtitle): Ditto.
  18260. * UserInterface/ResourceTreeElement.js:
  18261. (WebInspector.ResourceTreeElement): Add the resource style class.
  18262. (WebInspector.ResourceTreeElement.prototype._updateLoadingStatus): Add or remove the failed style class.
  18263. (WebInspector.ResourceTreeElement.prototype._typeDidChange): Use addClassName and removeClassName.
  18264. * UserInterface/TextResourceContentView.js:
  18265. (WebInspector.TextResourceContentView): Removed the issue code, it is now in ResourceContentView.
  18266. (WebInspector.TextResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
  18267. (WebInspector.TextResourceContentView.prototype.addIssue): Show a full error message if there is no content yet.
  18268. 2012-02-13 Timothy Hatcher <timothy@apple.com>
  18269. Fix a bug where opening the Inspector while loading a page could cause a subresource that just finished loading
  18270. to be shown in the Inspector as the main resource.
  18271. Reviewed by Brian Weinstein.
  18272. * UserInterface/FrameResourceManager.js:
  18273. (WebInspector.FrameResourceManager.prototype.initialize): Set _waitingForMainFrameResourceTreePayload.
  18274. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Return early if _waitingForMainFrameResourceTreePayload.
  18275. (WebInspector.FrameResourceManager.prototype.frameDidDetach): Ditto.
  18276. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Ditto.
  18277. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Ditto.
  18278. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
  18279. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Ditto.
  18280. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
  18281. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
  18282. (WebInspector.FrameResourceManager.prototype._addResourceToFrame): Ditto.
  18283. (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload): Delete _waitingForMainFrameResourceTreePayload.
  18284. Also clear the _resourceRequestIdentifierMap and _frameIdentifierMap maps.
  18285. 2012-02-13 Timothy Hatcher <timothy@apple.com>
  18286. Make sure the sidebar tree is ready before showing the source code in response to a Show Page Source user action.
  18287. Also reveal and select the frame in the Resource sidebar for which the source was shown.
  18288. <rdar://problem/10855004> File path components are missing when using Show Page Source menu item
  18289. Reviewed by Brian Weinstein.
  18290. * UserInterface/InspectorFrontendAPI.js:
  18291. (InspectorFrontendAPI.showMainResourceForFrame):
  18292. * UserInterface/ResourceSidebarPanel.js:
  18293. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame):
  18294. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Added. A custom implementation is
  18295. needed for this since the frames are populated lazily.
  18296. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.getParent): Added.
  18297. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor): Added.
  18298. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Check for _frameIdentifierToShowSourceCodeWhenAvailable
  18299. and call showSourceCodeForFrame.
  18300. (WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): Return early if the main frame tree element isn't
  18301. in the sidebar tree outline yet.
  18302. 2012-02-13 Timothy Hatcher <timothy@apple.com>
  18303. Remove the "Create RemoteWebInspector.framework symlinks" build phase now that all
  18304. clients are off the old framework.
  18305. This also fixes a build error seen in the archive builders.
  18306. <rdar://problem/10828236> Remove Symlinks for RemoteWebInspector.framework
  18307. Rubber-stamped by Joseph Pecoraro.
  18308. * WebInspectorUI.xcodeproj/project.pbxproj: Removed "Create RemoteWebInspector.framework symlinks".
  18309. 2012-02-12 Timothy Hatcher <timothy@apple.com>
  18310. Enable localization of the new Web Inspector again.
  18311. <rdar://problem/10688721>
  18312. Reviewed by John Sullivan.
  18313. * Localizations/en.lproj/localizedStrings.js: Updated.
  18314. * UserInterface/Main.js:
  18315. (WebInspector.UIString): Lookup the string in window.localizedStrings again.
  18316. 2012-02-11 Timothy Hatcher <timothy@apple.com>
  18317. Minify the CSS and JavaScript resources in Production builds.
  18318. <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
  18319. Reviewed by Joseph Pecoraro.
  18320. * Scripts/cssmin.py: Added.
  18321. * Scripts/jsmin.py: Copied from Safari/Reader/jsmin.py.
  18322. * WebInspectorUI.xcodeproj/project.pbxproj: Call cssmin.py on Main.css and jsmin.py on Main.js.
  18323. 2012-02-11 Timothy Hatcher <timothy@apple.com>
  18324. Remove console.assert() calls from Productions builds.
  18325. <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
  18326. Reviewed by Joseph Pecoraro.
  18327. * Scripts/remove-console-asserts.pl: Added.
  18328. * WebInspectorUI.xcodeproj/project.pbxproj: Call remove-console-asserts.pl on the combined Main.js file.
  18329. 2012-02-11 Timothy Hatcher <timothy@apple.com>
  18330. Combine scripts and stylesheets into single files in Production builds.
  18331. <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
  18332. Reviewed by Joseph Pecoraro.
  18333. * Scripts/combine-resources.pl: Added.
  18334. * Scripts/copy-user-interface-resources.sh: Call combine-resources.pl in Production builds.
  18335. * UserInterface/Main.html: Removed a FIXME comment that gets in the way of combine-resources.pl.
  18336. * WebInspectorUI.xcodeproj/project.pbxproj: Added combine-resources.pl.
  18337. 2012-02-11 Timothy Hatcher <timothy@apple.com>
  18338. Build the user interface files into the WebInspector framework.
  18339. <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
  18340. Reviewed by Joseph Pecoraro.
  18341. * Configurations/Base.xcconfig: Added WEBKIT_UMBRELLA_FRAMEWORKS_DIR and WEBCORE_PRIVATE_HEADERS_DIR.
  18342. * Configurations/DebugRelease.xcconfig: Added WEBKIT_UMBRELLA_FRAMEWORKS_DIR for engineering builds.
  18343. * Scripts/copy-user-interface-resources.sh: Added.
  18344. * WebInspectorUI.xcodeproj/project.pbxproj: Added UserInterface folder, localizedStrings.js,
  18345. Copy User Interface Resources and Copy WebCore Inspector Resources build phases.
  18346. 2012-02-11 Timothy Hatcher <timothy@apple.com>
  18347. Move Safari/Develop/WebInspector to WebInspector/UserInterface.
  18348. <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
  18349. Reviewed by Joseph Pecoraro.
  18350. * ChangeLog: Copied over the Safari/ChangeLog entries with changes in Safari/Develop/WebInspector.
  18351. * UserInterface: Renamed from Safari/Develop/WebInspector.
  18352. 2012-02-10 Timothy Hatcher <timothy@apple.com>
  18353. Copy over StylesSidebarPane.js from Open Source and break it up into one class per file.
  18354. Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  18355. Reviewed by Brian Weinstein.
  18356. * UserInterface/BlankStylePropertiesSection.js: Copied from OpenSource/Source/WebCore/inspector/front-end/StylesSidebarPane.js.
  18357. * UserInterface/CSSPropertyPrompt.js: Ditto.
  18358. * UserInterface/ComputedStylePropertiesSection.js: Ditto.
  18359. * UserInterface/StylePropertiesSection.js: Ditto.
  18360. * UserInterface/StylePropertyTreeElement.js: Ditto.
  18361. 2012-02-10 Timothy Hatcher <timothy@apple.com>
  18362. Collapse bread-crumb compoenents in the middle when there ins't enough room to show them all.
  18363. This keeps the important ones (the ends) on the screen while hiding the less important middle.
  18364. Reviewed by Brian Weinstein.
  18365. * UserInterface/HierarchicalPathComponent.css:
  18366. (.hierarchical-path-component.hidden): Added.
  18367. (.hierarchical-path-component.collapsed): Added.
  18368. (.hierarchical-path-component.collapsed > .icon): Added.
  18369. (.hierarchical-path-component.collapsed > .title): Added.
  18370. (.hierarchical-path-component.collapsed > select): Added.
  18371. (.hierarchical-path-component > .separator): Added.
  18372. * UserInterface/HierarchicalPathComponent.js:
  18373. (WebInspector.HierarchicalPathComponent.prototype.get hidden): Added.
  18374. (WebInspector.HierarchicalPathComponent.prototype.set hidden): Added.
  18375. (WebInspector.HierarchicalPathComponent.prototype.get collapsed): Added.
  18376. (WebInspector.HierarchicalPathComponent.prototype.set collapsed): Added.
  18377. * UserInterface/HierarchicalPathNavigationItem.js:
  18378. (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Delete _collapsedComponent.
  18379. (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Loop through the components starting
  18380. at the middle and fanning out in each direction to collapse until widthToRemove depleted.
  18381. 2012-02-10 Brian Weinstein <bweinstein@apple.com>
  18382. Show page and frame source using the new inspector if it is enabled.
  18383. When the user selects Show Page Source from the Develop menu or Show Page Source or Show Frame Source
  18384. from the context menu, call new WKInspector API if we are using the new inspector.
  18385. <rdar://problem/10830076> Show Page Source should open the new Web Inspector to the page source
  18386. <rdar://problem/10844831> Show Frame Source should open the new Web Inspector to that frame's source
  18387. Reviewed by Tim Hatcher.
  18388. * UserInterface/InspectorFrontendAPI.js:
  18389. (InspectorFrontendAPI.showMainResourceForFrame): Call through to the ResourceSidebarPanel.
  18390. * UserInterface/ResourceSidebarPanel.js:
  18391. (WebInspector.ResourceSidebarPanel):
  18392. (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame): If we have a Frame object for
  18393. the frame ID we were given, find its content view and show the source for it. If there isn't a frame
  18394. object yet, store the frame ID for the frame we want to show.
  18395. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): If we want to show a frame ID when it becomes
  18396. available, then return early before showing the main resource.
  18397. (WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): If we are waiting to show a frame's source, and it
  18398. was just added, then call showSourceCodeForFrame.
  18399. 2012-02-09 Timothy Hatcher <timothy@apple.com>
  18400. Set a default tooltip for GeneralTreeElements if there isn't a custom one already assigned.
  18401. This gives the user a way to read truncated titles for all the sidebar tree elements.
  18402. Reviewed by Brian Weinstein.
  18403. * UserInterface/GeneralTreeElement.js:
  18404. (WebInspector.GeneralTreeElement.prototype._updateTitleElements): Build a tool tip based on the
  18405. main title and subtitle.
  18406. 2012-02-09 Brian Weinstein <bweinstein@apple.com>
  18407. Clean up the code to set the titles of application cache manifest and frame tree elements.
  18408. This patch moves the responsibility of generating titles and subtitles for the application cache
  18409. manifests and frames from their represented objects to the tree elements.
  18410. Reviewed by Tim Hatcher.
  18411. * UserInterface/ApplicationCacheFrame.js: Moved code from here...
  18412. * UserInterface/ApplicationCacheFrameTreeElement.js: ... to here.
  18413. (WebInspector.ApplicationCacheFrameTreeElement): Pass a blank title, it will be populated by updateTitles, and then call updateTitles.
  18414. (WebInspector.ApplicationCacheFrameTreeElement.prototype.constructor.WebInspector.ApplicationCacheFrameTreeElement.updateTitles): Set the
  18415. mainTitle and the subtitle on the GeneralTreeElement.
  18416. * UserInterface/ApplicationCacheManifest.js: Moved code from here...
  18417. * UserInterface/ApplicationCacheManifestTreeElement.js: ... to here.
  18418. (WebInspector.ApplicationCacheManifestTreeElement): Pass an empty title. StorageTreeElement will populate it when the flattened variable
  18419. is set.
  18420. (WebInspector.ApplicationCacheManifestTreeElement.prototype.constructor.WebInspector.ApplicationCacheManifestTreeElement.get name): Call _generateTitles
  18421. if necessary, and then return the name.
  18422. (WebInspector.ApplicationCacheManifestTreeElement.prototype.get secondaryName): Call _generateTitles if necessary, and then
  18423. return the secondary name.
  18424. (WebInspector.ApplicationCacheManifestTreeElement.prototype._generateTitles): Moved from ApplicationCacheManifest.js.
  18425. 2012-02-09 Brian Weinstein <bweinstein@apple.com>
  18426. Implement a better titling scheme for application cache manifests and frames.
  18427. This patch reworks the titles and subtitles of application cache manifests and frames.
  18428. For the manifest, if it is collapsed, it will say: Application Cache - Manifest Name.
  18429. If it isn't collapsed (there is a top level "Application Cache" folder), then it will say: Manifest Name - Host Name.
  18430. For the frame, the main title will be the last path component of the frame (if it exists), or the host. The subtitle
  18431. will be the host, if the host isn't the same as the main title of the frame, or the subtitle of the application cache
  18432. manifest's tree element.
  18433. Rest of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18434. Reviewed by Tim Hatcher.
  18435. * UserInterface/ApplicationCacheFrame.js:
  18436. (WebInspector.ApplicationCacheFrame.prototype.get title): Call _generateTitles, which doesn't return a title anymore.
  18437. (WebInspector.ApplicationCacheFrame.prototype.get subtitle): Call _generateTitles and return this._subtitle.
  18438. (WebInspector.ApplicationCacheFrame.prototype.clearTitles): Set the subtitle and main title to null, and call _generateTitles.
  18439. (WebInspector.ApplicationCacheFrame.prototype._generateTitles): Clean up the code to generate a main title, and generate
  18440. a subtitle as well.
  18441. * UserInterface/ApplicationCacheFrameTreeElement.js:
  18442. (WebInspector.ApplicationCacheFrameTreeElement): Pass the title and the subtitle.
  18443. (WebInspector.ApplicationCacheFrameTreeElement.prototype.constructor.WebInspector.ApplicationCacheFrameTreeElement.updateTitles):
  18444. Clear the titles on the represented object, and set the mainTitle and subtitle on the tree element to their new values.
  18445. * UserInterface/ApplicationCacheManifest.js:
  18446. (WebInspector.ApplicationCacheManifest.prototype.get title): Call _generateTitles.
  18447. (WebInspector.ApplicationCacheManifest.prototype.get subtitle): Ditto.
  18448. (WebInspector.ApplicationCacheManifest.prototype._generateTitles): Clean up the code to generate a main title and also generate
  18449. a subtitle.
  18450. * UserInterface/ApplicationCacheManifestTreeElement.js:
  18451. (WebInspector.ApplicationCacheManifestTreeElement.prototype.get secondaryName): Get the represented object's subtitle.
  18452. * UserInterface/StorageTreeElement.js:
  18453. (WebInspector.StorageTreeElement): Use the flattened setter instead of setting the variable. The setter does a bit more work
  18454. that we need to do.
  18455. (WebInspector.StorageTreeElement.prototype.set flattened): Add the ability to set a subtitle when we are not flattened. If the
  18456. flattening changes, call _updateChildrensTitles.
  18457. (WebInspector.StorageTreeElement.prototype._updateChildrensTitles): Call updateTitles for each child that has updateTitles in their
  18458. prototype.
  18459. 2012-02-09 Brian Weinstein <bweinstein@apple.com>
  18460. Have ApplicationCacheFrameContentView listen for when application cache statuses change.
  18461. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18462. Reviewed by Tim Hatcher.
  18463. * UserInterface/ApplicationCacheFrameContentView.js:
  18464. (WebInspector.ApplicationCacheFrameContentView): Add an event listener.
  18465. (WebInspector.ApplicationCacheFrameContentView.prototype.closed): Remove an event listener.
  18466. (WebInspector.ApplicationCacheFrameContentView.prototype._updateStatus): Call through to updateStatus.
  18467. 2012-02-09 Brian Weinstein <bweinstein@apple.com>
  18468. Remove a bunch of dead code from ApplicationCacheFrameContentView.
  18469. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18470. Reviewed by Tim Hatcher.
  18471. * UserInterface/ApplicationCacheFrameContentView.js:
  18472. (WebInspector.ApplicationCacheFrameContentView):
  18473. (WebInspector.ApplicationCacheFrameContentView.prototype.updateStatus):
  18474. 2012-02-09 Brian Weinstein <bweinstein@apple.com>
  18475. Add icons for application cache manifest and frame tree elements.
  18476. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18477. Reviewed by Tim Hatcher.
  18478. * UserInterface/ApplicationCacheFrameTreeElement.js:
  18479. (WebInspector.ApplicationCacheFrameTreeElement): Set a class name.
  18480. * UserInterface/ApplicationCacheManifestTreeElement.js:
  18481. (WebInspector.ApplicationCacheManifestTreeElement): Ditto.
  18482. * UserInterface/ApplicationCacheIcons.css: Added.
  18483. * UserInterface/Images/ApplicationCache.png: Added.
  18484. * UserInterface/Images/ApplicationCache@2x.png: Added.
  18485. * UserInterface/Main.html: Add new file.
  18486. 2012-02-09 Timothy Hatcher <timothy@apple.com>
  18487. Fix a file not found error in the Web Inspector.
  18488. Reviewed by Brian Weinstein.
  18489. * UserInterface/IndeterminateProgressSpinner.css:
  18490. (.indeterminate-progress-spinner): Use IndeterminateProgressSpinner1.pdf instead of IndeterminateProgressSpinner.pdf.
  18491. 2012-02-09 Timothy Hatcher <timothy@apple.com>
  18492. Don't add event listeners in the ContentView "shown" functions.
  18493. This was leading to duplicate listeners if the content view was hidden and shown multiple times.
  18494. Reviewed by Brian Weinstein.
  18495. * UserInterface/ClusterContentView.js:
  18496. (WebInspector.ClusterContentView): Add the event listener here...
  18497. (WebInspector.ClusterContentView.prototype.shown): ... instead of here.
  18498. * UserInterface/DOMTreeContentView.js:
  18499. (WebInspector.DOMTreeContentView): Add the event listener here...
  18500. (WebInspector.DOMTreeContentView.prototype.shown): ... instead of here.
  18501. * UserInterface/ResourceContentView.js:
  18502. (WebInspector.ResourceContentView): Add the event listener here.
  18503. (WebInspector.ResourceContentView.prototype.shown): Removed.
  18504. * UserInterface/TextResourceContentView.js:
  18505. (WebInspector.TextResourceContentView): Add the event listener here...
  18506. (WebInspector.TextResourceContentView.prototype.shown): ... instead of here.
  18507. (WebInspector.TextResourceContentView.prototype.hidden): Don't remove the event listener here...
  18508. (WebInspector.TextResourceContentView.prototype.closed): ... remove it here instead.
  18509. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18510. Update the details sidebar when the network state or the frame manifest state changes.
  18511. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18512. Reviewed by Joseph Pecoraro.
  18513. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  18514. (WebInspector.ApplicationCacheDetailsSidebarPanel):
  18515. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Call _refreshOnlineRow and _refreshStatusRow.
  18516. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._networkStateUpdated): Call _refreshOnlineRow.
  18517. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._frameManifestStatusChanged): If the frame that changed
  18518. matches ours, call _refreshStatusRow.
  18519. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._refreshOnlineRow): Set the text of the online row.
  18520. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._refreshStatusRow): Set the text of the status row.
  18521. * UserInterface/ApplicationCacheManager.js:
  18522. (WebInspector.ApplicationCacheManager.prototype.networkStateUpdated):
  18523. (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated):
  18524. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18525. Make sure we update the status of an existing cache frame in _frameManifestUpdated.
  18526. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18527. Reviewed by Joseph Pecoraro.
  18528. * UserInterface/ApplicationCacheFrame.js:
  18529. (WebInspector.ApplicationCacheFrame.prototype.set status): Add a setter.
  18530. * UserInterface/ApplicationCacheManager.js:
  18531. (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated): If we already have an ApplicationCacheFrame,
  18532. make sure to set the status when it changes.
  18533. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18534. Add a status section to the details sidebar that shows the application cache status and whether the user is online
  18535. or offline.
  18536. This doesn't listen to changes in state while the sidebar is showing yet, but it will in the next patch.
  18537. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18538. Reviewed by Joseph Pecoraro.
  18539. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  18540. (WebInspector.ApplicationCacheDetailsSidebarPanel):
  18541. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh):
  18542. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18543. Add the manifest URL and the frame URL that loaded the manifest to the details sidebar.
  18544. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18545. Reviewed by Joseph Pecoraro.
  18546. * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
  18547. (WebInspector.ApplicationCacheDetailsSidebarPanel): Create a start to our structure of groups and rows.
  18548. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.get applicationCacheFrame): Return the application cache frame.
  18549. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame): Set the application cache frame and say
  18550. we need a refresh.
  18551. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Set the data in our rows.
  18552. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18553. Add a basic ApplicationCacheDetailsSidebarPanel, and make it be enabled at the right time.
  18554. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18555. Reviewed by Joseph Pecoraro.
  18556. * UserInterface/ApplicationCacheDetailsSidebarPanel.js: Added.
  18557. (WebInspector.ApplicationCacheDetailsSidebarPanel): Call the DetailsSidebarPanel constructor.
  18558. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.constructor.WebInspector.ApplicationCacheDetailsSidebarPanel.inspect): Determine
  18559. if one of the selected objects is an ApplicationCacheFrame.
  18560. (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Add a FIXME.
  18561. * UserInterface/Main.html: Add a new file.
  18562. * UserInterface/Main.js:
  18563. (WebInspector.contentLoaded): Create the ApplicationCacheDetailsSidebarPanel.
  18564. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18565. Create an ApplicationCacheFrameContentView when an ApplicationCacheFrameTreeElement is selected.
  18566. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18567. Reviewed by Joseph Pecoraro.
  18568. * UserInterface/ContentView.js:
  18569. (WebInspector.ContentView):
  18570. (WebInspector.ContentView.isViewable):
  18571. * UserInterface/Main.js:
  18572. (WebInspector.contentBrowserTreeElementForRepresentedObject):
  18573. * UserInterface/StorageSidebarPanel.js:
  18574. (WebInspector.StorageSidebarPanel.prototype._storageCleared):
  18575. (WebInspector.StorageSidebarPanel.prototype._treeElementSelected):
  18576. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18577. Implement some needed functions in ApplicationCacheManager to handle calls from ApplicationCacheObserver and
  18578. ApplicationCacheFrameContentView.
  18579. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18580. Reviewed by Joseph Pecoraro.
  18581. * UserInterface/ApplicationCacheManager.js:
  18582. (WebInspector.ApplicationCacheManager):
  18583. (WebInspector.ApplicationCacheManager.prototype.networkStateUpdated): Update the online state, and add a FIXME to fire an event.
  18584. (WebInspector.ApplicationCacheManager.prototype.get online):
  18585. (WebInspector.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
  18586. (WebInspector.ApplicationCacheManager.prototype.requestApplicationCache):
  18587. * UserInterface/ApplicationCacheObserver.js:
  18588. (WebInspector.ApplicationCacheObserver.prototype.constructor.WebInspector.ApplicationCacheObserver.applicationCacheStatusUpdated):
  18589. (WebInspector.ApplicationCacheObserver.prototype.networkStateUpdated):
  18590. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18591. Implement Number.bytesToString.
  18592. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18593. Reviewed by Joseph Pecoraro.
  18594. * UserInterface/Utilities.js:
  18595. (Number.string_appeared_here.value):
  18596. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18597. Make more of ApplicationFrameContentView work.
  18598. Add some styling, and make some of the code in ApplicationFrameContentView match our mannerisms. There are a couple
  18599. places we ask the ApplicationCacheManager for data. These functions don't exist yet, but they will in the next patch.
  18600. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18601. Reviewed by Joseph Pecoraro.
  18602. * UserInterface/ApplicationCacheFrameContentView.css: Added.
  18603. (.content-view.application-cache-frame > .data-grid):
  18604. (.content-view.application-cache-frame .hidden):
  18605. * UserInterface/ApplicationCacheFrameContentView.js:
  18606. (WebInspector.ApplicationCacheFrameContentView): Create our version of an empty view instead of open source's. Ask the application
  18607. cache manager for data.
  18608. (WebInspector.ApplicationCacheFrameContentView.prototype.shown): Use our correct method name.
  18609. (WebInspector.ApplicationCacheFrameContentView.prototype.hidden): Ditto.
  18610. (WebInspector.ApplicationCacheFrameContentView.prototype._maybeUpdate): Check this.visible instead of isVisible().
  18611. (WebInspector.ApplicationCacheFrameContentView.prototype.updateStatus): Ditto.
  18612. (WebInspector.ApplicationCacheFrameContentView.prototype._update): Ask the application cache manager for data.
  18613. (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback): Use our functions to hide and show the empty views / datagrids.
  18614. (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid): Ditto.
  18615. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18616. Do some clean-up of ApplicationCacheFrameContentView.
  18617. Change the argument it takes to a represented object, have it inherit from ContentView, and remove calls to add/removeStyleClass.
  18618. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18619. Reviewed by Joseph Pecoraro.
  18620. * UserInterface/ApplicationCacheFrameContentView.js:
  18621. (WebInspector.ApplicationCacheFrameContentView):
  18622. (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback):
  18623. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18624. Bring in ApplicationCacheItemsView from open source as ApplicationCacheFrameContentView.
  18625. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18626. Reviewed by Joseph Pecoraro.
  18627. * UserInterface/ApplicationCacheFrameContentView.js: Added. Copied from open source.
  18628. 2012-02-07 Brian Weinstein <bweinstein@apple.com>
  18629. Add tree elements for application cache manifests and frames that have an application cache.
  18630. When the document adds or removes frames from the application cache, ApplicationCacheManager fires events. The storage sidebar
  18631. panel listens for these events and updates the state of the tree elements in the sidebar panel. Currently, we only add
  18632. sidebar items, but removing them will be added in a future patch.
  18633. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18634. Reviewed by Joseph Pecoraro.
  18635. * UserInterface/ApplicationCacheManager.js:
  18636. (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated):
  18637. (WebInspector.ApplicationCacheManager.prototype._frameManifestRemoved):
  18638. * UserInterface/StorageSidebarPanel.js:
  18639. (WebInspector.StorageSidebarPanel):
  18640. (WebInspector.StorageSidebarPanel.prototype._frameManifestAdded):
  18641. (WebInspector.StorageSidebarPanel.prototype._frameManifestRemoved):
  18642. (WebInspector.StorageSidebarPanel.prototype._storageCleared):
  18643. 2012-02-06 Brian Weinstein <bweinstein@apple.com>
  18644. Add tree elements for application cache frames and application cache manifests.
  18645. They aren't used yet, but will be used by the StorageSidebarPanel in a later patch.
  18646. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18647. Reviewed by Joseph Pecoraro.
  18648. * UserInterface/ApplicationCacheFrameTreeElement.js: Added.
  18649. (WebInspector.ApplicationCacheFrameTreeElement): Basic tree element subclass with a FIXME for an icon.
  18650. * UserInterface/ApplicationCacheManifest.js:
  18651. (WebInspector.ApplicationCacheManifest.prototype.get title): Call _generateTitle if we don't already have one.
  18652. (WebInspector.ApplicationCacheManifest.prototype._generateTitle): Try and get a title from the manifest URL's last path component, host
  18653. or the whole URL.
  18654. * UserInterface/ApplicationCacheManifestTreeElement.js: Added.
  18655. (WebInspector.ApplicationCacheManifestTreeElement): Inherits from StorageTreeElement.
  18656. (WebInspector.ApplicationCacheManifestTreeElement.prototype.constructor.WebInspector.ApplicationCacheManifestTreeElement.get name): Get the
  18657. represented object's title.
  18658. (WebInspector.ApplicationCacheManifestTreeElement.prototype.get categoryName): return Application Cache.
  18659. * UserInterface/Main.html: Add new files.
  18660. 2012-02-06 Brian Weinstein <bweinstein@apple.com>
  18661. Implement the callback functions when we get information about the application cache. We create the necessary
  18662. application cache objects now, but don't create tree elements or notify the storage sidebar panel about them
  18663. yet.
  18664. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18665. Reviewed by Joseph Pecoraro.
  18666. * UserInterface/ApplicationCacheManager.js:
  18667. (WebInspector.ApplicationCacheManager): Listen for when child frames are removed.
  18668. (WebInspector.ApplicationCacheManager.prototype.constructor.WebInspector.ApplicationCacheManager.initialize): Get the
  18669. frames with application caches here..
  18670. (WebInspector.ApplicationCacheManager.prototype._mainResourceDidChange): .. Instead of here.
  18671. (WebInspector.ApplicationCacheManager.prototype._childFrameWasRemoved): Call _frameManifestRemoved.
  18672. (WebInspector.ApplicationCacheManager.prototype._manifestForFrameLoaded): If the frame doesn't have a manifest URL,
  18673. call _frameManifestRemoved.
  18674. (WebInspector.ApplicationCacheManager.prototype._framesWithManifestsLoaded): Call _frameManifestUpdated for all frames
  18675. that have manifests.
  18676. (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated): Create a frame manifest object if it is necessary,
  18677. and add FIXMEs to fire some events about the application cache state.
  18678. (WebInspector.ApplicationCacheManager.prototype._frameManifestRemoved): Remove the manifest object for this frame.
  18679. 2012-02-06 Brian Weinstein <bweinstein@apple.com>
  18680. Add ApplicationCacheFrame and ApplicationCacheManifest. These are just simple objects that wrap a few properties.
  18681. More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18682. Reviewed by Joseph Pecoraro.
  18683. * UserInterface/ApplicationCacheFrame.js: Added.
  18684. (WebInspector.ApplicationCacheFrame):
  18685. (WebInspector.ApplicationCacheFrame.prototype.constructor.WebInspector.ApplicationCacheFrame.get frame):
  18686. (WebInspector.ApplicationCacheFrame.prototype.get manifest):
  18687. (WebInspector.ApplicationCacheFrame.prototype.get status):
  18688. * UserInterface/ApplicationCacheManifest.js: Added.
  18689. (WebInspector.ApplicationCacheManifest):
  18690. (WebInspector.ApplicationCacheManifest.prototype.constructor.WebInspector.ApplicationCacheManifest.get manifestURL):
  18691. * UserInterface/Main.html:
  18692. 2012-02-06 Brian Weinstein <bweinstein@apple.com>
  18693. Add ApplicationCacheManager, and have it listen for when frames navigate, and call some ApplicationCacheAgent
  18694. methods to get data from WebCore.
  18695. We don't do anything with this data yet, but will in follow-up patches.
  18696. Part of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
  18697. Reviewed by Joseph Pecoraro.
  18698. * UserInterface/ApplicationCacheManager.js: Added.
  18699. (WebInspector.ApplicationCacheManager): Initialize the ApplicationCacheAgent, and add a listener for when frames navigate.
  18700. (WebInspector.ApplicationCacheManager.prototype.constructor.WebInspector.ApplicationCacheManager.initialize): Clear our (always empty)
  18701. list of application cache objects.
  18702. (WebInspector.ApplicationCacheManager.prototype._mainResourceDidChange): Get the list of frames with application caches if the main frame
  18703. navigated. If it was a subframe, check the status of the application cache for the subframe.
  18704. (WebInspector.ApplicationCacheManager.prototype._manifestForFrameLoaded): Stub.
  18705. (WebInspector.ApplicationCacheManager.prototype._framesWithManifestsLoaded): Ditto.
  18706. * UserInterface/Main.html: Add new file.
  18707. * UserInterface/Main.js:
  18708. (WebInspector.contentLoaded): Create an ApplicationCacheManager.
  18709. 2012-02-06 Timothy Hatcher <timothy@apple.com>
  18710. Show the full URL in the tool tip for resources in the Web Inspector.
  18711. Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
  18712. Reviewed by Brian Weinstein.
  18713. * UserInterface/ResourceTreeElement.js:
  18714. (WebInspector.ResourceTreeElement.prototype._updateResource): Call _updateToolTip.
  18715. (WebInspector.ResourceTreeElement.prototype._updateToolTip): Added.
  18716. (WebInspector.ResourceTreeElement.prototype._urlDidChange): Call _updateToolTip.
  18717. 2012-02-06 Timothy Hatcher <timothy@apple.com>
  18718. Make double-click in the Web Inspector Resource sidebar open the resource in a new Safari tab/window.
  18719. This is like the Activity window, which we want to replace with the new Web Inspector.
  18720. Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
  18721. Reviewed by Brian Weinstein.
  18722. * UserInterface/ResourceTreeElement.js:
  18723. (WebInspector.ResourceTreeElement.prototype.ondblclick): Added.
  18724. 2012-02-06 Timothy Hatcher <timothy@apple.com>
  18725. Fix an error on reload in the Web Inspector where the main resource would not be marked as finished, so the source
  18726. would never display and the spinner in the sidebar would never go away.
  18727. Reviewed by Brian Weinstein.
  18728. * UserInterface/FrameResourceManager.js:
  18729. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Only reuse the main resource
  18730. or provisional main resource if the loader identifiers match.
  18731. 2012-02-06 Timothy Hatcher <timothy@apple.com>
  18732. Show a spinner in resource content views while waiting for content to become available.
  18733. Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
  18734. Reviewed by Brian Weinstein.
  18735. * UserInterface/Main.html:
  18736. * UserInterface/ResourceContentView.css: Added.
  18737. (.content-view.resource > .indeterminate-progress-spinner):
  18738. * UserInterface/ResourceContentView.js:
  18739. (WebInspector.ResourceContentView): Append a spinner.
  18740. 2012-02-06 Timothy Hatcher <timothy@apple.com>
  18741. Show a progress spinner in the Resource sidebar next to resources that are still loading.
  18742. Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
  18743. Reviewed by Brian Weinstein.
  18744. * UserInterface/GeneralTreeElement.js:
  18745. (WebInspector.GeneralTreeElement): Initialize status to "".
  18746. (WebInspector.GeneralTreeElement.prototype.get status): Added.
  18747. (WebInspector.GeneralTreeElement.prototype.set status): Added.
  18748. (WebInspector.GeneralTreeElement.prototype.onattach): Call _updateStatusElement.
  18749. (WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded): Create the status element.
  18750. (WebInspector.GeneralTreeElement.prototype._updateStatusElement): Added.
  18751. * UserInterface/Images/IndeterminateProgressSpinner1.pdf: Added.
  18752. * UserInterface/Images/IndeterminateProgressSpinner10.pdf: Added.
  18753. * UserInterface/Images/IndeterminateProgressSpinner11.pdf: Added.
  18754. * UserInterface/Images/IndeterminateProgressSpinner12.pdf: Added.
  18755. * UserInterface/Images/IndeterminateProgressSpinner2.pdf: Added.
  18756. * UserInterface/Images/IndeterminateProgressSpinner3.pdf: Added.
  18757. * UserInterface/Images/IndeterminateProgressSpinner4.pdf: Added.
  18758. * UserInterface/Images/IndeterminateProgressSpinner5.pdf: Added.
  18759. * UserInterface/Images/IndeterminateProgressSpinner6.pdf: Added.
  18760. * UserInterface/Images/IndeterminateProgressSpinner7.pdf: Added.
  18761. * UserInterface/Images/IndeterminateProgressSpinner8.pdf: Added.
  18762. * UserInterface/Images/IndeterminateProgressSpinner9.pdf: Added.
  18763. * UserInterface/IndeterminateProgressSpinner.css: Added.
  18764. * UserInterface/IndeterminateProgressSpinner.js: Added.
  18765. (WebInspector.IndeterminateProgressSpinner):
  18766. (WebInspector.IndeterminateProgressSpinner.prototype.get element):
  18767. * UserInterface/Main.html:
  18768. * UserInterface/NavigationSidebarPanel.css:
  18769. (.navigation-sidebar-panel-content-tree-outline .item .status):
  18770. (.navigation-sidebar-panel-content-tree-outline .item .status:empty):
  18771. (.navigation-sidebar-panel-content-tree-outline .item.small .status):
  18772. (.navigation-sidebar-panel-content-tree-outline .item.small .status .indeterminate-progress-spinner):
  18773. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .status):
  18774. * UserInterface/ResourceTreeElement.js:
  18775. (WebInspector.ResourceTreeElement.prototype._updateResource): Add event listeners and call _updateLoadingStatus.
  18776. (WebInspector.ResourceTreeElement.prototype._updateLoadingStatus): Added. Sets status to a spinner when loading.
  18777. 2012-02-04 Timothy Hatcher <timothy@apple.com>
  18778. Use PDFs for the user input prompt and result icons.
  18779. Part of: <rdar://problem/10643175> DataGrid and the DOM tree and the Console should be HiDPI compliant
  18780. Reviewed by Sam Weinig.
  18781. * UserInterface/DatabaseContentView.css:
  18782. (.database-query-prompt::before): Use Use UserInputPrompt.pdf.
  18783. * UserInterface/Images/UserInputPrompt.pdf: Added.
  18784. * UserInterface/Images/UserInputResult.pdf: Added.
  18785. * UserInterface/Images/userInputIcon.png: Removed.
  18786. * UserInterface/Images/userInputResultIcon.png: Removed.
  18787. * UserInterface/LogContentView.css:
  18788. (#console-prompt::before): Use UserInputPrompt.pdf.
  18789. (.console-user-command-result.console-log-level::before): Use UserInputResult.pdf.
  18790. 2012-02-04 Timothy Hatcher <timothy@apple.com>
  18791. Use PDFs for the error and wrning icons.
  18792. Part of: <rdar://problem/10643175> DataGrid and the DOM tree and the Console should be HiDPI compliant
  18793. Reviewed by Sam Weinig.
  18794. * UserInterface/DatabaseContentView.css:
  18795. (.database-query-result.error::before): Use ErrorSmall.pdf.
  18796. * UserInterface/Images/ErrorSmall.pdf: Added.
  18797. * UserInterface/Images/WarningSmall.pdf: Added.
  18798. * UserInterface/Images/errorIcon.png: Removed.
  18799. * UserInterface/Images/warningIcon.png: Removed.
  18800. * UserInterface/LogContentView.css:
  18801. (.console-error-level::before): Use ErrorSmall.pdf.
  18802. (.console-warning-level::before): Use WarningSmall.pdf.
  18803. 2012-02-04 Timothy Hatcher <timothy@apple.com>
  18804. Remove unused code and images from the log content view for status bar items and filtering.
  18805. Reviewed by Joseph Pecoraro.
  18806. * UserInterface/Images/deleteIcon.png: Removed.
  18807. * UserInterface/Images/searchSmallBrightBlue.png: Removed.
  18808. * UserInterface/LogContentView.css:
  18809. (.console-debug-level::before): Use a background color instead of an image. The debug
  18810. level is not used by the new Web Inspector.
  18811. * UserInterface/LogContentView.js:
  18812. (WebInspector.LogContentView): Removed creation code for status bar items and filtering.
  18813. (WebInspector.LogContentView.prototype.evalInInspectedWindow): Pass undefined for the context.
  18814. * UserInterface/Section.css:
  18815. (.section .properties .delete-button): Removed.
  18816. (.section .properties li.hovered .delete-button): Removed.
  18817. 2012-02-04 Timothy Hatcher <timothy@apple.com>
  18818. Update LogContentView to work with the new Web Inspector's ContentView instead of the old View.
  18819. Reviewed by Joseph Pecoraro.
  18820. * UserInterface/LogContentView.js:
  18821. (WebInspector.LogContentView.prototype.hidden): Renamed from willHide. Call storeScrollPositions.
  18822. (WebInspector.LogContentView.prototype.shown): Renamed from willShow. Merged with afterShow.
  18823. (WebInspector.LogContentView.prototype.storeScrollPositions): Removed WebInspector.View.prototype call.
  18824. (WebInspector.LogContentView.prototype.restoreScrollPositions): Ditto.
  18825. (WebInspector.LogContentView.prototype.updateLayout): Renamed from onResize.
  18826. 2012-02-04 Timothy Hatcher <timothy@apple.com>
  18827. Make the "Show Error Console" develop menu item work with the new Web Inspector.
  18828. Reviewed by Joseph Pecoraro.
  18829. * UserInterface/ContentBrowser.js:
  18830. (WebInspector.ContentBrowser.prototype.get currentContentView): Added.
  18831. (WebInspector.ContentBrowser.prototype.canGoBack): Use this.currentContentView.
  18832. (WebInspector.ContentBrowser.prototype.canGoForward): Ditto.
  18833. (WebInspector.ContentBrowser.prototype.goBack): Ditto.
  18834. (WebInspector.ContentBrowser.prototype.goForward): Ditto.
  18835. (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Ditto.
  18836. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Ditto.
  18837. * UserInterface/InspectorFrontendAPI.js:
  18838. (InspectorFrontendAPI.showConsole): Call LogSidebarPanel.showCurrentLog.
  18839. * UserInterface/LogSidebarPanel.js:
  18840. (WebInspector.LogSidebarPanel.prototype.showCurrentLog):
  18841. * UserInterface/ResourceSidebarPanel.js:
  18842. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Don't select the main frame
  18843. if there is already a content view showing.
  18844. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork): Ditto.
  18845. 2012-02-04 Timothy Hatcher <timothy@apple.com>
  18846. Fix an infinite loop when doing "Show Error Console" or any of the Inspector develop menu items.
  18847. <rdar://problem/10801359> Hitting Cmd-Opt-C (Develop -> Show Error Console) causes WebProcess
  18848. to freak out (100% CPU, GBs of RAM)
  18849. Reviewed by Joseph Pecoraro.
  18850. * UserInterface/InspectorFrontendAPI.js:
  18851. (InspectorFrontendAPI.loadCompleted): Set _loaded before calling dispatch, otherwise dispatch
  18852. will keep append commands to _pendingCommands and the for loop will never finish.
  18853. 2012-02-02 Timothy Hatcher <timothy@apple.com>
  18854. Add the Box Model to the Appearance details sidebar panel.
  18855. Last part of: <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  18856. Reviewed by Brian Weinstein.
  18857. * UserInterface/AppearanceDetailsSidebarPanel.js:
  18858. (WebInspector.AppearanceDetailsSidebarPanel):
  18859. (WebInspector.AppearanceDetailsSidebarPanel.prototype._refreshBoxModel):
  18860. * UserInterface/BoxModelDetailsSectionRow.css: Added.
  18861. * UserInterface/BoxModelDetailsSectionRow.js: Copied from OpenSource/Source/WebCore/inspector/front-end/MetricsSidebarPane.js.
  18862. Modified to use DOMTreeManager and CSSStyleManager and other minor renames to work in the new inspector.
  18863. * UserInterface/CSSStyleManager.js:
  18864. (WebInspector.CSSStyleManager.prototype.get forcedPseudoClasses): Added stub with FIXME.
  18865. * UserInterface/Main.html: Included BoxModelDetailsSectionRow.{css,js}.
  18866. 2012-02-02 Timothy Hatcher <timothy@apple.com>
  18867. Add WebInspector.AppearanceDetailsSidebarPanel, future home for the box-model diagram.
  18868. Part of: <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  18869. Reviewed by Brian Weinstein.
  18870. * UserInterface/AppearanceDetailsSidebarPanel.js: Added.
  18871. (WebInspector.AppearanceDetailsSidebarPanel):
  18872. (WebInspector.AppearanceDetailsSidebarPanel.prototype.refresh): Call _refreshBoxModel.
  18873. (WebInspector.AppearanceDetailsSidebarPanel.prototype._refreshBoxModel):
  18874. * UserInterface/Main.html: Included AppearanceDetailsSidebarPanel.js.
  18875. * UserInterface/Main.js:
  18876. (WebInspector.contentLoaded): Create an instance of AppearanceDetailsSidebarPanel.
  18877. 2012-02-02 Timothy Hatcher <timothy@apple.com>
  18878. Replace WebInspector.domAgent use with WebInspector.domTreeManager.
  18879. Needed for:
  18880. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  18881. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  18882. Reviewed by Brian Weinstein.
  18883. * UserInterface/CSSStyleManager.js:
  18884. (WebInspector.CSSStyleManager.prototype.setRuleSelector.callback):
  18885. (WebInspector.CSSStyleManager.prototype.addRule.callback):
  18886. (WebInspector.CSSStyleManager.prototype._ownerDocumentId):
  18887. 2012-02-02 Timothy Hatcher <timothy@apple.com>
  18888. Create a singelton WebInspector.CSSStyleManager instance.
  18889. Needed for:
  18890. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  18891. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  18892. Reviewed by Brian Weinstein.
  18893. * UserInterface/Main.js:
  18894. (WebInspector.contentLoaded):
  18895. 2012-02-02 Timothy Hatcher <timothy@apple.com>
  18896. WebInspector.CSSStyleModel to WebInspector.CSSStyleManager.
  18897. Also rename WebInspector.CSSStyleModel.Events to WebInspector.CSSStyleManager.Event
  18898. and delete some calls in the CSSStyleManager constructor we don't need.
  18899. Needed for:
  18900. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  18901. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  18902. Reviewed by Brian Weinstein.
  18903. * UserInterface/CSSStyleManager.js:
  18904. (WebInspector.CSSStyleManager):
  18905. (WebInspector.CSSStyleManager.parseRuleArrayPayload):
  18906. (WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync):
  18907. (WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged):
  18908. (WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged.if):
  18909. (WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged.mycallback):
  18910. (WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged):
  18911. 2012-02-02 Timothy Hatcher <timothy@apple.com>
  18912. Copy over classes from open source's CSSStyleModel.js.
  18913. Needed for:
  18914. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  18915. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  18916. Reviewed by Brian Weinstein.
  18917. * UserInterface/CSSMedia.js: Added.
  18918. (WebInspector.CSSMedia):
  18919. (WebInspector.CSSMedia.parsePayload):
  18920. (WebInspector.CSSMedia.parseMediaArrayPayload):
  18921. * UserInterface/CSSProperty.js: Added.
  18922. (WebInspector.CSSProperty):
  18923. (WebInspector.CSSProperty.parsePayload):
  18924. (WebInspector.CSSProperty.prototype.get propertyText):
  18925. (WebInspector.CSSProperty.prototype.get isLive):
  18926. (WebInspector.CSSProperty.prototype.get active):
  18927. (WebInspector.CSSProperty.prototype.get styleBased):
  18928. (WebInspector.CSSProperty.prototype.get inactive):
  18929. (WebInspector.CSSProperty.prototype.get disabled):
  18930. (WebInspector.CSSProperty.prototype.setText):
  18931. (WebInspector.CSSProperty.prototype.setText.callback):
  18932. (WebInspector.CSSProperty.prototype.setValue):
  18933. (WebInspector.CSSProperty.prototype.setDisabled.callback):
  18934. (WebInspector.CSSProperty.prototype.setDisabled):
  18935. * UserInterface/CSSRule.js: Added.
  18936. (WebInspector.CSSRule):
  18937. (WebInspector.CSSRule.parsePayload):
  18938. (WebInspector.CSSRule.prototype.get isUserAgent):
  18939. (WebInspector.CSSRule.prototype.get isUser):
  18940. (WebInspector.CSSRule.prototype.get isViaInspector):
  18941. (WebInspector.CSSRule.prototype.get isRegular):
  18942. * UserInterface/CSSStyleDeclaration.js: Added.
  18943. (WebInspector.CSSStyleDeclaration):
  18944. (WebInspector.CSSStyleDeclaration.buildShorthandValueMap):
  18945. (WebInspector.CSSStyleDeclaration.parsePayload):
  18946. (WebInspector.CSSStyleDeclaration.parseComputedStylePayload):
  18947. (WebInspector.CSSStyleDeclaration.prototype.get allProperties):
  18948. (WebInspector.CSSStyleDeclaration.prototype.getLiveProperty):
  18949. (WebInspector.CSSStyleDeclaration.prototype.getPropertyValue):
  18950. (WebInspector.CSSStyleDeclaration.prototype.getPropertyPriority):
  18951. (WebInspector.CSSStyleDeclaration.prototype.getPropertyShorthand):
  18952. (WebInspector.CSSStyleDeclaration.prototype.isPropertyImplicit):
  18953. (WebInspector.CSSStyleDeclaration.prototype.styleTextWithShorthands):
  18954. (WebInspector.CSSStyleDeclaration.prototype.getLonghandProperties):
  18955. (WebInspector.CSSStyleDeclaration.prototype.getShorthandValue):
  18956. (WebInspector.CSSStyleDeclaration.prototype.getShorthandPriority):
  18957. (WebInspector.CSSStyleDeclaration.prototype.propertyAt):
  18958. (WebInspector.CSSStyleDeclaration.prototype.pastLastSourcePropertyIndex):
  18959. (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
  18960. (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
  18961. (WebInspector.CSSStyleDeclaration.prototype.appendProperty):
  18962. * UserInterface/CSSStyleManager.js: Added.
  18963. (WebInspector.CSSStyleModel):
  18964. (WebInspector.CSSStyleModel.parseRuleArrayPayload):
  18965. (WebInspector.CSSStyleModel.prototype.getMatchedStylesAsync):
  18966. (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
  18967. (WebInspector.CSSStyleModel.prototype.getInlineStylesAsync):
  18968. (WebInspector.CSSStyleModel.prototype.setRuleSelector):
  18969. (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
  18970. (WebInspector.CSSStyleModel.prototype.addRule):
  18971. (WebInspector.CSSStyleModel.prototype.addRule.callback):
  18972. (WebInspector.CSSStyleModel.prototype.mediaQueryResultChanged):
  18973. (WebInspector.CSSStyleModel.prototype._ownerDocumentId):
  18974. (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.if):
  18975. (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.mycallback):
  18976. (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
  18977. (WebInspector.CSSStyleModel.prototype.setStyleSheetText):
  18978. * UserInterface/CSSStyleSheet.js: Added.
  18979. (WebInspector.CSSStyleSheet):
  18980. (WebInspector.CSSStyleSheet.createForId):
  18981. (WebInspector.CSSStyleSheet.prototype.getText):
  18982. (WebInspector.CSSStyleSheet.prototype.setText):
  18983. * UserInterface/Main.html:
  18984. 2012-02-02 Timothy Hatcher <timothy@apple.com>
  18985. Fix asserts in the Web Inspector when loading a loopinsight.com article.
  18986. Reviewed by Brian Weinstein.
  18987. * UserInterface/Frame.js:
  18988. (WebInspector.Frame.prototype.constructor.WebInspector.Frame.initialize): Don't disassociate from the
  18989. old main resource if it didn't change.
  18990. (WebInspector.Frame.prototype.commitProvisionalLoad): Ditto.
  18991. 2012-02-01 Timothy Hatcher <timothy@apple.com>
  18992. Fix issue where log views would draw over the previous log view on reload.
  18993. This fixes a bunch of asserts that ContentViewContainer was spewing.
  18994. <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
  18995. Reviewed by Brian Weinstein.
  18996. * UserInterface/ContentViewContainer.js:
  18997. (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Decrement the
  18998. currentIndex when it is greater than or equal to i.
  18999. 2012-01-31 Brian Weinstein <bweinstein@apple.com>
  19000. Add DatabaseContentView.{js|css}. These were taken from open source, with a few modifications.
  19001. Rest of <rdar://problem/10684679> Implement a database query view for the new Inspector.
  19002. Reviewed by Tim Hatcher.
  19003. * UserInterface/DatabaseContentView.css: Added. Copied rules from open source.
  19004. * UserInterface/DatabaseContentView.js: Added. Copied from open source.
  19005. * UserInterface/Main.html: Added new files.
  19006. 2012-01-31 Brian Weinstein <bweinstein@apple.com>
  19007. Stub the boilerplate that is needed to hook up DatabaseContentView.
  19008. DatabaseContentView doesn't exist yet, but when it does, a new DatabaseContentView will be
  19009. created when a DatabaseTreeElement is selected.
  19010. Work towards <rdar://problem/10684679> Implement a database query view for the new Inspector.
  19011. Reviewed by Tim Hatcher.
  19012. * UserInterface/ContentView.js:
  19013. (WebInspector.ContentView): Add a new case for DatabaseContentView.
  19014. (WebInspector.ContentView.isViewable): Ditto.
  19015. * UserInterface/Main.html:
  19016. * UserInterface/Main.js: Ditto.
  19017. (WebInspector.contentBrowserTreeElementForRepresentedObject):
  19018. * UserInterface/StorageSidebarPanel.js:
  19019. (WebInspector.StorageSidebarPanel.prototype._storageCleared): Ditto.
  19020. (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Ditto.
  19021. 2012-01-31 Timothy Hatcher <timothy@apple.com>
  19022. Generate friendlier titles for the current log and previous logs in the Log sidebar.
  19023. Part of: <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
  19024. Reviewed by Brian Weinstein.
  19025. * UserInterface/LogSidebarPanel.js:
  19026. (WebInspector.LogSidebarPanel.prototype._sessionStarted): Set the previous current tree element title
  19027. to "Previous Log %d".
  19028. (WebInspector.LogSidebarPanel.prototype._activeTreeElement): Added.
  19029. (WebInspector.LogSidebarPanel.prototype._activeLogContentView): Use _activeTreeElement().
  19030. * UserInterface/LogTreeElement.js:
  19031. (WebInspector.LogTreeElement): Set the main title to "Current Log" and the subtitle to the time.
  19032. 2012-01-31 Timothy Hatcher <timothy@apple.com>
  19033. Add an icon for logs in the Web Inspector Log sidebar.
  19034. Part of: <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
  19035. Reviewed by Brian Weinstein.
  19036. * UserInterface/Images/Log.png: Added.
  19037. * UserInterface/Images/Log@2x.png: Added.
  19038. * UserInterface/LogIcon.css: Added.
  19039. * UserInterface/LogObject.js:
  19040. (WebInspector.LogObject): Added startDate parameter and set _startDate.
  19041. (WebInspector.LogObject.prototype.get startDate): Added.
  19042. * UserInterface/LogSidebarPanel.js:
  19043. (WebInspector.LogSidebarPanel.prototype._sessionStarted):
  19044. * UserInterface/LogTreeElement.js: Added.
  19045. (WebInspector.LogTreeElement):
  19046. (WebInspector.LogTreeElement.prototype.get logObject):
  19047. * UserInterface/Main.html: Included LogTreeElement.js and LogIcon.css.
  19048. 2012-01-30 Timothy Hatcher <timothy@apple.com>
  19049. Fix disclosure triangles in the Log content view after they broke in r40433.
  19050. Reviewed by Brian Weinstein.
  19051. * UserInterface/Section.css:
  19052. (.section): Added. Moved position: relative here.
  19053. (.section .header): Removed position: relative from here.
  19054. 2012-01-30 Brian Weinstein <bweinstein@apple.com>
  19055. Clear all content views of type LogContentView when we clear the log sidebar panel.
  19056. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19057. Reviewed by Tim Hatcher.
  19058. * UserInterface/LogSidebarPanel.js:
  19059. (WebInspector.LogSidebarPanel.prototype._logsCleared):
  19060. 2012-01-30 Brian Weinstein <bweinstein@apple.com>
  19061. Make the log views from previous loads of the page non-editable.
  19062. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19063. Reviewed by Tim Hatcher.
  19064. * UserInterface/LogContentView.css:
  19065. (#console-prompt.disabled): Make the field read only.
  19066. * UserInterface/LogContentView.js:
  19067. (WebInspector.LogContentView.prototype.setDisabled): Add the disabled class to the content prompt.
  19068. * UserInterface/LogSidebarPanel.js:
  19069. (WebInspector.LogSidebarPanel.prototype.constructor.WebInspector.LogSidebarPanel._sessionStarted): Call setDisabled
  19070. on the previously active LogContentView.
  19071. 2012-01-30 Brian Weinstein <bweinstein@apple.com>
  19072. Have to double click on disclosure triangles for log messages with backtraces.
  19073. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19074. Reviewed by Tim Hatcher.
  19075. * UserInterface/DOMTreeOutline.css:
  19076. (.dom-tree-outline li.parent): Switch from text-indent to margin-left.
  19077. * UserInterface/TreeOutline.js:
  19078. (TreeElement.prototype.isEventWithinDisclosureTriangle): Update this to match open source.
  19079. 2012-01-30 Brian Weinstein <bweinstein@apple.com>
  19080. Make console log messages with backtraces display correctly in the log view.
  19081. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19082. Reviewed by Tim Hatcher.
  19083. * UserInterface/LogContentView.css: Copied some rules about outline-disclosure from Open Source.
  19084. 2012-01-30 Brian Weinstein <bweinstein@apple.com>
  19085. Create correct links in the Log content view.
  19086. Instead of calling through to this._linkifier (which we don't have), create links ourselves.
  19087. This will work by calling through to WebInspector.openURL, which will either open a resource in a new tab,
  19088. or show you the resource content view for the link you clicked.
  19089. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19090. Reviewed by Tim Hatcher.
  19091. * UserInterface/ConsoleMessageImpl.js:
  19092. (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): We don't have a this._linkifier, so use our own function.
  19093. 2012-01-30 Brian Weinstein <bweinstein@apple.com>
  19094. When we get a console message from the ConsoleObserver, add it to the correct LogContentView.
  19095. With this patch, we show console logging from the page in the content view, so it is now more than
  19096. just a place to evaluate JavaScript.
  19097. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19098. Reviewed by Tim Hatcher.
  19099. * UserInterface/ConsoleObserver.js:
  19100. (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): Tell the LogManager about the
  19101. added message.
  19102. * UserInterface/LogManager.js:
  19103. (WebInspector.LogManager.prototype.messageWasAdded): Create a ConsoleMessage object, and fire an event that a new message
  19104. was added.
  19105. * UserInterface/LogSidebarPanel.js:
  19106. (WebInspector.LogSidebarPanel): Add a listener for when messages are added.
  19107. (WebInspector.LogSidebarPanel.prototype._messageAdded): Find the content view for the current log item, and call messageAdded
  19108. on the LogContentView.
  19109. * UserInterface/LogContentView.js:
  19110. (WebInspector.LogContentView.prototype.messageAdded): Call _consoleMessageAdded.
  19111. (WebInspector.LogContentView.prototype._consoleMessageAdded): This now takes just the ConsoleMessage instead of an event.
  19112. 2012-01-30 Brian Weinstein <bweinstein@apple.com>
  19113. Enable the ConsoleAgent after creating the managers.
  19114. Reviewed by Tim Hatcher.
  19115. * UserInterface/Main.js:
  19116. (WebInspector.contentLoaded):
  19117. 2012-01-30 Timothy Hatcher <timothy@apple.com>
  19118. Add DOM properties to the DOM node details sidebar panel.
  19119. Last part of: <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19120. Reviewed by Brian Weinstein.
  19121. * UserInterface/DOMNodeDetailsSidebarPanel.css: Added.
  19122. (.sidebar > .panel.details.dom-node .row.properties):
  19123. * UserInterface/DOMNodeDetailsSidebarPanel.js:
  19124. (WebInspector.DOMNodeDetailsSidebarPanel):
  19125. (WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh): Call _refreshProperties.
  19126. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties): Added.
  19127. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved.collectPrototypes): Added.
  19128. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Added.
  19129. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Added.
  19130. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Added.
  19131. * UserInterface/Main.html: Included DOMNodeDetailsSidebarPanel.css.
  19132. * UserInterface/Section.css:
  19133. (.section .header): Added position: relative so the disclosure triangles show up correctly.
  19134. (.properties-tree): Added outline: none to prevent a focus ring.
  19135. 2012-01-29 Timothy Hatcher <timothy@apple.com>
  19136. Add a simple DOM node details sidebar panel that shows type, name and attributes.
  19137. Part of: <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19138. Reviewed by Brian Weinstein.
  19139. * UserInterface/DOMNodeDetailsSidebarPanel.js: Added.
  19140. (WebInspector.DOMNodeDetailsSidebarPanel):
  19141. (WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh):
  19142. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes):
  19143. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._attributesChanged):
  19144. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName):
  19145. (WebInspector.DOMNodeDetailsSidebarPanel.prototype._createAttributesDataGrid):
  19146. * UserInterface/Images/NavigationItemAngleBrackets.pdf: Added.
  19147. * UserInterface/Main.html: Included DOMNodeDetailsSidebarPanel.js.
  19148. * UserInterface/Main.js:
  19149. (WebInspector.contentLoaded): Included DOMNodeDetailsSidebarPanel in the details sidebar list.
  19150. 2012-01-29 Timothy Hatcher <timothy@apple.com>
  19151. Add DOMDetailsSidebarPanel as a base class for all the DOM node focused details sidebar panels.
  19152. Needed for:
  19153. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  19154. <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19155. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  19156. <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
  19157. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  19158. Reviewed by Brian Weinstein.
  19159. * UserInterface/DOMDetailsSidebarPanel.js: Added.
  19160. (WebInspector.DOMDetailsSidebarPanel):
  19161. (WebInspector.DOMDetailsSidebarPanel.prototype.inspect):
  19162. (WebInspector.DOMDetailsSidebarPanel.prototype.get domNode):
  19163. (WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
  19164. (WebInspector.DOMDetailsSidebarPanel.prototype.addEventListeners):
  19165. (WebInspector.DOMDetailsSidebarPanel.prototype.removeEventListeners):
  19166. * UserInterface/Main.html: Included DOMDetailsSidebarPanel.js.
  19167. 2012-01-29 Timothy Hatcher <timothy@apple.com>
  19168. Display information about the selected resource in the resource details sidebar panel.
  19169. Last part of: <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
  19170. Reviewed by Brian Weinstein.
  19171. * UserInterface/ResourceDetailsSidebarPanel.js:
  19172. (WebInspector.ResourceDetailsSidebarPanel): Create DetailsSections for the various parts of info to display.
  19173. (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Remove and add event listeners.
  19174. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call the individual refresh functions.
  19175. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): Added. Update the affected rows.
  19176. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshResourceType): Added. Ditto.
  19177. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshMIMEType): Added. Ditto.
  19178. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestHeaders): Added. Ditto.
  19179. (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshResponseHeaders): Added. Ditto.
  19180. (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid): Added. Helper to create a simple grid.
  19181. * UserInterface/Utilities.js:
  19182. (parseLocationQueryParameters): Use the queryString function after trimming the "?".
  19183. (queryString): Added. Factored out of parseLocationQueryParameters.
  19184. (queryString.decode): Added. Properly decode "+" as " ".
  19185. 2012-01-26 Timothy Hatcher <timothy@apple.com>
  19186. Add the start of WebInspector.ResourceDetailsSidebarPanel.
  19187. Part of: <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
  19188. Reviewed by Brian Weinstein.
  19189. * UserInterface/Main.html: Included ResourceDetailsSidebarPanel.js.
  19190. * UserInterface/Main.js:
  19191. (WebInspector.contentLoaded): Create a WebInspector.ResourceDetailsSidebarPanel.
  19192. * UserInterface/ResourceDetailsSidebarPanel.js: Added.
  19193. (WebInspector.ResourceDetailsSidebarPanel):
  19194. (WebInspector.ResourceDetailsSidebarPanel.prototype.inspect):
  19195. (WebInspector.ResourceDetailsSidebarPanel.prototype.get resource):
  19196. (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
  19197. 2012-01-29 Timothy Hatcher <timothy@apple.com>
  19198. Add DetailsSection and friends to be used by details sidebar panels.
  19199. Needed for:
  19200. <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
  19201. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  19202. <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19203. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  19204. <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
  19205. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  19206. Reviewed by Brian Weinstein.
  19207. * UserInterface/DetailsSection.css: Added.
  19208. (.details-section):
  19209. (.details-section > .header):
  19210. (.details-section > .header::before):
  19211. (.details-section > .header:active::before):
  19212. (.details-section.collapsed > .header::before):
  19213. (.details-section.collapsed > .header:active::before):
  19214. (.details-section > .content):
  19215. (.details-section.collapsed > .content):
  19216. (.details-section > .content > .group):
  19217. (.details-section > .content > .group:nth-child(even)):
  19218. (.details-section > .content > .group:nth-child(even) > .row:first-child > *):
  19219. (.details-section > .content > .group:nth-child(even) > .row:last-child > *):
  19220. (.details-section > .content > .group > .row):
  19221. (.details-section > .content > .group > .row:last-child > *):
  19222. (.details-section > .content > .group > .row.empty):
  19223. (.details-section > .content > .group:nth-child(even) > .row.empty:last-child):
  19224. (.details-section > .content > .group:nth-child(even) > .row.empty:last-child > *):
  19225. (.details-section > .content > .group:nth-child(even) > .row.empty:last-child > * > *):
  19226. (.details-section > .content > .group > .row > *):
  19227. (.details-section > .content > .group > .row > .label):
  19228. (.details-section > .content > .group > .row > .value):
  19229. (.details-section > .content > .group > .data-grid-row):
  19230. (.details-section > .content > .group > .data-grid-row.empty):
  19231. (.details-section > .content .data-grid):
  19232. * UserInterface/DetailsSection.js: Added.
  19233. (WebInspector.DetailsSection):
  19234. (WebInspector.DetailsSection.prototype.get element):
  19235. (WebInspector.DetailsSection.prototype.get title):
  19236. (WebInspector.DetailsSection.prototype.set title):
  19237. (WebInspector.DetailsSection.prototype.get collapsed):
  19238. (WebInspector.DetailsSection.prototype.set collapsed):
  19239. (WebInspector.DetailsSection.prototype.get groups):
  19240. (WebInspector.DetailsSection.prototype.set groups):
  19241. (WebInspector.DetailsSection.prototype._headerElementClicked):
  19242. (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded.disclosureImageLoaded):
  19243. (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded.generateDisclosureTriangle):
  19244. (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded):
  19245. * UserInterface/DetailsSectionDataGridRow.js: Added.
  19246. (WebInspector.DetailsSectionDataGridRow):
  19247. (WebInspector.DetailsSectionDataGridRow.prototype.constructor.WebInspector.DetailsSectionDataGridRow.get element):
  19248. (WebInspector.DetailsSectionDataGridRow.prototype.get emptyMessage):
  19249. (WebInspector.DetailsSectionDataGridRow.prototype.set emptyMessage):
  19250. (WebInspector.DetailsSectionDataGridRow.prototype.get dataGrid):
  19251. (WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
  19252. * UserInterface/DetailsSectionGroup.js: Added.
  19253. (WebInspector.DetailsSectionGroup):
  19254. (WebInspector.DetailsSectionGroup.prototype.get element):
  19255. (WebInspector.DetailsSectionGroup.prototype.get rows):
  19256. (WebInspector.DetailsSectionGroup.prototype.set rows):
  19257. * UserInterface/DetailsSectionRow.js: Added.
  19258. (WebInspector.DetailsSectionRow):
  19259. (WebInspector.DetailsSectionRow.prototype.get element):
  19260. (WebInspector.DetailsSectionRow.prototype.get label):
  19261. (WebInspector.DetailsSectionRow.prototype.set label):
  19262. (WebInspector.DetailsSectionRow.prototype.get value):
  19263. (WebInspector.DetailsSectionRow.prototype.set value):
  19264. * UserInterface/Main.html: Included DetailsSection.{css,js}, DetailsSectionDataGridRow.js,
  19265. DetailsSectionGroup.js, and DetailsSectionRow.js.
  19266. 2012-01-26 Timothy Hatcher <timothy@apple.com>
  19267. Selectively show and hide panels in the Details sidebar based on if they can inspect the current
  19268. represented objects being viewed in the content browser.
  19269. Needed for:
  19270. <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
  19271. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  19272. <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19273. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  19274. <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
  19275. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  19276. Reviewed by Brian Weinstein.
  19277. * UserInterface/Main.js:
  19278. (WebInspector.contentLoaded): Added event listener for CurrentRepresentedObjectsDidChange event.
  19279. (WebInspector._contentBrowserRepresentedObjectsDidChange): Added. Call inspect on each details
  19280. sidebar panel and show ones that return true and hide ones that return false.
  19281. 2012-01-26 Timothy Hatcher <timothy@apple.com>
  19282. Add WebInspector.DetailsSidebarPanel for use by panels in the Details sidebar.
  19283. Needed for:
  19284. <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
  19285. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  19286. <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19287. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  19288. <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
  19289. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  19290. Reviewed by Brian Weinstein.
  19291. * UserInterface/DetailsSidebarPanel.js: Added.
  19292. (WebInspector.DetailsSidebarPanel):
  19293. (WebInspector.DetailsSidebarPanel.prototype.inspect):
  19294. (WebInspector.DetailsSidebarPanel.prototype.shown):
  19295. (WebInspector.DetailsSidebarPanel.prototype.needsRefresh):
  19296. (WebInspector.DetailsSidebarPanel.prototype.refresh):
  19297. * UserInterface/Sidebar.js:
  19298. (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Call hidden and shown on the SidebarPanel.
  19299. (WebInspector.Sidebar.prototype.set collapsed): Update layout of the navigation bar when uncollapsed.
  19300. * UserInterface/SidebarPanel.js:
  19301. (WebInspector.SidebarPanel.prototype.shown): Added stub.
  19302. (WebInspector.SidebarPanel.prototype.hidden): Added stub.
  19303. 2012-01-26 Timothy Hatcher <timothy@apple.com>
  19304. Add support for removing and inserting SidebarPanels to WebInspector.Sidebar.
  19305. Needed for:
  19306. <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
  19307. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  19308. <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19309. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  19310. <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
  19311. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  19312. Reviewed by Brian Weinstein.
  19313. * UserInterface/NavigationBar.js:
  19314. (WebInspector.NavigationBar.prototype.removeNavigationItem): Clear the selected navigation item if it is this.
  19315. * UserInterface/Sidebar.js:
  19316. (WebInspector.Sidebar.prototype.insertSidebarPanel): Added.
  19317. (WebInspector.Sidebar.prototype.removeSidebarPanel): Added.
  19318. (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Allow setting of null. Factored out code into _findSidebarPanel.
  19319. (WebInspector.Sidebar.prototype._findSidebarPanel): Added.
  19320. 2012-01-25 Timothy Hatcher <timothy@apple.com>
  19321. Add support for getting the current represented objects from ContentBrowser.
  19322. Needed for:
  19323. <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
  19324. <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
  19325. <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
  19326. <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
  19327. <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
  19328. <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
  19329. Reviewed by Brian Weinstein.
  19330. * UserInterface/ContentBrowser.js:
  19331. (WebInspector.ContentBrowser.prototype.get currentRepresentedObjects): Added.
  19332. (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Make sure to set
  19333. components even if it is empty.
  19334. (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon): Set a timeout.
  19335. (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon.delayed): Fire the event.
  19336. (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Call
  19337. _dispatchCurrentRepresentedObjectsDidChangeEventSoon.
  19338. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call
  19339. _dispatchCurrentRepresentedObjectsDidChangeEventSoon.
  19340. * UserInterface/DOMTreeElementPathComponent.js:
  19341. (WebInspector.DOMTreeElementPathComponent): Set the representedObject to the treeElement.representedObject if
  19342. a representedObject wasn't passed in.
  19343. * UserInterface/GeneralTreeElementPathComponent.js:
  19344. (WebInspector.GeneralTreeElementPathComponent): Set the representedObject to the treeElement.representedObject if
  19345. a representedObject wasn't passed in.
  19346. * UserInterface/HierarchicalPathNavigationItem.js:
  19347. (WebInspector.HierarchicalPathNavigationItem.prototype.get lastComponent): Added.
  19348. 2012-01-26 Timothy Hatcher <timothy@apple.com>
  19349. Center align navigation items in navigation bars by default.
  19350. You can still get left alignment by adding a flexible space on the left. This make it easier than
  19351. flexible spaces on each side for center alignment.
  19352. Reviewed by Brian Weinstein.
  19353. * UserInterface/NavigationBar.css:
  19354. (.navigation-bar): Set -webkit-box-pack to center.
  19355. 2012-01-29 Timothy Hatcher <timothy@apple.com>
  19356. Add a helper function for display names of resource types.
  19357. Reviewed by Brian Weinstein.
  19358. * UserInterface/FrameTreeElement.js:
  19359. (WebInspector.FrameTreeElement.prototype._folderNameForResourceType): Use WebInspector.Resource.Type.displayName.
  19360. * UserInterface/Resource.js:
  19361. (WebInspector.Resource.Type.displayName): Added. Can return plural or singular strings.
  19362. 2012-01-29 Timothy Hatcher <timothy@apple.com>
  19363. Update the request headers when resources are redirected.
  19364. Reviewed by Brian Weinstein.
  19365. * UserInterface/FrameResourceManager.js:
  19366. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along the
  19367. request headers to updateForRedirectResponse.
  19368. * UserInterface/Resource.js:
  19369. (WebInspector.Resource.prototype.get updateForRedirectResponse): Added requestHeaders parameter.
  19370. Set _requestHeaders and fire the RequestHeadersDidChange event.
  19371. 2012-01-29 Timothy Hatcher <timothy@apple.com>
  19372. Centralize the code that adds zero-width spaces to long strings so it can be used
  19373. in other places.
  19374. Also add a copy event listener that strips the zero-width spaces from the pasteboard.
  19375. Reviewed by Brian Weinstein.
  19376. * UserInterface/DOMTreeElement.js:
  19377. (WebInspector.DOMTreeElement.prototype._buildAttributeDOM): Use insertWordBreakCharacters.
  19378. * UserInterface/Main.js:
  19379. (WebInspector.contentLoaded): Added copy event listener.
  19380. (WebInspector._sanitizeClipboardData): Added.
  19381. * UserInterface/Utilities.js:
  19382. (String.prototype.insertWordBreakCharacters): Added.
  19383. (String.prototype.removeWordBreakCharacters): Added.
  19384. 2012-01-27 Brian Weinstein <bweinstein@apple.com>
  19385. Create a log session when the inspector is first loaded.
  19386. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19387. Reviewed by Tim Hatcher.
  19388. * UserInterface/LogSidebarPanel.js:
  19389. (WebInspector.LogSidebarPanel):
  19390. 2012-01-27 Brian Weinstein <bweinstein@apple.com>
  19391. Add some functions for open source needed to create links and strings.
  19392. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19393. Reviewed by Tim Hatcher.
  19394. * UserInterface/LogContentView.js:
  19395. (WebInspector.LogContentView): Add a click handler to the content view.
  19396. (WebInspector.LogContentView.prototype._mouseWasClicked): Find the <a> element we clicked on,
  19397. and open the URL. This does the right thing for external resources (loads them in Safari),
  19398. and resources from the page (loads the Resource in the inspector).
  19399. * UserInterface/Main.js:
  19400. (WebInspector.linkifyURLAsNode): Copied from open source.
  19401. (WebInspector.linkifyStringAsFragmentWithCustomLinkifier): Ditto.
  19402. (WebInspector.linkifyStringAsFragment): Ditto.
  19403. 2012-01-27 Brian Weinstein <bweinstein@apple.com>
  19404. Show the DOM tree for an element that the user enters.
  19405. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19406. Reviewed by Tim Hatcher.
  19407. * UserInterface/ConsoleMessageImpl.js:
  19408. (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): Create a DOMTreeOutline instead
  19409. of an ElementTreeOutline, and get the node from the DOMTreeManager.
  19410. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19411. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19412. Add working versions of LogContentView.css and LogContentView.js.
  19413. LogContentView.css copied rules for open source's
  19414. inspector.css, with one change to add outline: none to the prompt and a change to use the same font that
  19415. we use in the text editor.
  19416. LogContentView.js changed *styleClass to classList.*, and removed calls to objects that we don't have in
  19417. our inspector (WebInspector.settings, WebInspector.debuggerPresentationModel).
  19418. This patch makes the console view show up, and you can type and run JavaScript.
  19419. Reviewed by Tim Hatcher.
  19420. * UserInterface/LogContentView.css: Added. Copied selected rules from inspector.css in Open Source.
  19421. * UserInterface/LogContentView.js: Added. This file was copied from Open Source, but changes have been
  19422. made to remove calls to objects that we don't have in our inspector (WebInspector.settings, WebInspector.debuggerPresentationModel),
  19423. and *styleClass has been changed to classList.*.
  19424. * UserInterface/Main.html: Added new files.
  19425. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19426. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19427. Add some needed functions to Utilities.js. These were copied from Open Source, but switched over
  19428. to the Object.defineProperty syntax.
  19429. Reviewed by Tim Hatcher.
  19430. * UserInterface/Utilities.js:
  19431. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19432. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19433. Add the ConsoleMessage and ConsoleMessageImpl files from Open Source. These will be renamed
  19434. and combined in a follow-up patch.
  19435. Reviewed by Tim Hatcher.
  19436. * UserInterface/ConsoleMessage.js: Added. Copied from Open Source's ConsoleModel.js.
  19437. * UserInterface/ConsoleMessageImpl.js: Added. Copied from Open Source. The only changes are
  19438. changing *styleClass -> classList.*.
  19439. * UserInterface/Main.html: Added new files.
  19440. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19441. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19442. Add the TextPrompt.js and TextPrompt.css files. These are needed for autocompleting of the
  19443. user's input.
  19444. Reviewed by Tim Hatcher.
  19445. * UserInterface/Main.html: Add new files.
  19446. * UserInterface/TextPrompt.css: Added. Copied from Open Source.
  19447. * UserInterface/TextPrompt.js: Added. Copied from Open Source. The only changes that were
  19448. made were changing *styleClass("class") -> classList.*("class").
  19449. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19450. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19451. Add some images that will be needed by the log console view.
  19452. These need to be in HiDPI. I updated <rdar://problem/10749265> to say that the console images
  19453. need to be HiDPI as well.
  19454. Reviewed by Tim Hatcher.
  19455. * UserInterface/Images/disclosureTriangleSmallDown.png: Added.
  19456. * UserInterface/Images/disclosureTriangleSmallRight.png: Added.
  19457. * UserInterface/Images/errorIcon.png: Added.
  19458. * UserInterface/Images/searchSmallBrightBlue.png: Added.
  19459. * UserInterface/Images/userInputIcon.png: Added.
  19460. * UserInterface/Images/userInputResultIcon.png: Added.
  19461. * UserInterface/Images/warningIcon.png: Added.
  19462. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19463. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19464. Add some needed files from Open Source.
  19465. Reviewed by Tim Hatcher.
  19466. * UserInterface/Images/deleteIcon.png: Added.
  19467. * UserInterface/Main.html: Added new files.
  19468. * UserInterface/ObjectPropertiesSection.js: Added. Copied from Open Source.
  19469. * UserInterface/PropertiesSection.js: Added. Copied from Open Source.
  19470. * UserInterface/Section.css: Added. Copied selected rules about .section and .properties-tree from Open Source.
  19471. * UserInterface/Section.js: Added. Copied from Open Source.
  19472. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19473. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19474. This patch hooks up the plumbing to show a LogContentView (which doesn't exist), when a tree element
  19475. from the Log sidebar panel is selected.
  19476. Reviewed by Tim Hatcher.
  19477. * UserInterface/ContentView.js:
  19478. (WebInspector.ContentView): Add a case for LogObject. It creates a LogContentView, which isn't available
  19479. yet, but will be in a later patch.
  19480. (WebInspector.ContentView.isViewable): Ditto.
  19481. * UserInterface/LogSidebarPanel.js:
  19482. (WebInspector.LogSidebarPanel):
  19483. (WebInspector.LogSidebarPanel.prototype._treeElementSelected): Make sure the selected element
  19484. has a LogObject as its represented object, and then show the correct content view.
  19485. * UserInterface/Main.js:
  19486. (WebInspector.contentBrowserTreeElementForRepresentedObject): Add a case for LogObject.
  19487. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19488. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19489. Add a stub LogObject and use that as the represented object for the logs sidebar panel.
  19490. Reviewed by Tim Hatcher.
  19491. * UserInterface/LogObject.js: Added.
  19492. (WebInspector.LogObject):
  19493. * UserInterface/LogSidebarPanel.js:
  19494. (WebInspector.LogSidebarPanel.prototype._sessionStarted):
  19495. * UserInterface/Main.html:
  19496. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19497. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19498. Add tree elements to the Log Sidebar. Each tree element has the URL and date of when the page started loading,
  19499. and selecting it will show a console view in the future.
  19500. If the same page is loaded, the console sidebar isn't cleared, but when a page with a different URL is loaded,
  19501. then the sidebar is cleared.
  19502. Reviewed by Tim Hatcher.
  19503. * UserInterface/LogManager.js:
  19504. (WebInspector.LogManager):
  19505. (WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize):
  19506. (WebInspector.LogManager.prototype._mainResourceDidChange):
  19507. * UserInterface/LogSidebarPanel.js:
  19508. (WebInspector.LogSidebarPanel):
  19509. (WebInspector.LogSidebarPanel.prototype.constructor.WebInspector.LogSidebarPanel._sessionStarted):
  19510. (WebInspector.LogSidebarPanel.prototype._logsCleared):
  19511. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19512. More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19513. Add a stub LogManager, and call it from Main.js.
  19514. Reviewed by Tim Hatcher.
  19515. * UserInterface/ConsoleObserver.js:
  19516. (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded):
  19517. * UserInterface/LogManager.js: Added.
  19518. (WebInspector.LogManager):
  19519. (WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize):
  19520. * UserInterface/Main.html:
  19521. * UserInterface/Main.js:
  19522. (WebInspector.contentLoaded):
  19523. 2012-01-26 Brian Weinstein <bweinstein@apple.com>
  19524. Start of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
  19525. Add a stub LogSidebarPanel and create it instead of a generic sidebar panel for Log.
  19526. Reviewed by Tim Hatcher.
  19527. * UserInterface/Main.html:
  19528. * UserInterface/Main.js:
  19529. (WebInspector.contentLoaded):
  19530. 2012-01-25 Brian Weinstein <bweinstein@apple.com>
  19531. More of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  19532. Highlight lines that have errors or warnings. This patch doesn't behave correctly for lines that
  19533. have multiple issues, but that won't be implemented until we actually show the issues on the page.
  19534. This patch adds a new delegate call to TextEditor - textEditorLineContentUpdated. When a single line's
  19535. content is updated, it calls to the delegate, which will add a style class if there is an issue on that
  19536. line. In the future, it will also add the error text, but that will be done later as well.
  19537. Reviewed by Tim Hatcher.
  19538. * UserInterface/TextResourceContentView.css:
  19539. (.text-editor .text-editor-text-chunk.error): Add a background color and a box shadow.
  19540. (.text-editor .text-editor-text-chunk.warning): Ditto.
  19541. * UserInterface/TextEditor.js:
  19542. (WebInspector.TextEditor.prototype.singleLineElementForLine): Returns the element of the line if it is
  19543. a single line (if it's not, it isn't visible and we don't need to worry about it).
  19544. (WebInspector.TextEditorTextChunk.prototype.updateContent):
  19545. * UserInterface/TextResourceContentView.js:
  19546. (WebInspector.TextResourceContentView.prototype.addIssue): Call _addIssueToLine if we have an element to update.
  19547. (WebInspector.TextResourceContentView.prototype._addIssueToLine): Add a style class to the line if there is an
  19548. issue.
  19549. (WebInspector.TextResourceContentView.prototype.textEditorLineContentUpdated): Call _addIssueToLine if we have
  19550. any issues on that line.
  19551. * UserInterface/IssueManager.js
  19552. (WebInspector.IssueManager.prototype.issueWasAdded): We are given 1-based line numbers from the protocol, but everywhere
  19553. in the inspector deals with 0 based line numbers. Subtract 1 from the issue line number that we are given before
  19554. storing the IssueMessage.
  19555. 2012-01-24 Brian Weinstein <bweinstein@apple.com>
  19556. More of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  19557. When a TextResourceContentView is instantiated, get a list of issues for its resource, and start listening for more.
  19558. When we get an issue from the listener or from the constructor, call _addIssue on them, which adds the issue to
  19559. the content view's collection of issues.
  19560. Reviewed by Tim Hatcher.
  19561. * UserInterface/TextResourceContentView.js:
  19562. (WebInspector.TextResourceContentView): Start listening for issues and build a list of issues.
  19563. (WebInspector.TextResourceContentView.prototype._issueWasAdded): Call _addIssue.
  19564. (WebInspector.TextResourceContentView.prototype._addIssue): Add the issue to our list of issues, and add a FIXME to do more
  19565. with it.
  19566. 2012-01-23 Brian Weinstein <bweinstein@apple.com>
  19567. Remove some unused variables.
  19568. Rubber-stamped by Joseph Pecoraro.
  19569. * UserInterface/TextEditor.js:
  19570. 2012-01-23 Brian Weinstein <bweinstein@apple.com>
  19571. Last part of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19572. When a resource match is selected in the search sidebar, select the text that was searched for in
  19573. the TextContentResourceView and scroll it into view.
  19574. This makes it easier to find the text that the user searched for in long lines.
  19575. Reviewed by Tim Hatcher.
  19576. * UserInterface/FrameContentView.js:
  19577. (WebInspector.FrameContentView.prototype.showSourceCode): Pass the text range to select along.
  19578. * UserInterface/ResourceSidebarPanel.js:
  19579. (WebInspector.ResourceSidebarPanel.prototype.showResourceSourceCode): Ditto.
  19580. * UserInterface/SearchSidebarPanel.js:
  19581. (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Ditto.
  19582. * UserInterface/TextResourceContentView.js:
  19583. (WebInspector.TextResourceContentView.prototype.contentAvailable): Ditto.
  19584. (WebInspector.TextResourceContentView.prototype.revealLine): Ditto.
  19585. * UserInterface/TextEditor.js:
  19586. (WebInspector.TextEditor.prototype.shown): Ditto.
  19587. (WebInspector.TextEditor.prototype.revealLine): Build a selection range (start and end nodes and offsets), and set our selection
  19588. and bring the container of the selection end into view.
  19589. (WebInspector.TextEditor.prototype.revealLine.getTextNodes): Finds all of the text nodes in a possibly syntax highlighted line.
  19590. (WebInspector.TextEditor.prototype.revealLine.findOffsetInTextNodes): Iterate over all of the text nodes, and find the child
  19591. node and offset into the child node that matches the offset into the whole line.
  19592. 2012-01-23 Timothy Hatcher <timothy@apple.com>
  19593. Fix some errors when inspecting frames now that #document is included in the tree.
  19594. This gives document nodes their own "D" icon, which was previously missing because of
  19595. a typo for the "N" icon.
  19596. Reviewed by Brian Weinstein.
  19597. * UserInterface/DOMTreeElementPathComponent.js:
  19598. (WebInspector.DOMTreeElementPathComponent): Add a case for Node.DOCUMENT_NODE. Fix a typo
  19599. by using DOMNodeIconStyleClassName instead of DOMUnknownNodeIconStyleClassName.
  19600. * UserInterface/Images/DOMDocument.pdf: Added.
  19601. * UserInterface/PathComponentIcons.css:
  19602. (.dom-document-icon .icon): Added.
  19603. 2012-01-23 Timothy Hatcher <timothy@apple.com>
  19604. Merge the DOMAgent.js change in r105620 so the Inspect Element content menu works in frames.
  19605. Reviewed by Brian Weinstein.
  19606. * UserInterface/DOMNode.js:
  19607. (WebInspector.DOMNode.prototype._setChildrenPayload): Return early for frame elements.
  19608. 2012-01-23 Timothy Hatcher <timothy@apple.com>
  19609. Make command-clicking links in the DOM tree always open into a new Safari window/tab.
  19610. Since DOMTreeContentView delays the call to WebInspector.openURL, the openURL function
  19611. can't look at window.event to see if the command key is down. So we need to do that
  19612. check before calling openURL.
  19613. Reviewed by Brian Weinstein.
  19614. * UserInterface/DOMTreeContentView.js:
  19615. (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Check for metaKey
  19616. and pass that as alwaysOpenExternally to WebInspector.openURL.
  19617. 2012-01-23 Timothy Hatcher <timothy@apple.com>
  19618. Use InspectorFrontendHost.openInNewTab instead of PageAgent.open now that
  19619. https://webkit.org/b/74790 is fixed.
  19620. Reviewed by Brian Weinstein.
  19621. * UserInterface/Main.js:
  19622. (WebInspector.openURL): Use InspectorFrontendHost.openInNewTab instead of PageAgent.open.
  19623. 2012-01-23 Brian Weinstein <bweinstein@apple.com>
  19624. More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19625. Support the ability to have multiple matches on a line when we search the DOM.
  19626. When we find a DOM element matches our search term, we generate a title for it (by moving the _generateTitle
  19627. function from DOMSearchMatchObject out of the class to a static method), and find all of our matches in the title.
  19628. We then generate DOMSearchMatchObjects and SearchResultTreeElements for each of these.
  19629. Reviewed by Tim Hatcher.
  19630. * UserInterface/DOMSearchMatchObject.js:
  19631. (WebInspector.DOMSearchMatchObject):
  19632. (WebInspector.DOMSearchMatchObject.prototype.get title): Returns the title.
  19633. (WebInspector.DOMSearchMatchObject.prototype.get textRange): Returns the text range.
  19634. (WebInspector.DOMSearchMatchObject.titleForDOMNode):
  19635. * UserInterface/SearchResultTreeElement.js:
  19636. (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): We always have a textRange now, both DOMSearchMatchObject and ResourceSearchMatchObject
  19637. both have a textRange getter.
  19638. * UserInterface/SearchSidebarPanel.js:
  19639. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Generate
  19640. the text for the DOM node that we found a result for, and find all of the matching instances in that node.
  19641. 2012-01-23 Brian Weinstein <bweinstein@apple.com>
  19642. More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19643. Support the ability to have multiple matches on a line for when we search in a resource.
  19644. When the PageAgent gives us information about the lines that match our search query, instead of just
  19645. finding the first match, find all of the matches on that line. Create a ResourceSearchMatchObject and
  19646. SearchResultTreeElement for each result on the line.
  19647. Reviewed by Tim Hatcher.
  19648. * UserInterface/ResourceSearchMatchObject.js:
  19649. (WebInspector.ResourceSearchMatchObject): Set the textRange
  19650. (WebInspector.ResourceSearchMatchObject.prototype.get textRange):
  19651. * UserInterface/SearchResultTreeElement.js:
  19652. (WebInspector.SearchResultTreeElement):
  19653. (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): If we were given a text range, use that instead of finding the first match
  19654. in the title.
  19655. * UserInterface/SearchSidebarPanel.js:
  19656. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Find
  19657. all of the matches on the line instead of just the first one.
  19658. 2012-01-23 Brian Weinstein <bweinstein@apple.com>
  19659. More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19660. Bring TextRange over from open source.
  19661. Reviewed by Tim Hatcher.
  19662. * UserInterface/TextRange.js: Added.
  19663. (WebInspector.TextRange):
  19664. (WebInspector.TextRange.prototype.constructor.WebInspector.TextRange.isEmpty):
  19665. (WebInspector.TextRange.prototype.get linesCount):
  19666. (WebInspector.TextRange.prototype.collapseToEnd):
  19667. (WebInspector.TextRange.prototype.normalize):
  19668. (WebInspector.TextRange.prototype.clone):
  19669. 2012-01-20 Brian Weinstein <bweinstein@apple.com>
  19670. More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19671. Cancel old searches when new ones are started.
  19672. Reviewed by Tim Hatcher.
  19673. * UserInterface/SearchSidebarPanel.js:
  19674. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Check
  19675. to make sure we are still appending results for the right searchId.
  19676. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback): Set the current _searchId.
  19677. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call _cancelCurrentSearch.
  19678. (WebInspector.SearchSidebarPanel.prototype._cancelCurrentSearch): If a search ID is set, call DOMAgent.discardSearchResults on it,
  19679. and delete the searchId.
  19680. 2012-01-22 Timothy Hatcher <timothy@apple.com>
  19681. Collaspe path components in the navigation bar when they are too wide to fit.
  19682. The components collapse from left to right with text truncation and eventually to just the icon.
  19683. Reviewed by Brian Weinstein.
  19684. * UserInterface/HierarchicalPathComponent.css:
  19685. (.hierarchical-path-component): Use -webkit-box and set a min-width.
  19686. (.hierarchical-path-component > .title): Use -webkit-box so the title can flex.
  19687. (.hierarchical-path-component > .title > .content): Added. Needed to make text-overflow work.
  19688. (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child): Added.
  19689. Use a different min-width since the separator is hidden.
  19690. (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child > .separator):
  19691. Renamed to use :last-child instead of :last-of-type.
  19692. * UserInterface/HierarchicalPathComponent.js:
  19693. (WebInspector.HierarchicalPathComponent): Create a title content element.
  19694. (WebInspector.HierarchicalPathComponent.prototype.get displayName): Use the title content element.
  19695. (WebInspector.HierarchicalPathComponent.prototype.set displayName): Ditto. Also set the tool tip.
  19696. (WebInspector.HierarchicalPathComponent.prototype.get forcedWidth): Added.
  19697. (WebInspector.HierarchicalPathComponent.prototype.set forcedWidth): Added.
  19698. * UserInterface/HierarchicalPathNavigationItem.js:
  19699. (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Call updateLayout on the NavigationBar.
  19700. (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Added.
  19701. * UserInterface/NavigationBar.js:
  19702. (WebInspector.NavigationBar.prototype.insertNavigationItem): Set _parentNavigationBar to this.
  19703. (WebInspector.NavigationBar.prototype.removeNavigationItem): Set _parentNavigationBar to null.
  19704. (WebInspector.NavigationBar.prototype.updateLayout): Call updateLayout on each navigation item.
  19705. * UserInterface/NavigationItem.js:
  19706. (WebInspector.NavigationItem.prototype.get parentNavigationBar): Added.
  19707. (WebInspector.NavigationItem.prototype.updateLayout): Added stub.
  19708. 2012-01-22 Timothy Hatcher <timothy@apple.com>
  19709. Make it possible for content views to update their layout as the size of the content area changes.
  19710. The DOM tree needs this to update the size of the selection to stay aligned with the row. Data grid
  19711. based content views need this to update the position of the resizer elements. The font content view
  19712. uses this to update the size of the font preview.
  19713. Reviewed by Brian Weinstein.
  19714. * UserInterface/ClusterContentView.js:
  19715. (WebInspector.ClusterContentView.prototype.updateLayout): Added. Call through to the current content view.
  19716. * UserInterface/ContentBrowser.js:
  19717. (WebInspector.ContentBrowser.prototype.updateLayout): Added. Call updateLayout on the navigation bar and
  19718. the content view container.
  19719. * UserInterface/ContentView.js:
  19720. (WebInspector.ContentView.prototype.updateLayout): Added stub.
  19721. * UserInterface/ContentViewContainer.js:
  19722. (WebInspector.ContentViewContainer.prototype.updateLayout): Added. Call through to the current content view.
  19723. * UserInterface/CookieStorageContentView.js:
  19724. (WebInspector.CookieStorageContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
  19725. * UserInterface/DOMStorageContentView.js:
  19726. (WebInspector.DOMStorageContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
  19727. * UserInterface/DOMTreeContentView.js:
  19728. (WebInspector.DOMTreeContentView.prototype.updateLayout): Added. Call updateSelection on the DOMTreeOutline.
  19729. * UserInterface/DatabaseTableContentView.js:
  19730. (WebInspector.DatabaseTableContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
  19731. * UserInterface/FontResourceContentView.js:
  19732. (WebInspector.FontResourceContentView.prototype.updateLayout): Added. Call sizeToFit.
  19733. (WebInspector.FontResourceContentView.prototype.shown): Removed call to sizeToFit since updateLayout is
  19734. called on show too.
  19735. * UserInterface/Main.js:
  19736. (WebInspector.contentLoaded): Added event listeners for Sidebar.Event.WidthDidChange and window resize.
  19737. (WebInspector._contentBrowserSizeDidChange): Added. Call updateLayout on contentBrowser.
  19738. * UserInterface/Sidebar.js:
  19739. (WebInspector.Sidebar.prototype.set width): Fire WidthDidChange event.
  19740. (WebInspector.Sidebar.prototype.set collapsed): Ditto.
  19741. 2012-01-21 Timothy Hatcher <timothy@apple.com>
  19742. Remove resources from the Search and Issue sidebars when the frames they belong to are
  19743. removed or navigated to a new page.
  19744. Part of:
  19745. <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
  19746. <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
  19747. Reviewed by Brian Weinstein.
  19748. * UserInterface/Frame.js:
  19749. (WebInspector.Frame.prototype.isDetached): Added. Helper function.
  19750. * UserInterface/IssueSidebarPanel.js:
  19751. (WebInspector.IssueSidebarPanel): Added event listeners.
  19752. (WebInspector.IssueSidebarPanel.prototype._checkForOldResources): Added.
  19753. (WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
  19754. * UserInterface/SearchSidebarPanel.js:
  19755. (WebInspector.SearchSidebarPanel): Added event listeners.
  19756. (WebInspector.SearchSidebarPanel.prototype._checkForOldResources): Added.
  19757. (WebInspector.SearchSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
  19758. 2012-01-21 Timothy Hatcher <timothy@apple.com>
  19759. Disassociate resources from their frame when the main resource changes.
  19760. Resources were not being disassociated, so they always had a valid parentFrame. This made it
  19761. hard to tell if a resource was still part of the page or not. This change is needed so the Search
  19762. and Issue sidebars knows when it can remove resources during navigation.
  19763. Reviewed by Brian Weinstein.
  19764. * UserInterface/Frame.js:
  19765. (WebInspector.Frame.prototype.initialize): Call _disassociateWithResource for the old main resource.
  19766. (WebInspector.Frame.prototype.commitProvisionalLoad): Ditto. Also call removeAllResources before
  19767. committing the provisional resources.
  19768. * UserInterface/Resource.js:
  19769. (WebInspector.Resource.prototype.isMainResource): Null check _parentFrame.
  19770. (WebInspector.Resource.prototype._requestContentFromBackend): Null check _parentFrame and add a
  19771. fallback branch so pending callbacks get notified.
  19772. * UserInterface/ResourceTreeElement.js:
  19773. (WebInspector.ResourceTreeElement.prototype._updateTitles): Null check frame.
  19774. 2012-01-21 Timothy Hatcher <timothy@apple.com>
  19775. Show a focus ring around the search field in the Search sidebar of the Web Inspector.
  19776. The filter field does not show a focus ring (matching Xcode), but the search field should.
  19777. Reviewed by Dan Bernstein.
  19778. * UserInterface/FilterBar.css:
  19779. (.filter-bar): Remove outline: none. Not sure why it was here, it is still set on
  19780. .filter-bar > input[type="search"].
  19781. * UserInterface/SearchSidebarPanel.css:
  19782. (.sidebar > .panel.search > .search-bar): Remove outline: none.
  19783. (.sidebar > .panel.search > .search-bar > input[type="search"]): Ditto.
  19784. 2012-01-21 Timothy Hatcher <timothy@apple.com>
  19785. Make filtering work again in the Search sidebar of the Web Inspector.
  19786. In r40218 the mainTitle became a DocumentFragemnt, but the filtering code expects a string.
  19787. Reviewed by Dan Bernstein.
  19788. * UserInterface/SearchResultTreeElement.js:
  19789. (WebInspector.SearchResultTreeElement.prototype.get filterableData): Added. Return the raw
  19790. title of the represented object, which is still a string.
  19791. 2012-01-20 Timothy Hatcher <timothy@apple.com>
  19792. Allow resizing the Web Inspector when docked.
  19793. Reviewed by Brian Weinstein.
  19794. * UserInterface/Main.css:
  19795. (#docked-resizer): Added.
  19796. (body.docked #docked-resizer): Added.
  19797. * UserInterface/Main.html: Added #docked-resizer element.
  19798. * UserInterface/Main.js:
  19799. (WebInspector.contentLoaded): Add mousedown listener on #docked-resizer.
  19800. (WebInspector._dockedResizerMouseDown): Added.
  19801. (WebInspector._dockedResizerMouseDown.dockedResizerDrag): Added.
  19802. (WebInspector._dockedResizerMouseDown.dockedResizerDragEnd): Added.
  19803. 2012-01-20 Timothy Hatcher <timothy@apple.com>
  19804. Add dock toggle and close buttons to the new Web Inspector.
  19805. Reviewed by Brian Weinstein.
  19806. * UserInterface/ButtonNavigationItem.css:
  19807. (.navigation-bar > .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
  19808. Added :not(.suppress-bezel).
  19809. * UserInterface/ButtonNavigationItem.js:
  19810. (WebInspector.ButtonNavigationItem.prototype.get suppressBezel): Added.
  19811. (WebInspector.ButtonNavigationItem.prototype.set suppressBezel): Added.
  19812. * UserInterface/Images/Close.pdf: Added.
  19813. * UserInterface/Images/Dock.pdf: Added.
  19814. * UserInterface/Images/Undock.pdf: Added.
  19815. * UserInterface/InspectorFrontendAPI.js: Added.
  19816. (InspectorFrontendAPI._loaded): Added.
  19817. (InspectorFrontendAPI._pendingCommands): Added.
  19818. (InspectorFrontendAPI.isDebuggingEnabled): Added stub.
  19819. (InspectorFrontendAPI.setDebuggingEnabled): Added stub.
  19820. (InspectorFrontendAPI.isTimelineProfilingEnabled): Added stub.
  19821. (InspectorFrontendAPI.setTimelineProfilingEnabled): Added stub.
  19822. (InspectorFrontendAPI.isProfilingJavaScript): Added stub.
  19823. (InspectorFrontendAPI.startProfilingJavaScript): Added stub.
  19824. (InspectorFrontendAPI.stopProfilingJavaScript): Added stub.
  19825. (InspectorFrontendAPI.setAttachedWindow): Added. Calls updateDockedState.
  19826. (InspectorFrontendAPI.showConsole): Added stub.
  19827. (InspectorFrontendAPI.dispatch): Added stub.
  19828. (InspectorFrontendAPI.loadCompleted): Added stub.
  19829. * UserInterface/Main.css:
  19830. (body.docked): Added. Adds a top border.
  19831. * UserInterface/Main.html: Included InspectorFrontendAPI.js.
  19832. * UserInterface/Main.js:
  19833. (WebInspector.contentLoaded): Create and insert the dock toggle and close buttons. Tell InspectorFrontendAPI
  19834. that we are loaded so pending commands are dispatched.
  19835. (WebInspector.updateDockedState): Added. Updates the sate of the navigation bar buttons.
  19836. (WebInspector.close): Added.
  19837. (WebInspector._dockToggleButtonToolTip): Added.
  19838. (WebInspector._toggleDockedState): Added.
  19839. * UserInterface/Utilities.js:
  19840. (parseLocationQueryParameters): Added. Helper to parse the query string.
  19841. 2012-01-19 Brian Weinstein <bweinstein@apple.com>
  19842. More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19843. Instead of passing a string as a title to the GeneralTreeElement, pass a DocumentFragment which
  19844. contains our necessary text, but highlights the search string.
  19845. Reviewed by Tim Hatcher.
  19846. * UserInterface/GeneralTreeElement.js:
  19847. (WebInspector.GeneralTreeElement.prototype._updateTitleElements): Add a special case for _mainTitle
  19848. being a Node.
  19849. * UserInterface/NavigationSidebarPanel.css:
  19850. (.navigation-sidebar-panel-content-tree-outline .item .highlight): Set the highlighted text to have
  19851. a yellow background with a darker yellow bottom border to match Xcode.
  19852. * UserInterface/SearchResultTreeElement.js:
  19853. (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Create a document fragment, and
  19854. break the matching text into parts (before match, match, after match), and add a span around
  19855. the matching text.
  19856. 2012-01-19 Brian Weinstein <bweinstein@apple.com>
  19857. More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19858. Implement proper truncation of the search results, so the search term will always show up in the
  19859. title text of the search term
  19860. Reviewed by Tim Hatcher.
  19861. * UserInterface/DOMSearchMatchObject.js:
  19862. (WebInspector.DOMSearchMatchObject.prototype.get searchTerm): Return the search term.
  19863. * UserInterface/ResourceSearchMatchObject.js:
  19864. (WebInspector.ResourceSearchMatchObject.prototype.get searchTerm): Ditto.
  19865. * UserInterface/SearchResultTreeElement.js:
  19866. (WebInspector.SearchResultTreeElement): Call truncateAndHighlightTitle.
  19867. (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Truncate the title, and
  19868. add a FIXME about highlighting it.
  19869. 2012-01-19 Timothy Hatcher <timothy@apple.com>
  19870. Make selecting an issue in the Issue sidebar show the resource's content view and reveal the line.
  19871. Part of: <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
  19872. Reviewed by Brian Weinstein.
  19873. * UserInterface/ConsoleObserver.js:
  19874. (WebInspector.ConsoleObserver.prototype.messageAdded): Pass line to IssueManager.
  19875. * UserInterface/IssueManager.js:
  19876. (WebInspector.IssueManager.prototype.issueWasAdded): Added lineNumber parameter.
  19877. * UserInterface/IssueMessage.js:
  19878. (WebInspector.IssueMessage): Added lineNumber parameter.
  19879. (WebInspector.IssueMessage.prototype.get lineNumber): Added.
  19880. * UserInterface/IssueSidebarPanel.js:
  19881. (WebInspector.IssueSidebarPanel): Set onselect to _treeElementSelected.
  19882. (WebInspector.IssueSidebarPanel.prototype._treeElementSelected): Added. Call showResourceSourceCode
  19883. based on the type of tree element selected.
  19884. * UserInterface/IssueTreeElement.js:
  19885. (WebInspector.IssueTreeElement): Added _issueMessage.
  19886. (WebInspector.IssueTreeElement.prototype.get issueMessage): Added.
  19887. 2012-01-19 Timothy Hatcher <timothy@apple.com>
  19888. Make selecting the resource in the search sidebar show the resource.
  19889. Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
  19890. Reviewed by Brian Weinstein.
  19891. * UserInterface/ResourceSidebarPanel.js:
  19892. (WebInspector.ResourceSidebarPanel.prototype.showResource): Added.
  19893. * UserInterface/SearchSidebarPanel.js:
  19894. (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Call ResourceSidebarPanel.showResource
  19895. if the tree element is a ResourceTreeElement.
  19896. 2012-01-19 Timothy Hatcher <timothy@apple.com>
  19897. Make selecting text search results show the resource's content view and reveal the line.
  19898. Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
  19899. Reviewed by Brian Weinstein.
  19900. * UserInterface/FrameContentView.js:
  19901. (WebInspector.FrameContentView.prototype.showSourceCode): Added lineNumberToReveal parameter.
  19902. * UserInterface/ResourceSearchMatchObject.js:
  19903. (WebInspector.ResourceSearchMatchObject.prototype.get resource): Added.
  19904. (WebInspector.ResourceSearchMatchObject.prototype.get lineNumber): Added.
  19905. * UserInterface/ResourceSidebarPanel.js:
  19906. (WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode): Added lineNumberToReveal parameter.
  19907. (WebInspector.ResourceSidebarPanel.prototype.showResourceSourceCode): Added.
  19908. * UserInterface/SearchSidebarPanel.js:
  19909. (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Handle ResourceSearchMatchObject.
  19910. * UserInterface/TextEditor.js:
  19911. (WebInspector.TextEditor.prototype.revealLine): Added. Find the right text chunk for the line, then
  19912. break it into single line text chunks then call scrollIntoViewIfNeeded on that text chunk.
  19913. (WebInspector.TextEditor.prototype.shown): Set _visible to true. Check if there is a line number that
  19914. needs to be revealed.
  19915. (WebInspector.TextEditor.prototype.hidden): Set _visible to false.
  19916. * UserInterface/TextResourceContentView.js:
  19917. (WebInspector.TextResourceContentView): Start _contentPopulated as false.
  19918. (WebInspector.TextResourceContentView.prototype.contentAvailable): Set _contentPopulated to true. Check if
  19919. there is a line number that needs to be revealed.
  19920. (WebInspector.TextResourceContentView.prototype.revealLine): Added.
  19921. 2012-01-19 Timothy Hatcher <timothy@apple.com>
  19922. Expand the resources tree elements in the Issues and Search sidebars by default.
  19923. Part of:
  19924. <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
  19925. <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
  19926. Reviewed by Brian Weinstein.
  19927. * UserInterface/IssueSidebarPanel.js:
  19928. (WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Call expand.
  19929. * UserInterface/SearchSidebarPanel.js:
  19930. (WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Call expand.
  19931. 2012-01-19 Timothy Hatcher <timothy@apple.com>
  19932. Call shown and hidden on the current content view in ClusterContentView.
  19933. This is needed for DOMTreeContentView to correctly reveal the selected DOM node when shown.
  19934. Reviewed by Brian Weinstein.
  19935. * UserInterface/ClusterContentView.js:
  19936. (WebInspector.ClusterContentView.prototype.shown): Call shown on the currentContentView if there is one.
  19937. (WebInspector.ClusterContentView.prototype.hidden): Call hidden on the currentContentView if there is one.
  19938. (WebInspector.ClusterContentView.prototype.get selectionPathComponents): Return [] if there is no currentContentView.
  19939. 2012-01-19 Timothy Hatcher <timothy@apple.com>
  19940. Make selecting DOM search results reveal and select the node in the DOM tree.
  19941. Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
  19942. Reviewed by Brian Weinstein.
  19943. * UserInterface/DOMSearchMatchObject.js:
  19944. (WebInspector.DOMSearchMatchObject.get domNode): Added.
  19945. * UserInterface/FrameContentView.js:
  19946. (WebInspector.FrameContentView.prototype.showDOMTree): Added preventFocusChange parameter.
  19947. * UserInterface/ResourceSidebarPanel.js:
  19948. (WebInspector.ResourceSidebarPanel.prototype.showMainFrameDOMTree): Added preventFocusChange parameter.
  19949. * UserInterface/SearchSidebarPanel.js:
  19950. (WebInspector.SearchSidebarPanel): Set onselect to _treeElementSelected.
  19951. (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Added. Call showMainFrameDOMTree for
  19952. DOMSearchMatchObject results.
  19953. 2012-01-18 Brian Weinstein <bweinstein@apple.com>
  19954. Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19955. Add icons for the search sidebar. We are reusing the icons from the path components icons, and added
  19956. the resource match icon from Xcode.
  19957. Reviewed by Tim Hatcher.
  19958. * UserInterface/DOMSearchMatchObject.js:
  19959. (WebInspector.DOMSearchMatchObject.prototype.get className): Call _generateClassName.
  19960. (WebInspector.DOMSearchMatchObject.prototype._generateClassName): Generate the correct class name from the node
  19961. type.
  19962. * UserInterface/Images/ResourceSearchMatch.pdf: Added.
  19963. * UserInterface/Main.html:
  19964. * UserInterface/ResourceSearchMatchObject.js:
  19965. (WebInspector.ResourceSearchMatchObject.prototype.get className): Return the resource match class name.
  19966. * UserInterface/SearchIcons.css: Added.
  19967. * UserInterface/SearchResultTreeElement.js:
  19968. (WebInspector.SearchResultTreeElement): Ask either the DOMSearchMatchObject or ResourceSearchMatchObject for its className.
  19969. 2012-01-18 Brian Weinstein <bweinstein@apple.com>
  19970. Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19971. Add some new classes, and generate proper titles for DOM search matches.
  19972. The new classes added are:
  19973. - DOMSearchMatchObject, which represents a match of the search term in the DOM.
  19974. - ResourceSearchMatchObject, which represents a match of the search term in a resource.
  19975. - SearchResultTreeElement, which represents the tree elements in the search sidebar, and its represented
  19976. object is either a DOMSearchMatchObject or a ResourceSearchMatchObject.
  19977. Reviewed by Tim Hatcher.
  19978. * UserInterface/DOMSearchMatchObject.js: Added.
  19979. (WebInspector.DOMSearchMatchObject):
  19980. (WebInspector.DOMSearchMatchObject.prototype.constructor.WebInspector.DOMSearchMatchObject.get title): Call _generateTitle if we don't
  19981. have one yet.
  19982. (WebInspector.DOMSearchMatchObject.prototype._generateTitle): Generate a title from the DOMNode.
  19983. * UserInterface/Main.html:
  19984. * UserInterface/ResourceSearchMatchObject.js: Added.
  19985. (WebInspector.ResourceSearchMatchObject):
  19986. (WebInspector.ResourceSearchMatchObject.prototype.constructor.WebInspector.ResourceSearchMatchObject.get title): Return the matching line
  19987. text with a FIXME.
  19988. * UserInterface/SearchResultTreeElement.js: Added.
  19989. (WebInspector.SearchResultTreeElement): Assert our represented object is either a DOMSearchMatchObject or a ResourceSearchMatchObject.
  19990. * UserInterface/SearchSidebarPanel.js:
  19991. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Create a SearchResultTreeElement.
  19992. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Ditto.
  19993. 2012-01-18 Brian Weinstein <bweinstein@apple.com>
  19994. Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  19995. Implement searching of the DOM, and add the results to the search sidebar alongside matches in resources.
  19996. This patch also stores the ResourceTreeElements in the SearchSidebarPanel class, since both DOM search results
  19997. and resource search results will need to be under the same parent.
  19998. Reviewed by Tim Hatcher.
  19999. * UserInterface/SearchSidebarPanel.js:
  20000. (WebInspector.SearchSidebarPanel):
  20001. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback):
  20002. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback):
  20003. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): For each
  20004. search result, get the DOM Node and owner document's URL, and add the DOM node under the owner document's ResourceTreeElement.
  20005. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback): Call DOMAgent.getSearchResults.
  20006. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call DOMAgent.performSearch.
  20007. 2012-01-18 Brian Weinstein <bweinstein@apple.com>
  20008. Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  20009. Implement searching of resources. Call the inspector API to search in all resources for our search term,
  20010. and then for each resource that found a match, search in that resource for all of the matching lines.
  20011. Reviewed by Tim Hatcher.
  20012. * UserInterface/SearchSidebarPanel.js:
  20013. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Loop
  20014. over each matching line, and add a ResourceTreeElement for the parent, and a tree element for each matching search result.
  20015. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback): For
  20016. each matching resource, search the resource.
  20017. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call PageAgent.searchInResources.
  20018. 2012-01-17 Brian Weinstein <bweinstein@apple.com>
  20019. Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  20020. Add a search field to the search sidebar. It is there and looks pretty, but doesn't do anything yet.
  20021. Reviewed by Tim Hatcher.
  20022. * UserInterface/Main.html:
  20023. * UserInterface/SearchSidebarPanel.css: Added.
  20024. (.sidebar > .panel.search > .content):
  20025. (.sidebar > .panel.search > .search-bar):
  20026. (.search-bar):
  20027. (.search-bar > input[type="search"]):
  20028. * UserInterface/SearchSidebarPanel.js:
  20029. (WebInspector.SearchSidebarPanel):
  20030. (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged):
  20031. 2012-01-17 Brian Weinstein <bweinstein@apple.com>
  20032. Start of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
  20033. Add a stub Search sidebar and call it from Main.js instead of creating a generic sidebar panel.
  20034. Reviewed by Tim Hatcher.
  20035. * UserInterface/Main.html:
  20036. * UserInterface/Main.js:
  20037. (WebInspector.contentLoaded):
  20038. * UserInterface/SearchSidebarPanel.js: Added.
  20039. (WebInspector.SearchSidebarPanel):
  20040. 2012-01-18 Timothy Hatcher <timothy@apple.com>
  20041. Make the Inspect Element context menu item work along with the inspect() console function.
  20042. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20043. Reviewed by Brian Weinstein.
  20044. * UserInterface/DOMTreeContentView.js:
  20045. (WebInspector.DOMTreeContentView.prototype.selectAndRevealDOMNode): Added.
  20046. (WebInspector.DOMTreeContentView.prototype._pathComponentSelected): Use selectDOMNode
  20047. instead of revealAndSelect since that also fires an event.
  20048. * UserInterface/DOMTreeManager.js:
  20049. (WebInspector.DOMTreeManager.prototype.inspectElement): Fire DOMNodeWasInspected.
  20050. (WebInspector.DOMTreeManager.prototype.inspectNodeObject): Added. Resolves an object to
  20051. a DOMNode and calls inspectElement.
  20052. * UserInterface/FrameContentView.js:
  20053. (WebInspector.FrameContentView): Remove call to _showContentViewForIdentifier.
  20054. (WebInspector.FrameContentView.prototype.get selectionPathComponents): Return [] if there
  20055. is no current content view.
  20056. (WebInspector.FrameContentView.prototype.shown): Added. Show the DOM tree if _shownInitialContent
  20057. is not true.
  20058. (WebInspector.FrameContentView.prototype.closed): Added. Reset _shownInitialContent to false.
  20059. (WebInspector.FrameContentView.prototype.showSourceCode): Added. Helper function.
  20060. (WebInspector.FrameContentView.prototype.showDOMTree): Added. Helper function.
  20061. (WebInspector.FrameContentView.prototype._pathComponentForContentView): Return null if there
  20062. is no current content view.
  20063. * UserInterface/InspectorObserver.js:
  20064. (WebInspector.InspectorObserver.prototype.inspect): Pass the object to the right manager.
  20065. * UserInterface/Main.js:
  20066. (WebInspector.contentLoaded): Enable the InspectorAgent.
  20067. * UserInterface/ResourceSidebarPanel.js:
  20068. (WebInspector.ResourceSidebarPanel): Add DOMNodeWasInspected event listener.
  20069. (WebInspector.ResourceSidebarPanel.prototype.showMainFrameDOMTree): Added. Helper function.
  20070. (WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode): Added. Helper function.
  20071. (WebInspector.ResourceSidebarPanel.prototype._domNodeWasInspected): Added. Call showMainFrameDOMTree.
  20072. * UserInterface/StorageManager.js:
  20073. (WebInspector.StorageManager.prototype.inspectDatabase): Added. Fire DatabaseWasInspected event.
  20074. (WebInspector.StorageManager.prototype.inspectDOMStorage): Added. Fire DOMStorageObjectWasInspected event.
  20075. (WebInspector.StorageManager.prototype._databaseForId): Added.
  20076. * UserInterface/StorageSidebarPanel.js:
  20077. (WebInspector.StorageSidebarPanel):
  20078. (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasInspected): Added. Reveal and select the tree element.
  20079. (WebInspector.StorageSidebarPanel.prototype._databaseWasInspected): Added. Ditto.
  20080. 2012-01-18 Timothy Hatcher <timothy@apple.com>
  20081. Add String.prototype.collapseWhitespace since it is needed by DOMTreeElement.js.
  20082. Reviewed by Jing Jin.
  20083. * UserInterface/Utilities.js:
  20084. (String.prototype.collapseWhitespace): Added.
  20085. 2012-01-18 Timothy Hatcher <timothy@apple.com>
  20086. Now that the document node for child frames is included in the DOM tree, use it as the root
  20087. for child frames to avoid seeing "#document" and having everything nested under it.
  20088. Also use the straight forward approach to request the document if the DOMTree is for the main frame.
  20089. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20090. Reviewed by Brian Weinstein.
  20091. * UserInterface/DOMTree.js:
  20092. (WebInspector.DOMTree.prototype.requestRootDOMNode.mainDocumentAvailable): Added.
  20093. (WebInspector.DOMTree.prototype.requestRootDOMNode): Evaluate "document" for child frames instead of
  20094. "window.frameElement". And use WebInspector.domTreeManager.requestDocument for the main frame.
  20095. 2012-01-17 Timothy Hatcher <timothy@apple.com>
  20096. Rename ContentBrowser.showContentForRepresentedObject to ContentBrowser.showContentViewForRepresentedObject.
  20097. Also adds ContentBrowser.showContentView and ContentBrowser.contentViewForRepresentedObject while making
  20098. the showContentView* functions return the content view that was shown so it can be used by the caller.
  20099. Reviewed by Brian Weinstein.
  20100. * UserInterface/ContentBrowser.js:
  20101. (WebInspector.ContentBrowser.prototype.showContentViewForRepresentedObject): Renamed from showContentForRepresentedObject.
  20102. (WebInspector.ContentBrowser.prototype.showContentView): Added. Call through to the contentViewContainer.
  20103. (WebInspector.ContentBrowser.prototype.contentViewForRepresentedObject): Added. Ditto.
  20104. (WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Use showContentViewForRepresentedObject.
  20105. * UserInterface/ContentViewContainer.js:
  20106. (WebInspector.ContentViewContainer.prototype.showContentViewForRepresentedObject): Return the contentView shown.
  20107. (WebInspector.ContentViewContainer.prototype.showContentView): Ditto.
  20108. * UserInterface/FrameContentView.js:
  20109. (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Return the contentView shown.
  20110. * UserInterface/Main.js:
  20111. (WebInspector.openURL): Use showContentViewForRepresentedObject.
  20112. * UserInterface/ResourceSidebarPanel.js:
  20113. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Use showContentViewForRepresentedObject
  20114. * UserInterface/StorageSidebarPanel.js:
  20115. (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Use showContentViewForRepresentedObject
  20116. 2012-01-17 Timothy Hatcher <timothy@apple.com>
  20117. Prevent leaking Web Inspector content views by unregistering event listeners from external objects
  20118. when the content views are closed.
  20119. Since some content views were registering as event listeners on external objects that had indefinite or
  20120. indeterminate lifetimes, that meant the closed content views were still around and responding to events
  20121. after they had been closed.
  20122. Reviewed by Brian Weinstein.
  20123. * UserInterface/ClusterContentView.js:
  20124. (WebInspector.ClusterContentView): Moved event listnener to shown.
  20125. (WebInspector.ClusterContentView.prototype.shown): Added. Add event listener that was in the constructor.
  20126. (WebInspector.ClusterContentView.prototype.closed): Added. Remove event listener and close all
  20127. content views so they can do their own work.
  20128. * UserInterface/ContentView.js:
  20129. (WebInspector.ContentView.prototype.closed): Added stub.
  20130. * UserInterface/ContentViewContainer.js:
  20131. (WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Call closed on the view.
  20132. * UserInterface/DOMTreeContentView.js:
  20133. (WebInspector.DOMTreeContentView): Moved event listnener to shown.
  20134. (WebInspector.DOMTreeContentView.prototype.shown): Add event listener that was in the constructor.
  20135. (WebInspector.DOMTreeContentView.prototype.closed): Added. Remove event listener.
  20136. * UserInterface/ResourceContentView.js:
  20137. (WebInspector.ResourceContentView): Moved event listnener to shown.
  20138. (WebInspector.ResourceContentView.prototype.shown): Added. Add event listener that was in the constructor.
  20139. (WebInspector.ResourceContentView.prototype.closed): Added. Remove event listener.
  20140. * UserInterface/ResourceSidebarPanel.js:
  20141. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Close the content views right away, not after
  20142. a delay to prevent the content views from responding to events when they are about to be closed anyway.
  20143. 2012-01-17 Timothy Hatcher <timothy@apple.com>
  20144. Minimize churn in the DOM tree content view when navigating between pages.
  20145. The DOMTree was calling callbacks multiple times because the list wasn't cleared
  20146. when the RootDOMNodeDidChange was sent. And DOMTreeContentView would request
  20147. the DOM node again when RootDOMNodeDidChange was observed, causing the same
  20148. callback to be added back into the pending callbacks array.
  20149. This change clears the pending callbacks array each time the DOMTree is invalidated
  20150. so it is the responsibility of the client to listen for the RootDOMNodeInvalidated
  20151. event and request the root DOM node again (which is what happens already.)
  20152. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20153. Reviewed by Brian Weinstein.
  20154. * UserInterface/DOMTree.js:
  20155. (WebInspector.DOMTree.Event.RootDOMNodeInvalidated): Renamed from RootDOMNodeDidChange to better
  20156. reflect what is means.
  20157. (WebInspector.DOMTree.prototype.invalidate.performInvalidate): Always fire the RootDOMNodeInvalidated
  20158. event and clear the pending callbacks.
  20159. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Check if we were invalidated
  20160. before continuing.
  20161. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Ditto.
  20162. (WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Ditto.
  20163. * UserInterface/DOMTreeContentView.js:
  20164. (WebInspector.DOMTreeContentView): Listen for the renamed RootDOMNodeInvalidated event.
  20165. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeInvalidated): Renamed from _rootDOMNodeDidChange.
  20166. * UserInterface/DOMTreeUpdater.js:
  20167. (WebInspector.DOMTreeUpdater.prototype._documentUpdated): Don't set rootDOMNode since the outline
  20168. might be for a subframe, and this is always the main document.
  20169. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20170. Properly create a RemoteObject in WebInspector.DOMTree so it can be released correctly.
  20171. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20172. Reviewed by Brian Weinstein.
  20173. * UserInterface/DOMTree.js:
  20174. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Make a RemoteObject using
  20175. WebInspector.RemoteObject.fromPayload and bind it to rootDOMNodeAvailable.
  20176. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Release the remote object.
  20177. 2012-01-17 Brian Weinstein <bweinstein@apple.com>
  20178. Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20179. Add images for for the error and warning tree elements.
  20180. Reviewed by Tim Hatcher.
  20181. * UserInterface/Images/Error.pdf: Added.
  20182. * UserInterface/Images/Warning.pdf: Added.
  20183. * UserInterface/IssueIcons.css: Added.
  20184. (.error-issue-icon .icon):
  20185. (.warning-issue-icon .icon):
  20186. * UserInterface/IssueTreeElement.js:
  20187. (WebInspector.IssueTreeElement):
  20188. * UserInterface/Main.html:
  20189. 2012-01-16 Brian Weinstein <bweinstein@apple.com>
  20190. Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20191. Move the information about an Issue tree element from IssueSidebarPanel to its own class - IssueTreeElement.
  20192. Reviewed by Tim Hatcher.
  20193. * UserInterface/IssueSidebarPanel.js:
  20194. (WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded): Create a new
  20195. IssueTreeElement, instead of a GeneralTreeElement.
  20196. * UserInterface/IssueTreeElement.js: Added.
  20197. (WebInspector.IssueTreeElement): Call through to GeneralTreeElement and set some properties.
  20198. (WebInspector.IssueTreeElement.titleForIssue): Moved from IssueSidebarPanel.
  20199. * UserInterface/Main.html: Added new file.
  20200. 2012-01-16 Brian Weinstein <bweinstein@apple.com>
  20201. Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20202. Implement displaying formatted console messages in the Issues Sidebar.
  20203. Reviewed by Tim Hatcher.
  20204. * UserInterface/ConsoleObserver.js:
  20205. (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): Pass along the
  20206. parameters.
  20207. * UserInterface/IssueManager.js:
  20208. (WebInspector.IssueManager.prototype.issueWasAdded): Ditto.
  20209. * UserInterface/IssueMessage.js:
  20210. (WebInspector.IssueMessage): Turn the objects that we were passed in as parameters
  20211. into WebInspector.RemoteObjects, and call this._formatTextIfNecessary to format
  20212. our text.
  20213. (WebInspector.IssueMessage.prototype._formatTextIfNecessary.valueFormatter): Get the value of the RemoteObject.
  20214. (WebInspector.IssueMessage.prototype._formatTextIfNecessary.append): Append b to a, and return a.
  20215. (WebInspector.IssueMessage.prototype._formatTextIfNecessary): Format our text, and append any unused substitutions
  20216. to the string we generate. Once we are done generating the string, we set that as our text.
  20217. 2012-01-13 Brian Weinstein <bweinstein@apple.com>
  20218. Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20219. Clear the issues sidebar when the page is navigated. Add a listener in IssueManager that fires an
  20220. event that IssueSidebarPanel listens to.
  20221. Reviewed by Tim Hatcher.
  20222. * UserInterface/IssueManager.js:
  20223. (WebInspector.IssueManager):
  20224. (WebInspector.IssueManager.prototype.issueWasAdded):
  20225. (WebInspector.IssueManager.prototype._mainResourceDidChange):
  20226. * UserInterface/IssueSidebarPanel.js:
  20227. (WebInspector.IssueSidebarPanel):
  20228. (WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded):
  20229. (WebInspector.IssueSidebarPanel.prototype._issuesCleared):
  20230. 2012-01-13 Brian Weinstein <bweinstein@apple.com>
  20231. Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20232. Add things to the Issues sidebar, sorted by file. We currently only show issues that have a URL provided.
  20233. Each folder in the sidebar is a resource where the error came from. Each issue has a main title of the
  20234. kind of issue it is, and a subtitle of the issue text.
  20235. Reviewed by Tim Hatcher.
  20236. * UserInterface/ConsoleObserver.js:
  20237. (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): If the message
  20238. was an error or warning, tell the IssueManager about it.
  20239. * UserInterface/IssueManager.js: Added.
  20240. (WebInspector.IssueManager):
  20241. (WebInspector.IssueManager.prototype.constructor.WebInspector.IssueManager.initialize):
  20242. (WebInspector.IssueManager.prototype.issueWasAdded): Dispatch a message saying an issue was added.
  20243. * UserInterface/IssueMessage.js: Added.
  20244. (WebInspector.IssueMessage):
  20245. * UserInterface/IssueSidebarPanel.js:
  20246. (WebInspector.IssueSidebarPanel):
  20247. (WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded):
  20248. (WebInspector.titleForIssue):
  20249. * UserInterface/Main.html: Add new files.
  20250. * UserInterface/Main.js:
  20251. (WebInspector.contentLoaded): Initialize the IssueManager.
  20252. * UserInterface/Utilities.js:
  20253. (Object.defineProperty): Add String.prototype.startsWith.
  20254. 2012-01-13 Brian Weinstein <bweinstein@apple.com>
  20255. Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20256. Add a new flavor of tree item to tree elements in a NavigationSidebarPanel. If you set both the small and twoLine properties
  20257. on a tree element, the title and subtitle will be on two lines, but it will only be slightly bigger than the
  20258. small style, and will still use the same small icon size.
  20259. Reviewed by Tim Hatcher.
  20260. * UserInterface/GeneralTreeElement.js:
  20261. (WebInspector.GeneralTreeElement.prototype.get twoLine):
  20262. (WebInspector.GeneralTreeElement.prototype.set twoLine):
  20263. (WebInspector.GeneralTreeElement.prototype.onattach):
  20264. * UserInterface/NavigationSidebarPanel.css:
  20265. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line):
  20266. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles):
  20267. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles.no-subtitle):
  20268. (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .icon):
  20269. (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .title::after):
  20270. (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .subtitle::before):
  20271. 2012-01-13 Brian Weinstein <bweinstein@apple.com>
  20272. Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20273. Implement FrameResourceManager.resourceForURL. This checks the main frame's main resource for the passed in URL,
  20274. and then calls the main frame's resourceForURL function, which checks subresources and recursively checks
  20275. subframes for the correct URL.
  20276. Reviewed by Tim Hatcher.
  20277. * UserInterface/FrameResourceManager.js:
  20278. (WebInspector.FrameResourceManager.prototype.resourceForURL):
  20279. 2012-01-12 Brian Weinstein <bweinstein@apple.com>
  20280. Start of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
  20281. Add a stub IssueSidebarPanel and call it from Main.js instead of just creating a generic sidebar panel.
  20282. Reviewed by Tim Hatcher.
  20283. * UserInterface/IssueSidebarPanel.js: Added.
  20284. (WebInspector.IssueSidebarPanel):
  20285. * UserInterface/Main.html: Add new file.
  20286. * UserInterface/Main.js:
  20287. (WebInspector.contentLoaded): Create an IssueSidebarPanel.
  20288. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20289. Make the DOM tree content view show the current DOM node selection path in the quick navigation bar.
  20290. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20291. Reviewed by Brian Weinstein and Joseph Pecoraro.
  20292. * UserInterface/DOMTreeContentView.js:
  20293. (WebInspector.DOMTreeContentView): Added event listener for DOM tree selection changes.
  20294. (WebInspector.DOMTreeContentView.prototype.get selectionPathComponents): Added. Return path components for the DOM tree selection.
  20295. (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Added. Fire the SelectionPathComponentsDidChange event.
  20296. (WebInspector.DOMTreeContentView.prototype._pathComponentSelected): Added. Reveal and select the DOM tree element.
  20297. * UserInterface/DOMTreeElement.js:
  20298. (WebInspector.DOMTreeElement.prototype.isCloseTag): Added.
  20299. * UserInterface/DOMTreeElementPathComponent.js: Added.
  20300. (WebInspector.DOMTreeElementPathComponent): Added.
  20301. (WebInspector.DOMTreeElementPathComponent.prototype.get domTreeElement): Added.
  20302. (WebInspector.DOMTreeElementPathComponent.prototype.get previousSibling): Added.
  20303. (WebInspector.DOMTreeElementPathComponent.prototype.get nextSibling): Added. Return null if isCloseTag.
  20304. * UserInterface/Images/DOMCharacterData.pdf: Added.
  20305. * UserInterface/Images/DOMComment.pdf: Added.
  20306. * UserInterface/Images/DOMDocumentType.pdf: Added.
  20307. * UserInterface/Images/DOMElement.pdf: Added.
  20308. * UserInterface/Images/DOMNode.pdf: Added.
  20309. * UserInterface/Images/DOMTextNode.pdf: Added.
  20310. * UserInterface/Main.html: Included DOMTreeElementPathComponent.js.
  20311. * UserInterface/PathComponentIcons.css:
  20312. (.dom-element-icon .icon): Added.
  20313. (.dom-text-node-icon .icon): Added.
  20314. (.dom-comment-icon .icon): Added.
  20315. (.dom-document-type-icon .icon): Added.
  20316. (.dom-character-data-icon .icon): Added.
  20317. (.dom-node-icon .icon): Added.
  20318. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20319. Make link navigation work in the DOM tree.
  20320. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20321. Reviewed by Brian Weinstein.
  20322. * UserInterface/DOMTreeContentView.js:
  20323. (WebInspector.DOMTreeContentView): Add click event listener.
  20324. (WebInspector.DOMTreeContentView.prototype._mouseWasClicked): Added. Start a timeout since this is a single
  20325. click, if the timeout is canceled before it fires, then a double-click happened or another link was clicked.
  20326. (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Added.
  20327. * UserInterface/DOMTreeElement.js:
  20328. (WebInspector.DOMTreeElement.prototype.onattach): Removed call to _preventFollowingLinksOnDoubleClick.
  20329. (WebInspector.DOMTreeElement.prototype.updateTitle): Ditto.
  20330. (WebInspector.DOMTreeElement.prototype._preventFollowingLinksOnDoubleClick): Removed.
  20331. (WebInspector.DOMTreeElement.prototype._buildAttributeDOM): Removed linkify parameter and remove dependency on
  20332. WebInspector.resourceURLForRelatedNode by making the anchor element directly.
  20333. (WebInspector.DOMTreeElement.prototype._buildTagDOM): Removed linkify parameter.
  20334. (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Ditto.
  20335. * UserInterface/Utilities.js:
  20336. (String.prototype.trimMiddle): Added.
  20337. (String.prototype.trimEnd): Added.
  20338. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20339. Remove dependency on WebInspector.DOMSyntaxHighlighter and make style and script DOM nodes syntax highlighted
  20340. by using WebInspector.SyntaxHighlighter.
  20341. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20342. Reviewed by Brian Weinstein and Joseph Pecoraro.
  20343. * UserInterface/DOMTreeElement.js:
  20344. (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Use WebInspector.syntaxHighlightStringAsDocumentFragment
  20345. instead of WebInspector.DOMSyntaxHighlighter. Also syntax highlight inline script and style text nodes.
  20346. * UserInterface/DOMTreeOutline.css:
  20347. (.dom-tree-outline .html-text-node.large): Added. Used for large text blocks, making viewing/editing more pleasant.
  20348. * UserInterface/SyntaxHighlighter.js:
  20349. (WebInspector.SyntaxHighlighter.prototype.synchronousHighlight): Added dontChunk parameter and fix undefined/null checks.
  20350. (WebInspector.SyntaxHighlighter.prototype.startHighlighting): Fix undefined/null checks
  20351. (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Added dontChunk parameter and don't bail early if it is set.
  20352. * UserInterface/SyntaxHighlightingSupport.js:
  20353. (WebInspector.syntaxHighlightStringAsDocumentFragment): Added. Creates a TextContent and syntax highlights it and returns
  20354. the document fragment.
  20355. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20356. Break out the code for creating a syntax highlighted document fragment so it can be used
  20357. by the DOM tree for inline CSS and JavaScript.
  20358. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20359. Reviewed by Brian Weinstein.
  20360. * UserInterface/SyntaxHighlightingSupport.js: Added.
  20361. (WebInspector.createSyntaxHighlightedDocumentFragment): Copied from WebInspector.TextEditorTextChunk.prototype.updateContent.
  20362. (WebInspector.createSyntaxHighlightedDocumentFragment.appendText): Ditto.
  20363. (WebInspector.createSyntaxHighlightedDocumentFragment.createTokenElement): Ditto.
  20364. * UserInterface/TextEditor.js:
  20365. (WebInspector.TextEditorTextChunk.prototype.updateContent): Use WebInspector.createSyntaxHighlightedDocumentFragment.
  20366. * UserInterface/Main.html: Included SyntaxHighlightingSupport.js.
  20367. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20368. Remove references to the Elements panel and make the context menu work in the DOM tree.
  20369. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20370. Reviewed by John Sullivan.
  20371. * UserInterface/DOMTreeElement.js:
  20372. (WebInspector.DOMTreeElement.prototype.selectOnMouseDown): Removed elements panel code.
  20373. * UserInterface/DOMTreeOutline.js:
  20374. (WebInspector.DOMTreeOutline): Remove showInElementsPanelEnabled parameter.
  20375. (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): Removed elements panel code and call populateContextMenu.
  20376. (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Removed call to populateHrefContextMenu which doesn't exist.
  20377. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20378. Style and syntax highlight the DOM tree elements.
  20379. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20380. Reviewed by Brian Weinstein and Joseph Pecoraro.
  20381. * UserInterface/DOMTreeElement.js: Found and replaced "webkit-" with "" to fix the syntax highlighting class names.
  20382. * UserInterface/DOMTreeOutline.css: Added.
  20383. (.dom-tree-outline):
  20384. (.dom-tree-outline li.hovered:not(.selected) .selection):
  20385. (.dom-tree-outline li .selection):
  20386. (.dom-tree-outline li.selected .selection):
  20387. (.dom-tree-outline li.elements-drag-over .selection):
  20388. (.dom-tree-outline:focus li.selected .selection):
  20389. (.dom-tree-outline, .dom-tree-outline ol):
  20390. (.dom-tree-outline ol.children):
  20391. (.dom-tree-outline ol.children.expanded):
  20392. (.dom-tree-outline li):
  20393. (.dom-tree-outline:focus li.selected):
  20394. (.dom-tree-outline:focus li.selected *):
  20395. (.dom-tree-outline li.parent):
  20396. (.dom-tree-outline li .html-tag.close):
  20397. (.dom-tree-outline li.parent::before):
  20398. (.dom-tree-outline:focus li.parent.selected::before):
  20399. (.dom-tree-outline li.parent.expanded::before):
  20400. (.dom-tree-outline:focus li.parent.expanded.selected::before):
  20401. * UserInterface/DOMTreeOutline.js:
  20402. (WebInspector.DOMTreeOutline): Set the dom-tree-outline and syntax-highlighted class names.
  20403. (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Found and replaced "webkit-" with "" to fix the
  20404. syntax highlighting class names.
  20405. * UserInterface/Main.html: Included DOMTreeOutline.css.
  20406. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20407. Make it possible to share the syntax highlighting styles with the DOM tree.
  20408. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20409. Reviewed by John Sullivan.
  20410. * UserInterface/Main.html:
  20411. * UserInterface/SyntaxHighlightingDefaultTheme.css: Renamed from Safari/Develop/WebInspector/TextEditorDefaultTheme.css.
  20412. Found and replaced .text-editor with .syntax-highlighted.
  20413. * UserInterface/TextEditor.js:
  20414. (WebInspector.TextEditor): Add the syntax-highlighted class name to the content container.
  20415. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20416. Add WebInspector.DOMTreeContentView and have it as a second view available in WebInspector.FrameContentView.
  20417. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20418. Reviewed by John Sullivan.
  20419. * UserInterface/ContentView.js:
  20420. (WebInspector.ContentView): Added support for WebInspector.DOMTree.
  20421. (WebInspector.ContentView.isViewable): Ditto.
  20422. * UserInterface/DOMTreeContentView.css: Added.
  20423. (.content-view.dom-tree):
  20424. * UserInterface/DOMTreeContentView.js: Added.
  20425. (WebInspector.DOMTreeContentView): Create the DOMTreeOutline and request the root DOMNode.
  20426. (WebInspector.DOMTreeContentView.prototype.get domTree): Return _domTree.
  20427. (WebInspector.DOMTreeContentView.prototype.shown): Call setVisible on the DOMTreeOutline.
  20428. (WebInspector.DOMTreeContentView.prototype.hidden): Ditto.
  20429. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Set the rootDOMNode on DOMTreeOutline.
  20430. (WebInspector.DOMTreeContentView.prototype._rootDOMNodeDidChange): Request the root DOMNode.
  20431. * UserInterface/FrameContentView.js:
  20432. (WebInspector.FrameContentView): Create the DOM tree path component.
  20433. (WebInspector.FrameContentView.prototype._pathComponentForContentView): Return the DOM tree patch component
  20434. for DOMTree represented objects.
  20435. (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Use the DOMTree of the frame.
  20436. * UserInterface/Images/DOMTree.pdf: Added.
  20437. * UserInterface/Main.html: Included DOMTreeContentView.{js,css}.
  20438. * UserInterface/PathComponentIcons.css:
  20439. (.dom-tree-icon .icon): Added.
  20440. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20441. Add support for getting the DOM tree for a specific WebInspector.Frame.
  20442. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20443. Reviewed by Brian Weinstein and Joseph Pecoraro.
  20444. * UserInterface/DOMTree.js: Added.
  20445. (WebInspector.DOMTree):
  20446. (WebInspector.DOMTree.prototype.invalidate): Delay the invalidation on a timeout to coalesce multiple calls to invalidate.
  20447. (WebInspector.DOMTree.prototype.invalidate.performInvalidate): Do the work to invalidate.
  20448. (WebInspector.DOMTree.prototype.requestRootDOMNode): Get window.frameElement or document from the desired frame.
  20449. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Convert the RemoteObject to a DOMNode.
  20450. (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Get the child nodes before calling the callbacks.
  20451. (WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Helper to dispatch pending callbacks.
  20452. (WebInspector.DOMTree.prototype._nodeRemoved): Call invalidate if the node is the root node.
  20453. (WebInspector.DOMTree.prototype._documentUpdated): Call invalidate.
  20454. (WebInspector.DOMTree.prototype._frameMainResourceDidChange): Ditto.
  20455. * UserInterface/Frame.js:
  20456. (WebInspector.Frame.prototype.get domTree): Added.
  20457. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20458. Remove dependency on Preferences.maxInlineTextChildLength from WebInspector.DOMTreeElement.
  20459. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20460. Reviewed by John Sullivan.
  20461. * UserInterface/DOMTreeElement.js:
  20462. (WebInspector.DOMTreeElement.MaximumInlineTextChildLength): Added.
  20463. (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Use WebInspector.DOMTreeElement.MaximumInlineTextChildLength.
  20464. (WebInspector.DOMTreeElement.prototype._showInlineText): Ditto.
  20465. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20466. Use WebInspector.DOMNode instead of WebInspector.DOMDocument since we don't have DOMDocument
  20467. in the new Web Inspector.
  20468. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20469. Reviewed by John Sullivan.
  20470. * UserInterface/DOMNode.js:
  20471. (WebInspector.DOMNode): Set ownerDocument to this when this is a document node.
  20472. * UserInterface/DOMTreeManager.js:
  20473. (WebInspector.DOMTreeManager.prototype._setDocument): Use DOMNode instead of DOMDocument.
  20474. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20475. Update DOMTreeElement to correctly use the new non-formating WebInspector.UIString.
  20476. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20477. Rubber-stamped by John Sullivan.
  20478. * UserInterface/DOMTreeElement.js:
  20479. (WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip): Use format() after UIString.
  20480. (WebInspector.DOMTreeElement.prototype.adjustCollapsedRange): Ditto.
  20481. (WebInspector.DOMTreeElement.prototype._populateTagContextMenu): Removed WebInspector.useLowerCaseMenuTitles() use.
  20482. (WebInspector.DOMTreeElement.prototype._populateTextContextMenu): Ditto.
  20483. (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): Ditto.
  20484. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20485. Replace {add,remove,has}StyleClass in DOMTree{Element,Outline} with classList.{add,remove,contains}.
  20486. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20487. Rubber-stamped by John Sullivan.
  20488. * UserInterface/DOMTreeElement.js:
  20489. (WebInspector.ElementsTreeElement.prototype.set hovered):
  20490. (WebInspector.ElementsTreeElement.prototype.onattach):
  20491. (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute):
  20492. * UserInterface/DOMTreeOutline.js:
  20493. (WebInspector.ElementsTreeOutline.prototype._ondragover):
  20494. (WebInspector.ElementsTreeOutline.prototype._clearDragOverTreeElementMarker):
  20495. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20496. Remove dependancy on WebInspector.Color from WebInspector.DOMTreeManager.
  20497. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20498. Rubber-stamped by John Sullivan.
  20499. * UserInterface/DOMTreeManager.js:
  20500. (WebInspector.DOMTreeManager.prototype._buildHighlightConfig): Include the colors directly.
  20501. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20502. Make WebInspector.DOMTreeUpdater listen for events on the correct object.
  20503. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20504. Rubber-stamped by John Sullivan.
  20505. * UserInterface/DOMTreeUpdater.js:
  20506. (WebInspector.DOMTreeUpdater): Use DOMTreeManager instead of the old DOMAgent name.
  20507. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20508. Make WebInspector.DOMTreeOutline conform to the right style for objects with events.
  20509. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20510. Reviewed by John Sullivan.
  20511. * UserInterface/DOMTreeOutline.js:
  20512. (WebInspector.DOMTreeOutline.prototype._selectedNodeChanged):
  20513. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20514. Make WebInspector.DOMTreeManager events conform to the style we use in the new Web Inspector.
  20515. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20516. Reviewed by John Sullivan.
  20517. * UserInterface/DOMTreeManager.js:
  20518. (WebInspector.DOMTreeManager.prototype._attributeModified): Use WebInspector.DOMTreeManager.Event and spell out Attribute.
  20519. (WebInspector.DOMTreeManager.prototype._attributeRemoved): Ditto.
  20520. (WebInspector.DOMTreeManager.prototype._loadNodeAttributes): Ditto.
  20521. (WebInspector.DOMTreeManager.prototype._characterDataModified): WebInspector.DOMTreeManager.Event.
  20522. (WebInspector.DOMTreeManager.prototype._setDocument): Ditto.
  20523. (WebInspector.DOMTreeManager.prototype._childNodeCountUpdated): Ditto.
  20524. (WebInspector.DOMTreeManager.prototype._childNodeInserted): Ditto.
  20525. (WebInspector.DOMTreeManager.prototype._childNodeRemoved): Ditto.
  20526. (WebInspector.DOMTreeManager.prototype.inspectElement): Ditto.
  20527. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20528. Don't call InspectorBackend.registerDOMDispatcher from WebInspector.DOMTreeManager.
  20529. The new Web Inspector calls InspectorBackend.registerDOMDispatcher from Main.js.
  20530. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20531. Reviewed by John Sullivan.
  20532. * UserInterface/DOMTreeManager.js:
  20533. (WebInspector.DOMTreeManager): Remove call to InspectorBackend.registerDOMDispatcher.
  20534. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20535. Wire up WebInspector.DOMObserver to WebInspector.DOMTreeManager.
  20536. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20537. Reviewed by John Sullivan.
  20538. * UserInterface/DOMObserver.js:
  20539. (WebInspector.DOMObserver.prototype.documentUpdated):
  20540. (WebInspector.DOMObserver.prototype.setChildNodes):
  20541. (WebInspector.DOMObserver.prototype.attributeModified):
  20542. (WebInspector.DOMObserver.prototype.attributeRemoved):
  20543. (WebInspector.DOMObserver.prototype.inlineStyleInvalidated):
  20544. (WebInspector.DOMObserver.prototype.characterDataModified):
  20545. (WebInspector.DOMObserver.prototype.childNodeCountUpdated):
  20546. (WebInspector.DOMObserver.prototype.childNodeInserted):
  20547. (WebInspector.DOMObserver.prototype.childNodeRemoved):
  20548. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20549. Use WebInspector.domTreeManager instead of the old WebInspector.domAgent.
  20550. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20551. Rubber-stamped by John Sullivan.
  20552. * UserInterface/DOMTreeElement.js:
  20553. (WebInspector.DOMTreeElement.prototype.onselect):
  20554. (WebInspector.DOMTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback):
  20555. (WebInspector.DOMTreeElement.prototype._tagNameEditingCommitted):
  20556. * UserInterface/DOMTreeOutline.js:
  20557. (WebInspector.DOMTreeOutline.prototype._onmousemove):
  20558. (WebInspector.DOMTreeOutline.prototype._onmouseout):
  20559. (WebInspector.DOMTreeOutline.prototype._ondragstart):
  20560. (WebInspector.DOMTreeOutline.prototype._ondrop.callback):
  20561. (WebInspector.DOMTreeOutline.prototype._ondrop):
  20562. (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired.focusElement):
  20563. (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
  20564. * UserInterface/DOMTreeUpdater.js:
  20565. (WebInspector.DOMTreeUpdater.prototype._reset):
  20566. * UserInterface/RemoteObject.js:
  20567. (WebInspector.RemoteObject.prototype.pushNodeToFrontend):
  20568. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20569. Create a WebInspector.DOMTreeManager instance.
  20570. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20571. Reviewed by John Sullivan.
  20572. * UserInterface/Main.js:
  20573. (WebInspector.contentLoaded): Create a WebInspector.DOMTreeManager instance.
  20574. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20575. Rename WebInspector.ElementsTree{Outline,Element,Updater} to WebInspector.DOMTree{Outline,Element,Updater}.
  20576. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20577. Rubber-stamped by John Sullivan.
  20578. * UserInterface/DOMTreeElement.js: Found and replaced WebInspector.ElementsTree with WebInspector.DOMTree.
  20579. * UserInterface/DOMTreeOutline.js: Ditto.
  20580. * UserInterface/DOMTreeUpdater.js: Ditto.
  20581. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20582. Rename WebInspector.DOMAgent to WebInspector.DOMTreeManager.
  20583. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20584. Rubber-stamped by John Sullivan.
  20585. * UserInterface/DOMTreeManager.js: Found and replaced WebInspector.DOMAgent with WebInspector.DOMTreeManager.
  20586. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20587. Copy over WebInspector.ElementsTree{Outline,Element,Updater} from Open Source.
  20588. Copied into DOMTreeElement.js, DOMTreeOutline.js and DOMTreeUpdater.js since the classes will
  20589. soon be renamed to WebInspector.DOMTree{Outline,Element,Updater}.
  20590. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20591. Rubber-stamped by John Sullivan.
  20592. * UserInterface/DOMTreeElement.js: Added.
  20593. (WebInspector.ElementsTreeElement):
  20594. (WebInspector.ElementsTreeElement.prototype.highlightSearchResults):
  20595. (WebInspector.ElementsTreeElement.prototype.hideSearchHighlights):
  20596. (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryShow):
  20597. (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryHide):
  20598. (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight):
  20599. (WebInspector.ElementsTreeElement.prototype.get hovered):
  20600. (WebInspector.ElementsTreeElement.prototype.set hovered):
  20601. (WebInspector.ElementsTreeElement.prototype.get expandedChildrenLimit):
  20602. (WebInspector.ElementsTreeElement.prototype.set expandedChildrenLimit):
  20603. (WebInspector.ElementsTreeElement.prototype.get expandedChildCount):
  20604. (WebInspector.ElementsTreeElement.prototype.showChild):
  20605. (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.setTooltip):
  20606. (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode.dimensions):
  20607. (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode):
  20608. (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
  20609. (WebInspector.ElementsTreeElement.prototype.updateSelection):
  20610. (WebInspector.ElementsTreeElement.prototype.onattach):
  20611. (WebInspector.ElementsTreeElement.prototype._preventFollowingLinksOnDoubleClick):
  20612. (WebInspector.ElementsTreeElement.prototype.onpopulate):
  20613. (WebInspector.ElementsTreeElement.prototype.updateChildren):
  20614. (WebInspector.ElementsTreeElement.prototype.insertChildElement):
  20615. (WebInspector.ElementsTreeElement.prototype.moveChild):
  20616. (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
  20617. (WebInspector.ElementsTreeElement.prototype._updateChildren):
  20618. (WebInspector.ElementsTreeElement.prototype.adjustCollapsedRange):
  20619. (WebInspector.ElementsTreeElement.prototype.handleLoadAllChildren):
  20620. (WebInspector.ElementsTreeElement.prototype.onexpand):
  20621. (WebInspector.ElementsTreeElement.prototype.oncollapse):
  20622. (WebInspector.ElementsTreeElement.prototype.onreveal):
  20623. (WebInspector.ElementsTreeElement.prototype.onselect):
  20624. (WebInspector.ElementsTreeElement.prototype.ondelete):
  20625. (WebInspector.ElementsTreeElement.prototype.onenter):
  20626. (WebInspector.ElementsTreeElement.prototype.selectOnMouseDown):
  20627. (WebInspector.ElementsTreeElement.prototype.ondblclick):
  20628. (WebInspector.ElementsTreeElement.prototype._insertInLastAttributePosition):
  20629. (WebInspector.ElementsTreeElement.prototype._startEditingTarget):
  20630. (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
  20631. (WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
  20632. (WebInspector.ElementsTreeElement.prototype._populateNodeContextMenu):
  20633. (WebInspector.ElementsTreeElement.prototype._startEditing):
  20634. (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
  20635. (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute):
  20636. (WebInspector.ElementsTreeElement.prototype._startEditingAttribute.removeZeroWidthSpaceRecursive):
  20637. (WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
  20638. (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
  20639. (WebInspector.ElementsTreeElement.prototype._startEditingTagName.keyupListener):
  20640. (WebInspector.ElementsTreeElement.prototype._startEditingTagName.editingComitted):
  20641. (WebInspector.ElementsTreeElement.prototype._startEditingTagName.editingCancelled):
  20642. (WebInspector.ElementsTreeElement.prototype._startEditingTagName):
  20643. (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.commit):
  20644. (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.dispose):
  20645. (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
  20646. (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded):
  20647. (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
  20648. (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.cancel):
  20649. (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.moveToNextAttributeIfNeeded):
  20650. (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback):
  20651. (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
  20652. (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted):
  20653. (WebInspector.ElementsTreeElement.prototype._editingCancelled):
  20654. (WebInspector.ElementsTreeElement.prototype._distinctClosingTagElement):
  20655. (WebInspector.ElementsTreeElement.prototype.updateTitle):
  20656. (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
  20657. * UserInterface/DOMTreeOutline.js: Added.
  20658. (WebInspector.ElementsTreeOutline):
  20659. (WebInspector.ElementsTreeOutline.prototype.wireToDomAgent):
  20660. (WebInspector.ElementsTreeOutline.prototype.setVisible):
  20661. (WebInspector.ElementsTreeOutline.prototype.addEventListener):
  20662. (WebInspector.ElementsTreeOutline.prototype.removeEventListener):
  20663. (WebInspector.ElementsTreeOutline.prototype.get rootDOMNode):
  20664. (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
  20665. (WebInspector.ElementsTreeOutline.prototype.get isXMLMimeType):
  20666. (WebInspector.ElementsTreeOutline.prototype.selectedDOMNode):
  20667. (WebInspector.ElementsTreeOutline.prototype.selectDOMNode):
  20668. (WebInspector.ElementsTreeOutline.prototype.get editing):
  20669. (WebInspector.ElementsTreeOutline.prototype.update):
  20670. (WebInspector.ElementsTreeOutline.prototype.updateSelection):
  20671. (WebInspector.ElementsTreeOutline.prototype._selectedNodeChanged):
  20672. (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
  20673. (WebInspector.ElementsTreeOutline.prototype.findTreeElement.parentNode):
  20674. (WebInspector.ElementsTreeOutline.prototype.createTreeElementFor):
  20675. (WebInspector.ElementsTreeOutline.prototype.set suppressRevealAndSelect):
  20676. (WebInspector.ElementsTreeOutline.prototype._revealAndSelectNode):
  20677. (WebInspector.ElementsTreeOutline.prototype._treeElementFromEvent):
  20678. (WebInspector.ElementsTreeOutline.prototype._onmousedown):
  20679. (WebInspector.ElementsTreeOutline.prototype._onmousemove):
  20680. (WebInspector.ElementsTreeOutline.prototype._onmouseout):
  20681. (WebInspector.ElementsTreeOutline.prototype._ondragstart):
  20682. (WebInspector.ElementsTreeOutline.prototype._ondragover):
  20683. (WebInspector.ElementsTreeOutline.prototype._ondragleave):
  20684. (WebInspector.ElementsTreeOutline.prototype._isValidDragSourceOrTarget):
  20685. (WebInspector.ElementsTreeOutline.prototype._ondrop.callback):
  20686. (WebInspector.ElementsTreeOutline.prototype._ondrop):
  20687. (WebInspector.ElementsTreeOutline.prototype._ondragend):
  20688. (WebInspector.ElementsTreeOutline.prototype._clearDragOverTreeElementMarker):
  20689. (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
  20690. (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
  20691. (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
  20692. (WebInspector.ElementsTreeOutline.prototype.adjustCollapsedRange):
  20693. (WebInspector.ElementsTreeOutline.prototype._updateModifiedNodes):
  20694. (WebInspector.ElementsTreeOutline.prototype._populateContextMenu):
  20695. * UserInterface/DOMTreeUpdater.js: Added.
  20696. (WebInspector.ElementsTreeUpdater):
  20697. (WebInspector.ElementsTreeUpdater.prototype._documentUpdated):
  20698. (WebInspector.ElementsTreeUpdater.prototype._attributesUpdated):
  20699. (WebInspector.ElementsTreeUpdater.prototype._characterDataModified):
  20700. (WebInspector.ElementsTreeUpdater.prototype._nodeInserted):
  20701. (WebInspector.ElementsTreeUpdater.prototype._nodeRemoved):
  20702. (WebInspector.ElementsTreeUpdater.prototype._childNodeCountUpdated):
  20703. (WebInspector.ElementsTreeUpdater.prototype._updateModifiedNodesSoon):
  20704. (WebInspector.ElementsTreeUpdater.prototype._updateModifiedNodes):
  20705. (WebInspector.ElementsTreeUpdater.prototype._reset):
  20706. * UserInterface/Main.html: Included DOMTree{Outline,Element,Updater}.js.
  20707. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20708. Copy over WebInspector.DOMAgent from Open Source.
  20709. Copied into DOMTreeManager.js since WebInspector.DOMAgent will soon be renamed to WebInspector.DOMTreeManager.
  20710. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20711. Rubber-stamped by John Sullivan.
  20712. * UserInterface/DOMTreeManager.js: Copied from OpenSource/Source/WebCore/inspector/front-end/DOMAgent.js.
  20713. (WebInspector.DOMAgent):
  20714. (WebInspector.DOMAgent.prototype.requestDocument.onDocumentAvailable):
  20715. (WebInspector.DOMAgent.prototype.requestDocument):
  20716. (WebInspector.DOMAgent.prototype.pushNodeToFrontend):
  20717. (WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend):
  20718. (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable):
  20719. (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable):
  20720. (WebInspector.DOMAgent.prototype._attributeModified):
  20721. (WebInspector.DOMAgent.prototype._attributeRemoved):
  20722. (WebInspector.DOMAgent.prototype._inlineStyleInvalidated):
  20723. (WebInspector.DOMAgent.prototype._loadNodeAttributes):
  20724. (WebInspector.DOMAgent.prototype._characterDataModified):
  20725. (WebInspector.DOMAgent.prototype.nodeForId):
  20726. (WebInspector.DOMAgent.prototype._documentUpdated):
  20727. (WebInspector.DOMAgent.prototype._setDocument):
  20728. (WebInspector.DOMAgent.prototype._setDetachedRoot):
  20729. (WebInspector.DOMAgent.prototype._setChildNodes):
  20730. (WebInspector.DOMAgent.prototype._bindNodes):
  20731. (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
  20732. (WebInspector.DOMAgent.prototype._childNodeInserted):
  20733. (WebInspector.DOMAgent.prototype._childNodeRemoved):
  20734. (WebInspector.DOMAgent.prototype.inspectElement):
  20735. (WebInspector.DOMAgent.prototype.performSearch.callback):
  20736. (WebInspector.DOMAgent.prototype.performSearch):
  20737. (WebInspector.DOMAgent.prototype.searchResult.mycallback):
  20738. (WebInspector.DOMAgent.prototype.searchResult):
  20739. (WebInspector.DOMAgent.prototype.cancelSearch):
  20740. (WebInspector.DOMAgent.prototype.querySelector):
  20741. (WebInspector.DOMAgent.prototype.querySelectorAll):
  20742. (WebInspector.DOMAgent.prototype.highlightDOMNode):
  20743. (WebInspector.DOMAgent.prototype.hideDOMNodeHighlight):
  20744. (WebInspector.DOMAgent.prototype.highlightDOMNodeForTwoSeconds):
  20745. (WebInspector.DOMAgent.prototype.setInspectModeEnabled):
  20746. (WebInspector.DOMAgent.prototype._buildHighlightConfig):
  20747. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20748. Copy over WebInspector.DOMNode from Open Source.
  20749. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20750. Rubber-stamped by John Sullivan.
  20751. * UserInterface/DOMNode.js: Copied from OpenSource/Source/WebCore/inspector/front-end/DOMAgent.js.
  20752. (WebInspector.DOMNode):
  20753. (WebInspector.DOMNode.prototype.hasAttributes):
  20754. (WebInspector.DOMNode.prototype.hasChildNodes):
  20755. (WebInspector.DOMNode.prototype.nodeType):
  20756. (WebInspector.DOMNode.prototype.nodeName):
  20757. (WebInspector.DOMNode.prototype.nodeNameInCorrectCase):
  20758. (WebInspector.DOMNode.prototype.setNodeName):
  20759. (WebInspector.DOMNode.prototype.localName):
  20760. (WebInspector.DOMNode.prototype.nodeValue):
  20761. (WebInspector.DOMNode.prototype.setNodeValue):
  20762. (WebInspector.DOMNode.prototype.getAttribute):
  20763. (WebInspector.DOMNode.prototype.setAttribute):
  20764. (WebInspector.DOMNode.prototype.setAttributeValue):
  20765. (WebInspector.DOMNode.prototype.attributes):
  20766. (WebInspector.DOMNode.prototype.removeAttribute):
  20767. (WebInspector.DOMNode.prototype.getChildNodes.mycallback):
  20768. (WebInspector.DOMNode.prototype.getChildNodes):
  20769. (WebInspector.DOMNode.prototype.getOuterHTML):
  20770. (WebInspector.DOMNode.prototype.setOuterHTML):
  20771. (WebInspector.DOMNode.prototype.removeNode):
  20772. (WebInspector.DOMNode.prototype.copyNode):
  20773. (WebInspector.DOMNode.prototype.eventListeners):
  20774. (WebInspector.DOMNode.prototype.path):
  20775. (WebInspector.DOMNode.prototype.appropriateSelectorFor):
  20776. (WebInspector.DOMNode.prototype.isAncestor):
  20777. (WebInspector.DOMNode.prototype.isDescendant):
  20778. (WebInspector.DOMNode.prototype._setAttributesPayload):
  20779. (WebInspector.DOMNode.prototype._insertChild):
  20780. (WebInspector.DOMNode.prototype._removeChild):
  20781. (WebInspector.DOMNode.prototype._setChildrenPayload):
  20782. (WebInspector.DOMNode.prototype._renumber):
  20783. (WebInspector.DOMNode.prototype._addAttribute):
  20784. (WebInspector.DOMNode.prototype._setAttribute):
  20785. (WebInspector.DOMNode.prototype._removeAttribute):
  20786. (WebInspector.DOMNode.prototype.ownerDocumentElement):
  20787. (WebInspector.DOMNode.prototype.moveTo):
  20788. (WebInspector.DOMNode.prototype.isXMLNode):
  20789. * UserInterface/Main.html: Included DOMNode.js.
  20790. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20791. Copy over WebInspector.RemoteObject from Open Source.
  20792. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20793. Rubber-stamped by John Sullivan.
  20794. * UserInterface/Main.html: Included RemoteObject.js.
  20795. * UserInterface/RemoteObject.js: Copied from OpenSource/Source/WebCore/inspector/front-end/RemoteObject.js.
  20796. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20797. Copy over WebInspector.ContextMenu from Open Source.
  20798. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20799. Rubber-stamped by John Sullivan.
  20800. * UserInterface/ContextMenu.js: Copied from OpenSource/Source/WebCore/inspector/front-end/ContextMenu.js.
  20801. * UserInterface/Main.html: Included ContextMenu.js.
  20802. 2012-01-16 Timothy Hatcher <timothy@apple.com>
  20803. Rename TreeElementHierarchicalPathComponent.js to GeneralTreeElementPathComponent.js.
  20804. It always dealt with GeneralTreeElements from the start, not TreeElements. This makes it clear
  20805. that is can't be used with other TreeElement subclasses (like DOMTreeElement).
  20806. Rubber-stamped by John Sullivan.
  20807. * UserInterface/ContentBrowser.js:
  20808. (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Use GeneralTreeElementPathComponent.
  20809. (WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Ditto.
  20810. * UserInterface/GeneralTreeElementPathComponent.js: Renamed from TreeElementHierarchicalPathComponent.js.
  20811. * UserInterface/Main.html: Renamed TreeElementHierarchicalPathComponent.js to GeneralTreeElementPathComponent.js.
  20812. 2012-01-14 Timothy Hatcher <timothy@apple.com>
  20813. Prevent deselection of frames in the Resources sidebar when they navigate, or when resources redirect.
  20814. When a frame navigates or a resource redirects we remove it from the tree and reinsert it at the correct
  20815. sort order based on the new URL. When the tree element was removed we would automatically select a sibling.
  20816. This uses new TreeOutline support to suppress notifying select/deselect listeners so the temporary removal
  20817. is not noticed, so the content view does not change briefly.
  20818. Reviewed by Dan Bernstein.
  20819. * UserInterface/FrameTreeElement.js:
  20820. (WebInspector.FrameTreeElement.prototype._addTreeElement):
  20821. (WebInspector.FrameTreeElement.prototype._removeTreeElement):
  20822. 2012-01-14 Timothy Hatcher <timothy@apple.com>
  20823. Add more support for suppressing the select and deselect events in TreeOutline. This also fixes
  20824. a typo where suppress was pervasively misspelled.
  20825. This is needed to prevent changing views when a tree element in the Resources sidebar moves to a folder.
  20826. Reviewed by Dan Bernstein.
  20827. * UserInterface/TreeOutline.js:
  20828. (TreeOutline.prototype.removeChildAtIndex): Added suppressOnDeselect and suppressSelectSibling.
  20829. (TreeOutline.prototype.removeChild): Ditto.
  20830. (TreeOutline.prototype.removeChildren): Added suppressOnDeselect.
  20831. (TreeOutline.prototype.removeChildrenRecursive): Ditto.
  20832. (TreeElement.prototype.select): Added suppressOnSelect and suppressOnDeselect.
  20833. (TreeElement.prototype.revealAndSelect): Added the same parameters as select.
  20834. 2012-01-11 Timothy Hatcher <timothy@apple.com>
  20835. Make DataGrid use CSS gradients for headers instead of images.
  20836. Part of: <rdar://problem/10643175> DataGrid should be HiDPI compliant
  20837. Reviewed by Jing Jin.
  20838. * UserInterface/DataGrid.css:
  20839. (.data-grid th):
  20840. (.data-grid th:first-child):
  20841. (.data-grid th:active:first-child):
  20842. (.data-grid th:last-child):
  20843. (.data-grid th:active:last-child):
  20844. (.data-grid table.data):
  20845. (.data-grid td):
  20846. (.data-grid td:last-child):
  20847. (.data-grid th.sortable:active):
  20848. (.data-grid th.sort-ascending, .data-grid th.sort-descending):
  20849. (.data-grid th.sortable.sort-ascending:active, .data-grid th.sortable.sort-descending:active):
  20850. (.data-grid th.sort-descending + th):
  20851. (.data-grid th.sort-descending + th:active):
  20852. (.data-grid th.sort-descending:first-child):
  20853. (.data-grid th.sort-descending:last-child):
  20854. (body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-descending):
  20855. * UserInterface/Images/glossyHeader.png: Removed.
  20856. * UserInterface/Images/glossyHeaderPressed.png: Removed.
  20857. * UserInterface/Images/glossyHeaderSelected.png: Removed.
  20858. * UserInterface/Images/glossyHeaderSelectedPressed.png: Removed.
  20859. 2012-01-10 Timothy Hatcher <timothy@apple.com>
  20860. Improve appearance of DataGrid in the new Web Inspector.
  20861. This removes the extra border and outline around the DOM Storage and Cookie Storage content views.
  20862. The empty gutter on the right is also removed now that OS X has overlay scrollers.
  20863. Reviewed by Brian Weinstein.
  20864. * UserInterface/CookieStorageContentView.css:
  20865. (.content-view.cookie-storage > .data-grid): Set border and outline to none.
  20866. * UserInterface/DOMStorageContentView.css:
  20867. (.content-view.dom-storage > .data-grid): Ditto.
  20868. * UserInterface/DataGrid.css:
  20869. (.data-grid .data-container): Remove padding-right.
  20870. (.data-grid th:last-child): Added. Remove right border and set padding-right to give room for the scroller.
  20871. (.data-grid td:last-child): Added. Ditto.
  20872. * UserInterface/DataGrid.js:
  20873. (WebInspector.DataGrid): Removed the corder cell since it ins't needed to make room for the scroller anymore.
  20874. 2012-01-10 Timothy Hatcher <timothy@apple.com>
  20875. Add utility functions needed by the DOM tree code.
  20876. Part of: <rdar://problem/10663163> Implement the DOM Tree content view
  20877. Reviewed by John Sullivan.
  20878. * UserInterface/Utilities.js:
  20879. (Node.prototype.isAncestor): Copied from OpenSource/Source/WebCore/inspector/front-end/utilities.js.
  20880. (Node.prototype.isDescendant): Ditto.
  20881. (Element.prototype.createChild): Ditto.
  20882. (DocumentFragment.prototype.createChild): Ditto.
  20883. 2012-01-10 Timothy Hatcher <timothy@apple.com>
  20884. Fix a case where Element.totalOffsetLeft is used as a function instead of a property.
  20885. Reviewed by Brian Weinstein.
  20886. * UserInterface/TreeOutline.js:
  20887. (TreeElement.prototype.isEventWithinDisclosureTriangle): Don't call totalOffsetLeft as a function.
  20888. 2012-01-10 Timothy Hatcher <timothy@apple.com>
  20889. Make events dispatch to listeners on all constructors up the prototype chain, not just immediate constructor.
  20890. This is needed so subclasses of ContentView can dispatch events to listeners without the need for them to listen
  20891. on the concrete ContentView subclasses.
  20892. Reviewed by Brian Weinstein.
  20893. * UserInterface/Object.js:
  20894. (WebInspector.Object.prototype.dispatchEventToListeners):
  20895. 2012-01-10 Timothy Hatcher <timothy@apple.com>
  20896. Make clicking of links for main resources of frames navigate to those resources. Before this only subresources
  20897. were navigable and clicking a main resource link would open a new Safari window instead of showing the source.
  20898. Reviewed by Brian Weinstein.
  20899. * UserInterface/Frame.js:
  20900. (WebInspector.Frame.prototype.resourceForURL): Check the main resources of the child frames for the requested URL.
  20901. 2012-01-10 Timothy Hatcher <timothy@apple.com>
  20902. Allow repeated selection of tree elements in the Storage panel (and all future NavigationSidebarPanels.)
  20903. Reviewed by Brian Weinstein.
  20904. * UserInterface/NavigationSidebarPanel.js:
  20905. (WebInspector.NavigationSidebarPanel): Set this._contentTreeOutline.allowsRepeatSelection to true.
  20906. * UserInterface/ResourceSidebarPanel.js:
  20907. (WebInspector.ResourceSidebarPanel): Moved this.contentTreeOutline.allowsRepeatSelection = true from here
  20908. to WebInspector.NavigationSidebarPanel.
  20909. 2012-01-12 Timothy Hatcher <timothy@apple.com>
  20910. Exclude Web Inspector strings from localizedStrings.js until they can be included
  20911. in Production builds.
  20912. Reviewed by Darin Adler.
  20913. * UserInterface/Main.js:
  20914. (WebInspector.UIString): Always return the string until we can actually do the lookup.
  20915. * English.lproj/localizedStrings.js: Updated to exclude Web Inspector strings.
  20916. 2012-01-11 Brian Weinstein <bweinstein@apple.com>
  20917. Rest of <rdar://problem/10643012> Implement Database content views for new inspector design.
  20918. Implement custom views for when a database table is empty, or when there was an error
  20919. loading the data.
  20920. If a table is empty, we don't get a list of column names, and can't show an empty data grid.
  20921. If there was an error, we also can't show a data grid because we don't know anything about
  20922. the table.
  20923. Reviewed by Tim Hatcher.
  20924. * UserInterface/DatabaseTableContentView.js:
  20925. (WebInspector.DatabaseTableContentView.prototype._queryFinished): If we were unable to create
  20926. a data grid, the table was empty, so call createMessageTextView.
  20927. (WebInspector.DatabaseTableContentView.prototype._queryError): Call createMessageTextView.
  20928. * UserInterface/Main.css:
  20929. (.message-text-view, message-text-view > p, message-text-view.error): Added styles for createMessageTextView.
  20930. * UserInterface/Main.js:
  20931. (WebInspector.createMessageTextView): Creates a view and returns it to the caller.
  20932. * English.lproj/localizedStrings.js:
  20933. 2012-01-11 Brian Weinstein <bweinstein@apple.com>
  20934. Clear database table views when the page navigates.
  20935. Reviewed by Tim Hatcher.
  20936. * UserInterface/StorageSidebarPanel.js:
  20937. (WebInspector.StorageSidebarPanel.prototype._storageCleared):
  20938. 2012-01-11 Brian Weinstein <bweinstein@apple.com>
  20939. Work towards <rdar://problem/10643012> Implement Database content views for new inspector design.
  20940. Implement the DataGrid for database tables.
  20941. This patch adds the ability to be able to execute SQL queries on a DatabaseObject, and DatabaseContentView
  20942. uses that to get the data from the selected table.
  20943. Reviewed by Tim Hatcher.
  20944. * UserInterface/DatabaseObject.js:
  20945. (WebInspector.DatabaseObject.prototype.executeSQL): Call through to DatabaseAgent.executeSQL.
  20946. * UserInterface/DatabaseObserver.js: Add a map from transaction ID -> callbacks to be able to do the right
  20947. thing when sqlTransactionSucceeded or sqlTransactionFailed is called.
  20948. (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Call the onSuccess callback for that
  20949. transaction ID.
  20950. (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Call the onError callback for that transaction
  20951. ID.
  20952. * UserInterface/DatabaseTableContentView.css: Added.
  20953. (.content-view.database-table > .data-grid):
  20954. * UserInterface/DatabaseTableContentView.js:
  20955. (WebInspector.DatabaseTableContentView): Call update.
  20956. (WebInspector.DatabaseTableContentView.prototype.constructor.WebInspector.DatabaseTableContentView.update): Get the
  20957. data from the table.
  20958. (WebInspector.DatabaseTableContentView.prototype._escapeTableName): Taken from open source.
  20959. (WebInspector.DatabaseTableContentView.prototype._queryFinished): Create a sortable data grid with the column names
  20960. and the values returned from the SQL call.
  20961. (WebInspector.DatabaseTableContentView.prototype._queryError): Added a FIXME to handle the error.
  20962. * UserInterface/Main.html:
  20963. 2012-01-10 Brian Weinstein <bweinstein@apple.com>
  20964. Work towards <rdar://problem/10643012> Implement Database content views for new inspector design.
  20965. Add a content view for database tables. It is currently empty, but a datagrid will be added that
  20966. will show the correct data.
  20967. Reviewed by Tim Hatcher.
  20968. * UserInterface/ContentView.js:
  20969. (WebInspector.ContentView):
  20970. (WebInspector.ContentView.isViewable):
  20971. * UserInterface/DatabaseTableContentView.js: Added.
  20972. (WebInspector.DatabaseTableContentView):
  20973. * UserInterface/Main.html:
  20974. * UserInterface/Main.js:
  20975. (WebInspector.contentBrowserTreeElementForRepresentedObject):
  20976. * UserInterface/StorageSidebarPanel.js:
  20977. (WebInspector.StorageSidebarPanel.prototype._treeElementSelected):
  20978. 2012-01-10 Brian Weinstein <bweinstein@apple.com>
  20979. Clear the DOM and cookie storage content views when we navigate.
  20980. Reviewed by Joseph Pecoraro.
  20981. * UserInterface/StorageSidebarPanel.js:
  20982. (WebInspector.StorageSidebarPanel.prototype._storageCleared):
  20983. 2012-01-10 Brian Weinstein <bweinstein@apple.com>
  20984. Rest of <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
  20985. Implement deleting of individual cookies.
  20986. Reviewed by Tim Hatcher.
  20987. * UserInterface/CookieStorageContentView.js:
  20988. (WebInspector.CookieStorageContentView.prototype._rebuildTable): Add a delete callback.
  20989. (WebInspector.CookieStorageContentView.prototype._deleteCallback): Delete the cookie.
  20990. 2012-01-10 Brian Weinstein <bweinstein@apple.com>
  20991. Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
  20992. Implement the sorting of columns in the cookie data grid.
  20993. The code to sort the array was brought from open source. The rest of the patch is some refactoring
  20994. which makes the code more efficient. When we get the cookies from the PageAgent, we filter them,
  20995. and store the filtered cookies as a property in the class. When the sorting order is changed,
  20996. we just rebuild the table using the filtered cookies already stored, so we don't need to refilter
  20997. them when the sorting order changed.
  20998. Reviewed by Tim Hatcher.
  20999. * UserInterface/CookieStorageContentView.js:
  21000. (WebInspector.CookieStorageContentView.prototype.constructor.WebInspector.CookieStorageContentView.update): Store the filtered
  21001. cookies as a property, then call rebuildTable.
  21002. (WebInspector.CookieStorageContentView.prototype._rebuildTable): Don't take cookies as a parameter any more, and don't
  21003. filter them.
  21004. (WebInspector.CookieStorageContentView.prototype._sortCookies.localeCompare): Copied from open source.
  21005. (WebInspector.CookieStorageContentView.prototype._sortCookies.numberCompare): Ditto.
  21006. (WebInspector.CookieStorageContentView.prototype._sortCookies.expiresCompare): Ditto.
  21007. (WebInspector.CookieStorageContentView.prototype._sortCookies): Ditto.
  21008. * UserInterface/Utilities.js:
  21009. (Object.defineProperty): Copied from open source.
  21010. 2012-01-10 Brian Weinstein <bweinstein@apple.com>
  21011. Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
  21012. Filter the cookies that are shown for each domain that the page has loaded. This means that when
  21013. you see the cookies for twitter.com, you will only see the twitter.com cookies, and not the doubleclick
  21014. cookies that twitter might have loaded.
  21015. Reviewed by Tim Hatcher.
  21016. * UserInterface/CookieStorageContentView.js:
  21017. (WebInspector.CookieStorageContentView.prototype._updateWithCookies): Use the filtered cookies.
  21018. (WebInspector.CookieStorageContentView.prototype._filterCookies): Get a list of all the resources
  21019. that are loaded with the CookieStorageContentView's host, and when looking at the document's cookies,
  21020. only add the ones that match the host.
  21021. * UserInterface/FrameResourceManager.js:
  21022. (WebInspector.FrameResourceManager.prototype.get frames): Get the frames of the document.
  21023. (WebInspector.cookieMatchesResourceURL): Brought over from open source.
  21024. (WebInspector.cookieDomainMatchesResourceDomain): Ditto.
  21025. 2012-01-09 Brian Weinstein <bweinstein@apple.com>
  21026. Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
  21027. Show a list of cookies on the page. It can't be sorted, and isn't filtered for the cookie host that
  21028. you selected, but cookies do show up.
  21029. Reviewed by Tim Hatcher.
  21030. * UserInterface/CookieStorageContentView.css: Added.
  21031. (.content-view.cookie-storage > .data-grid): The data grid takes up the whole view.
  21032. * UserInterface/CookieStorageContentView.js:
  21033. (WebInspector.CookieStorageContentView): Call update.
  21034. (WebInspector.CookieStorageContentView.prototype.constructor.WebInspector.CookieStorageContentView.update): Get the cookies
  21035. on the page, and then call _updateWithCookies on the result.
  21036. (WebInspector.CookieStorageContentView.prototype._updateWithCookies): Create the data grid if it hasn't been created yet, and
  21037. populate it.
  21038. * UserInterface/Main.html: Add new file.
  21039. * English.lproj/localizedStrings.js: Update localized string.
  21040. 2012-01-09 Brian Weinstein <bweinstein@apple.com>
  21041. Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
  21042. Add a content view for cookie storage. It is currently empty, but a datagrid will be added that
  21043. will show the correct data.
  21044. Reviewed by Tim Hatcher.
  21045. * UserInterface/ContentView.js:
  21046. (WebInspector.ContentView): Add a new case for CookieStorageObject,
  21047. (WebInspector.ContentView.isViewable): Ditto.
  21048. * UserInterface/CookieStorageContentView.js: Added.
  21049. (WebInspector.CookieStorageContentView):
  21050. * UserInterface/Main.html: Add new files.
  21051. * UserInterface/Main.js:
  21052. (WebInspector.contentBrowserTreeElementForRepresentedObject): Add a new case for CookieStorageObject.
  21053. * UserInterface/StorageSidebarPanel.js:
  21054. (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Ditto.
  21055. 2012-01-09 Brian Weinstein <bweinstein@apple.com>
  21056. When we want to update the DOM storage data grid, don't remove the whole data grid and re-create it,
  21057. just remove the DataGridNodes and regenerate those.
  21058. Reviewed by Tim Hatcher.
  21059. * UserInterface/DOMStorageContentView.js:
  21060. (WebInspector.DOMStorageContentView.prototype.constructor.WebInspector.DOMStorageContentView.update): Don't remove the content
  21061. view's children.
  21062. (WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries): Call _updateDataGridForDOMStorageEntries (which was renamed).
  21063. (WebInspector.DOMStorageContentView.prototype._updateDataGridForDOMStorageEntries): Renamed. It also now only creates the data grid
  21064. if necessary, and removes the children from the data grid before adding the new children.
  21065. 2012-01-06 Brian Weinstein <bweinstein@apple.com>
  21066. Rest towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21067. Hook up editing of the DOM storage items.
  21068. Reviewed by Tim Hatcher.
  21069. * UserInterface/DOMStorageContentView.js:
  21070. (WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries): Add an editing callback.
  21071. (WebInspector.DOMStorageContentView.prototype._editingCallback): Tell the DOMStorageObject about what
  21072. item to modify.
  21073. * UserInterface/DOMStorageObject.js:
  21074. (WebInspector.DOMStorageObject.prototype.setItem): Call through to DOMStorageAgent.
  21075. * UserInterface/Editing.css: Added. Copied some rules from inspector.css in Open Source.
  21076. * UserInterface/EditingSupport.js: Added. Copied selected functions from Open Source UIUtils.js.
  21077. * UserInterface/KeyboardShortcut.js: Added.
  21078. * UserInterface/Main.html: Added new files.
  21079. * UserInterface/Utilities.js: Copied isInsertionCaretInside from Open Source utilities.js, but made it
  21080. a property.
  21081. 2012-01-06 Brian Weinstein <bweinstein@apple.com>
  21082. Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21083. Implement DOMStorageObserver.updateDOMStorage, and have it call all the way through to calling
  21084. update on the DOMStorageContentView.
  21085. Reviewed by Tim Hatcher.
  21086. * UserInterface/DOMStorageObserver.js:
  21087. (WebInspector.DOMStorageObserver.prototype.updateDOMStorage):
  21088. * UserInterface/StorageManager.js:
  21089. (WebInspector.StorageManager.prototype.domStorageWasUpdated):
  21090. (WebInspector.StorageManager.prototype._mainResourceDidChange):
  21091. (WebInspector.StorageManager.prototype._domStorageForId):
  21092. 2012-01-06 Brian Weinstein <bweinstein@apple.com>
  21093. Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21094. Hook up the delete callback from the datagrid. When the delete key is pressed and a row is selected,
  21095. that DOM storage item will be deleted.
  21096. Reviewed by Tim Hatcher.
  21097. * UserInterface/DOMStorageContentView.js:
  21098. (WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries):
  21099. (WebInspector.DOMStorageContentView.prototype._deleteCallback):
  21100. * UserInterface/DOMStorageObject.js:
  21101. (WebInspector.DOMStorageObject.prototype.getEntries):
  21102. (WebInspector.DOMStorageObject.prototype.removeItem):
  21103. 2012-01-06 Brian Weinstein <bweinstein@apple.com>
  21104. Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21105. Make resizing columns work.
  21106. Reviewed by Tim Hatcher.
  21107. * UserInterface/DataGrid.js:
  21108. (WebInspector.DataGrid.prototype._resizerDragging): Change totalOffsetLeft to be a property instead of
  21109. a function. This matches Utilities.js and code that we already have.
  21110. (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle): Ditto.
  21111. * UserInterface/Main.js:
  21112. (WebInspector.elementDragStart): Copied from Open Source.
  21113. (WebInspector.elementDragEnd): Ditto.
  21114. * UserInterface/Utilities.js:
  21115. (Object.defineProperty):
  21116. 2012-01-06 Brian Weinstein <bweinstein@apple.com>
  21117. Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21118. We now show a data grid with the contents of the local or session storage.
  21119. It's not editable, and you can't resize the columns yet, but that will come in
  21120. the not too distant future.
  21121. Reviewed by Tim Hatcher.
  21122. * UserInterface/DOMStorageContentView.css: Added.
  21123. (.content-view.dom-storage > .data-grid): Make the data grid take up the whole content view.
  21124. * UserInterface/DOMStorageContentView.js:
  21125. (WebInspector.DOMStorageContentView): Call update.
  21126. (WebInspector.DOMStorageContentView.prototype.constructor.WebInspector.DOMStorageContentView.update): Remove all children
  21127. from the content view, and ask the DOM storage object for a list of entries, and pass _showDOMStorageEntries as a callback.
  21128. (WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries): Call _dataGridForDOMStorageEntries and add the data grid
  21129. to the
  21130. (WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries): Create the data grid and populate it.
  21131. * UserInterface/DOMStorageObject.js:
  21132. (WebInspector.DOMStorageObject.prototype.isLocalStorage):
  21133. (WebInspector.DOMStorageObject.prototype.getEntries): Ask for the entries for the DOM storage.
  21134. * UserInterface/Main.html: Add the new CSS file.
  21135. * English.lproj/localizedStrings.js: Update the localized strings.
  21136. 2012-01-06 Brian Weinstein <bweinstein@apple.com>
  21137. Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21138. Clean up DataGrid by replacing (add|remove|has)StyleClass with classList.(add|remove|contains).
  21139. Reviewed by Tim Hatcher.
  21140. * UserInterface/DataGrid.js:
  21141. 2012-01-06 Brian Weinstein <bweinstein@apple.com>
  21142. Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21143. Add a content view for DOM storage. Currently it is just a blank view, but a datagrid will be
  21144. added that will show the correct data.
  21145. Reviewed by Tim Hatcher.
  21146. * UserInterface/ContentView.js:
  21147. (WebInspector.ContentView): Add a new case for DOMStorageObject.
  21148. (WebInspector.ContentView.isViewable): Ditto.
  21149. (.content-view.dom-storage > .content-view-container):
  21150. * UserInterface/DOMStorageContentView.js: Added.
  21151. (WebInspector.DOMStorageContentView):
  21152. * UserInterface/Main.html:
  21153. * UserInterface/StorageSidebarPanel.js:
  21154. (WebInspector.StorageSidebarPanel): Add a listener for when a tree element is selected.
  21155. (WebInspector.StorageSidebarPanel.prototype._storageCleared):
  21156. (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Install the content view.
  21157. 2012-01-04 Brian Weinstein <bweinstein@apple.com>
  21158. Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
  21159. Add DataGrid JavaScript, CSS files, and necessary images to the internal project.
  21160. Reviewed by Tim Hatcher.
  21161. * UserInterface/DataGrid.js: Added. This was copied from ToT Open Source, but the changes from
  21162. http://trac.webkit.org/changeset/98225 and http://trac.webkit.org/changeset/98228 were rolled out,
  21163. because we don't share the same concept of a WebInspector view.
  21164. * UserInterface/Images/glossyHeader.png: Added.
  21165. * UserInterface/Images/glossyHeaderPressed.png: Added.
  21166. * UserInterface/Images/glossyHeaderSelected.png: Added.
  21167. * UserInterface/Images/glossyHeaderSelectedPressed.png: Added.
  21168. * UserInterface/Images/treeDownTriangleBlack.png: Added.
  21169. * UserInterface/Images/treeDownTriangleWhite.png: Added.
  21170. * UserInterface/Images/treeRightTriangleBlack.png: Added.
  21171. * UserInterface/Images/treeRightTriangleWhite.png: Added.
  21172. * UserInterface/Images/treeUpTriangleBlack.png: Added.
  21173. * UserInterface/Main.html: Added new files.
  21174. * UserInterface/dataGrid.css: Added.
  21175. 2012-01-06 Timothy Hatcher <timothy@apple.com>
  21176. Add a path component to WebInspector.FrameContentView that will eventually let you switch
  21177. between Source Code and DOM Tree.
  21178. Reviewed by Joseph Pecoraro.
  21179. * UserInterface/FrameContentView.js:
  21180. (WebInspector.FrameContentView.createPathComponent): Added. Helper for making HierarchicalPathComponents.
  21181. (WebInspector.FrameContentView): Create a Source Code path component.
  21182. (WebInspector.FrameContentView.prototype.get selectionPathComponents): Added. Append the current view's path
  21183. components to the path component representing the current view.
  21184. (WebInspector.FrameContentView.prototype._pathComponentForContentView): Added.
  21185. (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Added.
  21186. (WebInspector.FrameContentView.prototype._pathComponentSelected): Added.
  21187. * UserInterface/Images/SourceCode.pdf: Added.
  21188. * UserInterface/Main.html: Included PathComponentIcons.css.
  21189. * UserInterface/PathComponentIcons.css: Added.
  21190. (.source-code-icon .icon):
  21191. * English.lproj/localizedStrings.js: Updated.
  21192. 2012-01-06 Timothy Hatcher <timothy@apple.com>
  21193. Add support for path components in the Quick Navigation bar that represent the current selection in a content view.
  21194. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21195. Reviewed by Joseph Pecoraro.
  21196. * UserInterface/ClusterContentView.js:
  21197. (WebInspector.ClusterContentView): Listen for CurrentContentViewDidChange and SelectionPathComponentsDidChange events.
  21198. (WebInspector.ClusterContentView.prototype.get selectionPathComponents): Added. Forward the selectionPathComponents
  21199. of the current view.
  21200. (WebInspector.ClusterContentView.prototype._currentContentViewDidChange): Added. Dispatch SelectionPathComponentsDidChange event.
  21201. (WebInspector.ClusterContentView.prototype._contentViewSelectionPathComponentDidChange): Added. Dispatch the
  21202. SelectionPathComponentsDidChange event if the event target is our current content view.
  21203. * UserInterface/ContentBrowser.js:
  21204. (WebInspector.ContentBrowser): Create a hierarchical path navigation item for the content view path components.
  21205. (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Added. Remove and insert the navigation
  21206. item if needed and update the components.
  21207. (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Added. Call _updateContentViewSelectionPathNavigationItem.
  21208. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _updateContentViewSelectionPathNavigationItem.
  21209. * UserInterface/ContentView.js:
  21210. (WebInspector.ContentView.prototype.get selectionPathComponents): Added stub.
  21211. * UserInterface/HierarchicalPathComponent.css:
  21212. (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-of-type > .separator): Added
  21213. the :not(.always-show-last-path-component-separator) part so so prevent hiding the separator in that case.
  21214. * UserInterface/HierarchicalPathNavigationItem.js:
  21215. (WebInspector.HierarchicalPathNavigationItem.prototype.get alwaysShowLastPathComponentSeparator): Added.
  21216. (WebInspector.HierarchicalPathNavigationItem.prototype.set alwaysShowLastPathComponentSeparator): Added.
  21217. 2012-01-05 Timothy Hatcher <timothy@apple.com>
  21218. Fix a regression from r39746 where link navigation between Web Inspector resource broke.
  21219. Reviewed by Brian Weinstein.
  21220. * UserInterface/Main.js:
  21221. (WebInspector.openURL): Use contentBrowser instead of the now removed contentViewContainer.
  21222. Also show the frame for main resources instead of the resource itself.
  21223. 2012-01-05 Timothy Hatcher <timothy@apple.com>
  21224. Fix an issue where host names for frames where not shown when they differ from the frame that includes them.
  21225. Reviewed by Brian Weinstein.
  21226. * UserInterface/Resource.js:
  21227. (WebInspector.Resource.prototype.isMainResource): Added. Helper function.
  21228. * UserInterface/ResourceTreeElement.js:
  21229. (WebInspector.ResourceTreeElement.prototype._updateTitles): When the resource is a main resource, get the
  21230. host from the parent frame instead of the current frame.
  21231. 2012-01-05 Timothy Hatcher <timothy@apple.com>
  21232. Add support for intra-view back/forward navigation.
  21233. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21234. Reviewed by Brian Weinstein.
  21235. * UserInterface/ClusterContentView.js:
  21236. (WebInspector.ClusterContentView.prototype.canGoBack): Added. Call through to the content view container.
  21237. (WebInspector.ClusterContentView.prototype.canGoForward): Added. Ditto.
  21238. (WebInspector.ClusterContentView.prototype.goBack): Added. Ditto.
  21239. (WebInspector.ClusterContentView.prototype.goForward): Added. Ditto.
  21240. * UserInterface/ContentBrowser.js:
  21241. (WebInspector.ContentBrowser.prototype.canGoBack): Added. Check the current content view first.
  21242. (WebInspector.ContentBrowser.prototype.canGoForward): Added. Check the current content view first.
  21243. (WebInspector.ContentBrowser.prototype.goBack): Added. Try the current content view first.
  21244. (WebInspector.ContentBrowser.prototype.goForward): Added. Try the current content view first.
  21245. (WebInspector.ContentBrowser.prototype._backButtonClicked): Call goBack on this instead of the content
  21246. view container directly.
  21247. (WebInspector.ContentBrowser.prototype._forwardButtonClicked): Call goForward on this instead of the
  21248. content view container directly.
  21249. (WebInspector.ContentBrowser.prototype._updateBackForwardButtons): Added.
  21250. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _udpateBackForwardButtons.
  21251. * UserInterface/ContentView.js:
  21252. (WebInspector.ContentView.prototype.canGoBack): Added stub.
  21253. (WebInspector.ContentView.prototype.canGoForward): Added stub.
  21254. (WebInspector.ContentView.prototype.goBack): Added stub.
  21255. (WebInspector.ContentView.prototype.goForward): Added stub.
  21256. 2012-01-04 Timothy Hatcher <timothy@apple.com>
  21257. Add WebInspector.FrameContentView and WebInspector.ClusterContentView in preparation for showing
  21258. either the main resource text or the DOM tree for a frame.
  21259. Reviewed by Joseph Pecoraro.
  21260. * UserInterface/ClusterContentView.css: Added.
  21261. (.content-view.cluster > .content-view-container):
  21262. * UserInterface/ClusterContentView.js: Added.
  21263. (WebInspector.ClusterContentView):
  21264. (WebInspector.ClusterContentView.prototype.get contentViewContainer):
  21265. * UserInterface/ContentView.js:
  21266. (WebInspector.ContentView): Return a FrameContentView for a Frame.
  21267. (WebInspector.ContentView.isViewable): Added Frame.
  21268. * UserInterface/FrameContentView.js: Added.
  21269. (WebInspector.FrameContentView):
  21270. (WebInspector.FrameContentView.prototype.get frame):
  21271. * UserInterface/Main.html: Included ClusterContentView.{css,js} and FrameContentView.js.
  21272. * UserInterface/Main.js:
  21273. (WebInspector.contentBrowserTreeElementForRepresentedObject): Added WebInspector.Frame check.
  21274. * UserInterface/ResourceSidebarPanel.js:
  21275. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Removed. The base class
  21276. version of this function is enough now.
  21277. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Close all FrameContentViews
  21278. and improve a comment and add a FIXME.
  21279. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Use treeElement.representedObject
  21280. instead of treeElement.resource since we want a FrameContentView for frames.
  21281. 2012-01-04 Timothy Hatcher <timothy@apple.com>
  21282. Populate the on-click menu for path components backed by tree elements.
  21283. Reviewed by Joseph Pecoraro.
  21284. * UserInterface/ContentBrowser.js:
  21285. (WebInspector.ContentBrowser): Add PathComponentWasSelected event listener.
  21286. (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Use TreeElementHierarchicalPathComponent.
  21287. (WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Added.
  21288. * UserInterface/ContentView.js:
  21289. (WebInspector.ContentView): Add assertions that isViewable is correct.
  21290. (WebInspector.ContentView.isViewable): Added.
  21291. * UserInterface/Main.html: Included TreeElementHierarchicalPathComponent.js.
  21292. * UserInterface/TreeElementHierarchicalPathComponent.js: Added.
  21293. (WebInspector.TreeElementHierarchicalPathComponent):
  21294. (WebInspector.TreeElementHierarchicalPathComponent.prototype.get treeElement):
  21295. (WebInspector.TreeElementHierarchicalPathComponent.prototype.get previousSibling):
  21296. (WebInspector.TreeElementHierarchicalPathComponent.prototype.get nextSibling):
  21297. 2012-01-04 Timothy Hatcher <timothy@apple.com>
  21298. Show a popup menu on click in HierarchicalPathComponent that contains sibling path components.
  21299. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21300. Reviewed by Joseph Pecoraro.
  21301. * UserInterface/HierarchicalPathComponent.css:
  21302. (.hierarchical-path-component): Make positioning relative.
  21303. (.hierarchical-path-component > select): Added. Positioned so the text in the menu aligns with the text in .title.
  21304. * UserInterface/HierarchicalPathComponent.js:
  21305. (WebInspector.HierarchicalPathComponent): Create the select element.
  21306. (WebInspector.HierarchicalPathComponent.prototype.get previousSibling): Added.
  21307. (WebInspector.HierarchicalPathComponent.prototype.set previousSibling): Added.
  21308. (WebInspector.HierarchicalPathComponent.prototype.get nextSibling): Added.
  21309. (WebInspector.HierarchicalPathComponent.prototype.set nextSibling): Added.
  21310. (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement): Added. Build the select menu.
  21311. (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption): Added. Helper to create
  21312. an option element from a path component.
  21313. (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseDown): Added. Call _updateSelectElement.
  21314. (WebInspector.HierarchicalPathComponent.prototype._selectElementSelectionChanged): Added. Fire the SiblingWasSelected event.
  21315. * UserInterface/HierarchicalPathNavigationItem.js:
  21316. (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Remove and add event listeners.
  21317. (WebInspector.HierarchicalPathNavigationItem.prototype._siblingPathComponentWasSelected): Added. Fire the PathComponentWasSelected event.
  21318. 2012-01-03 Brian Weinstein <bweinstein@apple.com>
  21319. If a database doesn't have any tables, its tree element shouldn't have a disclosure triangle.
  21320. When creating the tree element for a database, initially set it not to have children, but make sure
  21321. it is populated when it is first created, so children will be added if it has them.
  21322. Reviewed by Tim Hatcher.
  21323. * UserInterface/DatabaseTreeElement.js:
  21324. (WebInspector.DatabaseTreeElement):
  21325. (WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback):
  21326. (WebInspector.DatabaseTreeElement.prototype.onpopulate):
  21327. 2012-01-02 Timothy Hatcher <timothy@apple.com>
  21328. Localize the Web Inspector by adding WebInspector.UIString in places that need it.
  21329. Reviewed by Jessie Berlin.
  21330. * UserInterface/ContentBrowser.js:
  21331. (WebInspector.ContentBrowser):
  21332. * UserInterface/CookieStorageTreeElement.js:
  21333. (WebInspector.CookieStorageTreeElement.prototype.get categoryName):
  21334. * UserInterface/DOMStorageTreeElement.js:
  21335. (WebInspector.DOMStorageTreeElement.prototype.get categoryName):
  21336. * UserInterface/DatabaseHostTreeElement.js:
  21337. (WebInspector.DatabaseHostTreeElement.prototype.get categoryName):
  21338. * UserInterface/DatabaseObject.js:
  21339. (WebInspector.DatabaseObject):
  21340. * UserInterface/FrameTreeElement.js:
  21341. (WebInspector.FrameTreeElement.prototype._folderNameForResourceType):
  21342. (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject):
  21343. * UserInterface/Main.js:
  21344. (WebInspector.contentLoaded):
  21345. (WebInspector._leftSidebarToggleButtonToolTip):
  21346. (WebInspector._rightSidebarToggleButtonToolTip):
  21347. * UserInterface/NavigationSidebarPanel.js:
  21348. (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
  21349. * UserInterface/ResourceSidebarPanel.js:
  21350. (WebInspector.ResourceSidebarPanel):
  21351. * UserInterface/StorageSidebarPanel.js:
  21352. (WebInspector.StorageSidebarPanel):
  21353. (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded):
  21354. (WebInspector.StorageSidebarPanel.prototype._databaseWasAdded):
  21355. (WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded):
  21356. * English.lproj/localizedStrings.js: Updated with update-safari-localizable-strings.
  21357. 2012-01-02 Timothy Hatcher <timothy@apple.com>
  21358. Add WebInspector.UIString and load the localized strings file.
  21359. Reviewed by Jessie Berlin.
  21360. * UserInterface/Main.js:
  21361. (WebInspector.loadLocalizedStrings): Added. Load the localized strings file and call
  21362. content loaded when it loads.
  21363. (WebInspector.UIString): Added.
  21364. 2012-01-02 Timothy Hatcher <timothy@apple.com>
  21365. Add string formatting functions to Web Inspector.
  21366. These will be needed for localization and the console.
  21367. Reviewed by Brian Weinstein.
  21368. * UserInterface/Utilities.js:
  21369. (Array.convert): Copied from OpenSource/Source/WebCore/inspector/front-end/utilities.js.
  21370. (String.tokenizeFormatString): Ditto.
  21371. (String.standardFormatters): Ditto.
  21372. (String.format): Ditto.
  21373. (String.prototype.format): Added.
  21374. 2011-12-31 Timothy Hatcher <timothy@apple.com>
  21375. Add the toggle left and right sidebar buttons to the Quick Navigation bar.
  21376. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21377. Reviewed by Brian Weinstein.
  21378. * UserInterface/Images/LeftSidebarClose.pdf: Added.
  21379. * UserInterface/Images/LeftSidebarOpen.pdf: Added.
  21380. * UserInterface/Images/RightSidebarClose.pdf: Added.
  21381. * UserInterface/Images/RightSidebarOpen.pdf: Added.
  21382. * UserInterface/Main.js:
  21383. (WebInspector.contentLoaded): Create the left and right toggle sidebar buttons and add event listeners.
  21384. (WebInspector._leftSidebarToggleButtonToolTip): Added. Return the correct tool tip based on which sidebar
  21385. is currently on the left.
  21386. (WebInspector._rightSidebarToggleButtonToolTip): Added. Ditto for the right.
  21387. (WebInspector._toggleLeftSidebar): Added.
  21388. (WebInspector._toggleRightSidebar): Added.
  21389. (WebInspector._sidebarCollapsedStateDidChange): Added. Update the toggle navigation buttons.
  21390. * UserInterface/Sidebar.js:
  21391. (WebInspector.Sidebar.prototype.set collapsed): Fire the CollapsedStateDidChange event.
  21392. * UserInterface/TextEditor.css:
  21393. (.text-editor > .gutter): Made the min-width 1px smaller to align with the divider in the navigation bar.
  21394. 2011-12-31 Timothy Hatcher <timothy@apple.com>
  21395. Add support for removing navigation items.
  21396. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21397. Reviewed by Brian Weinstein.
  21398. * UserInterface/NavigationBar.js:
  21399. (WebInspector.NavigationBar.prototype.removeNavigationItem): Added.
  21400. (WebInspector.NavigationBar.prototype.set selectedNavigationItem): Moved code from here into _findNavigationItem.
  21401. (WebInspector.NavigationBar.prototype._findNavigationItem): Added.
  21402. 2011-12-31 Timothy Hatcher <timothy@apple.com>
  21403. Add support for inserting navigation items at a specific index.
  21404. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21405. Reviewed by Brian Weinstein.
  21406. * UserInterface/NavigationBar.js:
  21407. (WebInspector.NavigationBar.prototype.addNavigationItem): Call insertNavigationItem.
  21408. (WebInspector.NavigationBar.prototype.insertNavigationItem): Added.
  21409. 2011-12-31 Timothy Hatcher <timothy@apple.com>
  21410. Add WebInspector.ToggleButtonNavigationItem for the sidebar toggle buttons in the Quick Navigation bar.
  21411. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21412. Reviewed by Brian Weinstein.
  21413. * UserInterface/ButtonNavigationItem.js:
  21414. (WebInspector.ButtonNavigationItem.prototype.set image): Added.
  21415. (WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage): Call clearRect
  21416. since _generateImages can be called multiple times now.
  21417. * UserInterface/Main.html: Included ToggleButtonNavigationItem.js.
  21418. * UserInterface/ToggleButtonNavigationItem.js: Added.
  21419. (WebInspector.ToggleButtonNavigationItem): Added.
  21420. (WebInspector.ToggleButtonNavigationItem.prototype.get defaultImage): Added.
  21421. (WebInspector.ToggleButtonNavigationItem.prototype.get alternateImage): Added.
  21422. (WebInspector.ToggleButtonNavigationItem.prototype.get toggled): Added.
  21423. (WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Added. Set _toggled and set the correct image.
  21424. 2011-12-31 Timothy Hatcher <timothy@apple.com>
  21425. Actually set the ButtonNavigationItem tool tip so it shows up as expected.
  21426. Reviewed by Dan Bernstein.
  21427. * UserInterface/ButtonNavigationItem.js:
  21428. (WebInspector.ButtonNavigationItem): Use the toolTip setter instead of _toolTip.
  21429. (WebInspector.ButtonNavigationItem.prototype.get toolTip): Return the title instead of _toolTip.
  21430. (WebInspector.ButtonNavigationItem.prototype.set toolTip): Added. Set the element title.
  21431. 2011-12-31 Timothy Hatcher <timothy@apple.com>
  21432. Rename ButtonNavigationItem.displayName to toolTip.
  21433. It was always intended to be used as the tool tip, so this makes it clear.
  21434. Reviewed by Dan Bernstein.
  21435. * UserInterface/ButtonNavigationItem.js:
  21436. (WebInspector.ButtonNavigationItem):
  21437. (WebInspector.ButtonNavigationItem.prototype.constructor.WebInspector.ButtonNavigationItem.get toolTip):
  21438. * UserInterface/RadioButtonNavigationItem.js:
  21439. (WebInspector.RadioButtonNavigationItem):
  21440. 2011-12-29 Timothy Hatcher <timothy@apple.com>
  21441. Fix an issue in the Web Inspector where the old page content might appear when
  21442. pressing the back button.
  21443. Reviewed by Dan Bernstein.
  21444. * UserInterface/ResourceSidebarPanel.js:
  21445. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Delay this work because
  21446. other listeners of this event might not have fired yet. So selecting the main frame before those listeners
  21447. do their work might cause the content of the old page to show instead of the new page.
  21448. 2011-12-29 Timothy Hatcher <timothy@apple.com>
  21449. Add back/forward buttons to the Quick Navigation bar and hook them up.
  21450. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21451. Reviewed by Joseph Pecoraro.
  21452. * UserInterface/ContentBrowser.js:
  21453. (WebInspector.ContentBrowser): Create the back and forward button navigation items.
  21454. (WebInspector.ContentBrowser.prototype._backButtonClicked): Added.
  21455. (WebInspector.ContentBrowser.prototype._forwardButtonClicked): Added.
  21456. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Update the enabled state
  21457. of the back/forward navigation items.
  21458. * UserInterface/Images/BackArrow.pdf: Added.
  21459. * UserInterface/Images/ForwardArrow.pdf: Added.
  21460. 2011-12-29 Timothy Hatcher <timothy@apple.com>
  21461. Add WebInspector.DividerNavigationItem for dividing items in the Quick Navigation bar.
  21462. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21463. Reviewed by Joseph Pecoraro.
  21464. * UserInterface/DividerNavigationItem.css: Added.
  21465. (.navigation-bar > .item.divider):
  21466. * UserInterface/DividerNavigationItem.js: Added.
  21467. (WebInspector.DividerNavigationItem):
  21468. * UserInterface/Main.html: Included DividerNavigationItem.js and DividerNavigationItem.css.
  21469. 2011-12-29 Timothy Hatcher <timothy@apple.com>
  21470. Add disabled support to WebInspector.ButtonNavigationItem.
  21471. This is needed for the back/forward buttons.
  21472. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21473. Reviewed by Joseph Pecoraro.
  21474. * UserInterface/ButtonNavigationItem.css:
  21475. (.navigation-bar > .item.button.disabled > .glyph): Added.
  21476. (.navigation-bar > .item.button:not(.disabled):not(.radio):active): Don't highlight on click when disabled.
  21477. * UserInterface/ButtonNavigationItem.js:
  21478. (WebInspector.ButtonNavigationItem.prototype.get enabled): Added.
  21479. (WebInspector.ButtonNavigationItem.prototype.set enabled): Added.
  21480. (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added :not(.disabled) to the focus and active rules.
  21481. (WebInspector.ButtonNavigationItem.StyleClassName._mouseClicked): Don't fire the event when disabled.
  21482. * UserInterface/RadioButtonNavigationItem.js:
  21483. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added :not(.disabled) to the focus and active rules.
  21484. 2011-12-29 Timothy Hatcher <timothy@apple.com>
  21485. Add support for click events to WebInspector.ButtonNavigationItem.
  21486. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21487. Reviewed by Joseph Pecoraro.
  21488. * UserInterface/ButtonNavigationItem.js:
  21489. (WebInspector.ButtonNavigationItem): Added click event listener to the element.
  21490. (WebInspector.ButtonNavigationItem.StyleClassName._mouseClicked): Added. Dispatch the Clicked event.
  21491. 2011-12-29 Timothy Hatcher <timothy@apple.com>
  21492. Support different size glyph images on WebInspector.ButtonNavigationItem. Also adds a highlight to
  21493. buttons when pressed and general style clean up.
  21494. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21495. Reviewed by Joseph Pecoraro.
  21496. * UserInterface/ButtonNavigationItem.css:
  21497. (.navigation-bar > .item.button): Default buttons to a width of 26px. Removed background styles.
  21498. (.navigation-bar > .item.button > .glyph): Set width and height to 100% and have the background
  21499. centered and non-repeating.
  21500. (.navigation-bar > .item.button:not(.radio):active): Added. Highlight when pressed.
  21501. * UserInterface/ButtonNavigationItem.js:
  21502. (WebInspector.ButtonNavigationItem): Added image width and height arguments.
  21503. (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added background-size to the generated rules.
  21504. * UserInterface/RadioButtonNavigationItem.css:
  21505. (.navigation-bar > .item.radio.button): Added. Moved from ButtonNavigationItem.css.
  21506. (.navigation-bar.collapsed > .item.radio.button): Added. Moved from ButtonNavigationItem.css.
  21507. (.navigation-bar > .item.radio.button.selected): Moved background-repeat from ButtonNavigationItem.css to here.
  21508. (.navigation-bar.collapsed > .item.radio.button.selected): Added. Adjust the background-size to fit the width.
  21509. * UserInterface/RadioButtonNavigationItem.js:
  21510. (WebInspector.RadioButtonNavigationItem): Added image width and height arguments.
  21511. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added background-size to the generated rules.
  21512. 2011-12-28 Timothy Hatcher <timothy@apple.com>
  21513. Populate the Quick Navigation bar with the path of the selected item.
  21514. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21515. Reviewed by Joseph Pecoraro.
  21516. * UserInterface/ContentBrowser.js:
  21517. (WebInspector.ContentBrowser): Added delegate argument. Create a HierarchicalPathNavigationItem and add
  21518. to the navigation bar.
  21519. (WebInspector.ContentBrowser.prototype.get delegate): Added.
  21520. (WebInspector.ContentBrowser.prototype.set delegate): Added.
  21521. (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Added. Build path components
  21522. based on the tree element for the represented object.
  21523. (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Added. Call _updateHierarchicalPathNavigationItem.
  21524. * UserInterface/ContentViewContainer.js:
  21525. (WebInspector.ContentViewContainer.prototype._showContentView): Dispatch the CurrentContentViewDidChange event.
  21526. * UserInterface/Main.js:
  21527. (WebInspector.contentLoaded): Pass this as the delegate to the ContentBrowser.
  21528. (WebInspector.contentBrowserTreeElementForRepresentedObject): Added. Call treeElementForRepresentedObject on
  21529. the ResourceSidebarPanel for Resource represented objects.
  21530. * UserInterface/NavigationSidebarPanel.js:
  21531. (WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject): Added. Generic implementation
  21532. that will work for most NavigationSidebarPanel subclasses.
  21533. * UserInterface/ResourceSidebarPanel.js:
  21534. (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Added. If the resource is a
  21535. main resource, return the tree element for the parent frame.
  21536. 2011-12-28 Timothy Hatcher <timothy@apple.com>
  21537. Add HierarchicalPathNavigationItem and friends for the Quick Navigation Bar.
  21538. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21539. Reviewed by Joseph Pecoraro.
  21540. * UserInterface/HierarchicalPathComponent.css: Added.
  21541. (.hierarchical-path-component):
  21542. (.hierarchical-path-component > .icon):
  21543. (.hierarchical-path-component > .title):
  21544. (.hierarchical-path-component:last-of-type > .separator):
  21545. (.hierarchical-path-component > .separator):
  21546. (.hierarchical-path-component.collapsed > .title):
  21547. * UserInterface/HierarchicalPathComponent.js: Added.
  21548. (WebInspector.HierarchicalPathComponent):
  21549. (WebInspector.HierarchicalPathComponent.prototype.get element):
  21550. (WebInspector.HierarchicalPathComponent.prototype.get representedObject):
  21551. (WebInspector.HierarchicalPathComponent.prototype.get displayName):
  21552. (WebInspector.HierarchicalPathComponent.prototype.set displayName):
  21553. * UserInterface/HierarchicalPathNavigationItem.js: Added.
  21554. (WebInspector.HierarchicalPathNavigationItem):
  21555. (WebInspector.HierarchicalPathNavigationItem.prototype.get components):
  21556. (WebInspector.HierarchicalPathNavigationItem.prototype.set components):
  21557. * UserInterface/Images/HierarchicalNavigationItemChevron.pdf: Added.
  21558. * UserInterface/Main.html: Included HierarchicalPathComponent.css, HierarchicalPathNavigationItem.js
  21559. and HierarchicalPathComponent.js.
  21560. 2011-12-26 Timothy Hatcher <timothy@apple.com>
  21561. Add WebInspector.ContentBrowser to coordinate between the Quick Navigation bar and content view container.
  21562. Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
  21563. Reviewed by Joseph Pecoraro and Brian Weinstein.
  21564. * UserInterface/ContentBrowser.css: Added.
  21565. (.content-browser):
  21566. (.content-browser > .navigation-bar):
  21567. (.content-browser > .content-view-container):
  21568. * UserInterface/ContentBrowser.js: Added.
  21569. (WebInspector.ContentBrowser):
  21570. (WebInspector.ContentBrowser.prototype.get navigationBar):
  21571. (WebInspector.ContentBrowser.prototype.get contentViewContainer):
  21572. (WebInspector.ContentBrowser.prototype.showContentForRepresentedObject):
  21573. * UserInterface/ContentViewContainer.js:
  21574. (WebInspector.ContentViewContainer.prototype.get element): Add missing return.
  21575. * UserInterface/Main.css:
  21576. (#content-browser):
  21577. * UserInterface/Main.html: Renamed #content to #content-browser.
  21578. * UserInterface/Main.js:
  21579. (WebInspector.contentLoaded): Create a ContentBrowser instead of a NavigationBar and ContentViewContainer.
  21580. * UserInterface/ResourceSidebarPanel.js:
  21581. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Use the ContentBrowser.
  21582. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Ditto.
  21583. 2011-12-28 Timothy Hatcher <timothy@apple.com>
  21584. Hold references to the navigation sidebar panels for easy access.
  21585. Reviewed by Adam Roben.
  21586. * UserInterface/Main.js:
  21587. (WebInspector.contentLoaded): Hold references to the sidebar panels.
  21588. 2011-12-28 Timothy Hatcher <timothy@apple.com>
  21589. Remove unused TreeElement class names.
  21590. These class names were originally used for icons, but they have been
  21591. replaced by icon specific class names.
  21592. Reviewed by Brian Weinstein.
  21593. * UserInterface/CookieStorageTreeElement.js:
  21594. (WebInspector.CookieStorageTreeElement):
  21595. * UserInterface/DOMStorageTreeElement.js:
  21596. (WebInspector.DOMStorageTreeElement):
  21597. * UserInterface/DatabaseHostTreeElement.js:
  21598. (WebInspector.DatabaseHostTreeElement):
  21599. * UserInterface/DatabaseTableTreeElement.js:
  21600. (WebInspector.DatabaseTableTreeElement):
  21601. * UserInterface/DatabaseTreeElement.js:
  21602. (WebInspector.DatabaseTreeElement):
  21603. * UserInterface/FolderTreeElement.js:
  21604. (WebInspector.FolderTreeElement):
  21605. * UserInterface/FrameTreeElement.js:
  21606. (WebInspector.FrameTreeElement):
  21607. * UserInterface/ResourceTreeElement.js:
  21608. (WebInspector.ResourceTreeElement):
  21609. * UserInterface/StorageTreeElement.js:
  21610. (WebInspector.StorageTreeElement):
  21611. 2011-12-24 Timothy Hatcher <timothy@apple.com>
  21612. Add icons for local and session storage.
  21613. Reviewed by Brian Weinstein.
  21614. * UserInterface/DOMStorageIcons.css: Added.
  21615. (.local-storage-icon .icon):
  21616. (.session-storage-icon .icon):
  21617. * UserInterface/DOMStorageTreeElement.js:
  21618. (WebInspector.DOMStorageTreeElement): Add class names based on if it is local storage or not.
  21619. (WebInspector.DOMStorageTreeElement.prototype.get categoryName): Remove blank line.
  21620. * UserInterface/Images/LocalStorage.png: Added.
  21621. * UserInterface/Images/LocalStorage@2x.png: Added.
  21622. * UserInterface/Images/SessionStorage.png: Added.
  21623. * UserInterface/Images/SessionStorage@2x.png: Added.
  21624. * UserInterface/Main.html: Included DOMStorageIcons.css.
  21625. 2011-12-24 Timothy Hatcher <timothy@apple.com>
  21626. Add icons for databases and database tables.
  21627. Reviewed by Brian Weinstein.
  21628. * UserInterface/DatabaseHostTreeElement.css: Removed. Duplicates FolderIcon.css.
  21629. * UserInterface/DatabaseHostTreeElement.js:
  21630. (WebInspector.DatabaseHostTreeElement): Pass FolderIconStyleClassName.
  21631. * UserInterface/DatabaseIcon.css: Added.
  21632. (.database-icon .icon):
  21633. * UserInterface/DatabaseTableIcon.css: Added.
  21634. (.database-table-icon .icon):
  21635. * UserInterface/DatabaseTableTreeElement.js:
  21636. (WebInspector.DatabaseTableTreeElement): Pass class names to WebInspector.GeneralTreeElement.
  21637. * UserInterface/DatabaseTreeElement.js:
  21638. (WebInspector.DatabaseTreeElement): Don't inherit from FolderTreeElement. Pass class names
  21639. to WebInspector.GeneralTreeElement.
  21640. * UserInterface/Images/Database.png: Added.
  21641. * UserInterface/Images/Database@2x.png: Added.
  21642. * UserInterface/Images/DatabaseTable.png: Added.
  21643. * UserInterface/Images/DatabaseTable@2x.png: Added.
  21644. * UserInterface/Main.html: Included new files and removed DatabaseHostTreeElement.css.
  21645. * UserInterface/StorageTreeElement.js:
  21646. (WebInspector.StorageTreeElement): Remove a FIXME.
  21647. 2011-12-24 Timothy Hatcher <timothy@apple.com>
  21648. Add images for the Cookie icon.
  21649. Reviewed by Dan Bernstein.
  21650. * UserInterface/CookieIcon.css: Added.
  21651. (.cookie-icon .icon):
  21652. * UserInterface/CookieStorageTreeElement.js:
  21653. (WebInspector.CookieStorageTreeElement):
  21654. * UserInterface/Images/Cookie.png: Added.
  21655. * UserInterface/Images/Cookie@2x.png: Added.
  21656. * UserInterface/Main.html: Included CookieIcon.css.
  21657. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21658. Fix a couple of indentation problems in the Web Inspector.
  21659. Reviewed by John Sullivan.
  21660. * UserInterface/CookieStorageObject.js: Indent before constructor.
  21661. * UserInterface/DatabaseHostTreeElement.js: Ditto.
  21662. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21663. Break out WebInspector.NavigationItem and its subclasses from NavigationBar.js and NavigationBar.css into separate files.
  21664. Rubber-stamped by John Sullivan.
  21665. * UserInterface/ButtonNavigationItem.css: Added.
  21666. * UserInterface/ButtonNavigationItem.js: Added.
  21667. * UserInterface/FlexibleSpaceNavigationItem.css: Added.
  21668. * UserInterface/FlexibleSpaceNavigationItem.js: Added.
  21669. * UserInterface/Main.html: Included new files.
  21670. * UserInterface/NavigationBar.css: Moved "item" subclasses to seperate files.
  21671. * UserInterface/NavigationBar.js: Moved NavigationItem and its subclasses to seperate files.
  21672. * UserInterface/NavigationItem.js: Added.
  21673. * UserInterface/RadioButtonNavigationItem.css: Added.
  21674. * UserInterface/RadioButtonNavigationItem.js: Added.
  21675. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21676. Dynamically register the "mousemove" and "mouseup" event listeners in WebInspector.NavigationBar
  21677. so they are not allways listening.
  21678. Reviewed by Darin Adler.
  21679. * UserInterface/NavigationBar.js:
  21680. (WebInspector.NavigationBar): Remove the static "mousemove" and "mouseup" event listeners.
  21681. (WebInspector.NavigationBar.prototype._mouseDown): Install the "mousemove" and "mouseup" event listeners
  21682. when a WebInspector.RadioButtonNavigationItem is hit.
  21683. (WebInspector.NavigationBar.prototype._mouseMoved): Assert the mouse is down now that we register dynamically.
  21684. (WebInspector.NavigationBar.prototype._mouseUp): Ditto. Remove the "mousemove" and "mouseup" event listeners.
  21685. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21686. Change WebInspector.NavigationBar.NavigationItemSelectedEventName to WebInspector.NavigationBar.Event.NavigationItemSelected.
  21687. This beings WebInspector.NavigationBar in-line with all the other classes in how the event names are defined.
  21688. Reviewed by Darin Adler.
  21689. * UserInterface/NavigationBar.js:
  21690. (WebInspector.NavigationBar.prototype.set selectedNavigationItem): Use WebInspector.NavigationBar.Event.NavigationItemSelected.
  21691. (WebInspector.NavigationBar.prototype._mouseUp): Ditto.
  21692. * UserInterface/Sidebar.js:
  21693. (WebInspector.Sidebar): Use WebInspector.NavigationBar.Event.NavigationItemSelected.
  21694. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21695. Properly define the SidebarPanelSelected event in WebInspector.Sidebar.
  21696. Reviewed by John Sullivan.
  21697. * UserInterface/Sidebar.js:
  21698. (WebInspector.Sidebar.Event): Added.
  21699. (WebInspector.Sidebar.Event.SidebarPanelSelected): Added.
  21700. (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Use WebInspector.Sidebar.Event.SidebarPanelSelected
  21701. instead of the never defined WebInspector.Sidebar.SidebarPanelSelectedEventName.
  21702. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21703. Break out the SidebarPanel class into a separate file and make it correctly inherit from WebInspector.Object.
  21704. Reviewed by John Sullivan.
  21705. * UserInterface/Main.html: Included SidebarPanel.js.
  21706. * UserInterface/Sidebar.js: Moved WebInspector.SidebarPanel and WebInspector.SidebarPanel.prototype from here...
  21707. * UserInterface/SidebarPanel.js: Added. ...to here. Also fixed the prototype chain to make SidebarPanel inherit
  21708. from WebInspector.Object like it should have been.
  21709. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21710. Fix an incorrect use of typeof in the Web Inspector by using instanceof instead.
  21711. Reviewed by Adam Roben.
  21712. * UserInterface/NavigationSidebarPanel.js:
  21713. (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter): Use instanceof
  21714. instead of typeof to check if the input is an array.
  21715. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21716. Make the CSS used for folder and resource icons generic so it can be used by the quick navigation bar.
  21717. Reviewed by Darin Adler.
  21718. * UserInterface/FolderIcon.css: Renamed from Safari/Develop/WebInspector/FolderTreeElement.css.
  21719. Replaced "folder-tree-element" with "folder-icon".
  21720. * UserInterface/FolderTreeElement.js:
  21721. (WebInspector.FolderTreeElement): Add the "folder-icon" class.
  21722. * UserInterface/Main.html:
  21723. * UserInterface/ResourceIcons.css: Renamed from Safari/Develop/WebInspector/ResourceTreeElement.css.
  21724. Replaced "resource-tree-element" with "resource-icon".
  21725. * UserInterface/ResourceTreeElement.js:
  21726. (WebInspector.ResourceTreeElement): Add the "resource-icon" class.
  21727. 2011-12-22 Timothy Hatcher <timothy@apple.com>
  21728. Make identifier optional in the base class of WebInspector.NavigationItem but required for WebInspector.ButtonNavigationItem.
  21729. Reviewed by Darin Adler.
  21730. * UserInterface/NavigationBar.js:
  21731. (WebInspector.NavigationItem): Remove assert for identifier and added "|| null" to the assignment.
  21732. (WebInspector.NavigationItem.prototype.get _classNames): Null check identifier and add it separately.
  21733. (WebInspector.ButtonNavigationItem): Added assert for identifier.
  21734. (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Don't pass the identifier to _canvasIdentifier.
  21735. (WebInspector.ButtonNavigationItem.StyleClassName._canvasIdentifier): Don't take the identifier as an argument, use this.identifier.
  21736. (WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage): Don't pass the identifier to _canvasIdentifier.
  21737. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Ditto.
  21738. 2011-12-20 Timothy Hatcher <timothy@apple.com>
  21739. Show a content view for XHR resources in the new Web Inspector.
  21740. Reviewed by Adam Roben.
  21741. * UserInterface/ResourceContentView.js:
  21742. (WebInspector.ResourceContentView): Add a case for WebInspector.Resource.Type.XHR.
  21743. 2011-12-19 Brian Weinstein <bweinstein@apple.com>
  21744. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  21745. When inserting items into the Storage sidebar, insert them in alphabetical order by main title so
  21746. it is easier for the user to navigate.
  21747. Reviewed by Tim Hatcher.
  21748. * UserInterface/StorageSidebarPanel.js:
  21749. (WebInspector.StorageSidebarPanel.prototype._compareTreeElementsByMainTitle):
  21750. (WebInspector.StorageSidebarPanel.prototype._addChild):
  21751. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21752. Only fire the WebInspector.SyntaxHighlighter.Event.HighlightsDidChange event for whole lines.
  21753. Firing the event for partial lines causes too much DOM churn on large, single-line files.
  21754. Reviewed by Joseph Pecoraro.
  21755. * UserInterface/SyntaxHighlighter.js:
  21756. (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Update actualStopLine after the
  21757. current line has completely finished. Don't fire the event if actualStopLine is still null.
  21758. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21759. Start and stop syntax highlighting when a TextEditor is shown and hidden. This reduces the chance
  21760. of multiple TextEditors highlighting at the same time.
  21761. Reviewed by Joseph Pecoraro.
  21762. * UserInterface/TextEditor.js:
  21763. (WebInspector.TextEditor.prototype.shown): Added. Call startHighlighting and updateLayout.
  21764. (WebInspector.TextEditor.prototype.hidden): Added. Call stopHighlighting.
  21765. * UserInterface/TextResourceContentView.js:
  21766. (WebInspector.TextResourceContentView.prototype.shown): Call TextEditor.shown instead of updateLayout.
  21767. (WebInspector.TextResourceContentView.prototype.hidden): Added. Call TextEditor.hidden.
  21768. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21769. Use a synthetic MIME-type to select the syntax highlighter's tokenizer. Resources are often
  21770. transferred with a MIME-type that doesn't match the purpose the resource was loaded for.
  21771. Reviewed by Joseph Pecoraro.
  21772. * UserInterface/Resource.js:
  21773. (WebInspector.Resource.prototype.get syntheticMIMEType): Added.
  21774. * UserInterface/TextResourceContentView.js:
  21775. (WebInspector.TextResourceContentView.prototype.contentAvailable): Use syntheticMIMEType.
  21776. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21777. Intercept link clicks in the Web Inspector and try to show the appropriate resource,
  21778. otherwise fallback to opening the URL in a new tab/window.
  21779. Reviewed by Joseph Pecoraro.
  21780. * UserInterface/Frame.js:
  21781. (WebInspector.Frame.prototype.resourceForURL): Added argument to recursively search child frames.
  21782. * UserInterface/Main.js:
  21783. (WebInspector.contentLoaded): Add click event listener.
  21784. (WebInspector.openURL): Added.
  21785. (WebInspector._mouseWasClicked): Added. Catch unhandled link clicks, cancel them and log and error.
  21786. * UserInterface/ResourceContentView.js:
  21787. (WebInspector.ResourceContentView): Added click event listener.
  21788. (WebInspector.ResourceContentView.prototype._mouseWasClicked): Added. Call WebInspector.openURL.
  21789. * UserInterface/Utilities.js:
  21790. (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Copied from WebCore/inspector/front-end/utilities.js.
  21791. (Node.prototype.enclosingNodeOrSelfWithNodeName): Copied from WebCore/inspector/front-end/utilities.js.
  21792. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21793. Make links in TextEditor be only absolute URLs. Otherwise relative URLs are resolved
  21794. against the Web Inspector as a base URL.
  21795. Reviewed by Joseph Pecoraro.
  21796. * UserInterface/TextEditor.js:
  21797. (WebInspector.TextEditor): Set _delegate to null.
  21798. (WebInspector.TextEditor.prototype.get delegate): Added.
  21799. (WebInspector.TextEditor.prototype.set delegate): Added.
  21800. (WebInspector.TextEditor.prototype._reset): Pass this when making a TextEditorTextChunk.
  21801. (WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Ditto.
  21802. (WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Ditto.
  21803. (WebInspector.TextEditorTextChunk): Added textEditor argument.
  21804. (WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Ask the TextEditor
  21805. delegate for the baseURL and use absoluteURL when assigning the href for links.
  21806. * UserInterface/TextResourceContentView.js:
  21807. (WebInspector.TextResourceContentView): Set the TextEditor delegate to this.
  21808. (WebInspector.TextResourceContentView.prototype.textEditorBaseURL): Added. Returns the resource's URL.
  21809. * UserInterface/Utilities.js:
  21810. (parseURL): Trim whitespace from the URL.
  21811. (absoluteURL): Added.
  21812. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21813. Workaround a weird and random JavaScript bug that causes the wrong 'this' object when filtering
  21814. the resource sidebar quickly.
  21815. The bug is tracked by: https://webkit.org/b/74811
  21816. Reviewed by Dan Bernstein.
  21817. * UserInterface/TreeOutline.js:
  21818. (TreeElement.prototype.traverseNextTreeElement): Use call to always get the right 'this' object.
  21819. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21820. Reduce the number of updates when setting the string of a WebInspector.TextEditor.
  21821. Invalidating the syntax highlighter causes HighlightsDidChange events to fire and update the text
  21822. chunks. We can ignore those events because _reset will completely rebuild the text chunks anyway.
  21823. Reviewed by Dan Bernstein.
  21824. * UserInterface/TextEditor.js:
  21825. (WebInspector.TextEditor.prototype.set textContent): Set _ignoreHighlightChanges to true.
  21826. (WebInspector.TextEditor.prototype.set string): Ditto.
  21827. (WebInspector.TextEditor.prototype._reset): Reset _ignoreHighlightChanges back to false.
  21828. (WebInspector.TextEditor.prototype._highlightsChanged): Return early if _ignoreHighlightChanges is true.
  21829. 2011-12-18 Timothy Hatcher <timothy@apple.com>
  21830. Improve a workaround and get the clientHeight of the correct element in WebInspector.TextEditor.
  21831. The bug this is working around is tracked by: https://webkit.org/b/74812
  21832. Reviewed by Dan Bernstein.
  21833. * UserInterface/TextEditor.css:
  21834. (.text-editor > .content-container): Set height to 100%. It isn't clear why we should need to set
  21835. the height here, but without this the element collapses sometimes when it should have a height.
  21836. * UserInterface/TextEditor.js:
  21837. (WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Get clientHeight from _contentContainerElement.
  21838. (WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex): Ditto.
  21839. 2011-12-17 Timothy Hatcher <timothy@apple.com>
  21840. Don't show visited links in the Web Inspector.
  21841. Removed the :link pseudo class so visited links are styled the same.
  21842. Reviewed by Dan Bernstein.
  21843. * UserInterface/TextEditorDefaultTheme.css:
  21844. (.text-editor a):
  21845. (.text-editor a:hover):
  21846. 2011-12-17 Timothy Hatcher <timothy@apple.com>
  21847. Allow clicking the selected resource again to show the content view if another content view
  21848. has been shown since the resource was last selected. This matches Xcode.
  21849. Reviewed by Dan Bernstein.
  21850. * UserInterface/ResourceSidebarPanel.js:
  21851. (WebInspector.ResourceSidebarPanel):
  21852. * UserInterface/TreeOutline.js:
  21853. (TreeOutline): Set allowsRepeatSelection to false.
  21854. (TreeElement.prototype.select): Refactored so that when allowsRepeatSelection is true the
  21855. onselect functions are called still.
  21856. 2011-12-17 Timothy Hatcher <timothy@apple.com>
  21857. Don't attempt to create a tokenizer for "text/plain" resources.
  21858. Reviewed by Dan Bernstein.
  21859. * UserInterface/SourceTokenizer.js:
  21860. (WebInspector.SourceTokenizer): Return null for a MIME-type of "text/plain".
  21861. 2011-12-17 Timothy Hatcher <timothy@apple.com>
  21862. Collapse the details sidebar by default. It is empty right now, so there is no reason
  21863. to show it until we have some sidebar panels to show.
  21864. Reviewed by Dan Bernstein.
  21865. * UserInterface/Main.js:
  21866. (WebInspector.contentLoaded): Set this.detailsSidebar.collapsed to true.
  21867. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  21868. Set the Web Inspector window title and update it when the main frame navigates.
  21869. Reviewed by Dan Bernstein.
  21870. * UserInterface/Main.js:
  21871. (WebInspector.contentLoaded): Added event listeners for changes on the main frame.
  21872. (WebInspector.updateWindowTitle): Added. Build a title based on the URL components.
  21873. (WebInspector._mainFrameDidChange): Added. Call updateWindowTitle.
  21874. (WebInspector._mainResourceDidChange): Added. Call updateWindowTitle if this is the main frame.
  21875. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  21876. Force tabs to be 4 spaces wide in the new Web Inspector instead of the default 8 spaces wide.
  21877. This is done via the syntax highlighter, which tokenizes the tabs to be styled as inline-blocks
  21878. with a width equal to 4 spaces each.
  21879. Reviewed by John Sullivan.
  21880. * UserInterface/SyntaxHighlighter.js:
  21881. (WebInspector.SyntaxHighlighter.CharacterTokens): Added \t.
  21882. * UserInterface/TextEditor.js:
  21883. (WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Handle the "tab"
  21884. token type by creating a span per tab.
  21885. * UserInterface/TextEditorDefaultTheme.css:
  21886. (.text-editor .tab): Added. Inline-block with a width equal to 4 spaces.
  21887. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  21888. Implement WebInspector.TextResourceContentView.
  21889. Create a TextEditor that fills the view and displays the text content of the resource.
  21890. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  21891. Reviewed by John Sullivan.
  21892. * UserInterface/Main.html: Include TextResourceContentView.css.
  21893. * UserInterface/TextResourceContentView.css: Added.
  21894. (.content-view.resource.text > .text-editor):
  21895. * UserInterface/TextResourceContentView.js:
  21896. (WebInspector.TextResourceContentView): Create a TextEditor.
  21897. (WebInspector.TextResourceContentView.prototype.get textEditor): Added.
  21898. (WebInspector.TextResourceContentView.prototype.contentAvailable): Added. Populate the TextEditor
  21899. with content and set the MIME-type.
  21900. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  21901. Add the line number gutter to WebInspector.TextEditor.
  21902. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  21903. Reviewed by Brian Weinstein.
  21904. * UserInterface/TextEditor.css:
  21905. (.text-editor > .gutter): Added.
  21906. (.text-editor > .gutter > .line-number): Added.
  21907. (.text-editor > .gutter > .line-number.maximum): Added.
  21908. (.text-editor > .gutter > .line-number.hidden): Added.
  21909. * UserInterface/TextEditor.js:
  21910. (WebInspector.TextEditor): Create the _gutterElement.
  21911. (WebInspector.TextEditor.prototype._reset): Call _updateLineNumbers.
  21912. (WebInspector.TextEditor.prototype._scrollPositionChanged): Ditto.
  21913. (WebInspector.TextEditor.prototype._updateLineNumbers): Added.
  21914. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  21915. Syntax highlight the content of WebInspector.TextEditor.
  21916. Only single line text chunks are rendered with syntax highlighting, which are the the text chunks
  21917. that are near the visible scroll range of the text editor.
  21918. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  21919. Reviewed by Brian Weinstein.
  21920. * UserInterface/SyntaxHighlighter.js:
  21921. (WebInspector.SyntaxHighlighter.prototype.invalidate): Dispatch the HighlightsDidChange event.
  21922. (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Ditto.
  21923. * UserInterface/TextEditor.js:
  21924. (WebInspector.TextEditor): Create a WebInspector.SyntaxHighlighter and listen for the HighlightsDidChange event.
  21925. (WebInspector.TextEditor.prototype.set textContent): Set the SyntaxHighlighter textContent.
  21926. (WebInspector.TextEditor.prototype.set string): Invalidate the SyntaxHighlighter.
  21927. (WebInspector.TextEditor.prototype.get mimeType): Added.
  21928. (WebInspector.TextEditor.prototype.set mimeType): Added.
  21929. (WebInspector.TextEditor.prototype._reset): Stop highlighting and start again.
  21930. (WebInspector.TextEditor.prototype._scrollPositionChanged): Do a sync highlight.
  21931. (WebInspector.TextEditor.prototype._scrollingDidStop): Start highlighting.
  21932. (WebInspector.TextEditor.prototype._highlightsChanged): Update single line text chunks.
  21933. (WebInspector.TextEditor.prototype._textChunkIndexForLine): Added.
  21934. (WebInspector.TextEditor.prototype._textChunkForLine): Added.
  21935. (WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Added.
  21936. (WebInspector.TextEditorTextChunk.prototype.updateContent.appendText): Added.
  21937. (WebInspector.TextEditorTextChunk.prototype.updateContent): Enumerate the syntax highlighting tokens when there is only one line.
  21938. * UserInterface/TextEditorDefaultTheme.css: Added.
  21939. (.text-editor > .content-container):
  21940. (.text-editor .css-comment):
  21941. (.text-editor .css-keyword):
  21942. (.text-editor .css-number):
  21943. (.text-editor .css-at-rule):
  21944. (.text-editor .css-selector):
  21945. (.text-editor .css-important):
  21946. (.text-editor .javascript-comment):
  21947. (.text-editor .javascript-keyword):
  21948. (.text-editor .javascript-number):
  21949. (.text-editor .javascript-regexp):
  21950. (.text-editor .javascript-ident):
  21951. (.text-editor .html-comment):
  21952. (.text-editor .html-tag):
  21953. (.text-editor .html-doctype):
  21954. (.text-editor .html-attribute-name):
  21955. (.text-editor .html-attribute-value):
  21956. (.text-editor a:link):
  21957. (.text-editor a:link:hover):
  21958. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  21959. Break up text chunks into single lines when they are visible, and consolidate them again
  21960. when they are not visible after scrolling.
  21961. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  21962. Reviewed by Brian Weinstein.
  21963. * UserInterface/TextEditor.js:
  21964. (WebInspector.TextEditor): Add scroll event listener.
  21965. (WebInspector.TextEditor.prototype._reset): Call _breakVisibleTextChunksIntoSingleLineTextChunks.
  21966. (WebInspector.TextEditor.prototype._scrollPositionChanged): Added. Schedule timeout for _scrollingDidStop.
  21967. Call _breakVisibleTextChunksIntoSingleLineTextChunks.
  21968. (WebInspector.TextEditor.prototype._scrollingDidStop): Added. Call _consolidateHiddenSingleLineTextChunksIfNeeded.
  21969. (WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Added.
  21970. (WebInspector.TextEditor.prototype._breakVisibleTextChunksIntoSingleLineTextChunks): Added.
  21971. (WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunksIfNeeded): Added.
  21972. (WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunks): Added.
  21973. (WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Added.
  21974. (WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex.compareTopOffsets): Added.
  21975. (WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex): Added.
  21976. (WebInspector.TextEditor.prototype._rangeOfVisibleTextChunks): Added.
  21977. (WebInspector.TextEditor.prototype._lastLineNumberOfLastVisibleTextChunk): Added.
  21978. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  21979. Add WebInspector.TextEditor which is the view for WebInspector.TextContent.
  21980. Right now it only shows plain-text. In the end it will support syntax highlighting and editing.
  21981. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  21982. Reviewed by Joseph Pecoraro.
  21983. * UserInterface/TextEditor.css: Added.
  21984. (.text-editor):
  21985. (.text-editor > .content-container):
  21986. (.text-editor > .content-container > .content):
  21987. * UserInterface/TextEditor.js: Added.
  21988. (WebInspector.TextEditor):
  21989. (WebInspector.TextEditor.prototype.get element):
  21990. (WebInspector.TextEditor.prototype.get textContent):
  21991. (WebInspector.TextEditor.prototype.set textContent):
  21992. (WebInspector.TextEditor.prototype.get string):
  21993. (WebInspector.TextEditor.prototype.set string):
  21994. (WebInspector.TextEditor.prototype._reset):
  21995. (WebInspector.TextEditorTextChunk):
  21996. (WebInspector.TextEditorTextChunk.prototype.constructor.WebInspector.TextEditorChunk.get element):
  21997. (WebInspector.TextEditorTextChunk.prototype.get firstLineNumber):
  21998. (WebInspector.TextEditorTextChunk.prototype.get lastLineNumber):
  21999. (WebInspector.TextEditorTextChunk.prototype.get numberOfLines):
  22000. (WebInspector.TextEditorTextChunk.prototype.get offsetTop):
  22001. (WebInspector.TextEditorTextChunk.prototype.updateContent):
  22002. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22003. Add WebInspector.SyntaxHighlighter which uses SourceTokenizer, TextContent and AttributedString.
  22004. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22005. Reviewed by Joseph Pecoraro.
  22006. * UserInterface/SyntaxHighlighter.js: Added.
  22007. (WebInspector.SyntaxHighlighter):
  22008. (WebInspector.SyntaxHighlighter.prototype.get textContent):
  22009. (WebInspector.SyntaxHighlighter.prototype.set textContent):
  22010. (WebInspector.SyntaxHighlighter.prototype.get mimeType):
  22011. (WebInspector.SyntaxHighlighter.prototype.set mimeType):
  22012. (WebInspector.SyntaxHighlighter.prototype.invalidate):
  22013. (WebInspector.SyntaxHighlighter.prototype.isHighlighting):
  22014. (WebInspector.SyntaxHighlighter.prototype.synchronousHighlight):
  22015. (WebInspector.SyntaxHighlighter.prototype.startHighlighting):
  22016. (WebInspector.SyntaxHighlighter.prototype.stopHighlighting):
  22017. (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk):
  22018. (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk.copyState):
  22019. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22020. Add WebInspector.TextContent which will be used for multi-line text, like resources.
  22021. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22022. Reviewed by Joseph Pecoraro.
  22023. * UserInterface/TextContent.js: Added.
  22024. (WebInspector.TextContent):
  22025. (WebInspector.TextContent.prototype.toString):
  22026. (WebInspector.TextContent.prototype.get string):
  22027. (WebInspector.TextContent.prototype.set string.createAttributedString):
  22028. (WebInspector.TextContent.prototype.set string):
  22029. (WebInspector.TextContent.prototype.get length):
  22030. (WebInspector.TextContent.prototype.get lineBreakString):
  22031. (WebInspector.TextContent.prototype.set lineBreakString):
  22032. (WebInspector.TextContent.prototype.get lines):
  22033. (WebInspector.TextContent.prototype.get numberOfLines):
  22034. (WebInspector.TextContent.prototype.line):
  22035. (WebInspector.TextContent.prototype.attributesForLine):
  22036. (WebInspector.TextContent.prototype.attributeForLine):
  22037. (WebInspector.TextContent.prototype.setAttributeForLine):
  22038. (WebInspector.TextContent.prototype.removeAttributeFromLine):
  22039. (WebInspector.TextContent.prototype.removeAttributesFromLine):
  22040. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22041. Add WebInspector.AttributedString which will be used for syntax highlighted text.
  22042. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22043. Reviewed by Joseph Pecoraro.
  22044. * UserInterface/AttributedString.js: Added.
  22045. (WebInspector.AttributedString):
  22046. (WebInspector.AttributedString.prototype.toString):
  22047. (WebInspector.AttributedString.prototype.get string):
  22048. (WebInspector.AttributedString.prototype.enumerateAttributes):
  22049. (WebInspector.AttributedString.prototype.enumerateAttribute):
  22050. (WebInspector.AttributedString.prototype.attributesAtOffset):
  22051. (WebInspector.AttributedString.prototype.attributeAtOffset):
  22052. (WebInspector.AttributedString.prototype.setAttribute):
  22053. (WebInspector.AttributedString.prototype.removeAttribute.processAttributes):
  22054. (WebInspector.AttributedString.prototype.removeAttribute):
  22055. (WebInspector.AttributedString.prototype.removeAttributes):
  22056. * UserInterface/Utilities.js:
  22057. (Object.shallowCopy): Added. Helper for making a new object with the same top-level properties.
  22058. (Object.shallowEqual): Added. Helper for checking if two objects have the same top-level properties.
  22059. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22060. Add tokenizers and support files needed for syntax highlighting.
  22061. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22062. Rubber-stamped by Joseph Pecoraro.
  22063. * UserInterface/CSSCompletions.js: Copied from WebCore/inspector/front-end/CSSCompletions.js.
  22064. * UserInterface/CSSKeywordCompletions.js: Copied from WebCore/inspector/front-end/CSSCompletions.js.
  22065. * UserInterface/CSSSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceCSSTokenizer.js.
  22066. * UserInterface/HTMLSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceHTMLTokenizer.js.
  22067. * UserInterface/JavaScriptSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceJavaScriptTokenizer.js.
  22068. * UserInterface/Utilities.js:
  22069. (Array.keySet): Added.
  22070. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22071. Add WebInspector.SourceTokenizer abstract base class.
  22072. This is the base class for HTMLSourceTokenizer, JavaScriptSourceTokenizer and CSSSourceTokenizer.
  22073. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22074. Reviewed by Jessie Berlin.
  22075. * UserInterface/SourceTokenizer.js: Added.
  22076. (WebInspector.SourceTokenizer):
  22077. (WebInspector.SourceTokenizer.prototype.initialize):
  22078. (WebInspector.SourceTokenizer.prototype.set line):
  22079. (WebInspector.SourceTokenizer.prototype.get condition):
  22080. (WebInspector.SourceTokenizer.prototype.set condition):
  22081. (WebInspector.SourceTokenizer.prototype.createInitialCondition):
  22082. (WebInspector.SourceTokenizer.prototype.nextToken):
  22083. (WebInspector.SourceTokenizer.prototype._charAt):
  22084. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22085. Remove the cached ContentView from the represented object when the ContentView is closed.
  22086. This allows the ContentView to be garbage collected if the represented object stays around.
  22087. Reviewed by Brian Weinstein.
  22088. * UserInterface/ContentView.js:
  22089. (WebInspector.ContentView): Set _representedObject.
  22090. (WebInspector.ContentView.prototype.get representedObject): Added.
  22091. * UserInterface/ContentViewContainer.js:
  22092. (WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject):
  22093. (WebInspector.ContentViewContainer.prototype.showContentView): Use _disassociateFromContentView
  22094. (WebInspector.ContentViewContainer.prototype.replaceContentView): Ditto.
  22095. (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Ditto.
  22096. (WebInspector.ContentViewContainer.prototype.closeAllContentViews): Ditto.
  22097. (WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Added.
  22098. * UserInterface/ResourceContentView.js:
  22099. (WebInspector.ResourceContentView): Pass resource to ContentView as the representedObject.
  22100. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22101. Don't support creating a WebInspector.ResourceContentView from a WebInspector.Frame.
  22102. Since the main frame stays the same between navigations and ContentViewContainer caches
  22103. the ContentView on the Frame, the ContentView is not being recreated for the new page.
  22104. Reviewed by Brian Weinstein.
  22105. * UserInterface/ContentView.js:
  22106. (WebInspector.ContentView): Remove the check for WebInspector.Frame as a representedObject.
  22107. * UserInterface/ResourceSidebarPanel.js:
  22108. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Select the
  22109. main resource of the main frame.
  22110. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Pass the resource.
  22111. 2011-12-16 Timothy Hatcher <timothy@apple.com>
  22112. Mark the main resource of frames as finished when the resource tree is pulled the first time.
  22113. Also delay marking resources as finished until they have a parent frame.
  22114. This is needed to show content for a selected frame, otherwise the content view is blank.
  22115. Reviewed by Brian Weinstein.
  22116. * UserInterface/FrameResourceManager.js:
  22117. (WebInspector.FrameResourceManager.prototype._createFrame): Call markAsFinished on the mainResource.
  22118. (WebInspector.FrameResourceManager.prototype._createResource): Move the call to markAsFinished from here...
  22119. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): ...to here.
  22120. 2011-12-15 Brian Weinstein <bweinstein@apple.com>
  22121. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22122. Add Database tables to the storage sidebar panel. When a database needs to be populated, we ask
  22123. for the database's table names asynchronously. In the callback we create DatabaseTableObjects
  22124. and DatabaseTableTreeElements for all of the table names that the database has, and add the
  22125. the DatabaseTableTreeElements as children of the DatabaseTreeElement.
  22126. Reviewed by Tim Hatcher.
  22127. * UserInterface/DatabaseObject.js:
  22128. (WebInspector.DatabaseObject.prototype.getTableNames): Calls into WebCore to get the database's table names,
  22129. and sorts them.
  22130. * UserInterface/DatabaseTableObject.js: Added.
  22131. (WebInspector.DatabaseTableObject):
  22132. (WebInspector.DatabaseTableObject.prototype.constructor.WebInspector.DatabaseTableObject.get name): Returns the name.
  22133. (WebInspector.DatabaseTableObject.prototype.get database): Returns the databaseObject.
  22134. * UserInterface/DatabaseTableTreeElement.js: Added.
  22135. (WebInspector.DatabaseTableTreeElement):
  22136. * UserInterface/DatabaseTreeElement.js:
  22137. (WebInspector.DatabaseTreeElement.prototype.constructor.WebInspector.DatabaseTreeElement.oncollapse): Set a flag so that we
  22138. repopulate the children when the tree element is re-expanded.
  22139. (WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback): Create DatabaseTableObjects and DatabaseTableTreeElements
  22140. for each of the table names.
  22141. (WebInspector.DatabaseTreeElement.prototype.onpopulate): Ask the DatabaseObject for its list of table names.
  22142. * UserInterface/Main.html: Add new files.
  22143. 2011-12-14 Brian Weinstein <bweinstein@apple.com>
  22144. Some cleanup after r39488.
  22145. Don't use FolderTreeElement's style in DatabaseHostTreeElement (because DatabaseHostTreeElement isn't a FolderTreeElement).
  22146. Instead, create a new css file and configure DatabaseHostTreeElement to show a folder.
  22147. Reviewed by Tim Hatcher.
  22148. * UserInterface/DatabaseHostTreeElement.css: Added.
  22149. (.database-host-tree-element .icon):
  22150. * UserInterface/DatabaseHostTreeElement.js:
  22151. (WebInspector.DatabaseHostTreeElement):
  22152. * UserInterface/Main.html:
  22153. 2011-12-13 Brian Weinstein <bweinstein@apple.com>
  22154. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22155. Add Databases to the storage sidebar panel. This patch adds two new classes of tree elements - a DatabaseHostTreeElement,
  22156. which represents a host that has at least one database, and a DatabaseTreeElement, which eventually will have tables.
  22157. We use the same collapsing logic for databases that we use for cookies and DOM Storage. With one domain,
  22158. it will say:
  22159. Database - Domain
  22160. Name 1
  22161. Name 2
  22162. With multiple domains, it will say:
  22163. Databases
  22164. Domain 1
  22165. Name 1
  22166. Name 2
  22167. Domain 2
  22168. Name 3
  22169. Name 4
  22170. Reviewed by Tim Hatcher.
  22171. * UserInterface/DatabaseObject.js: Added.
  22172. (WebInspector.DatabaseObject):
  22173. (WebInspector.DatabaseObject.prototype.constructor.WebInspector.DatabaseObject.get id): Returns the id.
  22174. (WebInspector.DatabaseObject.prototype.get host): Returns the host.
  22175. (WebInspector.DatabaseObject.prototype.get name): Returns the name.
  22176. (WebInspector.DatabaseObject.prototype.get version): Returns the version.
  22177. * UserInterface/DatabaseObserver.js:
  22178. (WebInspector.DatabaseObserver.prototype.constructor.WebInspector.DatabaseObserver.addDatabase): Tell the StorageManager
  22179. a database was added.
  22180. * UserInterface/DatabaseTreeElement.js: Added.
  22181. (WebInspector.DatabaseTreeElement):
  22182. (WebInspector.DatabaseTreeElement.prototype.constructor.WebInspector.DatabaseTreeElement.get name): Initialize the FolderTreeElement.
  22183. * UserInterface/DatabaseHostTreeElement.js: Added.
  22184. * UserInterface/Main.html:
  22185. * UserInterface/StorageManager.js:
  22186. (WebInspector.StorageManager):
  22187. (WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize): Initialize a list of databases.
  22188. (WebInspector.StorageManager.prototype.databaseWasAdded): Create a DatabaseObject and tell the StorageSidebarPanel we added
  22189. a database.
  22190. * UserInterface/StorageSidebarPanel.js:
  22191. (WebInspector.StorageSidebarPanel):
  22192. (WebInspector.StorageSidebarPanel.prototype._databaseWasAdded): Create a DatabaseTreeElement and add it to the sidebar.
  22193. (WebInspector.StorageSidebarPanel.prototype._storageCleared): Clear the root database tree element.
  22194. 2011-12-09 Brian Weinstein <bweinstein@apple.com>
  22195. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22196. Add Cookies to the Storage sidebar panel. Add a listener for when a cookie storage object is added,
  22197. and add it to the sidebar.
  22198. Reviewed by Tim Hatcher.
  22199. * UserInterface/StorageSidebarPanel.js:
  22200. (WebInspector.StorageSidebarPanel):
  22201. (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Remove some dead code.
  22202. (WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded): Add a child to the storage sidebar.
  22203. (WebInspector.StorageSidebarPanel.prototype._addChild): Change the class that we are expecting to a StorageTreeElement, because it can be
  22204. either a DOMStorageTreeElement or a CookieStorageTreeElement, but both are StorageTreeElements.
  22205. (WebInspector.StorageSidebarPanel.prototype._storageCleared):
  22206. 2011-12-09 Brian Weinstein <bweinstein@apple.com>
  22207. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22208. Add CookieStorageTreeElement, and refactor DOMStorageTreeElement into StorageTreeElement so the code to handle
  22209. flattening of the folders can be shared between CookieStorageTreeElement, DOMStorageTreeElement, and the others
  22210. that we will add in the future.
  22211. Reviewed by Tim Hatcher.
  22212. * UserInterface/CookieStorageTreeElement.js: Added.
  22213. (WebInspector.CookieStorageTreeElement): Call
  22214. (WebInspector.CookieStorageTreeElement.prototype.constructor.WebInspector.CookieStorageTreeElement.name): Return the host of the CookieStorageObject.
  22215. (WebInspector.CookieStorageTreeElement.prototype.category): Return "Cookies".
  22216. * UserInterface/DOMStorageTreeElement.js:
  22217. (WebInspector.DOMStorageTreeElement):
  22218. (WebInspector.DOMStorageTreeElement.prototype.constructor.WebInspector.DOMStorageTreeElement.name): Return the host of the DOMStorageObject.
  22219. (WebInspector.DOMStorageTreeElement.prototype.category): Return "Local Storage" or "Session Storage".
  22220. * UserInterface/Main.html: Add new files.
  22221. (WebInspector.StorageTreeElement):
  22222. (WebInspector.StorageTreeElement.prototype.constructor.WebInspector.StorageTreeElement.get flattened): Moved from DOMStorageTreeElement
  22223. and refactored to be more general.
  22224. (WebInspector.StorageTreeElement.prototype.set flattened): Ditto.
  22225. 2011-12-09 Brian Weinstein <bweinstein@apple.com>
  22226. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22227. Listen for when the main resource of any frame navigates, and add a cookie storage object for every
  22228. frame with a unique host. Any of these frames could have cookies, and we want to show them all.
  22229. Reviewed by Tim Hatcher.
  22230. * UserInterface/CookieStorageObject.js: Added.
  22231. (WebInspector.CookieStorageObject):
  22232. (WebInspector.CookieStorageObject.prototype.constructor.WebInspector.CookieStorageObject.get host):
  22233. * UserInterface/Main.html: Add a new source file.
  22234. * UserInterface/StorageManager.js:
  22235. (WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize):
  22236. (WebInspector.StorageManager.prototype._mainResourceDidChange): If any frame navigates, add create a cookie
  22237. storage object for the frame's host.
  22238. 2011-12-08 Brian Weinstein <bweinstein@apple.com>
  22239. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22240. Generate the local storage and session storage folders on demand. We don't show them in the tree until
  22241. a local storage or session storage object has been added, and if there is only one object, we flatten the
  22242. folder so it says:
  22243. Local Storage Ñ foo.com
  22244. If there is more than one object, we create a folder, and the structure will be:
  22245. Local Storage
  22246. foo.com
  22247. bar.com
  22248. Reviewed by Tim Hatcher and Joseph Pecoraro.
  22249. * UserInterface/DOMStorageTreeElement.js: Added.
  22250. (WebInspector.DOMStorageTreeElement): Create a GeneralTreeElement and set a few properties.
  22251. (WebInspector.DOMStorageTreeElement.prototype.constructor.WebInspector.DOMStorageTreeElement.set flattened):
  22252. * UserInterface/Main.html: Include a new script.
  22253. * UserInterface/StorageSidebarPanel.js:
  22254. (WebInspector.StorageSidebarPanel): Initialize _localStorageTreeElement and _sessionStorageTreeElement to null.
  22255. (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Call _addChild.
  22256. (WebInspector.StorageSidebarPanel.prototype._addChild): This object is responsible for setting up the hierarchy described above.
  22257. - If there is no current child, it tells the just added child that it is the only child, and will be displayed flattened.
  22258. - If the current child is a DOMStorageTreeElement, we create a folder and add the previous only child and the just added child
  22259. to the folder.
  22260. - If the current child is a folder, we append the just added child to the folder.
  22261. (WebInspector.StorageSidebarPanel.prototype._storageCleared):
  22262. 2011-12-07 Brian Weinstein <bweinstein@apple.com>
  22263. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22264. Clear the Local Storage and Session Storage folders when the main resource of the main frame changes. This means
  22265. that we are navigating to a new site, and we want to clear all of the storage folders.
  22266. Reviewed by Tim Hatcher and Joseph Pecoraro.
  22267. * UserInterface/StorageManager.js:
  22268. (WebInspector.StorageManager): Listen for MainResourceDidChange on all frames.
  22269. (WebInspector.StorageManager.prototype._mainResourceDidChange): If the main resource changed for the main frame, fire an
  22270. event saying storage was cleared.
  22271. * UserInterface/StorageSidebarPanel.js:
  22272. (WebInspector.StorageSidebarPanel):
  22273. (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded):
  22274. (WebInspector.StorageSidebarPanel.prototype._storageCleared): Remove the children from the local storage and session storage folders.
  22275. 2011-12-07 Brian Weinstein <bweinstein@apple.com>
  22276. More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22277. Add folders for Local Storage and Session Storage, and add children when DOMStorageObserver.addDOMStorage is called.
  22278. These items are never removed yet, we will need to listen for main frame navigation, and clear the folders, but
  22279. that will be done in a follow-up patch.
  22280. Reviewed by Tim Hatcher and Joseph Pecoraro.
  22281. * UserInterface/DOMStorageObject.js: Added.
  22282. (WebInspector.DOMStorageObject):
  22283. (WebInspector.DOMStorageObject.prototype.get id): Returns the id.
  22284. (WebInspector.DOMStorageObject.prototype.get domain): Returns the domain.
  22285. (WebInspector.DOMStorageObject.prototype.get isLocalStorage): Returns whether or not the DOM storage is local storage
  22286. (vs. session storage).
  22287. * UserInterface/DOMStorageObserver.js:
  22288. (WebInspector.DOMStorageObserver.prototype.constructor.WebInspector.DOMStorageObserver.addDOMStorage): Create a new DOMStorageObject
  22289. and tell the StorageManager about it.
  22290. * UserInterface/Main.html:
  22291. * UserInterface/Main.js:
  22292. (WebInspector.contentLoaded): Create the StorageManager.
  22293. * UserInterface/StorageManager.js: Added.
  22294. (WebInspector.StorageManager):
  22295. (WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize):
  22296. (WebInspector.StorageManager.prototype.addDOMStorage): Tell the StorageSidebarPanel we added a DOMStorageObject.
  22297. * UserInterface/StorageSidebarPanel.js:
  22298. (WebInspector.StorageSidebarPanel):
  22299. (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Add a child to either
  22300. local or session storage.
  22301. 2011-12-05 Brian Weinstein <bweinstein@apple.com>
  22302. Part of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
  22303. Add StorageSidebarPanel.js, and have it create a new NavigationSidebarPanel.
  22304. Reviewed by Tim Hatcher and Joseph Pecoraro.
  22305. * UserInterface/Main.html: Add the new js file.
  22306. * UserInterface/Main.js:
  22307. (WebInspector.contentLoaded): Call WebInspector.StorageSidebarPanel.
  22308. * UserInterface/StorageSidebarPanel.js: Added.
  22309. (WebInspector.StorageSidebarPanel):
  22310. 2011-12-06 Timothy Hatcher <timothy@apple.com>
  22311. Call WebInspector.Object.addConstructorFunctions on all the Web Inspector constructors that file events.
  22312. Reviewed by Joseph Pecoraro.
  22313. * UserInterface/FilterBar.js:
  22314. * UserInterface/Frame.js:
  22315. * UserInterface/FrameResourceManager.js:
  22316. * UserInterface/NavigationBar.js:
  22317. * UserInterface/Resource.js:
  22318. * UserInterface/Sidebar.js:
  22319. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22320. Add support for listening for events on constructors, which gets notified of events that fire
  22321. on any of the instances of that constructor.
  22322. This lets you do things like listen for navigation in any frame by doing:
  22323. WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, ...)
  22324. Reviewed by Joseph Pecoraro.
  22325. * UserInterface/Object.js:
  22326. (WebInspector.Object.addConstructorFunctions): Added. Copies the relevant functions
  22327. the subclass constructor.
  22328. (WebInspector.Object.addEventListener): Copied from WebInspector.Object.prototype.
  22329. (WebInspector.Object.removeEventListener): Ditto.
  22330. (WebInspector.Object.removeAllListeners): Ditto.
  22331. (WebInspector.Object.hasEventListeners): Ditto.
  22332. (WebInspector.Object.prototype.addEventListener): Set to WebInspector.Object version.
  22333. (WebInspector.Object.prototype.removeEventListener): Ditto.
  22334. (WebInspector.Object.prototype.removeAllListeners): Ditto.
  22335. (WebInspector.Object.prototype.hasEventListeners): Ditto.
  22336. (WebInspector.Object.prototype.dispatchEventToListeners): Dispatch to listeners of this specific object,
  22337. and to listeners interested in all instances of this object's constructor.
  22338. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22339. Use Object.defineProperty for our extensions in WebInspector/Utilities.js so they don't show
  22340. up when enumerating instances.
  22341. This patch has whitespace changes stripped, but the indentation is correct.
  22342. Reviewed by Ada Chan.
  22343. * UserInterface/Utilities.js:
  22344. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22345. Provide a direct way to ask if a WebInspector.Frame is the main frame.
  22346. This is only needed in one place right now, but in the future it will be needed in more places.
  22347. And checking !frame.parentFrame is not an accurate check if the frame is a detached subframe.
  22348. Reviewed by Ada Chan.
  22349. * UserInterface/Frame.js:
  22350. (WebInspector.Frame):
  22351. (WebInspector.Frame.prototype.isMainFrame): Added.
  22352. (WebInspector.Frame.prototype.markAsMainFrame): Added.
  22353. (WebInspector.Frame.prototype.unmarkAsMainFrame): Added.
  22354. * UserInterface/FrameResourceManager.js:
  22355. (WebInspector.FrameResourceManager.prototype.initialize): Call the renamed _mainFrameDidChange.
  22356. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Ditto.
  22357. (WebInspector.FrameResourceManager.prototype.frameDidDetach): Ditto.
  22358. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
  22359. (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload): Pass true for isMainFrame
  22360. when calling _addFrameTreeFromFrameResourceTreePayload.
  22361. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Call markAsMainFrame()
  22362. if isMainFrame is true.
  22363. (WebInspector.FrameResourceManager.prototype._mainFrameDidChange): Renamed from _dispatchMainFrameDidChangeEvent
  22364. and now calls unmarkAsMainFrame and markAsMainFrame.
  22365. * UserInterface/ResourceTreeElement.js:
  22366. (WebInspector.ResourceTreeElement.prototype._updateTitles): Use isMainFrame().
  22367. 2011-12-04 Timothy Hatcher <timothy@apple.com>
  22368. Implement WebInspector.FontResourceContentView.
  22369. The font preview includes horizontal lines showing the top, bottom, middle and baseline CSS alignments.
  22370. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22371. Reviewed by Joseph Pecoraro.
  22372. * UserInterface/FontResourceContentView.css: Added.
  22373. (.content-view.resource.font):
  22374. (.content-view.resource.font .preview):
  22375. (.content-view.resource.font .preview > .line):
  22376. (.content-view.resource.font .preview > .line > .content):
  22377. (.content-view.resource.font .preview > .line > .metric):
  22378. (.content-view.resource.font .metric.top):
  22379. (.content-view.resource.font .metric.baseline):
  22380. (.content-view.resource.font .metric.middle):
  22381. (.content-view.resource.font .metric.bottom):
  22382. * UserInterface/FontResourceContentView.js:
  22383. (WebInspector.FontResourceContentView):
  22384. (WebInspector.FontResourceContentView.prototype.get previewElement):
  22385. (WebInspector.FontResourceContentView.prototype.sizeToFit): Start at the maximum size and try each
  22386. font size until minimum is reached. Stop when the preview element is not as wide as the main element.
  22387. (WebInspector.FontResourceContentView.prototype.contentAvailable.createMetricElement): Helper function.
  22388. (WebInspector.FontResourceContentView.prototype.contentAvailable): Create the elements for the preview.
  22389. (WebInspector.FontResourceContentView.prototype.shown): Add the style element since it is removed when hidden.
  22390. (WebInspector.FontResourceContentView.prototype.hidden): Remove the style element so it will not stick around
  22391. when this content view is destroyed.
  22392. * UserInterface/Main.html: Included FontResourceContentView.css.
  22393. 2011-12-03 Timothy Hatcher <timothy@apple.com>
  22394. Implement WebInspector.ImageResourceContentView.
  22395. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22396. Reviewed by Joseph Pecoraro.
  22397. * UserInterface/ImageResourceContentView.css: Added.
  22398. (.content-view.resource.image): Vertically and horizontally center the image.
  22399. (.content-view.resource.image img): Set max width to 100% and allow dragging.
  22400. * UserInterface/ImageResourceContentView.js:
  22401. (WebInspector.ImageResourceContentView): Initialize _imageElement to null.
  22402. (WebInspector.ImageResourceContentView.prototype.get imageElement): Added.
  22403. (WebInspector.ImageResourceContentView.prototype.contentAvailable): Added. Create and append the _imageElement.
  22404. * UserInterface/Main.html: Included ImageResourceContentView.css.
  22405. * UserInterface/Resource.js:
  22406. (WebInspector.Resource.prototype.get contentURL): Added. Create a data URL if possible.
  22407. * UserInterface/ResourceContentView.js:
  22408. (WebInspector.ResourceContentView): Call requestContent.
  22409. (WebInspector.ResourceContentView.prototype.contentAvailable): Added. Implemented by subclasses.
  22410. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22411. Select the main resource when opening the Web Inspector and when the inspected page navigates.
  22412. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22413. Reviewed by Joseph Pecoraro.
  22414. * UserInterface/ResourceSidebarPanel.js:
  22415. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Select and expand the main
  22416. resource so something is selected by default.
  22417. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Select the main
  22418. resource since there are no other resources now.
  22419. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22420. Close all resource content views when the inspected page navigates in the main frame.
  22421. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22422. Reviewed by Joseph Pecoraro.
  22423. * UserInterface/ContentViewContainer.js:
  22424. (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Added.
  22425. (WebInspector.ContentViewContainer.prototype.closeAllContentViews): Added.
  22426. * UserInterface/ResourceSidebarPanel.js:
  22427. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Remove an event listener from
  22428. the old frame and add an event listener for MainResourceDidChange on the new frame.
  22429. (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Added. Call
  22430. closeAllContentViewsOfPrototype with WebInspector.ResourceContentView on the main content container.
  22431. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22432. Make selecting a resource in the Resources sidebar show the content view for that resource.
  22433. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22434. Reviewed by Joseph Pecoraro.
  22435. * UserInterface/ContentViewContainer.js:
  22436. (WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject): Added.
  22437. (WebInspector.ContentViewContainer.prototype.showContentViewForRepresentedObject): Added.
  22438. * UserInterface/ResourceSidebarPanel.js:
  22439. (WebInspector.ResourceSidebarPanel): Set onselect to _treeElementSelected.
  22440. (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Added. Call showContentViewForRepresentedObject
  22441. on the main content container.
  22442. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22443. Add support for knowing when a TreeElement is selected/deselected in a TreeOutline.
  22444. There is already TreeElement.onselect which has been used in the past,
  22445. but having a tree-wide notification of selection changes makes it easier
  22446. to implement certain things.
  22447. Reviewed by Joseph Pecoraro.
  22448. * UserInterface/TreeOutline.js:
  22449. (TreeElement.prototype.select): Call onselect on the TreeOutline if it exists.
  22450. (TreeElement.prototype.deselect): Call ondeselect on the TreeOutline if it exists.
  22451. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22452. Support resource type changes by making a new ResourceContentView and replacing the old one.
  22453. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22454. Reviewed by Joseph Pecoraro.
  22455. * UserInterface/ContentViewContainer.js:
  22456. (WebInspector.ContentViewContainer.prototype.replaceContentView): Added. Find all instances of the old one
  22457. and replace it with the new one.
  22458. * UserInterface/ResourceContentView.js:
  22459. (WebInspector.ResourceContentView): Add event listener for TypeDidChange.
  22460. (WebInspector.ResourceContentView.prototype._resourceTypeDidChange): Added. Make a new ResourceContentView
  22461. which will use the new resource type to make the correct concrete ResourceContentView subclass.
  22462. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22463. Add the "constructor" property to all prototypes in the Web Inspector.
  22464. While working on a change that requires the constructor, I found it was always Object.
  22465. This is because (thanks Gavin) the "constructor" property is added at runtime during
  22466. the first lookup of the "prototype" property slot. But when "prototype" is assigned,
  22467. like we do in the Web Inspector, the "constructor" property isn't present.
  22468. Reviewed by John Sullivan.
  22469. * UserInterface/ApplicationCacheObserver.js:
  22470. * UserInterface/ConsoleObserver.js:
  22471. * UserInterface/ContentView.js:
  22472. * UserInterface/ContentViewContainer.js:
  22473. * UserInterface/DOMObserver.js:
  22474. * UserInterface/DOMStorageObserver.js:
  22475. * UserInterface/DatabaseObserver.js:
  22476. * UserInterface/DebuggerObserver.js:
  22477. * UserInterface/FilterBar.js:
  22478. * UserInterface/FolderTreeElement.js:
  22479. * UserInterface/FontResourceContentView.js:
  22480. * UserInterface/Frame.js:
  22481. * UserInterface/FrameResourceManager.js:
  22482. * UserInterface/FrameTreeElement.js:
  22483. * UserInterface/GeneralTreeElement.js:
  22484. * UserInterface/GenericResourceContentView.js:
  22485. * UserInterface/ImageResourceContentView.js:
  22486. * UserInterface/InspectorObserver.js:
  22487. * UserInterface/NavigationBar.js:
  22488. * UserInterface/NavigationSidebarPanel.js:
  22489. * UserInterface/NetworkObserver.js:
  22490. * UserInterface/Object.js:
  22491. * UserInterface/PageObserver.js:
  22492. * UserInterface/Resource.js:
  22493. * UserInterface/ResourceCollection.js:
  22494. * UserInterface/ResourceContentView.js:
  22495. * UserInterface/ResourceSidebarPanel.js:
  22496. * UserInterface/ResourceTreeElement.js:
  22497. * UserInterface/Sidebar.js:
  22498. * UserInterface/TextResourceContentView.js:
  22499. * UserInterface/TreeOutline.js:
  22500. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22501. And WebInspector.ResourceContentView and concrete subclasses for Text, Image and Font resources.
  22502. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22503. Reviewed by Joseph Pecoraro.
  22504. * UserInterface/ContentView.js:
  22505. (WebInspector.ContentView): Create ResourceContentViews for Resources and Frames.
  22506. * UserInterface/FontResourceContentView.js: Added.
  22507. (WebInspector.FontResourceContentView):
  22508. * UserInterface/GenericResourceContentView.js: Added.
  22509. (WebInspector.GenericResourceContentView):
  22510. * UserInterface/ImageResourceContentView.js: Added.
  22511. (WebInspector.ImageResourceContentView):
  22512. * UserInterface/Main.html: Included new files.
  22513. * UserInterface/ResourceContentView.js: Added.
  22514. (WebInspector.ResourceContentView): When instantiated directly return an instance of a type-based concrete subclass.
  22515. (WebInspector.ResourceContentView.prototype.get resource):
  22516. * UserInterface/TextResourceContentView.js: Added.
  22517. (WebInspector.TextResourceContentView):
  22518. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22519. Add back/forward support to WebInspector.ContentViewContainer.
  22520. Reviewed by Joseph Pecoraro.
  22521. * UserInterface/ContentViewContainer.js:
  22522. (WebInspector.ContentViewContainer): Initialize _backForwardList and _currentIndex.
  22523. (WebInspector.ContentViewContainer.prototype.get currentIndex): Added.
  22524. (WebInspector.ContentViewContainer.prototype.get backForwardList): Added.
  22525. (WebInspector.ContentViewContainer.prototype.get currentContentView): Use _backForwardList and _currentIndex.
  22526. (WebInspector.ContentViewContainer.prototype.showContentView): Insert the content view at the new current index.
  22527. This will remove any content views greater than or equal to the index. Call showBackForwardEntry for the index.
  22528. (WebInspector.ContentViewContainer.prototype.showBackForwardEntry): Added.
  22529. (WebInspector.ContentViewContainer.prototype.canGoBack): Added.
  22530. (WebInspector.ContentViewContainer.prototype.canGoForward): Added.
  22531. (WebInspector.ContentViewContainer.prototype.goBack): Added.
  22532. (WebInspector.ContentViewContainer.prototype.goForward): Added.
  22533. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22534. Add WebInspector.ContentView and WebInspector.ContentViewContainer.
  22535. These classes will be used to display content for resources and other data.
  22536. Reviewed by Joseph Pecoraro.
  22537. * UserInterface/ContentView.js: Added.
  22538. (WebInspector.ContentView):
  22539. (WebInspector.ContentView.prototype.get element):
  22540. (WebInspector.ContentView.prototype.get parentContainer):
  22541. (WebInspector.ContentView.prototype.get visible):
  22542. (WebInspector.ContentView.prototype.set visible):
  22543. (WebInspector.ContentView.prototype.shown):
  22544. (WebInspector.ContentView.prototype.hidden):
  22545. * UserInterface/ContentViewContainer.css: Added.
  22546. (.content-view-container): Display relative to allow positioned content.
  22547. (.content-view-container > .content-view): Position to fill the container.
  22548. (.content-view-container > .content-view:not(.visible)): Display none.
  22549. * UserInterface/ContentViewContainer.js: Added.
  22550. (WebInspector.ContentViewContainer):
  22551. (WebInspector.ContentViewContainer.prototype.get element):
  22552. (WebInspector.ContentViewContainer.prototype.get currentContentView):
  22553. (WebInspector.ContentViewContainer.prototype.showContentView):
  22554. (WebInspector.ContentViewContainer.prototype._addContentViewElement):
  22555. (WebInspector.ContentViewContainer.prototype._removeContentViewElement):
  22556. (WebInspector.ContentViewContainer.prototype._showContentView):
  22557. (WebInspector.ContentViewContainer.prototype._hideContentView):
  22558. * UserInterface/Main.css:
  22559. (#content-views): Renamed from #content-panels.
  22560. * UserInterface/Main.html: Included ContentViewContainer.js and ContentViewContainer.css. Also renamed
  22561. content-panels to content-views.
  22562. * UserInterface/Main.js:
  22563. (WebInspector.contentLoaded): Create an instance of ContentViewContainer that uses the #content-views div.
  22564. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22565. Add support for getting the content of a resource in preparation for showing that content.
  22566. Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
  22567. Reviewed by Joseph Pecoraro.
  22568. * UserInterface/Resource.js:
  22569. (WebInspector.Resource): Initialize _content, _pendingContentRequestCallbacks and _contentIsBase64Encoded.
  22570. (WebInspector.Resource.prototype.get content): Added.
  22571. (WebInspector.Resource.prototype.get contentIsBase64Encoded): Added.
  22572. (WebInspector.Resource.prototype.requestContent): Added. Queues the callback and requests the content if needed.
  22573. (WebInspector.Resource.prototype.markAsFinished): Call _requestContentFromBackend if there are pending requests.
  22574. (WebInspector.Resource.prototype.markAsFailed): Call _servicePendingContentRequests.
  22575. (WebInspector.Resource.prototype._requestContentFromBackend): Added. Use the NetworkPageAgent depending on if
  22576. we have a requestIdentifier for this Resource.
  22577. (WebInspector.Resource.prototype._processContent): Added. Store the content and call _servicePendingContentRequests.
  22578. (WebInspector.Resource.prototype._servicePendingContentRequests): Added. Call all the pending callbacks with the content.
  22579. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22580. Mark resources loaded from the memory cache as finished in the Web Inspector so their content can be requested.
  22581. Reviewed by Joseph Pecoraro.
  22582. * UserInterface/FrameResourceManager.js:
  22583. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Call markAsFinished.
  22584. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22585. Add requestIdentifier to WebInspector.Resource.
  22586. The requestIdentifier will be needed for getting the resource content from the backend.
  22587. Reviewed by Joseph Pecoraro.
  22588. * UserInterface/FrameResourceManager.js:
  22589. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Pass null for the requestIdentifier.
  22590. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass the requestIdentifier.
  22591. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Ditto.
  22592. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
  22593. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added requestIdentifier parameter.
  22594. (WebInspector.FrameResourceManager.prototype._createFrame): Pass null for requestIdentifier.
  22595. (WebInspector.FrameResourceManager.prototype._createResource): Ditto.
  22596. * UserInterface/Resource.js:
  22597. (WebInspector.Resource): Added requestIdentifier parameter.
  22598. (WebInspector.Resource.prototype.get requestIdentifier): Added.
  22599. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22600. Override the cursor to prevent the I-beam over various text UI elements in the Web Inspector.
  22601. Reviewed by Dan Bernstein.
  22602. * UserInterface/Main.css:
  22603. (body): Set cursor to default.
  22604. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22605. Call preventDefault and stopPropagation in various event listeners in the Web Inspector.
  22606. This prevents text selection while dragging the sidebar resizer or scrubbing a navigation bar.
  22607. It also prevents text selection when double clicking the sidebar resizer.
  22608. Reviewed by Dan Bernstein.
  22609. * UserInterface/NavigationBar.js:
  22610. (WebInspector.NavigationBar.prototype._mouseDown):
  22611. (WebInspector.NavigationBar.prototype._mouseMoved):
  22612. (WebInspector.NavigationBar.prototype._mouseUp):
  22613. (WebInspector.NavigationBar.prototype._keyDown):
  22614. * UserInterface/Sidebar.js:
  22615. (WebInspector.Sidebar.prototype._resizerDoubleClicked):
  22616. (WebInspector.Sidebar.prototype._resizerMouseDown):
  22617. (WebInspector.Sidebar.prototype._resizerMouseMoved):
  22618. (WebInspector.Sidebar.prototype._resizerMouseUp):
  22619. 2011-12-05 Timothy Hatcher <timothy@apple.com>
  22620. Add a build phase copy of InspectorBackend.js from WebCore and rename the
  22621. InspectorBackendStub.js copied file to InspectorBackendCommands.js.
  22622. The InspectorBackend.js file split out of the generated InspectorBackendStub.js
  22623. in r101670, and both files are needed to be useful.
  22624. Reviewed by Joseph Pecoraro.
  22625. * UserInterface/Main.html: Include InspectorBackendCommands.js.
  22626. * WebInspectorUI.xcodeproj/project.pbxproj: Update the WebCore Inspector Resources build pahse.
  22627. 2011-11-29 Timothy Hatcher <timothy@apple.com>
  22628. Add WebInspector.ResourceCollection to simplify parts of WebInspector.Frame.
  22629. The ResourceCollection class tracks resources it holds for URL and type changes
  22630. and updates internal mappings accordingly.
  22631. Reviewed by Joseph Pecoraro.
  22632. * UserInterface/Frame.js:
  22633. (WebInspector.Frame): Create a ResourceCollection instead of multiple arrays/maps.
  22634. (WebInspector.Frame.prototype.initialize): Call clearProvisionalLoad before the main
  22635. resource did change event.
  22636. (WebInspector.Frame.prototype.startProvisionalLoad): Create a provisional ResourceCollection.
  22637. (WebInspector.Frame.prototype.commitProvisionalLoad): Commit the provisional ResourceCollection.
  22638. Added an early return to prevent exceptions if this is called when there isn't provisional load.
  22639. (WebInspector.Frame.prototype.clearProvisionalLoad): Added an early return and clear the ResourceCollection.
  22640. (WebInspector.Frame.prototype.get resources): Use ResourceCollection.
  22641. (WebInspector.Frame.prototype.resourceForURL): Ditto.
  22642. (WebInspector.Frame.prototype.resourcesWithType): Ditto.
  22643. (WebInspector.Frame.prototype.addResource): Moved the add code from _associateWithResource and use the
  22644. new _isProvisionalResource function to check which ResourceCollection to add the resource to.
  22645. (WebInspector.Frame.prototype.removeResource): Use ResourceCollection.
  22646. (WebInspector.Frame.prototype.removeAllResources): Ditto.
  22647. (WebInspector.Frame.prototype._isProvisionalResource): Added.
  22648. (WebInspector.Frame.prototype._associateWithResource): Only set _childFrame.
  22649. (WebInspector.Frame.prototype._disassociateWithResource): Only clear _childFrame.
  22650. * UserInterface/Main.html: Included ResourceCollection.js.
  22651. * UserInterface/ResourceCollection.js: Added. Broken out of Frame.js.
  22652. (WebInspector.ResourceCollection):
  22653. (WebInspector.ResourceCollection.prototype.get resources):
  22654. (WebInspector.ResourceCollection.prototype.resourceForURL):
  22655. (WebInspector.ResourceCollection.prototype.resourcesWithType):
  22656. (WebInspector.ResourceCollection.prototype.addResource):
  22657. (WebInspector.ResourceCollection.prototype.removeResource):
  22658. (WebInspector.ResourceCollection.prototype.removeAllResources):
  22659. (WebInspector.ResourceCollection.prototype._associateWithResource):
  22660. (WebInspector.ResourceCollection.prototype._disassociateWithResource):
  22661. (WebInspector.ResourceCollection.prototype._resourceURLDidChange):
  22662. (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
  22663. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22664. Improve glob filtering in the Resources sidebar of the new Web Inspector.
  22665. Match edge boundaries when there is an asterisk to better meet the expectations
  22666. of the user. When someone types "*.js" they don't expect "foo.json" to match. They
  22667. would only expect that if they type "*.js*". We use \b (instead of ^ and $) to allow
  22668. matches inside paths or URLs, so "ba*.js" will match "foo/bar.js" but not "boo/bbar.js".
  22669. When there isn't an asterisk the regexString is just a substring search. Also properly
  22670. ignore escaped asterisks and collapse consecutive asterisks down to one.
  22671. Reviewed by Joseph Pecoraro.
  22672. * UserInterface/Utilities.js:
  22673. (simpleGlobStringToRegExp):
  22674. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22675. Show a message in the sidebar when it is empty because there are no filter matches.
  22676. Reviewed by Brian Weinstein.
  22677. * UserInterface/NavigationSidebarPanel.css:
  22678. (.sidebar > .panel.navigation > .content.hidden): Added.
  22679. (.sidebar > .panel.navigation > .empty-content-placeholder): Added.
  22680. (.sidebar > .panel.navigation > .empty-content-placeholder > .message): Added.
  22681. * UserInterface/NavigationSidebarPanel.js:
  22682. (WebInspector.NavigationSidebarPanel): Create the empty content placeholder elements.
  22683. (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): Set the message and add the element.
  22684. (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder): Remove the element.
  22685. (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Added. Check for hidden top level elements.
  22686. (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Call _checkForEmptyFilterResults.
  22687. (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Ditto.
  22688. * UserInterface/Sidebar.css:
  22689. (.sidebar > .panel): Make overflow hidden so when the sidebar is collapsed the empty placeholder doesn't stick out.
  22690. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22691. Add text filtering support to WebInspector.NavigationSidebarPanel.
  22692. This makes it so you can filter the resource list, matching against the URLs.
  22693. Reviewed by Brian Weinstein.
  22694. * UserInterface/FilterBar.js:
  22695. (WebInspector.FilterBar): Add an search event listener and set incremental to true.
  22696. (WebInspector.FilterBar.prototype.get filters): Added.
  22697. (WebInspector.FilterBar.prototype.hasActiveFilters): Added.
  22698. (WebInspector.FilterBar.prototype._inputFieldChanged): Added. Dispatch the TextFilterDidChange event.
  22699. * UserInterface/GeneralTreeElement.js:
  22700. (WebInspector.GeneralTreeElement.prototype.set mainTitle): Call didChange.
  22701. (WebInspector.GeneralTreeElement.prototype.set subtitle): Ditto.
  22702. (WebInspector.GeneralTreeElement.prototype.get filterableData): Added. Returns the URL.
  22703. * UserInterface/NavigationSidebarPanel.css:
  22704. (.navigation-sidebar-panel-content-tree-outline .hidden): Added.
  22705. * UserInterface/NavigationSidebarPanel.js:
  22706. (WebInspector.NavigationSidebarPanel): Set onadd and onchange on the TreeOutline. Listen for
  22707. the TextFilterDidChange event.
  22708. (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement): Added.
  22709. (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter): Added.
  22710. (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.makeVisible): Added.
  22711. (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Added. Call applyFiltersToTreeElement.
  22712. (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Added. Call applyFiltersToTreeElement.
  22713. * UserInterface/Utilities.js:
  22714. (String.prototype.escapeCharacters): Copied from WebCore/inspector/front-end/utilities.js.
  22715. (String.prototype.escapeForRegExp): Copied from WebCore/inspector/front-end/utilities.js.
  22716. (simpleGlobStringToRegExp): Added.
  22717. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22718. Add WebInspector.FilterBar to be used in navigation sidebar panels.
  22719. The filter bar only contains a specially styled search field in this change.
  22720. It does not actually filter the sidebar yet.
  22721. Reviewed by Brian Weinstein.
  22722. * UserInterface/FilterBar.css: Added.
  22723. (.filter-bar): Styled like the filter bar in Xcode 4.
  22724. (.filter-bar > input[type="search"]): Set the margins and prevent an outline on focus.
  22725. (.filter-bar > input[type="search"]::-webkit-search-decoration): Replace the search
  22726. magnifying glass with the filter glyph.
  22727. * UserInterface/FilterBar.js: Added.
  22728. (WebInspector.FilterBar):
  22729. (WebInspector.FilterBar.prototype.get element):
  22730. (WebInspector.FilterBar.prototype.get inputField):
  22731. * UserInterface/Images/FilterFieldGlyph.pdf: Added.
  22732. * UserInterface/Main.html: Included FilterBar.js and FilterBar.css.
  22733. * UserInterface/NavigationSidebarPanel.css:
  22734. (.sidebar > .panel.navigation > .filter-bar): Position at the bottom.
  22735. * UserInterface/NavigationSidebarPanel.js:
  22736. (WebInspector.NavigationSidebarPanel): Create a FilterBar.
  22737. (WebInspector.NavigationSidebarPanel.prototype.get filterBar): Added.
  22738. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22739. Handle getting a resource load responce without getting the request first.
  22740. If the Web Inspector is opened while loading a page we can miss the resourceRequestWillBeSent call.
  22741. In that case we might get a respose but not know the resource yet, so make a new resource and add it.
  22742. Reviewed by Anders Carlsson.
  22743. * UserInterface/FrameResourceManager.js:
  22744. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Make a new resource if
  22745. one isn't found in the request identifier map.
  22746. * UserInterface/NetworkObserver.js:
  22747. (WebInspector.NetworkObserver.prototype.responseReceived): Pass the frameId and loaderId along.
  22748. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22749. Store the request and response headers on WebInspector.Resource.
  22750. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22751. Reviewed by Anders Carlsson.
  22752. * UserInterface/FrameResourceManager.js:
  22753. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Pass null for the requestHeaders in a couple of places.
  22754. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass the requestHeaders along.
  22755. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null for the requestHeaders.
  22756. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Pass the responseHeaders along to updateForResponse.
  22757. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added an argument for requestHeaders.
  22758. (WebInspector.FrameResourceManager.prototype._createFrame): Pass null for the requestHeaders.
  22759. (WebInspector.FrameResourceManager.prototype._createResource): Ditto.
  22760. * UserInterface/Resource.js:
  22761. (WebInspector.Resource): Added requestHeaders argument.
  22762. (WebInspector.Resource.prototype.get requestHeaders): Added.
  22763. (WebInspector.Resource.prototype.get responseHeaders): Added.
  22764. (WebInspector.Resource.prototype.updateForResponse): Added responseHeaders argument and fire the ResponseHeadersDidChange event.
  22765. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22766. Keep track of failed, canceled and finished resources in the Web Inspector.
  22767. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22768. Reviewed by Joseph Pecoraro.
  22769. * UserInterface/FrameResourceManager.js:
  22770. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Call markAsFinished.
  22771. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Added canceled argument and call markAsFailed.
  22772. (WebInspector.FrameResourceManager.prototype._createResource): Call markAsFinished.
  22773. * UserInterface/NetworkObserver.js:
  22774. (WebInspector.NetworkObserver.prototype.loadingFailed): Pass along the canceled argument.
  22775. * UserInterface/Resource.js:
  22776. (WebInspector.Resource.prototype.get finished): Added.
  22777. (WebInspector.Resource.prototype.get failed): Added.
  22778. (WebInspector.Resource.prototype.get canceled): Added.
  22779. (WebInspector.Resource.prototype.updateForRedirectResponse): Added asserts that loading hasn't failed, finished or canceled.
  22780. (WebInspector.Resource.prototype.updateForResponse): Ditto.
  22781. (WebInspector.Resource.prototype.markAsFinished): Added.
  22782. (WebInspector.Resource.prototype.markAsFailed): Added.
  22783. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22784. Sort folders by name, resources by type and name in the Web Inspector sidebar.
  22785. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22786. Reviewed by Joseph Pecoraro.
  22787. * UserInterface/FrameTreeElement.js:
  22788. (WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementTypeDidChange): Remove the check for _groupedIntoFolders
  22789. since we sort by type in non-folder mode now. Updated the comment.
  22790. (WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementMainTitleDidChange): Added.
  22791. (WebInspector.FrameTreeElement.prototype._addTreeElement): Use _insertRootFolderTreeElement and _insertResourceTreeElement.
  22792. (WebInspector.FrameTreeElement.prototype._compareTreeElementsByMainTitle): Added.
  22793. (WebInspector.FrameTreeElement.prototype._insertFolderTreeElement): Added.
  22794. (WebInspector.FrameTreeElement.prototype._compareResourceTreeElements): Added.
  22795. (WebInspector.FrameTreeElement.prototype._insertResourceTreeElement): Added.
  22796. * UserInterface/Main.html: Included BinarySearch.js.
  22797. * UserInterface/ResourceTreeElement.js:
  22798. (WebInspector.ResourceTreeElement.prototype._updateTitles): Call descendantResourceTreeElementMainTitleDidChange on the first ancestor
  22799. if the main title changed.
  22800. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22801. Queue new resources and frames to add them in bulk every half a second.
  22802. This reduces flashing in the Web Inspector sidebar as resources load and change folders as their type becomes known.
  22803. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22804. Reviewed by Joseph Pecoraro.
  22805. * UserInterface/FrameTreeElement.js:
  22806. (WebInspector.FrameTreeElement): Initialize _newChildQueue.
  22807. (WebInspector.FrameTreeElement.prototype.onpopulate): Call _clearNewChildQueue.
  22808. (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Ditto.
  22809. (WebInspector.FrameTreeElement.prototype._resourceWasAdded): Use _addRepresentedObjectToNewChildQueue.
  22810. (WebInspector.FrameTreeElement.prototype._childFrameWasAdded): Ditto.
  22811. (WebInspector.FrameTreeElement.prototype._addRepresentedObjectToNewChildQueue): Added. Adds the item to the queue and starts
  22812. a timer if one isn't already pending.
  22813. (WebInspector.FrameTreeElement.prototype._removeRepresentedObjectFromNewChildQueue): Added. Removes the item from the queue.
  22814. (WebInspector.FrameTreeElement.prototype._populateFromNewChildQueue): Added. Call _addChildForRepresentedObject
  22815. for each item in the queue.
  22816. (WebInspector.FrameTreeElement.prototype._clearNewChildQueue): Added. Clears the queue.
  22817. (WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Call _removeRepresentedObjectFromNewChildQueue.
  22818. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22819. Remember expanded frames when the main resource changes during navigation. Also auto expand the main frame.
  22820. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22821. Reviewed by Joseph Pecoraro.
  22822. * UserInterface/FrameTreeElement.js:
  22823. (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Remember if this tree element was expanded.
  22824. (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Expand if needed.
  22825. * UserInterface/ResourceSidebarPanel.js:
  22826. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Expand when the main frame is created.
  22827. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22828. Group resources into folders once certain resource count thresholds are met.
  22829. Resources and Frames are grouped into folders if one of two thresholds are met:
  22830. 1) Once the number of medium categories passes NumberOfMediumCategoriesThreshold.
  22831. 2) When there is a category that passes LargeChildCountThreshold and there are
  22832. any resources in another category.
  22833. Folders are avoided when there is only one category or most categories are small.
  22834. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22835. Reviewed by Joseph Pecoraro.
  22836. * UserInterface/FrameTreeElement.js:
  22837. (WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementTypeDidChange): Added. Called by ResourceTreeElement.
  22838. (WebInspector.FrameTreeElement.prototype.onpopulate): Call _shouldGroupIntoFolders and use _addTreeElement.
  22839. (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Reset _groupedIntoFolders to false.
  22840. (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Call _shouldGroupIntoFolders and use _addTreeElement.
  22841. (WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Remove the parent if it is an empty folder.
  22842. (WebInspector.FrameTreeElement.prototype._addTreeElement): Added. Adds the tree element to the right folder.
  22843. (WebInspector.FrameTreeElement.prototype._removeTreeElement): Added. Removes the tree element and empty folders.
  22844. (WebInspector.FrameTreeElement.prototype._folderNameForResourceType): Added.
  22845. (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject): Added. Make the folder tree element if needed.
  22846. (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders): Added. Calculates if folders are needed.
  22847. * UserInterface/ResourceTreeElement.js:
  22848. (WebInspector.ResourceTreeElement.prototype._typeDidChange): Use _callFirstAncestorFunction to call descendantResourceTreeElementTypeDidChange.
  22849. (WebInspector.ResourceTreeElement.prototype._callFirstAncestorFunction): Added. Call the first ancestor that implements a function.
  22850. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22851. Add WebInspector.FolderTreeElement to be used in navigation sidebar panels.
  22852. Reviewed by Brian Weinstein.
  22853. * UserInterface/FolderTreeElement.css: Added.
  22854. (.folder-tree-element .icon):
  22855. * UserInterface/FolderTreeElement.js: Added.
  22856. (WebInspector.FolderTreeElement):
  22857. * UserInterface/Images/FolderGeneric.png: Added.
  22858. * UserInterface/Images/FolderGeneric@2x.png: Added.
  22859. * UserInterface/Main.html: Included FolderTreeElement.css and FolderTreeElement.js.
  22860. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22861. Remember resources by type for each frame in the Web Inspector.
  22862. This will be used to organize the sidebar into folders for each type of resource.
  22863. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22864. Reviewed by Joseph Pecoraro.
  22865. * UserInterface/Frame.js:
  22866. (WebInspector.Frame): Initialize _resourcesTypeMap and _provisionalResourcesTypeMap.
  22867. (WebInspector.Frame.prototype.startProvisionalLoad): Initialize _provisionalResourcesURLMap.
  22868. (WebInspector.Frame.prototype.commitProvisionalLoad): Commit _provisionalResourcesURLMap over to _resourcesTypeMap.
  22869. (WebInspector.Frame.prototype.clearProvisionalLoad): Initialize _provisionalResourcesURLMap.
  22870. (WebInspector.Frame.prototype.resourcesWithType): Added. Lookup in _resourcesTypeMap.
  22871. (WebInspector.Frame.prototype.removeAllResources): Initialize _resourcesTypeMap.
  22872. (WebInspector.Frame.prototype._associateWithResource): Added resource to the type map.
  22873. (WebInspector.Frame.prototype._disassociateWithResource): Remove the resource from the type map.
  22874. (WebInspector.Frame.prototype._resourceTypeDidChange): Update the resource type map.
  22875. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22876. Add icons for document, image, font, style, script and generic resource types in the Web Inspector.
  22877. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22878. Reviewed by Joseph Pecoraro.
  22879. * UserInterface/Images/DocumentCSS.png: Added.
  22880. * UserInterface/Images/DocumentCSS@2x.png: Added.
  22881. * UserInterface/Images/DocumentFont.png: Added.
  22882. * UserInterface/Images/DocumentFont@2x.png: Added.
  22883. * UserInterface/Images/DocumentGeneric.png: Added.
  22884. * UserInterface/Images/DocumentGeneric@2x.png: Added.
  22885. * UserInterface/Images/DocumentImage.png: Added.
  22886. * UserInterface/Images/DocumentImage@2x.png: Added.
  22887. * UserInterface/Images/DocumentJS.png: Added.
  22888. * UserInterface/Images/DocumentJS@2x.png: Added.
  22889. * UserInterface/Images/DocumentMarkup.png: Added.
  22890. * UserInterface/Images/DocumentMarkup@2x.png: Added.
  22891. * UserInterface/Main.html: Included ResourceTreeElement.css.
  22892. * UserInterface/ResourceTreeElement.css: Added.
  22893. (.resource-tree-element .icon):
  22894. (.resource-tree-element.resource-type-document .icon):
  22895. (.resource-tree-element.resource-type-image .icon):
  22896. (.resource-tree-element.resource-type-stylesheet .icon):
  22897. (.resource-tree-element.resource-type-script .icon):
  22898. * UserInterface/ResourceTreeElement.js:
  22899. (WebInspector.ResourceTreeElement): Use the resource type as a class.
  22900. (WebInspector.ResourceTreeElement.prototype._updateResource): Added TypeDidChange event listener.
  22901. (WebInspector.ResourceTreeElement.prototype._typeDidChange): Added. Update the classNames with the new type.
  22902. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22903. Display the last path component instead of the full URL in the Web Inspector's Resource sidebar panel.
  22904. Show the host as the subtitle if it is different from the main resource or if this is the main frame's main resource.
  22905. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22906. Reviewed by Joseph Pecoraro.
  22907. * UserInterface/Resource.js:
  22908. (WebInspector.Resource.prototype.get urlComponents): Added. Calls parseURL if needed.
  22909. (WebInspector.Resource.prototype.updateForRedirectResponse): Delete the URL components so the URL is re-parsed the
  22910. next time it is requested.
  22911. (WebInspector.Resource.prototype.updateForResponse): Ditto.
  22912. * UserInterface/ResourceTreeElement.js:
  22913. (WebInspector.ResourceTreeElement.prototype._updateTitles): Set the mainTitle and subtitle based on the urlComponents.
  22914. * UserInterface/Utilities.js:
  22915. (parseURL): Added. Parses a URL into its components.
  22916. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22917. Populate the WebInspector's Resource sidebar panel with frame and resource tree elements.
  22918. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  22919. Reviewed by Joseph Pecoraro.
  22920. * UserInterface/FrameTreeElement.js: Added.
  22921. (WebInspector.FrameTreeElement): Set up event listeners.
  22922. (WebInspector.FrameTreeElement.prototype.get frame): Returns _frame.
  22923. (WebInspector.FrameTreeElement.prototype.onpopulate): Add child frames and resources.
  22924. (WebInspector.FrameTreeElement.prototype._updateParentStatus): Update hasChildren.
  22925. (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Update the resource and remove children.
  22926. (WebInspector.FrameTreeElement.prototype._resourceWasAdded): Call _addChildForRepresentedObject.
  22927. (WebInspector.FrameTreeElement.prototype._resourceWasRemoved): Call _removeChildForRepresentedObject.
  22928. (WebInspector.FrameTreeElement.prototype._childFrameWasAdded): Call _addChildForRepresentedObject.
  22929. (WebInspector.FrameTreeElement.prototype._childFrameWasRemoved): Call _removeChildForRepresentedObject.
  22930. (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Update parent status and append the new tree element.
  22931. (WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Update parent status and remove the tree element.
  22932. * UserInterface/Main.html: Include FrameTreeElement.js and ResourceTreeElement.js.
  22933. * UserInterface/ResourceSidebarPanel.js:
  22934. (WebInspector.ResourceSidebarPanel): Add MainFrameDidChange event listener.
  22935. (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Added.
  22936. * UserInterface/ResourceTreeElement.js: Added.
  22937. (WebInspector.ResourceTreeElement):
  22938. (WebInspector.ResourceTreeElement.prototype.get resource): Returns _resource.
  22939. (WebInspector.ResourceTreeElement.prototype._updateResource): Setup event listeners and update titles.
  22940. (WebInspector.ResourceTreeElement.prototype._updateTitles): Set the mainTitle to the URL for now.
  22941. (WebInspector.ResourceTreeElement.prototype._urlDidChange): Update the titles.
  22942. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22943. Add WebInspector.GeneralTreeElement to be used in navigation sidebar panels.
  22944. Reviewed by Joseph Pecoraro.
  22945. * UserInterface/GeneralTreeElement.js: Added.
  22946. (WebInspector.GeneralTreeElement):
  22947. (WebInspector.GeneralTreeElement.prototype.get element):
  22948. (WebInspector.GeneralTreeElement.prototype.get disclosureButton):
  22949. (WebInspector.GeneralTreeElement.prototype.get iconElement):
  22950. (WebInspector.GeneralTreeElement.prototype.get titlesElement):
  22951. (WebInspector.GeneralTreeElement.prototype.get mainTitleElement):
  22952. (WebInspector.GeneralTreeElement.prototype.get subtitleElement):
  22953. (WebInspector.GeneralTreeElement.prototype.get classNames):
  22954. (WebInspector.GeneralTreeElement.prototype.set classNames):
  22955. (WebInspector.GeneralTreeElement.prototype.get small):
  22956. (WebInspector.GeneralTreeElement.prototype.set small):
  22957. (WebInspector.GeneralTreeElement.prototype.get mainTitle):
  22958. (WebInspector.GeneralTreeElement.prototype.set mainTitle):
  22959. (WebInspector.GeneralTreeElement.prototype.get subtitle):
  22960. (WebInspector.GeneralTreeElement.prototype.set subtitle):
  22961. (WebInspector.GeneralTreeElement.prototype.isEventWithinDisclosureTriangle):
  22962. (WebInspector.GeneralTreeElement.prototype.onattach):
  22963. (WebInspector.GeneralTreeElement.prototype.onreveal):
  22964. (WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded):
  22965. (WebInspector.GeneralTreeElement.prototype._createSubtitleElementIfNeeded):
  22966. (WebInspector.GeneralTreeElement.prototype._updateTitleElements):
  22967. * UserInterface/Main.html: Add GeneralTreeElement.js.
  22968. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22969. Generate disclosure triangles from PDFs for the Web Inspector's navigation sidebar.
  22970. The disclosure triangles are a solid color plus a shadow for a normal and selected state.
  22971. Reviewed by Brian Weinstein.
  22972. * UserInterface/ImageUtilities.js: Added.
  22973. (generateColoredImage): Take an input image and fill the image with a color while preserving the alpha.
  22974. * UserInterface/Images/DisclosureTriangleSmallClosed.pdf: Added.
  22975. * UserInterface/Images/DisclosureTriangleSmallOpen.pdf: Added.
  22976. * UserInterface/Main.html: Added ImageUtilities.js.
  22977. * UserInterface/NavigationSidebarPanel.js:
  22978. (WebInspector.NavigationSidebarPanel): Call _generateDisclosureTrianglesIfNeeded.
  22979. (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Load the open and closed images.
  22980. (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded._disclosureImageLoaded): Call
  22981. _generateDisclosureTriangle for the normal and selected state with different colors for each.
  22982. (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded._generateDisclosureTriangle):
  22983. Fill the image with the color and draw it with the desired shadow.
  22984. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22985. Create a TreeOutline for WebInspector.NavigationSidebarPanel that is styled like Xcode 4's Project Navigator.
  22986. The disclosure triangle generation is not part of this change, they will come in a later change.
  22987. Reviewed by Brian Weinstein and Joseph Pecoraro.
  22988. * UserInterface/Main.html: Included TreeOutline.js.
  22989. * UserInterface/NavigationSidebarPanel.css: Style rules for .navigation-sidebar-panel-content-tree-outline
  22990. and decedent elements.
  22991. * UserInterface/NavigationSidebarPanel.js:
  22992. (WebInspector.NavigationSidebarPanel): Create the TreeOutline and its element. Call _generateStyleRulesIfNeeded.
  22993. (WebInspector.NavigationSidebarPanel.prototype.get contentElement): Added.
  22994. (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Added.
  22995. (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutline): Added.
  22996. (WebInspector.NavigationSidebarPanel.prototype._generateStyleRulesIfNeeded): Added. Make repetitive style rules for
  22997. 15 levels of indentation.
  22998. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  22999. Add WebInspector.NavigationSidebarPanel as a base class for all navigation
  23000. sidebar panels so they can share code for the content element and filter bar.
  23001. Only the content element is there now, the filter bar is coming later.
  23002. Reviewed by Dan Bernstein.
  23003. * UserInterface/Main.html: Add NavigationSidebarPanel.js and NavigationSidebarPanel.css.
  23004. * UserInterface/NavigationSidebarPanel.css: Added.
  23005. (.sidebar > .panel.navigation > .content): Account for 22px at the bottom for the future
  23006. filter bar height.
  23007. * UserInterface/NavigationSidebarPanel.js: Added.
  23008. (WebInspector.NavigationSidebarPanel):
  23009. (WebInspector.NavigationSidebarPanel.prototype.get contentElement):
  23010. * UserInterface/ResourceSidebarPanel.js:
  23011. (WebInspector.ResourceSidebarPanel): Inherit from NavigationSidebarPanel instead of SidebarPanel.
  23012. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23013. Add events to the Web Inspector for frame and resource changes.
  23014. These events will be used to keep the user interface up-to-date.
  23015. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  23016. Reviewed by Joseph Pecoraro.
  23017. * UserInterface/Frame.js:
  23018. (WebInspector.Frame.prototype.initialize):
  23019. (WebInspector.Frame.prototype.startProvisionalLoad):
  23020. (WebInspector.Frame.prototype.commitProvisionalLoad):
  23021. (WebInspector.Frame.prototype.clearProvisionalLoad):
  23022. (WebInspector.Frame.prototype.addChildFrame):
  23023. (WebInspector.Frame.prototype.removeChildFrame):
  23024. (WebInspector.Frame.prototype.removeAllChildFrames):
  23025. (WebInspector.Frame.prototype.addResource):
  23026. (WebInspector.Frame.prototype.removeResource):
  23027. (WebInspector.Frame.prototype.removeAllResources):
  23028. (WebInspector.Frame.prototype._resourceURLDidChange):
  23029. (WebInspector.Frame.prototype._dispatchMainResourceDidChangeEvent):
  23030. * UserInterface/FrameResourceManager.js:
  23031. (WebInspector.FrameResourceManager.prototype.initialize):
  23032. (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
  23033. (WebInspector.FrameResourceManager.prototype.frameDidDetach):
  23034. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
  23035. (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
  23036. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
  23037. (WebInspector.FrameResourceManager.prototype._dispatchFrameWasAddedEvent):
  23038. (WebInspector.FrameResourceManager.prototype._dispatchMainFrameDidChangeEvent):
  23039. * UserInterface/Resource.js:
  23040. (WebInspector.Resource.prototype.updateForResponse):
  23041. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23042. Keep WebInspector.FrameResourceManager up-to-date during resource loads.
  23043. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  23044. Reviewed by Joseph Pecoraro.
  23045. * UserInterface/Frame.js:
  23046. (WebInspector.Frame):
  23047. (WebInspector.Frame.prototype.initialize): Add an assert. Set the loaderIdentifier and call clearProvisionalLoad.
  23048. (WebInspector.Frame.prototype.startProvisionalLoad): Added.
  23049. (WebInspector.Frame.prototype.commitProvisionalLoad): Added.
  23050. (WebInspector.Frame.prototype.clearProvisionalLoad): Added.
  23051. (WebInspector.Frame.prototype.get loaderIdentifier): Added.
  23052. (WebInspector.Frame.prototype.get provisionalLoaderIdentifier): Added.
  23053. (WebInspector.Frame.prototype.get provisionalMainResource): Added.
  23054. (WebInspector.Frame.prototype.addResource): Use _associateWithResource.
  23055. (WebInspector.Frame.prototype.removeResource): Use _disassociateWithResource.
  23056. (WebInspector.Frame.prototype.removeAllResources): Ditto.
  23057. (WebInspector.Frame.prototype._associateWithResource): Added.
  23058. (WebInspector.Frame.prototype._disassociateWithResource): Added.
  23059. (WebInspector.Frame.prototype._resourceURLDidChange): Added.
  23060. * UserInterface/FrameResourceManager.js:
  23061. (WebInspector.FrameResourceManager): Enable the NetworkAgent.
  23062. (WebInspector.FrameResourceManager.prototype.initialize): Initialize _resourceRequestIdentifierMap.
  23063. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Call commitProvisionalLoad if this was the provisionalLoaderIdentifier.
  23064. (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Added.
  23065. (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Added.
  23066. (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Added.
  23067. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Added.
  23068. (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Added.
  23069. (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added.
  23070. (WebInspector.FrameResourceManager.prototype._addResourceToFrame): Added.
  23071. (WebInspector.FrameResourceManager.prototype._createFrame): Pass the loaderId.
  23072. * UserInterface/NetworkObserver.js:
  23073. (WebInspector.NetworkObserver.prototype.requestWillBeSent): Call FrameResourceManager.
  23074. (WebInspector.NetworkObserver.prototype.responseReceived): Ditto.
  23075. (WebInspector.NetworkObserver.prototype.loadingFinished): Ditto.
  23076. (WebInspector.NetworkObserver.prototype.loadingFailed): Ditto.
  23077. (WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Ditto.
  23078. * UserInterface/PageObserver.js:
  23079. (WebInspector.PageObserver.prototype.frameNavigated): Pass the loaderId.
  23080. * UserInterface/Resource.js:
  23081. (WebInspector.Resource): Added loaderIdentifier.
  23082. (WebInspector.Resource.prototype.get loaderIdentifier): Added.
  23083. (WebInspector.Resource.prototype.updateForRedirectResponse): Added.
  23084. (WebInspector.Resource.prototype.updateForResponse): Added.
  23085. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23086. Add WebInspector.Resource and populate existing resources for page frames.
  23087. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  23088. Reviewed by Sam Weinig.
  23089. * UserInterface/Frame.js:
  23090. (WebInspector.Frame.prototype.initialize): Remove _url and _mimeType. Add _mainResource, _resources and _resourceURLMap.
  23091. (WebInspector.Frame.prototype.get url): Get the URL from the mainResource.
  23092. (WebInspector.Frame.prototype.get mainResource): Added.
  23093. (WebInspector.Frame.prototype.get resources): Added.
  23094. (WebInspector.Frame.prototype.resourceForURL): Added.
  23095. (WebInspector.Frame.prototype.addResource): Added.
  23096. (WebInspector.Frame.prototype.removeResource): Added.
  23097. (WebInspector.Frame.prototype.removeAllResources): Added.
  23098. * UserInterface/FrameResourceManager.js:
  23099. (WebInspector.FrameResourceManager.prototype._createResource): Added.
  23100. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Call _createResource for each
  23101. resource in the payload.
  23102. * UserInterface/Main.html:
  23103. * UserInterface/Resource.js: Added.
  23104. (WebInspector.Resource):
  23105. (WebInspector.Resource.Type.fromMIMEType):
  23106. (WebInspector.Resource.prototype.get url):
  23107. (WebInspector.Resource.prototype.get type):
  23108. (WebInspector.Resource.prototype.get mimeType):
  23109. (WebInspector.Resource.prototype.get parentFrame):
  23110. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23111. Keep WebInspector.FrameResourceManager up-to-date during navigation, adding and detaching frames.
  23112. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  23113. Reviewed by Ada Chan.
  23114. * UserInterface/Frame.js:
  23115. (WebInspector.Frame): Call initialize.
  23116. (WebInspector.Frame.prototype.initialize): Added.
  23117. (WebInspector.Frame.prototype.get parentFrame): Added.
  23118. (WebInspector.Frame.prototype.childFrameForIdentifier): Added.
  23119. (WebInspector.Frame.prototype.addChildFrame): Call removeChildFrame on the previous parentFrame. Set parentFrame.
  23120. (WebInspector.Frame.prototype.removeChildFrame): Added.
  23121. (WebInspector.Frame.prototype.removeAllChildFrames): Added.
  23122. * UserInterface/FrameResourceManager.js:
  23123. (WebInspector.FrameResourceManager.prototype.frameForIdentifier): Added.
  23124. (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Added.
  23125. (WebInspector.FrameResourceManager.prototype.frameDidDetach): Added.
  23126. (WebInspector.FrameResourceManager.prototype._createFrame): Added.
  23127. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Use _createFrame.
  23128. * UserInterface/PageObserver.js:
  23129. (WebInspector.PageObserver.prototype.frameNavigated): Call WebInspector.FrameResourceManager.frameDidNavigate.
  23130. (WebInspector.PageObserver.prototype.frameDetached): Call WebInspector.FrameResourceManager.frameDidDetach.
  23131. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23132. Add WebInspector.FrameResourceManager and have it build up the basic frame tree for the inspected page.
  23133. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  23134. Reviewed by Jessie Berlin.
  23135. * UserInterface/Frame.js: Added.
  23136. (WebInspector.Frame):
  23137. (WebInspector.Frame.prototype.get id):
  23138. (WebInspector.Frame.prototype.get name):
  23139. (WebInspector.Frame.prototype.get url):
  23140. (WebInspector.Frame.prototype.get childFrames):
  23141. (WebInspector.Frame.prototype.addChildFrame):
  23142. * UserInterface/FrameResourceManager.js: Added.
  23143. (WebInspector.FrameResourceManager):
  23144. (WebInspector.FrameResourceManager.prototype.initialize):
  23145. (WebInspector.FrameResourceManager.prototype.get mainFrame):
  23146. (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
  23147. (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
  23148. * UserInterface/Main.html: Include Frame.js and FrameResourceManager.js.
  23149. * UserInterface/Main.js:
  23150. (WebInspector.contentLoaded): Create an instance of WebInspector.FrameResourceManager.
  23151. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23152. Reorder the calls in WebInspector.contentLoaded to put InspectorBackend first.
  23153. This is needed so that the InspectorBackend is ready to use by the user interface elements.
  23154. Reviewed by Dan Bernstein.
  23155. * UserInterface/Main.js:
  23156. (WebInspector.contentLoaded):
  23157. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23158. Add Element.removeChildren, Array.remove and isEnterKey for the Web Inspector,
  23159. which are needed by TreeOutline.
  23160. Reviewed by Dan Bernstein.
  23161. * UserInterface/Utilities.js:
  23162. (Element.prototype.removeChildren): Added.
  23163. (Array.prototype.remove): Added.
  23164. (isEnterKey): Added.
  23165. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23166. Copy the treeoutline.js file from the OpenSource to use in the new Web Inspector.
  23167. Rubber-stamped by Dan Bernstein.
  23168. * UserInterface/TreeOutline.js: Copied from WebCore/inspector/front-end/treeoutline.js.
  23169. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23170. Copy the BinarySearch.js file from the OpenSource to use in the new Web Inspector.
  23171. Rubber-stamped by Dan Bernstein.
  23172. * UserInterface/BinarySearch.js: Copied from WebCore/inspector/front-end/BinarySearch.js.
  23173. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23174. Make double clicking a sidebar divider toggle the collapsed state of the sidebar.
  23175. Reviewed by Dan Bernstein.
  23176. * UserInterface/Sidebar.js:
  23177. (WebInspector.Sidebar): Add dblclick event listener on the resizer element.
  23178. (WebInspector.Sidebar.prototype._resizerDoubleClicked): Toggle the collapsed state.
  23179. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23180. Make Element.totalOffsetLeft and Element.totalOffsetTop getters again.
  23181. Historically these were getters until a Google engineer changed them.
  23182. I didn't realize they weren't anymore and used totalOffsetTop as a
  23183. getter when making WebInspector.NavigationBar, which is a bug.
  23184. Reviewed by Darin Adler.
  23185. * UserInterface/Sidebar.js:
  23186. (WebInspector.Sidebar.prototype._resizerMouseMoved): Remove the function call
  23187. when using totalOffsetLeft.
  23188. * UserInterface/Utilities.js:
  23189. (Element.prototype.totalOffsetLeft): Made a getter using __defineGetter__.
  23190. (Element.prototype.totalOffsetTop): Ditto.
  23191. 2011-11-28 Timothy Hatcher <timothy@apple.com>
  23192. Update Web Inspector event observers to reflect changes in Inspector.json from Open Source as of r101194.
  23193. Reviewed by Anders Carlsson.
  23194. * UserInterface/DebuggerObserver.js:
  23195. (WebInspector.DebuggerObserver.prototype.debuggerWasEnabled): Removed.
  23196. (WebInspector.DebuggerObserver.prototype.debuggerWasDisabled): Removed.
  23197. (WebInspector.DebuggerObserver.prototype.globalObjectCleared): Added.
  23198. * UserInterface/InspectorObserver.js:
  23199. (WebInspector.InspectorObserver.prototype.disconnectFromBackend): Removed.
  23200. (WebInspector.InspectorObserver.prototype.disconnectFromWorker): Added.
  23201. (WebInspector.InspectorObserver.prototype.bringToFront): Removed.
  23202. (WebInspector.InspectorObserver.prototype.reset): Removed.
  23203. (WebInspector.InspectorObserver.prototype.showPanel): Removed.
  23204. (WebInspector.InspectorObserver.prototype.startUserInitiatedDebugging): Removed.
  23205. * UserInterface/NetworkObserver.js:
  23206. (WebInspector.NetworkObserver.prototype.responseReceived): Added frameId and loaderId arguments.
  23207. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23208. Fix copy and paste error that called InspectorBackend.registerConsoleDispatcher
  23209. for all the other dispatchers.
  23210. Reviewed by Joseph Pecoraro.
  23211. * UserInterface/Main.js:
  23212. (WebInspector.contentLoaded):
  23213. 2011-11-11 Timothy Hatcher <timothy@apple.com>
  23214. Add the ResourceSidebarPanel class in the new Web Inspector.
  23215. Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
  23216. Reviewed by Jessie Berlin.
  23217. * UserInterface/Main.html:
  23218. * UserInterface/Main.js:
  23219. (WebInspector.contentLoaded): Use ResourceSidebarPanel for the Resource panel.
  23220. * UserInterface/ResourceSidebarPanel.js: Added.
  23221. (WebInspector.ResourceSidebarPanel):
  23222. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23223. Add WebInspector.ApplicationCacheObserver with stubs for events defined by the "ApplicationCache" domain.
  23224. Reviewed by Brian Weinstein.
  23225. * UserInterface/ApplicationCacheObserver.js: Added.
  23226. (WebInspector.ApplicationCacheObserver):
  23227. (WebInspector.ApplicationCacheObserver.prototype.applicationCacheStatusUpdated): Not implemented.
  23228. (WebInspector.ApplicationCacheObserver.prototype.networkStateUpdated): Not implemented.
  23229. * UserInterface/Main.html: Include ApplicationCacheObserver.js.
  23230. * UserInterface/Main.js:
  23231. (WebInspector.contentLoaded): Register an instance of WebInspector.ApplicationCacheObserver with InspectorBackend.
  23232. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23233. Add WebInspector.DOMStorageObserver with stubs for events defined by the "DOMStorage" domain.
  23234. Reviewed by Brian Weinstein.
  23235. * UserInterface/DOMStorageObserver.js: Added.
  23236. (WebInspector.DOMStorageObserver):
  23237. (WebInspector.DOMStorageObserver.prototype.addDOMStorage): Not implemented.
  23238. (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Not implemented.
  23239. * UserInterface/Main.html: Include DOMStorageObserver.js.
  23240. * UserInterface/Main.js:
  23241. (WebInspector.contentLoaded): Register an instance of WebInspector.DOMStorageObserver with InspectorBackend.
  23242. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23243. Add WebInspector.DatabaseObserver with stubs for events defined by the "Database" domain.
  23244. Reviewed by Brian Weinstein.
  23245. * UserInterface/DatabaseObserver.js: Added.
  23246. (WebInspector.DatabaseObserver):
  23247. (WebInspector.DatabaseObserver.prototype.addDatabase): Not implemented.
  23248. (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Not implemented.
  23249. (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Not implemented.
  23250. * UserInterface/Main.html: Include DatabaseObserver.js.
  23251. * UserInterface/Main.js:
  23252. (WebInspector.contentLoaded): Register an instance of WebInspector.DatabaseObserver with InspectorBackend.
  23253. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23254. Add WebInspector.DebuggerObserver with stubs for events defined by the "Debugger" domain.
  23255. Reviewed by Brian Weinstein.
  23256. * UserInterface/DebuggerObserver.js: Added.
  23257. (WebInspector.DebuggerObserver):
  23258. (WebInspector.DebuggerObserver.prototype.debuggerWasEnabled): Not implemented.
  23259. (WebInspector.DebuggerObserver.prototype.debuggerWasDisabled): Not implemented.
  23260. (WebInspector.DebuggerObserver.prototype.scriptParsed): Not implemented.
  23261. (WebInspector.DebuggerObserver.prototype.scriptFailedToParse): Not implemented.
  23262. (WebInspector.DebuggerObserver.prototype.breakpointResolved): Not implemented.
  23263. (WebInspector.DebuggerObserver.prototype.paused): Not implemented.
  23264. (WebInspector.DebuggerObserver.prototype.resumed): Not implemented.
  23265. * UserInterface/Main.html: Include DebuggerObserver.js.
  23266. * UserInterface/Main.js:
  23267. (WebInspector.contentLoaded): Register an instance of WebInspector.DebuggerObserver with InspectorBackend.
  23268. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23269. Add WebInspector.DOMObserver with stubs for events defined by the "DOM" domain.
  23270. Reviewed by Brian Weinstein.
  23271. * UserInterface/DOMObserver.js: Added.
  23272. (WebInspector.DOMObserver):
  23273. (WebInspector.DOMObserver.prototype.documentUpdated): Not implemented.
  23274. (WebInspector.DOMObserver.prototype.setChildNodes): Not implemented.
  23275. (WebInspector.DOMObserver.prototype.attributeModified): Not implemented.
  23276. (WebInspector.DOMObserver.prototype.attributeRemoved): Not implemented.
  23277. (WebInspector.DOMObserver.prototype.inlineStyleInvalidated): Not implemented.
  23278. (WebInspector.DOMObserver.prototype.characterDataModified): Not implemented.
  23279. (WebInspector.DOMObserver.prototype.childNodeCountUpdated): Not implemented.
  23280. (WebInspector.DOMObserver.prototype.childNodeInserted): Not implemented.
  23281. (WebInspector.DOMObserver.prototype.childNodeRemoved): Not implemented.
  23282. * UserInterface/Main.html: Include DOMObserver.js.
  23283. * UserInterface/Main.js:
  23284. (WebInspector.contentLoaded): Register an instance of WebInspector.DOMObserver with InspectorBackend.
  23285. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23286. Add WebInspector.NetworkObserver with stubs for events defined by the "Network" domain.
  23287. Reviewed by Sam Weinig.
  23288. * UserInterface/Main.html: Include NetworkObserver.js.
  23289. * UserInterface/Main.js:
  23290. (WebInspector.contentLoaded): Register an instance of WebInspector.NetworkObserver with InspectorBackend.
  23291. * UserInterface/NetworkObserver.js: Added.
  23292. (WebInspector.NetworkObserver):
  23293. (WebInspector.NetworkObserver.prototype.requestWillBeSent): Not implemented.
  23294. (WebInspector.NetworkObserver.prototype.requestServedFromCache): Not implemented.
  23295. (WebInspector.NetworkObserver.prototype.responseReceived): Not implemented.
  23296. (WebInspector.NetworkObserver.prototype.dataReceived): Not implemented.
  23297. (WebInspector.NetworkObserver.prototype.loadingFinished): Not implemented.
  23298. (WebInspector.NetworkObserver.prototype.loadingFailed): Not implemented.
  23299. (WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Not implemented.
  23300. (WebInspector.NetworkObserver.prototype.webSocketWillSendHandshakeRequest): Not implemented.
  23301. (WebInspector.NetworkObserver.prototype.webSocketHandshakeResponseReceived): Not implemented.
  23302. (WebInspector.NetworkObserver.prototype.webSocketCreated): Not implemented.
  23303. (WebInspector.NetworkObserver.prototype.webSocketClosed): Not implemented.
  23304. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23305. Add WebInspector.ConsoleObserver with stubs for events defined by the "Console" domain.
  23306. Reviewed by Sam Weinig.
  23307. * UserInterface/Main.html: Include ConsoleObserver.js.
  23308. * UserInterface/Main.js:
  23309. (WebInspector.contentLoaded): Register an instance of WebInspector.ConsoleObserver with InspectorBackend.
  23310. * UserInterface/ConsoleObserver.js: Added.
  23311. (WebInspector.ConsoleObserver):
  23312. (WebInspector.ConsoleObserver.prototype.messageAdded): Not implemented.
  23313. (WebInspector.ConsoleObserver.prototype.messageRepeatCountUpdated): Not implemented.
  23314. (WebInspector.ConsoleObserver.prototype.messagesCleared): Not implemented.
  23315. 2011-11-14 Timothy Hatcher <timothy@apple.com>
  23316. Add WebInspector.PageObserver with stubs for events defined by the "Page" domain.
  23317. Reviewed by Sam Weinig.
  23318. * UserInterface/Main.html: Include PageObserver.js.
  23319. * UserInterface/Main.js:
  23320. (WebInspector.contentLoaded): Register an instance of WebInspector.PageObserver with InspectorBackend.
  23321. * UserInterface/PageObserver.js: Added.
  23322. (WebInspector.PageObserver):
  23323. (WebInspector.PageObserver.prototype.domContentEventFired): Not implemented.
  23324. (WebInspector.PageObserver.prototype.loadEventFired): Not implemented.
  23325. (WebInspector.PageObserver.prototype.frameNavigated): Not implemented.
  23326. (WebInspector.PageObserver.prototype.frameDetached): Not implemented.
  23327. 2011-11-13 Timothy Hatcher <timothy@apple.com>
  23328. Add WebInspector.InspectorObserver to receive events defined by the "Inspector" domain.
  23329. Most of the events are unimplemented stubs at this point.
  23330. Reviewed by Sam Weinig.
  23331. * UserInterface/InspectorObserver.js: Added.
  23332. (WebInspector.InspectorObserver):
  23333. (WebInspector.InspectorObserver.prototype.frontendReused): Not implemented.
  23334. (WebInspector.InspectorObserver.prototype.bringToFront): Call through to InspectorFrontendHost.
  23335. (WebInspector.InspectorObserver.prototype.disconnectFromBackend): Ditto.
  23336. (WebInspector.InspectorObserver.prototype.reset): Not implemented.
  23337. (WebInspector.InspectorObserver.prototype.showPanel): Not implemented.
  23338. (WebInspector.InspectorObserver.prototype.startUserInitiatedDebugging): Not implemented.
  23339. (WebInspector.InspectorObserver.prototype.evaluateForTestInFrontend): Not implemented.
  23340. (WebInspector.InspectorObserver.prototype.inspect): Not implemented.
  23341. (WebInspector.InspectorObserver.prototype.didCreateWorker): Not implemented.
  23342. (WebInspector.InspectorObserver.prototype.didDestroyWorker): Not implemented.
  23343. * UserInterface/Main.html: Include InspectorObserver.js.
  23344. * UserInterface/Main.js:
  23345. (WebInspector.contentLoaded): Removed the load event listener and call InspectorFrontendHost.loaded
  23346. here. Register an instance of WebInspector.InspectorObserver with InspectorBackend.
  23347. 2011-11-13 Timothy Hatcher <timothy@apple.com>
  23348. Include InspectorBackend.js and start accepting messages from the backend.
  23349. Reviewed by Joseph Pecoraro.
  23350. * UserInterface/Main.html:
  23351. * UserInterface/Main.js:
  23352. (WebInspector.dispatchNextQueuedMessageFromBackend): Added.
  23353. (WebInspector.dispatchMessageFromBackend): Added.
  23354. 2011-11-11 Timothy Hatcher <timothy@apple.com>
  23355. Copy InspectorBackendStub.js from WebCore so it can be used by the new Web Inspector.
  23356. Reviewed by Joseph Pecoraro.
  23357. * WebInspectorUI.xcodeproj/project.pbxproj: Add new Copy WebCore Inspector Resources build phase.
  23358. * Configurations/Base.xcconfig: Add WEBCORE_RESOURCES_DIR.
  23359. 2011-11-10 Timothy Hatcher <timothy@apple.com>
  23360. Add WebInspector.FlexibleSpaceNavigationItem and make the navigation bar use flex box layout.
  23361. This change will allow for controls that float to the right or left (like a close button when docked.)
  23362. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23363. Reviewed by Joseph Pecoraro.
  23364. * UserInterface/Main.js:
  23365. (WebInspector.contentLoaded): Add flexible spaces on each side.
  23366. * UserInterface/NavigationBar.css:
  23367. (.navigation-bar): Use -webkit-box.
  23368. (.navigation-bar > .item): Added.
  23369. (.navigation-bar > .item.flexible-space): Added.
  23370. (.navigation-bar > .item.button): Remove styles that aren't needed anymore.
  23371. (.navigation-bar > .item.button > .glyph): Use auto margins to center the glyph since text-align no longer works.
  23372. * UserInterface/NavigationBar.js:
  23373. (WebInspector.NavigationBar.prototype._calculateMinimumWidth): Skip flexible spaces.
  23374. (WebInspector.FlexibleSpaceNavigationItem): Added.
  23375. * UserInterface/Sidebar.js:
  23376. (WebInspector.Sidebar.prototype.get navigationBar): Added.
  23377. 2011-11-10 Timothy Hatcher <timothy@apple.com>
  23378. Rename WebInspector.NavigationItem to WebInspector.ButtonNavigationItem and make new
  23379. WebInspector.RadioButtonNavigationItem and WebInspector.NavigationItem classes.
  23380. This change allows for future non-radio-button items to be placed in a NavigationBar.
  23381. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23382. Reviewed by Joseph Pecoraro.
  23383. * UserInterface/NavigationBar.css:
  23384. (.navigation-bar > .item.button):
  23385. (.navigation-bar.collapsed > .item.button):
  23386. (.navigation-bar > .item.button > .glyph):
  23387. (.navigation-bar > .item.button.selected):
  23388. * UserInterface/NavigationBar.js:
  23389. (WebInspector.NavigationBar.prototype._mouseDown):
  23390. (WebInspector.NavigationBar.prototype._mouseMoved):
  23391. (WebInspector.NavigationItem):
  23392. (WebInspector.NavigationItem.prototype.get _classNames):
  23393. (WebInspector.ButtonNavigationItem):
  23394. (WebInspector.ButtonNavigationItem.prototype.generateStyleText):
  23395. (WebInspector.ButtonNavigationItem.prototype._additionalClassNames.WebInspector.ButtonNavigationItem.StyleClassName._canvasIdentifier):
  23396. (WebInspector.ButtonNavigationItem.prototype._generateImages._imageLoaded):
  23397. (WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage):
  23398. (WebInspector.RadioButtonNavigationItem):
  23399. (WebInspector.RadioButtonNavigationItem.prototype.get selected):
  23400. (WebInspector.RadioButtonNavigationItem.prototype.set selected):
  23401. (WebInspector.RadioButtonNavigationItem.prototype.get active):
  23402. (WebInspector.RadioButtonNavigationItem.prototype.set active):
  23403. (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
  23404. * UserInterface/Sidebar.js:
  23405. (WebInspector.SidebarPanel):
  23406. 2011-11-10 Timothy Hatcher <timothy@apple.com>
  23407. Add support for resizing the sidebars in the new Web Inspector.
  23408. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23409. Reviewed by John Sullivan.
  23410. * UserInterface/Main.css:
  23411. (body): Prevent overflow.
  23412. (#navigation-sidebar): Moved border and background properties to Sidebar.css.
  23413. (#details-sidebar): Ditto.
  23414. * UserInterface/Main.js:
  23415. (WebInspector.contentLoaded): Specify the side for the sidebars.
  23416. * UserInterface/Sidebar.css:
  23417. (.sidebar.collapsed): Added.
  23418. (.sidebar > .resizer): Added.
  23419. (.sidebar.right > .resizer): Added.
  23420. (.sidebar.left > .resizer): Added.
  23421. (.sidebar.collapsed.right > .resizer): Added.
  23422. (.sidebar.collapsed.left > .resizer): Added.
  23423. (.sidebar.left): Added.
  23424. (.sidebar.left:not(.collapsed) > .navigation-bar): Added.
  23425. (body.window-inactive .sidebar.left > .navigation-bar): Added.
  23426. (.sidebar.right): Added.
  23427. (.sidebar.right:not(.collapsed) > .navigation-bar): Added.
  23428. (body.window-inactive .sidebar.right > .navigation-bar): Added.
  23429. * UserInterface/Sidebar.js:
  23430. (WebInspector.Sidebar): Added the side argument. Setup the resizer element.
  23431. (WebInspector.Sidebar.prototype.get minimumWidth): Added.
  23432. (WebInspector.Sidebar.prototype.get maximumWidth): Added.
  23433. (WebInspector.Sidebar.prototype.get width): Added.
  23434. (WebInspector.Sidebar.prototype.set width): Added.
  23435. (WebInspector.Sidebar.prototype.get collapsed): Added.
  23436. (WebInspector.Sidebar.prototype.set collapsed): Added.
  23437. (WebInspector.Sidebar.prototype.get side): Added.
  23438. (WebInspector.Sidebar.prototype._resizerMouseDown): Added.
  23439. (WebInspector.Sidebar.prototype._resizerMouseMoved): Added.
  23440. (WebInspector.Sidebar.prototype._resizerMouseUp): Added.
  23441. 2011-11-10 Timothy Hatcher <timothy@apple.com>
  23442. Add minimumWidth and support for collapsing of the navigation bar items in the Web Inspector.
  23443. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23444. Reviewed by John Sullivan and Joseph Pecoraro.
  23445. * UserInterface/NavigationBar.css:
  23446. (.navigation-bar): Prevent overflow.
  23447. * UserInterface/NavigationBar.js:
  23448. (WebInspector.NavigationBar.prototype.addNavigationItem): Set _minimumWidthNeedsRecalculated to true.
  23449. (WebInspector.NavigationBar.prototype.updateLayout): Added.
  23450. (WebInspector.NavigationBar.prototype.get minimumWidth): Added. Call _calculateMinimumWidth if needed.
  23451. (WebInspector.NavigationBar.prototype._calculateMinimumWidth): Added.
  23452. 2011-11-09 Timothy Hatcher <timothy@apple.com>
  23453. Use child CSS selectors for the NavigationBar in the new Web Inspector.
  23454. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23455. Reviewed by Jon Honeycutt.
  23456. * UserInterface/NavigationBar.css:
  23457. (.navigation-bar > .item):
  23458. (.navigation-bar.collapsed > .item):
  23459. (.navigation-bar > .item > .glyph):
  23460. (.navigation-bar > .item.selected):
  23461. * UserInterface/NavigationBar.js:
  23462. (WebInspector.NavigationItem.prototype.generateStyleText):
  23463. 2011-11-09 Timothy Hatcher <timothy@apple.com>
  23464. Improve the window inactive appearance for the navigation bars and sidebars in the new Web Inspector.
  23465. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23466. Reviewed by Jon Honeycutt.
  23467. * UserInterface/Main.css:
  23468. (body.window-inactive #navigation-sidebar > .navigation-bar): Added. Set a grey background color.
  23469. (#details-sidebar > .navigation-bar): Use a grey background color.
  23470. (body.window-inactive #details-sidebar > .navigation-bar): Added. Set a grey background color.
  23471. * UserInterface/NavigationBar.css:
  23472. (body.window-inactive .navigation-bar): Use a grey background color.
  23473. * UserInterface/Sidebar.css:
  23474. (body.window-inactive .sidebar): Slight tweak to the grey color to match Xcode.
  23475. 2011-11-09 Timothy Hatcher <timothy@apple.com>
  23476. Layout the sidebars and basic structure of the new Web Inspector.
  23477. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23478. Reviewed by Joseph Pecoraro.
  23479. * UserInterface/Main.css:
  23480. (body): Use flex-box, position to fill the viewport. Disabled user select and drag.
  23481. (#navigation-sidebar): Added.
  23482. (#navigation-sidebar > .navigation-bar): Added.
  23483. (#content): Added.
  23484. (#content-panels): Added.
  23485. (#quick-navigation-bar): Added.
  23486. (#details-sidebar): Added.
  23487. (#details-sidebar > .navigation-bar): Added.
  23488. * UserInterface/Main.html:
  23489. * UserInterface/Main.js:
  23490. (WebInspector.contentLoaded): Added.
  23491. (WebInspector.windowLoaded): Added.
  23492. 2011-11-08 Timothy Hatcher <timothy@apple.com>
  23493. Add basic Sidebar support for the new Web Inspector.
  23494. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23495. Reviewed by Brian Weinstein and Joseph Pecoraro.
  23496. * UserInterface/Main.html: Include Sidebar.js and Sidebar.css.
  23497. * UserInterface/Main.js:
  23498. (windowLoaded): Change test code to use Sidebar classes.
  23499. * UserInterface/Sidebar.css: Added.
  23500. (.sidebar):
  23501. (body.window-inactive .sidebar):
  23502. (.sidebar > .navigation-bar):
  23503. (.sidebar > .panel):
  23504. (.sidebar > .panel.selected):
  23505. * UserInterface/Sidebar.js: Added.
  23506. (WebInspector.Sidebar):
  23507. (WebInspector.Sidebar.prototype.addSidebarPanel):
  23508. (WebInspector.Sidebar.prototype.get selectedSidebarPanel):
  23509. (WebInspector.Sidebar.prototype.set selectedSidebarPanel):
  23510. (WebInspector.Sidebar.prototype.get sidebarPanels):
  23511. (WebInspector.Sidebar.prototype.get element):
  23512. (WebInspector.Sidebar.prototype._navigationItemSelected):
  23513. (WebInspector.SidebarPanel):
  23514. (WebInspector.SidebarPanel.prototype.get identifier):
  23515. (WebInspector.SidebarPanel.prototype.get navigationItem):
  23516. (WebInspector.SidebarPanel.prototype.get element):
  23517. (WebInspector.SidebarPanel.prototype.get selected):
  23518. (WebInspector.SidebarPanel.prototype.set selected):
  23519. 2011-11-08 Timothy Hatcher <timothy@apple.com>
  23520. Fire an event when a navigation item is selected in a navigation bar.
  23521. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23522. Reviewed by Brian Weinstein.
  23523. * UserInterface/NavigationBar.js:
  23524. (WebInspector.NavigationBar.prototype.addNavigationItem): Remove unused arguments. (Drive by change.)
  23525. (WebInspector.NavigationBar.prototype.set selectedNavigationItem): Avoid doing work if the item is already
  23526. selected. Fire the event if the mouse isn't down.
  23527. (WebInspector.NavigationBar.prototype._mouseDown): Store the previous selected item.
  23528. (WebInspector.NavigationBar.prototype._mouseUp): Fire the event if the selected item is different.
  23529. 2011-10-31 Timothy Hatcher <timothy@apple.com>
  23530. Add the navigation bar for the new Web Insector.
  23531. Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
  23532. Reviewed by Joseph Pecoraro.
  23533. * UserInterface/Images/NavigationItemBreakpoint.pdf: Added.
  23534. * UserInterface/Images/NavigationItemFile.pdf: Added.
  23535. * UserInterface/Images/NavigationItemLog.pdf: Added.
  23536. * UserInterface/Images/NavigationItemMagnifyingGlass.pdf: Added.
  23537. * UserInterface/Images/NavigationItemStopwatch.pdf: Added.
  23538. * UserInterface/Images/NavigationItemStorage.pdf: Added.
  23539. * UserInterface/Images/NavigationItemThreads.pdf: Added.
  23540. * UserInterface/Images/NavigationItemWarning.pdf: Added.
  23541. * UserInterface/Main.css: Added.
  23542. (*):
  23543. (body):
  23544. * UserInterface/Main.html:
  23545. * UserInterface/Main.js: Added.
  23546. (windowLoaded):
  23547. * UserInterface/NavigationBar.css: Added.
  23548. (.navigation-bar):
  23549. (body.window-inactive .navigation-bar):
  23550. (.navigation-bar .item):
  23551. (.navigation-bar.collapsed .item):
  23552. (.navigation-bar .item .glyph):
  23553. (.navigation-bar .item.selected):
  23554. (.navigation-bar:focus):
  23555. * UserInterface/NavigationBar.js: Added.
  23556. (WebInspector.NavigationBar):
  23557. (WebInspector.NavigationBar.prototype.addNavigationItem):
  23558. (WebInspector.NavigationBar.prototype.get selectedNavigationItem):
  23559. (WebInspector.NavigationBar.prototype.set selectedNavigationItem):
  23560. (WebInspector.NavigationBar.prototype.get navigationItems):
  23561. (WebInspector.NavigationBar.prototype.get element):
  23562. (WebInspector.NavigationBar.prototype._mouseDown):
  23563. (WebInspector.NavigationBar.prototype._mouseMoved):
  23564. (WebInspector.NavigationBar.prototype._mouseUp):
  23565. (WebInspector.NavigationBar.prototype._keyDown):
  23566. (WebInspector.NavigationBar.prototype._focus):
  23567. (WebInspector.NavigationBar.prototype._blur):
  23568. (WebInspector.NavigationBar.prototype._updateStyle):
  23569. (WebInspector.NavigationItem):
  23570. (WebInspector.NavigationItem.prototype.get identifier):
  23571. (WebInspector.NavigationItem.prototype.get displayName):
  23572. (WebInspector.NavigationItem.prototype.get image):
  23573. (WebInspector.NavigationItem.prototype.get element):
  23574. (WebInspector.NavigationItem.prototype.get selected):
  23575. (WebInspector.NavigationItem.prototype.set selected):
  23576. (WebInspector.NavigationItem.prototype.get active):
  23577. (WebInspector.NavigationItem.prototype.set active):
  23578. (WebInspector.NavigationItem.prototype.generateStyleText):
  23579. (WebInspector.NavigationItem.prototype.get _classNames):
  23580. (WebInspector.NavigationItem.prototype._canvasIdenitfier):
  23581. (WebInspector.NavigationItem.prototype._generateImages._imageLoaded):
  23582. (WebInspector.NavigationItem.prototype._generateImages._createEmbossedCanvasImage):
  23583. (WebInspector.NavigationItem.prototype._generateImages._drawImageShadow):
  23584. (WebInspector.NavigationItem.prototype._generateImages._invertMaskImage):
  23585. (WebInspector.NavigationItem.prototype._generateImages._applyImageMask):
  23586. (WebInspector.NavigationItem.prototype._generateImages):
  23587. * UserInterface/Object.js: Added.
  23588. (WebInspector.Object):
  23589. (WebInspector.Object.prototype.addEventListener):
  23590. (WebInspector.Object.prototype.removeEventListener):
  23591. (WebInspector.Object.prototype.removeAllListeners):
  23592. (WebInspector.Object.prototype.hasEventListeners):
  23593. (WebInspector.Object.prototype.dispatchEventToListeners):
  23594. (WebInspector.Event):
  23595. (WebInspector.Event.prototype.stopPropagation):
  23596. (WebInspector.Event.prototype.preventDefault):
  23597. * UserInterface/Utilities.js: Added.
  23598. (Node.prototype.enclosingNodeOrSelfWithClass):
  23599. (Node.prototype.enclosingNodeWithClass):
  23600. (Element.prototype.totalOffsetLeft):
  23601. (Element.prototype.totalOffsetTop):
  23602. * UserInterface/WebInspector.js: Added.
  23603. 2011-10-28 Timothy Hatcher <timothy@apple.com>
  23604. Add a experiments menu item to enabled the new Web Inspector. There is only a placeholder
  23605. for the new inspector right now, so it isn't useful for most people yet.
  23606. This chnage depends on: https://webkit.org/b/71089
  23607. <rdar://problem/10318665> Make it possible to use a different front-end for the Web Inspector
  23608. Reviewed by John Sullivan.
  23609. * UserInterface/Main.html: Added.