From ce912be374a210fa840ce66b6867452569871c95 Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Tue, 11 Feb 2014 11:53:53 -0800 Subject: [PATCH 01/56] Bug 969012 - Make jit allocations of CallObject with external slots use the nursery; r=jandem --- js/src/builtin/TestingFunctions.cpp | 31 ++ js/src/gc/Nursery.cpp | 14 +- js/src/gc/Nursery.h | 9 +- js/src/jit-test/tests/basic/bug908915.js | 4 +- .../tests/ion/callobj-malloc-slots.js | 308 ++++++++++++++++++ .../tests/parallel/closure-nested-branch.js | 14 - .../tests/parallel/closure-nested-compute.js | 14 - js/src/jit/CodeGenerator.cpp | 244 +++++++++----- js/src/jit/CodeGenerator.h | 7 +- js/src/jit/IonBuilder.cpp | 30 +- js/src/jit/IonMacroAssembler.cpp | 211 +++++++++--- js/src/jit/IonMacroAssembler.h | 24 +- js/src/jit/LIR-Common.h | 73 +---- js/src/jit/LOpcodes.h | 1 - js/src/jit/Lowering.cpp | 28 +- js/src/jit/Lowering.h | 1 - js/src/jit/MIR.h | 56 +--- js/src/jit/MOpcodes.h | 1 - js/src/jit/ParallelSafetyAnalysis.cpp | 10 +- js/src/jit/VMFunctions.cpp | 18 +- js/src/jit/VMFunctions.h | 5 +- js/src/jit/arm/MacroAssembler-arm.h | 4 + js/src/jit/shared/Assembler-x86-shared.h | 15 +- js/src/jsfriendapi.cpp | 11 +- js/src/jsobj.h | 3 +- js/src/jsobjinlines.h | 17 +- js/src/vm/ObjectImpl.h | 6 + js/src/vm/Runtime.cpp | 1 - js/src/vm/Runtime.h | 5 - js/src/vm/ScopeObject.cpp | 6 +- js/src/vm/ScopeObject.h | 2 +- 31 files changed, 786 insertions(+), 387 deletions(-) create mode 100644 js/src/jit-test/tests/ion/callobj-malloc-slots.js diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 502a5d011b02..1abee59a98e0 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -257,6 +257,28 @@ MinorGC(JSContext *cx, unsigned argc, jsval *vp) return true; } +static bool +DisableGGC(JSContext *cx, unsigned argc, jsval *vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); +#ifdef JSGC_GENERATIONAL + JS::DisableGenerationalGC(cx->runtime()); +#endif + args.rval().setUndefined(); + return true; +} + +static bool +EnableGGC(JSContext *cx, unsigned argc, jsval *vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); +#ifdef JSGC_GENERATIONAL + JS::EnableGenerationalGC(cx->runtime()); +#endif + args.rval().setUndefined(); + return true; +} + static const struct ParamPair { const char *name; JSGCParamKey param; @@ -1429,6 +1451,15 @@ static const JSFunctionSpecWithHelp TestingFunctions[] = { " Run a minor collector on the Nursery. When aboutToOverflow is true, marks\n" " the store buffer as about-to-overflow before collecting."), + JS_FN_HELP("disableGenerationalGC", ::DisableGGC, 0, 0, +"disableGenerationalGC()", +" In builds with support for generational GC, disable generational GC."), + + JS_FN_HELP("enableGenerationalGC", ::EnableGGC, 0, 0, +"enableGenerationalGC()", +" In builds with support for generational GC, re-enable a disabled\n" +" generational GC."), + JS_FN_HELP("gcparam", GCParameter, 2, 0, "gcparam(name [, value])", " Wrapper for JS_[GS]etGCParameter. The name is one of " GC_PARAMETER_ARGS_LIST), diff --git a/js/src/gc/Nursery.cpp b/js/src/gc/Nursery.cpp index 50693dc41602..7188c039ed4d 100644 --- a/js/src/gc/Nursery.cpp +++ b/js/src/gc/Nursery.cpp @@ -268,20 +268,14 @@ js::Nursery::allocateHugeSlots(JSContext *cx, size_t nslots) return slots; } -void -js::Nursery::notifyInitialSlots(Cell *cell, HeapSlot *slots) -{ - if (isInside(cell) && !isInside(slots)) { - /* If this put fails, we will only leak the slots. */ - (void)hugeSlots.put(slots); - } -} - void js::Nursery::notifyNewElements(gc::Cell *cell, ObjectElements *elements) { JS_ASSERT(!isInside(elements)); - notifyInitialSlots(cell, reinterpret_cast(elements)); + if (isInside(cell)) { + /* If this put fails, we will only leak the slots. */ + (void)hugeSlots.put(reinterpret_cast(elements)); + } } void diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h index 03e31c73910d..fb9c859132f1 100644 --- a/js/src/gc/Nursery.h +++ b/js/src/gc/Nursery.h @@ -54,6 +54,9 @@ class Nursery static const size_t Alignment = gc::ChunkSize; static const size_t NurserySize = gc::ChunkSize * NumNurseryChunks; + /* The maximum number of slots allowed to reside inline in the nursery. */ + static const size_t MaxNurserySlots = 128; + explicit Nursery(JSRuntime *rt) : runtime_(rt), position_(0), @@ -101,9 +104,6 @@ class Nursery /* Free a slots array. */ void freeSlots(JSContext *cx, HeapSlot *slots); - /* Add a slots to our tracking list if it is out-of-line. */ - void notifyInitialSlots(gc::Cell *cell, HeapSlot *slots); - /* Add elements to our tracking list if it is out-of-line. */ void notifyNewElements(gc::Cell *cell, ObjectElements *elements); @@ -182,9 +182,6 @@ class Nursery typedef HashSet, SystemAllocPolicy> HugeSlotsSet; HugeSlotsSet hugeSlots; - /* The maximum number of slots allowed to reside inline in the nursery. */ - static const size_t MaxNurserySlots = 128; - /* The amount of space in the mapped nursery available to allocations. */ static const size_t NurseryChunkUsableSize = gc::ChunkSize - sizeof(gc::ChunkTrailer); diff --git a/js/src/jit-test/tests/basic/bug908915.js b/js/src/jit-test/tests/basic/bug908915.js index 86d1a514aff5..c917212fc273 100644 --- a/js/src/jit-test/tests/basic/bug908915.js +++ b/js/src/jit-test/tests/basic/bug908915.js @@ -2,7 +2,7 @@ function f(y) {} for each(let e in newGlobal()) { if (e.name === "quit" || e.name == "readline" || e.name == "terminate" || - e.name == "nestedShell") + e.name == "nestedShell" || e.name.endsWith("ableGenerationalGC")) continue; try { e(); @@ -15,7 +15,7 @@ for each(let e in newGlobal()) { } for each(b in []) { if (b.name === "quit" || b.name == "readline" || b.name == "terminate" || - b.name == "nestedShell") + b.name == "nestedShell" || b.name.endsWith("ableGenerationalGC")) continue; try { f(b) diff --git a/js/src/jit-test/tests/ion/callobj-malloc-slots.js b/js/src/jit-test/tests/ion/callobj-malloc-slots.js new file mode 100644 index 000000000000..673fbb554bd7 --- /dev/null +++ b/js/src/jit-test/tests/ion/callobj-malloc-slots.js @@ -0,0 +1,308 @@ +// |jit-test| tz-pacific + +// This is a copy of date-format-tofte: one of the only current jit-tests that +// exercises CallObject creation with external slots. We disable GGC here to +// test the fallback path that gets excercised without it enabled. +disableGenerationalGC(); + +function arrayExists(array, x) { + for (var i = 0; i < array.length; i++) { + if (array[i] == x) return true; + } + return false; +} + +Date.prototype.formatDate = function (input,time) { + // formatDate : + // a PHP date like function, for formatting date strings + // See: http://www.php.net/date + // + // input : format string + // time : epoch time (seconds, and optional) + // + // if time is not passed, formatting is based on + // the current "this" date object's set time. + // + // supported: + // a, A, B, d, D, F, g, G, h, H, i, j, l (lowercase L), L, + // m, M, n, O, r, s, S, t, U, w, W, y, Y, z + // + // unsupported: + // I (capital i), T, Z + + var switches = ["a", "A", "B", "d", "D", "F", "g", "G", "h", "H", + "i", "j", "l", "L", "m", "M", "n", "O", "r", "s", + "S", "t", "U", "w", "W", "y", "Y", "z"]; + var daysLong = ["Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday"]; + var daysShort = ["Sun", "Mon", "Tue", "Wed", + "Thu", "Fri", "Sat"]; + var monthsShort = ["Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", "Sep", + "Oct", "Nov", "Dec"]; + var monthsLong = ["January", "February", "March", "April", + "May", "June", "July", "August", "September", + "October", "November", "December"]; + var daysSuffix = ["st", "nd", "rd", "th", "th", "th", "th", // 1st - 7th + "th", "th", "th", "th", "th", "th", "th", // 8th - 14th + "th", "th", "th", "th", "th", "th", "st", // 15th - 21st + "nd", "rd", "th", "th", "th", "th", "th", // 22nd - 28th + "th", "th", "st"]; // 29th - 31st + + function a() { + // Lowercase Ante meridiem and Post meridiem + return self.getHours() > 11? "pm" : "am"; + } + function A() { + // Uppercase Ante meridiem and Post meridiem + return self.getHours() > 11? "PM" : "AM"; + } + + function B(){ + // Swatch internet time. code simply grabbed from ppk, + // since I was feeling lazy: + // http://www.xs4all.nl/~ppk/js/beat.html + var off = (self.getTimezoneOffset() + 60)*60; + var theSeconds = (self.getHours() * 3600) + + (self.getMinutes() * 60) + + self.getSeconds() + off; + var beat = Math.floor(theSeconds/86.4); + if (beat > 1000) beat -= 1000; + if (beat < 0) beat += 1000; + if ((""+beat).length == 1) beat = "00"+beat; + if ((""+beat).length == 2) beat = "0"+beat; + return beat; + } + + function d() { + // Day of the month, 2 digits with leading zeros + return new String(self.getDate()).length == 1? + "0"+self.getDate() : self.getDate(); + } + function D() { + // A textual representation of a day, three letters + return daysShort[self.getDay()]; + } + function F() { + // A full textual representation of a month + return monthsLong[self.getMonth()]; + } + function g() { + // 12-hour format of an hour without leading zeros + return self.getHours() > 12? self.getHours()-12 : self.getHours(); + } + function G() { + // 24-hour format of an hour without leading zeros + return self.getHours(); + } + function h() { + // 12-hour format of an hour with leading zeros + if (self.getHours() > 12) { + var s = new String(self.getHours()-12); + return s.length == 1? + "0"+ (self.getHours()-12) : self.getHours()-12; + } else { + var s = new String(self.getHours()); + return s.length == 1? + "0"+self.getHours() : self.getHours(); + } + } + function H() { + // 24-hour format of an hour with leading zeros + return new String(self.getHours()).length == 1? + "0"+self.getHours() : self.getHours(); + } + function i() { + // Minutes with leading zeros + return new String(self.getMinutes()).length == 1? + "0"+self.getMinutes() : self.getMinutes(); + } + function j() { + // Day of the month without leading zeros + return self.getDate(); + } + function l() { + // A full textual representation of the day of the week + return daysLong[self.getDay()]; + } + function L() { + // leap year or not. 1 if leap year, 0 if not. + // the logic should match iso's 8601 standard. + var y_ = Y(); + if ( + (y_ % 4 == 0 && y_ % 100 != 0) || + (y_ % 4 == 0 && y_ % 100 == 0 && y_ % 400 == 0) + ) { + return 1; + } else { + return 0; + } + } + function m() { + // Numeric representation of a month, with leading zeros + return self.getMonth() < 9? + "0"+(self.getMonth()+1) : + self.getMonth()+1; + } + function M() { + // A short textual representation of a month, three letters + return monthsShort[self.getMonth()]; + } + function n() { + // Numeric representation of a month, without leading zeros + return self.getMonth()+1; + } + function O() { + // Difference to Greenwich time (GMT) in hours + var os = Math.abs(self.getTimezoneOffset()); + var h = ""+Math.floor(os/60); + var m = ""+(os%60); + h.length == 1? h = "0"+h:1; + m.length == 1? m = "0"+m:1; + return self.getTimezoneOffset() < 0 ? "+"+h+m : "-"+h+m; + } + function r() { + // RFC 822 formatted date + var r; // result + // Thu , 21 Dec 2000 + r = D() + ", " + j() + " " + M() + " " + Y() + + // 16 : 01 : 07 +0200 + " " + H() + ":" + i() + ":" + s() + " " + O(); + return r; + } + function S() { + // English ordinal suffix for the day of the month, 2 characters + return daysSuffix[self.getDate()-1]; + } + function s() { + // Seconds, with leading zeros + return new String(self.getSeconds()).length == 1? + "0"+self.getSeconds() : self.getSeconds(); + } + function t() { + + // thanks to Matt Bannon for some much needed code-fixes here! + var daysinmonths = [null,31,28,31,30,31,30,31,31,30,31,30,31]; + if (L()==1 && n()==2) return 29; // leap day + return daysinmonths[n()]; + } + function U() { + // Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) + return Math.round(self.getTime()/1000); + } + function W() { + // Weeknumber, as per ISO specification: + // http://www.cl.cam.ac.uk/~mgk25/iso-time.html + + // if the day is three days before newyears eve, + // there's a chance it's "week 1" of next year. + // here we check for that. + var beforeNY = 364+L() - z(); + var afterNY = z(); + var weekday = w()!=0?w()-1:6; // makes sunday (0), into 6. + if (beforeNY <= 2 && weekday <= 2-beforeNY) { + return 1; + } + // similarly, if the day is within threedays of newyears + // there's a chance it belongs in the old year. + var ny = new Date("January 1 " + Y() + " 00:00:00"); + var nyDay = ny.getDay()!=0?ny.getDay()-1:6; + if ( + (afterNY <= 2) && + (nyDay >=4) && + (afterNY >= (6-nyDay)) + ) { + // Since I'm not sure we can just always return 53, + // i call the function here again, using the last day + // of the previous year, as the date, and then just + // return that week. + var prevNY = new Date("December 31 " + (Y()-1) + " 00:00:00"); + return prevNY.formatDate("W"); + } + + // week 1, is the week that has the first thursday in it. + // note that this value is not zero index. + if (nyDay <= 3) { + // first day of the year fell on a thursday, or earlier. + return 1 + Math.floor( ( z() + nyDay ) / 7 ); + } else { + // first day of the year fell on a friday, or later. + return 1 + Math.floor( ( z() - ( 7 - nyDay ) ) / 7 ); + } + } + function w() { + // Numeric representation of the day of the week + return self.getDay(); + } + + function Y() { + // A full numeric representation of a year, 4 digits + + // we first check, if getFullYear is supported. if it + // is, we just use that. ppks code is nice, but wont + // work with dates outside 1900-2038, or something like that + if (self.getFullYear) { + var newDate = new Date("January 1 2001 00:00:00 +0000"); + var x = newDate .getFullYear(); + if (x == 2001) { + // i trust the method now + return self.getFullYear(); + } + } + // else, do this: + // codes thanks to ppk: + // http://www.xs4all.nl/~ppk/js/introdate.html + var x = self.getYear(); + var y = x % 100; + y += (y < 38) ? 2000 : 1900; + return y; + } + function y() { + // A two-digit representation of a year + var y = Y()+""; + return y.substring(y.length-2,y.length); + } + function z() { + // The day of the year, zero indexed! 0 through 366 + var t = new Date("January 1 " + Y() + " 00:00:00"); + var diff = self.getTime() - t.getTime(); + return Math.floor(diff/1000/60/60/24); + } + + var self = this; + if (time) { + // save time + var prevTime = self.getTime(); + self.setTime(time); + } + + var ia = input.split(""); + var ij = 0; + while (ia[ij]) { + if (ia[ij] == "\\") { + // this is our way of allowing users to escape stuff + ia.splice(ij,1); + } else { + if (arrayExists(switches,ia[ij])) { + ia[ij] = eval(ia[ij] + "()"); + } + } + ij++; + } + // reset time, back to what it was + if (prevTime) { + self.setTime(prevTime); + } + return ia.join(""); +} + +var date = new Date("1/1/2007 1:11:11"); +var ret = ""; +for (i = 0; i < 10; ++i) { + var shortFormat = date.formatDate("Y-m-d"); + var longFormat = date.formatDate("l, F d, Y g:i:s A"); + ret += shortFormat + longFormat; + date.setTime(date.getTime() + 84266956); +} +var expected = "2007-01-01Monday, January 01, 2007 1:11:11 AM2007-01-02Tuesday, January 02, 2007 0:35:37 AM2007-01-03Wednesday, January 03, 2007 0:00:04 AM2007-01-03Wednesday, January 03, 2007 11:24:31 PM2007-01-04Thursday, January 04, 2007 10:48:58 PM2007-01-05Friday, January 05, 2007 10:13:25 PM2007-01-06Saturday, January 06, 2007 9:37:52 PM2007-01-07Sunday, January 07, 2007 9:02:19 PM2007-01-08Monday, January 08, 2007 8:26:46 PM2007-01-09Tuesday, January 09, 2007 7:51:13 PM"; +assertEq(ret, expected); diff --git a/js/src/jit-test/tests/parallel/closure-nested-branch.js b/js/src/jit-test/tests/parallel/closure-nested-branch.js index dc781b7759ff..b0043d931cbb 100644 --- a/js/src/jit-test/tests/parallel/closure-nested-branch.js +++ b/js/src/jit-test/tests/parallel/closure-nested-branch.js @@ -3,15 +3,6 @@ load(libdir + "parallelarray-helpers.js"); function testClosureCreationAndInvocation() { var a = range(0, 64); function makeaddv(v) { - var u = 1; - var t = 2; - var s = 3; - var r = 4; - var q = 5; - var p = 6; - var o = 7; - var n = 8; - var m = 9; var l = 10; var k = 11; var j = 12; @@ -34,11 +25,6 @@ function testClosureCreationAndInvocation() { case 6: return g; case 7: return h; case 8: return i; case 9: return j; case 10: return k; case 11: return l; - case 12: return m; case 13: return n; - case 14: return o; case 15: return p; - case 16: return q; case 17: return r; - case 18: return s; case 19: return t; - case 20: return u; } }); } diff --git a/js/src/jit-test/tests/parallel/closure-nested-compute.js b/js/src/jit-test/tests/parallel/closure-nested-compute.js index a85e5e0a70fe..fd7a3227f272 100644 --- a/js/src/jit-test/tests/parallel/closure-nested-compute.js +++ b/js/src/jit-test/tests/parallel/closure-nested-compute.js @@ -3,15 +3,6 @@ load(libdir + "parallelarray-helpers.js"); function testClosureCreationAndInvocation() { var a = range(0, 64); function makeaddv(v) { - var u = 1; - var t = 2; - var s = 3; - var r = 4; - var q = 5; - var p = 6; - var o = 7; - var n = 8; - var m = 9; var l = 10; var k = 11; var j = 12; @@ -32,11 +23,6 @@ function testClosureCreationAndInvocation() { case 6: return g; case 7: return h; case 8: return i; case 9: return j; case 10: return k; case 11: return l; - case 12: return m; case 13: return n; - case 14: return o; case 15: return p; - case 16: return q; case 17: return r; - case 18: return s; case 19: return t; - case 20: return u; } }; }; diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index 0b6672d6bf88..0c9e91a29c3e 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -142,6 +142,133 @@ MNewStringObject::templateObj() const { return &templateObj_->as(); } +// API call to malloc for slots. +class OutOfLineMallocSlots : public OutOfLineCodeBase +{ + const Register result_; + int32_t nDynamicSlots_; + Label *failure_; + + public: + OutOfLineMallocSlots(const Register &result, size_t nslots, Label *failure) + : result_(result), nDynamicSlots_(int32_t(nslots)), failure_(failure) + { + JS_ASSERT(nslots < INT32_MAX); + } + + bool accept(CodeGenerator *codegen) { + return codegen->visitOutOfLineMallocSlots(this); + } + + const Register &result() const { + return result_; + } + + int32_t numDynamicSlots() const { + return nDynamicSlots_; + } + + Label *failure() const { + return failure_; + } +}; + +bool +CodeGenerator::visitOutOfLineMallocSlots(OutOfLineMallocSlots *ool) +{ + saveVolatile(ool->result()); + + RegisterSet regs = RegisterSet::Volatile(); + regs.takeUnchecked(ool->result()); + Register regRuntime = regs.takeGeneral(); + Register regNSlots = regs.takeGeneral(); + + masm.setupUnalignedABICall(2, ool->result()); + masm.movePtr(ImmPtr(GetIonContext()->runtime), regRuntime); + masm.passABIArg(regRuntime); + masm.move32(Imm32(uint32_t(ool->numDynamicSlots())), regNSlots); + masm.passABIArg(regNSlots); + masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, NewSlots)); + masm.storeCallResult(ool->result()); + + restoreVolatile(ool->result()); + + masm.branchTestPtr(Assembler::Zero, ool->result(), ool->result(), ool->failure()); + + masm.jump(ool->rejoin()); + return true; +} + +// API call to free slots data on allocation failure. +class OutOfLineFreeSlots : public OutOfLineCodeBase +{ + const Register slots_; + Label *fallback_; + + public: + OutOfLineFreeSlots(const Register ®, Label *fallback) + : slots_(reg), fallback_(fallback) + { } + + bool accept(CodeGenerator *codegen) { + return codegen->visitOutOfLineFreeSlots(this); + } + + Register slots() const { + return slots_; + } + + Label *fallback() const { + return fallback_; + } +}; + +bool +CodeGenerator::visitOutOfLineFreeSlots(OutOfLineFreeSlots *ool) +{ + saveVolatile(ool->slots()); + + RegisterSet regs = RegisterSet::Volatile(); + regs.takeUnchecked(ool->slots()); + Register temp = regs.takeGeneral(); + + masm.setupUnalignedABICall(1, temp); + masm.passABIArg(ool->slots()); + masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, FreeSlots)); + restoreVolatile(ool->slots()); + + masm.jump(ool->fallback()); + return true; +} + +// Emit out-of-line code to provide malloc and free paths to allocate slots for +// objects that require them. In the case that such paths are not required, the +// given labels are returned as nullptr. +bool +CodeGenerator::emitOutOfLineMallocFree(const Register ®, size_t nDynamicSlots, + Label *fallback, Label **mallocEntry, Label **mallocRejoin, + Label **freeEntry) +{ + *mallocEntry = nullptr; + *mallocRejoin = nullptr; + *freeEntry = nullptr; + if (!nDynamicSlots) + return true; + + OutOfLineMallocSlots *oolMalloc = new(alloc()) OutOfLineMallocSlots(reg, nDynamicSlots, fallback); + if (!addOutOfLineCode(oolMalloc)) + return false; + + OutOfLineFreeSlots *oolFree = new(alloc()) OutOfLineFreeSlots(reg, fallback); + if (!addOutOfLineCode(oolFree)) + return false; + + *mallocEntry = oolMalloc->entry(); + *mallocRejoin = oolMalloc->rejoin(); + *freeEntry = oolFree->entry(); + return true; +} + CodeGenerator::CodeGenerator(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm) : CodeGeneratorSpecific(gen, graph, masm) #ifdef DEBUG @@ -972,8 +1099,8 @@ CodeGenerator::visitLambda(LLambda *lir) JS_ASSERT(!info.singletonType); - masm.newGCThing(output, info.fun, ool->entry(), gc::DefaultHeap); - masm.initGCThing(output, info.fun); + masm.newGCObject(output, info.fun, ool->entry(), gc::DefaultHeap); + masm.initGCObject(output, info.fun); emitLambdaInit(output, scopeChain, info); @@ -3360,29 +3487,6 @@ CodeGenerator::visitNewDerivedTypedObject(LNewDerivedTypedObject *lir) return callVM(CreateDerivedTypedObjInfo, lir); } -bool -CodeGenerator::visitNewSlots(LNewSlots *lir) -{ - Register temp1 = ToRegister(lir->temp1()); - Register temp2 = ToRegister(lir->temp2()); - Register temp3 = ToRegister(lir->temp3()); - Register output = ToRegister(lir->output()); - - masm.mov(ImmPtr(GetIonContext()->runtime), temp1); - masm.mov(ImmWord(lir->mir()->nslots()), temp2); - - masm.setupUnalignedABICall(2, temp3); - masm.passABIArg(temp1); - masm.passABIArg(temp2); - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, NewSlots)); - - masm.testPtr(output, output); - if (!bailoutIf(Assembler::Zero, lir->snapshot())) - return false; - - return true; -} - bool CodeGenerator::visitAtan2D(LAtan2D *lir) { Register temp = ToRegister(lir->temp()); @@ -3430,8 +3534,8 @@ CodeGenerator::visitNewArray(LNewArray *lir) if (!addOutOfLineCode(ool)) return false; - masm.newGCThing(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); - masm.initGCThing(objReg, templateObject); + masm.newGCObject(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); + masm.initGCObject(objReg, templateObject); masm.bind(ool->rejoin()); return true; @@ -3507,7 +3611,7 @@ CodeGenerator::visitNewObject(LNewObject *lir) { JS_ASSERT(gen->info().executionMode() == SequentialExecution); Register objReg = ToRegister(lir->output()); - JSObject *templateObject = lir->mir()->templateObject(); + JSObject *templateObj = lir->mir()->templateObject(); if (lir->mir()->shouldUseVM()) return visitNewObjectVMCall(lir); @@ -3516,8 +3620,8 @@ CodeGenerator::visitNewObject(LNewObject *lir) if (!addOutOfLineCode(ool)) return false; - masm.newGCThing(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); - masm.initGCThing(objReg, templateObject); + masm.newGCObject(objReg, templateObj, ool->entry(), lir->mir()->initialHeap()); + masm.initGCObject(objReg, templateObj); masm.bind(ool->rejoin()); return true; @@ -3551,53 +3655,46 @@ CodeGenerator::visitNewDeclEnvObject(LNewDeclEnvObject *lir) if (!ool) return false; - masm.newGCThing(obj, templateObj, ool->entry(), gc::DefaultHeap); - masm.initGCThing(obj, templateObj); + masm.newGCObject(obj, templateObj, ool->entry(), gc::DefaultHeap); + masm.initGCObject(obj, templateObj); masm.bind(ool->rejoin()); return true; } -typedef JSObject *(*NewCallObjectFn)(JSContext *, HandleScript, HandleShape, - HandleTypeObject, HeapSlot *); -static const VMFunction NewCallObjectInfo = - FunctionInfo(NewCallObject); +typedef JSObject *(*NewCallObjectFn)(JSContext *, HandleScript, HandleShape, HandleTypeObject); +static const VMFunction NewCallObjectInfo = FunctionInfo(NewCallObject); bool CodeGenerator::visitNewCallObject(LNewCallObject *lir) { - Register obj = ToRegister(lir->output()); + Register objReg = ToRegister(lir->output()); JSObject *templateObj = lir->mir()->templateObject(); // If we have a template object, we can inline call object creation. - OutOfLineCode *ool; - if (lir->slots()->isRegister()) { - ool = oolCallVM(NewCallObjectInfo, lir, - (ArgList(), ImmGCPtr(lir->mir()->block()->info().script()), - ImmGCPtr(templateObj->lastProperty()), - ImmGCPtr(templateObj->hasSingletonType() ? nullptr : templateObj->type()), - ToRegister(lir->slots())), - StoreRegisterTo(obj)); - } else { - ool = oolCallVM(NewCallObjectInfo, lir, - (ArgList(), ImmGCPtr(lir->mir()->block()->info().script()), - ImmGCPtr(templateObj->lastProperty()), - ImmGCPtr(templateObj->hasSingletonType() ? nullptr : templateObj->type()), - ImmPtr(nullptr)), - StoreRegisterTo(obj)); - } + OutOfLineCode *ool = + oolCallVM(NewCallObjectInfo, lir, + (ArgList(), ImmGCPtr(lir->mir()->block()->info().script()), + ImmGCPtr(templateObj->lastProperty()), + ImmGCPtr(templateObj->hasSingletonType() ? nullptr : templateObj->type())), + StoreRegisterTo(objReg)); if (!ool) return false; + Label *mallocEntry, *mallocRejoin, *freeEntry; + if (!emitOutOfLineMallocFree(objReg, templateObj->numDynamicSlots(), ool->entry(), + &mallocEntry, &mallocRejoin, &freeEntry)) + { + return false; + } + if (lir->mir()->needsSingletonType()) { // Objects can only be given singleton types in VM calls. masm.jump(ool->entry()); } else { - masm.newGCThing(obj, templateObj, ool->entry(), gc::DefaultHeap); - masm.initGCThing(obj, templateObj); - - if (lir->slots()->isRegister()) - masm.storePtr(ToRegister(lir->slots()), Address(obj, JSObject::offsetOfSlots())); + masm.newGCObjectAndSlots(objReg, templateObj, ool->entry(), mallocEntry, mallocRejoin, + freeEntry, gc::DefaultHeap); + masm.initGCObject(objReg, templateObj); } masm.bind(ool->rejoin()); @@ -3614,17 +3711,6 @@ CodeGenerator::visitNewCallObjectPar(LNewCallObjectPar *lir) JSObject *templateObj = lir->mir()->templateObj(); emitAllocateGCThingPar(lir, resultReg, cxReg, tempReg1, tempReg2, templateObj); - - // NB: !lir->slots()->isRegister() implies that there is no slots - // array at all, and the memory is already zeroed when copying - // from the template object - - if (lir->slots()->isRegister()) { - Register slotsReg = ToRegister(lir->slots()); - JS_ASSERT(slotsReg != resultReg); - masm.storePtr(slotsReg, Address(resultReg, JSObject::offsetOfSlots())); - } - return true; } @@ -3648,7 +3734,7 @@ CodeGenerator::visitNewDenseArrayPar(LNewDenseArrayPar *lir) // reality, we should probably just have the C helper also // *allocate* the array, but that would require that it initialize // the various fields of the object, and I didn't want to - // duplicate the code in initGCThing() that already does such an + // duplicate the code in initGCObject() that already does such an // admirable job. masm.setupUnalignedABICall(3, tempReg0); masm.passABIArg(cxReg); @@ -3683,8 +3769,8 @@ CodeGenerator::visitNewStringObject(LNewStringObject *lir) if (!ool) return false; - masm.newGCThing(output, templateObj, ool->entry(), gc::DefaultHeap); - masm.initGCThing(output, templateObj); + masm.newGCObject(output, templateObj, ool->entry(), gc::DefaultHeap); + masm.initGCObject(output, templateObj); masm.loadStringLength(input, temp); @@ -3737,7 +3823,7 @@ CodeGenerator::emitAllocateGCThingPar(LInstruction *lir, const Register &objReg, masm.newGCThingPar(objReg, cxReg, tempReg1, tempReg2, templateObj, ool->entry()); masm.bind(ool->rejoin()); - masm.initGCThing(objReg, templateObj); + masm.initGCObject(objReg, templateObj); return true; } @@ -3929,11 +4015,11 @@ CodeGenerator::visitCreateThisWithTemplate(LCreateThisWithTemplate *lir) return false; // Allocate. If the FreeList is empty, call to VM, which may GC. - masm.newGCThing(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); + masm.newGCObject(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); // Initialize based on the templateObject. masm.bind(ool->rejoin()); - masm.initGCThing(objReg, templateObject); + masm.initGCObject(objReg, templateObject); return true; } @@ -5647,8 +5733,8 @@ CodeGenerator::visitArrayConcat(LArrayConcat *lir) // Try to allocate an object. JSObject *templateObj = lir->mir()->templateObj(); - masm.newGCThing(temp1, templateObj, &fail, lir->mir()->initialHeap()); - masm.initGCThing(temp1, templateObj); + masm.newGCObject(temp1, templateObj, &fail, lir->mir()->initialHeap()); + masm.initGCObject(temp1, templateObj); masm.jump(&call); { masm.bind(&fail); @@ -6019,8 +6105,8 @@ CodeGenerator::visitRest(LRest *lir) JSObject *templateObject = lir->mir()->templateObject(); Label joinAlloc, failAlloc; - masm.newGCThing(temp2, templateObject, &failAlloc, gc::DefaultHeap); - masm.initGCThing(temp2, templateObject); + masm.newGCObject(temp2, templateObject, &failAlloc, gc::DefaultHeap); + masm.initGCObject(temp2, templateObject); masm.jump(&joinAlloc); { masm.bind(&failAlloc); diff --git a/js/src/jit/CodeGenerator.h b/js/src/jit/CodeGenerator.h index 69e6d7b7c39c..1dce043798ac 100644 --- a/js/src/jit/CodeGenerator.h +++ b/js/src/jit/CodeGenerator.h @@ -39,6 +39,8 @@ class OutOfLineLoadTypedArray; class OutOfLineNewGCThingPar; class OutOfLineUpdateCache; class OutOfLineCallPostWriteBarrier; +class OutOfLineMallocSlots; +class OutOfLineFreeSlots; class CodeGenerator : public CodeGeneratorSpecific { @@ -132,7 +134,10 @@ class CodeGenerator : public CodeGeneratorSpecific bool visitCallDirectEvalV(LCallDirectEvalV *lir); bool visitDoubleToInt32(LDoubleToInt32 *lir); bool visitFloat32ToInt32(LFloat32ToInt32 *lir); - bool visitNewSlots(LNewSlots *lir); + bool visitOutOfLineMallocSlots(OutOfLineMallocSlots *ool); + bool visitOutOfLineFreeSlots(OutOfLineFreeSlots *ool); + bool emitOutOfLineMallocFree(const Register ®, size_t nDynamicSlots, Label *fallback, + Label **mallocEntry, Label **mallocRejoin, Label **freeEntry); bool visitNewArrayCallVM(LNewArray *lir); bool visitNewArray(LNewArray *lir); bool visitOutOfLineNewArray(OutOfLineNewArray *ool); diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index ac4e882a00c9..ecfcfd0e4522 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -4596,23 +4596,9 @@ IonBuilder::createCallObject(MDefinition *callee, MDefinition *scope) // creation. CallObject *templateObj = inspector->templateCallObject(); - // If the CallObject needs dynamic slots, allocate those now. - MInstruction *slots; - if (templateObj->hasDynamicSlots()) { - size_t nslots = JSObject::dynamicSlotsCount(templateObj->numFixedSlots(), - templateObj->lastProperty()->slotSpan(templateObj->getClass()), - templateObj->getClass()); - slots = MNewSlots::New(alloc(), nslots); - } else { - slots = MConstant::New(alloc(), NullValue()); - } - current->add(slots); - - // Allocate the actual object. It is important that no intervening - // instructions could potentially bailout, thus leaking the dynamic slots - // pointer. Run-once scripts need a singleton type, so always do a VM call - // in such cases. - MNewCallObject *callObj = MNewCallObject::New(alloc(), templateObj, script()->treatAsRunOnce(), slots); + // Allocate the actual object. Run-once scripts need a singleton type, so + // always do a VM call in such cases. + MNewCallObject *callObj = MNewCallObject::New(alloc(), templateObj, script()->treatAsRunOnce()); current->add(callObj); // Initialize the object's reserved slots. No post barrier is needed here, @@ -4621,14 +4607,20 @@ IonBuilder::createCallObject(MDefinition *callee, MDefinition *scope) current->add(MStoreFixedSlot::New(alloc(), callObj, CallObject::calleeSlot(), callee)); // Initialize argument slots. + MSlots *slots = nullptr; for (AliasedFormalIter i(script()); i; i++) { unsigned slot = i.scopeSlot(); unsigned formal = i.frameIndex(); MDefinition *param = current->getSlot(info().argSlotUnchecked(formal)); - if (slot >= templateObj->numFixedSlots()) + if (slot >= templateObj->numFixedSlots()) { + if (!slots) { + slots = MSlots::New(alloc(), callObj); + current->add(slots); + } current->add(MStoreSlot::New(alloc(), slots, slot - templateObj->numFixedSlots(), param)); - else + } else { current->add(MStoreFixedSlot::New(alloc(), callObj, slot, param)); + } } return callObj; diff --git a/js/src/jit/IonMacroAssembler.cpp b/js/src/jit/IonMacroAssembler.cpp index 4a71c481cc72..0dc36362eac0 100644 --- a/js/src/jit/IonMacroAssembler.cpp +++ b/js/src/jit/IonMacroAssembler.cpp @@ -633,14 +633,11 @@ MacroAssembler::clampDoubleToUint8(FloatRegister input, Register output) #endif } +// Inlined version of gc::CheckAllocatorState that checks the bare essentials +// and bails for anything that cannot be handled with our jit allocators. void -MacroAssembler::newGCThing(const Register &result, gc::AllocKind allocKind, Label *fail, - gc::InitialHeap initialHeap /* = gc::DefaultHeap */) +MacroAssembler::checkAllocatorState(Label *fail) { - // Inlined equivalent of js::gc::NewGCThing() without failure case handling. - - int thingSize = int(gc::Arena::thingSize(allocKind)); - #ifdef JS_GC_ZEAL // Don't execute the inline path if gcZeal is active. branch32(Assembler::NotEqual, @@ -652,59 +649,164 @@ MacroAssembler::newGCThing(const Register &result, gc::AllocKind allocKind, Labe // as the metadata to use for the object may vary between executions of the op. if (GetIonContext()->compartment->hasObjectMetadataCallback()) jump(fail); +} + +// Inline Nursery::allocateObject, when it is okay to do so. Return true if we +// emitted a nursery allocation path. +bool +MacroAssembler::nurseryAllocate(const Register &result, gc::AllocKind allocKind, Label *fail, + size_t nDynamicSlots, gc::InitialHeap initialHeap) +{ + JS_ASSERT(allocKind >= gc::FINALIZE_OBJECT0 && allocKind <= gc::FINALIZE_OBJECT_LAST); #ifdef JSGC_GENERATIONAL const Nursery &nursery = GetIonContext()->runtime->gcNursery(); - if (nursery.isEnabled() && - allocKind <= gc::FINALIZE_OBJECT_LAST && - initialHeap != gc::TenuredHeap) - { - // Inline Nursery::allocate. No explicit check for nursery.isEnabled() - // is needed, as the comparison with the nursery's end will always fail - // in such cases. - loadPtr(AbsoluteAddress(nursery.addressOfPosition()), result); - addPtr(Imm32(thingSize), result); - branchPtr(Assembler::BelowOrEqual, AbsoluteAddress(nursery.addressOfCurrentEnd()), result, fail); - storePtr(result, AbsoluteAddress(nursery.addressOfPosition())); + + // When the nursery is not enabled, the nursery's position == end pointer, + // so allocations will naturally fall back to the interpreter. Thus, the + // following check is not technically necessary. However, the nursery is + // generally only perma-disabled or disabled when using zeal, so prefer to + // compile the tenured fast-path instead so we don't bail constantly. + if (!nursery.isEnabled()) + return false; + + // Explicitly request for tenured allocation for these objects. + if (initialHeap == gc::TenuredHeap) + return false; + + // This allocation site is requesting too many dynamic slots. + if (nDynamicSlots > Nursery::MaxNurserySlots) + return false; + + // No explicit check for nursery.isEnabled() is needed, as the comparison + // with the nursery's end will always fail in such cases. + int thingSize = int(gc::Arena::thingSize(allocKind)); + int totalSize = thingSize + nDynamicSlots * sizeof(HeapSlot); + loadPtr(AbsoluteAddress(nursery.addressOfPosition()), result); + addPtr(Imm32(totalSize), result); + branchPtr(Assembler::BelowOrEqual, AbsoluteAddress(nursery.addressOfCurrentEnd()), result, fail); + storePtr(result, AbsoluteAddress(nursery.addressOfPosition())); + + if (!nDynamicSlots) { + JS_ASSERT(thingSize == totalSize); + subPtr(Imm32(totalSize), result); + } else { + // Offset to get the slots pointer in |result|. + subPtr(Imm32(totalSize - thingSize), result); + // Store the slots pointer into slots address as an offset from the + // slots so that we do not need to take a second register. + JS_ASSERT(int(JSObject::offsetOfSlots()) - thingSize < 0); + storePtr(result, Address(result, int(JSObject::offsetOfSlots()) - thingSize)); + // Load the start of the object into result. subPtr(Imm32(thingSize), result); - return; } + + return true; +#else + return false; #endif // JSGC_GENERATIONAL +} +// Inlined version of FreeSpan::allocate. +void +MacroAssembler::freeSpanAllocate(const Register &result, gc::AllocKind allocKind, Label *fail) +{ CompileZone *zone = GetIonContext()->compartment->zone(); + int thingSize = int(gc::Arena::thingSize(allocKind)); - // Inline FreeSpan::allocate. - // There is always exactly one FreeSpan per allocKind per JSCompartment. - // If a FreeSpan is replaced, its members are updated in the freeLists table, - // which the code below always re-reads. + // Load FreeSpan::first of |zone|'s freeLists for |allocKind|. If there is + // no room remaining in the span, we bail to finish the allocation. The + // interpreter will call |refillFreeLists|, setting up a new FreeSpan so + // that we can continue allocating in the jit. loadPtr(AbsoluteAddress(zone->addressOfFreeListFirst(allocKind)), result); branchPtr(Assembler::BelowOrEqual, AbsoluteAddress(zone->addressOfFreeListLast(allocKind)), result, fail); - addPtr(Imm32(thingSize), result); storePtr(result, AbsoluteAddress(zone->addressOfFreeListFirst(allocKind))); subPtr(Imm32(thingSize), result); } +// Inlined equivalent of gc::AllocateObject, without failure case handling. void -MacroAssembler::newGCThing(const Register &result, JSObject *templateObject, - Label *fail, gc::InitialHeap initialHeap) +MacroAssembler::allocateObject(const Register &result, gc::AllocKind allocKind, Label *fallback, + Label *mallocEntry, Label *mallocRejoin, Label *freeEntry, + size_t nDynamicSlots, gc::InitialHeap initialHeap) +{ + JS_ASSERT_IF(nDynamicSlots, mallocEntry && mallocRejoin && freeEntry); + + checkAllocatorState(fallback); + if (nurseryAllocate(result, allocKind, fallback, nDynamicSlots, initialHeap)) + return; + + if (!nDynamicSlots) { + freeSpanAllocate(result, allocKind, fallback); + } else { + // Exit to do the malloc out-of-line. + jump(mallocEntry); + + // Since we have to jump out-of-line anyway, insert our failure + // handling code into the jumped-over block so that it does not force a + // jump in the success case below. + Label allocFail; + bind(&allocFail); + pop(result); + jump(freeEntry); + + // Rejoin from successful malloc; malloc failure falls straight though + // to the fallback since there is no cleanup to do yet. + bind(mallocRejoin); + + // Save our malloc pointer to the stack so we can re-use the register. + push(result); + + // Allocate the object and write the malloced slots. + freeSpanAllocate(result, allocKind, &allocFail); + pop(Address(result, JSObject::offsetOfSlots())); + } +} + +// Inlined equivalent of gc::AllocateNonObject, without failure case handling. +// Non-object allocation does not need to worry about slots, so can take a +// simpler path. +void +MacroAssembler::allocateNonObject(const Register &result, gc::AllocKind allocKind, Label *fail) +{ + checkAllocatorState(fail); + freeSpanAllocate(result, allocKind, fail); +} + +void +MacroAssembler::newGCObject(const Register &result, JSObject *templateObject, Label *fallback, + gc::InitialHeap initialHeap) +{ + gc::AllocKind allocKind = templateObject->tenuredGetAllocKind(); + JS_ASSERT(allocKind >= gc::FINALIZE_OBJECT0 && allocKind <= gc::FINALIZE_OBJECT_LAST); + JS_ASSERT(templateObject->numDynamicSlots() == 0); + + allocateObject(result, allocKind, fallback, nullptr, nullptr, nullptr, 0, initialHeap); +} + +void +MacroAssembler::newGCObjectAndSlots(const Register &result, JSObject *templateObject, Label *fallback, + Label *mallocEntry, Label *mallocRejoin, Label *freeEntry, + gc::InitialHeap initialHeap) { gc::AllocKind allocKind = templateObject->tenuredGetAllocKind(); JS_ASSERT(allocKind >= gc::FINALIZE_OBJECT0 && allocKind <= gc::FINALIZE_OBJECT_LAST); - newGCThing(result, allocKind, fail, initialHeap); + allocateObject(result, allocKind, fallback, mallocEntry, mallocRejoin, freeEntry, + templateObject->numDynamicSlots(), initialHeap); } void MacroAssembler::newGCString(const Register &result, Label *fail) { - newGCThing(result, js::gc::FINALIZE_STRING, fail); + allocateNonObject(result, js::gc::FINALIZE_STRING, fail); } void MacroAssembler::newGCShortString(const Register &result, Label *fail) { - newGCThing(result, js::gc::FINALIZE_SHORT_STRING, fail); + allocateNonObject(result, js::gc::FINALIZE_SHORT_STRING, fail); } void @@ -753,6 +855,9 @@ MacroAssembler::newGCThingPar(const Register &result, const Register &cx, // Update `first` // tempReg1->first = tempReg2; storePtr(tempReg2, Address(tempReg1, offsetof(gc::FreeSpan, first))); + + // Initialize slots to nullptr, so that we can share initGCObject. + storePtr(ImmPtr(nullptr), Address(result, JSObject::offsetOfSlots())); } void @@ -783,7 +888,31 @@ MacroAssembler::newGCShortStringPar(const Register &result, const Register &cx, } void -MacroAssembler::initGCThing(const Register &obj, JSObject *templateObject) +MacroAssembler::initGCSlots(const Register &obj, JSObject *templateObject) +{ + // Slots of non-array objects are required to be initialized. + // Use the values currently in the template object. + uint32_t nslots = templateObject->lastProperty()->slotSpan(templateObject->getClass()); + if (nslots == 0) + return; + + uint32_t nfixed = Min(templateObject->numFixedSlots(), nslots); + for (unsigned i = 0; i < nfixed; i++) + storeValue(templateObject->getFixedSlot(i), Address(obj, JSObject::getFixedSlotOffset(i))); + + if (nfixed < nslots) { + JS_ASSERT(nslots - nfixed <= templateObject->numDynamicSlots()); + + push(obj); + loadPtr(Address(obj, JSObject::offsetOfSlots()), obj); + for (unsigned i = 0; i < nslots - nfixed; ++i) + storeValue(templateObject->getDynamicSlot(i), Address(obj, i * sizeof(HeapSlot))); + pop(obj); + } +} + +void +MacroAssembler::initGCObject(const Register &obj, JSObject *templateObject) { // Fast initialization of an empty object returned by NewGCThing(). @@ -791,7 +920,9 @@ MacroAssembler::initGCThing(const Register &obj, JSObject *templateObject) storePtr(ImmGCPtr(templateObject->lastProperty()), Address(obj, JSObject::offsetOfShape())); storePtr(ImmGCPtr(templateObject->type()), Address(obj, JSObject::offsetOfType())); - storePtr(ImmPtr(nullptr), Address(obj, JSObject::offsetOfSlots())); + // Note: if we needed external slots, |slots| was initialized by object allocation. + if (!templateObject->hasDynamicSlots()) + storePtr(ImmPtr(nullptr), Address(obj, JSObject::offsetOfSlots())); if (templateObject->is()) { JS_ASSERT(!templateObject->getDenseInitializedLength()); @@ -813,24 +944,16 @@ MacroAssembler::initGCThing(const Register &obj, JSObject *templateObject) ? ObjectElements::CONVERT_DOUBLE_ELEMENTS : 0), Address(obj, elementsOffset + ObjectElements::offsetOfFlags())); + JS_ASSERT(!templateObject->hasPrivate()); } else { storePtr(ImmPtr(emptyObjectElements), Address(obj, JSObject::offsetOfElements())); - - // Fixed slots of non-array objects are required to be initialized. - // Use the values currently in the template object. - size_t nslots = Min(templateObject->numFixedSlots(), - templateObject->lastProperty()->slotSpan(templateObject->getClass())); - for (unsigned i = 0; i < nslots; i++) { - storeValue(templateObject->getFixedSlot(i), - Address(obj, JSObject::getFixedSlotOffset(i))); + initGCSlots(obj, templateObject); + if (templateObject->hasPrivate()) { + uint32_t nfixed = templateObject->numFixedSlots(); + storePtr(ImmPtr(templateObject->getPrivate()), + Address(obj, JSObject::getPrivateDataOffset(nfixed))); } } - - if (templateObject->hasPrivate()) { - uint32_t nfixed = templateObject->numFixedSlots(); - storePtr(ImmPtr(templateObject->getPrivate()), - Address(obj, JSObject::getPrivateDataOffset(nfixed))); - } } void diff --git a/js/src/jit/IonMacroAssembler.h b/js/src/jit/IonMacroAssembler.h index bbde4788ac42..7c1fb0dde423 100644 --- a/js/src/jit/IonMacroAssembler.h +++ b/js/src/jit/IonMacroAssembler.h @@ -783,10 +783,24 @@ class MacroAssembler : public MacroAssemblerSpecific Label *label); // Inline allocation. - void newGCThing(const Register &result, gc::AllocKind allocKind, Label *fail, - gc::InitialHeap initialHeap = gc::DefaultHeap); - void newGCThing(const Register &result, JSObject *templateObject, Label *fail, - gc::InitialHeap initialHeap); + private: + void checkAllocatorState(Label *fail); + bool nurseryAllocate(const Register &result, gc::AllocKind allocKind, Label *fail, + size_t nDynamicSlots, gc::InitialHeap initialHeap); + void freeSpanAllocate(const Register &result, gc::AllocKind allocKind, Label *fail); + void allocateObject(const Register &result, gc::AllocKind allocKind, Label *fail, + Label *oolMalloc, Label *oolMallocExit, Label *oolFree, + size_t nDynamicSlots, gc::InitialHeap initialHeap); + void allocateNonObject(const Register &result, gc::AllocKind allocKind, Label *fail); + void initGCSlots(const Register &obj, JSObject *templateObject); + public: + void newGCObject(const Register &result, JSObject *templateObject, Label *fail, + gc::InitialHeap initialHeap); + void newGCObjectAndSlots(const Register &result, JSObject *templateObject, Label *fail, + Label *oolMalloc, Label *oolMallocExit, Label *oolFree, + gc::InitialHeap initialHeap); + void initGCObject(const Register &obj, JSObject *templateObject); + void newGCString(const Register &result, Label *fail); void newGCShortString(const Register &result, Label *fail); @@ -796,13 +810,13 @@ class MacroAssembler : public MacroAssemblerSpecific void newGCThingPar(const Register &result, const Register &cx, const Register &tempReg1, const Register &tempReg2, JSObject *templateObject, Label *fail); + void newGCStringPar(const Register &result, const Register &cx, const Register &tempReg1, const Register &tempReg2, Label *fail); void newGCShortStringPar(const Register &result, const Register &cx, const Register &tempReg1, const Register &tempReg2, Label *fail); - void initGCThing(const Register &obj, JSObject *templateObject); // Compares two strings for equality based on the JSOP. // This checks for identical pointers, atoms and length and fails for everything else. diff --git a/js/src/jit/LIR-Common.h b/js/src/jit/LIR-Common.h index 1cbfda332e52..b35f70bca112 100644 --- a/js/src/jit/LIR-Common.h +++ b/js/src/jit/LIR-Common.h @@ -302,32 +302,6 @@ class LGoto : public LControlInstructionHelper<1, 0, 0> } }; -class LNewSlots : public LCallInstructionHelper<1, 0, 3> -{ - public: - LIR_HEADER(NewSlots) - - LNewSlots(const LDefinition &temp1, const LDefinition &temp2, const LDefinition &temp3) { - setTemp(0, temp1); - setTemp(1, temp2); - setTemp(2, temp3); - } - - const LDefinition *temp1() { - return getTemp(0); - } - const LDefinition *temp2() { - return getTemp(1); - } - const LDefinition *temp3() { - return getTemp(2); - } - - MNewSlots *mir() const { - return mir_->toNewSlots(); - } -}; - class LNewArray : public LInstructionHelper<1, 0, 0> { public: @@ -440,39 +414,27 @@ class LNewDeclEnvObject : public LInstructionHelper<1, 0, 0> } }; -// Allocates a new CallObject. The inputs are: -// slots: either a reg representing a HeapSlot *, or a placeholder -// meaning that no slots pointer is needed. +// Allocates a new CallObject. // // This instruction generates two possible instruction sets: // (1) If the call object is extensible, this is a callVM to create the // call object. // (2) Otherwise, an inline allocation of the call object is attempted. // -class LNewCallObject : public LInstructionHelper<1, 1, 0> +class LNewCallObject : public LInstructionHelper<1, 0, 0> { public: LIR_HEADER(NewCallObject) - LNewCallObject(const LAllocation &slots) { - setOperand(0, slots); - } - - const LAllocation *slots() { - return getOperand(0); - } MNewCallObject *mir() const { return mir_->toNewCallObject(); } }; -class LNewCallObjectPar : public LInstructionHelper<1, 2, 2> +class LNewCallObjectPar : public LInstructionHelper<1, 1, 2> { - LNewCallObjectPar(const LAllocation &cx, const LAllocation &slots, - const LDefinition &temp1, const LDefinition &temp2) - { + LNewCallObjectPar(const LAllocation &cx, const LDefinition &temp1, const LDefinition &temp2) { setOperand(0, cx); - setOperand(1, slots); setTemp(0, temp1); setTemp(1, temp2); } @@ -480,37 +442,16 @@ class LNewCallObjectPar : public LInstructionHelper<1, 2, 2> public: LIR_HEADER(NewCallObjectPar); - static LNewCallObjectPar *NewWithSlots(TempAllocator &alloc, - const LAllocation &cx, const LAllocation &slots, - const LDefinition &temp1, const LDefinition &temp2) + static LNewCallObjectPar *New(TempAllocator &alloc, const LAllocation &cx, + const LDefinition &temp1, const LDefinition &temp2) { - return new(alloc) LNewCallObjectPar(cx, slots, temp1, temp2); - } - - static LNewCallObjectPar *NewSansSlots(TempAllocator &alloc, - const LAllocation &cx, - const LDefinition &temp1, const LDefinition &temp2) - { - LAllocation slots = LConstantIndex::Bogus(); - return new(alloc) LNewCallObjectPar(cx, slots, temp1, temp2); + return new(alloc) LNewCallObjectPar(cx, temp1, temp2); } const LAllocation *forkJoinContext() { return getOperand(0); } - const LAllocation *slots() { - return getOperand(1); - } - - const bool hasDynamicSlots() { - // TO INVESTIGATE: Felix tried using isRegister() method here, - // but for useFixed(_, CallTempN), isRegister() is false (and - // isUse() is true). So for now ignore that and try to match - // the LConstantIndex::Bogus() generated above instead. - return slots() && ! slots()->isConstant(); - } - const MNewCallObjectPar *mir() const { return mir_->toNewCallObjectPar(); } diff --git a/js/src/jit/LOpcodes.h b/js/src/jit/LOpcodes.h index 03c46126a8a6..2d9b32968bb5 100644 --- a/js/src/jit/LOpcodes.h +++ b/js/src/jit/LOpcodes.h @@ -25,7 +25,6 @@ _(Goto) \ _(NewArray) \ _(NewObject) \ - _(NewSlots) \ _(NewDeclEnvObject) \ _(NewCallObject) \ _(NewStringObject) \ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index 44df0e88151c..ea9dad18c765 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -160,17 +160,6 @@ LIRGenerator::visitDefFun(MDefFun *ins) return add(lir, ins) && assignSafepoint(lir, ins); } -bool -LIRGenerator::visitNewSlots(MNewSlots *ins) -{ - // No safepoint needed, since we don't pass a cx. - LNewSlots *lir = new(alloc()) LNewSlots(tempFixed(CallTempReg0), tempFixed(CallTempReg1), - tempFixed(CallTempReg2)); - if (!assignSnapshot(lir)) - return false; - return defineReturn(lir, ins); -} - bool LIRGenerator::visitNewArray(MNewArray *ins) { @@ -195,13 +184,7 @@ LIRGenerator::visitNewDeclEnvObject(MNewDeclEnvObject *ins) bool LIRGenerator::visitNewCallObject(MNewCallObject *ins) { - LAllocation slots; - if (ins->slots()->type() == MIRType_Slots) - slots = useRegister(ins->slots()); - else - slots = LConstantIndex::Bogus(); - - LNewCallObject *lir = new(alloc()) LNewCallObject(slots); + LNewCallObject *lir = new(alloc()) LNewCallObject(); if (!define(lir, ins)) return false; @@ -228,14 +211,7 @@ LIRGenerator::visitNewCallObjectPar(MNewCallObjectPar *ins) const LDefinition &temp1 = temp(); const LDefinition &temp2 = temp(); - LNewCallObjectPar *lir; - if (ins->slots()->type() == MIRType_Slots) { - const LAllocation &slots = useRegister(ins->slots()); - lir = LNewCallObjectPar::NewWithSlots(alloc(), parThreadContext, slots, temp1, temp2); - } else { - lir = LNewCallObjectPar::NewSansSlots(alloc(), parThreadContext, temp1, temp2); - } - + LNewCallObjectPar *lir = LNewCallObjectPar::New(alloc(), parThreadContext, temp1, temp2); return define(lir, ins); } diff --git a/js/src/jit/Lowering.h b/js/src/jit/Lowering.h index 8d18ff23f18b..1ca8aa465afa 100644 --- a/js/src/jit/Lowering.h +++ b/js/src/jit/Lowering.h @@ -66,7 +66,6 @@ class LIRGenerator : public LIRGeneratorSpecific bool visitCallee(MCallee *callee); bool visitGoto(MGoto *ins); bool visitTableSwitch(MTableSwitch *tableswitch); - bool visitNewSlots(MNewSlots *ins); bool visitNewArray(MNewArray *ins); bool visitNewObject(MNewObject *ins); bool visitNewDeclEnvObject(MNewDeclEnvObject *ins); diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 2e57b8172f8c..4c199199fcb6 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -8860,33 +8860,6 @@ class MPostWriteBarrier #endif }; -class MNewSlots : public MNullaryInstruction -{ - unsigned nslots_; - - MNewSlots(unsigned nslots) - : nslots_(nslots) - { - setResultType(MIRType_Slots); - } - - public: - INSTRUCTION_HEADER(NewSlots) - - static MNewSlots *New(TempAllocator &alloc, unsigned nslots) { - return new(alloc) MNewSlots(nslots); - } - unsigned nslots() const { - return nslots_; - } - AliasSet getAliasSet() const { - return AliasSet::None(); - } - bool possiblyCalls() const { - return true; - } -}; - class MNewDeclEnvObject : public MNullaryInstruction { CompilerRootObject templateObj_; @@ -8913,13 +8886,13 @@ class MNewDeclEnvObject : public MNullaryInstruction } }; -class MNewCallObject : public MUnaryInstruction +class MNewCallObject : public MNullaryInstruction { CompilerRootObject templateObj_; bool needsSingletonType_; - MNewCallObject(JSObject *templateObj, bool needsSingletonType, MDefinition *slots) - : MUnaryInstruction(slots), + MNewCallObject(JSObject *templateObj, bool needsSingletonType) + : MNullaryInstruction(), templateObj_(templateObj), needsSingletonType_(needsSingletonType) { @@ -8929,15 +8902,11 @@ class MNewCallObject : public MUnaryInstruction public: INSTRUCTION_HEADER(NewCallObject) - static MNewCallObject *New(TempAllocator &alloc, JSObject *templateObj, bool needsSingletonType, - MDefinition *slots) + static MNewCallObject *New(TempAllocator &alloc, JSObject *templateObj, bool needsSingletonType) { - return new(alloc) MNewCallObject(templateObj, needsSingletonType, slots); + return new(alloc) MNewCallObject(templateObj, needsSingletonType); } - MDefinition *slots() { - return getOperand(0); - } JSObject *templateObject() { return templateObj_; } @@ -8949,13 +8918,13 @@ class MNewCallObject : public MUnaryInstruction } }; -class MNewCallObjectPar : public MBinaryInstruction +class MNewCallObjectPar : public MUnaryInstruction { CompilerRootObject templateObj_; - MNewCallObjectPar(MDefinition *cx, JSObject *templateObj, MDefinition *slots) - : MBinaryInstruction(cx, slots), - templateObj_(templateObj) + MNewCallObjectPar(MDefinition *cx, JSObject *templateObj) + : MUnaryInstruction(cx), + templateObj_(templateObj) { setResultType(MIRType_Object); } @@ -8964,17 +8933,14 @@ class MNewCallObjectPar : public MBinaryInstruction INSTRUCTION_HEADER(NewCallObjectPar); static MNewCallObjectPar *New(TempAllocator &alloc, MDefinition *cx, MNewCallObject *callObj) { - return new(alloc) MNewCallObjectPar(cx, callObj->templateObject(), callObj->slots()); + JS_ASSERT(!callObj->templateObject()->hasDynamicSlots()); + return new(alloc) MNewCallObjectPar(cx, callObj->templateObject()); } MDefinition *forkJoinContext() const { return getOperand(0); } - MDefinition *slots() const { - return getOperand(1); - } - JSObject *templateObj() const { return templateObj_; } diff --git a/js/src/jit/MOpcodes.h b/js/src/jit/MOpcodes.h index 85e49fece67d..d85ce588f88f 100644 --- a/js/src/jit/MOpcodes.h +++ b/js/src/jit/MOpcodes.h @@ -85,7 +85,6 @@ namespace jit { _(ToInt32) \ _(TruncateToInt32) \ _(ToString) \ - _(NewSlots) \ _(NewArray) \ _(NewObject) \ _(NewDeclEnvObject) \ diff --git a/js/src/jit/ParallelSafetyAnalysis.cpp b/js/src/jit/ParallelSafetyAnalysis.cpp index bd5d1fd3dee0..da165596d7ab 100644 --- a/js/src/jit/ParallelSafetyAnalysis.cpp +++ b/js/src/jit/ParallelSafetyAnalysis.cpp @@ -179,7 +179,6 @@ class ParallelSafetyVisitor : public MInstructionVisitor SAFE_OP(TruncateToInt32) SAFE_OP(MaybeToDoubleElement) CUSTOM_OP(ToString) - SAFE_OP(NewSlots) CUSTOM_OP(NewArray) CUSTOM_OP(NewObject) CUSTOM_OP(NewCallObject) @@ -523,6 +522,10 @@ ParallelSafetyVisitor::visitCreateThisWithTemplate(MCreateThisWithTemplate *ins) bool ParallelSafetyVisitor::visitNewCallObject(MNewCallObject *ins) { + if (ins->templateObject()->hasDynamicSlots()) { + SpewMIR(ins, "call with dynamic slots"); + return markUnsafe(); + } replace(ins, MNewCallObjectPar::New(alloc(), ForkJoinContext(), ins)); return true; } @@ -637,11 +640,6 @@ ParallelSafetyVisitor::insertWriteGuard(MInstruction *writeInstruction, object = valueBeingWritten->toSlots()->object(); break; - case MDefinition::Op_NewSlots: - // Values produced by new slots will ALWAYS be - // thread-local. - return true; - default: SpewMIR(writeInstruction, "cannot insert write guard for %s", valueBeingWritten->opName()); diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index c2be497b054e..3e3010e70c94 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -514,21 +514,23 @@ NewSlots(JSRuntime *rt, unsigned nslots) { JS_STATIC_ASSERT(sizeof(Value) == sizeof(HeapSlot)); - Value *slots = reinterpret_cast(rt->malloc_(nslots * sizeof(Value))); + Value *slots = rt->pod_malloc(nslots); if (!slots) return nullptr; - for (unsigned i = 0; i < nslots; i++) - slots[i] = UndefinedValue(); - return reinterpret_cast(slots); } -JSObject * -NewCallObject(JSContext *cx, HandleScript script, - HandleShape shape, HandleTypeObject type, HeapSlot *slots) +void +FreeSlots(HeapSlot *slots) { - JSObject *obj = CallObject::create(cx, script, shape, type, slots); + js_free(slots); +} + +JSObject * +NewCallObject(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type) +{ + JSObject *obj = CallObject::create(cx, script, shape, type); if (!obj) return nullptr; diff --git a/js/src/jit/VMFunctions.h b/js/src/jit/VMFunctions.h index 86e0a03ad4c1..e41836e7d040 100644 --- a/js/src/jit/VMFunctions.h +++ b/js/src/jit/VMFunctions.h @@ -618,8 +618,9 @@ bool SetProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Handl bool InterruptCheck(JSContext *cx); HeapSlot *NewSlots(JSRuntime *rt, unsigned nslots); -JSObject *NewCallObject(JSContext *cx, HandleScript script, - HandleShape shape, HandleTypeObject type, HeapSlot *slots); +void FreeSlots(HeapSlot *slots); +JSObject *NewCallObject(JSContext *cx, HandleScript script, HandleShape shape, + HandleTypeObject type); JSObject *NewStringObject(JSContext *cx, HandleString str); bool SPSEnter(JSContext *cx, HandleScript script); diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler-arm.h index a12cfd3360bb..785b45e42907 100644 --- a/js/src/jit/arm/MacroAssembler-arm.h +++ b/js/src/jit/arm/MacroAssembler-arm.h @@ -626,6 +626,10 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM void pop(const FloatRegister ®) { ma_vpop(VFPRegister(reg)); } + void pop(const Address &address) { + ma_ldr(Operand(address.base, address.offset), ScratchRegister); + ma_pop(ScratchRegister); + } void popN(const Register ®, Imm32 extraSpace) { Imm32 totSpace = Imm32(extraSpace.value + 4); diff --git a/js/src/jit/shared/Assembler-x86-shared.h b/js/src/jit/shared/Assembler-x86-shared.h index 0b8e38ef072f..25ead31a00e6 100644 --- a/js/src/jit/shared/Assembler-x86-shared.h +++ b/js/src/jit/shared/Assembler-x86-shared.h @@ -1181,20 +1181,23 @@ class AssemblerX86Shared masm.push_m(src.offset, src.base.code()); } - void pop(const Operand &src) { - switch (src.kind()) { + void pop(const Operand &dest) { + switch (dest.kind()) { case Operand::REG: - masm.pop_r(src.reg()); + masm.pop_r(dest.reg()); break; case Operand::MEM_REG_DISP: - masm.pop_m(src.disp(), src.base()); + masm.pop_m(dest.disp(), dest.base()); break; default: MOZ_ASSUME_UNREACHABLE("unexpected operand kind"); } } - void pop(const Register &src) { - masm.pop_r(src.code()); + void pop(const Register &dest) { + masm.pop_r(dest.code()); + } + void pop(const Address &dest) { + masm.pop_m(dest.offset, dest.base.code()); } void pushFlags() { diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index d7efd3442546..c077f913e2e0 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -940,16 +940,13 @@ JS::DisableGenerationalGC(JSRuntime *rt) rt->gcStoreBuffer.disable(); } #endif - ++rt->gcGenerationalDisabled; } extern JS_FRIEND_API(void) JS::EnableGenerationalGC(JSRuntime *rt) { - JS_ASSERT(rt->gcGenerationalDisabled > 0); - --rt->gcGenerationalDisabled; #ifdef JSGC_GENERATIONAL - if (IsGenerationalGCEnabled(rt)) { + if (!IsGenerationalGCEnabled(rt)) { rt->gcNursery.enable(); rt->gcStoreBuffer.enable(); } @@ -959,7 +956,11 @@ JS::EnableGenerationalGC(JSRuntime *rt) extern JS_FRIEND_API(bool) JS::IsGenerationalGCEnabled(JSRuntime *rt) { - return rt->gcGenerationalDisabled == 0; +#ifdef JSGC_GENERATIONAL + return rt->gcNursery.isEnabled(); +#else + return false; +#endif } JS_FRIEND_API(bool) diff --git a/js/src/jsobj.h b/js/src/jsobj.h index 724a807124cd..f303402fb126 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -255,8 +255,7 @@ class JSObject : public js::ObjectImpl js::gc::AllocKind kind, js::gc::InitialHeap heap, js::HandleShape shape, - js::HandleTypeObject type, - js::HeapSlot *extantSlots = nullptr); + js::HandleTypeObject type); /* Make an array object with the specified initial state. */ static inline js::ArrayObject *createArray(js::ExclusiveContext *cx, diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 07794b7f6719..560448cd3cb5 100644 --- a/js/src/jsobjinlines.h +++ b/js/src/jsobjinlines.h @@ -480,8 +480,7 @@ inline bool JSObject::isVarObj() /* static */ inline JSObject * JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::InitialHeap heap, - js::HandleShape shape, js::HandleTypeObject type, - js::HeapSlot *extantSlots /* = nullptr */) + js::HandleShape shape, js::HandleTypeObject type) { /* * Callers must use dynamicSlotsCount to size the initial slot array of the @@ -494,13 +493,9 @@ JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::Initi JS_ASSERT(js::gc::GetGCKindSlots(kind, type->clasp()) == shape->numFixedSlots()); JS_ASSERT_IF(type->clasp()->flags & JSCLASS_BACKGROUND_FINALIZE, IsBackgroundFinalized(kind)); JS_ASSERT_IF(type->clasp()->finalize, heap == js::gc::TenuredHeap); - JS_ASSERT_IF(extantSlots, dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(), - type->clasp())); const js::Class *clasp = type->clasp(); - size_t nDynamicSlots = 0; - if (!extantSlots) - nDynamicSlots = dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(), clasp); + size_t nDynamicSlots = dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(), clasp); JSObject *obj = js::NewGCObject(cx, kind, nDynamicSlots, heap); if (!obj) @@ -508,13 +503,7 @@ JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::Initi obj->shape_.init(shape); obj->type_.init(type); - if (extantSlots) { -#ifdef JSGC_GENERATIONAL - if (cx->isJSContext()) - cx->asJSContext()->runtime()->gcNursery.notifyInitialSlots(obj, extantSlots); -#endif - obj->slots = extantSlots; - } + JS_ASSERT_IF(nDynamicSlots, obj->slots); obj->elements = js::emptyObjectElements; if (clasp->hasPrivate()) diff --git a/js/src/vm/ObjectImpl.h b/js/src/vm/ObjectImpl.h index 31f08d50cbbb..3b19270f17fb 100644 --- a/js/src/vm/ObjectImpl.h +++ b/js/src/vm/ObjectImpl.h @@ -1387,6 +1387,12 @@ class ObjectImpl : public gc::BarrieredCell return fixedSlots()[slot]; } + const Value &getDynamicSlot(uint32_t slot) const { + MOZ_ASSERT(slots); + MOZ_ASSERT(slot < numDynamicSlots()); + return slots[slot]; + } + void setFixedSlot(uint32_t slot, const Value &value) { MOZ_ASSERT(slot < numFixedSlots()); fixedSlots()[slot].set(this->asObjectPtr(), HeapSlot::Slot, slot, value); diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index cf1ba2301803..ea6360849409 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -216,7 +216,6 @@ JSRuntime::JSRuntime(JSUseHelperThreads useHelperThreads) gcInterFrameGC(0), gcSliceBudget(SliceBudget::Unlimited), gcIncrementalEnabled(true), - gcGenerationalDisabled(0), gcManipulatingDeadZones(false), gcObjectsMarkedInDeadZones(0), gcPoke(false), diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index 55ec0338f1a3..b5aa9bd936e4 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -1116,11 +1116,6 @@ struct JSRuntime : public JS::shadow::Runtime, */ bool gcIncrementalEnabled; - /* - * GGC can be enabled from the command line while testing. - */ - unsigned gcGenerationalDisabled; - /* * This is true if we are in the middle of a brain transplant (e.g., * JS_TransplantObject) or some other operation that can manipulate diff --git a/js/src/vm/ScopeObject.cpp b/js/src/vm/ScopeObject.cpp index 16afe8b4769e..c3e0c0d755f9 100644 --- a/js/src/vm/ScopeObject.cpp +++ b/js/src/vm/ScopeObject.cpp @@ -137,18 +137,18 @@ ScopeObject::setEnclosingScope(HandleObject obj) } /* - * Construct a bare-bones call object given a shape, type, and slots pointer. + * Construct a bare-bones call object given a shape and type. * The call object must be further initialized to be usable. */ CallObject * -CallObject::create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type, HeapSlot *slots) +CallObject::create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type) { gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots()); JS_ASSERT(CanBeFinalizedInBackground(kind, &CallObject::class_)); kind = gc::GetBackgroundAllocKind(kind); gc::InitialHeap heap = script->treatAsRunOnce() ? gc::TenuredHeap : gc::DefaultHeap; - JSObject *obj = JSObject::create(cx, kind, heap, shape, type, slots); + JSObject *obj = JSObject::create(cx, kind, heap, shape, type); if (!obj) return nullptr; diff --git a/js/src/vm/ScopeObject.h b/js/src/vm/ScopeObject.h index 2a668e988bf1..21deb956df4c 100644 --- a/js/src/vm/ScopeObject.h +++ b/js/src/vm/ScopeObject.h @@ -237,7 +237,7 @@ class CallObject : public ScopeObject /* These functions are internal and are exposed only for JITs. */ static CallObject * - create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type, HeapSlot *slots); + create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type); static CallObject * createTemplateObject(JSContext *cx, HandleScript script, gc::InitialHeap heap); From 73215fbe2cbd602b2cccc3ff5c7ac0d141fae28e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 13:10:10 -0800 Subject: [PATCH 02/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/382af669abf4 Author: Kevin Grandon Desc: Merge pull request #16271 from KevinGrandon/bug_971561_system_banner_v2 Bug 971561 - [System2] Instantiable SystemBanner r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/c11fa009d1cb Author: Kevin Grandon Desc: Bug 971561 - [System2] Instantiable SystemBanner r=alive --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 8426fbb1432b..bb1585e3836b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "1adfbae4582a2cebf4b35c822044299aa8dd1026", + "revision": "382af669abf48d0492f707b523901f0ec364e10b", "repo_path": "/integration/gaia-central" } From e8a7570ffc775536c821d069ecc0234a59cfc74d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 13:16:02 -0800 Subject: [PATCH 03/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 67ac3e19088a..693b358a4aa5 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 3e52bbe5eb3e..2057fdb271ba 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 67ac3e19088a..693b358a4aa5 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index b0b9308c8625..0063dc714949 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index cdee45f731ce..c389ab1d1ce5 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 08599d12b159..d831d8aca2ba 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 8605ef239ed6..cf9a802545b9 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 1a53811158c1..82c05f574d24 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index e069cc91cb77..35b66439b458 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From 415a94a6de064694c0d1497b914ac7cee0534166 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 18 Feb 2014 13:32:06 +1100 Subject: [PATCH 04/56] Bug 961364 - Clear the column type bits before setting them in nsTableCol{,Group}Frame::SetColType. r=dbaron --- layout/tables/nsTableColFrame.cpp | 3 ++- layout/tables/nsTableColGroupFrame.cpp | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp index 82135a991126..da50d5d438c0 100644 --- a/layout/tables/nsTableColFrame.cpp +++ b/layout/tables/nsTableColFrame.cpp @@ -47,7 +47,8 @@ nsTableColFrame::SetColType(nsTableColType aType) GetPrevContinuation()->GetNextSibling() == this), "spanned content cols must be continuations"); uint32_t type = aType - eColContent; - mState |= nsFrameState(type << COL_TYPE_OFFSET); + RemoveStateBits(COL_TYPE_BITS); + AddStateBits(nsFrameState(type << COL_TYPE_OFFSET)); } /* virtual */ void diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 51e312dee47a..0dfa7781805b 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -26,8 +26,12 @@ nsTableColGroupFrame::GetColType() const void nsTableColGroupFrame::SetColType(nsTableColGroupType aType) { + NS_ASSERTION(GetColType() == eColGroupContent, + "should only call nsTableColGroupFrame::SetColType with aType " + "!= eColGroupContent once"); uint32_t type = aType - eColGroupContent; - mState |= nsFrameState(type << COL_GROUP_TYPE_OFFSET); + RemoveStateBits(COL_GROUP_TYPE_BITS); + AddStateBits(nsFrameState(type << COL_GROUP_TYPE_OFFSET)); } void nsTableColGroupFrame::ResetColIndices(nsIFrame* aFirstColGroup, From 4412156bf4db875a52a883658bcaf2b62ef7c5ea Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Mon, 17 Feb 2014 19:22:34 -0800 Subject: [PATCH 05/56] Backout bea3f06585ec (Bug 969012) for arm simulator failures. --- js/src/builtin/TestingFunctions.cpp | 31 -- js/src/gc/Nursery.cpp | 14 +- js/src/gc/Nursery.h | 9 +- js/src/jit-test/tests/basic/bug908915.js | 4 +- .../tests/ion/callobj-malloc-slots.js | 308 ------------------ .../tests/parallel/closure-nested-branch.js | 14 + .../tests/parallel/closure-nested-compute.js | 14 + js/src/jit/CodeGenerator.cpp | 244 +++++--------- js/src/jit/CodeGenerator.h | 7 +- js/src/jit/IonBuilder.cpp | 30 +- js/src/jit/IonMacroAssembler.cpp | 211 +++--------- js/src/jit/IonMacroAssembler.h | 24 +- js/src/jit/LIR-Common.h | 73 ++++- js/src/jit/LOpcodes.h | 1 + js/src/jit/Lowering.cpp | 28 +- js/src/jit/Lowering.h | 1 + js/src/jit/MIR.h | 56 +++- js/src/jit/MOpcodes.h | 1 + js/src/jit/ParallelSafetyAnalysis.cpp | 10 +- js/src/jit/VMFunctions.cpp | 16 +- js/src/jit/VMFunctions.h | 5 +- js/src/jit/arm/MacroAssembler-arm.h | 4 - js/src/jit/shared/Assembler-x86-shared.h | 15 +- js/src/jsfriendapi.cpp | 11 +- js/src/jsobj.h | 3 +- js/src/jsobjinlines.h | 17 +- js/src/vm/ObjectImpl.h | 6 - js/src/vm/Runtime.cpp | 1 + js/src/vm/Runtime.h | 5 + js/src/vm/ScopeObject.cpp | 6 +- js/src/vm/ScopeObject.h | 2 +- 31 files changed, 386 insertions(+), 785 deletions(-) delete mode 100644 js/src/jit-test/tests/ion/callobj-malloc-slots.js diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 1abee59a98e0..502a5d011b02 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -257,28 +257,6 @@ MinorGC(JSContext *cx, unsigned argc, jsval *vp) return true; } -static bool -DisableGGC(JSContext *cx, unsigned argc, jsval *vp) -{ - CallArgs args = CallArgsFromVp(argc, vp); -#ifdef JSGC_GENERATIONAL - JS::DisableGenerationalGC(cx->runtime()); -#endif - args.rval().setUndefined(); - return true; -} - -static bool -EnableGGC(JSContext *cx, unsigned argc, jsval *vp) -{ - CallArgs args = CallArgsFromVp(argc, vp); -#ifdef JSGC_GENERATIONAL - JS::EnableGenerationalGC(cx->runtime()); -#endif - args.rval().setUndefined(); - return true; -} - static const struct ParamPair { const char *name; JSGCParamKey param; @@ -1451,15 +1429,6 @@ static const JSFunctionSpecWithHelp TestingFunctions[] = { " Run a minor collector on the Nursery. When aboutToOverflow is true, marks\n" " the store buffer as about-to-overflow before collecting."), - JS_FN_HELP("disableGenerationalGC", ::DisableGGC, 0, 0, -"disableGenerationalGC()", -" In builds with support for generational GC, disable generational GC."), - - JS_FN_HELP("enableGenerationalGC", ::EnableGGC, 0, 0, -"enableGenerationalGC()", -" In builds with support for generational GC, re-enable a disabled\n" -" generational GC."), - JS_FN_HELP("gcparam", GCParameter, 2, 0, "gcparam(name [, value])", " Wrapper for JS_[GS]etGCParameter. The name is one of " GC_PARAMETER_ARGS_LIST), diff --git a/js/src/gc/Nursery.cpp b/js/src/gc/Nursery.cpp index 7188c039ed4d..50693dc41602 100644 --- a/js/src/gc/Nursery.cpp +++ b/js/src/gc/Nursery.cpp @@ -268,14 +268,20 @@ js::Nursery::allocateHugeSlots(JSContext *cx, size_t nslots) return slots; } +void +js::Nursery::notifyInitialSlots(Cell *cell, HeapSlot *slots) +{ + if (isInside(cell) && !isInside(slots)) { + /* If this put fails, we will only leak the slots. */ + (void)hugeSlots.put(slots); + } +} + void js::Nursery::notifyNewElements(gc::Cell *cell, ObjectElements *elements) { JS_ASSERT(!isInside(elements)); - if (isInside(cell)) { - /* If this put fails, we will only leak the slots. */ - (void)hugeSlots.put(reinterpret_cast(elements)); - } + notifyInitialSlots(cell, reinterpret_cast(elements)); } void diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h index fb9c859132f1..03e31c73910d 100644 --- a/js/src/gc/Nursery.h +++ b/js/src/gc/Nursery.h @@ -54,9 +54,6 @@ class Nursery static const size_t Alignment = gc::ChunkSize; static const size_t NurserySize = gc::ChunkSize * NumNurseryChunks; - /* The maximum number of slots allowed to reside inline in the nursery. */ - static const size_t MaxNurserySlots = 128; - explicit Nursery(JSRuntime *rt) : runtime_(rt), position_(0), @@ -104,6 +101,9 @@ class Nursery /* Free a slots array. */ void freeSlots(JSContext *cx, HeapSlot *slots); + /* Add a slots to our tracking list if it is out-of-line. */ + void notifyInitialSlots(gc::Cell *cell, HeapSlot *slots); + /* Add elements to our tracking list if it is out-of-line. */ void notifyNewElements(gc::Cell *cell, ObjectElements *elements); @@ -182,6 +182,9 @@ class Nursery typedef HashSet, SystemAllocPolicy> HugeSlotsSet; HugeSlotsSet hugeSlots; + /* The maximum number of slots allowed to reside inline in the nursery. */ + static const size_t MaxNurserySlots = 128; + /* The amount of space in the mapped nursery available to allocations. */ static const size_t NurseryChunkUsableSize = gc::ChunkSize - sizeof(gc::ChunkTrailer); diff --git a/js/src/jit-test/tests/basic/bug908915.js b/js/src/jit-test/tests/basic/bug908915.js index c917212fc273..86d1a514aff5 100644 --- a/js/src/jit-test/tests/basic/bug908915.js +++ b/js/src/jit-test/tests/basic/bug908915.js @@ -2,7 +2,7 @@ function f(y) {} for each(let e in newGlobal()) { if (e.name === "quit" || e.name == "readline" || e.name == "terminate" || - e.name == "nestedShell" || e.name.endsWith("ableGenerationalGC")) + e.name == "nestedShell") continue; try { e(); @@ -15,7 +15,7 @@ for each(let e in newGlobal()) { } for each(b in []) { if (b.name === "quit" || b.name == "readline" || b.name == "terminate" || - b.name == "nestedShell" || b.name.endsWith("ableGenerationalGC")) + b.name == "nestedShell") continue; try { f(b) diff --git a/js/src/jit-test/tests/ion/callobj-malloc-slots.js b/js/src/jit-test/tests/ion/callobj-malloc-slots.js deleted file mode 100644 index 673fbb554bd7..000000000000 --- a/js/src/jit-test/tests/ion/callobj-malloc-slots.js +++ /dev/null @@ -1,308 +0,0 @@ -// |jit-test| tz-pacific - -// This is a copy of date-format-tofte: one of the only current jit-tests that -// exercises CallObject creation with external slots. We disable GGC here to -// test the fallback path that gets excercised without it enabled. -disableGenerationalGC(); - -function arrayExists(array, x) { - for (var i = 0; i < array.length; i++) { - if (array[i] == x) return true; - } - return false; -} - -Date.prototype.formatDate = function (input,time) { - // formatDate : - // a PHP date like function, for formatting date strings - // See: http://www.php.net/date - // - // input : format string - // time : epoch time (seconds, and optional) - // - // if time is not passed, formatting is based on - // the current "this" date object's set time. - // - // supported: - // a, A, B, d, D, F, g, G, h, H, i, j, l (lowercase L), L, - // m, M, n, O, r, s, S, t, U, w, W, y, Y, z - // - // unsupported: - // I (capital i), T, Z - - var switches = ["a", "A", "B", "d", "D", "F", "g", "G", "h", "H", - "i", "j", "l", "L", "m", "M", "n", "O", "r", "s", - "S", "t", "U", "w", "W", "y", "Y", "z"]; - var daysLong = ["Sunday", "Monday", "Tuesday", "Wednesday", - "Thursday", "Friday", "Saturday"]; - var daysShort = ["Sun", "Mon", "Tue", "Wed", - "Thu", "Fri", "Sat"]; - var monthsShort = ["Jan", "Feb", "Mar", "Apr", - "May", "Jun", "Jul", "Aug", "Sep", - "Oct", "Nov", "Dec"]; - var monthsLong = ["January", "February", "March", "April", - "May", "June", "July", "August", "September", - "October", "November", "December"]; - var daysSuffix = ["st", "nd", "rd", "th", "th", "th", "th", // 1st - 7th - "th", "th", "th", "th", "th", "th", "th", // 8th - 14th - "th", "th", "th", "th", "th", "th", "st", // 15th - 21st - "nd", "rd", "th", "th", "th", "th", "th", // 22nd - 28th - "th", "th", "st"]; // 29th - 31st - - function a() { - // Lowercase Ante meridiem and Post meridiem - return self.getHours() > 11? "pm" : "am"; - } - function A() { - // Uppercase Ante meridiem and Post meridiem - return self.getHours() > 11? "PM" : "AM"; - } - - function B(){ - // Swatch internet time. code simply grabbed from ppk, - // since I was feeling lazy: - // http://www.xs4all.nl/~ppk/js/beat.html - var off = (self.getTimezoneOffset() + 60)*60; - var theSeconds = (self.getHours() * 3600) + - (self.getMinutes() * 60) + - self.getSeconds() + off; - var beat = Math.floor(theSeconds/86.4); - if (beat > 1000) beat -= 1000; - if (beat < 0) beat += 1000; - if ((""+beat).length == 1) beat = "00"+beat; - if ((""+beat).length == 2) beat = "0"+beat; - return beat; - } - - function d() { - // Day of the month, 2 digits with leading zeros - return new String(self.getDate()).length == 1? - "0"+self.getDate() : self.getDate(); - } - function D() { - // A textual representation of a day, three letters - return daysShort[self.getDay()]; - } - function F() { - // A full textual representation of a month - return monthsLong[self.getMonth()]; - } - function g() { - // 12-hour format of an hour without leading zeros - return self.getHours() > 12? self.getHours()-12 : self.getHours(); - } - function G() { - // 24-hour format of an hour without leading zeros - return self.getHours(); - } - function h() { - // 12-hour format of an hour with leading zeros - if (self.getHours() > 12) { - var s = new String(self.getHours()-12); - return s.length == 1? - "0"+ (self.getHours()-12) : self.getHours()-12; - } else { - var s = new String(self.getHours()); - return s.length == 1? - "0"+self.getHours() : self.getHours(); - } - } - function H() { - // 24-hour format of an hour with leading zeros - return new String(self.getHours()).length == 1? - "0"+self.getHours() : self.getHours(); - } - function i() { - // Minutes with leading zeros - return new String(self.getMinutes()).length == 1? - "0"+self.getMinutes() : self.getMinutes(); - } - function j() { - // Day of the month without leading zeros - return self.getDate(); - } - function l() { - // A full textual representation of the day of the week - return daysLong[self.getDay()]; - } - function L() { - // leap year or not. 1 if leap year, 0 if not. - // the logic should match iso's 8601 standard. - var y_ = Y(); - if ( - (y_ % 4 == 0 && y_ % 100 != 0) || - (y_ % 4 == 0 && y_ % 100 == 0 && y_ % 400 == 0) - ) { - return 1; - } else { - return 0; - } - } - function m() { - // Numeric representation of a month, with leading zeros - return self.getMonth() < 9? - "0"+(self.getMonth()+1) : - self.getMonth()+1; - } - function M() { - // A short textual representation of a month, three letters - return monthsShort[self.getMonth()]; - } - function n() { - // Numeric representation of a month, without leading zeros - return self.getMonth()+1; - } - function O() { - // Difference to Greenwich time (GMT) in hours - var os = Math.abs(self.getTimezoneOffset()); - var h = ""+Math.floor(os/60); - var m = ""+(os%60); - h.length == 1? h = "0"+h:1; - m.length == 1? m = "0"+m:1; - return self.getTimezoneOffset() < 0 ? "+"+h+m : "-"+h+m; - } - function r() { - // RFC 822 formatted date - var r; // result - // Thu , 21 Dec 2000 - r = D() + ", " + j() + " " + M() + " " + Y() + - // 16 : 01 : 07 +0200 - " " + H() + ":" + i() + ":" + s() + " " + O(); - return r; - } - function S() { - // English ordinal suffix for the day of the month, 2 characters - return daysSuffix[self.getDate()-1]; - } - function s() { - // Seconds, with leading zeros - return new String(self.getSeconds()).length == 1? - "0"+self.getSeconds() : self.getSeconds(); - } - function t() { - - // thanks to Matt Bannon for some much needed code-fixes here! - var daysinmonths = [null,31,28,31,30,31,30,31,31,30,31,30,31]; - if (L()==1 && n()==2) return 29; // leap day - return daysinmonths[n()]; - } - function U() { - // Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) - return Math.round(self.getTime()/1000); - } - function W() { - // Weeknumber, as per ISO specification: - // http://www.cl.cam.ac.uk/~mgk25/iso-time.html - - // if the day is three days before newyears eve, - // there's a chance it's "week 1" of next year. - // here we check for that. - var beforeNY = 364+L() - z(); - var afterNY = z(); - var weekday = w()!=0?w()-1:6; // makes sunday (0), into 6. - if (beforeNY <= 2 && weekday <= 2-beforeNY) { - return 1; - } - // similarly, if the day is within threedays of newyears - // there's a chance it belongs in the old year. - var ny = new Date("January 1 " + Y() + " 00:00:00"); - var nyDay = ny.getDay()!=0?ny.getDay()-1:6; - if ( - (afterNY <= 2) && - (nyDay >=4) && - (afterNY >= (6-nyDay)) - ) { - // Since I'm not sure we can just always return 53, - // i call the function here again, using the last day - // of the previous year, as the date, and then just - // return that week. - var prevNY = new Date("December 31 " + (Y()-1) + " 00:00:00"); - return prevNY.formatDate("W"); - } - - // week 1, is the week that has the first thursday in it. - // note that this value is not zero index. - if (nyDay <= 3) { - // first day of the year fell on a thursday, or earlier. - return 1 + Math.floor( ( z() + nyDay ) / 7 ); - } else { - // first day of the year fell on a friday, or later. - return 1 + Math.floor( ( z() - ( 7 - nyDay ) ) / 7 ); - } - } - function w() { - // Numeric representation of the day of the week - return self.getDay(); - } - - function Y() { - // A full numeric representation of a year, 4 digits - - // we first check, if getFullYear is supported. if it - // is, we just use that. ppks code is nice, but wont - // work with dates outside 1900-2038, or something like that - if (self.getFullYear) { - var newDate = new Date("January 1 2001 00:00:00 +0000"); - var x = newDate .getFullYear(); - if (x == 2001) { - // i trust the method now - return self.getFullYear(); - } - } - // else, do this: - // codes thanks to ppk: - // http://www.xs4all.nl/~ppk/js/introdate.html - var x = self.getYear(); - var y = x % 100; - y += (y < 38) ? 2000 : 1900; - return y; - } - function y() { - // A two-digit representation of a year - var y = Y()+""; - return y.substring(y.length-2,y.length); - } - function z() { - // The day of the year, zero indexed! 0 through 366 - var t = new Date("January 1 " + Y() + " 00:00:00"); - var diff = self.getTime() - t.getTime(); - return Math.floor(diff/1000/60/60/24); - } - - var self = this; - if (time) { - // save time - var prevTime = self.getTime(); - self.setTime(time); - } - - var ia = input.split(""); - var ij = 0; - while (ia[ij]) { - if (ia[ij] == "\\") { - // this is our way of allowing users to escape stuff - ia.splice(ij,1); - } else { - if (arrayExists(switches,ia[ij])) { - ia[ij] = eval(ia[ij] + "()"); - } - } - ij++; - } - // reset time, back to what it was - if (prevTime) { - self.setTime(prevTime); - } - return ia.join(""); -} - -var date = new Date("1/1/2007 1:11:11"); -var ret = ""; -for (i = 0; i < 10; ++i) { - var shortFormat = date.formatDate("Y-m-d"); - var longFormat = date.formatDate("l, F d, Y g:i:s A"); - ret += shortFormat + longFormat; - date.setTime(date.getTime() + 84266956); -} -var expected = "2007-01-01Monday, January 01, 2007 1:11:11 AM2007-01-02Tuesday, January 02, 2007 0:35:37 AM2007-01-03Wednesday, January 03, 2007 0:00:04 AM2007-01-03Wednesday, January 03, 2007 11:24:31 PM2007-01-04Thursday, January 04, 2007 10:48:58 PM2007-01-05Friday, January 05, 2007 10:13:25 PM2007-01-06Saturday, January 06, 2007 9:37:52 PM2007-01-07Sunday, January 07, 2007 9:02:19 PM2007-01-08Monday, January 08, 2007 8:26:46 PM2007-01-09Tuesday, January 09, 2007 7:51:13 PM"; -assertEq(ret, expected); diff --git a/js/src/jit-test/tests/parallel/closure-nested-branch.js b/js/src/jit-test/tests/parallel/closure-nested-branch.js index b0043d931cbb..dc781b7759ff 100644 --- a/js/src/jit-test/tests/parallel/closure-nested-branch.js +++ b/js/src/jit-test/tests/parallel/closure-nested-branch.js @@ -3,6 +3,15 @@ load(libdir + "parallelarray-helpers.js"); function testClosureCreationAndInvocation() { var a = range(0, 64); function makeaddv(v) { + var u = 1; + var t = 2; + var s = 3; + var r = 4; + var q = 5; + var p = 6; + var o = 7; + var n = 8; + var m = 9; var l = 10; var k = 11; var j = 12; @@ -25,6 +34,11 @@ function testClosureCreationAndInvocation() { case 6: return g; case 7: return h; case 8: return i; case 9: return j; case 10: return k; case 11: return l; + case 12: return m; case 13: return n; + case 14: return o; case 15: return p; + case 16: return q; case 17: return r; + case 18: return s; case 19: return t; + case 20: return u; } }); } diff --git a/js/src/jit-test/tests/parallel/closure-nested-compute.js b/js/src/jit-test/tests/parallel/closure-nested-compute.js index fd7a3227f272..a85e5e0a70fe 100644 --- a/js/src/jit-test/tests/parallel/closure-nested-compute.js +++ b/js/src/jit-test/tests/parallel/closure-nested-compute.js @@ -3,6 +3,15 @@ load(libdir + "parallelarray-helpers.js"); function testClosureCreationAndInvocation() { var a = range(0, 64); function makeaddv(v) { + var u = 1; + var t = 2; + var s = 3; + var r = 4; + var q = 5; + var p = 6; + var o = 7; + var n = 8; + var m = 9; var l = 10; var k = 11; var j = 12; @@ -23,6 +32,11 @@ function testClosureCreationAndInvocation() { case 6: return g; case 7: return h; case 8: return i; case 9: return j; case 10: return k; case 11: return l; + case 12: return m; case 13: return n; + case 14: return o; case 15: return p; + case 16: return q; case 17: return r; + case 18: return s; case 19: return t; + case 20: return u; } }; }; diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index 0c9e91a29c3e..0b6672d6bf88 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -142,133 +142,6 @@ MNewStringObject::templateObj() const { return &templateObj_->as(); } -// API call to malloc for slots. -class OutOfLineMallocSlots : public OutOfLineCodeBase -{ - const Register result_; - int32_t nDynamicSlots_; - Label *failure_; - - public: - OutOfLineMallocSlots(const Register &result, size_t nslots, Label *failure) - : result_(result), nDynamicSlots_(int32_t(nslots)), failure_(failure) - { - JS_ASSERT(nslots < INT32_MAX); - } - - bool accept(CodeGenerator *codegen) { - return codegen->visitOutOfLineMallocSlots(this); - } - - const Register &result() const { - return result_; - } - - int32_t numDynamicSlots() const { - return nDynamicSlots_; - } - - Label *failure() const { - return failure_; - } -}; - -bool -CodeGenerator::visitOutOfLineMallocSlots(OutOfLineMallocSlots *ool) -{ - saveVolatile(ool->result()); - - RegisterSet regs = RegisterSet::Volatile(); - regs.takeUnchecked(ool->result()); - Register regRuntime = regs.takeGeneral(); - Register regNSlots = regs.takeGeneral(); - - masm.setupUnalignedABICall(2, ool->result()); - masm.movePtr(ImmPtr(GetIonContext()->runtime), regRuntime); - masm.passABIArg(regRuntime); - masm.move32(Imm32(uint32_t(ool->numDynamicSlots())), regNSlots); - masm.passABIArg(regNSlots); - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, NewSlots)); - masm.storeCallResult(ool->result()); - - restoreVolatile(ool->result()); - - masm.branchTestPtr(Assembler::Zero, ool->result(), ool->result(), ool->failure()); - - masm.jump(ool->rejoin()); - return true; -} - -// API call to free slots data on allocation failure. -class OutOfLineFreeSlots : public OutOfLineCodeBase -{ - const Register slots_; - Label *fallback_; - - public: - OutOfLineFreeSlots(const Register ®, Label *fallback) - : slots_(reg), fallback_(fallback) - { } - - bool accept(CodeGenerator *codegen) { - return codegen->visitOutOfLineFreeSlots(this); - } - - Register slots() const { - return slots_; - } - - Label *fallback() const { - return fallback_; - } -}; - -bool -CodeGenerator::visitOutOfLineFreeSlots(OutOfLineFreeSlots *ool) -{ - saveVolatile(ool->slots()); - - RegisterSet regs = RegisterSet::Volatile(); - regs.takeUnchecked(ool->slots()); - Register temp = regs.takeGeneral(); - - masm.setupUnalignedABICall(1, temp); - masm.passABIArg(ool->slots()); - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, FreeSlots)); - restoreVolatile(ool->slots()); - - masm.jump(ool->fallback()); - return true; -} - -// Emit out-of-line code to provide malloc and free paths to allocate slots for -// objects that require them. In the case that such paths are not required, the -// given labels are returned as nullptr. -bool -CodeGenerator::emitOutOfLineMallocFree(const Register ®, size_t nDynamicSlots, - Label *fallback, Label **mallocEntry, Label **mallocRejoin, - Label **freeEntry) -{ - *mallocEntry = nullptr; - *mallocRejoin = nullptr; - *freeEntry = nullptr; - if (!nDynamicSlots) - return true; - - OutOfLineMallocSlots *oolMalloc = new(alloc()) OutOfLineMallocSlots(reg, nDynamicSlots, fallback); - if (!addOutOfLineCode(oolMalloc)) - return false; - - OutOfLineFreeSlots *oolFree = new(alloc()) OutOfLineFreeSlots(reg, fallback); - if (!addOutOfLineCode(oolFree)) - return false; - - *mallocEntry = oolMalloc->entry(); - *mallocRejoin = oolMalloc->rejoin(); - *freeEntry = oolFree->entry(); - return true; -} - CodeGenerator::CodeGenerator(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm) : CodeGeneratorSpecific(gen, graph, masm) #ifdef DEBUG @@ -1099,8 +972,8 @@ CodeGenerator::visitLambda(LLambda *lir) JS_ASSERT(!info.singletonType); - masm.newGCObject(output, info.fun, ool->entry(), gc::DefaultHeap); - masm.initGCObject(output, info.fun); + masm.newGCThing(output, info.fun, ool->entry(), gc::DefaultHeap); + masm.initGCThing(output, info.fun); emitLambdaInit(output, scopeChain, info); @@ -3487,6 +3360,29 @@ CodeGenerator::visitNewDerivedTypedObject(LNewDerivedTypedObject *lir) return callVM(CreateDerivedTypedObjInfo, lir); } +bool +CodeGenerator::visitNewSlots(LNewSlots *lir) +{ + Register temp1 = ToRegister(lir->temp1()); + Register temp2 = ToRegister(lir->temp2()); + Register temp3 = ToRegister(lir->temp3()); + Register output = ToRegister(lir->output()); + + masm.mov(ImmPtr(GetIonContext()->runtime), temp1); + masm.mov(ImmWord(lir->mir()->nslots()), temp2); + + masm.setupUnalignedABICall(2, temp3); + masm.passABIArg(temp1); + masm.passABIArg(temp2); + masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, NewSlots)); + + masm.testPtr(output, output); + if (!bailoutIf(Assembler::Zero, lir->snapshot())) + return false; + + return true; +} + bool CodeGenerator::visitAtan2D(LAtan2D *lir) { Register temp = ToRegister(lir->temp()); @@ -3534,8 +3430,8 @@ CodeGenerator::visitNewArray(LNewArray *lir) if (!addOutOfLineCode(ool)) return false; - masm.newGCObject(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); - masm.initGCObject(objReg, templateObject); + masm.newGCThing(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); + masm.initGCThing(objReg, templateObject); masm.bind(ool->rejoin()); return true; @@ -3611,7 +3507,7 @@ CodeGenerator::visitNewObject(LNewObject *lir) { JS_ASSERT(gen->info().executionMode() == SequentialExecution); Register objReg = ToRegister(lir->output()); - JSObject *templateObj = lir->mir()->templateObject(); + JSObject *templateObject = lir->mir()->templateObject(); if (lir->mir()->shouldUseVM()) return visitNewObjectVMCall(lir); @@ -3620,8 +3516,8 @@ CodeGenerator::visitNewObject(LNewObject *lir) if (!addOutOfLineCode(ool)) return false; - masm.newGCObject(objReg, templateObj, ool->entry(), lir->mir()->initialHeap()); - masm.initGCObject(objReg, templateObj); + masm.newGCThing(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); + masm.initGCThing(objReg, templateObject); masm.bind(ool->rejoin()); return true; @@ -3655,46 +3551,53 @@ CodeGenerator::visitNewDeclEnvObject(LNewDeclEnvObject *lir) if (!ool) return false; - masm.newGCObject(obj, templateObj, ool->entry(), gc::DefaultHeap); - masm.initGCObject(obj, templateObj); + masm.newGCThing(obj, templateObj, ool->entry(), gc::DefaultHeap); + masm.initGCThing(obj, templateObj); masm.bind(ool->rejoin()); return true; } -typedef JSObject *(*NewCallObjectFn)(JSContext *, HandleScript, HandleShape, HandleTypeObject); -static const VMFunction NewCallObjectInfo = FunctionInfo(NewCallObject); +typedef JSObject *(*NewCallObjectFn)(JSContext *, HandleScript, HandleShape, + HandleTypeObject, HeapSlot *); +static const VMFunction NewCallObjectInfo = + FunctionInfo(NewCallObject); bool CodeGenerator::visitNewCallObject(LNewCallObject *lir) { - Register objReg = ToRegister(lir->output()); + Register obj = ToRegister(lir->output()); JSObject *templateObj = lir->mir()->templateObject(); // If we have a template object, we can inline call object creation. - OutOfLineCode *ool = - oolCallVM(NewCallObjectInfo, lir, - (ArgList(), ImmGCPtr(lir->mir()->block()->info().script()), - ImmGCPtr(templateObj->lastProperty()), - ImmGCPtr(templateObj->hasSingletonType() ? nullptr : templateObj->type())), - StoreRegisterTo(objReg)); + OutOfLineCode *ool; + if (lir->slots()->isRegister()) { + ool = oolCallVM(NewCallObjectInfo, lir, + (ArgList(), ImmGCPtr(lir->mir()->block()->info().script()), + ImmGCPtr(templateObj->lastProperty()), + ImmGCPtr(templateObj->hasSingletonType() ? nullptr : templateObj->type()), + ToRegister(lir->slots())), + StoreRegisterTo(obj)); + } else { + ool = oolCallVM(NewCallObjectInfo, lir, + (ArgList(), ImmGCPtr(lir->mir()->block()->info().script()), + ImmGCPtr(templateObj->lastProperty()), + ImmGCPtr(templateObj->hasSingletonType() ? nullptr : templateObj->type()), + ImmPtr(nullptr)), + StoreRegisterTo(obj)); + } if (!ool) return false; - Label *mallocEntry, *mallocRejoin, *freeEntry; - if (!emitOutOfLineMallocFree(objReg, templateObj->numDynamicSlots(), ool->entry(), - &mallocEntry, &mallocRejoin, &freeEntry)) - { - return false; - } - if (lir->mir()->needsSingletonType()) { // Objects can only be given singleton types in VM calls. masm.jump(ool->entry()); } else { - masm.newGCObjectAndSlots(objReg, templateObj, ool->entry(), mallocEntry, mallocRejoin, - freeEntry, gc::DefaultHeap); - masm.initGCObject(objReg, templateObj); + masm.newGCThing(obj, templateObj, ool->entry(), gc::DefaultHeap); + masm.initGCThing(obj, templateObj); + + if (lir->slots()->isRegister()) + masm.storePtr(ToRegister(lir->slots()), Address(obj, JSObject::offsetOfSlots())); } masm.bind(ool->rejoin()); @@ -3711,6 +3614,17 @@ CodeGenerator::visitNewCallObjectPar(LNewCallObjectPar *lir) JSObject *templateObj = lir->mir()->templateObj(); emitAllocateGCThingPar(lir, resultReg, cxReg, tempReg1, tempReg2, templateObj); + + // NB: !lir->slots()->isRegister() implies that there is no slots + // array at all, and the memory is already zeroed when copying + // from the template object + + if (lir->slots()->isRegister()) { + Register slotsReg = ToRegister(lir->slots()); + JS_ASSERT(slotsReg != resultReg); + masm.storePtr(slotsReg, Address(resultReg, JSObject::offsetOfSlots())); + } + return true; } @@ -3734,7 +3648,7 @@ CodeGenerator::visitNewDenseArrayPar(LNewDenseArrayPar *lir) // reality, we should probably just have the C helper also // *allocate* the array, but that would require that it initialize // the various fields of the object, and I didn't want to - // duplicate the code in initGCObject() that already does such an + // duplicate the code in initGCThing() that already does such an // admirable job. masm.setupUnalignedABICall(3, tempReg0); masm.passABIArg(cxReg); @@ -3769,8 +3683,8 @@ CodeGenerator::visitNewStringObject(LNewStringObject *lir) if (!ool) return false; - masm.newGCObject(output, templateObj, ool->entry(), gc::DefaultHeap); - masm.initGCObject(output, templateObj); + masm.newGCThing(output, templateObj, ool->entry(), gc::DefaultHeap); + masm.initGCThing(output, templateObj); masm.loadStringLength(input, temp); @@ -3823,7 +3737,7 @@ CodeGenerator::emitAllocateGCThingPar(LInstruction *lir, const Register &objReg, masm.newGCThingPar(objReg, cxReg, tempReg1, tempReg2, templateObj, ool->entry()); masm.bind(ool->rejoin()); - masm.initGCObject(objReg, templateObj); + masm.initGCThing(objReg, templateObj); return true; } @@ -4015,11 +3929,11 @@ CodeGenerator::visitCreateThisWithTemplate(LCreateThisWithTemplate *lir) return false; // Allocate. If the FreeList is empty, call to VM, which may GC. - masm.newGCObject(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); + masm.newGCThing(objReg, templateObject, ool->entry(), lir->mir()->initialHeap()); // Initialize based on the templateObject. masm.bind(ool->rejoin()); - masm.initGCObject(objReg, templateObject); + masm.initGCThing(objReg, templateObject); return true; } @@ -5733,8 +5647,8 @@ CodeGenerator::visitArrayConcat(LArrayConcat *lir) // Try to allocate an object. JSObject *templateObj = lir->mir()->templateObj(); - masm.newGCObject(temp1, templateObj, &fail, lir->mir()->initialHeap()); - masm.initGCObject(temp1, templateObj); + masm.newGCThing(temp1, templateObj, &fail, lir->mir()->initialHeap()); + masm.initGCThing(temp1, templateObj); masm.jump(&call); { masm.bind(&fail); @@ -6105,8 +6019,8 @@ CodeGenerator::visitRest(LRest *lir) JSObject *templateObject = lir->mir()->templateObject(); Label joinAlloc, failAlloc; - masm.newGCObject(temp2, templateObject, &failAlloc, gc::DefaultHeap); - masm.initGCObject(temp2, templateObject); + masm.newGCThing(temp2, templateObject, &failAlloc, gc::DefaultHeap); + masm.initGCThing(temp2, templateObject); masm.jump(&joinAlloc); { masm.bind(&failAlloc); diff --git a/js/src/jit/CodeGenerator.h b/js/src/jit/CodeGenerator.h index 1dce043798ac..69e6d7b7c39c 100644 --- a/js/src/jit/CodeGenerator.h +++ b/js/src/jit/CodeGenerator.h @@ -39,8 +39,6 @@ class OutOfLineLoadTypedArray; class OutOfLineNewGCThingPar; class OutOfLineUpdateCache; class OutOfLineCallPostWriteBarrier; -class OutOfLineMallocSlots; -class OutOfLineFreeSlots; class CodeGenerator : public CodeGeneratorSpecific { @@ -134,10 +132,7 @@ class CodeGenerator : public CodeGeneratorSpecific bool visitCallDirectEvalV(LCallDirectEvalV *lir); bool visitDoubleToInt32(LDoubleToInt32 *lir); bool visitFloat32ToInt32(LFloat32ToInt32 *lir); - bool visitOutOfLineMallocSlots(OutOfLineMallocSlots *ool); - bool visitOutOfLineFreeSlots(OutOfLineFreeSlots *ool); - bool emitOutOfLineMallocFree(const Register ®, size_t nDynamicSlots, Label *fallback, - Label **mallocEntry, Label **mallocRejoin, Label **freeEntry); + bool visitNewSlots(LNewSlots *lir); bool visitNewArrayCallVM(LNewArray *lir); bool visitNewArray(LNewArray *lir); bool visitOutOfLineNewArray(OutOfLineNewArray *ool); diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index ecfcfd0e4522..ac4e882a00c9 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -4596,9 +4596,23 @@ IonBuilder::createCallObject(MDefinition *callee, MDefinition *scope) // creation. CallObject *templateObj = inspector->templateCallObject(); - // Allocate the actual object. Run-once scripts need a singleton type, so - // always do a VM call in such cases. - MNewCallObject *callObj = MNewCallObject::New(alloc(), templateObj, script()->treatAsRunOnce()); + // If the CallObject needs dynamic slots, allocate those now. + MInstruction *slots; + if (templateObj->hasDynamicSlots()) { + size_t nslots = JSObject::dynamicSlotsCount(templateObj->numFixedSlots(), + templateObj->lastProperty()->slotSpan(templateObj->getClass()), + templateObj->getClass()); + slots = MNewSlots::New(alloc(), nslots); + } else { + slots = MConstant::New(alloc(), NullValue()); + } + current->add(slots); + + // Allocate the actual object. It is important that no intervening + // instructions could potentially bailout, thus leaking the dynamic slots + // pointer. Run-once scripts need a singleton type, so always do a VM call + // in such cases. + MNewCallObject *callObj = MNewCallObject::New(alloc(), templateObj, script()->treatAsRunOnce(), slots); current->add(callObj); // Initialize the object's reserved slots. No post barrier is needed here, @@ -4607,20 +4621,14 @@ IonBuilder::createCallObject(MDefinition *callee, MDefinition *scope) current->add(MStoreFixedSlot::New(alloc(), callObj, CallObject::calleeSlot(), callee)); // Initialize argument slots. - MSlots *slots = nullptr; for (AliasedFormalIter i(script()); i; i++) { unsigned slot = i.scopeSlot(); unsigned formal = i.frameIndex(); MDefinition *param = current->getSlot(info().argSlotUnchecked(formal)); - if (slot >= templateObj->numFixedSlots()) { - if (!slots) { - slots = MSlots::New(alloc(), callObj); - current->add(slots); - } + if (slot >= templateObj->numFixedSlots()) current->add(MStoreSlot::New(alloc(), slots, slot - templateObj->numFixedSlots(), param)); - } else { + else current->add(MStoreFixedSlot::New(alloc(), callObj, slot, param)); - } } return callObj; diff --git a/js/src/jit/IonMacroAssembler.cpp b/js/src/jit/IonMacroAssembler.cpp index 0dc36362eac0..4a71c481cc72 100644 --- a/js/src/jit/IonMacroAssembler.cpp +++ b/js/src/jit/IonMacroAssembler.cpp @@ -633,11 +633,14 @@ MacroAssembler::clampDoubleToUint8(FloatRegister input, Register output) #endif } -// Inlined version of gc::CheckAllocatorState that checks the bare essentials -// and bails for anything that cannot be handled with our jit allocators. void -MacroAssembler::checkAllocatorState(Label *fail) +MacroAssembler::newGCThing(const Register &result, gc::AllocKind allocKind, Label *fail, + gc::InitialHeap initialHeap /* = gc::DefaultHeap */) { + // Inlined equivalent of js::gc::NewGCThing() without failure case handling. + + int thingSize = int(gc::Arena::thingSize(allocKind)); + #ifdef JS_GC_ZEAL // Don't execute the inline path if gcZeal is active. branch32(Assembler::NotEqual, @@ -649,164 +652,59 @@ MacroAssembler::checkAllocatorState(Label *fail) // as the metadata to use for the object may vary between executions of the op. if (GetIonContext()->compartment->hasObjectMetadataCallback()) jump(fail); -} - -// Inline Nursery::allocateObject, when it is okay to do so. Return true if we -// emitted a nursery allocation path. -bool -MacroAssembler::nurseryAllocate(const Register &result, gc::AllocKind allocKind, Label *fail, - size_t nDynamicSlots, gc::InitialHeap initialHeap) -{ - JS_ASSERT(allocKind >= gc::FINALIZE_OBJECT0 && allocKind <= gc::FINALIZE_OBJECT_LAST); #ifdef JSGC_GENERATIONAL const Nursery &nursery = GetIonContext()->runtime->gcNursery(); - - // When the nursery is not enabled, the nursery's position == end pointer, - // so allocations will naturally fall back to the interpreter. Thus, the - // following check is not technically necessary. However, the nursery is - // generally only perma-disabled or disabled when using zeal, so prefer to - // compile the tenured fast-path instead so we don't bail constantly. - if (!nursery.isEnabled()) - return false; - - // Explicitly request for tenured allocation for these objects. - if (initialHeap == gc::TenuredHeap) - return false; - - // This allocation site is requesting too many dynamic slots. - if (nDynamicSlots > Nursery::MaxNurserySlots) - return false; - - // No explicit check for nursery.isEnabled() is needed, as the comparison - // with the nursery's end will always fail in such cases. - int thingSize = int(gc::Arena::thingSize(allocKind)); - int totalSize = thingSize + nDynamicSlots * sizeof(HeapSlot); - loadPtr(AbsoluteAddress(nursery.addressOfPosition()), result); - addPtr(Imm32(totalSize), result); - branchPtr(Assembler::BelowOrEqual, AbsoluteAddress(nursery.addressOfCurrentEnd()), result, fail); - storePtr(result, AbsoluteAddress(nursery.addressOfPosition())); - - if (!nDynamicSlots) { - JS_ASSERT(thingSize == totalSize); - subPtr(Imm32(totalSize), result); - } else { - // Offset to get the slots pointer in |result|. - subPtr(Imm32(totalSize - thingSize), result); - // Store the slots pointer into slots address as an offset from the - // slots so that we do not need to take a second register. - JS_ASSERT(int(JSObject::offsetOfSlots()) - thingSize < 0); - storePtr(result, Address(result, int(JSObject::offsetOfSlots()) - thingSize)); - // Load the start of the object into result. + if (nursery.isEnabled() && + allocKind <= gc::FINALIZE_OBJECT_LAST && + initialHeap != gc::TenuredHeap) + { + // Inline Nursery::allocate. No explicit check for nursery.isEnabled() + // is needed, as the comparison with the nursery's end will always fail + // in such cases. + loadPtr(AbsoluteAddress(nursery.addressOfPosition()), result); + addPtr(Imm32(thingSize), result); + branchPtr(Assembler::BelowOrEqual, AbsoluteAddress(nursery.addressOfCurrentEnd()), result, fail); + storePtr(result, AbsoluteAddress(nursery.addressOfPosition())); subPtr(Imm32(thingSize), result); + return; } - - return true; -#else - return false; #endif // JSGC_GENERATIONAL -} -// Inlined version of FreeSpan::allocate. -void -MacroAssembler::freeSpanAllocate(const Register &result, gc::AllocKind allocKind, Label *fail) -{ CompileZone *zone = GetIonContext()->compartment->zone(); - int thingSize = int(gc::Arena::thingSize(allocKind)); - // Load FreeSpan::first of |zone|'s freeLists for |allocKind|. If there is - // no room remaining in the span, we bail to finish the allocation. The - // interpreter will call |refillFreeLists|, setting up a new FreeSpan so - // that we can continue allocating in the jit. + // Inline FreeSpan::allocate. + // There is always exactly one FreeSpan per allocKind per JSCompartment. + // If a FreeSpan is replaced, its members are updated in the freeLists table, + // which the code below always re-reads. loadPtr(AbsoluteAddress(zone->addressOfFreeListFirst(allocKind)), result); branchPtr(Assembler::BelowOrEqual, AbsoluteAddress(zone->addressOfFreeListLast(allocKind)), result, fail); + addPtr(Imm32(thingSize), result); storePtr(result, AbsoluteAddress(zone->addressOfFreeListFirst(allocKind))); subPtr(Imm32(thingSize), result); } -// Inlined equivalent of gc::AllocateObject, without failure case handling. void -MacroAssembler::allocateObject(const Register &result, gc::AllocKind allocKind, Label *fallback, - Label *mallocEntry, Label *mallocRejoin, Label *freeEntry, - size_t nDynamicSlots, gc::InitialHeap initialHeap) -{ - JS_ASSERT_IF(nDynamicSlots, mallocEntry && mallocRejoin && freeEntry); - - checkAllocatorState(fallback); - if (nurseryAllocate(result, allocKind, fallback, nDynamicSlots, initialHeap)) - return; - - if (!nDynamicSlots) { - freeSpanAllocate(result, allocKind, fallback); - } else { - // Exit to do the malloc out-of-line. - jump(mallocEntry); - - // Since we have to jump out-of-line anyway, insert our failure - // handling code into the jumped-over block so that it does not force a - // jump in the success case below. - Label allocFail; - bind(&allocFail); - pop(result); - jump(freeEntry); - - // Rejoin from successful malloc; malloc failure falls straight though - // to the fallback since there is no cleanup to do yet. - bind(mallocRejoin); - - // Save our malloc pointer to the stack so we can re-use the register. - push(result); - - // Allocate the object and write the malloced slots. - freeSpanAllocate(result, allocKind, &allocFail); - pop(Address(result, JSObject::offsetOfSlots())); - } -} - -// Inlined equivalent of gc::AllocateNonObject, without failure case handling. -// Non-object allocation does not need to worry about slots, so can take a -// simpler path. -void -MacroAssembler::allocateNonObject(const Register &result, gc::AllocKind allocKind, Label *fail) -{ - checkAllocatorState(fail); - freeSpanAllocate(result, allocKind, fail); -} - -void -MacroAssembler::newGCObject(const Register &result, JSObject *templateObject, Label *fallback, - gc::InitialHeap initialHeap) -{ - gc::AllocKind allocKind = templateObject->tenuredGetAllocKind(); - JS_ASSERT(allocKind >= gc::FINALIZE_OBJECT0 && allocKind <= gc::FINALIZE_OBJECT_LAST); - JS_ASSERT(templateObject->numDynamicSlots() == 0); - - allocateObject(result, allocKind, fallback, nullptr, nullptr, nullptr, 0, initialHeap); -} - -void -MacroAssembler::newGCObjectAndSlots(const Register &result, JSObject *templateObject, Label *fallback, - Label *mallocEntry, Label *mallocRejoin, Label *freeEntry, - gc::InitialHeap initialHeap) +MacroAssembler::newGCThing(const Register &result, JSObject *templateObject, + Label *fail, gc::InitialHeap initialHeap) { gc::AllocKind allocKind = templateObject->tenuredGetAllocKind(); JS_ASSERT(allocKind >= gc::FINALIZE_OBJECT0 && allocKind <= gc::FINALIZE_OBJECT_LAST); - allocateObject(result, allocKind, fallback, mallocEntry, mallocRejoin, freeEntry, - templateObject->numDynamicSlots(), initialHeap); + newGCThing(result, allocKind, fail, initialHeap); } void MacroAssembler::newGCString(const Register &result, Label *fail) { - allocateNonObject(result, js::gc::FINALIZE_STRING, fail); + newGCThing(result, js::gc::FINALIZE_STRING, fail); } void MacroAssembler::newGCShortString(const Register &result, Label *fail) { - allocateNonObject(result, js::gc::FINALIZE_SHORT_STRING, fail); + newGCThing(result, js::gc::FINALIZE_SHORT_STRING, fail); } void @@ -855,9 +753,6 @@ MacroAssembler::newGCThingPar(const Register &result, const Register &cx, // Update `first` // tempReg1->first = tempReg2; storePtr(tempReg2, Address(tempReg1, offsetof(gc::FreeSpan, first))); - - // Initialize slots to nullptr, so that we can share initGCObject. - storePtr(ImmPtr(nullptr), Address(result, JSObject::offsetOfSlots())); } void @@ -888,31 +783,7 @@ MacroAssembler::newGCShortStringPar(const Register &result, const Register &cx, } void -MacroAssembler::initGCSlots(const Register &obj, JSObject *templateObject) -{ - // Slots of non-array objects are required to be initialized. - // Use the values currently in the template object. - uint32_t nslots = templateObject->lastProperty()->slotSpan(templateObject->getClass()); - if (nslots == 0) - return; - - uint32_t nfixed = Min(templateObject->numFixedSlots(), nslots); - for (unsigned i = 0; i < nfixed; i++) - storeValue(templateObject->getFixedSlot(i), Address(obj, JSObject::getFixedSlotOffset(i))); - - if (nfixed < nslots) { - JS_ASSERT(nslots - nfixed <= templateObject->numDynamicSlots()); - - push(obj); - loadPtr(Address(obj, JSObject::offsetOfSlots()), obj); - for (unsigned i = 0; i < nslots - nfixed; ++i) - storeValue(templateObject->getDynamicSlot(i), Address(obj, i * sizeof(HeapSlot))); - pop(obj); - } -} - -void -MacroAssembler::initGCObject(const Register &obj, JSObject *templateObject) +MacroAssembler::initGCThing(const Register &obj, JSObject *templateObject) { // Fast initialization of an empty object returned by NewGCThing(). @@ -920,9 +791,7 @@ MacroAssembler::initGCObject(const Register &obj, JSObject *templateObject) storePtr(ImmGCPtr(templateObject->lastProperty()), Address(obj, JSObject::offsetOfShape())); storePtr(ImmGCPtr(templateObject->type()), Address(obj, JSObject::offsetOfType())); - // Note: if we needed external slots, |slots| was initialized by object allocation. - if (!templateObject->hasDynamicSlots()) - storePtr(ImmPtr(nullptr), Address(obj, JSObject::offsetOfSlots())); + storePtr(ImmPtr(nullptr), Address(obj, JSObject::offsetOfSlots())); if (templateObject->is()) { JS_ASSERT(!templateObject->getDenseInitializedLength()); @@ -944,16 +813,24 @@ MacroAssembler::initGCObject(const Register &obj, JSObject *templateObject) ? ObjectElements::CONVERT_DOUBLE_ELEMENTS : 0), Address(obj, elementsOffset + ObjectElements::offsetOfFlags())); - JS_ASSERT(!templateObject->hasPrivate()); } else { storePtr(ImmPtr(emptyObjectElements), Address(obj, JSObject::offsetOfElements())); - initGCSlots(obj, templateObject); - if (templateObject->hasPrivate()) { - uint32_t nfixed = templateObject->numFixedSlots(); - storePtr(ImmPtr(templateObject->getPrivate()), - Address(obj, JSObject::getPrivateDataOffset(nfixed))); + + // Fixed slots of non-array objects are required to be initialized. + // Use the values currently in the template object. + size_t nslots = Min(templateObject->numFixedSlots(), + templateObject->lastProperty()->slotSpan(templateObject->getClass())); + for (unsigned i = 0; i < nslots; i++) { + storeValue(templateObject->getFixedSlot(i), + Address(obj, JSObject::getFixedSlotOffset(i))); } } + + if (templateObject->hasPrivate()) { + uint32_t nfixed = templateObject->numFixedSlots(); + storePtr(ImmPtr(templateObject->getPrivate()), + Address(obj, JSObject::getPrivateDataOffset(nfixed))); + } } void diff --git a/js/src/jit/IonMacroAssembler.h b/js/src/jit/IonMacroAssembler.h index 7c1fb0dde423..bbde4788ac42 100644 --- a/js/src/jit/IonMacroAssembler.h +++ b/js/src/jit/IonMacroAssembler.h @@ -783,24 +783,10 @@ class MacroAssembler : public MacroAssemblerSpecific Label *label); // Inline allocation. - private: - void checkAllocatorState(Label *fail); - bool nurseryAllocate(const Register &result, gc::AllocKind allocKind, Label *fail, - size_t nDynamicSlots, gc::InitialHeap initialHeap); - void freeSpanAllocate(const Register &result, gc::AllocKind allocKind, Label *fail); - void allocateObject(const Register &result, gc::AllocKind allocKind, Label *fail, - Label *oolMalloc, Label *oolMallocExit, Label *oolFree, - size_t nDynamicSlots, gc::InitialHeap initialHeap); - void allocateNonObject(const Register &result, gc::AllocKind allocKind, Label *fail); - void initGCSlots(const Register &obj, JSObject *templateObject); - public: - void newGCObject(const Register &result, JSObject *templateObject, Label *fail, - gc::InitialHeap initialHeap); - void newGCObjectAndSlots(const Register &result, JSObject *templateObject, Label *fail, - Label *oolMalloc, Label *oolMallocExit, Label *oolFree, - gc::InitialHeap initialHeap); - void initGCObject(const Register &obj, JSObject *templateObject); - + void newGCThing(const Register &result, gc::AllocKind allocKind, Label *fail, + gc::InitialHeap initialHeap = gc::DefaultHeap); + void newGCThing(const Register &result, JSObject *templateObject, Label *fail, + gc::InitialHeap initialHeap); void newGCString(const Register &result, Label *fail); void newGCShortString(const Register &result, Label *fail); @@ -810,13 +796,13 @@ class MacroAssembler : public MacroAssemblerSpecific void newGCThingPar(const Register &result, const Register &cx, const Register &tempReg1, const Register &tempReg2, JSObject *templateObject, Label *fail); - void newGCStringPar(const Register &result, const Register &cx, const Register &tempReg1, const Register &tempReg2, Label *fail); void newGCShortStringPar(const Register &result, const Register &cx, const Register &tempReg1, const Register &tempReg2, Label *fail); + void initGCThing(const Register &obj, JSObject *templateObject); // Compares two strings for equality based on the JSOP. // This checks for identical pointers, atoms and length and fails for everything else. diff --git a/js/src/jit/LIR-Common.h b/js/src/jit/LIR-Common.h index b35f70bca112..1cbfda332e52 100644 --- a/js/src/jit/LIR-Common.h +++ b/js/src/jit/LIR-Common.h @@ -302,6 +302,32 @@ class LGoto : public LControlInstructionHelper<1, 0, 0> } }; +class LNewSlots : public LCallInstructionHelper<1, 0, 3> +{ + public: + LIR_HEADER(NewSlots) + + LNewSlots(const LDefinition &temp1, const LDefinition &temp2, const LDefinition &temp3) { + setTemp(0, temp1); + setTemp(1, temp2); + setTemp(2, temp3); + } + + const LDefinition *temp1() { + return getTemp(0); + } + const LDefinition *temp2() { + return getTemp(1); + } + const LDefinition *temp3() { + return getTemp(2); + } + + MNewSlots *mir() const { + return mir_->toNewSlots(); + } +}; + class LNewArray : public LInstructionHelper<1, 0, 0> { public: @@ -414,27 +440,39 @@ class LNewDeclEnvObject : public LInstructionHelper<1, 0, 0> } }; -// Allocates a new CallObject. +// Allocates a new CallObject. The inputs are: +// slots: either a reg representing a HeapSlot *, or a placeholder +// meaning that no slots pointer is needed. // // This instruction generates two possible instruction sets: // (1) If the call object is extensible, this is a callVM to create the // call object. // (2) Otherwise, an inline allocation of the call object is attempted. // -class LNewCallObject : public LInstructionHelper<1, 0, 0> +class LNewCallObject : public LInstructionHelper<1, 1, 0> { public: LIR_HEADER(NewCallObject) + LNewCallObject(const LAllocation &slots) { + setOperand(0, slots); + } + + const LAllocation *slots() { + return getOperand(0); + } MNewCallObject *mir() const { return mir_->toNewCallObject(); } }; -class LNewCallObjectPar : public LInstructionHelper<1, 1, 2> +class LNewCallObjectPar : public LInstructionHelper<1, 2, 2> { - LNewCallObjectPar(const LAllocation &cx, const LDefinition &temp1, const LDefinition &temp2) { + LNewCallObjectPar(const LAllocation &cx, const LAllocation &slots, + const LDefinition &temp1, const LDefinition &temp2) + { setOperand(0, cx); + setOperand(1, slots); setTemp(0, temp1); setTemp(1, temp2); } @@ -442,16 +480,37 @@ class LNewCallObjectPar : public LInstructionHelper<1, 1, 2> public: LIR_HEADER(NewCallObjectPar); - static LNewCallObjectPar *New(TempAllocator &alloc, const LAllocation &cx, - const LDefinition &temp1, const LDefinition &temp2) + static LNewCallObjectPar *NewWithSlots(TempAllocator &alloc, + const LAllocation &cx, const LAllocation &slots, + const LDefinition &temp1, const LDefinition &temp2) { - return new(alloc) LNewCallObjectPar(cx, temp1, temp2); + return new(alloc) LNewCallObjectPar(cx, slots, temp1, temp2); + } + + static LNewCallObjectPar *NewSansSlots(TempAllocator &alloc, + const LAllocation &cx, + const LDefinition &temp1, const LDefinition &temp2) + { + LAllocation slots = LConstantIndex::Bogus(); + return new(alloc) LNewCallObjectPar(cx, slots, temp1, temp2); } const LAllocation *forkJoinContext() { return getOperand(0); } + const LAllocation *slots() { + return getOperand(1); + } + + const bool hasDynamicSlots() { + // TO INVESTIGATE: Felix tried using isRegister() method here, + // but for useFixed(_, CallTempN), isRegister() is false (and + // isUse() is true). So for now ignore that and try to match + // the LConstantIndex::Bogus() generated above instead. + return slots() && ! slots()->isConstant(); + } + const MNewCallObjectPar *mir() const { return mir_->toNewCallObjectPar(); } diff --git a/js/src/jit/LOpcodes.h b/js/src/jit/LOpcodes.h index 2d9b32968bb5..03c46126a8a6 100644 --- a/js/src/jit/LOpcodes.h +++ b/js/src/jit/LOpcodes.h @@ -25,6 +25,7 @@ _(Goto) \ _(NewArray) \ _(NewObject) \ + _(NewSlots) \ _(NewDeclEnvObject) \ _(NewCallObject) \ _(NewStringObject) \ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index ea9dad18c765..44df0e88151c 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -160,6 +160,17 @@ LIRGenerator::visitDefFun(MDefFun *ins) return add(lir, ins) && assignSafepoint(lir, ins); } +bool +LIRGenerator::visitNewSlots(MNewSlots *ins) +{ + // No safepoint needed, since we don't pass a cx. + LNewSlots *lir = new(alloc()) LNewSlots(tempFixed(CallTempReg0), tempFixed(CallTempReg1), + tempFixed(CallTempReg2)); + if (!assignSnapshot(lir)) + return false; + return defineReturn(lir, ins); +} + bool LIRGenerator::visitNewArray(MNewArray *ins) { @@ -184,7 +195,13 @@ LIRGenerator::visitNewDeclEnvObject(MNewDeclEnvObject *ins) bool LIRGenerator::visitNewCallObject(MNewCallObject *ins) { - LNewCallObject *lir = new(alloc()) LNewCallObject(); + LAllocation slots; + if (ins->slots()->type() == MIRType_Slots) + slots = useRegister(ins->slots()); + else + slots = LConstantIndex::Bogus(); + + LNewCallObject *lir = new(alloc()) LNewCallObject(slots); if (!define(lir, ins)) return false; @@ -211,7 +228,14 @@ LIRGenerator::visitNewCallObjectPar(MNewCallObjectPar *ins) const LDefinition &temp1 = temp(); const LDefinition &temp2 = temp(); - LNewCallObjectPar *lir = LNewCallObjectPar::New(alloc(), parThreadContext, temp1, temp2); + LNewCallObjectPar *lir; + if (ins->slots()->type() == MIRType_Slots) { + const LAllocation &slots = useRegister(ins->slots()); + lir = LNewCallObjectPar::NewWithSlots(alloc(), parThreadContext, slots, temp1, temp2); + } else { + lir = LNewCallObjectPar::NewSansSlots(alloc(), parThreadContext, temp1, temp2); + } + return define(lir, ins); } diff --git a/js/src/jit/Lowering.h b/js/src/jit/Lowering.h index 1ca8aa465afa..8d18ff23f18b 100644 --- a/js/src/jit/Lowering.h +++ b/js/src/jit/Lowering.h @@ -66,6 +66,7 @@ class LIRGenerator : public LIRGeneratorSpecific bool visitCallee(MCallee *callee); bool visitGoto(MGoto *ins); bool visitTableSwitch(MTableSwitch *tableswitch); + bool visitNewSlots(MNewSlots *ins); bool visitNewArray(MNewArray *ins); bool visitNewObject(MNewObject *ins); bool visitNewDeclEnvObject(MNewDeclEnvObject *ins); diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 4c199199fcb6..2e57b8172f8c 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -8860,6 +8860,33 @@ class MPostWriteBarrier #endif }; +class MNewSlots : public MNullaryInstruction +{ + unsigned nslots_; + + MNewSlots(unsigned nslots) + : nslots_(nslots) + { + setResultType(MIRType_Slots); + } + + public: + INSTRUCTION_HEADER(NewSlots) + + static MNewSlots *New(TempAllocator &alloc, unsigned nslots) { + return new(alloc) MNewSlots(nslots); + } + unsigned nslots() const { + return nslots_; + } + AliasSet getAliasSet() const { + return AliasSet::None(); + } + bool possiblyCalls() const { + return true; + } +}; + class MNewDeclEnvObject : public MNullaryInstruction { CompilerRootObject templateObj_; @@ -8886,13 +8913,13 @@ class MNewDeclEnvObject : public MNullaryInstruction } }; -class MNewCallObject : public MNullaryInstruction +class MNewCallObject : public MUnaryInstruction { CompilerRootObject templateObj_; bool needsSingletonType_; - MNewCallObject(JSObject *templateObj, bool needsSingletonType) - : MNullaryInstruction(), + MNewCallObject(JSObject *templateObj, bool needsSingletonType, MDefinition *slots) + : MUnaryInstruction(slots), templateObj_(templateObj), needsSingletonType_(needsSingletonType) { @@ -8902,11 +8929,15 @@ class MNewCallObject : public MNullaryInstruction public: INSTRUCTION_HEADER(NewCallObject) - static MNewCallObject *New(TempAllocator &alloc, JSObject *templateObj, bool needsSingletonType) + static MNewCallObject *New(TempAllocator &alloc, JSObject *templateObj, bool needsSingletonType, + MDefinition *slots) { - return new(alloc) MNewCallObject(templateObj, needsSingletonType); + return new(alloc) MNewCallObject(templateObj, needsSingletonType, slots); } + MDefinition *slots() { + return getOperand(0); + } JSObject *templateObject() { return templateObj_; } @@ -8918,13 +8949,13 @@ class MNewCallObject : public MNullaryInstruction } }; -class MNewCallObjectPar : public MUnaryInstruction +class MNewCallObjectPar : public MBinaryInstruction { CompilerRootObject templateObj_; - MNewCallObjectPar(MDefinition *cx, JSObject *templateObj) - : MUnaryInstruction(cx), - templateObj_(templateObj) + MNewCallObjectPar(MDefinition *cx, JSObject *templateObj, MDefinition *slots) + : MBinaryInstruction(cx, slots), + templateObj_(templateObj) { setResultType(MIRType_Object); } @@ -8933,14 +8964,17 @@ class MNewCallObjectPar : public MUnaryInstruction INSTRUCTION_HEADER(NewCallObjectPar); static MNewCallObjectPar *New(TempAllocator &alloc, MDefinition *cx, MNewCallObject *callObj) { - JS_ASSERT(!callObj->templateObject()->hasDynamicSlots()); - return new(alloc) MNewCallObjectPar(cx, callObj->templateObject()); + return new(alloc) MNewCallObjectPar(cx, callObj->templateObject(), callObj->slots()); } MDefinition *forkJoinContext() const { return getOperand(0); } + MDefinition *slots() const { + return getOperand(1); + } + JSObject *templateObj() const { return templateObj_; } diff --git a/js/src/jit/MOpcodes.h b/js/src/jit/MOpcodes.h index d85ce588f88f..85e49fece67d 100644 --- a/js/src/jit/MOpcodes.h +++ b/js/src/jit/MOpcodes.h @@ -85,6 +85,7 @@ namespace jit { _(ToInt32) \ _(TruncateToInt32) \ _(ToString) \ + _(NewSlots) \ _(NewArray) \ _(NewObject) \ _(NewDeclEnvObject) \ diff --git a/js/src/jit/ParallelSafetyAnalysis.cpp b/js/src/jit/ParallelSafetyAnalysis.cpp index da165596d7ab..bd5d1fd3dee0 100644 --- a/js/src/jit/ParallelSafetyAnalysis.cpp +++ b/js/src/jit/ParallelSafetyAnalysis.cpp @@ -179,6 +179,7 @@ class ParallelSafetyVisitor : public MInstructionVisitor SAFE_OP(TruncateToInt32) SAFE_OP(MaybeToDoubleElement) CUSTOM_OP(ToString) + SAFE_OP(NewSlots) CUSTOM_OP(NewArray) CUSTOM_OP(NewObject) CUSTOM_OP(NewCallObject) @@ -522,10 +523,6 @@ ParallelSafetyVisitor::visitCreateThisWithTemplate(MCreateThisWithTemplate *ins) bool ParallelSafetyVisitor::visitNewCallObject(MNewCallObject *ins) { - if (ins->templateObject()->hasDynamicSlots()) { - SpewMIR(ins, "call with dynamic slots"); - return markUnsafe(); - } replace(ins, MNewCallObjectPar::New(alloc(), ForkJoinContext(), ins)); return true; } @@ -640,6 +637,11 @@ ParallelSafetyVisitor::insertWriteGuard(MInstruction *writeInstruction, object = valueBeingWritten->toSlots()->object(); break; + case MDefinition::Op_NewSlots: + // Values produced by new slots will ALWAYS be + // thread-local. + return true; + default: SpewMIR(writeInstruction, "cannot insert write guard for %s", valueBeingWritten->opName()); diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 3e3010e70c94..c2be497b054e 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -514,23 +514,21 @@ NewSlots(JSRuntime *rt, unsigned nslots) { JS_STATIC_ASSERT(sizeof(Value) == sizeof(HeapSlot)); - Value *slots = rt->pod_malloc(nslots); + Value *slots = reinterpret_cast(rt->malloc_(nslots * sizeof(Value))); if (!slots) return nullptr; + for (unsigned i = 0; i < nslots; i++) + slots[i] = UndefinedValue(); + return reinterpret_cast(slots); } -void -FreeSlots(HeapSlot *slots) -{ - js_free(slots); -} - JSObject * -NewCallObject(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type) +NewCallObject(JSContext *cx, HandleScript script, + HandleShape shape, HandleTypeObject type, HeapSlot *slots) { - JSObject *obj = CallObject::create(cx, script, shape, type); + JSObject *obj = CallObject::create(cx, script, shape, type, slots); if (!obj) return nullptr; diff --git a/js/src/jit/VMFunctions.h b/js/src/jit/VMFunctions.h index e41836e7d040..86e0a03ad4c1 100644 --- a/js/src/jit/VMFunctions.h +++ b/js/src/jit/VMFunctions.h @@ -618,9 +618,8 @@ bool SetProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Handl bool InterruptCheck(JSContext *cx); HeapSlot *NewSlots(JSRuntime *rt, unsigned nslots); -void FreeSlots(HeapSlot *slots); -JSObject *NewCallObject(JSContext *cx, HandleScript script, HandleShape shape, - HandleTypeObject type); +JSObject *NewCallObject(JSContext *cx, HandleScript script, + HandleShape shape, HandleTypeObject type, HeapSlot *slots); JSObject *NewStringObject(JSContext *cx, HandleString str); bool SPSEnter(JSContext *cx, HandleScript script); diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler-arm.h index 785b45e42907..a12cfd3360bb 100644 --- a/js/src/jit/arm/MacroAssembler-arm.h +++ b/js/src/jit/arm/MacroAssembler-arm.h @@ -626,10 +626,6 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM void pop(const FloatRegister ®) { ma_vpop(VFPRegister(reg)); } - void pop(const Address &address) { - ma_ldr(Operand(address.base, address.offset), ScratchRegister); - ma_pop(ScratchRegister); - } void popN(const Register ®, Imm32 extraSpace) { Imm32 totSpace = Imm32(extraSpace.value + 4); diff --git a/js/src/jit/shared/Assembler-x86-shared.h b/js/src/jit/shared/Assembler-x86-shared.h index 25ead31a00e6..0b8e38ef072f 100644 --- a/js/src/jit/shared/Assembler-x86-shared.h +++ b/js/src/jit/shared/Assembler-x86-shared.h @@ -1181,23 +1181,20 @@ class AssemblerX86Shared masm.push_m(src.offset, src.base.code()); } - void pop(const Operand &dest) { - switch (dest.kind()) { + void pop(const Operand &src) { + switch (src.kind()) { case Operand::REG: - masm.pop_r(dest.reg()); + masm.pop_r(src.reg()); break; case Operand::MEM_REG_DISP: - masm.pop_m(dest.disp(), dest.base()); + masm.pop_m(src.disp(), src.base()); break; default: MOZ_ASSUME_UNREACHABLE("unexpected operand kind"); } } - void pop(const Register &dest) { - masm.pop_r(dest.code()); - } - void pop(const Address &dest) { - masm.pop_m(dest.offset, dest.base.code()); + void pop(const Register &src) { + masm.pop_r(src.code()); } void pushFlags() { diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index c077f913e2e0..d7efd3442546 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -940,13 +940,16 @@ JS::DisableGenerationalGC(JSRuntime *rt) rt->gcStoreBuffer.disable(); } #endif + ++rt->gcGenerationalDisabled; } extern JS_FRIEND_API(void) JS::EnableGenerationalGC(JSRuntime *rt) { + JS_ASSERT(rt->gcGenerationalDisabled > 0); + --rt->gcGenerationalDisabled; #ifdef JSGC_GENERATIONAL - if (!IsGenerationalGCEnabled(rt)) { + if (IsGenerationalGCEnabled(rt)) { rt->gcNursery.enable(); rt->gcStoreBuffer.enable(); } @@ -956,11 +959,7 @@ JS::EnableGenerationalGC(JSRuntime *rt) extern JS_FRIEND_API(bool) JS::IsGenerationalGCEnabled(JSRuntime *rt) { -#ifdef JSGC_GENERATIONAL - return rt->gcNursery.isEnabled(); -#else - return false; -#endif + return rt->gcGenerationalDisabled == 0; } JS_FRIEND_API(bool) diff --git a/js/src/jsobj.h b/js/src/jsobj.h index f303402fb126..724a807124cd 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -255,7 +255,8 @@ class JSObject : public js::ObjectImpl js::gc::AllocKind kind, js::gc::InitialHeap heap, js::HandleShape shape, - js::HandleTypeObject type); + js::HandleTypeObject type, + js::HeapSlot *extantSlots = nullptr); /* Make an array object with the specified initial state. */ static inline js::ArrayObject *createArray(js::ExclusiveContext *cx, diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 560448cd3cb5..07794b7f6719 100644 --- a/js/src/jsobjinlines.h +++ b/js/src/jsobjinlines.h @@ -480,7 +480,8 @@ inline bool JSObject::isVarObj() /* static */ inline JSObject * JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::InitialHeap heap, - js::HandleShape shape, js::HandleTypeObject type) + js::HandleShape shape, js::HandleTypeObject type, + js::HeapSlot *extantSlots /* = nullptr */) { /* * Callers must use dynamicSlotsCount to size the initial slot array of the @@ -493,9 +494,13 @@ JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::Initi JS_ASSERT(js::gc::GetGCKindSlots(kind, type->clasp()) == shape->numFixedSlots()); JS_ASSERT_IF(type->clasp()->flags & JSCLASS_BACKGROUND_FINALIZE, IsBackgroundFinalized(kind)); JS_ASSERT_IF(type->clasp()->finalize, heap == js::gc::TenuredHeap); + JS_ASSERT_IF(extantSlots, dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(), + type->clasp())); const js::Class *clasp = type->clasp(); - size_t nDynamicSlots = dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(), clasp); + size_t nDynamicSlots = 0; + if (!extantSlots) + nDynamicSlots = dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(), clasp); JSObject *obj = js::NewGCObject(cx, kind, nDynamicSlots, heap); if (!obj) @@ -503,7 +508,13 @@ JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::Initi obj->shape_.init(shape); obj->type_.init(type); - JS_ASSERT_IF(nDynamicSlots, obj->slots); + if (extantSlots) { +#ifdef JSGC_GENERATIONAL + if (cx->isJSContext()) + cx->asJSContext()->runtime()->gcNursery.notifyInitialSlots(obj, extantSlots); +#endif + obj->slots = extantSlots; + } obj->elements = js::emptyObjectElements; if (clasp->hasPrivate()) diff --git a/js/src/vm/ObjectImpl.h b/js/src/vm/ObjectImpl.h index 3b19270f17fb..31f08d50cbbb 100644 --- a/js/src/vm/ObjectImpl.h +++ b/js/src/vm/ObjectImpl.h @@ -1387,12 +1387,6 @@ class ObjectImpl : public gc::BarrieredCell return fixedSlots()[slot]; } - const Value &getDynamicSlot(uint32_t slot) const { - MOZ_ASSERT(slots); - MOZ_ASSERT(slot < numDynamicSlots()); - return slots[slot]; - } - void setFixedSlot(uint32_t slot, const Value &value) { MOZ_ASSERT(slot < numFixedSlots()); fixedSlots()[slot].set(this->asObjectPtr(), HeapSlot::Slot, slot, value); diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index ea6360849409..cf1ba2301803 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -216,6 +216,7 @@ JSRuntime::JSRuntime(JSUseHelperThreads useHelperThreads) gcInterFrameGC(0), gcSliceBudget(SliceBudget::Unlimited), gcIncrementalEnabled(true), + gcGenerationalDisabled(0), gcManipulatingDeadZones(false), gcObjectsMarkedInDeadZones(0), gcPoke(false), diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index b5aa9bd936e4..55ec0338f1a3 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -1116,6 +1116,11 @@ struct JSRuntime : public JS::shadow::Runtime, */ bool gcIncrementalEnabled; + /* + * GGC can be enabled from the command line while testing. + */ + unsigned gcGenerationalDisabled; + /* * This is true if we are in the middle of a brain transplant (e.g., * JS_TransplantObject) or some other operation that can manipulate diff --git a/js/src/vm/ScopeObject.cpp b/js/src/vm/ScopeObject.cpp index c3e0c0d755f9..16afe8b4769e 100644 --- a/js/src/vm/ScopeObject.cpp +++ b/js/src/vm/ScopeObject.cpp @@ -137,18 +137,18 @@ ScopeObject::setEnclosingScope(HandleObject obj) } /* - * Construct a bare-bones call object given a shape and type. + * Construct a bare-bones call object given a shape, type, and slots pointer. * The call object must be further initialized to be usable. */ CallObject * -CallObject::create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type) +CallObject::create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type, HeapSlot *slots) { gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots()); JS_ASSERT(CanBeFinalizedInBackground(kind, &CallObject::class_)); kind = gc::GetBackgroundAllocKind(kind); gc::InitialHeap heap = script->treatAsRunOnce() ? gc::TenuredHeap : gc::DefaultHeap; - JSObject *obj = JSObject::create(cx, kind, heap, shape, type); + JSObject *obj = JSObject::create(cx, kind, heap, shape, type, slots); if (!obj) return nullptr; diff --git a/js/src/vm/ScopeObject.h b/js/src/vm/ScopeObject.h index 21deb956df4c..2a668e988bf1 100644 --- a/js/src/vm/ScopeObject.h +++ b/js/src/vm/ScopeObject.h @@ -237,7 +237,7 @@ class CallObject : public ScopeObject /* These functions are internal and are exposed only for JITs. */ static CallObject * - create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type); + create(JSContext *cx, HandleScript script, HandleShape shape, HandleTypeObject type, HeapSlot *slots); static CallObject * createTemplateObject(JSContext *cx, HandleScript script, gc::InitialHeap heap); From 7b54370bdceabdb255a6fb8f1ec0c2e1ec8e530c Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 18 Feb 2014 14:26:57 +1300 Subject: [PATCH 06/56] Bug 972713. Part 1: Make all callers of GetAnimatedGeometryRootFor pass a display item so we can stop searching when we reach the item's reference frame. r=mattwoodrow This guarantees that the animated geometry root for an item is always in the same display list coordinate system as the frame. --HG-- extra : rebase_source : 249fd847a2c08f8d0846d698cce9dd4681e38a98 --- layout/base/nsDisplayList.cpp | 49 ++++++++++++++++------------------- layout/base/nsDisplayList.h | 11 -------- layout/base/nsLayoutUtils.cpp | 21 ++++++++------- layout/base/nsLayoutUtils.h | 24 +++++++---------- 4 files changed, 42 insertions(+), 63 deletions(-) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index ce221ff17db2..b996c4c0bc57 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -2965,18 +2965,23 @@ void nsDisplayWrapList::Paint(nsDisplayListBuilder* aBuilder, NS_ERROR("nsDisplayWrapList should have been flattened away for painting"); } +/** + * Returns true if all descendant display items can be placed in the same + * ThebesLayer --- GetLayerState returns LAYER_INACTIVE or LAYER_NONE, + * and they all have the expected animated geometry root. + */ static LayerState -RequiredLayerStateForChildrenInternal(nsDisplayListBuilder* aBuilder, - LayerManager* aManager, - const ContainerLayerParameters& aParameters, - const nsDisplayList& aList, - nsIFrame* aAnimatedGeometryRoot) +RequiredLayerStateForChildren(nsDisplayListBuilder* aBuilder, + LayerManager* aManager, + const ContainerLayerParameters& aParameters, + const nsDisplayList& aList, + nsIFrame* aExpectedAnimatedGeometryRootForChildren) { LayerState result = LAYER_INACTIVE; for (nsDisplayItem* i = aList.GetBottom(); i; i = i->GetAbove()) { - nsIFrame* f = i->Frame(); if (result == LAYER_INACTIVE && - nsLayoutUtils::GetAnimatedGeometryRootFor(f) != aAnimatedGeometryRoot) { + nsLayoutUtils::GetAnimatedGeometryRootFor(i, aBuilder) != + aExpectedAnimatedGeometryRootForChildren) { result = LAYER_ACTIVE; } @@ -2992,8 +2997,8 @@ RequiredLayerStateForChildrenInternal(nsDisplayListBuilder* aBuilder, nsDisplayList* list = i->GetSameCoordinateSystemChildren(); if (list) { LayerState childState = - RequiredLayerStateForChildrenInternal(aBuilder, aManager, aParameters, *list, - aAnimatedGeometryRoot); + RequiredLayerStateForChildren(aBuilder, aManager, aParameters, *list, + aExpectedAnimatedGeometryRootForChildren); if (childState > result) { result = childState; } @@ -3003,18 +3008,6 @@ RequiredLayerStateForChildrenInternal(nsDisplayListBuilder* aBuilder, return result; } -LayerState -nsDisplayWrapList::RequiredLayerStateForChildren(nsDisplayListBuilder* aBuilder, - LayerManager* aManager, - const ContainerLayerParameters& aParameters, - const nsDisplayList& aList, - nsIFrame* aItemFrame) -{ - return RequiredLayerStateForChildrenInternal( - aBuilder, aManager, aParameters, aList, - nsLayoutUtils::GetAnimatedGeometryRootFor(aItemFrame)); -} - nsRect nsDisplayWrapList::GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder) { nsRect bounds; @@ -3190,7 +3183,8 @@ nsDisplayOpacity::GetLayerState(nsDisplayListBuilder* aBuilder, if (NeedsActiveLayer()) return LAYER_ACTIVE; - return RequiredLayerStateForChildren(aBuilder, aManager, aParameters, mList, mFrame); + return RequiredLayerStateForChildren(aBuilder, aManager, aParameters, mList, + nsLayoutUtils::GetAnimatedGeometryRootFor(this, aBuilder)); } bool @@ -4478,11 +4472,12 @@ nsDisplayTransform::GetLayerState(nsDisplayListBuilder* aBuilder, return LAYER_ACTIVE; } - return mStoredList.RequiredLayerStateForChildren(aBuilder, - aManager, - aParameters, - *mStoredList.GetChildren(), - mFrame); + // Expect the child display items to have this frame as their animated + // geometry root (since it will be their reference frame). If they have a + // different animated geometry root, we'll make this an active layer so the + // animation can be accelerated. + return RequiredLayerStateForChildren(aBuilder, aManager, aParameters, + *mStoredList.GetChildren(), Frame()); } bool nsDisplayTransform::ComputeVisibility(nsDisplayListBuilder *aBuilder, diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index b59d803f929d..b187ae76238d 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -2490,17 +2490,6 @@ public: return nullptr; } - /** - * Returns true if all descendant display items can be placed in the same - * ThebesLayer --- GetLayerState returns LAYER_INACTIVE or LAYER_NONE, - * and they all have the given aAnimatedGeometryRoot. - */ - static LayerState RequiredLayerStateForChildren(nsDisplayListBuilder* aBuilder, - LayerManager* aManager, - const ContainerLayerParameters& aParameters, - const nsDisplayList& aList, - nsIFrame* aItemFrame); - protected: nsDisplayWrapList() {} diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index e6102dc3e803..1e5aabb70fc3 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1304,23 +1304,24 @@ nsLayoutUtils::IsFixedPosFrameInDisplayPort(const nsIFrame* aFrame, nsRect* aDis return ViewportHasDisplayPort(aFrame->PresContext(), aDisplayPort); } -nsIFrame* -nsLayoutUtils::GetAnimatedGeometryRootFor(nsIFrame* aFrame, - const nsIFrame* aStopAtAncestor) +static nsIFrame* +GetAnimatedGeometryRootForFrame(nsIFrame* aFrame, + const nsIFrame* aStopAtAncestor) { nsIFrame* f = aFrame; nsIFrame* stickyFrame = nullptr; while (f != aStopAtAncestor) { - if (IsPopup(f)) + if (nsLayoutUtils::IsPopup(f)) break; if (ActiveLayerTracker::IsOffsetOrMarginStyleAnimated(f)) break; - if (!f->GetParent() && ViewportHasDisplayPort(f->PresContext())) { + if (!f->GetParent() && + nsLayoutUtils::ViewportHasDisplayPort(f->PresContext())) { // Viewport frames in a display port need to be animated geometry roots // for background-attachment:fixed elements. break; } - nsIFrame* parent = GetCrossDocParentFrame(f); + nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrame(f); if (!parent) break; nsIAtom* parentType = parent->GetType(); @@ -1351,7 +1352,7 @@ nsLayoutUtils::GetAnimatedGeometryRootFor(nsIFrame* aFrame, } } // Fixed-pos frames are parented by the viewport frame, which has no parent - if (IsFixedPosFrameInDisplayPort(f)) { + if (nsLayoutUtils::IsFixedPosFrameInDisplayPort(f)) { return f; } f = parent; @@ -1368,7 +1369,7 @@ nsLayoutUtils::GetAnimatedGeometryRootFor(nsDisplayItem* aItem, nsDisplayScrollLayer* scrollLayerItem = static_cast(aItem); nsIFrame* scrolledFrame = scrollLayerItem->GetScrolledFrame(); - return nsLayoutUtils::GetAnimatedGeometryRootFor(scrolledFrame, + return GetAnimatedGeometryRootForFrame(scrolledFrame, aBuilder->FindReferenceFrameFor(scrolledFrame)); } if (aItem->ShouldFixToViewport(aBuilder)) { @@ -1379,10 +1380,10 @@ nsLayoutUtils::GetAnimatedGeometryRootFor(nsDisplayItem* aItem, nsIFrame* viewportFrame = nsLayoutUtils::GetClosestFrameOfType(f, nsGkAtoms::viewportFrame); NS_ASSERTION(viewportFrame, "no viewport???"); - return nsLayoutUtils::GetAnimatedGeometryRootFor(viewportFrame, + return GetAnimatedGeometryRootForFrame(viewportFrame, aBuilder->FindReferenceFrameFor(viewportFrame)); } - return nsLayoutUtils::GetAnimatedGeometryRootFor(f, aItem->ReferenceFrame()); + return GetAnimatedGeometryRootForFrame(f, aItem->ReferenceFrame()); } // static diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index 7ae017c10fcf..0748fe4e96a3 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -408,28 +408,22 @@ public: nsRect* aDisplayPort = nullptr); /** - * Finds the nearest ancestor frame that is considered to have (or will have) - * "animated geometry". For example the scrolled frames of scrollframes which - * are actively being scrolled fall into this category. Frames with certain - * CSS properties that are being animated (e.g. 'left'/'top' etc) are also - * placed in this category. Frames with animated CSS transforms are not - * put in this category because they can be handled directly by - * nsDisplayTransform. - * Stop searching at aStopAtAncestor if there is no such ancestor before it - * in the ancestor chain. + * Finds the nearest ancestor frame to aItem that is considered to have (or + * will have) "animated geometry". For example the scrolled frames of + * scrollframes which are actively being scrolled fall into this category. + * Frames with certain CSS properties that are being animated (e.g. + * 'left'/'top' etc) are also placed in this category. * Frames with different active geometry roots are in different ThebesLayers, * so that we can animate the geometry root by changing its transform (either * on the main thread or in the compositor). - * This function is idempotent: a frame returned by GetAnimatedGeometryRootFor - * is always returned again if you pass it to GetAnimatedGeometryRootFor. + * The animated geometry root is required to be a descendant (or equal to) + * aItem's ReferenceFrame(), which means that we will fall back to + * returning aItem->ReferenceFrame() when we can't find another animated + * geometry root. */ - static nsIFrame* GetAnimatedGeometryRootFor(nsIFrame* aFrame, - const nsIFrame* aStopAtAncestor = nullptr); - static nsIFrame* GetAnimatedGeometryRootFor(nsDisplayItem* aItem, nsDisplayListBuilder* aBuilder); - /** * GetScrollableFrameFor returns the scrollable frame for a scrolled frame */ From 9153867fae68e09384cd43536df53e2a1c37b362 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 18 Feb 2014 17:00:35 +1300 Subject: [PATCH 07/56] Bug 972713. Part 2: Ignore active scrolled roots in inactive layer trees, because they don't help and could hurt. r=mattwoodrow --- layout/base/FrameLayerBuilder.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index b9e0c7208c3a..125067b001d0 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -2293,18 +2293,16 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList, { PROFILER_LABEL("ContainerState", "ProcessDisplayItems"); - const nsIFrame* lastAnimatedGeometryRoot = nullptr; - nsPoint topLeft; + const nsIFrame* lastAnimatedGeometryRoot = mContainerReferenceFrame; + nsPoint topLeft(0,0); // When NO_COMPONENT_ALPHA is set, items will be flattened into a single // layer, so we need to choose which active scrolled root to use for all // items. if (aFlags & NO_COMPONENT_ALPHA) { - if (!ChooseAnimatedGeometryRoot(aList, &lastAnimatedGeometryRoot)) { - lastAnimatedGeometryRoot = mContainerReferenceFrame; + if (ChooseAnimatedGeometryRoot(aList, &lastAnimatedGeometryRoot)) { + topLeft = lastAnimatedGeometryRoot->GetOffsetToCrossDoc(mContainerReferenceFrame); } - - topLeft = lastAnimatedGeometryRoot->GetOffsetToCrossDoc(mContainerReferenceFrame); } int32_t maxLayers = nsDisplayItem::MaxActiveLayers(); @@ -2344,7 +2342,14 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList, animatedGeometryRoot = lastAnimatedGeometryRoot; } else { forceInactive = false; - animatedGeometryRoot = nsLayoutUtils::GetAnimatedGeometryRootFor(item, mBuilder); + if (mManager->IsWidgetLayerManager()) { + animatedGeometryRoot = nsLayoutUtils::GetAnimatedGeometryRootFor(item, mBuilder); + } else { + // For inactive layer subtrees, splitting content into ThebesLayers + // based on animated geometry roots is pointless. It's more efficient + // to build the minimum number of layers. + animatedGeometryRoot = mContainerReferenceFrame; + } if (animatedGeometryRoot != lastAnimatedGeometryRoot) { lastAnimatedGeometryRoot = animatedGeometryRoot; topLeft = animatedGeometryRoot->GetOffsetToCrossDoc(mContainerReferenceFrame); From 960021196fa20fb8f0919d56f33f2c0bc620b7ab Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Mon, 17 Feb 2014 20:07:45 -0800 Subject: [PATCH 08/56] Bug 965655: Revert test disabling from changeset 8a0d810a0cca now that bug 969590 (switch of test slaves) is fixed. --- testing/mochitest/b2g.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/testing/mochitest/b2g.json b/testing/mochitest/b2g.json index 8532c9ebff9b..9a7fd0dd903a 100644 --- a/testing/mochitest/b2g.json +++ b/testing/mochitest/b2g.json @@ -395,8 +395,6 @@ "layout/generic/test/test_selection_expanding.html":"mouse selection not working", "layout/style/test/test_transitions_per_property.html":"times out, needs more time + various failures", - "layout/style/test/test_initial_storage.html":"bug 965655", - "layout/style/test/test_value_storage.html":"bug 965655", "content/html/content/test/test_bug209275.xhtml":"timed out, 47 tests, bug 870262, :visited support", "content/html/content/test/test_bug481335.xhtml":"timed out, bug 870262, :visited support", From e4e2cc5501176509f5d0d1e8894e24e506fb63da Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Mon, 17 Feb 2014 20:07:45 -0800 Subject: [PATCH 09/56] Make fix-linux-stack handle addresses with lowercase hexidecimal, since that seems to be the thing these days. No bug. (mrbkap, I, and ehoogeveen have all seen lowercase lately.) --- tools/rb/fix-linux-stack.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/rb/fix-linux-stack.pl b/tools/rb/fix-linux-stack.pl index d085ca7e7a41..de8e49c16a9a 100755 --- a/tools/rb/fix-linux-stack.pl +++ b/tools/rb/fix-linux-stack.pl @@ -223,7 +223,7 @@ $SIG{PIPE} = 'IGNORE'; select STDOUT; $| = 1; # make STDOUT unbuffered while (<>) { my $line = $_; - if ($line =~ /^([ \|0-9-]*)(.*) ?\[([^ ]*) \+(0x[0-9A-F]{1,8})\](.*)$/) { + if ($line =~ /^([ \|0-9-]*)(.*) ?\[([^ ]*) \+(0x[0-9A-Fa-f]{1,8})\](.*)$/) { my $before = $1; # allow preservation of balance trees my $badsymbol = $2; my $file = $3; From fbcb130e34531e1579a75900472afe6f915b2b52 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Mon, 17 Feb 2014 20:07:45 -0800 Subject: [PATCH 10/56] Bug 709014 patch 1: Honor margin-left and margin-right on elements in inline layout that have 0 width and/or height (commonly, inline-blocks). r=roc Prior to this patch, we failed to honor: * margin-left on elements in inline layout with 0 width and 0 height * margin-right on elements in inline layout with 0 width I think that was because the code in CanPlaceFrame to discard both margins when the width was 0 was running after the left-margin was applied, unless the later code in PlaceFrame (checking both width 0 and height 0) un-applied that left margin. The assertion count change in test_value_computation.html is due to 2 additional "bad width" assertions (I presume from honoring large margins that were previously ignored). The change to 538935-1-ref.html is to match an improvement in rendering of the margins in the test, where both sides of the margin are now honored. The change to layout/reftests/text-overflow/marker-basic-ref.html is to keep the reference (which uses margins) rendering the same way following the changes to margin handling. The new behavior (in the reftests added in layout/reftests/inline/) matches at least Chromium; I didn't check any other browsers. --- layout/generic/nsLineLayout.cpp | 77 ++++++++----------- layout/reftests/bugs/538935-1-ref.html | 4 +- .../reftests/inline/inline-block-margin.html | 6 ++ .../reftests/inline/inline-block-padding.html | 6 ++ .../reftests/inline/inline-block-width.html | 6 ++ layout/reftests/inline/inline-block-zero.html | 3 + layout/reftests/inline/reftest.list | 7 ++ .../inline/zero-inline-block-margin-left.html | 6 ++ .../inline/zero-inline-block-margin-ref.html | 6 ++ .../inline/zero-inline-block-margin-ref2.html | 6 ++ .../zero-inline-block-margin-right.html | 6 ++ layout/reftests/reftest.list | 3 + .../text-overflow/marker-basic-ref.html | 2 +- layout/style/test/test_value_computation.html | 2 +- 14 files changed, 93 insertions(+), 47 deletions(-) create mode 100644 layout/reftests/inline/inline-block-margin.html create mode 100644 layout/reftests/inline/inline-block-padding.html create mode 100644 layout/reftests/inline/inline-block-width.html create mode 100644 layout/reftests/inline/inline-block-zero.html create mode 100644 layout/reftests/inline/reftest.list create mode 100644 layout/reftests/inline/zero-inline-block-margin-left.html create mode 100644 layout/reftests/inline/zero-inline-block-margin-ref.html create mode 100644 layout/reftests/inline/zero-inline-block-margin-ref2.html create mode 100644 layout/reftests/inline/zero-inline-block-margin-right.html diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index 39e0750a36cb..a8ad279caee2 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -1133,39 +1133,34 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, NS_PRECONDITION(pfd && pfd->mFrame, "bad args, null pointers for frame data"); *aOptionalBreakAfterFits = true; - // Compute right margin to use - if (0 != pfd->mBounds.width) { - // XXXwaterson this is probably not exactly right; e.g., embeddings, etc. - bool ltr = (NS_STYLE_DIRECTION_LTR == aFrameDirection); - /* - * We want to only apply the end margin if we're the last continuation and - * either not in an {ib} split or the last inline in it. In all other - * cases we want to zero it out. That means zeroing it out if any of these - * conditions hold: - * 1) The frame is not complete (in this case it will get a next-in-flow) - * 2) The frame is complete but has a non-fluid continuation on its - * continuation chain. Note that if it has a fluid continuation, that - * continuation will get destroyed later, so we don't want to drop the - * end-margin in that case. - * 3) The frame is in an {ib} split and is not the last part. - * - * However, none of that applies if this is a letter frame (XXXbz why?) - */ - if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) || - pfd->mFrame->LastInFlow()->GetNextContinuation() || - pfd->mFrame->FrameIsNonLastInIBSplit()) - && !pfd->GetFlag(PFD_ISLETTERFRAME)) { - if (ltr) - pfd->mMargin.right = 0; - else - pfd->mMargin.left = 0; + // XXXwaterson this is probably not exactly right; e.g., embeddings, etc. + bool ltr = NS_STYLE_DIRECTION_LTR == aFrameDirection; + + /* + * We want to only apply the end margin if we're the last continuation and + * either not in an {ib} split or the last inline in it. In all other + * cases we want to zero it out. That means zeroing it out if any of these + * conditions hold: + * 1) The frame is not complete (in this case it will get a next-in-flow) + * 2) The frame is complete but has a non-fluid continuation on its + * continuation chain. Note that if it has a fluid continuation, that + * continuation will get destroyed later, so we don't want to drop the + * end-margin in that case. + * 3) The frame is in an {ib} split and is not the last part. + * + * However, none of that applies if this is a letter frame (XXXbz why?) + */ + if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) || + pfd->mFrame->LastInFlow()->GetNextContinuation() || + pfd->mFrame->FrameIsNonLastInIBSplit()) + && !pfd->GetFlag(PFD_ISLETTERFRAME)) { + if (ltr) { + pfd->mMargin.right = 0; + } else { + pfd->mMargin.left = 0; } } - else { - // Don't apply margin to empty frames. - pfd->mMargin.left = pfd->mMargin.right = 0; - } PerSpanData* psd = mCurrentSpan; if (psd->mNoWrap) { @@ -1173,7 +1168,6 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, return true; } - bool ltr = NS_STYLE_DIRECTION_LTR == aFrameDirection; nscoord endMargin = ltr ? pfd->mMargin.right : pfd->mMargin.left; #ifdef NOISY_CAN_PLACE_FRAME @@ -1290,15 +1284,6 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, void nsLineLayout::PlaceFrame(PerFrameData* pfd, nsHTMLReflowMetrics& aMetrics) { - // If frame is zero width then do not apply its left and right margins. - PerSpanData* psd = mCurrentSpan; - bool emptyFrame = false; - if ((0 == pfd->mBounds.width) && (0 == pfd->mBounds.height)) { - pfd->mBounds.x = psd->mX; - pfd->mBounds.y = mTopEdge; - emptyFrame = true; - } - // Record ascent and update max-ascent and max-descent values if (aMetrics.TopAscent() == nsHTMLReflowMetrics::ASK_FOR_BASELINE) pfd->mAscent = pfd->mFrame->GetBaseline(); @@ -1307,10 +1292,16 @@ nsLineLayout::PlaceFrame(PerFrameData* pfd, nsHTMLReflowMetrics& aMetrics) bool ltr = (NS_STYLE_DIRECTION_LTR == pfd->mFrame->StyleVisibility()->mDirection); // Advance to next X coordinate - psd->mX = pfd->mBounds.XMost() + (ltr ? pfd->mMargin.right : pfd->mMargin.left); + mCurrentSpan->mX = pfd->mBounds.XMost() + + (ltr ? pfd->mMargin.right : pfd->mMargin.left); - // Count the number of non-empty frames on the line... - if (!emptyFrame) { + // Count the number of non-placeholder frames on the line... + if (pfd->mFrame->GetType() == nsGkAtoms::placeholderFrame) { + NS_ASSERTION(pfd->mBounds.width == 0 && pfd->mBounds.height == 0, + "placeholders should have 0 width/height (checking " + "placeholders were never counted by the old code in " + "this function)"); + } else { mTotalPlacedFrames++; } } diff --git a/layout/reftests/bugs/538935-1-ref.html b/layout/reftests/bugs/538935-1-ref.html index b301c4368520..98d150ac02cd 100644 --- a/layout/reftests/bugs/538935-1-ref.html +++ b/layout/reftests/bugs/538935-1-ref.html @@ -5,12 +5,12 @@
Hello
Hello
Hello
-
Hello
+
Hello
Hello
Hello
Hello
Hello
-
Hello
+
Hello
diff --git a/layout/reftests/inline/inline-block-margin.html b/layout/reftests/inline/inline-block-margin.html new file mode 100644 index 000000000000..476f13df7ce6 --- /dev/null +++ b/layout/reftests/inline/inline-block-margin.html @@ -0,0 +1,6 @@ + +margin-left on zero-sized inline-block + +hello world diff --git a/layout/reftests/inline/inline-block-padding.html b/layout/reftests/inline/inline-block-padding.html new file mode 100644 index 000000000000..476f13df7ce6 --- /dev/null +++ b/layout/reftests/inline/inline-block-padding.html @@ -0,0 +1,6 @@ + +margin-left on zero-sized inline-block + +hello world diff --git a/layout/reftests/inline/inline-block-width.html b/layout/reftests/inline/inline-block-width.html new file mode 100644 index 000000000000..e0ebb9b08108 --- /dev/null +++ b/layout/reftests/inline/inline-block-width.html @@ -0,0 +1,6 @@ + +margin-left on zero-sized inline-block + +hello world diff --git a/layout/reftests/inline/inline-block-zero.html b/layout/reftests/inline/inline-block-zero.html new file mode 100644 index 000000000000..ec0166be4940 --- /dev/null +++ b/layout/reftests/inline/inline-block-zero.html @@ -0,0 +1,3 @@ + +margin-left on zero-sized inline-block +hello world diff --git a/layout/reftests/inline/reftest.list b/layout/reftests/inline/reftest.list new file mode 100644 index 000000000000..2ae90d62041e --- /dev/null +++ b/layout/reftests/inline/reftest.list @@ -0,0 +1,7 @@ +== zero-inline-block-margin-left.html zero-inline-block-margin-ref.html +== zero-inline-block-margin-right.html zero-inline-block-margin-ref.html +== zero-inline-block-margin-ref.html zero-inline-block-margin-ref2.html +== inline-block-width.html zero-inline-block-margin-ref.html +== inline-block-padding.html inline-block-width.html +== inline-block-margin.html inline-block-width.html +!= inline-block-width.html inline-block-zero.html diff --git a/layout/reftests/inline/zero-inline-block-margin-left.html b/layout/reftests/inline/zero-inline-block-margin-left.html new file mode 100644 index 000000000000..ac13d0b39708 --- /dev/null +++ b/layout/reftests/inline/zero-inline-block-margin-left.html @@ -0,0 +1,6 @@ + +margin-left on zero-sized inline-block + +hello world diff --git a/layout/reftests/inline/zero-inline-block-margin-ref.html b/layout/reftests/inline/zero-inline-block-margin-ref.html new file mode 100644 index 000000000000..ac4edb346d93 --- /dev/null +++ b/layout/reftests/inline/zero-inline-block-margin-ref.html @@ -0,0 +1,6 @@ + +margin-left on zero-sized inline-block + +hello world diff --git a/layout/reftests/inline/zero-inline-block-margin-ref2.html b/layout/reftests/inline/zero-inline-block-margin-ref2.html new file mode 100644 index 000000000000..24b69ba9d6b7 --- /dev/null +++ b/layout/reftests/inline/zero-inline-block-margin-ref2.html @@ -0,0 +1,6 @@ + +margin-left on zero-sized inline-block + +hello world diff --git a/layout/reftests/inline/zero-inline-block-margin-right.html b/layout/reftests/inline/zero-inline-block-margin-right.html new file mode 100644 index 000000000000..542649a4a6ad --- /dev/null +++ b/layout/reftests/inline/zero-inline-block-margin-right.html @@ -0,0 +1,6 @@ + +margin-left on zero-sized inline-block + +hello world diff --git a/layout/reftests/reftest.list b/layout/reftests/reftest.list index 971e76b8b83d..a5ec82f7a044 100644 --- a/layout/reftests/reftest.list +++ b/layout/reftests/reftest.list @@ -192,6 +192,9 @@ skip-if(B2G) include image-region/reftest.list # indic shaping with harfbuzz skip-if(B2G) include indic-shaping/reftest.list +# inline layout +include inline/reftest.list + # inline borders and padding skip-if(B2G) include inline-borderpadding/reftest.list diff --git a/layout/reftests/text-overflow/marker-basic-ref.html b/layout/reftests/text-overflow/marker-basic-ref.html index 61a847745d64..c452323f9116 100644 --- a/layout/reftests/text-overflow/marker-basic-ref.html +++ b/layout/reftests/text-overflow/marker-basic-ref.html @@ -260,7 +260,7 @@ x1 m { position:absolute; right:0; font-size:16px; }
-
+
    
    
diff --git a/layout/style/test/test_value_computation.html b/layout/style/test/test_value_computation.html index 301c527d9146..a11d67f116cf 100644 --- a/layout/style/test/test_value_computation.html +++ b/layout/style/test/test_value_computation.html @@ -13,7 +13,7 @@ + + + +
+
+
+ + From a092bafdeecbac997074a1e7855bc8691a103029 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 13:25:11 -0800 Subject: [PATCH 14/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/79e2c9d07063 Author: Kevin Grandon Desc: Merge pull request #16256 from KevinGrandon/bug_971484_system_dialercomms_v2 Bug 971484 - [System2] Instantiable DialerComms r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/51917db7e908 Author: Kevin Grandon Desc: Bug 971484 - [System2] Instantiable DialerComms r=alive --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index bb1585e3836b..e9c25cb3ae84 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "382af669abf48d0492f707b523901f0ec364e10b", + "revision": "79e2c9d07063c41784da4f351f522d6ff72c1110", "repo_path": "/integration/gaia-central" } From 9e2b7da1fde7a7aff1290103ab133e590229121b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 13:25:57 -0800 Subject: [PATCH 15/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 693b358a4aa5..b9b1fa7a2832 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@
- + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 2057fdb271ba..6944bb04f042 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 693b358a4aa5..b9b1fa7a2832 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 0063dc714949..d76c8440e070 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index c389ab1d1ce5..418fc83bb623 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index d831d8aca2ba..2be082216db3 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index cf9a802545b9..1b5b0abaf144 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 82c05f574d24..861d8f52b4a8 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 35b66439b458..863b6906de02 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From bc3da1008d8ec232bbddccb6cf1906f4f68ce5b5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 16:45:14 -0800 Subject: [PATCH 16/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/85c3d3ec06cc Author: Fabien Cazenave Desc: Merge pull request #16247 from fabi1cazenave/smsUpdateThread-bug968815 Bug 968815 - [SMS] update thread when last message is deleted, r=julienw ======== https://hg.mozilla.org/integration/gaia-central/rev/31024440c700 Author: Fabien Cazenave Desc: Bug 968815 - [SMS] update thread when last message is deleted, r=julienw --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e9c25cb3ae84..82c6fcdcf05f 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "79e2c9d07063c41784da4f351f522d6ff72c1110", + "revision": "85c3d3ec06cc68c2338c8fd0055014208ee9eb3b", "repo_path": "/integration/gaia-central" } From df7fe8e59154719a1cde74f6dd1cfe683be7d052 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 16:51:01 -0800 Subject: [PATCH 17/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index b9b1fa7a2832..19f85a1ef1dd 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 6944bb04f042..ac015d6834c7 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index b9b1fa7a2832..19f85a1ef1dd 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index d76c8440e070..8d16f6e4420c 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 418fc83bb623..acc9eceabaec 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 2be082216db3..6a4a33353b3d 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 1b5b0abaf144..bedac47258aa 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 861d8f52b4a8..85876fa0d746 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 863b6906de02..1d79483fbf12 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From c6ca92d26b63eab7274a0a99cb79aa38a4014e81 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 18:55:11 -0800 Subject: [PATCH 18/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/f96fce93bc62 Author: John Hu Desc: Merge pull request #15512 from huchengtw-moz/gallery/Bug_960215-gallery-open-activity-rotation Bug 960215 - [B2G][Messages] Image-attachment does not fill the screen i..., r=djf ======== https://hg.mozilla.org/integration/gaia-central/rev/4e53e832be20 Author: John Hu Desc: Bug 960215 - [B2G][Messages] Image-attachment does not fill the screen in landscape orientation --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 82c6fcdcf05f..b59b3e0bc8e7 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "85c3d3ec06cc68c2338c8fd0055014208ee9eb3b", + "revision": "f96fce93bc6237b5aa4d6435d7bda34c13f8c4fe", "repo_path": "/integration/gaia-central" } From 8ad56794159ba4944d5e7672e81420059a51c518 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 19:01:00 -0800 Subject: [PATCH 19/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 19f85a1ef1dd..99885a3e1d2f 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index ac015d6834c7..e6e289cc89c0 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 19f85a1ef1dd..99885a3e1d2f 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 8d16f6e4420c..fee722cf0500 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index acc9eceabaec..1a7a4f07af9a 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 6a4a33353b3d..ac4ec981f4e5 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index bedac47258aa..431c709eba3d 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 85876fa0d746..eb8f39b66f2f 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 1d79483fbf12..ca8aa8ca6641 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From 98c18a5d5faa02f45ef1d3186c73e12f1f732acf Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 19:05:10 -0800 Subject: [PATCH 20/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/a3a55ab202e6 Author: steveck-chung Desc: Merge pull request #16030 from steveck-chung/message-read-report Bug 926852 - [Messages] Read receipts feature Gaia implementation. r=julienw , crh0716 ======== https://hg.mozilla.org/integration/gaia-central/rev/0f04f27a2398 Author: Steve Chung Desc: Bug 926852 - [Messages] Read receipts feature Gaia implementation --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b59b3e0bc8e7..27ad8708e9a0 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "f96fce93bc6237b5aa4d6435d7bda34c13f8c4fe", + "revision": "a3a55ab202e6152ece419e9db7028b9d17c213b7", "repo_path": "/integration/gaia-central" } From 8243daef4fc8c031feca575cf081b46e20f3a978 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 19:10:59 -0800 Subject: [PATCH 21/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 99885a3e1d2f..f64c6bc36bc1 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index e6e289cc89c0..eed4833711b3 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 99885a3e1d2f..f64c6bc36bc1 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index fee722cf0500..9b24d603a373 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 1a7a4f07af9a..ce10702d9a2b 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index ac4ec981f4e5..3fcf85e08642 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 431c709eba3d..677eec13f84f 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index eb8f39b66f2f..7ff96b7aa193 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index ca8aa8ca6641..41ac5c80e070 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From a0b973e4aabecdb6056cc90c124f6e91b8ebfc46 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 19:20:10 -0800 Subject: [PATCH 22/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/da2401e07938 Author: EragonJ Desc: Merge pull request #16358 from EragonJ/bug-971565 Bug 971565 - [System2] Instantiable Title ======== https://hg.mozilla.org/integration/gaia-central/rev/59670ffd3a41 Author: EragonJ Desc: Bug 971565 - [System2] Instantiable Title - update test - update bootstrap.js - add necessary mock for bootstrap_test.js --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 27ad8708e9a0..70783477a4b3 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "a3a55ab202e6152ece419e9db7028b9d17c213b7", + "revision": "da2401e07938b5f0d891ee477a752e37ccf9b9fa", "repo_path": "/integration/gaia-central" } From c38328a222618b2c702eb34ceaa77d7ba6feacf2 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 17 Feb 2014 19:25:57 -0800 Subject: [PATCH 23/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index f64c6bc36bc1..585d6173e1cd 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index eed4833711b3..c06bc2438644 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index f64c6bc36bc1..585d6173e1cd 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 9b24d603a373..ee22c142b664 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index ce10702d9a2b..73ee8601d542 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 3fcf85e08642..6019e257bf3f 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 677eec13f84f..5d6007934a93 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 7ff96b7aa193..6811c7c91816 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 41ac5c80e070..05db988dbc30 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From b4bcb7ce99c90cabc0dbe22821c740269a40af7e Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Tue, 18 Feb 2014 17:40:58 +1300 Subject: [PATCH 24/56] debug logging for bug 966322 --HG-- extra : transplant_source : %F1%F9%BF%04%A3%10W%E1%22%E21%05%92%B9%5B%FCd%13%D4%BA --- .../webaudio/test/test_oscillatorNodeStart.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/media/webaudio/test/test_oscillatorNodeStart.html b/content/media/webaudio/test/test_oscillatorNodeStart.html index 7acd6b41309b..d368a3f8b345 100644 --- a/content/media/webaudio/test/test_oscillatorNodeStart.html +++ b/content/media/webaudio/test/test_oscillatorNodeStart.html @@ -31,8 +31,23 @@ addLoadEvent(function() { ok(isSilent, "OscillatorNode should be silent before calling start."); SimpleTest.finish(); } + + // Debug Logging for bug 966322 + + ok(true, "Load event ran"); + + var bs = context.createBufferSource(); + bs.buffer = context.createBuffer(1, 1, context.sampleRate); + bs.start(); + bs.onended = function() { + ok(true, "Graph is running"); + } + }); +// Debug Logging for bug 966322 +ok(true, "script ran"); + From 4161cb1bfbb3ad9231bc1488305ccc7bf274c928 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Mon, 17 Feb 2014 21:32:42 -0800 Subject: [PATCH 25/56] Bug 434102 followup: Mark reftest as failing on Mac. --- layout/reftests/xul/reftest.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/reftests/xul/reftest.list b/layout/reftests/xul/reftest.list index 3f6076ea80b0..393656726517 100644 --- a/layout/reftests/xul/reftest.list +++ b/layout/reftests/xul/reftest.list @@ -5,5 +5,5 @@ random-if(Android||B2G) fails-if(winWidget) == menulist-shrinkwrap-2.xul menulis == textbox-overflow-1.xul textbox-overflow-1-ref.xul # for bug 749658 # accesskeys are not normally displayed on Mac, so skip this test skip-if(cocoaWidget) == accesskey.xul accesskey-ref.xul -== tree-row-outline-1.xul tree-row-outline-1-ref.xul +fails-if(cocoaWidget) == tree-row-outline-1.xul tree-row-outline-1-ref.xul != tree-row-outline-1.xul tree-row-outline-1-notref.xul From 0c3a548d62353d6b3f8f1ff3a613915c1dc74b8c Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Mon, 17 Feb 2014 21:48:40 -0800 Subject: [PATCH 26/56] Update test failure annotation for bug 791480, now that we're running tests on Windows NT 6.2 as well. --- layout/reftests/printing/reftest.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/reftests/printing/reftest.list b/layout/reftests/printing/reftest.list index b8f1fbbfc9b1..e4fa1dd86946 100644 --- a/layout/reftests/printing/reftest.list +++ b/layout/reftests/printing/reftest.list @@ -24,7 +24,7 @@ == 115199-2a.html 115199-2-ref.html == 115199-2b.html 115199-2-ref.html == 652178-1.html 652178-1-ref2.html -fuzzy-if(cocoaWidget,1,5000) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),255,100) == 745025-1.html 745025-1-ref.html +fuzzy-if(cocoaWidget,1,5000) fuzzy-if(/^Windows\x20NT\x206\.[12]/.test(http.oscpu),255,100) == 745025-1.html 745025-1-ref.html # Mac page shadow drawing; Windows bug 791480 == 820496-1.html 820496-1-ref.html # NOTE: These tests don't yet rigorously test what they're From 53ce3876264f8b525f2c57f80bce717b3949d8ff Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:02:32 -0500 Subject: [PATCH 27/56] Bug 973389 - Move the LOCAL_INCLUDES in mozglue to moz.build; r=glandium --- mozglue/android/Makefile.in | 25 ------------------------- mozglue/android/moz.build | 25 +++++++++++++++++++++++++ mozglue/tests/Makefile.in | 1 - mozglue/tests/moz.build | 1 + 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/mozglue/android/Makefile.in b/mozglue/android/Makefile.in index 9dfb5497523a..faa3246e8bcb 100644 --- a/mozglue/android/Makefile.in +++ b/mozglue/android/Makefile.in @@ -4,31 +4,6 @@ STL_FLAGS= -LOCAL_INCLUDES += -I$(DEPTH)/build -LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build - -LOCAL_INCLUDES += -I$(srcdir)/../linker -LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/startup -LOCAL_INCLUDES += -I$(topsrcdir)/db/sqlite3/src -LOCAL_INCLUDES += -I$(topsrcdir)/base/src -LOCAL_INCLUDES += -I$(topsrcdir)/nsprpub/lib/ds -LOCAL_INCLUDES += -I$(topsrcdir)/nsprpub/lib/libc/include -LOCAL_INCLUDES += -I$(topsrcdir)/nsprpub/pr/include -LOCAL_INCLUDES += -I$(topsrcdir)/ipc/chromium/src -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/nss -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/util -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/softoken -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/pk11wrap -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/pkcs7 -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/certdb -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/cryptohi -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/dev -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/base -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/pki -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/smime -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/freebl/ -LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/ssl - include $(topsrcdir)/config/rules.mk prcpucfg.h: $(topsrcdir)/nsprpub/pr/include/md/_linux.cfg diff --git a/mozglue/android/moz.build b/mozglue/android/moz.build index 0eef0b4366d0..3d8389220a9e 100644 --- a/mozglue/android/moz.build +++ b/mozglue/android/moz.build @@ -23,3 +23,28 @@ DEFINES['ANDROID_PACKAGE_NAME'] = '"%s"' % CONFIG['ANDROID_PACKAGE_NAME'] if CONFIG['MOZ_FOLD_LIBS']: DEFINES['MOZ_FOLD_LIBS'] = True + +GENERATED_INCLUDES += ['/build'] +LOCAL_INCLUDES += [ + '../linker', + '/db/sqlite3/src', + '/ipc/chromium/src', + '/nsprpub/lib/ds', + '/nsprpub/lib/libc/include', + '/nsprpub/pr/include', + '/security/nss/lib/base', + '/security/nss/lib/certdb', + '/security/nss/lib/cryptohi', + '/security/nss/lib/dev', + '/security/nss/lib/freebl', + '/security/nss/lib/nss', + '/security/nss/lib/pk11wrap', + '/security/nss/lib/pkcs7', + '/security/nss/lib/pki', + '/security/nss/lib/smime', + '/security/nss/lib/softoken', + '/security/nss/lib/ssl', + '/security/nss/lib/util', + '/toolkit/components/startup', + '/xpcom/build', +] diff --git a/mozglue/tests/Makefile.in b/mozglue/tests/Makefile.in index 981315e2ec77..6ec472d08e83 100644 --- a/mozglue/tests/Makefile.in +++ b/mozglue/tests/Makefile.in @@ -5,7 +5,6 @@ ifdef MOZ_LINKER STL_FLAGS = -LOCAL_INCLUDES += -I$(srcdir)/../linker # Only link against the linker, not mozglue MOZ_GLUE_PROGRAM_LDFLAGS = MOZ_GLUE_LDFLAGS = diff --git a/mozglue/tests/moz.build b/mozglue/tests/moz.build index 5a7420671cb0..e15e447e617e 100644 --- a/mozglue/tests/moz.build +++ b/mozglue/tests/moz.build @@ -14,3 +14,4 @@ if CONFIG['MOZ_LINKER']: SIMPLE_PROGRAMS += [ 'TestZip', ] + LOCAL_INCLUDES += ['../linker'] From 0d63e8caea5670d423dbab905a7bfd6b8ef6ebfd Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:03:08 -0500 Subject: [PATCH 28/56] Bug 973391 - Move the LOCAL_INCLUDES in webapprt to moz.build; r=glandium --- webapprt/gtk2/Makefile.in | 7 ------- webapprt/gtk2/moz.build | 7 +++++++ webapprt/mac/Makefile.in | 5 ----- webapprt/mac/moz.build | 7 +++++++ webapprt/win/Makefile.in | 5 ----- webapprt/win/moz.build | 7 +++++++ 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/webapprt/gtk2/Makefile.in b/webapprt/gtk2/Makefile.in index bfc4fbc74998..4b0f9e035af3 100644 --- a/webapprt/gtk2/Makefile.in +++ b/webapprt/gtk2/Makefile.in @@ -2,13 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. -LOCAL_INCLUDES += \ - -I$(topsrcdir)/toolkit/xre \ - -I$(topsrcdir)/xpcom/base \ - -I$(topsrcdir)/xpcom/build \ - -I$(DEPTH)/build \ - $(NULL) - STL_FLAGS= LIBS = \ diff --git a/webapprt/gtk2/moz.build b/webapprt/gtk2/moz.build index f4a499810b10..56a033386b0b 100644 --- a/webapprt/gtk2/moz.build +++ b/webapprt/gtk2/moz.build @@ -13,3 +13,10 @@ SOURCES += [ FAIL_ON_WARNINGS = True DEFINES['XPCOM_GLUE'] = True + +GENERATED_INCLUDES += ['/build'] +LOCAL_INCLUDES += [ + '/toolkit/xre', + '/xpcom/base', + '/xpcom/build', +] diff --git a/webapprt/mac/Makefile.in b/webapprt/mac/Makefile.in index 34f9e31144ef..dfcf4bebd95d 100644 --- a/webapprt/mac/Makefile.in +++ b/webapprt/mac/Makefile.in @@ -11,11 +11,6 @@ NSDISTMODE = copy MOZ_GLUE_LDFLAGS = MOZ_GLUE_PROGRAM_LDFLAGS = -LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre -LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base -LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build -LOCAL_INCLUDES += -I$(DEPTH)/build - STL_FLAGS= LIBS = \ diff --git a/webapprt/mac/moz.build b/webapprt/mac/moz.build index d49a48d2b04b..6e3e0d705888 100644 --- a/webapprt/mac/moz.build +++ b/webapprt/mac/moz.build @@ -11,3 +11,10 @@ SOURCES += [ ] DEFINES['XPCOM_GLUE'] = True + +GENERATED_INCLUDES += ['/build'] +LOCAL_INCLUDES += [ + '/toolkit/xre', + '/xpcom/base', + '/xpcom/build', +] diff --git a/webapprt/win/Makefile.in b/webapprt/win/Makefile.in index 241f0ba00976..de023f395f17 100644 --- a/webapprt/win/Makefile.in +++ b/webapprt/win/Makefile.in @@ -6,11 +6,6 @@ # to dynamically link into our executable, as we copy it to arbitrary locations. MOZ_GLUE_LDFLAGS = -LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre -LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base -LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build -LOCAL_INCLUDES += -I$(DEPTH)/build - STL_FLAGS= LIBS = \ diff --git a/webapprt/win/moz.build b/webapprt/win/moz.build index 2c290c38d536..f8654f993ad4 100644 --- a/webapprt/win/moz.build +++ b/webapprt/win/moz.build @@ -14,3 +14,10 @@ DEFINES['XPCOM_GLUE'] = True # Statically link against the CRT USE_STATIC_LIBS = True + +GENERATED_INCLUDES += ['/build'] +LOCAL_INCLUDES += [ + '/toolkit/xre', + '/xpcom/base', + '/xpcom/build', +] From 5d0fd51b6282510b8532d76b00affdb872cd1867 Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Tue, 18 Feb 2014 14:04:48 +0800 Subject: [PATCH 29/56] Bug 970804 - 1/3: refine Marionette oop test case selection. r=mdas 1) ./mach marionette-webapi / - selects all test cases under and execute them only in in-process mode. 2) ./mach marionette-webapi --type=+oop / - selects all test cases under and execute them only in oop mode. 3) ./mach marionette-webapi --type=-oop / - selects all test cases under and execute them only in in-process mode. 4) ./mach marionette-webapi - execute only in in-process mode. 5) ./mach marionette-webapi --type=+oop - execute only in oop mode. 6) ./mach marionette-webapi --type=-oop - execute only in in-process mode. 7) ./mach marionette-webapi /manifest.ini - selects all active test cases listed in /manifest.ini and execute them in the mode(s) according to the manifest. 8) ./mach marionette-webapi --type=+oop /manifest.ini - selects all active, oop={true,both} test cases listed in /manifest.ini and execute them only in oop mode. 9) ./mach marionette-webapi --type=-oop /manifest.ini - selects all active, oop={false,both} test cases listed in /manifest.ini and execute them only in in-process mode. --- .../client/marionette/runner/base.py | 148 ++++++++++++------ 1 file changed, 102 insertions(+), 46 deletions(-) diff --git a/testing/marionette/client/marionette/runner/base.py b/testing/marionette/client/marionette/runner/base.py index 501d70fd4024..892f893ad374 100644 --- a/testing/marionette/client/marionette/runner/base.py +++ b/testing/marionette/client/marionette/runner/base.py @@ -569,6 +569,7 @@ class BaseMarionetteTestRunner(object): self.sdcard = sdcard self.mixin_run_tests = [] self.manifest_skipped_tests = [] + self.tests = [] if testvars: if not os.path.exists(testvars): @@ -750,15 +751,31 @@ class BaseMarionetteTestRunner(object): def run_tests(self, tests): self.reset_test_stats() starttime = datetime.utcnow() + + if not self.httpd: + print "starting httpd" + self.start_httpd() + + if not self.marionette: + self.start_marionette() + if self.emulator: + self.marionette.emulator.wait_for_homescreen(self.marionette) + # Retrieve capabilities for later use + if not self._capabilities: + self.capabilities + + if self.capabilities['device'] != 'desktop': + self.textrunnerclass = B2GMarionetteTextTestRunner + + for test in tests: + self.add_test(test) + counter = self.repeat while counter >=0: round = self.repeat - counter if round > 0: self.logger.info('\nREPEAT %d\n-------' % round) - if self.shuffle: - random.shuffle(tests) - for test in tests: - self.run_test(test) + self.run_test_sets() counter -= 1 self.logger.info('\nSUMMARY\n-------') self.logger.info('passed: %d' % self.passed) @@ -795,21 +812,17 @@ class BaseMarionetteTestRunner(object): for run_tests in self.mixin_run_tests: run_tests(tests) - def run_test(self, test, expected='pass'): - if not self.httpd: - print "starting httpd" - self.start_httpd() + def add_test(self, test, expected='pass', oop=None): + filepath = os.path.abspath(test) - if not self.marionette: - self.start_marionette() - if self.emulator: - self.marionette.emulator.wait_for_homescreen(self.marionette) - # Retrieve capabilities for later use - if not self._capabilities: - self.capabilities - - if self.capabilities['device'] != 'desktop': - self.textrunnerclass = B2GMarionetteTextTestRunner + if os.path.isdir(filepath): + for root, dirs, files in os.walk(filepath): + for filename in files: + if ((filename.startswith('test_') or filename.startswith('browser_')) and + (filename.endswith('.py') or filename.endswith('.js'))): + filepath = os.path.join(root, filename) + self.add_test(filepath) + return testargs = {} if self.type is not None: @@ -821,29 +834,11 @@ class BaseMarionetteTestRunner(object): testargs.update({ atype[1:]: 'false' }) else: testargs.update({ atype: 'true' }) - oop = testargs.get('oop', False) - if isinstance(oop, basestring): - oop = False if oop == 'false' else 'true' - filepath = os.path.abspath(test) + # testarg_oop = either None, 'true' or 'false'. + testarg_oop = testargs.get('oop') - if os.path.isdir(filepath): - for root, dirs, files in os.walk(filepath): - if self.shuffle: - random.shuffle(files) - for filename in files: - if ((filename.startswith('test_') or filename.startswith('browser_')) and - (filename.endswith('.py') or filename.endswith('.js'))): - filepath = os.path.join(root, filename) - self.run_test(filepath) - if self.marionette.check_for_crash(): - return - return - - mod_name,file_ext = os.path.splitext(os.path.split(filepath)[-1]) - - testloader = unittest.TestLoader() - suite = unittest.TestSuite() + file_ext = os.path.splitext(os.path.split(filepath)[-1])[1] if file_ext == '.ini': manifest = TestManifest() @@ -861,6 +856,11 @@ class BaseMarionetteTestRunner(object): else: unfiltered_tests.append(test) + # Don't filter tests with "oop" flag because manifest parser can't + # handle it well. + if testarg_oop is not None: + del testargs['oop'] + target_tests = manifest.get(tests=unfiltered_tests, **testargs) for test in unfiltered_tests: if test['path'] not in [x['path'] for x in target_tests]: @@ -873,22 +873,62 @@ class BaseMarionetteTestRunner(object): test['disabled'])) self.todo += 1 - if self.shuffle: - random.shuffle(target_tests) for i in target_tests: if not os.path.exists(i["path"]): raise IOError("test file: %s does not exist" % i["path"]) - self.run_test(i["path"], i["expected"]) - if self.marionette.check_for_crash(): - return + + # manifest_oop is either 'false', 'true' or 'both'. Anything + # else implies 'false'. + manifest_oop = i.get('oop', 'false') + + # We only add an oop test when following conditions are met: + # 1) It's written by javascript because we have only + # MarionetteJSTestCase that supports oop mode. + # 2) we're running with "--type=+oop" or no "--type=-oop", which + # follows testarg_oop is either None or 'true' and must not + # be 'false'. + # 3) When no "--type=[+-]oop" is applied, all active tests are + # included in target_tests, so we must filter out those + # really capable of running in oop mode. Besides, oop tests + # must be explicitly specified for backward compatibility. So + # test manifest_oop equals to either 'both' or 'true'. + file_ext = os.path.splitext(os.path.split(i['path'])[-1])[-1] + if (file_ext == '.js' and + testarg_oop != 'false' and + (manifest_oop == 'both' or manifest_oop == 'true')): + self.add_test(i["path"], i["expected"], True) + + # We only add an in-process test when following conditions are + # met: + # 1) we're running with "--type=-oop" or no "--type=+oop", which + # follows testarg_oop is either None or 'false' and must not + # be 'true'. + # 2) When no "--type=[+-]oop" is applied, all active tests are + # included in target_tests, so we must filter out those + # really capable of running in in-process mode. + if (testarg_oop != 'true' and + (manifest_oop == 'both' or manifest_oop != 'true')): + self.add_test(i["path"], i["expected"], False) return - self.logger.info('TEST-START %s' % os.path.basename(test)) + if oop is None: + # This test is added by directory enumeration or directly specified + # in argument list. We have no manifest information here so we just + # respect the "--type=[+-]oop" argument here. + oop = file_ext == '.js' and testarg_oop == 'true' + self.tests.append({'filepath': filepath, 'expected': expected, 'oop': oop}) + + def run_test(self, filepath, expected, oop): + self.logger.info('TEST-START %s' % os.path.basename(filepath)) + + testloader = unittest.TestLoader() + suite = unittest.TestSuite() self.test_kwargs['expected'] = expected self.test_kwargs['oop'] = oop + mod_name = os.path.splitext(os.path.split(filepath)[-1])[0] for handler in self.test_handlers: - if handler.match(os.path.basename(test)): + if handler.match(os.path.basename(filepath)): handler.add_tests_to_suite(mod_name, filepath, suite, @@ -918,6 +958,22 @@ class BaseMarionetteTestRunner(object): if hasattr(results, 'expectedFailures'): self.passed += len(results.expectedFailures) + def run_test_set(self, tests): + if self.shuffle: + random.shuffle(tests) + + for test in tests: + self.run_test(test['filepath'], test['expected'], test['oop']) + if self.marionette.check_for_crash(): + break + + def run_test_sets(self): + oop_tests = [x for x in self.tests if x.get('oop')] + self.run_test_set(oop_tests) + + in_process_tests = [x for x in self.tests if not x.get('oop')] + self.run_test_set(in_process_tests) + def cleanup(self): if self.httpd: self.httpd.stop() From 7d0a85006a1b55b49dc7ab17761b9850eac23544 Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Tue, 18 Feb 2014 14:04:49 +0800 Subject: [PATCH 30/56] Bug 970804 - 2/3: only launch test-container app when not available. r=mdas --- .../client/marionette/marionette_test.py | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/testing/marionette/client/marionette/marionette_test.py b/testing/marionette/client/marionette/marionette_test.py index 3f1459fa6abf..03039a9fc8b6 100644 --- a/testing/marionette/client/marionette/marionette_test.py +++ b/testing/marionette/client/marionette/marionette_test.py @@ -419,7 +419,14 @@ class MarionetteJSTestCase(CommonTestCase): if self.oop: print 'running oop' - result = self.marionette.execute_async_script(""" + frame = None + try: + frame = self.marionette.find_element( + 'css selector', + 'iframe[src*="app://test-container.gaiamobile.org/index.html"]' + ) + except NoSuchElementException: + result = self.marionette.execute_async_script(""" let setReq = navigator.mozSettings.createLock().set({'lockscreen.enabled': false}); setReq.onsuccess = function() { let appsReq = navigator.mozApps.mgmt.getAll(); @@ -445,14 +452,14 @@ setReq.onsuccess = function() { setReq.onerror = function() { marionetteScriptFinished(false); }""", script_timeout=60000) - self.assertTrue(result) + self.assertTrue(result) - self.marionette.switch_to_frame( - self.marionette.find_element( + frame = self.marionette.find_element( 'css selector', 'iframe[src*="app://test-container.gaiamobile.org/index.html"]' - )) + ) + self.marionette.switch_to_frame(frame) main_process = self.marionette.execute_script(""" return SpecialPowers.isMainProcess(); """) @@ -509,5 +516,8 @@ setReq.onerror = function() { self.loglines = self.marionette.get_logs() raise + if self.oop: + self.marionette.switch_to_frame() + self.marionette.execute_script("log('TEST-END: %s');" % self.jsFile.replace('\\', '\\\\')) self.marionette.test_name = None From 56a8a1c0bcb22c8188cf685e2cabc46a43093637 Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Tue, 18 Feb 2014 14:04:50 +0800 Subject: [PATCH 31/56] Bug 970804 - 3/3: add test cases. r=mdas --- .../tests/unit/oop/manifest-oop-both.ini | 16 ++++++++++++++++ .../tests/unit/oop/manifest-oop-false.ini | 16 ++++++++++++++++ .../tests/unit/oop/manifest-oop-true.ini | 16 ++++++++++++++++ .../tests/unit/oop/manifest-oop-unspecified.ini | 14 ++++++++++++++ .../marionette/tests/unit/oop/manifest.ini | 10 ++++++++++ .../tests/unit/oop/test_success_both.js | 3 +++ .../tests/unit/oop/test_success_both2.js | 3 +++ .../tests/unit/oop/test_success_in_non_oop.js | 3 +++ .../tests/unit/oop/test_success_in_non_oop2.js | 3 +++ .../tests/unit/oop/test_success_in_oop.js | 3 +++ .../tests/unit/oop/test_success_in_oop2.js | 3 +++ .../client/marionette/tests/unit/unit-tests.ini | 2 ++ 12 files changed, 92 insertions(+) create mode 100644 testing/marionette/client/marionette/tests/unit/oop/manifest-oop-both.ini create mode 100644 testing/marionette/client/marionette/tests/unit/oop/manifest-oop-false.ini create mode 100644 testing/marionette/client/marionette/tests/unit/oop/manifest-oop-true.ini create mode 100644 testing/marionette/client/marionette/tests/unit/oop/manifest-oop-unspecified.ini create mode 100644 testing/marionette/client/marionette/tests/unit/oop/manifest.ini create mode 100644 testing/marionette/client/marionette/tests/unit/oop/test_success_both.js create mode 100644 testing/marionette/client/marionette/tests/unit/oop/test_success_both2.js create mode 100644 testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop.js create mode 100644 testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop2.js create mode 100644 testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop.js create mode 100644 testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop2.js diff --git a/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-both.ini b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-both.ini new file mode 100644 index 000000000000..a91348360e3a --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-both.ini @@ -0,0 +1,16 @@ +[DEFAULT] +qemu = false +browser = false +b2g = true +skip = false + +oop = both + +[test_success_both2.js] +; oop unspecified +[test_success_in_non_oop.js] +oop = false +[test_success_in_oop.js] +oop = true +[test_success_both.js] +oop = both diff --git a/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-false.ini b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-false.ini new file mode 100644 index 000000000000..1e9a1c0f0147 --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-false.ini @@ -0,0 +1,16 @@ +[DEFAULT] +qemu = false +browser = false +b2g = true +skip = false + +oop = false + +[test_success_in_non_oop2.js] +; oop unspecified +[test_success_in_non_oop.js] +oop = false +[test_success_in_oop.js] +oop = true +[test_success_both.js] +oop = both diff --git a/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-true.ini b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-true.ini new file mode 100644 index 000000000000..498289cb0df2 --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-true.ini @@ -0,0 +1,16 @@ +[DEFAULT] +qemu = false +browser = false +b2g = true +skip = false + +oop = true + +[test_success_in_oop2.js] +; oop unspecified +[test_success_in_non_oop.js] +oop = false +[test_success_in_oop.js] +oop = true +[test_success_both.js] +oop = both diff --git a/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-unspecified.ini b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-unspecified.ini new file mode 100644 index 000000000000..642c9c7d3669 --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/manifest-oop-unspecified.ini @@ -0,0 +1,14 @@ +[DEFAULT] +qemu = false +browser = false +b2g = true +skip = false + +[test_success_in_non_oop2.js] +; oop unspecified +[test_success_in_non_oop.js] +oop = false +[test_success_in_oop.js] +oop = true +[test_success_both.js] +oop = both diff --git a/testing/marionette/client/marionette/tests/unit/oop/manifest.ini b/testing/marionette/client/marionette/tests/unit/oop/manifest.ini new file mode 100644 index 000000000000..4bc5b6d6bf2c --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/manifest.ini @@ -0,0 +1,10 @@ +[DEFAULT] +qemu = false +browser = false +b2g = true +skip = false + +[include:manifest-oop-unspecified.ini] +[include:manifest-oop-both.ini] +[include:manifest-oop-true.ini] +[include:manifest-oop-false.ini] diff --git a/testing/marionette/client/marionette/tests/unit/oop/test_success_both.js b/testing/marionette/client/marionette/tests/unit/oop/test_success_both.js new file mode 100644 index 000000000000..697cc70fefcf --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/test_success_both.js @@ -0,0 +1,3 @@ +MARIONETTE_TIMEOUT = 60000; +ok(true, "Always success"); +finish(); diff --git a/testing/marionette/client/marionette/tests/unit/oop/test_success_both2.js b/testing/marionette/client/marionette/tests/unit/oop/test_success_both2.js new file mode 100644 index 000000000000..697cc70fefcf --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/test_success_both2.js @@ -0,0 +1,3 @@ +MARIONETTE_TIMEOUT = 60000; +ok(true, "Always success"); +finish(); diff --git a/testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop.js b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop.js new file mode 100644 index 000000000000..9131cc077359 --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop.js @@ -0,0 +1,3 @@ +MARIONETTE_TIMEOUT = 60000; +ok(SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()"); +finish(); diff --git a/testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop2.js b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop2.js new file mode 100644 index 000000000000..9131cc077359 --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_non_oop2.js @@ -0,0 +1,3 @@ +MARIONETTE_TIMEOUT = 60000; +ok(SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()"); +finish(); diff --git a/testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop.js b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop.js new file mode 100644 index 000000000000..e14306a9b3c4 --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop.js @@ -0,0 +1,3 @@ +MARIONETTE_TIMEOUT = 60000; +ok(!SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()"); +finish(); diff --git a/testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop2.js b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop2.js new file mode 100644 index 000000000000..e14306a9b3c4 --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/oop/test_success_in_oop2.js @@ -0,0 +1,3 @@ +MARIONETTE_TIMEOUT = 60000; +ok(!SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()"); +finish(); diff --git a/testing/marionette/client/marionette/tests/unit/unit-tests.ini b/testing/marionette/client/marionette/tests/unit/unit-tests.ini index 9f43328a6108..cc360bae3a8f 100644 --- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini +++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini @@ -104,3 +104,5 @@ disabled = "Bug 925688" [test_screen_orientation.py] browser = false [test_errors.py] + +[include:oop/manifest.ini] From 996229d3d09ecee2f6d467caa2d00de27a8cc09d Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:05:51 -0500 Subject: [PATCH 32/56] Bug 973403 - Move the LOCAL_INCLUDES in memory to moz.build; r=glandium --- memory/build/Makefile.in | 12 ------------ memory/build/moz.build | 7 +++++++ memory/jemalloc/Makefile.in | 9 --------- memory/jemalloc/moz.build | 4 ++++ memory/mozalloc/Makefile.in | 2 -- memory/mozalloc/moz.build | 2 ++ memory/replace/jemalloc/Makefile.in | 4 ---- memory/replace/jemalloc/moz.build | 4 ++++ 8 files changed, 17 insertions(+), 27 deletions(-) diff --git a/memory/build/Makefile.in b/memory/build/Makefile.in index 0b19766f6cda..79913922605a 100644 --- a/memory/build/Makefile.in +++ b/memory/build/Makefile.in @@ -9,21 +9,9 @@ DIST_INSTALL = 1 endif ifdef MOZ_JEMALLOC3 -LOCAL_INCLUDES += -I../jemalloc/src/include -ifdef _MSC_VER -LOCAL_INCLUDES += -I$(topsrcdir)/memory/jemalloc/src/include/msvc_compat -endif - ifndef MOZ_NATIVE_JEMALLOC SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc) endif else SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/mozjemalloc) endif - -ifdef MOZ_REPLACE_MALLOC -# The zone allocator for OSX needs some jemalloc internal functions -ifeq (Darwin,$(OS_TARGET)) -LOCAL_INCLUDES += -I$(topsrcdir)/memory/jemalloc/src/include -endif -endif diff --git a/memory/build/moz.build b/memory/build/moz.build index 52ef39a6b647..5570830738ab 100644 --- a/memory/build/moz.build +++ b/memory/build/moz.build @@ -27,6 +27,9 @@ if CONFIG['MOZ_JEMALLOC3']: SOURCES += [ 'mozjemalloc_compat.c', ] + GENERATED_INCLUDES += ['../jemalloc/src/include'] + if CONFIG['_MSC_VER']: + LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat'] if CONFIG['MOZ_REPLACE_MALLOC']: SOURCES += [ @@ -39,3 +42,7 @@ LIBRARY_NAME = 'memory' if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or CONFIG['MOZ_NATIVE_JEMALLOC']): FINAL_LIBRARY = 'mozglue' + +if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin': + # The zone allocator for OSX needs some jemalloc internal functions + LOCAL_INCLUDES += ['/memory/jemalloc/src/include'] diff --git a/memory/jemalloc/Makefile.in b/memory/jemalloc/Makefile.in index c8dd6bbbad68..ff798491295d 100644 --- a/memory/jemalloc/Makefile.in +++ b/memory/jemalloc/Makefile.in @@ -9,15 +9,6 @@ endif include $(topsrcdir)/config/rules.mk -LOCAL_INCLUDES += \ - -I$(srcdir)/src/include \ - -Isrc/include \ - $(NULL) - -ifdef _MSC_VER -LOCAL_INCLUDES += -I$(srcdir)/src/include/msvc_compat -endif - ifdef GNU_CC CFLAGS += -std=gnu99 endif diff --git a/memory/jemalloc/moz.build b/memory/jemalloc/moz.build index 4d16789b88bb..f116ceffae52 100644 --- a/memory/jemalloc/moz.build +++ b/memory/jemalloc/moz.build @@ -42,9 +42,13 @@ FORCE_STATIC_LIB = True if CONFIG['_MSC_VER']: DEFINES['DLLEXPORT'] = True + LOCAL_INCLUDES += ['src/include/msvc_compat'] if CONFIG['OS_TARGET'] == 'Linux': # For mremap DEFINES['_GNU_SOURCE'] = True DEFINES['abort'] = 'moz_abort' + +GENERATED_INCLUDES += ['src/include'] +LOCAL_INCLUDES += ['src/include'] diff --git a/memory/mozalloc/Makefile.in b/memory/mozalloc/Makefile.in index 9cf297a55b2e..4aee791c7edb 100644 --- a/memory/mozalloc/Makefile.in +++ b/memory/mozalloc/Makefile.in @@ -15,5 +15,3 @@ SDK_LIBRARY = $(IMPORT_LIBRARY) else SDK_LIBRARY = $(SHARED_LIBRARY) endif - -LOCAL_INCLUDES += -I$(DEPTH)/xpcom diff --git a/memory/mozalloc/moz.build b/memory/mozalloc/moz.build index 76acc941710c..7a4a9ae56161 100644 --- a/memory/mozalloc/moz.build +++ b/memory/mozalloc/moz.build @@ -67,3 +67,5 @@ else: DEFINES['_GNU_SOURCE'] = True TEST_TOOL_DIRS += ['tests'] + +GENERATED_INCLUDES += ['/xpcom'] diff --git a/memory/replace/jemalloc/Makefile.in b/memory/replace/jemalloc/Makefile.in index 40103090a7ed..e2f36b9fce88 100644 --- a/memory/replace/jemalloc/Makefile.in +++ b/memory/replace/jemalloc/Makefile.in @@ -3,10 +3,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc) -LOCAL_INCLUDES += -I../../jemalloc/src/include -ifdef _MSC_VER -LOCAL_INCLUDES += -I$(topsrcdir)/memory/jemalloc/src/include/msvc_compat -endif MOZ_GLUE_LDFLAGS = # Don't link against mozglue WRAP_LDFLAGS = # Never wrap malloc function calls with -Wl,--wrap diff --git a/memory/replace/jemalloc/moz.build b/memory/replace/jemalloc/moz.build index f03a587b392a..22f5a7aefa23 100644 --- a/memory/replace/jemalloc/moz.build +++ b/memory/replace/jemalloc/moz.build @@ -24,3 +24,7 @@ FORCE_SHARED_LIB = True DEFINES['MOZ_JEMALLOC3'] = True DEFINES['MOZ_REPLACE_JEMALLOC'] = True + +GENERATED_INCLUDES += ['../../jemalloc/src/include'] +if CONFIG['_MSC_VER']: + LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat'] From 929a4cfcacab33bb99b688fe3a4b9d406ae5bd37 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:09:30 -0500 Subject: [PATCH 33/56] Bug 973402 - Move the LOCAL_INCLUDES in js/src to moz.build; r=glandium --- js/src/Makefile.in | 2 -- js/src/gdb/Makefile.in | 2 -- js/src/gdb/moz.build | 3 +++ js/src/jsapi-tests/Makefile.in | 2 -- js/src/jsapi-tests/moz.build | 3 +++ js/src/moz.build | 4 ++++ js/src/shell/Makefile.in | 2 -- js/src/shell/moz.build | 3 +++ 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/js/src/Makefile.in b/js/src/Makefile.in index 5c12ac2990eb..29c106c913d9 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -29,8 +29,6 @@ endif ifdef JS_HAS_CTYPES ifdef MOZ_NATIVE_FFI LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS) -else -LOCAL_INCLUDES = -Ictypes/libffi/include endif ifdef MOZ_NATIVE_FFI diff --git a/js/src/gdb/Makefile.in b/js/src/gdb/Makefile.in index dcde600909a8..513aef4d3c50 100644 --- a/js/src/gdb/Makefile.in +++ b/js/src/gdb/Makefile.in @@ -6,8 +6,6 @@ LIBS = ../$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIBS) -LOCAL_INCLUDES += -I$(srcdir)/.. -I.. - ifdef MOZ_SHARED_ICU EXTRA_LIBS += $(MOZ_ICU_LIBS) endif diff --git a/js/src/gdb/moz.build b/js/src/gdb/moz.build index 4b8a796a8fec..deb32e91dda7 100644 --- a/js/src/gdb/moz.build +++ b/js/src/gdb/moz.build @@ -21,3 +21,6 @@ UNIFIED_SOURCES += [ # on its behalf. for var in ('EXPORT_JS_API', 'IMPL_MFBT'): DEFINES[var] = True + +LOCAL_INCLUDES += ['..'] +GENERATED_INCLUDES += ['..'] diff --git a/js/src/jsapi-tests/Makefile.in b/js/src/jsapi-tests/Makefile.in index 31d9720ad15f..297b73399316 100644 --- a/js/src/jsapi-tests/Makefile.in +++ b/js/src/jsapi-tests/Makefile.in @@ -6,8 +6,6 @@ LIBS = ../$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIBS) -LOCAL_INCLUDES += -I$(srcdir)/.. -I.. - ifdef MOZ_SHARED_ICU EXTRA_LIBS += $(MOZ_ICU_LIBS) endif diff --git a/js/src/jsapi-tests/moz.build b/js/src/jsapi-tests/moz.build index a9cf6f34f885..c44f1d667b2b 100644 --- a/js/src/jsapi-tests/moz.build +++ b/js/src/jsapi-tests/moz.build @@ -81,3 +81,6 @@ DEFINES['EXPORT_JS_API'] = True # Building against js_static requires that we declare mfbt sybols "exported" # on its behalf. DEFINES['IMPL_MFBT'] = True + +LOCAL_INCLUDES += ['..'] +GENERATED_INCLUDES += ['..'] diff --git a/js/src/moz.build b/js/src/moz.build index 3b937e7c9e70..aafbf4d8a8ed 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -370,6 +370,10 @@ if CONFIG['JS_HAS_CTYPES']: 'ctypes/CTypes.cpp', 'ctypes/Library.cpp', ] + if not CONFIG['MOZ_NATIVE_FFI']: + GENERATED_INCLUDES += [ + 'ctypes/libffi/include', + ] if CONFIG['MOZ_VTUNE']: SOURCES += [ diff --git a/js/src/shell/Makefile.in b/js/src/shell/Makefile.in index 0261f61aa19e..0777e781ef00 100644 --- a/js/src/shell/Makefile.in +++ b/js/src/shell/Makefile.in @@ -12,8 +12,6 @@ ifdef MOZ_SHARED_ICU EXTRA_LIBS += $(MOZ_ICU_LIBS) endif -LOCAL_INCLUDES += -I$(srcdir)/.. -I.. - ifeq ($(OS_ARCH),Darwin) ifeq ($(TARGET_CPU),x86_64) DARWIN_EXE_LDFLAGS += -pagezero_size 10000 -image_base 100000000 diff --git a/js/src/shell/moz.build b/js/src/shell/moz.build index 42b1dfa532e9..e9ac97a30d9d 100644 --- a/js/src/shell/moz.build +++ b/js/src/shell/moz.build @@ -23,3 +23,6 @@ if CONFIG['_MSC_VER']: # necessary to link PGO lib on gcc when a object/static lib are compiled # for PGO. NO_PGO = True + +LOCAL_INCLUDES += ['..'] +GENERATED_INCLUDES += ['..'] From 9efa2319491b9ad1d5d18d5987cc5944dbf92bb2 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:10:22 -0500 Subject: [PATCH 34/56] Bug 973646 - Port some CXXFLAGS logic in js/src/Makefile.in to the DEFINES variable; r=glandium --- js/src/Makefile.in | 17 ----------------- js/src/moz.build | 9 +++++++++ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/js/src/Makefile.in b/js/src/Makefile.in index 29c106c913d9..bc8cbaeb5e78 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -404,23 +404,6 @@ selfhosted.out.h: $(selfhosted_out_h_deps) $(PYTHON) $(srcdir)/builtin/embedjs.py $(SELFHOSTED_DEFINES) \ -p '$(CPP)' -m $(srcdir)/js.msg -o $@ $(selfhosting_srcs) -############################################### -# BEGIN kludges for the Nitro assembler -# - -# Needed to "configure" it correctly. Unfortunately these -# flags wind up being applied to all code in js/src, not just -# the code in js/src/assembler. -CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 - -ifneq (,$(ENABLE_YARR_JIT)) -CXXFLAGS += -DENABLE_JIT=1 -endif - -# -# END kludges for the Nitro assembler -############################################### - ############################################### # Generating source package tarballs # (only possible when tar is found) diff --git a/js/src/moz.build b/js/src/moz.build index aafbf4d8a8ed..91bcf3b41c45 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -441,3 +441,12 @@ if CONFIG['_MSC_VER']: SOURCES['builtin/RegExp.cpp'].no_pgo = True # Bug 772303 elif CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']: SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661 + +# Needed to "configure" it correctly. Unfortunately these +# flags wind up being applied to all code in js/src, not just +# the code in js/src/assembler. +DEFINES['USE_SYSTEM_MALLOC'] = 1 +DEFINES['ENABLE_ASSEMBLER'] = 1 + +if CONFIG['ENABLE_YARR_JIT']: + DEFINES['ENABLE_JIT'] = 1 From ff62971cb9491f7f6ddc182484ec4ac336c18afc Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:15:48 -0500 Subject: [PATCH 35/56] Bug 973395 - Move the LOCAL_INCLUDES in media to moz.build; r=glandium --- media/libtheora/lib/Makefile.in | 2 - media/mtransport/test/Makefile.in | 13 ------ media/mtransport/test/moz.build | 22 +++++++++- media/webrtc/signaling/test/Makefile.in | 48 --------------------- media/webrtc/signaling/test/moz.build | 55 +++++++++++++++++++++++++ 5 files changed, 76 insertions(+), 64 deletions(-) diff --git a/media/libtheora/lib/Makefile.in b/media/libtheora/lib/Makefile.in index 63c905dc4122..1f8d91e00b48 100644 --- a/media/libtheora/lib/Makefile.in +++ b/media/libtheora/lib/Makefile.in @@ -26,5 +26,3 @@ endif endif include $(topsrcdir)/config/rules.mk - -LOCAL_INCLUDES = -I$(srcdir) diff --git a/media/mtransport/test/Makefile.in b/media/mtransport/test/Makefile.in index 940ed5ddfed8..8db09448bfa7 100644 --- a/media/mtransport/test/Makefile.in +++ b/media/mtransport/test/Makefile.in @@ -17,20 +17,7 @@ ifdef MOZ_SCTP LIBS += $(DEPTH)/netwerk/sctp/src/$(LIB_PREFIX)nksctp_s.$(LIB_SUFFIX) endif -ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include -ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include -endif -endif - -ifeq ($(OS_TARGET), Linux) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include -endif - ifeq ($(OS_TARGET), Android) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/android/include - LIBS += \ $(STLPORT_LDFLAGS) \ $(STLPORT_LIBS) \ diff --git a/media/mtransport/test/moz.build b/media/mtransport/test/moz.build index 4ffccba569a8..a51c43d7d396 100644 --- a/media/mtransport/test/moz.build +++ b/media/mtransport/test/moz.build @@ -28,9 +28,29 @@ FAIL_ON_WARNINGS = True for var in ('HAVE_STRDUP', 'NR_SOCKET_IS_VOID_PTR', 'SCTP_DEBUG', 'INET'): DEFINES[var] = True -if CONFIG['OS_TARGET'] != 'Android': +if CONFIG['OS_TARGET'] == 'Android': + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/android/include', + ] +else: DEFINES['INET6'] = True +if CONFIG['OS_TARGET'] == 'Linux': + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/linux/include', + ] + +if CONFIG['OS_TARGET'] == 'Darwin': + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/darwin/include', + ] + +if CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'): + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/darwin/include', + '/media/mtransport/third_party/nrappkit/src/port/generic/include', + ] + # SCTP DEFINES if CONFIG['OS_TARGET'] == 'WINNT': DEFINES['__Userspace_os_Windows'] = 1 diff --git a/media/webrtc/signaling/test/Makefile.in b/media/webrtc/signaling/test/Makefile.in index 60a0efa26ebb..c5e82c40278f 100644 --- a/media/webrtc/signaling/test/Makefile.in +++ b/media/webrtc/signaling/test/Makefile.in @@ -112,54 +112,6 @@ LIBS += \ $(NULL) endif -LOCAL_INCLUDES += \ - -I. \ - -I$(topsrcdir)/media/webrtc/trunk/testing/gtest/include \ - -I$(topsrcdir)/ipc/chromium/src \ - -I$(topsrcdir)/media/mtransport \ - -I$(topsrcdir)/media/mtransport/test \ - -I$(topsrcdir)/media/webrtc/signaling/include \ - -I$(topsrcdir)/media/webrtc/signaling/src/sipcc/core/sdp \ - -I$(topsrcdir)/media/webrtc/signaling/src/sipcc/cpr/include \ - -I$(topsrcdir)/media/webrtc/signaling/src/sipcc/core/includes \ - -I$(topsrcdir)/media/webrtc/signaling/src/common/browser_logging \ - -I$(topsrcdir)/media/webrtc/signaling/src/common/time_profiling \ - -I$(topsrcdir)/media/webrtc/signaling/src/media \ - -I$(topsrcdir)/media/webrtc/signaling/src/media-conduit \ - -I$(topsrcdir)/media/webrtc/signaling/src/mediapipeline \ - -I$(topsrcdir)/media/webrtc/signaling/src/sipcc/include \ - -I$(topsrcdir)/media/webrtc/signaling/src/peerconnection \ - -I$(topsrcdir)/media/webrtc/signaling/media-conduit\ - -I$(topsrcdir)/media/webrtc/trunk/third_party/libjingle/source/ \ - -I$(topsrcdir)/media/mtransport/third_party/nICEr/src/ice \ - -I$(topsrcdir)/media/mtransport/third_party/nICEr/src/net \ - -I$(topsrcdir)/media/mtransport/third_party/nICEr/src/stun \ - -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/share \ - -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/util/libekr \ - -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/log \ - -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/registry \ - -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/stats \ - -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/plugin \ - -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/event \ - -I$(topsrcdir)/xpcom/base/ \ - -I$(DEPTH)/dom/bindings/ \ - $(NULL) - -ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include -ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include -endif -endif - -ifeq ($(OS_TARGET), Linux) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include -endif - -ifeq ($(OS_TARGET), Android) -LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/android/include -endif - ifndef ZLIB_IN_MOZGLUE LIBS += $(MOZ_ZLIB_LIBS) endif diff --git a/media/webrtc/signaling/test/moz.build b/media/webrtc/signaling/test/moz.build index 1ff5bf131043..95cf28ab4b2e 100644 --- a/media/webrtc/signaling/test/moz.build +++ b/media/webrtc/signaling/test/moz.build @@ -19,3 +19,58 @@ if CONFIG['OS_TARGET'] in ('Darwin', 'Android'): for var in ('USE_FAKE_MEDIA_STREAMS', 'USE_FAKE_PCOBSERVER', 'NR_SOCKET_IS_VOID_PTR', 'HAVE_STRDUP'): DEFINES[var] = True + +GENERATED_INCLUDES += [ + '/dom/bindings', +] +LOCAL_INCLUDES += [ + '/ipc/chromium/src', + '/media/mtransport', + '/media/mtransport/test', + '/media/mtransport/third_party/nICEr/src/ice', + '/media/mtransport/third_party/nICEr/src/net', + '/media/mtransport/third_party/nICEr/src/stun', + '/media/mtransport/third_party/nrappkit/src/event', + '/media/mtransport/third_party/nrappkit/src/log', + '/media/mtransport/third_party/nrappkit/src/plugin', + '/media/mtransport/third_party/nrappkit/src/registry', + '/media/mtransport/third_party/nrappkit/src/share', + '/media/mtransport/third_party/nrappkit/src/stats', + '/media/mtransport/third_party/nrappkit/src/util/libekr', + '/media/webrtc/signaling/include', + '/media/webrtc/signaling/media-conduit', + '/media/webrtc/signaling/src/common/browser_logging', + '/media/webrtc/signaling/src/common/time_profiling', + '/media/webrtc/signaling/src/media', + '/media/webrtc/signaling/src/media-conduit', + '/media/webrtc/signaling/src/mediapipeline', + '/media/webrtc/signaling/src/peerconnection', + '/media/webrtc/signaling/src/sipcc/core/includes', + '/media/webrtc/signaling/src/sipcc/core/sdp', + '/media/webrtc/signaling/src/sipcc/cpr/include', + '/media/webrtc/signaling/src/sipcc/include', + '/media/webrtc/trunk/testing/gtest/include', + '/media/webrtc/trunk/third_party/libjingle/source', + '/xpcom/base', +] + +if CONFIG['OS_TARGET'] == 'Android': + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/android/include', + ] + +if CONFIG['OS_TARGET'] == 'Linux': + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/linux/include', + ] + +if CONFIG['OS_TARGET'] == 'Darwin': + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/darwin/include', + ] + +if CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'): + LOCAL_INCLUDES += [ + '/media/mtransport/third_party/nrappkit/src/port/darwin/include', + '/media/mtransport/third_party/nrappkit/src/port/generic/include', + ] From 1cd0a37ec08eaace78cb97faeab49045222ca1a3 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:30:36 -0500 Subject: [PATCH 36/56] Bug 970123 - Avoid read-aheading icudt52.dll for better startup performance; r=glandium --- toolkit/library/dependentlibs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolkit/library/dependentlibs.py b/toolkit/library/dependentlibs.py index 54e2b86c08c1..46e27914bfbf 100644 --- a/toolkit/library/dependentlibs.py +++ b/toolkit/library/dependentlibs.py @@ -103,7 +103,11 @@ def dependentlibs(lib, libpaths, func): deppath = os.path.join(dir, dep) if os.path.exists(deppath): deps.extend([d for d in dependentlibs(deppath, libpaths, func) if not d in deps]) - deps.append(dep) + # Black list the ICU data DLL because preloading it at startup + # leads to startup performance problems because of its excessive + # size (around 10MB). + if not dep.startswith("icudt"): + deps.append(dep) break return deps From 73b8879e459a7a516d153d789f1c71a428b50804 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 01:56:51 -0500 Subject: [PATCH 37/56] Bug 973142 - Get rid of the MOZILLA_INTERNAL_API makefile variable; r=glandium It's just as easy to directly set the preprocessor macro in the moz.build files. Using this variable doesn't really buy us anything. This patch also removes unused code from rdf/tests/dsds. --- config/config.mk | 3 +- intl/unicharutil/util/internal/Makefile.in | 1 - intl/unicharutil/util/internal/moz.build | 1 - profile/dirserviceprovider/src/Makefile.in | 6 - profile/dirserviceprovider/src/moz.build | 2 + .../mozbuild/frontend/sandbox_symbols.py | 3 +- rdf/tests/dsds/Makefile.in | 2 - rdf/tests/dsds/moz.build | 9 - rdf/tests/dsds/nsRDFDOMDataSource.cpp | 86 ---- rdf/tests/dsds/nsRDFDataSourceDS.cpp | 456 ------------------ rdf/tests/dsds/nsRDFDataSourceDS.h | 19 - rdf/tests/dsds/nsRDFDataSourceFactory.cpp | 70 --- rdf/util/src/internal/Makefile.in | 12 - services/crypto/component/Makefile.in | 5 - toolkit/components/feeds/Makefile.in | 1 - .../url-classifier/tests/Makefile.in | 13 - .../components/url-classifier/tests/moz.build | 8 + toolkit/library/Makefile.in | 2 - toolkit/library/moz.build | 2 + xpcom/analysis/Makefile.in | 2 - xpcom/analysis/moz.build | 1 + xpcom/base/Makefile.in | 2 - xpcom/base/moz.build | 1 - xpcom/build/Makefile.in | 2 - xpcom/components/Makefile.in | 2 - xpcom/io/Makefile.in | 1 - xpcom/reflect/xptcall/src/md/unix/Makefile.in | 2 - .../reflect/xptcall/src/md/win32/Makefile.in | 6 - xpcom/string/src/Makefile.in | 2 - xpcom/tests/moz.build | 6 +- 30 files changed, 17 insertions(+), 711 deletions(-) delete mode 100644 profile/dirserviceprovider/src/Makefile.in delete mode 100644 rdf/tests/dsds/nsRDFDOMDataSource.cpp delete mode 100644 rdf/tests/dsds/nsRDFDataSourceDS.cpp delete mode 100644 rdf/tests/dsds/nsRDFDataSourceDS.h delete mode 100644 rdf/tests/dsds/nsRDFDataSourceFactory.cpp delete mode 100644 rdf/util/src/internal/Makefile.in delete mode 100644 services/crypto/component/Makefile.in delete mode 100644 toolkit/components/url-classifier/tests/Makefile.in delete mode 100644 xpcom/reflect/xptcall/src/md/win32/Makefile.in diff --git a/config/config.mk b/config/config.mk index a1cbfc49b5e5..e407f845e538 100644 --- a/config/config.mk +++ b/config/config.mk @@ -420,8 +420,7 @@ ifdef _MSC_VER OS_LDFLAGS += $(DELAYLOAD_LDFLAGS) endif # _MSC_VER -# Does the makefile specifies the internal XPCOM API linkage? -ifneq (,$(MOZILLA_INTERNAL_API)$(LIBXUL_LIBRARY)) +ifneq (,$(LIBXUL_LIBRARY)) DEFINES += -DMOZILLA_INTERNAL_API endif diff --git a/intl/unicharutil/util/internal/Makefile.in b/intl/unicharutil/util/internal/Makefile.in index a4e3eb4c9b34..facde1e53e57 100644 --- a/intl/unicharutil/util/internal/Makefile.in +++ b/intl/unicharutil/util/internal/Makefile.in @@ -12,4 +12,3 @@ LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS) endif DIST_INSTALL = 1 -MOZILLA_INTERNAL_API = 1 diff --git a/intl/unicharutil/util/internal/moz.build b/intl/unicharutil/util/internal/moz.build index 0be580e234e5..05ed7ca03e41 100644 --- a/intl/unicharutil/util/internal/moz.build +++ b/intl/unicharutil/util/internal/moz.build @@ -14,4 +14,3 @@ LOCAL_INCLUDES += [ '..', '../../src', ] - diff --git a/profile/dirserviceprovider/src/Makefile.in b/profile/dirserviceprovider/src/Makefile.in deleted file mode 100644 index 0e60060ab1fb..000000000000 --- a/profile/dirserviceprovider/src/Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -MOZILLA_INTERNAL_API = 1 diff --git a/profile/dirserviceprovider/src/moz.build b/profile/dirserviceprovider/src/moz.build index 6f65e077773c..d25da6510fee 100644 --- a/profile/dirserviceprovider/src/moz.build +++ b/profile/dirserviceprovider/src/moz.build @@ -12,3 +12,5 @@ LIBRARY_NAME = 'profdirserviceprovider_s' # we don't want the shared lib FORCE_STATIC_LIB = True + +DEFINES['MOZILLA_INTERNAL_API'] = True diff --git a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py index 33267395c899..2137716b276a 100644 --- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py +++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ -312,7 +312,8 @@ VARIABLES = { 'LIBXUL_LIBRARY': (bool, bool, """Whether the library in this directory is linked into libxul. - Implies ``MOZILLA_INTERNAL_API`` and ``FORCE_STATIC_LIB``. + Implies ``FORCE_STATIC_LIB`` and the ``MOZILLA_INTERNAL_API`` + preprocessor macro. """, None), 'LOCAL_INCLUDES': (StrictOrderingOnAppendList, list, diff --git a/rdf/tests/dsds/Makefile.in b/rdf/tests/dsds/Makefile.in index a17c28f84a19..67ec6a0c0c81 100644 --- a/rdf/tests/dsds/Makefile.in +++ b/rdf/tests/dsds/Makefile.in @@ -3,8 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 - EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ $(XPCOM_LIBS) \ diff --git a/rdf/tests/dsds/moz.build b/rdf/tests/dsds/moz.build index 4574e6747108..0960ac95888d 100644 --- a/rdf/tests/dsds/moz.build +++ b/rdf/tests/dsds/moz.build @@ -4,15 +4,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -SOURCES += [ - 'nsRDFDataSourceDS.cpp', - 'nsRDFDataSourceFactory.cpp', -] - -LIBRARY_NAME = 'rdfdsds' - -IS_COMPONENT = True - RESOURCE_FILES.samples.rdf += [ 'DataSourceViewer.css', 'DataSourceViewer.xul', diff --git a/rdf/tests/dsds/nsRDFDOMDataSource.cpp b/rdf/tests/dsds/nsRDFDOMDataSource.cpp deleted file mode 100644 index d8c22da124d2..000000000000 --- a/rdf/tests/dsds/nsRDFDOMDataSource.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef __gen_nsRDFDOMDataSource_h__ -#define __gen_nsRDFDOMDataSource_h__ - -#include "nsRDFDOMDataSource.h" - -/* starting interface: nsRDFDOMDataSource */ - -/* {0F78DA58-8321-11d2-8EAC-00805F29F370} */ -#define NS_IRDFDATASOURCE_IID_STR "0F78DA58-8321-11d2-8EAC-00805F29F370" -#define NS_IRDFDATASOURCE_IID \ - {0x0F78DA58, 0x8321, 0x11d2, \ - { 0x8E, 0xAC, 0x00, 0x80, 0x5F, 0x29, 0xF3, 0x70 }} - -class nsRDFDOMDataSource : public nsISupports { - public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRDFDATASOURCE_IID) - - /* void Init (in string uri); */ - NS_IMETHOD Init(const char *uri) = 0; - - /* readonly attribute string URI; */ - NS_IMETHOD GetURI(char * *aURI) = 0; - - /* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ - NS_IMETHOD GetSource(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsIRDFResource **_retval) = 0; - - /* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ - NS_IMETHOD GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsISimpleEnumerator **_retval) = 0; - - /* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */ - NS_IMETHOD GetTarget(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsIRDFNode **_retval) = 0; - - /* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */ - NS_IMETHOD GetTargets(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsISimpleEnumerator **_retval) = 0; - - /* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ - NS_IMETHOD Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue) = 0; - - /* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */ - NS_IMETHOD Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) = 0; - - /* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ - NS_IMETHOD HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval) = 0; - - /* void AddObserver (in nsIRDFObserver aObserver); */ - NS_IMETHOD AddObserver(nsIRDFObserver *aObserver) = 0; - - /* void RemoveObserver (in nsIRDFObserver aObserver); */ - NS_IMETHOD RemoveObserver(nsIRDFObserver *aObserver) = 0; - - /* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */ - NS_IMETHOD ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval) = 0; - - /* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */ - NS_IMETHOD ArcLabelsOut(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) = 0; - - /* nsISimpleEnumerator GetAllResources (); */ - NS_IMETHOD GetAllResources(nsISimpleEnumerator **_retval) = 0; - - /* void Flush (); */ - NS_IMETHOD Flush() = 0; - - /* nsISimpleEnumerator GetAllCmds (in nsIRDFResource aSource); */ - NS_IMETHOD GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) = 0; - - /* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */ - NS_IMETHOD IsCommandEnabled(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments, bool *_retval) = 0; - - /* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */ - NS_IMETHOD DoCommand(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments) = 0; - - /* void beginUpdateBatch (); */ - NS_IMETHOD BeginUpdateBatch() = 0; - - /* void endUpdateBatch (); */ - NS_IMETHOD EndUpdateBatch() = 0; -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(nsRDFDOMDataSource, NS_IRDFDATASOURCE_IID) - -#endif /* __gen_nsRDFDOMDataSource_h__ */ diff --git a/rdf/tests/dsds/nsRDFDataSourceDS.cpp b/rdf/tests/dsds/nsRDFDataSourceDS.cpp deleted file mode 100644 index 781463ac647b..000000000000 --- a/rdf/tests/dsds/nsRDFDataSourceDS.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - - -#include "nsCRT.h" -#include "nsCOMPtr.h" - -#include "nsIRDFService.h" -#include "nsRDFCID.h" -#include "nsIRDFDataSource.h" -#include "nsIRDFRemoteDataSource.h" -#include "rdf.h" - -#include "nsIServiceManager.h" - -#include "nsEnumeratorUtils.h" - -#include "nsXPIDLString.h" - -#ifdef DEBUG -#include -#endif - -/** - * RDF vocabulary describing assertions in inner datasource - * - * For a particular resource, we want to provide all arcs out and - * in that the inner datasource has. - * This is done by introducing helper resources for each triple of - * the form - * x-moz-dsds:\ - * - * For each triple, that has the resource in question as subject, a - * "arcsout" assertion goes from that resource to a x-moz-dsds resource. - * For each triple, that has the resource in question as object, a - * "arcsin" assertion goes from that resource to a x-moz-dsds resource. - * For each x-moz-dsds resource, there is a "subject" arc to the subject, - * a "predicate" arc to the predicate and a "object" arc to the object. - * - * The namespace of this vocabulary is - * "http://www.mozilla.org/rdf/vocab/dsds". - * - * XXX we might want to add a "qname" resource from each resource to a - * somewhat canonical "prefix:localname" literal. - */ - -#define NS_RDF_DSDS_NAMESPACE_URI "http://www.mozilla.org/rdf/vocab/dsds#" -#define NS_RDF_ARCSOUT NS_RDF_DSDS_NAMESPACE_URI "arcsout" -#define NS_RDF_ARCSIN NS_RDF_DSDS_NAMESPACE_URI "arcsin" -#define NS_RDF_SUBJECT NS_RDF_DSDS_NAMESPACE_URI "subject" -#define NS_RDF_PREDICATE NS_RDF_DSDS_NAMESPACE_URI "predicate" -#define NS_RDF_OBJECT NS_RDF_DSDS_NAMESPACE_URI "object" - -#define NC_RDF_Name NC_NAMESPACE_URI "Name" -#define NC_RDF_Value NC_NAMESPACE_URI "Value" -#define NC_RDF_Child NC_NAMESPACE_URI "child" - -static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); - -class nsRDFDataSourceDataSource : - public nsIRDFDataSource, - public nsIRDFRemoteDataSource { -public: - NS_DECL_ISUPPORTS - NS_DECL_NSIRDFDATASOURCE - NS_DECL_NSIRDFREMOTEDATASOURCE - - nsRDFDataSourceDataSource(); - virtual ~nsRDFDataSourceDataSource(); - -private: - nsCString mURI; - nsCOMPtr mDataSource; - - static nsIRDFResource* kNC_Name; - static nsIRDFResource* kNC_Value; - static nsIRDFResource* kNC_Child; - -}; - -nsIRDFResource* nsRDFDataSourceDataSource::kNC_Name=nullptr; -nsIRDFResource* nsRDFDataSourceDataSource::kNC_Value=nullptr; -nsIRDFResource* nsRDFDataSourceDataSource::kNC_Child=nullptr; - - -nsRDFDataSourceDataSource::nsRDFDataSourceDataSource() -{ -} - -nsRDFDataSourceDataSource::~nsRDFDataSourceDataSource() -{ -} - - -NS_IMPL_ISUPPORTS2(nsRDFDataSourceDataSource, - nsIRDFDataSource, - nsIRDFRemoteDataSource) - -/** - * Implement nsIRDFRemoteDataSource - */ - -/* readonly attribute boolean loaded; */ -NS_IMETHODIMP nsRDFDataSourceDataSource::GetLoaded(bool *aLoaded) -{ - nsCOMPtr remote = - do_QueryInterface(mDataSource); - if (remote) { - return remote->GetLoaded(aLoaded); - } - *aLoaded = true; - return NS_OK; -} - -/* void Init (in string uri); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::Init(const char *uri) -{ - nsresult rv; - - mURI = uri; - - // cut off "rdf:datasource?" - NS_NAMED_LITERAL_CSTRING(prefix, "rdf:datasource"); - nsAutoCString mInnerURI; - mInnerURI = Substring(mURI, prefix.Length() + 1); - // bail if datasorce is empty or we're trying to inspect ourself - if (mInnerURI.IsEmpty() || mInnerURI == prefix) { - mURI.Truncate(); - return NS_ERROR_INVALID_ARG; - } - nsCOMPtr rdf(do_GetService(kRDFServiceCID, &rv)); - rv = rdf->GetDataSource(mInnerURI.get(), getter_AddRefs(mDataSource)); - if (NS_FAILED(rv)) { - mURI.Truncate(); - NS_WARNING("Could not get inner datasource"); - return rv; - } - - // get RDF resources - - if (!kNC_Name) { - rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Name), &kNC_Name); - rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Child), &kNC_Child); - rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Value), &kNC_Value); - } - -#ifdef DEBUG_alecf - printf("nsRDFDataSourceDataSource::Init(%s)\n", uri); -#endif - - return NS_OK; -} - -/* void Refresh (in boolean aBlocking); */ -NS_IMETHODIMP nsRDFDataSourceDataSource::Refresh(bool aBlocking) -{ - nsCOMPtr remote = - do_QueryInterface(mDataSource); - if (remote) { - return remote->Refresh(aBlocking); - } - return NS_OK; -} - -/* void Flush (); */ -NS_IMETHODIMP nsRDFDataSourceDataSource::Flush() -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -/* void FlushTo (in string aURI); */ -NS_IMETHODIMP nsRDFDataSourceDataSource::FlushTo(const char *aURI) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -/** - * Implement nsIRDFDataSource - */ - -/* readonly attribute string URI; */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::GetURI(char * *aURI) -{ -#ifdef DEBUG_alecf - printf("nsRDFDataSourceDataSource::GetURI()\n"); -#endif - *aURI = ToNewCString(mURI); - - return NS_OK; -} - -/* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::GetSource(nsIRDFResource *aProperty, - nsIRDFNode *aTarget, - bool aTruthValue, - nsIRDFResource **_retval) -{ - return NS_RDF_NO_VALUE; -} - -/* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::GetSources(nsIRDFResource *aProperty, - nsIRDFNode *aTarget, - bool aTruthValue, - nsISimpleEnumerator **_retval) -{ - return NS_RDF_NO_VALUE; -} - -/* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::GetTarget(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - bool aTruthValue, - nsIRDFNode **_retval) -{ -#ifdef DEBUG_alecf - nsXPIDLCString sourceval; - nsXPIDLCString propval; - aSource->GetValue(getter_Copies(sourceval)); - aProperty->GetValue(getter_Copies(propval)); - printf("GetTarget(%s, %s,..)\n", (const char*)sourceval, - (const char*)propval); -#endif - - return NS_OK; -} - -/* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::GetTargets(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - bool aTruthValue, - nsISimpleEnumerator **_retval) -{ - nsXPIDLCString sourceval; - aSource->GetValue(getter_Copies(sourceval)); - nsXPIDLCString propval; - aProperty->GetValue(getter_Copies(propval)); -#ifdef DEBUG_alecf - printf("GetTargets(%s, %s,..)\n", (const char*)sourceval, - (const char*)propval); -#endif - - nsresult rv; - bool isProp; - nsCOMPtr arcs; - nsISimpleEnumerator *enumerator; - - if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Child, &isProp)) && - isProp) { - - // here we need to determine if we need to extract out the source - // or use aSource? - if (StringBeginsWith(sourceval, NS_LITERAL_CSTRING("dsresource:"))) { - // somehow get the source - // XXX ? rv = mDataSource->ArcLabelsOut(realsource, &enumerator); - rv = mDataSource->ArcLabelsOut(aSource, &enumerator); - } else { - rv = mDataSource->ArcLabelsOut(aSource, &enumerator); - } - // enumerate all the children and create the composite resources - bool hasMoreArcs=false; - - rv = enumerator->HasMoreElements(&hasMoreArcs); - while (NS_SUCCEEDED(rv) && hasMoreArcs) { - - // get the next arc - nsCOMPtr arcSupports; - rv = enumerator->GetNext(getter_AddRefs(arcSupports)); - nsCOMPtr arc = do_QueryInterface(arcSupports, &rv); - - // get all the resources on the ends of the arc arcs - nsCOMPtr targetEnumerator; - rv = mDataSource->GetTargets(aSource, arc, true, - getter_AddRefs(targetEnumerator)); - - bool hasMoreTargets; - rv = targetEnumerator->HasMoreElements(&hasMoreTargets); - while (NS_SUCCEEDED(rv) && hasMoreTargets) { - // get the next target - nsCOMPtr targetSupports; - rv = enumerator->GetNext(getter_AddRefs(targetSupports)); - nsCOMPtr target=do_QueryInterface(targetSupports, &rv); - - // now we have an (arc, target) tuple that will be our node - // arc will become #Name - // target will become #Value -#ifdef DEBUG_alecf - nsXPIDLString arcValue; - nsXPIDLString targetValue; - - arc->GetValue(getter_Copies(arcValue)); - target->GetValue(getter_Copies(targetValue)); - printf("#child of %s:\n\t%s = %s\n", - (const char*)sourceval -#endif - - } - - rv = enumerator->HasMoreElements(&hasMoreArcs); - } - - } else if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Name, &isProp)) && - isProp) { - if (StringBeginsWith(sourceval, NS_LITERAL_CSTRING("dsresource:"))) { - // extract out the name - - } - - } else if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Value, &isProp)) && - isProp) { - - - } else { - rv = NS_NewISupportsArray(getter_AddRefs(arcs)); - if (NS_FAILED(rv)) return rv; - - nsArrayEnumerator* cursor = - new nsArrayEnumerator(arcs); - - if (!cursor) return NS_ERROR_OUT_OF_MEMORY; - - *_retval = cursor; - NS_ADDREF(*_retval); - } - - return NS_OK; -} - -/* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue) -{ - return NS_RDF_NO_VALUE; -} - -/* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) -{ - return NS_RDF_NO_VALUE; -} - -/* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval) -{ - return NS_RDF_NO_VALUE; -} - -/* void AddObserver (in nsIRDFObserver aObserver); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::AddObserver(nsIRDFObserver *aObserver) -{ - return NS_RDF_NO_VALUE; -} - -/* void RemoveObserver (in nsIRDFObserver aObserver); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::RemoveObserver(nsIRDFObserver *aObserver) -{ - return NS_RDF_NO_VALUE; -} - -/* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval) -{ - return NS_RDF_NO_VALUE; -} - -/* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::ArcLabelsOut(nsIRDFResource *aSource, - nsISimpleEnumerator **_retval) -{ - nsresult rv=NS_OK; - - nsCOMPtr arcs; - rv = NS_NewISupportsArray(getter_AddRefs(arcs)); - - if (NS_FAILED(rv)) return rv; - nsXPIDLCString sourceval; - aSource->GetValue(getter_Copies(sourceval)); - -#ifdef DEBUG_alecf - printf("ArcLabelsOut(%s)\n", (const char*)sourceval); -#endif - - arcs->AppendElement(kNC_Name); - arcs->AppendElement(kNC_Value); - arcs->AppendElement(kNC_Child); - - nsArrayEnumerator* cursor = - new nsArrayEnumerator(arcs); - - if (!cursor) return NS_ERROR_OUT_OF_MEMORY; - - NS_ADDREF(cursor); - *_retval = cursor; - - return NS_OK; -} - -/* nsISimpleEnumerator GetAllResources (); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::GetAllResources(nsISimpleEnumerator **_retval) -{ - return NS_RDF_NO_VALUE; -} - -/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::IsCommandEnabled(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments, bool *_retval) -{ - return NS_RDF_NO_VALUE; -} - -/* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::DoCommand(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments) -{ - return NS_RDF_NO_VALUE; -} - -/* void beginUpdateBatch (); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::BeginUpdateBatch() -{ - return NS_OK; -} - -/* void endUpdateBatch (); */ -NS_IMETHODIMP -nsRDFDataSourceDataSource::EndUpdateBatch() -{ - return NS_OK; -} - -nsresult -NS_NewRDFDataSourceDataSource(nsISupports *, const nsIID& iid, - void ** result) - -{ - nsRDFDataSourceDataSource * dsds = new nsRDFDataSourceDataSource(); - if (!dsds) return NS_ERROR_NOT_INITIALIZED; - return dsds->QueryInterface(iid, result); - -} diff --git a/rdf/tests/dsds/nsRDFDataSourceDS.h b/rdf/tests/dsds/nsRDFDataSourceDS.h deleted file mode 100644 index 8e3380ed7297..000000000000 --- a/rdf/tests/dsds/nsRDFDataSourceDS.h +++ /dev/null @@ -1,19 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef __nsRDFDataSourceDS_h -#define __nsRDFDataSourceDS_h - - -/* {aa1b3f18-1aad-11d3-84bf-006008948010} */ -#define NS_RDFDATASOURCEDATASOURCE_CID \ - {0xaa1b3f18, 0x1aad, 0x11d3, \ - {0x84, 0xbf, 0x00, 0x60, 0x08, 0x94, 0x80, 0x10}} - -nsresult -NS_NewRDFDataSourceDataSource(nsISupports* aOuter, - const nsIID& iid, void **result); - -#endif diff --git a/rdf/tests/dsds/nsRDFDataSourceFactory.cpp b/rdf/tests/dsds/nsRDFDataSourceFactory.cpp deleted file mode 100644 index af0706aa0b10..000000000000 --- a/rdf/tests/dsds/nsRDFDataSourceFactory.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "nsIGenericFactory.h" -#include "nsRDFDataSourceDS.h" -#include "nsIComponentManager.h" -#include "nsIServiceManager.h" -#include "rdf.h" - -#ifdef DEBUG -#include -#endif - -static NS_DEFINE_CID(kRDFDataSourceCID, NS_RDFDATASOURCEDATASOURCE_CID); -static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID); - -nsresult -NSGetFactory(nsISupports* aServMgr, - const nsCID &aClass, - const char* aClassName, - const char* aContractID, - nsIFactory **aFactory) -{ - nsresult rv=NS_OK; - nsIGenericFactory* fact; - if (aClass.Equals(kRDFDataSourceCID)) - rv = NS_NewGenericFactory(&fact, NS_NewRDFDataSourceDataSource); - else - rv = NS_ERROR_FAILURE; - - if (NS_SUCCEEDED(rv)) - *aFactory = fact; - -#ifdef DEBUG_alecf - printf("nsRDFDataSource's NSGetFactory!\n"); -#endif - return rv; -} - -nsresult -NSRegisterSelf(nsISupports* aServMgr, const char* aPath) -{ - nsresult rv; - nsCOMPtr compMgr = - do_GetService(kComponentManagerCID, aServMgr, &rv); - if (NS_FAILED(rv)) return rv; - - rv = compMgr->RegisterComponent(kRDFDataSourceCID, - "Generic DataSource DataSource", - NS_RDF_DATASOURCE_CONTRACTID_PREFIX "datasource", - aPath, true, true); - - return rv; - -} - -nsresult -NSUnregisterSelf(nsISupports* aServMgr, const char* aPath) -{ - nsresult rv; - nsCOMPtr compMgr = - do_GetService(kComponentManagerCID, aServMgr, &rv); - if (NS_FAILED(rv)) return rv; - - rv = compMgr->UnregisterComponent(kRDFDataSourceCID, aPath); - - return rv; -} diff --git a/rdf/util/src/internal/Makefile.in b/rdf/util/src/internal/Makefile.in deleted file mode 100644 index a00f280b9dfa..000000000000 --- a/rdf/util/src/internal/Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# This makefile builds the version of unicharutils_s static library which uses -# internal linkage. Components that use frozen (external) linkage should use -# rdfutil_external_s. - -MOZILLA_INTERNAL_API = 1 - -include $(topsrcdir)/config/rules.mk diff --git a/services/crypto/component/Makefile.in b/services/crypto/component/Makefile.in deleted file mode 100644 index 54e9874bc267..000000000000 --- a/services/crypto/component/Makefile.in +++ /dev/null @@ -1,5 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -MOZILLA_INTERNAL_API := 1 diff --git a/toolkit/components/feeds/Makefile.in b/toolkit/components/feeds/Makefile.in index b1fc32413879..f6ac6fd07e3c 100644 --- a/toolkit/components/feeds/Makefile.in +++ b/toolkit/components/feeds/Makefile.in @@ -3,7 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 include $(topsrcdir)/config/rules.mk ABS_SRCDIR := $(abspath $(srcdir)) diff --git a/toolkit/components/url-classifier/tests/Makefile.in b/toolkit/components/url-classifier/tests/Makefile.in deleted file mode 100644 index 905791dc0538..000000000000 --- a/toolkit/components/url-classifier/tests/Makefile.in +++ /dev/null @@ -1,13 +0,0 @@ -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -MOZILLA_INTERNAL_API = 1 - -# XXX Get this to work in libxul builds. -## simple c++ tests (no xpcom) -#CPP_UNIT_TESTS = \ -# TestUrlClassifierUtils.cpp \ -# $(NULL) diff --git a/toolkit/components/url-classifier/tests/moz.build b/toolkit/components/url-classifier/tests/moz.build index 045fef0f5176..1214da732b48 100644 --- a/toolkit/components/url-classifier/tests/moz.build +++ b/toolkit/components/url-classifier/tests/moz.build @@ -9,3 +9,11 @@ MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini'] XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini'] JAR_MANIFESTS += ['jar.mn'] + +#DEFINES['MOZILLA_INTERNAL_API'] = True + +# XXX Get this to work in libxul builds. +## simple c++ tests (no xpcom) +#CPP_UNIT_TESTS += [ \ +# 'TestUrlClassifierUtils.cpp', \ +#] diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 63efcf4cd6a7..007f2727e4dd 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -2,8 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 - ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) # This is going to be a framework named "XUL", not an ordinary library named # "libxul.dylib" diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index e521453e9869..0618845827d4 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -20,6 +20,8 @@ if CONFIG['OS_ARCH'] == 'WINNT': '/xpcom/base', ] +DEFINES['MOZILLA_INTERNAL_API'] = True + # component libraries additional_defines = ( 'MOZ_AUTH_EXTENSION', diff --git a/xpcom/analysis/Makefile.in b/xpcom/analysis/Makefile.in index 99926fc59583..c784c56ad8d9 100644 --- a/xpcom/analysis/Makefile.in +++ b/xpcom/analysis/Makefile.in @@ -2,8 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 - include $(topsrcdir)/config/rules.mk DUMP_CLASSES = \ diff --git a/xpcom/analysis/moz.build b/xpcom/analysis/moz.build index 895d11993cfb..edffa058659c 100644 --- a/xpcom/analysis/moz.build +++ b/xpcom/analysis/moz.build @@ -4,3 +4,4 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +DEFINES['MOZILLA_INTERNAL_API'] = True diff --git a/xpcom/base/Makefile.in b/xpcom/base/Makefile.in index 3b1e3118c10f..5114b6680120 100644 --- a/xpcom/base/Makefile.in +++ b/xpcom/base/Makefile.in @@ -3,8 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API =1 - INSTALL_TARGETS += errorlist errorlist_FILES := \ ErrorListCDefines.h \ diff --git a/xpcom/base/moz.build b/xpcom/base/moz.build index 24b5d7e53f49..3cf6e11b2343 100644 --- a/xpcom/base/moz.build +++ b/xpcom/base/moz.build @@ -158,6 +158,5 @@ LOCAL_INCLUDES += [ '/xpcom/ds', ] - if CONFIG['MOZ_OPTIMIZE']: DEFINES['MOZ_OPTIMIZE'] = True diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in index 0f712e92af48..7c57bd01fdcb 100644 --- a/xpcom/build/Makefile.in +++ b/xpcom/build/Makefile.in @@ -5,8 +5,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 - LOCAL_INCLUDES = \ -I$(srcdir) \ -I.. \ diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in index 9b48ca2adc52..10d718f9e854 100644 --- a/xpcom/components/Makefile.in +++ b/xpcom/components/Makefile.in @@ -3,8 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 - LOCAL_INCLUDES = \ -I$(srcdir)/../reflect/xptinfo/src \ -I$(srcdir)/../base \ diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in index 2969134195f0..bcbf9f3c30d7 100644 --- a/xpcom/io/Makefile.in +++ b/xpcom/io/Makefile.in @@ -2,7 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 include $(topsrcdir)/config/rules.mk LOCAL_INCLUDES += -I.. diff --git a/xpcom/reflect/xptcall/src/md/unix/Makefile.in b/xpcom/reflect/xptcall/src/md/unix/Makefile.in index 4b80a6142a1a..b66b23a6598f 100644 --- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in +++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in @@ -3,8 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 - ###################################################################### # ARM ###################################################################### diff --git a/xpcom/reflect/xptcall/src/md/win32/Makefile.in b/xpcom/reflect/xptcall/src/md/win32/Makefile.in deleted file mode 100644 index e2587554bae1..000000000000 --- a/xpcom/reflect/xptcall/src/md/win32/Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -MOZILLA_INTERNAL_API = 1 diff --git a/xpcom/string/src/Makefile.in b/xpcom/string/src/Makefile.in index b9dcf584f6dd..38ffcca515d0 100644 --- a/xpcom/string/src/Makefile.in +++ b/xpcom/string/src/Makefile.in @@ -4,8 +4,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MOZILLA_INTERNAL_API = 1 - include $(topsrcdir)/config/rules.mk ifneq (,$(INTEL_ARCHITECTURE)) diff --git a/xpcom/tests/moz.build b/xpcom/tests/moz.build index 8f8f3cf1633c..e0caf47ee85d 100644 --- a/xpcom/tests/moz.build +++ b/xpcom/tests/moz.build @@ -70,6 +70,7 @@ CPP_UNIT_TESTS += [ 'TestPipe.cpp', 'TestPLDHash.cpp', 'TestRefPtr.cpp', + 'TestStringAPI.cpp', 'TestTArray.cpp', 'TestTextFormatter.cpp', 'TestThreadUtils.cpp' @@ -113,11 +114,6 @@ if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT', 'Darwin'): 'TestDeadlockDetectorScalability.cpp', ] -if not CONFIG['MOZILLA_INTERNAL_API']: - CPP_UNIT_TESTS += [ - 'TestStringAPI.cpp', - ] - LOCAL_INCLUDES += [ '../ds', ] From e613d30a2cd4d772f035b21a2611a0f7549d356e Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 02:02:00 -0500 Subject: [PATCH 38/56] Bug 973143 - Move some variables to moz.build; r=glandium --- configure.in | 5 +++++ dom/apps/src/Makefile.in | 7 ------- dom/apps/src/Webapps.jsm | 2 +- gfx/cairo/libpixman/src/Makefile.in | 22 ---------------------- gfx/cairo/libpixman/src/moz.build | 21 +++++++++++++++++++++ js/src/Makefile.in | 5 ----- js/src/moz.build | 2 ++ toolkit/mozapps/extensions/Makefile.in | 9 --------- toolkit/mozapps/extensions/moz.build | 4 ++-- 9 files changed, 31 insertions(+), 46 deletions(-) delete mode 100644 dom/apps/src/Makefile.in delete mode 100644 toolkit/mozapps/extensions/Makefile.in diff --git a/configure.in b/configure.in index 59cb2e5c396b..bbc7b400328b 100644 --- a/configure.in +++ b/configure.in @@ -8618,6 +8618,11 @@ AC_SUBST(MOZ_FOLD_LIBS) AC_SUBST(MOZ_ENABLE_SZIP) AC_SUBST(MOZ_SZIP_FLAGS) +if test "$MOZ_DEBUG"; then + MOZ_EM_DEBUG=1 +fi +AC_SUBST(MOZ_EM_DEBUG) + if test -n "$COMPILE_ENVIRONMENT"; then AC_MSG_CHECKING([for posix_fallocate]) AC_TRY_LINK([#define _XOPEN_SOURCE 600 diff --git a/dom/apps/src/Makefile.in b/dom/apps/src/Makefile.in deleted file mode 100644 index 9671cb737d40..000000000000 --- a/dom/apps/src/Makefile.in +++ /dev/null @@ -1,7 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -ifdef MOZ_DEBUG - DEFINES += -DMOZ_DEBUG=1 -endif diff --git a/dom/apps/src/Webapps.jsm b/dom/apps/src/Webapps.jsm index 01f75fe57171..46209e279c3a 100755 --- a/dom/apps/src/Webapps.jsm +++ b/dom/apps/src/Webapps.jsm @@ -55,7 +55,7 @@ XPCOMUtils.defineLazyGetter(this, "libcutils", function() { #endif function debug(aMsg) { -#ifdef MOZ_DEBUG +#ifdef DEBUG dump("-*- Webapps.jsm : " + aMsg + "\n"); #endif } diff --git a/gfx/cairo/libpixman/src/Makefile.in b/gfx/cairo/libpixman/src/Makefile.in index bca7dd31b114..f0dfce4d2332 100644 --- a/gfx/cairo/libpixman/src/Makefile.in +++ b/gfx/cairo/libpixman/src/Makefile.in @@ -65,29 +65,7 @@ endif endif -ifdef USE_MMX -CSRCS += pixman-mmx.c -DEFINES += -DUSE_MMX -endif - -ifdef USE_SSE2 -CSRCS += pixman-sse2.c -DEFINES += -DUSE_SSE -DUSE_SSE2 -endif - -ifdef USE_VMX -CSRCS += pixman-vmx.c -DEFINES += -DUSE_VMX -endif - -ifdef USE_ARM_SIMD_GCC -CSRCS += pixman-arm-simd.c -DEFINES += -DUSE_ARM_SIMD -endif - ifdef USE_ARM_NEON_GCC -CSRCS += pixman-arm-neon.c -DEFINES += -DUSE_ARM_NEON ARM_NEON_CFLAGS = -mfpu=neon endif diff --git a/gfx/cairo/libpixman/src/moz.build b/gfx/cairo/libpixman/src/moz.build index 503b3405dcfb..ede0e0d7dc62 100644 --- a/gfx/cairo/libpixman/src/moz.build +++ b/gfx/cairo/libpixman/src/moz.build @@ -75,3 +75,24 @@ if CONFIG['_MSC_VER']: DEFINES['PACKAGE'] = 'mozpixman' DEFINES['_USE_MATH_DEFINES'] = True + +if CONFIG['USE_MMX']: + DEFINES['USE_MMX'] = True + SOURCES += ['pixman-mmx.c'] + +if CONFIG['USE_SSE2']: + DEFINES['USE_SSE'] = True + DEFINES['USE_SSE2'] = True + SOURCES += ['pixman-sse2.c'] + +if CONFIG['USE_VMX']: + DEFINES['USE_VMX'] = True + SOURCES += ['pixman-vmx.c'] + +if CONFIG['USE_ARM_SIMD_GCC']: + DEFINES['USE_ARM_SIMD'] = True + SOURCES += ['pixman-arm-simd.c'] + +if CONFIG['USE_ARM_NEON_GCC']: + DEFINES['USE_ARM_NEON'] = True + SOURCES += ['pixman-arm-neon.c'] diff --git a/js/src/Makefile.in b/js/src/Makefile.in index bc8cbaeb5e78..fa9d34489739 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -203,11 +203,6 @@ DIST_GARBAGE = config.cache config.log config.status* \ distclean:: $(RM) $(DIST_GARBAGE) -ifneq (,$(filter WINNT,$(OS_ARCH))) -# _CRT_RAND_S must be #defined before #including stdlib.h to get rand_s() -DEFINES += -D_CRT_RAND_S -endif - ifneq ($(findstring -L,$(NSPR_LIBS)),) NSPR_STATIC_PATH = $(subst -L,,$(findstring -L,$(NSPR_LIBS))) else diff --git a/js/src/moz.build b/js/src/moz.build index 91bcf3b41c45..b796bee1f1ad 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -343,6 +343,8 @@ if CONFIG['OS_ARCH'] == 'WINNT': 'assembler/jit/ExecutableAllocatorWin.cpp', 'yarr/OSAllocatorWin.cpp', ] + # _CRT_RAND_S must be #defined before #including stdlib.h to get rand_s() + DEFINES['_CRT_RAND_S'] = True else: SOURCES += [ 'assembler/jit/ExecutableAllocatorPosix.cpp', diff --git a/toolkit/mozapps/extensions/Makefile.in b/toolkit/mozapps/extensions/Makefile.in deleted file mode 100644 index a3ef4233cc25..000000000000 --- a/toolkit/mozapps/extensions/Makefile.in +++ /dev/null @@ -1,9 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# Additional debugging info is exposed by setting the MOZ_EM_DEBUG -# environment variable when building. -ifneq (,$(MOZ_EM_DEBUG)) -DEFINES += -DMOZ_EM_DEBUG=1 -endif diff --git a/toolkit/mozapps/extensions/moz.build b/toolkit/mozapps/extensions/moz.build index e4ef9d7105dd..e3a8139f8d2c 100644 --- a/toolkit/mozapps/extensions/moz.build +++ b/toolkit/mozapps/extensions/moz.build @@ -53,7 +53,7 @@ if CONFIG['MOZ_UPDATE_CHANNEL'] not in ('aurora', 'beta', 'release', 'esr'): DEFINES['MOZ_EXTENSIONS_DB_SCHEMA'] = 16 # Additional debugging info is exposed in debug builds -if CONFIG['MOZ_DEBUG']: +if CONFIG['MOZ_EM_DEBUG']: DEFINES['MOZ_EM_DEBUG'] = 1 -JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file +JAR_MANIFESTS += ['jar.mn'] From 9e38fc2acd5c5802731fd649d5dab9ae19a0346c Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 18 Feb 2014 02:12:54 -0500 Subject: [PATCH 39/56] Bug 973393 - Move the LOCAL_INCLUDES in ipc to moz.build; r=glandium --- ipc/chromium/Makefile.in | 41 ++-------------------------------------- ipc/chromium/moz.build | 10 ++++++++++ ipc/ipdl/Makefile.in | 3 --- ipc/ipdl/moz.build | 2 ++ 4 files changed, 14 insertions(+), 42 deletions(-) diff --git a/ipc/chromium/Makefile.in b/ipc/chromium/Makefile.in index 109e0d18cfa7..20c8b746316c 100644 --- a/ipc/chromium/Makefile.in +++ b/ipc/chromium/Makefile.in @@ -10,10 +10,6 @@ ifndef MOZ_NATIVE_LIBEVENT # { vpath %.c \ $(srcdir)/src/third_party/libevent \ $(NULL) -else # } else { -# message_pump_libevent.cc includes third_party/libevent/event.h, -# which we put in $(DIST), see export rule below -LOCAL_INCLUDES += -I$(DIST) endif # } vpath %.cc \ @@ -26,39 +22,6 @@ vpath %.mm \ $(srcdir)/src/chrome/common \ $(NULL) -# libevent - -ifndef MOZ_NATIVE_LIBEVENT # { - -ifneq ($(OS_ARCH),WINNT) # (if OS_POSIX) { - -LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent -LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/include - -ifeq ($(OS_ARCH),Darwin) # (OS_MACOSX) { -LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/mac - -else # } else { - -ifneq (,$(filter-out DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) # (OS_LINUX) { -ifeq ($(OS_TARGET),Android) # { -LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/android -else # } else { -LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/linux -endif # } - -else # } else (OS_BSD) { - -LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/bsd - -endif # } - -endif # } - -endif # } - -endif # } - OS_CXXFLAGS += $(TK_CFLAGS) include $(topsrcdir)/config/rules.mk @@ -66,10 +29,10 @@ include $(topsrcdir)/config/rules.mk ifdef MOZ_NATIVE_LIBEVENT # { export-preqs = \ - $(call mkdir_deps,$(DIST)/third_party/libevent) \ + $(call mkdir_deps,$(CURDIR)/third_party/libevent) \ $(NULL) export:: $(export-preqs) - echo '#include ' > $(DIST)/third_party/libevent/event.h + echo '#include ' > $(CURDIR)/third_party/libevent/event.h endif # } diff --git a/ipc/chromium/moz.build b/ipc/chromium/moz.build index 5df73f9afffa..8798b3d1ff4d 100644 --- a/ipc/chromium/moz.build +++ b/ipc/chromium/moz.build @@ -142,6 +142,10 @@ elif not CONFIG['MOZ_NATIVE_LIBEVENT']: 'src/third_party/libevent/strlcpy.c', ] DEFINES['HAVE_CONFIG_H'] = True + LOCAL_INCLUDES += [ + 'src/third_party/libevent', + 'src/third_party/libevent/include', + ] if os_posix: SOURCES += [ @@ -203,6 +207,7 @@ if os_macosx: UNIFIED_SOURCES += [ 'src/third_party/libevent/kqueue.c', ] + LOCAL_INCLUDES += ['src/third_party/libevent/mac'] if os_linux: SOURCES += [ @@ -231,6 +236,10 @@ if os_linux: SOURCES += [ 'src/third_party/libevent/epoll.c', ] + if CONFIG['OS_TARGET'] == 'Android': + LOCAL_INCLUDES += ['src/third_party/libevent/android'] + else: + LOCAL_INCLUDES += ['src/third_party/libevent/linux'] if os_bsd: SOURCES += [ @@ -260,6 +269,7 @@ if os_bsd: SOURCES += [ 'src/third_party/libevent/kqueue.c', ] + LOCAL_INCLUDES += ['src/third_party/libevent/bsd'] if CONFIG['_MSC_VER']: SOURCES += [ diff --git a/ipc/ipdl/Makefile.in b/ipc/ipdl/Makefile.in index 4580021df37c..8aae20dfaba6 100644 --- a/ipc/ipdl/Makefile.in +++ b/ipc/ipdl/Makefile.in @@ -8,9 +8,6 @@ GARBAGE += ipdl_lextab.py ipdl_yacctab.py $(wildcard *.pyc $(srcdir)/ipdl/*.pyc # This file is generated by the moz.build backend. include ipdlsrcs.mk -LOCAL_INCLUDES += -I$(DEPTH)/ipc/ipdl/_ipdlheaders - - include $(topsrcdir)/config/rules.mk diff --git a/ipc/ipdl/moz.build b/ipc/ipdl/moz.build index 466672254bba..1f4c1d63a403 100644 --- a/ipc/ipdl/moz.build +++ b/ipc/ipdl/moz.build @@ -12,3 +12,5 @@ FAIL_ON_WARNINGS = True include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +GENERATED_INCLUDES += ['/ipc/ipdl/_ipdlheaders'] From 2d583fd28fc65131c2b5d38f81303337885f2fb5 Mon Sep 17 00:00:00 2001 From: Arnaud Sourioux Date: Mon, 17 Feb 2014 23:47:48 -0800 Subject: [PATCH 40/56] Bug 919806: Get rid of NS_IMETHOD in nsIFrame.h and its implementations r=dholbert --- layout/forms/nsColorControlFrame.cpp | 4 +- layout/forms/nsColorControlFrame.h | 4 +- layout/forms/nsComboboxControlFrame.cpp | 12 ++--- layout/forms/nsComboboxControlFrame.h | 8 +-- layout/forms/nsFieldSetFrame.cpp | 10 ++-- layout/forms/nsFieldSetFrame.h | 12 ++--- layout/forms/nsFileControlFrame.cpp | 4 +- layout/forms/nsFileControlFrame.h | 4 +- layout/forms/nsFormControlFrame.cpp | 4 +- layout/forms/nsFormControlFrame.h | 4 +- layout/forms/nsGfxButtonControlFrame.cpp | 6 +-- layout/forms/nsGfxButtonControlFrame.h | 6 +-- layout/forms/nsGfxCheckboxControlFrame.h | 2 +- layout/forms/nsHTMLButtonControlFrame.cpp | 10 ++-- layout/forms/nsHTMLButtonControlFrame.h | 12 ++--- layout/forms/nsImageControlFrame.cpp | 14 +++--- layout/forms/nsLegendFrame.cpp | 4 +- layout/forms/nsLegendFrame.h | 4 +- layout/forms/nsListControlFrame.cpp | 10 ++-- layout/forms/nsListControlFrame.h | 10 ++-- layout/forms/nsMeterFrame.cpp | 4 +- layout/forms/nsMeterFrame.h | 6 +-- layout/forms/nsNumberControlFrame.cpp | 4 +- layout/forms/nsNumberControlFrame.h | 6 +-- layout/forms/nsProgressFrame.cpp | 4 +- layout/forms/nsProgressFrame.h | 6 +-- layout/forms/nsRangeFrame.cpp | 4 +- layout/forms/nsRangeFrame.h | 6 +-- layout/forms/nsSelectsAreaFrame.cpp | 2 +- layout/forms/nsSelectsAreaFrame.h | 2 +- layout/forms/nsTextControlFrame.cpp | 8 +-- layout/forms/nsTextControlFrame.h | 10 ++-- layout/generic/nsBRFrame.cpp | 4 +- layout/generic/nsBlockFrame.cpp | 16 +++--- layout/generic/nsBlockFrame.h | 16 +++--- layout/generic/nsBulletFrame.cpp | 4 +- layout/generic/nsBulletFrame.h | 4 +- layout/generic/nsCanvasFrame.cpp | 14 +++--- layout/generic/nsCanvasFrame.h | 14 +++--- layout/generic/nsColumnSetFrame.cpp | 10 ++-- layout/generic/nsColumnSetFrame.h | 12 ++--- layout/generic/nsContainerFrame.cpp | 8 +-- layout/generic/nsContainerFrame.h | 8 +-- layout/generic/nsFirstLetterFrame.cpp | 8 +-- layout/generic/nsFirstLetterFrame.h | 8 +-- layout/generic/nsFlexContainerFrame.cpp | 4 +- layout/generic/nsFlexContainerFrame.h | 4 +- layout/generic/nsFrame.cpp | 44 ++++++++--------- layout/generic/nsFrame.h | 42 ++++++++-------- layout/generic/nsFrameSetFrame.cpp | 32 ++++++------ layout/generic/nsFrameSetFrame.h | 10 ++-- layout/generic/nsGfxScrollFrame.cpp | 26 +++++----- layout/generic/nsGfxScrollFrame.h | 26 +++++----- layout/generic/nsHTMLCanvasFrame.cpp | 4 +- layout/generic/nsHTMLCanvasFrame.h | 4 +- layout/generic/nsIFrame.h | 60 +++++++++++------------ layout/generic/nsImageFrame.cpp | 12 ++--- layout/generic/nsImageFrame.h | 12 ++--- layout/generic/nsInlineFrame.cpp | 8 +-- layout/generic/nsInlineFrame.h | 8 +-- layout/generic/nsLeafFrame.cpp | 4 +- layout/generic/nsLeafFrame.h | 4 +- layout/generic/nsObjectFrame.cpp | 10 ++-- layout/generic/nsObjectFrame.h | 10 ++-- layout/generic/nsPageContentFrame.cpp | 4 +- layout/generic/nsPageContentFrame.h | 4 +- layout/generic/nsPageFrame.cpp | 6 +-- layout/generic/nsPageFrame.h | 8 +-- layout/generic/nsPlaceholderFrame.cpp | 4 +- layout/generic/nsPlaceholderFrame.h | 4 +- layout/generic/nsSimplePageSequence.cpp | 4 +- layout/generic/nsSimplePageSequence.h | 4 +- layout/generic/nsSubDocumentFrame.cpp | 6 +-- layout/generic/nsSubDocumentFrame.h | 6 +-- layout/generic/nsTextFrame.cpp | 18 +++---- layout/generic/nsTextFrame.h | 18 +++---- layout/generic/nsVideoFrame.cpp | 6 +-- layout/generic/nsVideoFrame.h | 6 +-- layout/generic/nsViewportFrame.cpp | 12 ++--- layout/generic/nsViewportFrame.h | 12 ++--- layout/mathml/nsMathMLContainerFrame.cpp | 10 ++-- layout/mathml/nsMathMLContainerFrame.h | 30 ++++++------ layout/mathml/nsMathMLSelectedFrame.cpp | 4 +- layout/mathml/nsMathMLSelectedFrame.h | 4 +- layout/mathml/nsMathMLTokenFrame.cpp | 6 +-- layout/mathml/nsMathMLTokenFrame.h | 8 +-- layout/mathml/nsMathMLmactionFrame.cpp | 4 +- layout/mathml/nsMathMLmactionFrame.h | 4 +- layout/mathml/nsMathMLmencloseFrame.cpp | 2 +- layout/mathml/nsMathMLmencloseFrame.h | 2 +- layout/mathml/nsMathMLmfencedFrame.cpp | 6 +-- layout/mathml/nsMathMLmfencedFrame.h | 6 +-- layout/mathml/nsMathMLmoFrame.cpp | 6 +-- layout/mathml/nsMathMLmoFrame.h | 6 +-- layout/mathml/nsMathMLmpaddedFrame.cpp | 2 +- layout/mathml/nsMathMLmpaddedFrame.h | 2 +- layout/mathml/nsMathMLmrootFrame.cpp | 2 +- layout/mathml/nsMathMLmrootFrame.h | 2 +- layout/mathml/nsMathMLmrowFrame.cpp | 2 +- layout/mathml/nsMathMLmrowFrame.h | 2 +- layout/mathml/nsMathMLmspaceFrame.cpp | 2 +- layout/mathml/nsMathMLmspaceFrame.h | 2 +- layout/mathml/nsMathMLmsqrtFrame.cpp | 2 +- layout/mathml/nsMathMLmsqrtFrame.h | 2 +- layout/mathml/nsMathMLmtableFrame.cpp | 12 ++--- layout/mathml/nsMathMLmtableFrame.h | 24 ++++----- layout/mathml/nsMathMLmunderoverFrame.cpp | 2 +- layout/mathml/nsMathMLmunderoverFrame.h | 2 +- layout/svg/SVGFEContainerFrame.cpp | 6 +-- layout/svg/SVGFEImageFrame.cpp | 6 +-- layout/svg/SVGFELeafFrame.cpp | 6 +-- layout/svg/SVGFEUnstyledLeafFrame.cpp | 6 +-- layout/svg/SVGTextFrame.cpp | 2 +- layout/svg/SVGTextFrame.h | 4 +- layout/svg/SVGViewFrame.cpp | 6 +-- layout/svg/nsSVGAFrame.cpp | 6 +-- layout/svg/nsSVGClipPathFrame.cpp | 2 +- layout/svg/nsSVGClipPathFrame.h | 4 +- layout/svg/nsSVGContainerFrame.cpp | 10 ++-- layout/svg/nsSVGContainerFrame.h | 10 ++-- layout/svg/nsSVGFilterFrame.cpp | 2 +- layout/svg/nsSVGFilterFrame.h | 2 +- layout/svg/nsSVGForeignObjectFrame.cpp | 4 +- layout/svg/nsSVGForeignObjectFrame.h | 6 +-- layout/svg/nsSVGGFrame.cpp | 2 +- layout/svg/nsSVGGFrame.h | 4 +- layout/svg/nsSVGGenericContainerFrame.cpp | 2 +- layout/svg/nsSVGGenericContainerFrame.h | 4 +- layout/svg/nsSVGGradientFrame.cpp | 6 +-- layout/svg/nsSVGGradientFrame.h | 12 ++--- layout/svg/nsSVGImageFrame.cpp | 6 +-- layout/svg/nsSVGInnerSVGFrame.cpp | 2 +- layout/svg/nsSVGInnerSVGFrame.h | 4 +- layout/svg/nsSVGMarkerFrame.cpp | 2 +- layout/svg/nsSVGMarkerFrame.h | 6 +-- layout/svg/nsSVGMaskFrame.cpp | 2 +- layout/svg/nsSVGMaskFrame.h | 4 +- layout/svg/nsSVGOuterSVGFrame.cpp | 6 +-- layout/svg/nsSVGOuterSVGFrame.h | 10 ++-- layout/svg/nsSVGPathGeometryFrame.cpp | 2 +- layout/svg/nsSVGPathGeometryFrame.h | 4 +- layout/svg/nsSVGPatternFrame.cpp | 2 +- layout/svg/nsSVGPatternFrame.h | 4 +- layout/svg/nsSVGStopFrame.cpp | 6 +-- layout/svg/nsSVGSwitchFrame.cpp | 2 +- layout/svg/nsSVGUseFrame.cpp | 6 +-- layout/tables/nsTableCellFrame.cpp | 14 +++--- layout/tables/nsTableCellFrame.h | 14 +++--- layout/tables/nsTableColFrame.cpp | 4 +- layout/tables/nsTableColFrame.h | 4 +- layout/tables/nsTableColGroupFrame.cpp | 12 ++--- layout/tables/nsTableColGroupFrame.h | 12 ++--- layout/tables/nsTableFrame.cpp | 12 ++--- layout/tables/nsTableFrame.h | 12 ++--- layout/tables/nsTableOuterFrame.cpp | 14 +++--- layout/tables/nsTableOuterFrame.h | 14 +++--- layout/tables/nsTableRowFrame.cpp | 10 ++-- layout/tables/nsTableRowFrame.h | 10 ++-- layout/tables/nsTableRowGroupFrame.cpp | 10 ++-- layout/tables/nsTableRowGroupFrame.h | 10 ++-- layout/xul/grid/nsGridRowGroupFrame.h | 2 +- layout/xul/grid/nsGridRowLeafFrame.cpp | 2 +- layout/xul/grid/nsGridRowLeafFrame.h | 4 +- layout/xul/nsBox.cpp | 14 +++--- layout/xul/nsBox.h | 14 +++--- layout/xul/nsBoxFrame.cpp | 22 ++++----- layout/xul/nsBoxFrame.h | 22 ++++----- layout/xul/nsButtonBoxFrame.cpp | 2 +- layout/xul/nsButtonBoxFrame.h | 4 +- layout/xul/nsDeckFrame.cpp | 2 +- layout/xul/nsDeckFrame.h | 4 +- layout/xul/nsDocElementBoxFrame.cpp | 4 +- layout/xul/nsGroupBoxFrame.cpp | 6 +-- layout/xul/nsImageBoxFrame.cpp | 4 +- layout/xul/nsImageBoxFrame.h | 4 +- layout/xul/nsLeafBoxFrame.cpp | 8 +-- layout/xul/nsLeafBoxFrame.h | 8 +-- layout/xul/nsListBoxBodyFrame.cpp | 2 +- layout/xul/nsListBoxBodyFrame.h | 2 +- layout/xul/nsMenuBarFrame.h | 2 +- layout/xul/nsMenuFrame.cpp | 14 +++--- layout/xul/nsMenuFrame.h | 16 +++--- layout/xul/nsMenuPopupFrame.cpp | 4 +- layout/xul/nsMenuPopupFrame.h | 6 +-- layout/xul/nsPopupSetFrame.cpp | 8 +-- layout/xul/nsPopupSetFrame.h | 10 ++-- layout/xul/nsProgressMeterFrame.cpp | 4 +- layout/xul/nsProgressMeterFrame.h | 4 +- layout/xul/nsResizerFrame.cpp | 2 +- layout/xul/nsResizerFrame.h | 2 +- layout/xul/nsRootBoxFrame.cpp | 24 ++++----- layout/xul/nsScrollBoxFrame.cpp | 8 +-- layout/xul/nsScrollbarButtonFrame.cpp | 2 +- layout/xul/nsScrollbarButtonFrame.h | 2 +- layout/xul/nsScrollbarFrame.cpp | 6 +-- layout/xul/nsScrollbarFrame.h | 8 +-- layout/xul/nsSliderFrame.cpp | 12 ++--- layout/xul/nsSliderFrame.h | 14 +++--- layout/xul/nsSplitterFrame.cpp | 6 +-- layout/xul/nsSplitterFrame.h | 8 +-- layout/xul/nsStackFrame.h | 2 +- layout/xul/nsTextBoxFrame.cpp | 4 +- layout/xul/nsTextBoxFrame.h | 4 +- layout/xul/nsTitleBarFrame.cpp | 2 +- layout/xul/nsTitleBarFrame.h | 2 +- layout/xul/nsXULLabelFrame.cpp | 4 +- layout/xul/nsXULLabelFrame.h | 4 +- layout/xul/tree/nsTreeBodyFrame.cpp | 4 +- layout/xul/tree/nsTreeBodyFrame.h | 4 +- layout/xul/tree/nsTreeColFrame.cpp | 2 +- layout/xul/tree/nsTreeColFrame.h | 2 +- 211 files changed, 797 insertions(+), 797 deletions(-) diff --git a/layout/forms/nsColorControlFrame.cpp b/layout/forms/nsColorControlFrame.cpp index 0c42cbf9c8a7..ff3fbd374111 100644 --- a/layout/forms/nsColorControlFrame.cpp +++ b/layout/forms/nsColorControlFrame.cpp @@ -49,7 +49,7 @@ nsColorControlFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsColorControlFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ColorControl"), aResult); @@ -105,7 +105,7 @@ nsColorControlFrame::UpdateColor() NS_LITERAL_STRING("background-color:") + color, true); } -NS_IMETHODIMP +nsresult nsColorControlFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/forms/nsColorControlFrame.h b/layout/forms/nsColorControlFrame.h index 060d705abf79..af81c4946364 100644 --- a/layout/forms/nsColorControlFrame.h +++ b/layout/forms/nsColorControlFrame.h @@ -31,7 +31,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif // nsIAnonymousContentCreator @@ -40,7 +40,7 @@ public: uint32_t aFilter) MOZ_OVERRIDE; // nsIFrame - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; virtual bool IsLeaf() const MOZ_OVERRIDE { return true; } diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 768e09795300..0a33d1829914 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -756,7 +756,7 @@ nsComboboxControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) return prefWidth; } -NS_IMETHODIMP +nsresult nsComboboxControlFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -884,7 +884,7 @@ nsComboboxControlFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsComboboxControlFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ComboboxControl"), aResult); @@ -1097,7 +1097,7 @@ nsComboboxControlFrame::OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) // End nsISelectControlFrame //---------------------------------------------------------------------- -NS_IMETHODIMP +nsresult nsComboboxControlFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -1226,7 +1226,7 @@ public: ~(nsIFrame::eReplacedContainsBlock)); } - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); @@ -1247,7 +1247,7 @@ nsComboboxDisplayFrame::GetType() const return nsGkAtoms::comboboxDisplayFrame; } -NS_IMETHODIMP +nsresult nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1368,7 +1368,7 @@ nsComboboxControlFrame::GetChildLists(nsTArray* aLists) const mPopupFrames.AppendIfNonempty(aLists, kSelectPopupList); } -NS_IMETHODIMP +nsresult nsComboboxControlFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { diff --git a/layout/forms/nsComboboxControlFrame.h b/layout/forms/nsComboboxControlFrame.h index 45621171c12d..bb942e8b9c14 100644 --- a/layout/forms/nsComboboxControlFrame.h +++ b/layout/forms/nsComboboxControlFrame.h @@ -69,12 +69,12 @@ public: virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aCX, + virtual nsresult Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus); @@ -100,10 +100,10 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual const nsFrameList& GetChildList(ChildListID aListID) const MOZ_OVERRIDE; virtual void GetChildLists(nsTArray* aLists) const MOZ_OVERRIDE; diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index 625b7a82201f..c2e0b3c0a010 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -44,7 +44,7 @@ nsFieldSetFrame::GetType() const } #ifdef DEBUG -NS_IMETHODIMP +nsresult nsFieldSetFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -338,7 +338,7 @@ nsFieldSetFrame::ComputeSize(nsRenderingContext *aRenderingContext, return result; } -NS_IMETHODIMP +nsresult nsFieldSetFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -556,7 +556,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext, return NS_OK; } -NS_IMETHODIMP +nsresult nsFieldSetFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -564,7 +564,7 @@ nsFieldSetFrame::AppendFrames(ChildListID aListID, return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP +nsresult nsFieldSetFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -573,7 +573,7 @@ nsFieldSetFrame::InsertFrames(ChildListID aListID, return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP +nsresult nsFieldSetFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { diff --git a/layout/forms/nsFieldSetFrame.h b/layout/forms/nsFieldSetFrame.h index 256b840d6bab..69794ddabdd2 100644 --- a/layout/forms/nsFieldSetFrame.h +++ b/layout/forms/nsFieldSetFrame.h @@ -32,7 +32,7 @@ public: */ virtual nsRect VisualBorderRectRelativeToSelf() const MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); @@ -44,12 +44,12 @@ public: void PaintBorderBackground(nsRenderingContext& aRenderingContext, nsPoint aPt, const nsRect& aDirtyRect, uint32_t aBGFlags); - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList); - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList); - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame); virtual nsIAtom* GetType() const; @@ -68,12 +68,12 @@ public: #endif #ifdef DEBUG - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList); #endif #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const { + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult); } #endif diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp index 1cc4d0950027..7c0d128b0354 100644 --- a/layout/forms/nsFileControlFrame.cpp +++ b/layout/forms/nsFileControlFrame.cpp @@ -259,7 +259,7 @@ nsFileControlFrame::SyncDisabledState() } } -NS_IMETHODIMP +nsresult nsFileControlFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -286,7 +286,7 @@ nsFileControlFrame::ContentStatesChanged(nsEventStates aStates) } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsFileControlFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("FileControl"), aResult); diff --git a/layout/forms/nsFileControlFrame.h b/layout/forms/nsFileControlFrame.h index 89bee12004a4..097066d0b6e5 100644 --- a/layout/forms/nsFileControlFrame.h +++ b/layout/forms/nsFileControlFrame.h @@ -43,10 +43,10 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; virtual void ContentStatesChanged(nsEventStates aStates); diff --git a/layout/forms/nsFormControlFrame.cpp b/layout/forms/nsFormControlFrame.cpp index 024c38a59d42..5659e6456bda 100644 --- a/layout/forms/nsFormControlFrame.cpp +++ b/layout/forms/nsFormControlFrame.cpp @@ -73,7 +73,7 @@ nsFormControlFrame::GetBaseline() const return mRect.height - GetUsedBorderAndPadding().bottom; } -NS_METHOD +nsresult nsFormControlFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -132,7 +132,7 @@ nsFormControlFrame::SetFocus(bool aOn, bool aRepaint) { } -NS_METHOD +nsresult nsFormControlFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/forms/nsFormControlFrame.h b/layout/forms/nsFormControlFrame.h index 3a5ca931d12e..51629250029e 100644 --- a/layout/forms/nsFormControlFrame.h +++ b/layout/forms/nsFormControlFrame.h @@ -41,7 +41,7 @@ public: * Respond to a gui event * @see nsIFrame::HandleEvent */ - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; @@ -51,7 +51,7 @@ public: * Respond to the request to resize and/or reflow * @see nsIFrame::Reflow */ - NS_IMETHOD Reflow(nsPresContext* aCX, + virtual nsresult Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; diff --git a/layout/forms/nsGfxButtonControlFrame.cpp b/layout/forms/nsGfxButtonControlFrame.cpp index 80a96169455f..a996d162d83e 100644 --- a/layout/forms/nsGfxButtonControlFrame.cpp +++ b/layout/forms/nsGfxButtonControlFrame.cpp @@ -43,7 +43,7 @@ nsGfxButtonControlFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsGfxButtonControlFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ButtonControl"), aResult); @@ -178,7 +178,7 @@ nsGfxButtonControlFrame::GetLabel(nsXPIDLString& aLabel) return NS_OK; } -NS_IMETHODIMP +nsresult nsGfxButtonControlFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -216,7 +216,7 @@ nsGfxButtonControlFrame::GetContentInsertionFrame() return this; } -NS_IMETHODIMP +nsresult nsGfxButtonControlFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/forms/nsGfxButtonControlFrame.h b/layout/forms/nsGfxButtonControlFrame.h index 3512ab5ed036..65d84954b821 100644 --- a/layout/forms/nsGfxButtonControlFrame.h +++ b/layout/forms/nsGfxButtonControlFrame.h @@ -26,14 +26,14 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif NS_DECL_QUERYFRAME @@ -44,7 +44,7 @@ public: uint32_t aFilter) MOZ_OVERRIDE; virtual nsIFrame* CreateFrameFor(nsIContent* aContent) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/forms/nsGfxCheckboxControlFrame.h b/layout/forms/nsGfxCheckboxControlFrame.h index 979cf10e6320..1b0b63c3ac08 100644 --- a/layout/forms/nsGfxCheckboxControlFrame.h +++ b/layout/forms/nsGfxCheckboxControlFrame.h @@ -17,7 +17,7 @@ public: virtual ~nsGfxCheckboxControlFrame(); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult); } #endif diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index 6e6ab4d2d272..b110e340abbb 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -76,7 +76,7 @@ nsHTMLButtonControlFrame::SetFocus(bool aOn, bool aRepaint) { } -NS_IMETHODIMP +nsresult nsHTMLButtonControlFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -162,7 +162,7 @@ nsHTMLButtonControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext) return result; } -NS_IMETHODIMP +nsresult nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -375,7 +375,7 @@ nsHTMLButtonControlFrame::SetAdditionalStyleContext(int32_t aIndex, mRenderer.SetStyleContext(aIndex, aStyleContext); } -NS_IMETHODIMP +nsresult nsHTMLButtonControlFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -383,7 +383,7 @@ nsHTMLButtonControlFrame::AppendFrames(ChildListID aListID, return NS_ERROR_UNEXPECTED; } -NS_IMETHODIMP +nsresult nsHTMLButtonControlFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -392,7 +392,7 @@ nsHTMLButtonControlFrame::InsertFrames(ChildListID aListID, return NS_ERROR_UNEXPECTED; } -NS_IMETHODIMP +nsresult nsHTMLButtonControlFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index 20630b271ede..bcdaaa4a8951 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -34,12 +34,12 @@ public: virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; @@ -51,14 +51,14 @@ public: virtual void SetAdditionalStyleContext(int32_t aIndex, nsStyleContext* aStyleContext) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; #ifdef ACCESSIBILITY @@ -68,7 +68,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("HTMLButtonControl"), aResult); } #endif diff --git a/layout/forms/nsImageControlFrame.cpp b/layout/forms/nsImageControlFrame.cpp index 27e24ca58ea5..ffabdb5a5f7a 100644 --- a/layout/forms/nsImageControlFrame.cpp +++ b/layout/forms/nsImageControlFrame.cpp @@ -38,12 +38,12 @@ public: NS_DECL_QUERYFRAME NS_DECL_FRAMEARENA_HELPERS - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus); @@ -54,12 +54,12 @@ public: #endif #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const { + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ImageControl"), aResult); } #endif - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor); // nsIFormContromFrame virtual void SetFocus(bool aOn, bool aRepaint); @@ -132,7 +132,7 @@ nsImageControlFrame::GetType() const return nsGkAtoms::imageControlFrame; } -NS_METHOD +nsresult nsImageControlFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -146,7 +146,7 @@ nsImageControlFrame::Reflow(nsPresContext* aPresContext, return nsImageControlFrameSuper::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus); } -NS_METHOD +nsresult nsImageControlFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -191,7 +191,7 @@ nsImageControlFrame::SetFocus(bool aOn, bool aRepaint) { } -NS_IMETHODIMP +nsresult nsImageControlFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { diff --git a/layout/forms/nsLegendFrame.cpp b/layout/forms/nsLegendFrame.cpp index a01ff3ecd057..b2d37eb95a75 100644 --- a/layout/forms/nsLegendFrame.cpp +++ b/layout/forms/nsLegendFrame.cpp @@ -47,7 +47,7 @@ NS_QUERYFRAME_HEAD(nsLegendFrame) NS_QUERYFRAME_ENTRY(nsLegendFrame) NS_QUERYFRAME_TAIL_INHERITING(nsBlockFrame) -NS_IMETHODIMP +nsresult nsLegendFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -84,7 +84,7 @@ int32_t nsLegendFrame::GetAlign() } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsLegendFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Legend"), aResult); diff --git a/layout/forms/nsLegendFrame.h b/layout/forms/nsLegendFrame.h index 747b1ef41d2e..4f24e0d43a8d 100644 --- a/layout/forms/nsLegendFrame.h +++ b/layout/forms/nsLegendFrame.h @@ -17,7 +17,7 @@ public: nsLegendFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {} - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -27,7 +27,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif int32_t GetAlign(); diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 23317b7acbc1..774b82a68fbb 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -328,7 +328,7 @@ nsListControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext) return result; } -NS_IMETHODIMP +nsresult nsListControlFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -848,7 +848,7 @@ nsListControlFrame::CaptureMouseEvents(bool aGrabMouseEvents) } //--------------------------------------------------------- -NS_IMETHODIMP +nsresult nsListControlFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -897,7 +897,7 @@ nsListControlFrame::HandleEvent(nsPresContext* aPresContext, //--------------------------------------------------------- -NS_IMETHODIMP +nsresult nsListControlFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -1436,7 +1436,7 @@ nsListControlFrame::AboutToRollup() } } -NS_IMETHODIMP +nsresult nsListControlFrame::DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) @@ -1472,7 +1472,7 @@ nsListControlFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsListControlFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ListControl"), aResult); diff --git a/layout/forms/nsListControlFrame.h b/layout/forms/nsListControlFrame.h index 383b209d8eca..daaf484a662e 100644 --- a/layout/forms/nsListControlFrame.h +++ b/layout/forms/nsListControlFrame.h @@ -58,17 +58,17 @@ public: NS_DECL_FRAMEARENA_HELPERS // nsIFrame - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aCX, + virtual nsresult Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -77,7 +77,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD DidReflow(nsPresContext* aPresContext, + virtual nsresult DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; @@ -102,7 +102,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif // nsIFormControlFrame diff --git a/layout/forms/nsMeterFrame.cpp b/layout/forms/nsMeterFrame.cpp index b7a3996fa60f..f5ae60dcfc97 100644 --- a/layout/forms/nsMeterFrame.cpp +++ b/layout/forms/nsMeterFrame.cpp @@ -91,7 +91,7 @@ NS_QUERYFRAME_HEAD(nsMeterFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) -NS_IMETHODIMP nsMeterFrame::Reflow(nsPresContext* aPresContext, +nsresult nsMeterFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) @@ -186,7 +186,7 @@ nsMeterFrame::ReflowBarFrame(nsIFrame* aBarFrame, xoffset, yoffset, 0); } -NS_IMETHODIMP +nsresult nsMeterFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/forms/nsMeterFrame.h b/layout/forms/nsMeterFrame.h index 8895e7455722..35c0181e3b74 100644 --- a/layout/forms/nsMeterFrame.h +++ b/layout/forms/nsMeterFrame.h @@ -27,13 +27,13 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aCX, + virtual nsresult Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("Meter"), aResult); } #endif @@ -45,7 +45,7 @@ public: virtual void AppendAnonymousContentTo(nsBaseContentList& aElements, uint32_t aFilter) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/forms/nsNumberControlFrame.cpp b/layout/forms/nsNumberControlFrame.cpp index c3637205f69e..4f7079dafe32 100644 --- a/layout/forms/nsNumberControlFrame.cpp +++ b/layout/forms/nsNumberControlFrame.cpp @@ -60,7 +60,7 @@ nsNumberControlFrame::DestroyFrom(nsIFrame* aDestructRoot) nsContainerFrame::DestroyFrom(aDestructRoot); } -NS_IMETHODIMP +nsresult nsNumberControlFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -167,7 +167,7 @@ nsNumberControlFrame::SyncDisabledState() } } -NS_IMETHODIMP +nsresult nsNumberControlFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/forms/nsNumberControlFrame.h b/layout/forms/nsNumberControlFrame.h index cc5f9d1c259d..a3a3d31d3002 100644 --- a/layout/forms/nsNumberControlFrame.h +++ b/layout/forms/nsNumberControlFrame.h @@ -50,12 +50,12 @@ public: virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE; #endif - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -65,7 +65,7 @@ public: uint32_t aFilter) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("NumberControl"), aResult); } #endif diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp index 74d04adb77d7..923d7acf3a20 100644 --- a/layout/forms/nsProgressFrame.cpp +++ b/layout/forms/nsProgressFrame.cpp @@ -96,7 +96,7 @@ nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, BuildDisplayListForInline(aBuilder, aDirtyRect, aLists); } -NS_IMETHODIMP nsProgressFrame::Reflow(nsPresContext* aPresContext, +nsresult nsProgressFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) @@ -200,7 +200,7 @@ nsProgressFrame::ReflowBarFrame(nsIFrame* aBarFrame, xoffset, yoffset, 0); } -NS_IMETHODIMP +nsresult nsProgressFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/forms/nsProgressFrame.h b/layout/forms/nsProgressFrame.h index ab283746c510..05531690a4ed 100644 --- a/layout/forms/nsProgressFrame.h +++ b/layout/forms/nsProgressFrame.h @@ -32,13 +32,13 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aCX, + virtual nsresult Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("Progress"), aResult); } #endif @@ -50,7 +50,7 @@ public: virtual void AppendAnonymousContentTo(nsBaseContentList& aElements, uint32_t aFilter) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp index 8b3327d44ee6..bfacac07b744 100644 --- a/layout/forms/nsRangeFrame.cpp +++ b/layout/forms/nsRangeFrame.cpp @@ -246,7 +246,7 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } } -NS_IMETHODIMP +nsresult nsRangeFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -669,7 +669,7 @@ nsRangeFrame::DoUpdateRangeProgressFrame(nsIFrame* aRangeProgressFrame, aRangeProgressFrame->SetRect(progRect); } -NS_IMETHODIMP +nsresult nsRangeFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/forms/nsRangeFrame.h b/layout/forms/nsRangeFrame.h index f355846599e0..a90fe072b22c 100644 --- a/layout/forms/nsRangeFrame.h +++ b/layout/forms/nsRangeFrame.h @@ -42,13 +42,13 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("Range"), aResult); } #endif @@ -64,7 +64,7 @@ public: virtual void AppendAnonymousContentTo(nsBaseContentList& aElements, uint32_t aFilter) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/forms/nsSelectsAreaFrame.cpp b/layout/forms/nsSelectsAreaFrame.cpp index d6d9192a36ad..c57c3f83c025 100644 --- a/layout/forms/nsSelectsAreaFrame.cpp +++ b/layout/forms/nsSelectsAreaFrame.cpp @@ -151,7 +151,7 @@ nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder, } } -NS_IMETHODIMP +nsresult nsSelectsAreaFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/forms/nsSelectsAreaFrame.h b/layout/forms/nsSelectsAreaFrame.h index c89e1ba728f3..cf570c502f4d 100644 --- a/layout/forms/nsSelectsAreaFrame.h +++ b/layout/forms/nsSelectsAreaFrame.h @@ -23,7 +23,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists); - NS_IMETHOD Reflow(nsPresContext* aCX, + virtual nsresult Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index 8576cb1a01f6..2da0606601fe 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -462,7 +462,7 @@ nsTextControlFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, return autoSize; } -NS_IMETHODIMP +nsresult nsTextControlFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1042,7 +1042,7 @@ nsTextControlFrame::GetSelectionRange(int32_t* aSelectionStart, /////END INTERFACE IMPLEMENTATIONS ////NSIFRAME -NS_IMETHODIMP +nsresult nsTextControlFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -1187,7 +1187,7 @@ nsTextControlFrame::GetMaxLength(int32_t* aSize) // END IMPLEMENTING NS_IFORMCONTROLFRAME -NS_IMETHODIMP +nsresult nsTextControlFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -1370,7 +1370,7 @@ nsTextControlFrame::RestoreState(nsPresState* aState) return NS_OK; } -NS_IMETHODIMP +nsresult nsTextControlFrame::PeekOffset(nsPeekOffsetStruct *aPos) { return NS_ERROR_FAILURE; diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h index d9fcfd77b8e8..d930968049a6 100644 --- a/layout/forms/nsTextControlFrame.h +++ b/layout/forms/nsTextControlFrame.h @@ -50,7 +50,7 @@ public: nsSize aMargin, nsSize aBorder, nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -65,7 +65,7 @@ public: #endif #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { aResult.AssignLiteral("nsTextControlFrame"); return NS_OK; @@ -87,7 +87,7 @@ public: // Utility methods to set current widget state - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, @@ -138,13 +138,13 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; /** handler for attribute changes to mContent */ - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; nsresult GetText(nsString& aText); - NS_IMETHOD PeekOffset(nsPeekOffsetStruct *aPos) MOZ_OVERRIDE; + virtual nsresult PeekOffset(nsPeekOffsetStruct *aPos) MOZ_OVERRIDE; NS_DECL_QUERYFRAME diff --git a/layout/generic/nsBRFrame.cpp b/layout/generic/nsBRFrame.cpp index 2f9bb6323dd9..f1255aadba89 100644 --- a/layout/generic/nsBRFrame.cpp +++ b/layout/generic/nsBRFrame.cpp @@ -34,7 +34,7 @@ public: virtual bool PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState); - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); @@ -76,7 +76,7 @@ BRFrame::~BRFrame() { } -NS_IMETHODIMP +nsresult BRFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 93da7c6f559b..c2c57ad904ec 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -384,7 +384,7 @@ nsBlockFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const fprintf_stderr(out, "%s>\n", aPrefix); } -NS_IMETHODIMP +nsresult nsBlockFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Block"), aResult); @@ -392,7 +392,7 @@ nsBlockFrame::GetFrameName(nsAString& aResult) const #endif #ifdef DEBUG -NS_IMETHODIMP_(nsFrameState) +nsFrameState nsBlockFrame::GetDebugStateBits() const { // We don't want to include our cursor flag in the bits the @@ -933,7 +933,7 @@ CalculateContainingBlockSizeForAbsolutes(const nsHTMLReflowState& aReflowState, return cbSize; } -NS_IMETHODIMP +nsresult nsBlockFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -2664,7 +2664,7 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState, } } -NS_IMETHODIMP +nsresult nsBlockFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -4678,7 +4678,7 @@ nsBlockFrame::RemovePushedFloats() ////////////////////////////////////////////////////////////////////// // Frame list manipulation routines -NS_IMETHODIMP +nsresult nsBlockFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -4723,7 +4723,7 @@ nsBlockFrame::AppendFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsBlockFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -5009,7 +5009,7 @@ static bool BlockHasAnyFloats(nsIFrame* aFrame) return false; } -NS_IMETHODIMP +nsresult nsBlockFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -6469,7 +6469,7 @@ nsBlockFrame::Init(nsIContent* aContent, } } -NS_IMETHODIMP +nsresult nsBlockFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index 3983a77e3c8f..a84a9d0fd834 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -108,14 +108,14 @@ public: virtual void Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual const nsFrameList& GetChildList(ChildListID aListID) const MOZ_OVERRIDE; virtual void GetChildLists(nsTArray* aLists) const MOZ_OVERRIDE; @@ -140,11 +140,11 @@ public: #ifdef DEBUG_FRAME_DUMP void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE; - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif #ifdef DEBUG - NS_IMETHOD_(nsFrameState) GetDebugStateBits() const MOZ_OVERRIDE; + virtual nsFrameState GetDebugStateBits() const MOZ_OVERRIDE; #endif #ifdef ACCESSIBILITY @@ -261,12 +261,12 @@ public: nsHTMLReflowMetrics& aMetrics, nscoord aConsumed); - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index 26465c4d8c06..fb76fb37c4ad 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -68,7 +68,7 @@ nsBulletFrame::DestroyFrom(nsIFrame* aDestructRoot) } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsBulletFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Bullet"), aResult); @@ -1651,7 +1651,7 @@ nsBulletFrame::GetDesiredSize(nsPresContext* aCX, } } -NS_IMETHODIMP +nsresult nsBulletFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsBulletFrame.h b/layout/generic/nsBulletFrame.h index 57ed99da4b83..7e146a289987 100644 --- a/layout/generic/nsBulletFrame.h +++ b/layout/generic/nsBulletFrame.h @@ -61,11 +61,11 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif // nsIHTMLReflow - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index 4eebfda0a70c..46d109444525 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -82,7 +82,7 @@ nsCanvasFrame::SetHasFocus(bool aHasFocus) return NS_OK; } -NS_IMETHODIMP +nsresult nsCanvasFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -92,7 +92,7 @@ nsCanvasFrame::SetInitialChildList(ChildListID aListID, return nsContainerFrame::SetInitialChildList(aListID, aChildList); } -NS_IMETHODIMP +nsresult nsCanvasFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -125,7 +125,7 @@ nsCanvasFrame::AppendFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsCanvasFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -139,7 +139,7 @@ nsCanvasFrame::InsertFrames(ChildListID aListID, return AppendFrames(aListID, aFrameList); } -NS_IMETHODIMP +nsresult nsCanvasFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -450,7 +450,7 @@ nsCanvasFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) return result; } -NS_IMETHODIMP +nsresult nsCanvasFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -591,7 +591,7 @@ nsCanvasFrame::GetType() const return nsGkAtoms::canvasFrame; } -NS_IMETHODIMP +nsresult nsCanvasFrame::GetContentForEvent(WidgetEvent* aEvent, nsIContent** aContent) { @@ -610,7 +610,7 @@ nsCanvasFrame::GetContentForEvent(WidgetEvent* aEvent, } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsCanvasFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Canvas"), aResult); diff --git a/layout/generic/nsCanvasFrame.h b/layout/generic/nsCanvasFrame.h index 4c7f1b86e983..a34e63cc722f 100644 --- a/layout/generic/nsCanvasFrame.h +++ b/layout/generic/nsCanvasFrame.h @@ -40,19 +40,19 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -98,9 +98,9 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif - NS_IMETHOD GetContentForEvent(mozilla::WidgetEvent* aEvent, + virtual nsresult GetContentForEvent(mozilla::WidgetEvent* aEvent, nsIContent** aContent) MOZ_OVERRIDE; nsRect CanvasArea() const; diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index 5084cf51c6e8..24047ef2271f 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -120,7 +120,7 @@ nsColumnSetFrame::PaintColumnRule(nsRenderingContext* aCtx, } } -NS_IMETHODIMP +nsresult nsColumnSetFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -949,7 +949,7 @@ nsColumnSetFrame::FindBestBalanceHeight(const nsHTMLReflowState& aReflowState, aRunWasFeasible = feasible; } -NS_IMETHODIMP +nsresult nsColumnSetFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1041,7 +1041,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } } -NS_IMETHODIMP +nsresult nsColumnSetFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -1053,7 +1053,7 @@ nsColumnSetFrame::AppendFrames(ChildListID aListID, return NS_ERROR_INVALID_ARG; } -NS_IMETHODIMP +nsresult nsColumnSetFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -1066,7 +1066,7 @@ nsColumnSetFrame::InsertFrames(ChildListID aListID, return NS_ERROR_INVALID_ARG; } -NS_IMETHODIMP +nsresult nsColumnSetFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { diff --git a/layout/generic/nsColumnSetFrame.h b/layout/generic/nsColumnSetFrame.h index 96aacf5cd0d5..82dbb9924b3f 100644 --- a/layout/generic/nsColumnSetFrame.h +++ b/layout/generic/nsColumnSetFrame.h @@ -14,20 +14,20 @@ public: nsColumnSetFrame(nsStyleContext* aContext); - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; @@ -71,7 +71,7 @@ public: const nsPoint& aPt); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("ColumnSet"), aResult); } #endif diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index c8fa362f50c5..de9d759f19b2 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -67,7 +67,7 @@ nsContainerFrame::Init(nsIContent* aContent, } } -NS_IMETHODIMP +nsresult nsContainerFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -91,7 +91,7 @@ nsContainerFrame::SetInitialChildList(ChildListID aListID, return result; } -NS_IMETHODIMP +nsresult nsContainerFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -120,7 +120,7 @@ nsContainerFrame::AppendFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsContainerFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -153,7 +153,7 @@ nsContainerFrame::InsertFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsContainerFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index da46262458d9..83ac45e17fea 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -55,14 +55,14 @@ public: virtual void Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual const nsFrameList& GetChildList(ChildListID aList) const MOZ_OVERRIDE; diff --git a/layout/generic/nsFirstLetterFrame.cpp b/layout/generic/nsFirstLetterFrame.cpp index a73114f3c5ba..d3dcda12b9be 100644 --- a/layout/generic/nsFirstLetterFrame.cpp +++ b/layout/generic/nsFirstLetterFrame.cpp @@ -34,7 +34,7 @@ NS_QUERYFRAME_HEAD(nsFirstLetterFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsFirstLetterFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Letter"), aResult); @@ -76,7 +76,7 @@ nsFirstLetterFrame::Init(nsIContent* aContent, nsContainerFrame::Init(aContent, aParent, aPrevInFlow); } -NS_IMETHODIMP +nsresult nsFirstLetterFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -91,7 +91,7 @@ nsFirstLetterFrame::SetInitialChildList(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsFirstLetterFrame::GetChildFrameContainingOffset(int32_t inContentOffset, bool inHint, int32_t* outFrameContentOffset, @@ -153,7 +153,7 @@ nsFirstLetterFrame::ComputeSize(nsRenderingContext *aRenderingContext, aCBSize, aAvailableWidth, aMargin, aBorder, aPadding, aFlags); } -NS_IMETHODIMP +nsresult nsFirstLetterFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsFirstLetterFrame.h b/layout/generic/nsFirstLetterFrame.h index cb48ea579755..70bc2d3fca79 100644 --- a/layout/generic/nsFirstLetterFrame.h +++ b/layout/generic/nsFirstLetterFrame.h @@ -26,10 +26,10 @@ public: virtual void Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual nsIAtom* GetType() const MOZ_OVERRIDE; @@ -53,7 +53,7 @@ public: nsSize aCBSize, nscoord aAvailableWidth, nsSize aMargin, nsSize aBorder, nsSize aPadding, uint32_t aFlags) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -63,7 +63,7 @@ public: virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE; //override of nsFrame method - NS_IMETHOD GetChildFrameContainingOffset(int32_t inContentOffset, + virtual nsresult GetChildFrameContainingOffset(int32_t inContentOffset, bool inHint, int32_t* outFrameContentOffset, nsIFrame **outChildFrame) MOZ_OVERRIDE; diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index 24ed03a49c79..d6c5ef7506e7 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -1375,7 +1375,7 @@ nsFlexContainerFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsFlexContainerFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("FlexContainer"), aResult); @@ -2694,7 +2694,7 @@ FlexLine::PositionItemsInCrossAxis(nscoord aLineStartPosition, } } -NS_IMETHODIMP +nsresult nsFlexContainerFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsFlexContainerFrame.h b/layout/generic/nsFlexContainerFrame.h index 43fc33947d2d..db16ca5f8f23 100644 --- a/layout/generic/nsFlexContainerFrame.h +++ b/layout/generic/nsFlexContainerFrame.h @@ -40,7 +40,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -52,7 +52,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif // Flexbox-specific public methods bool IsHorizontal(); diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 5461cec87b39..a06eb503b494 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -539,7 +539,7 @@ nsFrame::Init(nsIContent* aContent, InitBoxMetrics(false); } -NS_IMETHODIMP nsFrame::SetInitialChildList(ChildListID aListID, +nsresult nsFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { // XXX This shouldn't be getting called at all, but currently is for backwards @@ -553,7 +553,7 @@ NS_IMETHODIMP nsFrame::SetInitialChildList(ChildListID aListID, #endif } -NS_IMETHODIMP +nsresult nsFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -561,7 +561,7 @@ nsFrame::AppendFrames(ChildListID aListID, return NS_ERROR_UNEXPECTED; } -NS_IMETHODIMP +nsresult nsFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -570,7 +570,7 @@ nsFrame::InsertFrames(ChildListID aListID, return NS_ERROR_UNEXPECTED; } -NS_IMETHODIMP +nsresult nsFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -679,7 +679,7 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot) shell->FreeFrame(id, this); } -NS_IMETHODIMP +nsresult nsFrame::GetOffsets(int32_t &aStart, int32_t &aEnd) const { aStart = 0; @@ -2317,7 +2317,7 @@ nsIFrame::MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder, } } -NS_IMETHODIMP +nsresult nsFrame::GetContentForEvent(WidgetEvent* aEvent, nsIContent** aContent) { @@ -2340,7 +2340,7 @@ nsFrame::FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent) } } -NS_IMETHODIMP +nsresult nsFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -2491,7 +2491,7 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection* aFrameSelection, return NS_OK; } -NS_IMETHODIMP +nsresult nsFrame::IsSelectable(bool* aSelectable, uint8_t* aSelectStyle) const { if (!aSelectable) //it's ok if aSelectStyle is null @@ -3638,7 +3638,7 @@ nsIFrame::AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext loader->AssociateRequestToFrame(req, this); } -NS_IMETHODIMP +nsresult nsFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { @@ -4137,7 +4137,7 @@ nsFrame::ShrinkWidthToFit(nsRenderingContext *aRenderingContext, return result; } -NS_IMETHODIMP +nsresult nsFrame::WillReflow(nsPresContext* aPresContext) { #ifdef DEBUG_dbaron_off @@ -4152,7 +4152,7 @@ nsFrame::WillReflow(nsPresContext* aPresContext) return NS_OK; } -NS_IMETHODIMP +nsresult nsFrame::DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) @@ -4234,7 +4234,7 @@ nsFrame::CanContinueTextRun() const return false; } -NS_IMETHODIMP +nsresult nsFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -4248,14 +4248,14 @@ nsFrame::Reflow(nsPresContext* aPresContext, return NS_OK; } -NS_IMETHODIMP +nsresult nsFrame::CharacterDataChanged(CharacterDataChangeInfo* aInfo) { NS_NOTREACHED("should only be called for text frames"); return NS_OK; } -NS_IMETHODIMP +nsresult nsFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -5354,7 +5354,7 @@ nsIFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const fprintf_stderr(out, "%s\n", str.get()); } -NS_IMETHODIMP +nsresult nsFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Frame"), aResult); @@ -5409,7 +5409,7 @@ nsIFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, const char* aPre #endif #ifdef DEBUG -NS_IMETHODIMP_(nsFrameState) +nsFrameState nsFrame::GetDebugStateBits() const { // We'll ignore these flags for the purposes of comparing frame state: @@ -5532,7 +5532,7 @@ nsFrame::IsSelfEmpty() return false; } -NS_IMETHODIMP +nsresult nsFrame::GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) { if (!aPresContext || !aSelCon) @@ -5574,7 +5574,7 @@ nsIFrame::GetConstFrameSelection() const } #ifdef DEBUG -NS_IMETHODIMP +nsresult nsFrame::DumpRegressionData(nsPresContext* aPresContext, FILE* out, int32_t aIndent) { IndentBy(out, aIndent); @@ -5650,7 +5650,7 @@ nsIFrame::IsFrameSelected() const GetContent()->GetChildCount()); } -NS_IMETHODIMP +nsresult nsFrame::GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) { NS_PRECONDITION(outPoint != nullptr, "Null parameter"); @@ -5673,7 +5673,7 @@ nsFrame::GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) return NS_OK; } -NS_IMETHODIMP +nsresult nsFrame::GetChildFrameContainingOffset(int32_t inContentOffset, bool inHint, int32_t* outFrameContentOffset, nsIFrame **outChildFrame) { NS_PRECONDITION(outChildFrame && outFrameContentOffset, "Null parameter"); @@ -6108,7 +6108,7 @@ static bool IsMovingInFrameDirection(nsIFrame* frame, nsDirection aDirection, bo return aDirection == (isReverseDirection ? eDirPrevious : eDirNext); } -NS_IMETHODIMP +nsresult nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos) { if (!aPos) @@ -6528,7 +6528,7 @@ nsFrame::BreakWordBetweenPunctuation(const PeekWordState* aState, return aState->mSeenNonPunctuationSinceWhitespace; } -NS_IMETHODIMP +nsresult nsFrame::CheckVisibility(nsPresContext* , int32_t , int32_t , bool , bool *, bool *) { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index 0a1c2a109ecb..6a63298fedda 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -144,14 +144,14 @@ public: virtual void Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* asPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; virtual nsStyleContext* GetAdditionalStyleContext(int32_t aIndex) const MOZ_OVERRIDE; @@ -162,18 +162,18 @@ public: virtual const nsFrameList& GetChildList(ChildListID aListID) const MOZ_OVERRIDE; virtual void GetChildLists(nsTArray* aLists) const MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; - NS_IMETHOD GetContentForEvent(mozilla::WidgetEvent* aEvent, + virtual nsresult GetContentForEvent(mozilla::WidgetEvent* aEvent, nsIContent** aContent) MOZ_OVERRIDE; - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) MOZ_OVERRIDE; - NS_IMETHOD GetPointFromOffset(int32_t inOffset, + virtual nsresult GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) MOZ_OVERRIDE; - NS_IMETHOD GetChildFrameContainingOffset(int32_t inContentOffset, + virtual nsresult GetChildFrameContainingOffset(int32_t inContentOffset, bool inHint, int32_t* outFrameContentOffset, nsIFrame* *outChildFrame) MOZ_OVERRIDE; @@ -185,8 +185,8 @@ public: int8_t aOutSideLimit ); - NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE; + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; virtual nsSplittableType GetSplittableType() const MOZ_OVERRIDE; @@ -200,9 +200,9 @@ public: virtual void SetNextInFlow(nsIFrame*) MOZ_OVERRIDE; virtual nsIAtom* GetType() const MOZ_OVERRIDE; - NS_IMETHOD IsSelectable(bool* aIsSelectable, uint8_t* aSelectStyle) const MOZ_OVERRIDE; + virtual nsresult IsSelectable(bool* aIsSelectable, uint8_t* aSelectStyle) const MOZ_OVERRIDE; - NS_IMETHOD GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) MOZ_OVERRIDE; + virtual nsresult GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) MOZ_OVERRIDE; virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset, @@ -222,9 +222,9 @@ public: bool aPunctAfter, bool aWhitespaceAfter, bool aIsKeyboardSelect); - NS_IMETHOD CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval) MOZ_OVERRIDE; + virtual nsresult CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval) MOZ_OVERRIDE; - NS_IMETHOD GetOffsets(int32_t &aStart, int32_t &aEnd) const MOZ_OVERRIDE; + virtual nsresult GetOffsets(int32_t &aStart, int32_t &aEnd) const MOZ_OVERRIDE; virtual void ChildIsDirty(nsIFrame* aChild) MOZ_OVERRIDE; #ifdef ACCESSIBILITY @@ -295,7 +295,7 @@ public: nscoord ShrinkWidthToFit(nsRenderingContext *aRenderingContext, nscoord aWidthInCB); - NS_IMETHOD WillReflow(nsPresContext* aPresContext) MOZ_OVERRIDE; + virtual nsresult WillReflow(nsPresContext* aPresContext) MOZ_OVERRIDE; /** * Calculates the size of this frame after reflowing (calling Reflow on, and * updating the size and position of) its children, as necessary. The @@ -318,11 +318,11 @@ public: * Note: if it's only the overflow rect(s) of a frame that need to be * updated, then UpdateOverflow should be called instead of Reflow. */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD DidReflow(nsPresContext* aPresContext, + virtual nsresult DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) MOZ_OVERRIDE; @@ -652,7 +652,7 @@ public: * Get a printable from of the name of the frame type. * XXX This should be eliminated and we use GetType() instead... */ - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const; // Helper function to return the index in parent of the frame's content // object. Returns -1 on error or if the frame doesn't have a content object @@ -665,7 +665,7 @@ public: * Return the state bits that are relevant to regression tests (that * is, those bits which indicate a real difference when they differ */ - NS_IMETHOD_(nsFrameState) GetDebugStateBits() const MOZ_OVERRIDE; + virtual nsFrameState GetDebugStateBits() const MOZ_OVERRIDE; /** * Called to dump out regression data that describes the layout * of the frame and its children, and so on. The format of the @@ -674,7 +674,7 @@ public: * the caveat that some base types are defined. * For more information, see XXX. */ - NS_IMETHOD DumpRegressionData(nsPresContext* aPresContext, + virtual nsresult DumpRegressionData(nsPresContext* aPresContext, FILE* out, int32_t aIndent) MOZ_OVERRIDE; /** diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index c3a1cd06654b..21d252b064b6 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -83,21 +83,21 @@ public: NS_DECL_FRAMEARENA_HELPERS #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const; + virtual nsresult GetFrameName(nsAString& aResult) const; #endif - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus); - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor); virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); @@ -137,7 +137,7 @@ public: NS_DECL_FRAMEARENA_HELPERS #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("FramesetBlank"), aResult); } @@ -147,7 +147,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); @@ -392,7 +392,7 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent, mNonBorderChildCount = mChildCount; } -NS_IMETHODIMP +nsresult nsHTMLFramesetFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -678,7 +678,7 @@ void nsHTMLFramesetFrame::GetSizeOfChild(nsIFrame* aChild, } -NS_METHOD nsHTMLFramesetFrame::HandleEvent(nsPresContext* aPresContext, +nsresult nsHTMLFramesetFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) { @@ -702,7 +702,7 @@ NS_METHOD nsHTMLFramesetFrame::HandleEvent(nsPresContext* aPresContext, return NS_OK; } -NS_IMETHODIMP +nsresult nsHTMLFramesetFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { @@ -839,7 +839,7 @@ nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent) return GetBorderColor(); } -NS_IMETHODIMP +nsresult nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1149,7 +1149,7 @@ nsHTMLFramesetFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsHTMLFramesetFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Frameset"), aResult); @@ -1436,7 +1436,7 @@ void nsHTMLFramesetBorderFrame::SetColor(nscolor aColor) } -NS_IMETHODIMP +nsresult nsHTMLFramesetBorderFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1573,7 +1573,7 @@ void nsHTMLFramesetBorderFrame::PaintBorder(nsRenderingContext& aRenderingContex } -NS_IMETHODIMP +nsresult nsHTMLFramesetBorderFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -1597,7 +1597,7 @@ nsHTMLFramesetBorderFrame::HandleEvent(nsPresContext* aPresContext, return NS_OK; } -NS_IMETHODIMP +nsresult nsHTMLFramesetBorderFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { @@ -1610,7 +1610,7 @@ nsHTMLFramesetBorderFrame::GetCursor(const nsPoint& aPoint, } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP nsHTMLFramesetBorderFrame::GetFrameName(nsAString& aResult) const +nsresult nsHTMLFramesetBorderFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("FramesetBorder"), aResult); } @@ -1643,7 +1643,7 @@ nscoord nsHTMLFramesetBlankFrame::GetIntrinsicHeight() return 0; } -NS_IMETHODIMP +nsresult nsHTMLFramesetBlankFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsFrameSetFrame.h b/layout/generic/nsFrameSetFrame.h index b3593e6839ab..a1ba0247c464 100644 --- a/layout/generic/nsFrameSetFrame.h +++ b/layout/generic/nsFrameSetFrame.h @@ -76,7 +76,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; static bool gDragInProgress; @@ -87,25 +87,25 @@ public: nsSize& aSize, nsIntPoint& aCellIndex); - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) MOZ_OVERRIDE; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual bool IsLeaf() const MOZ_OVERRIDE; diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 4f584c2e4c68..3a4a09a1cb1f 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -114,7 +114,7 @@ nsHTMLScrollFrame::DestroyFrom(nsIFrame* aDestructRoot) nsContainerFrame::DestroyFrom(aDestructRoot); } -NS_IMETHODIMP +nsresult nsHTMLScrollFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -124,7 +124,7 @@ nsHTMLScrollFrame::SetInitialChildList(ChildListID aListID, } -NS_IMETHODIMP +nsresult nsHTMLScrollFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -134,7 +134,7 @@ nsHTMLScrollFrame::AppendFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsHTMLScrollFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -147,7 +147,7 @@ nsHTMLScrollFrame::InsertFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsHTMLScrollFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -700,7 +700,7 @@ nsHTMLScrollFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) return NSCoordSaturatingAdd(result, GetIntrinsicVScrollbarWidth(aRenderingContext)); } -NS_IMETHODIMP +nsresult nsHTMLScrollFrame::GetPadding(nsMargin& aMargin) { // Our padding hangs out on the inside of the scrollframe, but XUL doesn't @@ -738,7 +738,7 @@ GetBrowserRoot(nsIContent* aContent) return nullptr; } -NS_IMETHODIMP +nsresult nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -867,7 +867,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext, //////////////////////////////////////////////////////////////////////////////// #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsHTMLScrollFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("HTMLScroll"), aResult); @@ -1034,7 +1034,7 @@ nsXULScrollFrame::DestroyFrom(nsIFrame* aDestructRoot) nsBoxFrame::DestroyFrom(aDestructRoot); } -NS_IMETHODIMP +nsresult nsXULScrollFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -1044,7 +1044,7 @@ nsXULScrollFrame::SetInitialChildList(ChildListID aListID, } -NS_IMETHODIMP +nsresult nsXULScrollFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -1053,7 +1053,7 @@ nsXULScrollFrame::AppendFrames(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsXULScrollFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -1063,7 +1063,7 @@ nsXULScrollFrame::InsertFrames(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsXULScrollFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -1078,7 +1078,7 @@ nsXULScrollFrame::GetSplittableType() const return NS_FRAME_NOT_SPLITTABLE; } -NS_IMETHODIMP +nsresult nsXULScrollFrame::GetPadding(nsMargin& aMargin) { aMargin.SizeTo(0,0,0,0); @@ -1191,7 +1191,7 @@ nsXULScrollFrame::GetMaxSize(nsBoxLayoutState& aState) } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsXULScrollFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("XULScroll"), aResult); diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index cf84caa49e95..b96a25dd5605 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -445,7 +445,7 @@ public: // Called to set the child frames. We typically have three: the scroll area, // the vertical scrollbar, and the horizontal scrollbar. - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, @@ -476,10 +476,10 @@ public: virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD GetPadding(nsMargin& aPadding) MOZ_OVERRIDE; + virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE; virtual bool IsCollapsed() MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -490,16 +490,16 @@ public: // Because there can be only one child frame, these two function return // NS_ERROR_FAILURE - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsIScrollableFrame* GetScrollTargetFrame() MOZ_OVERRIDE { @@ -682,7 +682,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif #ifdef ACCESSIBILITY @@ -742,7 +742,7 @@ public: // Called to set the child frames. We typically have three: the scroll area, // the vertical scrollbar, and the horizontal scrollbar. - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, @@ -762,15 +762,15 @@ public: // Because there can be only one child frame, these two function return // NS_ERROR_FAILURE - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsIScrollableFrame* GetScrollTargetFrame() MOZ_OVERRIDE { @@ -802,7 +802,7 @@ public: virtual nscoord GetBoxAscent(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; - NS_IMETHOD GetPadding(nsMargin& aPadding) MOZ_OVERRIDE; + virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE; virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE { return mHelper.GetBorderRadii(aRadii); @@ -994,7 +994,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif protected: diff --git a/layout/generic/nsHTMLCanvasFrame.cpp b/layout/generic/nsHTMLCanvasFrame.cpp index 3731479df9b1..ab0e3eb3f8b2 100644 --- a/layout/generic/nsHTMLCanvasFrame.cpp +++ b/layout/generic/nsHTMLCanvasFrame.cpp @@ -170,7 +170,7 @@ nsHTMLCanvasFrame::ComputeSize(nsRenderingContext *aRenderingContext, aMargin, aBorder, aPadding); } -NS_IMETHODIMP +nsresult nsHTMLCanvasFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -336,7 +336,7 @@ nsHTMLCanvasFrame::AccessibleType() #endif #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsHTMLCanvasFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("HTMLCanvas"), aResult); diff --git a/layout/generic/nsHTMLCanvasFrame.h b/layout/generic/nsHTMLCanvasFrame.h index d2593f591e10..bcc90ffb48d0 100644 --- a/layout/generic/nsHTMLCanvasFrame.h +++ b/layout/generic/nsHTMLCanvasFrame.h @@ -63,7 +63,7 @@ public: nsSize aMargin, nsSize aBorder, nsSize aPadding, uint32_t aFlags) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -82,7 +82,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif // Inserted child content gets its frames parented by our child block diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 5d1ddb6d04b5..e5a047be0dba 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -483,7 +483,7 @@ public: * child list. * @see #Init() */ - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) = 0; /** @@ -501,7 +501,7 @@ public: * aFrameList in the process of moving the frames over to its own * child list. */ - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) = 0; /** @@ -520,7 +520,7 @@ public: * aFrameList in the process of moving the frames over to its own * child list. */ - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) = 0; @@ -539,7 +539,7 @@ public: * NS_ERROR_UNEXPECTED if the frame is an atomic frame, * NS_OK otherwise */ - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) = 0; /** @@ -572,7 +572,7 @@ public: * Get the offsets of the frame. most will be 0,0 * */ - NS_IMETHOD GetOffsets(int32_t &start, int32_t &end) const = 0; + virtual nsresult GetOffsets(int32_t &start, int32_t &end) const = 0; /** * Reset the offsets when splitting frames during Bidi reordering @@ -1206,11 +1206,11 @@ public: * @see WidgetGUIEvent * @see nsEventStatus */ - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) = 0; - NS_IMETHOD GetContentForEvent(mozilla::WidgetEvent* aEvent, + virtual nsresult GetContentForEvent(mozilla::WidgetEvent* aEvent, nsIContent** aContent) = 0; // This structure keeps track of the content node and offsets associated with @@ -1278,7 +1278,7 @@ public: /** * Get the cursor for a given frame. */ - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, Cursor& aCursor) = 0; /** @@ -1286,7 +1286,7 @@ public: * the content. This point should be on the baseline of text with * the correct horizontal offset */ - NS_IMETHOD GetPointFromOffset(int32_t inOffset, + virtual nsresult GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) = 0; /** @@ -1297,7 +1297,7 @@ public: * to stick to the end of the first found frame or the beginning of the * next in case the offset falls on a boundary. */ - NS_IMETHOD GetChildFrameContainingOffset(int32_t inContentOffset, + virtual nsresult GetChildFrameContainingOffset(int32_t inContentOffset, bool inHint,//false stick left int32_t* outFrameContentOffset, nsIFrame* *outChildFrame) = 0; @@ -1328,7 +1328,7 @@ public: * This call is invoked on the primary frame for a character data content * node, when it is changed in the content tree. */ - NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo) = 0; + virtual nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) = 0; /** * This call is invoked when the value of a content objects's attribute @@ -1341,7 +1341,7 @@ public: * @param aModType Whether or not the attribute was added, changed, or removed. * The constants are defined in nsIDOMMutationEvent.h. */ - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) = 0; @@ -1698,7 +1698,7 @@ public: * XXX Is this really the semantics we want? Because we have the NS_FRAME_IN_REFLOW * bit we can ensure we don't call it more than once... */ - NS_IMETHOD WillReflow(nsPresContext* aPresContext) = 0; + virtual nsresult WillReflow(nsPresContext* aPresContext) = 0; /** * The frame is given an available size and asked for its desired @@ -1743,7 +1743,7 @@ public: * @param aStatus a return value indicating whether the frame is complete * and whether the next-in-flow is dirty and needs to be reflowed */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aReflowMetrics, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) = 0; @@ -1763,7 +1763,7 @@ public: * XXX Don't we want the semantics to dictate that we only call this once for * a given reflow? */ - NS_IMETHOD DidReflow(nsPresContext* aPresContext, + virtual nsresult DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) = 0; @@ -2297,14 +2297,14 @@ public: * @param aSelectStyle out param. Returns the type of selection style found * (using values defined in nsStyleConsts.h). */ - NS_IMETHOD IsSelectable(bool* aIsSelectable, uint8_t* aSelectStyle) const = 0; + virtual nsresult IsSelectable(bool* aIsSelectable, uint8_t* aSelectStyle) const = 0; /** * Called to retrieve the SelectionController associated with the frame. * @param aSelCon will contain the selection controller associated with * the frame. */ - NS_IMETHOD GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) = 0; + virtual nsresult GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) = 0; /** * Call to get nsFrameSelection for this frame. @@ -2324,7 +2324,7 @@ public: * return NS_ERROR_FAILURE * @param aPOS is defined in nsFrameSelection */ - NS_IMETHOD PeekOffset(nsPeekOffsetStruct *aPos); + virtual nsresult PeekOffset(nsPeekOffsetStruct *aPos); /** * called to find the previous/next selectable leaf frame. @@ -2352,7 +2352,7 @@ public: * @param aFinished did this frame have the aEndIndex? or is there more work to do * @param _retval return value true or false. false = range is not rendered. */ - NS_IMETHOD CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval)=0; + virtual nsresult CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval)=0; /** * Called to tell a frame that one of its child frames is dirty (i.e., @@ -2605,10 +2605,10 @@ NS_PTR_TO_INT32(frame->Properties().Get(nsIFrame::ParagraphDepthProperty())) } // Box methods. Note that these do NOT just get the CSS border, padding, // etc. They also talk to nsITheme. - NS_IMETHOD GetBorderAndPadding(nsMargin& aBorderAndPadding); - NS_IMETHOD GetBorder(nsMargin& aBorder)=0; - NS_IMETHOD GetPadding(nsMargin& aBorderAndPadding)=0; - NS_IMETHOD GetMargin(nsMargin& aMargin)=0; + virtual nsresult GetBorderAndPadding(nsMargin& aBorderAndPadding); + virtual nsresult GetBorder(nsMargin& aBorder)=0; + virtual nsresult GetPadding(nsMargin& aBorderAndPadding)=0; + virtual nsresult GetMargin(nsMargin& aMargin)=0; virtual void SetLayoutManager(nsBoxLayout* aLayout) { } virtual nsBoxLayout* GetLayoutManager() { return nullptr; } NS_HIDDEN_(nsresult) GetClientRect(nsRect& aContentRect); @@ -2621,15 +2621,15 @@ NS_PTR_TO_INT32(frame->Properties().Get(nsIFrame::ParagraphDepthProperty())) bool IsNormalDirection() const { return (mState & NS_STATE_IS_DIRECTION_NORMAL) != 0; } NS_HIDDEN_(nsresult) Redraw(nsBoxLayoutState& aState); - NS_IMETHOD RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild)=0; + virtual nsresult RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild)=0; // XXX take this out after we've branched virtual bool GetMouseThrough() const { return false; } #ifdef DEBUG_LAYOUT - NS_IMETHOD SetDebug(nsBoxLayoutState& aState, bool aDebug)=0; - NS_IMETHOD GetDebug(bool& aDebug)=0; + virtual nsresult SetDebug(nsBoxLayoutState& aState, bool aDebug)=0; + virtual nsresult GetDebug(bool& aDebug)=0; - NS_IMETHOD DumpBox(FILE* out)=0; + virtual nsresult DumpBox(FILE* out)=0; #endif /** @@ -3077,13 +3077,13 @@ public: virtual void DumpFrameTree(); void DumpFrameTreeLimited(); - NS_IMETHOD GetFrameName(nsAString& aResult) const = 0; + virtual nsresult GetFrameName(nsAString& aResult) const = 0; #endif #ifdef DEBUG public: - NS_IMETHOD_(nsFrameState) GetDebugStateBits() const = 0; - NS_IMETHOD DumpRegressionData(nsPresContext* aPresContext, + virtual nsFrameState GetDebugStateBits() const = 0; + virtual nsresult DumpRegressionData(nsPresContext* aPresContext, FILE* out, int32_t aIndent) = 0; #endif }; diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 28dfe2d9bf12..ae6b5945401f 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -797,7 +797,7 @@ nsImageFrame::GetIntrinsicRatio() return mIntrinsicRatio; } -NS_IMETHODIMP +nsresult nsImageFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -1589,7 +1589,7 @@ nsImageFrame::GetAnchorHREFTargetAndNode(nsIURI** aHref, nsString& aTarget, return status; } -NS_IMETHODIMP +nsresult nsImageFrame::GetContentForEvent(WidgetEvent* aEvent, nsIContent** aContent) { @@ -1630,7 +1630,7 @@ nsImageFrame::GetContentForEvent(WidgetEvent* aEvent, } // XXX what should clicks on transparent pixels do? -NS_IMETHODIMP +nsresult nsImageFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -1691,7 +1691,7 @@ nsImageFrame::HandleEvent(nsPresContext* aPresContext, return nsSplittableFrame::HandleEvent(aPresContext, aEvent, aEventStatus); } -NS_IMETHODIMP +nsresult nsImageFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { @@ -1720,7 +1720,7 @@ nsImageFrame::GetCursor(const nsPoint& aPoint, return nsFrame::GetCursor(aPoint, aCursor); } -NS_IMETHODIMP +nsresult nsImageFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -1747,7 +1747,7 @@ nsImageFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsImageFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ImageFrame"), aResult); diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index c290838e8af0..2182b65373c7 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -81,19 +81,19 @@ public: virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext); virtual mozilla::IntrinsicSize GetIntrinsicSize(); virtual nsSize GetIntrinsicRatio(); - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); - NS_IMETHOD GetContentForEvent(mozilla::WidgetEvent* aEvent, + virtual nsresult GetContentForEvent(mozilla::WidgetEvent* aEvent, nsIContent** aContent); - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus); - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor); - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -109,7 +109,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const; + virtual nsresult GetFrameName(nsAString& aResult) const; void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const; #endif diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index da2b24ba6477..87faec3a58c1 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -44,7 +44,7 @@ NS_QUERYFRAME_HEAD(nsInlineFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsInlineFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Inline"), aResult); @@ -289,7 +289,7 @@ ReparentChildListStyle(nsPresContext* aPresContext, } } -NS_IMETHODIMP +nsresult nsInlineFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -989,7 +989,7 @@ nsFirstLineFrame::Init(nsIContent* aContent, nsIFrame* aParent, } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsFirstLineFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Line"), aResult); @@ -1016,7 +1016,7 @@ nsFirstLineFrame::PullOneFrame(nsPresContext* aPresContext, InlineReflowState& i return frame; } -NS_IMETHODIMP +nsresult nsFirstLineFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index 050579d0a6f3..30796ec4e669 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -40,7 +40,7 @@ public: #endif #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual nsIAtom* GetType() const MOZ_OVERRIDE; @@ -72,7 +72,7 @@ public: nsSize aMargin, nsSize aBorder, nsSize aPadding, uint32_t aFlags) MOZ_OVERRIDE; virtual nsRect ComputeTightBounds(gfxContext* aContext) const MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -190,10 +190,10 @@ public: friend nsIFrame* NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual nsIAtom* GetType() const MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; diff --git a/layout/generic/nsLeafFrame.cpp b/layout/generic/nsLeafFrame.cpp index 711626e8d769..1a356d5aecbc 100644 --- a/layout/generic/nsLeafFrame.cpp +++ b/layout/generic/nsLeafFrame.cpp @@ -42,7 +42,7 @@ nsLeafFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, return nsSize(GetIntrinsicWidth(), GetIntrinsicHeight()); } -NS_IMETHODIMP +nsresult nsLeafFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -61,7 +61,7 @@ nsLeafFrame::Reflow(nsPresContext* aPresContext, return NS_OK; } -NS_IMETHODIMP +nsresult nsLeafFrame::DoReflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsLeafFrame.h b/layout/generic/nsLeafFrame.h index 720b248e0189..0a4be2932394 100644 --- a/layout/generic/nsLeafFrame.h +++ b/layout/generic/nsLeafFrame.h @@ -51,7 +51,7 @@ public: * borderpadding for the desired height. Ascent will be set to the height, * and descent will be set to 0. */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -59,7 +59,7 @@ public: /** * This method does most of the work that Reflow() above need done. */ - NS_IMETHOD DoReflow(nsPresContext* aPresContext, + virtual nsresult DoReflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 0e8c2a666145..722a575692d4 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -284,7 +284,7 @@ nsObjectFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsObjectFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ObjectFrame"), aResult); @@ -497,7 +497,7 @@ nsObjectFrame::GetDesiredSize(nsPresContext* aPresContext, // call the superclass in all cases. } -NS_IMETHODIMP +nsresult nsObjectFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -801,7 +801,7 @@ nsIntPoint nsObjectFrame::GetWindowOriginInPixels(bool aWindowless) PresContext()->AppUnitsToDevPixels(origin.y)); } -NS_IMETHODIMP +nsresult nsObjectFrame::DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) @@ -1840,7 +1840,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder, #endif } -NS_IMETHODIMP +nsresult nsObjectFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* anEvent, nsEventStatus* anEventStatus) @@ -1934,7 +1934,7 @@ nsObjectFrame::GetPluginInstance(nsNPAPIPluginInstance** aPluginInstance) return mInstanceOwner->GetInstance(aPluginInstance); } -NS_IMETHODIMP +nsresult nsObjectFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { if (!mInstanceOwner) { diff --git a/layout/generic/nsObjectFrame.h b/layout/generic/nsObjectFrame.h index ff5fb7b52824..fa6afd21a34d 100644 --- a/layout/generic/nsObjectFrame.h +++ b/layout/generic/nsObjectFrame.h @@ -58,18 +58,18 @@ public: nsIFrame* aPrevInFlow) MOZ_OVERRIDE; virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext); virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext); - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); - NS_IMETHOD DidReflow(nsPresContext* aPresContext, + virtual nsresult DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus); virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus); @@ -83,7 +83,7 @@ public: virtual bool NeedsView() { return true; } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const; + virtual nsresult GetFrameName(nsAString& aResult) const; #endif virtual void DestroyFrom(nsIFrame* aDestructRoot); @@ -94,7 +94,7 @@ public: virtual void SetIsDocumentActive(bool aIsActive) MOZ_OVERRIDE; - NS_IMETHOD GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor); + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor); // APIs used by nsRootPresContext to set up the widget position/size/clip // region. diff --git a/layout/generic/nsPageContentFrame.cpp b/layout/generic/nsPageContentFrame.cpp index 8467ea8bf383..acb15dfbc5ac 100644 --- a/layout/generic/nsPageContentFrame.cpp +++ b/layout/generic/nsPageContentFrame.cpp @@ -17,7 +17,7 @@ NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsPageContentFrame) -NS_IMETHODIMP +nsresult nsPageContentFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -110,7 +110,7 @@ nsPageContentFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsPageContentFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("PageContent"), aResult); diff --git a/layout/generic/nsPageContentFrame.h b/layout/generic/nsPageContentFrame.h index cff4e9a9a930..6a71ca3c8f9d 100644 --- a/layout/generic/nsPageContentFrame.h +++ b/layout/generic/nsPageContentFrame.h @@ -20,7 +20,7 @@ public: friend class nsPageFrame; // nsIFrame - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aMaxSize, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -44,7 +44,7 @@ public: #ifdef DEBUG_FRAME_DUMP // Debugging - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif protected: diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp index 0e711c5c8221..95d34cdd7267 100644 --- a/layout/generic/nsPageFrame.cpp +++ b/layout/generic/nsPageFrame.cpp @@ -45,7 +45,7 @@ nsPageFrame::~nsPageFrame() { } -NS_IMETHODIMP nsPageFrame::Reflow(nsPresContext* aPresContext, +nsresult nsPageFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) @@ -169,7 +169,7 @@ nsPageFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsPageFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Page"), aResult); @@ -682,7 +682,7 @@ nsPageBreakFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsPageBreakFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("PageBreak"), aResult); diff --git a/layout/generic/nsPageFrame.h b/layout/generic/nsPageFrame.h index 6681f0a6544b..4439809a0648 100644 --- a/layout/generic/nsPageFrame.h +++ b/layout/generic/nsPageFrame.h @@ -19,7 +19,7 @@ public: friend nsIFrame* NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aMaxSize, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -36,7 +36,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif ////////////////// @@ -103,7 +103,7 @@ class nsPageBreakFrame : public nsLeafFrame nsPageBreakFrame(nsStyleContext* aContext); ~nsPageBreakFrame(); - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -111,7 +111,7 @@ class nsPageBreakFrame : public nsLeafFrame virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif protected: diff --git a/layout/generic/nsPlaceholderFrame.cpp b/layout/generic/nsPlaceholderFrame.cpp index c47615c15fda..6722c24d6f8a 100644 --- a/layout/generic/nsPlaceholderFrame.cpp +++ b/layout/generic/nsPlaceholderFrame.cpp @@ -98,7 +98,7 @@ nsPlaceholderFrame::AddInlinePrefWidth(nsRenderingContext* aRenderingContext, } } -NS_IMETHODIMP +nsresult nsPlaceholderFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -236,7 +236,7 @@ nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, #endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsPlaceholderFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Placeholder"), aResult); diff --git a/layout/generic/nsPlaceholderFrame.h b/layout/generic/nsPlaceholderFrame.h index 9b6fb14a4653..ee97c5aaf86e 100644 --- a/layout/generic/nsPlaceholderFrame.h +++ b/layout/generic/nsPlaceholderFrame.h @@ -96,7 +96,7 @@ public: virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; virtual nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -111,7 +111,7 @@ public: #ifdef DEBUG_FRAME_DUMP void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE; - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif // DEBUG /** diff --git a/layout/generic/nsSimplePageSequence.cpp b/layout/generic/nsSimplePageSequence.cpp index 4b3c1a6675f0..23a86726dcd1 100644 --- a/layout/generic/nsSimplePageSequence.cpp +++ b/layout/generic/nsSimplePageSequence.cpp @@ -117,7 +117,7 @@ nsSimplePageSequenceFrame::SetDesiredSize(nsHTMLReflowMetrics& aDesiredSize, nscoord(aHeight * PresContext()->GetPrintPreviewScale())); } -NS_IMETHODIMP +nsresult nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -303,7 +303,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext, //---------------------------------------------------------------------- #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsSimplePageSequenceFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SimplePageSequence"), aResult); diff --git a/layout/generic/nsSimplePageSequence.h b/layout/generic/nsSimplePageSequence.h index 8105d1bcd57d..c41f954e5a74 100644 --- a/layout/generic/nsSimplePageSequence.h +++ b/layout/generic/nsSimplePageSequence.h @@ -64,7 +64,7 @@ public: NS_DECL_FRAMEARENA_HELPERS // nsIFrame - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aMaxSize, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -109,7 +109,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif protected: diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index 7feba0f66612..58e1a2d674dd 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -545,7 +545,7 @@ nsSubDocumentFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const } } -NS_IMETHODIMP nsSubDocumentFrame::GetFrameName(nsAString& aResult) const +nsresult nsSubDocumentFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("FrameOuter"), aResult); } @@ -645,7 +645,7 @@ nsSubDocumentFrame::ComputeSize(nsRenderingContext *aRenderingContext, aMargin, aBorder, aPadding, aFlags); } -NS_IMETHODIMP +nsresult nsSubDocumentFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -733,7 +733,7 @@ nsSubDocumentFrame::ReflowCallbackCanceled() mPostedReflowCallback = false; } -NS_IMETHODIMP +nsresult nsSubDocumentFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/generic/nsSubDocumentFrame.h b/layout/generic/nsSubDocumentFrame.h index 1cc4aed648a0..ac8b083e1718 100644 --- a/layout/generic/nsSubDocumentFrame.h +++ b/layout/generic/nsSubDocumentFrame.h @@ -25,7 +25,7 @@ public: #ifdef DEBUG_FRAME_DUMP void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE; - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif NS_DECL_QUERYFRAME @@ -61,7 +61,7 @@ public: nsSize aMargin, nsSize aBorder, nsSize aPadding, uint32_t aFlags) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -70,7 +70,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 4f8ef853d22b..c778e2eb7853 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -4192,7 +4192,7 @@ nsTextFrame::~nsTextFrame() { } -NS_IMETHODIMP +nsresult nsTextFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { @@ -4364,7 +4364,7 @@ nsTextFrame::ClearTextRun(nsTextFrame* aStartContinuation, } } -NS_IMETHODIMP +nsresult nsTextFrame::CharacterDataChanged(CharacterDataChangeInfo* aInfo) { mContent->DeleteProperty(nsGkAtoms::newline); @@ -6354,7 +6354,7 @@ nsTextFrame::SetSelectedRange(uint32_t aStart, uint32_t aEnd, bool aSelected, } } -NS_IMETHODIMP +nsresult nsTextFrame::GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) { @@ -6418,7 +6418,7 @@ nsTextFrame::GetPointFromOffset(int32_t inOffset, return NS_OK; } -NS_IMETHODIMP +nsresult nsTextFrame::GetChildFrameContainingOffset(int32_t aContentOffset, bool aHint, int32_t* aOutOffset, @@ -6799,7 +6799,7 @@ nsTextFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKey // TODO this needs to be deCOMtaminated with the interface fixed in // nsIFrame.h, but we won't do that until the old textframe is gone. -NS_IMETHODIMP +nsresult nsTextFrame::CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *aRetval) { @@ -6822,7 +6822,7 @@ nsTextFrame::CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, return NS_OK; } -NS_IMETHODIMP +nsresult nsTextFrame::GetOffsets(int32_t &start, int32_t &end) const { start = GetContentOffset(); @@ -7574,7 +7574,7 @@ struct NewlineProperty { } }; -NS_IMETHODIMP +nsresult nsTextFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -8450,7 +8450,7 @@ nsTextFrame::ToCString(nsCString& aBuf, int32_t* aTotalContentLength) const } } -NS_IMETHODIMP +nsresult nsTextFrame::GetFrameName(nsAString& aResult) const { MakeFrameName(NS_LITERAL_STRING("Text"), aResult); @@ -8483,7 +8483,7 @@ nsTextFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const #endif #ifdef DEBUG -NS_IMETHODIMP_(nsFrameState) +nsFrameState nsTextFrame::GetDebugStateBits() const { // mask out our emptystate flags; those are just caches diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 3fb023790098..9417571dcb26 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -57,10 +57,10 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) MOZ_OVERRIDE; - NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE; + virtual nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE; virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; @@ -117,12 +117,12 @@ public: #ifdef DEBUG_FRAME_DUMP void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE; - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; void ToCString(nsCString& aBuf, int32_t* aTotalContentLength) const; #endif #ifdef DEBUG - NS_IMETHOD_(nsFrameState) GetDebugStateBits() const MOZ_OVERRIDE; + virtual nsFrameState GetDebugStateBits() const MOZ_OVERRIDE; #endif virtual ContentOffsets CalcContentOffsetsFromFramePoint(nsPoint aPoint) MOZ_OVERRIDE; @@ -146,7 +146,7 @@ public: virtual bool PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState) MOZ_OVERRIDE; - NS_IMETHOD CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval) MOZ_OVERRIDE; + virtual nsresult CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval) MOZ_OVERRIDE; // Flags for aSetLengthFlags enum { ALLOW_FRAME_CREATION_AND_DESTRUCTION = 0x01 }; @@ -155,14 +155,14 @@ public: void SetLength(int32_t aLength, nsLineLayout* aLineLayout, uint32_t aSetLengthFlags = 0); - NS_IMETHOD GetOffsets(int32_t &start, int32_t &end)const MOZ_OVERRIDE; + virtual nsresult GetOffsets(int32_t &start, int32_t &end)const MOZ_OVERRIDE; virtual void AdjustOffsetsForBidi(int32_t start, int32_t end) MOZ_OVERRIDE; - NS_IMETHOD GetPointFromOffset(int32_t inOffset, + virtual nsresult GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) MOZ_OVERRIDE; - NS_IMETHOD GetChildFrameContainingOffset(int32_t inContentOffset, + virtual nsresult GetChildFrameContainingOffset(int32_t inContentOffset, bool inHint, int32_t* outFrameContentOffset, nsIFrame* *outChildFrame) MOZ_OVERRIDE; @@ -215,7 +215,7 @@ public: virtual nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext, nscoord* aX, nscoord* aXMost) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 1a7565e7de1a..ce1dac7e82d4 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -239,7 +239,7 @@ public: nsCOMPtr mContent; }; -NS_IMETHODIMP +nsresult nsVideoFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, const nsHTMLReflowState& aReflowState, @@ -469,7 +469,7 @@ nsVideoFrame::AccessibleType() #endif #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsVideoFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("HTMLVideo"), aResult); @@ -604,7 +604,7 @@ nsVideoFrame::UpdatePosterSource(bool aNotify) } } -NS_IMETHODIMP +nsresult nsVideoFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/generic/nsVideoFrame.h b/layout/generic/nsVideoFrame.h index ccac5c2b310a..9a276569e7d5 100644 --- a/layout/generic/nsVideoFrame.h +++ b/layout/generic/nsVideoFrame.h @@ -45,7 +45,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -61,7 +61,7 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; virtual bool IsLeaf() const MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -90,7 +90,7 @@ public: nsIContent *GetCaptionOverlay() { return mCaptionDiv; } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif already_AddRefed BuildLayer(nsDisplayListBuilder* aBuilder, diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index 913100afa3b9..92deda41b634 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -43,7 +43,7 @@ ViewportFrame::Init(nsIContent* aContent, } } -NS_IMETHODIMP +nsresult ViewportFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -70,7 +70,7 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists); } -NS_IMETHODIMP +nsresult ViewportFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -81,7 +81,7 @@ ViewportFrame::AppendFrames(ChildListID aListID, return nsContainerFrame::AppendFrames(aListID, aFrameList); } -NS_IMETHODIMP +nsresult ViewportFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -93,7 +93,7 @@ ViewportFrame::InsertFrames(ChildListID aListID, return nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); } -NS_IMETHODIMP +nsresult ViewportFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -173,7 +173,7 @@ ViewportFrame::AdjustReflowStateAsContainingBlock(nsHTMLReflowState* aReflowStat return rect; } -NS_IMETHODIMP +nsresult ViewportFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -299,7 +299,7 @@ ViewportFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult ViewportFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Viewport"), aResult); diff --git a/layout/generic/nsViewportFrame.h b/layout/generic/nsViewportFrame.h index e2ac58e905db..79880f84f6ee 100644 --- a/layout/generic/nsViewportFrame.h +++ b/layout/generic/nsViewportFrame.h @@ -38,17 +38,17 @@ public: nsIFrame* aParent, nsIFrame* asPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, @@ -57,7 +57,7 @@ public: virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -78,7 +78,7 @@ public: nsRect AdjustReflowStateAsContainingBlock(nsHTMLReflowState* aReflowState) const; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif private: diff --git a/layout/mathml/nsMathMLContainerFrame.cpp b/layout/mathml/nsMathMLContainerFrame.cpp index a89b4ba79457..ceac7382e726 100644 --- a/layout/mathml/nsMathMLContainerFrame.cpp +++ b/layout/mathml/nsMathMLContainerFrame.cpp @@ -735,7 +735,7 @@ nsMathMLContainerFrame::ChildListChanged(int32_t aModType) return ReLayoutChildren(frame); } -NS_IMETHODIMP +nsresult nsMathMLContainerFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -746,7 +746,7 @@ nsMathMLContainerFrame::AppendFrames(ChildListID aListID, return ChildListChanged(nsIDOMMutationEvent::ADDITION); } -NS_IMETHODIMP +nsresult nsMathMLContainerFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -759,7 +759,7 @@ nsMathMLContainerFrame::InsertFrames(ChildListID aListID, return ChildListChanged(nsIDOMMutationEvent::ADDITION); } -NS_IMETHODIMP +nsresult nsMathMLContainerFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -771,7 +771,7 @@ nsMathMLContainerFrame::RemoveFrame(ChildListID aListID, return ChildListChanged(nsIDOMMutationEvent::REMOVAL); } -NS_IMETHODIMP +nsresult nsMathMLContainerFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -881,7 +881,7 @@ nsMathMLContainerFrame::ReflowChild(nsIFrame* aChildFrame, return rv; } -NS_IMETHODIMP +nsresult nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLContainerFrame.h b/layout/mathml/nsMathMLContainerFrame.h index d4faa70e74d1..1f9eabf4cf06 100644 --- a/layout/mathml/nsMathMLContainerFrame.h +++ b/layout/mathml/nsMathMLContainerFrame.h @@ -79,16 +79,16 @@ public: ~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace)); } - NS_IMETHOD + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; @@ -106,20 +106,20 @@ public: GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext, nsHTMLReflowMetrics& aDesiredSize); - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult WillReflow(nsPresContext* aPresContext) MOZ_OVERRIDE { mPresentationData.flags &= ~NS_MATHML_ERROR; return nsContainerFrame::WillReflow(aPresContext); } - NS_IMETHOD + virtual nsresult DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) MOZ_OVERRIDE @@ -152,7 +152,7 @@ public: // to re-layout its children using ReLayoutChildren(mParent); // Therefore, there is an overhead here in that our siblings are re-laid // too (e.g., this happens with , , ). - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -415,7 +415,7 @@ public: // beware, mFrames is not set by nsBlockFrame // cannot use mFrames{.FirstChild()|.etc} since the block code doesn't set mFrames - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE { @@ -426,7 +426,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE { @@ -438,7 +438,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE @@ -451,7 +451,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE { @@ -485,7 +485,7 @@ public: friend nsIFrame* NS_NewMathMLmathInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE { @@ -496,7 +496,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE { @@ -508,7 +508,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE @@ -521,7 +521,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE { diff --git a/layout/mathml/nsMathMLSelectedFrame.cpp b/layout/mathml/nsMathMLSelectedFrame.cpp index 46b4cc0cbaf3..c39acf0efc6b 100644 --- a/layout/mathml/nsMathMLSelectedFrame.cpp +++ b/layout/mathml/nsMathMLSelectedFrame.cpp @@ -56,7 +56,7 @@ nsMathMLSelectedFrame::ChildListChanged(int32_t aModType) return nsMathMLContainerFrame::ChildListChanged(aModType); } -NS_IMETHODIMP +nsresult nsMathMLSelectedFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -99,7 +99,7 @@ nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } // Only reflow the selected child ... -NS_IMETHODIMP +nsresult nsMathMLSelectedFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLSelectedFrame.h b/layout/mathml/nsMathMLSelectedFrame.h index 2dce478550b8..f715e75664e1 100644 --- a/layout/mathml/nsMathMLSelectedFrame.h +++ b/layout/mathml/nsMathMLSelectedFrame.h @@ -18,7 +18,7 @@ public: NS_IMETHOD TransmitAutomaticData() MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; @@ -34,7 +34,7 @@ public: bool aPlaceOrigin, nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLTokenFrame.cpp b/layout/mathml/nsMathMLTokenFrame.cpp index 4c39dad1ce88..e66319ea9173 100644 --- a/layout/mathml/nsMathMLTokenFrame.cpp +++ b/layout/mathml/nsMathMLTokenFrame.cpp @@ -88,7 +88,7 @@ nsMathMLTokenFrame::MarkTextFramesAsTokenMathML() } } -NS_IMETHODIMP +nsresult nsMathMLTokenFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -102,7 +102,7 @@ nsMathMLTokenFrame::SetInitialChildList(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsMathMLTokenFrame::AppendFrames(ChildListID aListID, nsFrameList& aChildList) { @@ -115,7 +115,7 @@ nsMathMLTokenFrame::AppendFrames(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsMathMLTokenFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aChildList) diff --git a/layout/mathml/nsMathMLTokenFrame.h b/layout/mathml/nsMathMLTokenFrame.h index 4a7a89d3f39d..4a2eaa8a7b2d 100644 --- a/layout/mathml/nsMathMLTokenFrame.h +++ b/layout/mathml/nsMathMLTokenFrame.h @@ -34,20 +34,20 @@ public: virtual eMathMLFrameType GetMathMLFrameType() MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmactionFrame.cpp b/layout/mathml/nsMathMLmactionFrame.cpp index e7302fac5d3e..c7bd0965302e 100644 --- a/layout/mathml/nsMathMLmactionFrame.cpp +++ b/layout/mathml/nsMathMLmactionFrame.cpp @@ -172,7 +172,7 @@ nsMathMLmactionFrame::GetSelectedFrame() return mSelectedFrame; } -NS_IMETHODIMP +nsresult nsMathMLmactionFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -195,7 +195,7 @@ nsMathMLmactionFrame::SetInitialChildList(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsMathMLmactionFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/mathml/nsMathMLmactionFrame.h b/layout/mathml/nsMathMLmactionFrame.h index 12d2863de012..fe11e8c1b697 100644 --- a/layout/mathml/nsMathMLmactionFrame.h +++ b/layout/mathml/nsMathMLmactionFrame.h @@ -26,14 +26,14 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual nsresult ChildListChanged(int32_t aModType) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/mathml/nsMathMLmencloseFrame.cpp b/layout/mathml/nsMathMLmencloseFrame.cpp index 5d737d11403f..387753423869 100644 --- a/layout/mathml/nsMathMLmencloseFrame.cpp +++ b/layout/mathml/nsMathMLmencloseFrame.cpp @@ -672,7 +672,7 @@ nsMathMLmencloseFrame::FixInterFrameSpacing(nsHTMLReflowMetrics& aDesiredSize) return gap; } -NS_IMETHODIMP +nsresult nsMathMLmencloseFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/mathml/nsMathMLmencloseFrame.h b/layout/mathml/nsMathMLmencloseFrame.h index 6e4f85564946..2e2935761bd9 100644 --- a/layout/mathml/nsMathMLmencloseFrame.h +++ b/layout/mathml/nsMathMLmencloseFrame.h @@ -57,7 +57,7 @@ public: MeasureForWidth(nsRenderingContext& aRenderingContext, nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/mathml/nsMathMLmfencedFrame.cpp b/layout/mathml/nsMathMLmfencedFrame.cpp index 8c64f4ca259b..a1399593f1c9 100644 --- a/layout/mathml/nsMathMLmfencedFrame.cpp +++ b/layout/mathml/nsMathMLmfencedFrame.cpp @@ -40,7 +40,7 @@ nsMathMLmfencedFrame::InheritAutomaticData(nsIFrame* aParent) return NS_OK; } -NS_IMETHODIMP +nsresult nsMathMLmfencedFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -59,7 +59,7 @@ nsMathMLmfencedFrame::SetInitialChildList(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsMathMLmfencedFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -189,7 +189,7 @@ nsMathMLmfencedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } } -NS_IMETHODIMP +nsresult nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmfencedFrame.h b/layout/mathml/nsMathMLmfencedFrame.h index 01f6c67703ad..3c1a47362657 100644 --- a/layout/mathml/nsMathMLmfencedFrame.h +++ b/layout/mathml/nsMathMLmfencedFrame.h @@ -28,11 +28,11 @@ public: NS_IMETHOD InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -46,7 +46,7 @@ public: GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext, nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/mathml/nsMathMLmoFrame.cpp b/layout/mathml/nsMathMLmoFrame.cpp index bf64b6b4b30f..99da363d9444 100644 --- a/layout/mathml/nsMathMLmoFrame.cpp +++ b/layout/mathml/nsMathMLmoFrame.cpp @@ -924,7 +924,7 @@ nsMathMLmoFrame::TransmitAutomaticData() return NS_OK; } -NS_IMETHODIMP +nsresult nsMathMLmoFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -937,7 +937,7 @@ nsMathMLmoFrame::SetInitialChildList(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsMathMLmoFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1025,7 +1025,7 @@ nsMathMLmoFrame::GetIntrinsicWidthMetrics(nsRenderingContext *aRenderingContext, } } -NS_IMETHODIMP +nsresult nsMathMLmoFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/mathml/nsMathMLmoFrame.h b/layout/mathml/nsMathMLmoFrame.h index 99ebbdb280a1..fff6917edc3e 100644 --- a/layout/mathml/nsMathMLmoFrame.h +++ b/layout/mathml/nsMathMLmoFrame.h @@ -38,11 +38,11 @@ public: NS_IMETHOD TransmitAutomaticData() MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -54,7 +54,7 @@ public: GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext, nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/mathml/nsMathMLmpaddedFrame.cpp b/layout/mathml/nsMathMLmpaddedFrame.cpp index 854abd294177..68f2dac76514 100644 --- a/layout/mathml/nsMathMLmpaddedFrame.cpp +++ b/layout/mathml/nsMathMLmpaddedFrame.cpp @@ -300,7 +300,7 @@ nsMathMLmpaddedFrame::UpdateValue(int32_t aSign, } } -NS_IMETHODIMP +nsresult nsMathMLmpaddedFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmpaddedFrame.h b/layout/mathml/nsMathMLmpaddedFrame.h index a4dfabfe7642..a49cceaf1e93 100644 --- a/layout/mathml/nsMathMLmpaddedFrame.h +++ b/layout/mathml/nsMathMLmpaddedFrame.h @@ -27,7 +27,7 @@ public: return TransmitAutomaticDataForMrowLikeElement(); } - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmrootFrame.cpp b/layout/mathml/nsMathMLmrootFrame.cpp index 28ead8fc5f28..dde24810c7bb 100644 --- a/layout/mathml/nsMathMLmrootFrame.cpp +++ b/layout/mathml/nsMathMLmrootFrame.cpp @@ -145,7 +145,7 @@ GetRadicalXOffsets(nscoord aIndexWidth, nscoord aSqrWidth, *aSqrOffset = dxSqr; } -NS_IMETHODIMP +nsresult nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmrootFrame.h b/layout/mathml/nsMathMLmrootFrame.h index e2b33bfdb9c6..1b83da26cde2 100644 --- a/layout/mathml/nsMathMLmrootFrame.h +++ b/layout/mathml/nsMathMLmrootFrame.h @@ -34,7 +34,7 @@ public: NS_IMETHOD TransmitAutomaticData() MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmrowFrame.cpp b/layout/mathml/nsMathMLmrowFrame.cpp index 62210bf5ad85..11ecb92ff188 100644 --- a/layout/mathml/nsMathMLmrowFrame.cpp +++ b/layout/mathml/nsMathMLmrowFrame.cpp @@ -33,7 +33,7 @@ nsMathMLmrowFrame::InheritAutomaticData(nsIFrame* aParent) return NS_OK; } -NS_IMETHODIMP +nsresult nsMathMLmrowFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/mathml/nsMathMLmrowFrame.h b/layout/mathml/nsMathMLmrowFrame.h index 9d37f0f05882..46ae8bf27db5 100644 --- a/layout/mathml/nsMathMLmrowFrame.h +++ b/layout/mathml/nsMathMLmrowFrame.h @@ -19,7 +19,7 @@ public: friend nsIFrame* NS_NewMathMLmrowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/mathml/nsMathMLmspaceFrame.cpp b/layout/mathml/nsMathMLmspaceFrame.cpp index ba4c6f7c38d0..9254e6ff8f19 100644 --- a/layout/mathml/nsMathMLmspaceFrame.cpp +++ b/layout/mathml/nsMathMLmspaceFrame.cpp @@ -91,7 +91,7 @@ nsMathMLmspaceFrame::ProcessAttributes(nsPresContext* aPresContext) } } -NS_IMETHODIMP +nsresult nsMathMLmspaceFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmspaceFrame.h b/layout/mathml/nsMathMLmspaceFrame.h index 67c850c497d3..85af13e97c94 100644 --- a/layout/mathml/nsMathMLmspaceFrame.h +++ b/layout/mathml/nsMathMLmspaceFrame.h @@ -29,7 +29,7 @@ public: virtual bool IsLeaf() const MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmsqrtFrame.cpp b/layout/mathml/nsMathMLmsqrtFrame.cpp index b3101936bc33..a91eb2885503 100644 --- a/layout/mathml/nsMathMLmsqrtFrame.cpp +++ b/layout/mathml/nsMathMLmsqrtFrame.cpp @@ -56,7 +56,7 @@ nsMathMLmsqrtFrame::InheritAutomaticData(nsIFrame* aParent) return NS_OK; } -NS_IMETHODIMP +nsresult nsMathMLmsqrtFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/mathml/nsMathMLmsqrtFrame.h b/layout/mathml/nsMathMLmsqrtFrame.h index 3f4fe1db9fe2..447815e442ba 100644 --- a/layout/mathml/nsMathMLmsqrtFrame.h +++ b/layout/mathml/nsMathMLmsqrtFrame.h @@ -47,7 +47,7 @@ public: NS_IMETHOD InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/mathml/nsMathMLmtableFrame.cpp b/layout/mathml/nsMathMLmtableFrame.cpp index 178542392efa..5d6a91e59ac6 100644 --- a/layout/mathml/nsMathMLmtableFrame.cpp +++ b/layout/mathml/nsMathMLmtableFrame.cpp @@ -420,7 +420,7 @@ nsMathMLmtableOuterFrame::~nsMathMLmtableOuterFrame() { } -NS_IMETHODIMP +nsresult nsMathMLmtableOuterFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -531,7 +531,7 @@ nsMathMLmtableOuterFrame::GetRowFrameAt(nsPresContext* aPresContext, return nullptr; } -NS_IMETHODIMP +nsresult nsMathMLmtableOuterFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -649,7 +649,7 @@ nsMathMLmtableFrame::~nsMathMLmtableFrame() { } -NS_IMETHODIMP +nsresult nsMathMLmtableFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -686,7 +686,7 @@ nsMathMLmtrFrame::~nsMathMLmtrFrame() { } -NS_IMETHODIMP +nsresult nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -771,7 +771,7 @@ nsMathMLmtdFrame::GetColSpan() return colspan; } -NS_IMETHODIMP +nsresult nsMathMLmtdFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -864,7 +864,7 @@ nsMathMLmtdInnerFrame::~nsMathMLmtdInnerFrame() mUniqueStyleText->Destroy(PresContext()); } -NS_IMETHODIMP +nsresult nsMathMLmtdInnerFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmtableFrame.h b/layout/mathml/nsMathMLmtableFrame.h index 6d10f6d3daf3..0fdcbb457588 100644 --- a/layout/mathml/nsMathMLmtableFrame.h +++ b/layout/mathml/nsMathMLmtableFrame.h @@ -28,13 +28,13 @@ public: // overloaded nsTableOuterFrame methods - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -67,11 +67,11 @@ public: // Overloaded nsTableFrame methods - NS_IMETHOD + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE { @@ -80,7 +80,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE @@ -90,7 +90,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE { @@ -125,12 +125,12 @@ public: // overloaded nsTableRowFrame methods - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE { @@ -139,7 +139,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE @@ -149,7 +149,7 @@ public: return rv; } - NS_IMETHOD + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE { @@ -189,7 +189,7 @@ public: // overloaded nsTableCellFrame methods - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -234,7 +234,7 @@ public: return NS_OK; } - NS_IMETHOD + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/mathml/nsMathMLmunderoverFrame.cpp b/layout/mathml/nsMathMLmunderoverFrame.cpp index 712a95929818..17031450599b 100644 --- a/layout/mathml/nsMathMLmunderoverFrame.cpp +++ b/layout/mathml/nsMathMLmunderoverFrame.cpp @@ -27,7 +27,7 @@ nsMathMLmunderoverFrame::~nsMathMLmunderoverFrame() { } -NS_IMETHODIMP +nsresult nsMathMLmunderoverFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/mathml/nsMathMLmunderoverFrame.h b/layout/mathml/nsMathMLmunderoverFrame.h index 521837d2b277..9ec6ac76dbfe 100644 --- a/layout/mathml/nsMathMLmunderoverFrame.h +++ b/layout/mathml/nsMathMLmunderoverFrame.h @@ -34,7 +34,7 @@ public: UpdatePresentationData(uint32_t aFlagsValues, uint32_t aFlagsToUpdate) MOZ_OVERRIDE; - NS_IMETHOD + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/svg/SVGFEContainerFrame.cpp b/layout/svg/SVGFEContainerFrame.cpp index 6a178ca115b8..c038aef4885f 100644 --- a/layout/svg/SVGFEContainerFrame.cpp +++ b/layout/svg/SVGFEContainerFrame.cpp @@ -38,7 +38,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGFEContainer"), aResult); } @@ -56,7 +56,7 @@ public: */ virtual nsIAtom* GetType() const; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -94,7 +94,7 @@ SVGFEContainerFrame::GetType() const return nsGkAtoms::svgFEContainerFrame; } -NS_IMETHODIMP +nsresult SVGFEContainerFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/SVGFEImageFrame.cpp b/layout/svg/SVGFEImageFrame.cpp index 63e36de29992..7a711265a743 100644 --- a/layout/svg/SVGFEImageFrame.cpp +++ b/layout/svg/SVGFEImageFrame.cpp @@ -42,7 +42,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGFEImage"), aResult); } @@ -55,7 +55,7 @@ public: */ virtual nsIAtom* GetType() const; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -115,7 +115,7 @@ SVGFEImageFrame::GetType() const return nsGkAtoms::svgFEImageFrame; } -NS_IMETHODIMP +nsresult SVGFEImageFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/SVGFELeafFrame.cpp b/layout/svg/SVGFELeafFrame.cpp index be3849356274..baabf1930443 100644 --- a/layout/svg/SVGFELeafFrame.cpp +++ b/layout/svg/SVGFELeafFrame.cpp @@ -41,7 +41,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGFELeaf"), aResult); } @@ -54,7 +54,7 @@ public: */ virtual nsIAtom* GetType() const; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -92,7 +92,7 @@ SVGFELeafFrame::GetType() const return nsGkAtoms::svgFELeafFrame; } -NS_IMETHODIMP +nsresult SVGFELeafFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/SVGFEUnstyledLeafFrame.cpp b/layout/svg/SVGFEUnstyledLeafFrame.cpp index 3cee1ab80a2b..eb0fa0707cf2 100644 --- a/layout/svg/SVGFEUnstyledLeafFrame.cpp +++ b/layout/svg/SVGFEUnstyledLeafFrame.cpp @@ -35,7 +35,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGFEUnstyledLeaf"), aResult); } @@ -48,7 +48,7 @@ public: */ virtual nsIAtom* GetType() const; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -72,7 +72,7 @@ SVGFEUnstyledLeafFrame::GetType() const return nsGkAtoms::svgFEUnstyledLeafFrame; } -NS_IMETHODIMP +nsresult SVGFEUnstyledLeafFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index 323fd3d9ca50..226ca8401f00 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -3179,7 +3179,7 @@ SVGTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, new (aBuilder) nsDisplaySVGText(aBuilder, this)); } -NS_IMETHODIMP +nsresult SVGTextFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h index b1dbc8e940ff..370f4f728303 100644 --- a/layout/svg/SVGTextFrame.h +++ b/layout/svg/SVGTextFrame.h @@ -275,7 +275,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNamespaceID, + virtual nsresult AttributeChanged(int32_t aNamespaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -296,7 +296,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGText"), aResult); } diff --git a/layout/svg/SVGViewFrame.cpp b/layout/svg/SVGViewFrame.cpp index 912c041d4a41..15116a0eb728 100644 --- a/layout/svg/SVGViewFrame.cpp +++ b/layout/svg/SVGViewFrame.cpp @@ -46,7 +46,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGView"), aResult); } @@ -59,7 +59,7 @@ public: */ virtual nsIAtom* GetType() const; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -96,7 +96,7 @@ SVGViewFrame::GetType() const return nsGkAtoms::svgViewFrame; } -NS_IMETHODIMP +nsresult SVGViewFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGAFrame.cpp b/layout/svg/nsSVGAFrame.cpp index bf61df0c1ea5..748afc9e537c 100644 --- a/layout/svg/nsSVGAFrame.cpp +++ b/layout/svg/nsSVGAFrame.cpp @@ -33,7 +33,7 @@ public: #endif // nsIFrame: - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -45,7 +45,7 @@ public: virtual nsIAtom* GetType() const; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGA"), aResult); } @@ -88,7 +88,7 @@ nsSVGAFrame::Init(nsIContent* aContent, } #endif /* DEBUG */ -NS_IMETHODIMP +nsresult nsSVGAFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGClipPathFrame.cpp b/layout/svg/nsSVGClipPathFrame.cpp index ee72ba2fc050..54096310fb3b 100644 --- a/layout/svg/nsSVGClipPathFrame.cpp +++ b/layout/svg/nsSVGClipPathFrame.cpp @@ -274,7 +274,7 @@ nsSVGClipPathFrame::IsValid() return true; } -NS_IMETHODIMP +nsresult nsSVGClipPathFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGClipPathFrame.h b/layout/svg/nsSVGClipPathFrame.h index ff77b396c36d..90b84e764064 100644 --- a/layout/svg/nsSVGClipPathFrame.h +++ b/layout/svg/nsSVGClipPathFrame.h @@ -53,7 +53,7 @@ public: bool IsValid(); // nsIFrame interface: - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -69,7 +69,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGClipPath"), aResult); } diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index 3617302a6a04..c35b48075cbe 100644 --- a/layout/svg/nsSVGContainerFrame.cpp +++ b/layout/svg/nsSVGContainerFrame.cpp @@ -41,14 +41,14 @@ NS_NewSVGContainerFrame(nsIPresShell* aPresShell, NS_IMPL_FRAMEARENA_HELPERS(nsSVGContainerFrame) NS_IMPL_FRAMEARENA_HELPERS(nsSVGDisplayContainerFrame) -NS_IMETHODIMP +nsresult nsSVGContainerFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { return InsertFrames(aListID, mFrames.LastChild(), aFrameList); } -NS_IMETHODIMP +nsresult nsSVGContainerFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -62,7 +62,7 @@ nsSVGContainerFrame::InsertFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsSVGContainerFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -153,7 +153,7 @@ nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists); } -NS_IMETHODIMP +nsresult nsSVGDisplayContainerFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -197,7 +197,7 @@ nsSVGDisplayContainerFrame::InsertFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsSVGDisplayContainerFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { diff --git a/layout/svg/nsSVGContainerFrame.h b/layout/svg/nsSVGContainerFrame.h index 61b52fc1820c..bb86d22876aa 100644 --- a/layout/svg/nsSVGContainerFrame.h +++ b/layout/svg/nsSVGContainerFrame.h @@ -73,12 +73,12 @@ public: } // nsIFrame: - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE @@ -128,10 +128,10 @@ public: NS_DECL_FRAMEARENA_HELPERS // nsIFrame: - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual void Init(nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/svg/nsSVGFilterFrame.cpp b/layout/svg/nsSVGFilterFrame.cpp index c7311b0bd742..b98961bfb3ab 100644 --- a/layout/svg/nsSVGFilterFrame.cpp +++ b/layout/svg/nsSVGFilterFrame.cpp @@ -177,7 +177,7 @@ nsSVGFilterFrame::GetReferencedFilterIfNotInUse() return referenced; } -NS_IMETHODIMP +nsresult nsSVGFilterFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGFilterFrame.h b/layout/svg/nsSVGFilterFrame.h index f1a734cae601..b7ece1266c59 100644 --- a/layout/svg/nsSVGFilterFrame.h +++ b/layout/svg/nsSVGFilterFrame.h @@ -53,7 +53,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE {} - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp index 92f08111f789..59277055f73f 100644 --- a/layout/svg/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/nsSVGForeignObjectFrame.cpp @@ -83,7 +83,7 @@ nsSVGForeignObjectFrame::GetType() const return nsGkAtoms::svgForeignObjectFrame; } -NS_IMETHODIMP +nsresult nsSVGForeignObjectFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom *aAttribute, int32_t aModType) @@ -116,7 +116,7 @@ nsSVGForeignObjectFrame::AttributeChanged(int32_t aNameSpaceID, return NS_OK; } -NS_IMETHODIMP +nsresult nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/svg/nsSVGForeignObjectFrame.h b/layout/svg/nsSVGForeignObjectFrame.h index 4994d1b244c9..e80489678fc2 100644 --- a/layout/svg/nsSVGForeignObjectFrame.h +++ b/layout/svg/nsSVGForeignObjectFrame.h @@ -35,7 +35,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -43,7 +43,7 @@ public: return GetFirstPrincipalChild()->GetContentInsertionFrame(); } - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -69,7 +69,7 @@ public: Matrix *aFromParentTransform) const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGForeignObject"), aResult); } diff --git a/layout/svg/nsSVGGFrame.cpp b/layout/svg/nsSVGGFrame.cpp index 29e779eae7da..f27ee81c5794 100644 --- a/layout/svg/nsSVGGFrame.cpp +++ b/layout/svg/nsSVGGFrame.cpp @@ -87,7 +87,7 @@ nsSVGGFrame::GetCanvasTM(uint32_t aFor, nsIFrame* aTransformRoot) return *mCanvasTM; } -NS_IMETHODIMP +nsresult nsSVGGFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGGFrame.h b/layout/svg/nsSVGGFrame.h index d5b9197f24c2..b13db1620feb 100644 --- a/layout/svg/nsSVGGFrame.h +++ b/layout/svg/nsSVGGFrame.h @@ -37,14 +37,14 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGG"), aResult); } #endif // nsIFrame interface: - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/svg/nsSVGGenericContainerFrame.cpp b/layout/svg/nsSVGGenericContainerFrame.cpp index c71b3c85a427..6e13eddb8f14 100644 --- a/layout/svg/nsSVGGenericContainerFrame.cpp +++ b/layout/svg/nsSVGGenericContainerFrame.cpp @@ -21,7 +21,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGGenericContainerFrame) //---------------------------------------------------------------------- // nsIFrame methods -NS_IMETHODIMP +nsresult nsSVGGenericContainerFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGGenericContainerFrame.h b/layout/svg/nsSVGGenericContainerFrame.h index 4becdf9f7979..22e17ff9024b 100644 --- a/layout/svg/nsSVGGenericContainerFrame.h +++ b/layout/svg/nsSVGGenericContainerFrame.h @@ -31,7 +31,7 @@ public: NS_DECL_FRAMEARENA_HELPERS // nsIFrame: - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; /** @@ -42,7 +42,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGGenericContainer"), aResult); } diff --git a/layout/svg/nsSVGGradientFrame.cpp b/layout/svg/nsSVGGradientFrame.cpp index 1e5f7d9a4d67..8888853e59ea 100644 --- a/layout/svg/nsSVGGradientFrame.cpp +++ b/layout/svg/nsSVGGradientFrame.cpp @@ -60,7 +60,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGGradientFrame) //---------------------------------------------------------------------- // nsIFrame methods: -NS_IMETHODIMP +nsresult nsSVGGradientFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -417,7 +417,7 @@ nsSVGLinearGradientFrame::GetType() const return nsGkAtoms::svgLinearGradientFrame; } -NS_IMETHODIMP +nsresult nsSVGLinearGradientFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -526,7 +526,7 @@ nsSVGRadialGradientFrame::GetType() const return nsGkAtoms::svgRadialGradientFrame; } -NS_IMETHODIMP +nsresult nsSVGRadialGradientFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGGradientFrame.h b/layout/svg/nsSVGGradientFrame.h index b93999392637..a5ea341bcd98 100644 --- a/layout/svg/nsSVGGradientFrame.h +++ b/layout/svg/nsSVGGradientFrame.h @@ -54,12 +54,12 @@ public: const gfxRect *aOverrideBounds) MOZ_OVERRIDE; // nsIFrame interface: - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGGradient"), aResult); } @@ -145,12 +145,12 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; // frame type: nsGkAtoms::svgLinearGradientFrame - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGLinearGradient"), aResult); } @@ -190,12 +190,12 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; // frame type: nsGkAtoms::svgRadialGradientFrame - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGRadialGradient"), aResult); } diff --git a/layout/svg/nsSVGImageFrame.cpp b/layout/svg/nsSVGImageFrame.cpp index 61cb6e0593e5..fd5e89f96237 100644 --- a/layout/svg/nsSVGImageFrame.cpp +++ b/layout/svg/nsSVGImageFrame.cpp @@ -66,7 +66,7 @@ public: virtual uint16_t GetHitTestFlags() MOZ_OVERRIDE; // nsIFrame interface: - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); virtual void Init(nsIContent* aContent, @@ -82,7 +82,7 @@ public: virtual nsIAtom* GetType() const; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGImage"), aResult); } @@ -179,7 +179,7 @@ nsSVGImageFrame::DestroyFrom(nsIFrame* aDestructRoot) //---------------------------------------------------------------------- // nsIFrame methods: -NS_IMETHODIMP +nsresult nsSVGImageFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGInnerSVGFrame.cpp b/layout/svg/nsSVGInnerSVGFrame.cpp index 35f6558f05ed..58c7a90ec0a8 100644 --- a/layout/svg/nsSVGInnerSVGFrame.cpp +++ b/layout/svg/nsSVGInnerSVGFrame.cpp @@ -162,7 +162,7 @@ nsSVGInnerSVGFrame::NotifySVGChanged(uint32_t aFlags) nsSVGInnerSVGFrameBase::NotifySVGChanged(aFlags); } -NS_IMETHODIMP +nsresult nsSVGInnerSVGFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGInnerSVGFrame.h b/layout/svg/nsSVGInnerSVGFrame.h index f40f1eda3dfc..49d59a8dae0c 100644 --- a/layout/svg/nsSVGInnerSVGFrame.h +++ b/layout/svg/nsSVGInnerSVGFrame.h @@ -42,13 +42,13 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGInnerSVG"), aResult); } #endif - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/svg/nsSVGMarkerFrame.cpp b/layout/svg/nsSVGMarkerFrame.cpp index 0d948e4b0c66..fc4d4e234e46 100644 --- a/layout/svg/nsSVGMarkerFrame.cpp +++ b/layout/svg/nsSVGMarkerFrame.cpp @@ -28,7 +28,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGMarkerFrame) //---------------------------------------------------------------------- // nsIFrame methods: -NS_IMETHODIMP +nsresult nsSVGMarkerFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGMarkerFrame.h b/layout/svg/nsSVGMarkerFrame.h index 1d44c3bb3bb5..55ffd03fc3bd 100644 --- a/layout/svg/nsSVGMarkerFrame.h +++ b/layout/svg/nsSVGMarkerFrame.h @@ -62,7 +62,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE {} - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; /** @@ -73,7 +73,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGMarker"), aResult); } @@ -165,7 +165,7 @@ public: #endif #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGMarkerAnonChild"), aResult); } #endif diff --git a/layout/svg/nsSVGMaskFrame.cpp b/layout/svg/nsSVGMaskFrame.cpp index a82119acde0c..690550d18903 100644 --- a/layout/svg/nsSVGMaskFrame.cpp +++ b/layout/svg/nsSVGMaskFrame.cpp @@ -267,7 +267,7 @@ nsSVGMaskFrame::ComputeMaskAlpha(nsRenderingContext *aContext, return retval.forget(); } -NS_IMETHODIMP +nsresult nsSVGMaskFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGMaskFrame.h b/layout/svg/nsSVGMaskFrame.h index 270e356b4b94..b2ec00a849b9 100644 --- a/layout/svg/nsSVGMaskFrame.h +++ b/layout/svg/nsSVGMaskFrame.h @@ -38,7 +38,7 @@ public: const gfxMatrix &aMatrix, float aOpacity = 1.0f); - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -60,7 +60,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGMask"), aResult); } diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index b038c08f0bad..9e0f3fcb4da8 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -305,7 +305,7 @@ nsSVGOuterSVGFrame::ComputeSize(nsRenderingContext *aRenderingContext, aMargin, aBorder, aPadding); } -NS_IMETHODIMP +nsresult nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -452,7 +452,7 @@ nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext, return NS_OK; } -NS_IMETHODIMP +nsresult nsSVGOuterSVGFrame::DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) @@ -628,7 +628,7 @@ DependsOnIntrinsicSize(const nsIFrame* aEmbeddingFrame) !height.ConvertsToLength(); } -NS_IMETHODIMP +nsresult nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGOuterSVGFrame.h b/layout/svg/nsSVGOuterSVGFrame.h index 28b81600f1c6..eaea413d75f4 100644 --- a/layout/svg/nsSVGOuterSVGFrame.h +++ b/layout/svg/nsSVGOuterSVGFrame.h @@ -49,12 +49,12 @@ public: nsSize aMargin, nsSize aBorder, nsSize aPadding, uint32_t aFlags) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD DidReflow(nsPresContext* aPresContext, + virtual nsresult DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) MOZ_OVERRIDE; @@ -78,13 +78,13 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVG"), aResult); } #endif - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -251,7 +251,7 @@ public: #endif #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVGAnonChild"), aResult); } #endif diff --git a/layout/svg/nsSVGPathGeometryFrame.cpp b/layout/svg/nsSVGPathGeometryFrame.cpp index 60f39c38baf0..7e6fc3b65b4c 100644 --- a/layout/svg/nsSVGPathGeometryFrame.cpp +++ b/layout/svg/nsSVGPathGeometryFrame.cpp @@ -112,7 +112,7 @@ nsSVGPathGeometryFrame::Init(nsIContent* aContent, nsSVGPathGeometryFrameBase::Init(aContent, aParent, aPrevInFlow); } -NS_IMETHODIMP +nsresult nsSVGPathGeometryFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGPathGeometryFrame.h b/layout/svg/nsSVGPathGeometryFrame.h index 6b29abb50f50..dca745737c60 100644 --- a/layout/svg/nsSVGPathGeometryFrame.h +++ b/layout/svg/nsSVGPathGeometryFrame.h @@ -61,7 +61,7 @@ public: return nsSVGPathGeometryFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGGeometry)); } - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -78,7 +78,7 @@ public: Matrix *aFromParentTransforms = nullptr) const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGPathGeometry"), aResult); } diff --git a/layout/svg/nsSVGPatternFrame.cpp b/layout/svg/nsSVGPatternFrame.cpp index 2054f5369be6..3a02888df8f5 100644 --- a/layout/svg/nsSVGPatternFrame.cpp +++ b/layout/svg/nsSVGPatternFrame.cpp @@ -69,7 +69,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGPatternFrame) //---------------------------------------------------------------------- // nsIFrame methods: -NS_IMETHODIMP +nsresult nsSVGPatternFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGPatternFrame.h b/layout/svg/nsSVGPatternFrame.h index acd21cc969b1..b38dd7c89053 100644 --- a/layout/svg/nsSVGPatternFrame.h +++ b/layout/svg/nsSVGPatternFrame.h @@ -56,7 +56,7 @@ public: nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE; // nsIFrame interface: - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -74,7 +74,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SVGPattern"), aResult); } diff --git a/layout/svg/nsSVGStopFrame.cpp b/layout/svg/nsSVGStopFrame.cpp index 45e879bfefa2..6fa2a1103109 100644 --- a/layout/svg/nsSVGStopFrame.cpp +++ b/layout/svg/nsSVGStopFrame.cpp @@ -40,7 +40,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE {} - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -57,7 +57,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGStop"), aResult); } @@ -90,7 +90,7 @@ nsSVGStopFrame::GetType() const return nsGkAtoms::svgStopFrame; } -NS_IMETHODIMP +nsresult nsSVGStopFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp index 158c0e10a36c..823866a977ba 100644 --- a/layout/svg/nsSVGSwitchFrame.cpp +++ b/layout/svg/nsSVGSwitchFrame.cpp @@ -41,7 +41,7 @@ public: virtual nsIAtom* GetType() const; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGSwitch"), aResult); } diff --git a/layout/svg/nsSVGUseFrame.cpp b/layout/svg/nsSVGUseFrame.cpp index 023bf0d35633..66e4ea407e3a 100644 --- a/layout/svg/nsSVGUseFrame.cpp +++ b/layout/svg/nsSVGUseFrame.cpp @@ -36,7 +36,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); @@ -52,7 +52,7 @@ public: virtual bool IsLeaf() const; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGUse"), aResult); } @@ -112,7 +112,7 @@ nsSVGUseFrame::Init(nsIContent* aContent, nsSVGUseFrameBase::Init(aContent, aParent, aPrevInFlow); } -NS_IMETHODIMP +nsresult nsSVGUseFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 5c61b407bf44..b3800b55d9cc 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -190,7 +190,7 @@ nsTableCellFrame::GetColIndex(int32_t &aColIndex) const } } -NS_IMETHODIMP +nsresult nsTableCellFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -231,7 +231,7 @@ nsTableCellFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) } -NS_IMETHODIMP +nsresult nsTableCellFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -239,7 +239,7 @@ nsTableCellFrame::AppendFrames(ChildListID aListID, return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP +nsresult nsTableCellFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -248,7 +248,7 @@ nsTableCellFrame::InsertFrames(ChildListID aListID, return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP +nsresult nsTableCellFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -828,7 +828,7 @@ CalcUnpaginagedHeight(nsPresContext* aPresContext, return computedHeight; } -NS_METHOD nsTableCellFrame::Reflow(nsPresContext* aPresContext, +nsresult nsTableCellFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) @@ -1057,7 +1057,7 @@ nsTableCellFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableCellFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("TableCell"), aResult); @@ -1100,7 +1100,7 @@ nsBCTableCellFrame::GetBorderRadii(nscoord aRadii[8]) const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsBCTableCellFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("BCTableCell"), aResult); diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index 5d9bc6c0b263..9bea3d5ac175 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -51,7 +51,7 @@ public: virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE; #endif - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -61,12 +61,12 @@ public: // table cells contain a block frame which does most of the work, and // so these functions should never be called. They assert and return // NS_ERROR_NOT_IMPLEMENTED - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsIFrame* GetContentInsertionFrame() MOZ_OVERRIDE { @@ -104,7 +104,7 @@ public: virtual IntrinsicWidthOffsetData IntrinsicWidthOffsets(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -117,7 +117,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif void VerticallyAlignChild(nscoord aMaxAscent); @@ -310,7 +310,7 @@ public: virtual nsMargin GetBorderOverflow() MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual void PaintBackground(nsRenderingContext& aRenderingContext, diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp index da50d5d438c0..388402c3770b 100644 --- a/layout/tables/nsTableColFrame.cpp +++ b/layout/tables/nsTableColFrame.cpp @@ -85,7 +85,7 @@ void nsTableColFrame::SetContinuousBCBorderWidth(uint8_t aForSide, } } -NS_METHOD nsTableColFrame::Reflow(nsPresContext* aPresContext, +nsresult nsTableColFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) @@ -177,7 +177,7 @@ nsTableColFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableColFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("TableCol"), aResult); diff --git a/layout/tables/nsTableColFrame.h b/layout/tables/nsTableColFrame.h index 2d26a2c22c50..d8d77983bbe4 100644 --- a/layout/tables/nsTableColFrame.h +++ b/layout/tables/nsTableColFrame.h @@ -48,7 +48,7 @@ public: nsTableColFrame* GetNextCol() const; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -68,7 +68,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual nsSplittableType GetSplittableType() const MOZ_OVERRIDE; diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 0dfa7781805b..743357aee07a 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -131,7 +131,7 @@ nsTableColGroupFrame::GetLastRealColGroup(nsTableFrame* aTableFrame) } // don't set mColCount here, it is done in AddColsToTable -NS_IMETHODIMP +nsresult nsTableColGroupFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -177,7 +177,7 @@ nsTableColGroupFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) } } -NS_IMETHODIMP +nsresult nsTableColGroupFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -201,7 +201,7 @@ nsTableColGroupFrame::AppendFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsTableColGroupFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -285,7 +285,7 @@ nsTableColGroupFrame::RemoveChild(nsTableColFrame& aChild, NS_FRAME_HAS_DIRTY_CHILDREN); } -NS_IMETHODIMP +nsresult nsTableColGroupFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -353,7 +353,7 @@ nsTableColGroupFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const return skip; } -NS_METHOD nsTableColGroupFrame::Reflow(nsPresContext* aPresContext, +nsresult nsTableColGroupFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) @@ -485,7 +485,7 @@ nsTableColGroupFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDis } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableColGroupFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("TableColGroup"), aResult); diff --git a/layout/tables/nsTableColGroupFrame.h b/layout/tables/nsTableColGroupFrame.h index a9079fb97011..e0ea53b273c5 100644 --- a/layout/tables/nsTableColGroupFrame.h +++ b/layout/tables/nsTableColGroupFrame.h @@ -42,7 +42,7 @@ public: /** Initialize the colgroup frame with a set of children. * @see nsIFrame::SetInitialChildList */ - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; /** @@ -82,12 +82,12 @@ public: /** @see nsIFrame::AppendFrames, InsertFrames, RemoveFrame */ - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; /** remove the column aChild from the column group, if requested renumber @@ -106,7 +106,7 @@ public: * don't play directly in the rendering game. They do however * maintain important state that effects table and cell layout. */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -137,7 +137,7 @@ public: const nsFrameList::Slice& aCols); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; void Dump(int32_t aIndent); #endif diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 1176ce72912e..071abc3b25b8 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -254,7 +254,7 @@ nsTableFrame::PageBreakAfter(nsIFrame* aSourceFrame, // XXX this needs to be cleaned up so that the frame constructor breaks out col group // frames into a separate child list, bug 343048. -NS_IMETHODIMP +nsresult nsTableFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -1681,7 +1681,7 @@ nsTableFrame::RequestSpecialHeightReflow(const nsHTMLReflowState& aReflowState) ******************************************************************************************/ /* Layout the entire inner table. */ -NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext, +nsresult nsTableFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) @@ -2064,7 +2064,7 @@ nsTableFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) -NS_IMETHODIMP +nsresult nsTableFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -2121,7 +2121,7 @@ struct ChildListInsertions { nsFrameList mList; }; -NS_IMETHODIMP +nsresult nsTableFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -2339,7 +2339,7 @@ nsTableFrame::DoRemoveFrame(ChildListID aListID, } } -NS_IMETHODIMP +nsresult nsTableFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -3483,7 +3483,7 @@ nsTableFrame::IsAutoLayout() } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Table"), aResult); diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 7ba3ff80b92d..384f324391bc 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -161,12 +161,12 @@ public: /** @see nsIFrame::DidSetStyleContext */ virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE; @@ -218,7 +218,7 @@ public: /** Initialize the table frame with a set of children. * @see nsIFrame::SetInitialChildList */ - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual const nsFrameList& GetChildList(ChildListID aListID) const MOZ_OVERRIDE; @@ -320,7 +320,7 @@ public: * * @see nsIFrame::Reflow */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -352,7 +352,7 @@ public: #ifdef DEBUG_FRAME_DUMP /** @see nsIFrame::GetFrameName */ - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif /** return the width of the column at aColIndex */ diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 5d9dc75e8f04..e16cbb7b8395 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -125,7 +125,7 @@ nsTableCaptionFrame::AccessibleType() #endif #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableCaptionFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Caption"), aResult); @@ -188,7 +188,7 @@ nsTableOuterFrame::GetChildLists(nsTArray* aLists) const mCaptionFrames.AppendIfNonempty(aLists, kCaptionList); } -NS_IMETHODIMP +nsresult nsTableOuterFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -208,7 +208,7 @@ nsTableOuterFrame::SetInitialChildList(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsTableOuterFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -237,7 +237,7 @@ nsTableOuterFrame::AppendFrames(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsTableOuterFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -263,7 +263,7 @@ nsTableOuterFrame::InsertFrames(ChildListID aListID, } } -NS_IMETHODIMP +nsresult nsTableOuterFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -879,7 +879,7 @@ nsTableOuterFrame::UpdateReflowMetrics(uint8_t aCaptionSide, } } -NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext, +nsresult nsTableOuterFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aOuterRS, nsReflowStatus& aStatus) @@ -1104,7 +1104,7 @@ NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsTableOuterFrame) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableOuterFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("TableOuter"), aResult); diff --git a/layout/tables/nsTableOuterFrame.h b/layout/tables/nsTableOuterFrame.h index 091564712360..74e3b307e37d 100644 --- a/layout/tables/nsTableOuterFrame.h +++ b/layout/tables/nsTableOuterFrame.h @@ -33,7 +33,7 @@ public: #endif #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif protected: @@ -70,20 +70,20 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual const nsFrameList& GetChildList(ChildListID aListID) const MOZ_OVERRIDE; virtual void GetChildLists(nsTArray* aLists) const MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsIFrame* GetContentInsertionFrame() MOZ_OVERRIDE { @@ -114,7 +114,7 @@ public: /** process a reflow command for the table. * This involves reflowing the caption and the inner table. * @see nsIFrame::Reflow */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -127,7 +127,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif virtual nsIFrame* GetParentStyleContextFrame() const MOZ_OVERRIDE; diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index cae8758f2fe8..8ac3bf6e0df4 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -166,7 +166,7 @@ nsTableRowFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) } } -NS_IMETHODIMP +nsresult nsTableRowFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -190,7 +190,7 @@ nsTableRowFrame::AppendFrames(ChildListID aListID, } -NS_IMETHODIMP +nsresult nsTableRowFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -225,7 +225,7 @@ nsTableRowFrame::InsertFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsTableRowFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -1020,7 +1020,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext, /** Layout the entire row. * This method stacks cells horizontally according to HTML 4.0 rules. */ -NS_METHOD +nsresult nsTableRowFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1433,7 +1433,7 @@ NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsTableRowFrame) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableRowFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("TableRow"), aResult); diff --git a/layout/tables/nsTableRowFrame.h b/layout/tables/nsTableRowFrame.h index 6b10847666e3..ab322237d27d 100644 --- a/layout/tables/nsTableRowFrame.h +++ b/layout/tables/nsTableRowFrame.h @@ -39,12 +39,12 @@ public: /** @see nsIFrame::DidSetStyleContext */ virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; /** instantiate a new instance of nsTableRowFrame. @@ -77,7 +77,7 @@ public: * @see nsTableFrame::BalanceColumnWidths * @see nsTableFrame::ShrinkWrapChildren */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -92,7 +92,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif void UpdateHeight(nscoord aHeight, diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 2f23477a48a5..8b19e9069bed 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -1270,7 +1270,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext, * This method stacks rows vertically according to HTML 4.0 rules. * Rows are responsible for layout of their children. */ -NS_METHOD +nsresult nsTableRowGroupFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -1373,7 +1373,7 @@ nsTableRowGroupFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) } } -NS_IMETHODIMP +nsresult nsTableRowGroupFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -1411,7 +1411,7 @@ nsTableRowGroupFrame::AppendFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsTableRowGroupFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -1461,7 +1461,7 @@ nsTableRowGroupFrame::InsertFrames(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsTableRowGroupFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -1585,7 +1585,7 @@ NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsTableRowGroupFrame) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTableRowGroupFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("TableRowGroup"), aResult); diff --git a/layout/tables/nsTableRowGroupFrame.h b/layout/tables/nsTableRowGroupFrame.h index 3833e28b06f0..a4212fcbeadc 100644 --- a/layout/tables/nsTableRowGroupFrame.h +++ b/layout/tables/nsTableRowGroupFrame.h @@ -70,14 +70,14 @@ public: /** @see nsIFrame::DidSetStyleContext */ virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsMargin GetUsedMargin() const MOZ_OVERRIDE; @@ -97,7 +97,7 @@ public: * * @see nsIFrame::Reflow */ - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -114,7 +114,7 @@ public: nsTableRowFrame* GetFirstRow(); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif /** return the number of child rows (not necessarily == number of child frames) */ diff --git a/layout/xul/grid/nsGridRowGroupFrame.h b/layout/xul/grid/nsGridRowGroupFrame.h index fe4d5d5ab82b..c2d98f655a99 100644 --- a/layout/xul/grid/nsGridRowGroupFrame.h +++ b/layout/xul/grid/nsGridRowGroupFrame.h @@ -29,7 +29,7 @@ public: NS_DECL_FRAMEARENA_HELPERS #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("nsGridRowGroup"), aResult); } diff --git a/layout/xul/grid/nsGridRowLeafFrame.cpp b/layout/xul/grid/nsGridRowLeafFrame.cpp index 6dd6ed19447f..e3c2c367e232 100644 --- a/layout/xul/grid/nsGridRowLeafFrame.cpp +++ b/layout/xul/grid/nsGridRowLeafFrame.cpp @@ -33,7 +33,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsGridRowLeafFrame) * Our border and padding could be affected by our columns or rows. * Let's go check it out. */ -NS_IMETHODIMP +nsresult nsGridRowLeafFrame::GetBorderAndPadding(nsMargin& aBorderAndPadding) { // if our columns have made our padding larger add it in. diff --git a/layout/xul/grid/nsGridRowLeafFrame.h b/layout/xul/grid/nsGridRowLeafFrame.h index ca5b07de24af..409cf3a282ba 100644 --- a/layout/xul/grid/nsGridRowLeafFrame.h +++ b/layout/xul/grid/nsGridRowLeafFrame.h @@ -33,7 +33,7 @@ public: nsStyleContext* aContext); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("nsGridRowLeaf"), aResult); } @@ -45,7 +45,7 @@ public: nsBoxLayout* aLayoutManager): nsBoxFrame(aPresShell, aContext, aIsRoot, aLayoutManager) {} - NS_IMETHOD GetBorderAndPadding(nsMargin& aBorderAndPadding) MOZ_OVERRIDE; + virtual nsresult GetBorderAndPadding(nsMargin& aBorderAndPadding) MOZ_OVERRIDE; }; // class nsGridRowLeafFrame diff --git a/layout/xul/nsBox.cpp b/layout/xul/nsBox.cpp index ada6abe677d2..98f8ee9a03d7 100644 --- a/layout/xul/nsBox.cpp +++ b/layout/xul/nsBox.cpp @@ -85,7 +85,7 @@ nsBox::ListBox(nsAutoString& aResult) } } -NS_IMETHODIMP +nsresult nsBox::DumpBox(FILE* aFile) { nsAutoString s; @@ -202,7 +202,7 @@ nsBox::Shutdown() NS_IF_RELEASE(gTheme); } -NS_IMETHODIMP +nsresult nsBox::RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild) { return NS_OK; @@ -284,7 +284,7 @@ nsBox::GetLayoutFlags(uint32_t& aFlags) } -NS_IMETHODIMP +nsresult nsIFrame::GetBorderAndPadding(nsMargin& aBorderAndPadding) { aBorderAndPadding.SizeTo(0, 0, 0, 0); @@ -302,7 +302,7 @@ nsIFrame::GetBorderAndPadding(nsMargin& aBorderAndPadding) return rv; } -NS_IMETHODIMP +nsresult nsBox::GetBorder(nsMargin& aMargin) { aMargin.SizeTo(0,0,0,0); @@ -328,7 +328,7 @@ nsBox::GetBorder(nsMargin& aMargin) return NS_OK; } -NS_IMETHODIMP +nsresult nsBox::GetPadding(nsMargin& aMargin) { const nsStyleDisplay *disp = StyleDisplay(); @@ -358,7 +358,7 @@ nsBox::GetPadding(nsMargin& aMargin) return NS_OK; } -NS_IMETHODIMP +nsresult nsBox::GetMargin(nsMargin& aMargin) { aMargin.SizeTo(0,0,0,0); @@ -962,7 +962,7 @@ nsBox::GetDebugBoxAt( const nsPoint& aPoint, } -NS_IMETHODIMP +nsresult nsBox::GetDebug(bool& aDebug) { aDebug = false; diff --git a/layout/xul/nsBox.h b/layout/xul/nsBox.h index dbc99d80d691..1da4bd1763c5 100644 --- a/layout/xul/nsBox.h +++ b/layout/xul/nsBox.h @@ -32,21 +32,21 @@ public: virtual void SetBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRect, bool aRemoveOverflowAreas = false) MOZ_OVERRIDE; - NS_IMETHOD GetBorder(nsMargin& aBorderAndPadding) MOZ_OVERRIDE; - NS_IMETHOD GetPadding(nsMargin& aBorderAndPadding) MOZ_OVERRIDE; - NS_IMETHOD GetMargin(nsMargin& aMargin) MOZ_OVERRIDE; + virtual nsresult GetBorder(nsMargin& aBorderAndPadding) MOZ_OVERRIDE; + virtual nsresult GetPadding(nsMargin& aBorderAndPadding) MOZ_OVERRIDE; + virtual nsresult GetMargin(nsMargin& aMargin) MOZ_OVERRIDE; virtual Valignment GetVAlign() const MOZ_OVERRIDE { return vAlign_Top; } virtual Halignment GetHAlign() const MOZ_OVERRIDE { return hAlign_Left; } - NS_IMETHOD RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild) MOZ_OVERRIDE; + virtual nsresult RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild) MOZ_OVERRIDE; #ifdef DEBUG_LAYOUT NS_IMETHOD GetDebugBoxAt(const nsPoint& aPoint, nsIFrame** aBox); - NS_IMETHOD GetDebug(bool& aDebug) MOZ_OVERRIDE; - NS_IMETHOD SetDebug(nsBoxLayoutState& aState, bool aDebug) MOZ_OVERRIDE; + virtual nsresult GetDebug(bool& aDebug) MOZ_OVERRIDE; + virtual nsresult SetDebug(nsBoxLayoutState& aState, bool aDebug) MOZ_OVERRIDE; - NS_IMETHOD DumpBox(FILE* out) MOZ_OVERRIDE; + virtual nsresult DumpBox(FILE* out) MOZ_OVERRIDE; NS_HIDDEN_(void) PropagateDebug(nsBoxLayoutState& aState); #endif diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp index f92811c1c2b0..b5508e186366 100644 --- a/layout/xul/nsBoxFrame.cpp +++ b/layout/xul/nsBoxFrame.cpp @@ -139,7 +139,7 @@ nsBoxFrame::~nsBoxFrame() { } -NS_IMETHODIMP +nsresult nsBoxFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -551,7 +551,7 @@ nsBoxFrame::GetInitialAutoStretch(bool& aStretch) return true; } -NS_IMETHODIMP +nsresult nsBoxFrame::DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) @@ -627,7 +627,7 @@ nsBoxFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) return result; } -NS_IMETHODIMP +nsresult nsBoxFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -959,7 +959,7 @@ nsBoxFrame::DestroyFrom(nsIFrame* aDestructRoot) } #ifdef DEBUG_LAYOUT -NS_IMETHODIMP +nsresult nsBoxFrame::SetDebug(nsBoxLayoutState& aState, bool aDebug) { // see if our state matches the given debug state @@ -1002,7 +1002,7 @@ nsBoxFrame::MarkIntrinsicWidthsDirty() // IsBoxWrapped check. } -NS_IMETHODIMP +nsresult nsBoxFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -1027,7 +1027,7 @@ nsBoxFrame::RemoveFrame(ChildListID aListID, return NS_OK; } -NS_IMETHODIMP +nsresult nsBoxFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -1066,7 +1066,7 @@ nsBoxFrame::InsertFrames(ChildListID aListID, } -NS_IMETHODIMP +nsresult nsBoxFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -1109,7 +1109,7 @@ nsBoxFrame::GetContentInsertionFrame() return nsContainerFrame::GetContentInsertionFrame(); } -NS_IMETHODIMP +nsresult nsBoxFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -1533,7 +1533,7 @@ nsBoxFrame::GetBoxName(nsAutoString& aName) #endif #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsBoxFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("Box"), aResult); @@ -1547,7 +1547,7 @@ nsBoxFrame::GetType() const } #ifdef DEBUG_LAYOUT -NS_IMETHODIMP +nsresult nsBoxFrame::GetDebug(bool& aDebug) { aDebug = (mState & NS_STATE_CURRENTLY_IN_DEBUG); @@ -1940,7 +1940,7 @@ nsBoxFrame::LayoutChildAt(nsBoxLayoutState& aState, nsIFrame* aBox, const nsRect return NS_OK; } -NS_IMETHODIMP +nsresult nsBoxFrame::RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild) { if (!SupportsOrdinalsInChildren()) diff --git a/layout/xul/nsBoxFrame.h b/layout/xul/nsBoxFrame.h index 501635165e9b..c4c52c9d2f36 100644 --- a/layout/xul/nsBoxFrame.h +++ b/layout/xul/nsBoxFrame.h @@ -50,7 +50,7 @@ public: virtual void SetLayoutManager(nsBoxLayout* aLayout) MOZ_OVERRIDE { mLayoutManager = aLayout; } virtual nsBoxLayout* GetLayoutManager() MOZ_OVERRIDE { return mLayoutManager; } - NS_IMETHOD RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild) MOZ_OVERRIDE; + virtual nsresult RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIFrame* aChild) MOZ_OVERRIDE; virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; virtual nsSize GetMinSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; @@ -58,8 +58,8 @@ public: virtual nscoord GetFlex(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; virtual nscoord GetBoxAscent(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; #ifdef DEBUG_LAYOUT - NS_IMETHOD SetDebug(nsBoxLayoutState& aBoxLayoutState, bool aDebug) MOZ_OVERRIDE; - NS_IMETHOD GetDebug(bool& aDebug) MOZ_OVERRIDE; + virtual nsresult SetDebug(nsBoxLayoutState& aBoxLayoutState, bool aDebug) MOZ_OVERRIDE; + virtual nsresult GetDebug(bool& aDebug) MOZ_OVERRIDE; #endif virtual Valignment GetVAlign() const MOZ_OVERRIDE { return mValign; } virtual Halignment GetHAlign() const MOZ_OVERRIDE { return mHalign; } @@ -76,7 +76,7 @@ public: nsIFrame* asPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -84,24 +84,24 @@ public: virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsIFrame* GetContentInsertionFrame() MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; @@ -126,10 +126,10 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif - NS_IMETHOD DidReflow(nsPresContext* aPresContext, + virtual nsresult DidReflow(nsPresContext* aPresContext, const nsHTMLReflowState* aReflowState, nsDidReflowStatus aStatus) MOZ_OVERRIDE; diff --git a/layout/xul/nsButtonBoxFrame.cpp b/layout/xul/nsButtonBoxFrame.cpp index 69c41b76621c..d097eb351b5c 100644 --- a/layout/xul/nsButtonBoxFrame.cpp +++ b/layout/xul/nsButtonBoxFrame.cpp @@ -45,7 +45,7 @@ nsButtonBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists); } -NS_IMETHODIMP +nsresult nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/xul/nsButtonBoxFrame.h b/layout/xul/nsButtonBoxFrame.h index 3c84c1133ff1..82aeb98786bb 100644 --- a/layout/xul/nsButtonBoxFrame.h +++ b/layout/xul/nsButtonBoxFrame.h @@ -24,7 +24,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; @@ -33,7 +33,7 @@ public: { DoMouseClick(aEvent, false); } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("ButtonBoxFrame"), aResult); } #endif diff --git a/layout/xul/nsDeckFrame.cpp b/layout/xul/nsDeckFrame.cpp index ecf0d12561a4..e8ef54fc6607 100644 --- a/layout/xul/nsDeckFrame.cpp +++ b/layout/xul/nsDeckFrame.cpp @@ -57,7 +57,7 @@ nsDeckFrame::GetType() const return nsGkAtoms::deckFrame; } -NS_IMETHODIMP +nsresult nsDeckFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/xul/nsDeckFrame.h b/layout/xul/nsDeckFrame.h index 01b5b6cb44b8..9981bbe9518d 100644 --- a/layout/xul/nsDeckFrame.h +++ b/layout/xul/nsDeckFrame.h @@ -27,7 +27,7 @@ public: friend nsIFrame* NS_NewDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -48,7 +48,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("Deck"), aResult); } diff --git a/layout/xul/nsDocElementBoxFrame.cpp b/layout/xul/nsDocElementBoxFrame.cpp index c76cdb98f8fd..a7c7a20a7cac 100644 --- a/layout/xul/nsDocElementBoxFrame.cpp +++ b/layout/xul/nsDocElementBoxFrame.cpp @@ -55,7 +55,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const; + virtual nsresult GetFrameName(nsAString& aResult) const; #endif private: nsCOMPtr mPopupgroupContent; @@ -135,7 +135,7 @@ NS_QUERYFRAME_HEAD(nsDocElementBoxFrame) NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsDocElementBoxFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("DocElementBox"), aResult); diff --git a/layout/xul/nsGroupBoxFrame.cpp b/layout/xul/nsGroupBoxFrame.cpp index 201f2d4dcc46..800e91f147b1 100644 --- a/layout/xul/nsGroupBoxFrame.cpp +++ b/layout/xul/nsGroupBoxFrame.cpp @@ -18,14 +18,14 @@ public: nsGroupBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext): nsBoxFrame(aShell, aContext) {} - NS_IMETHOD GetBorderAndPadding(nsMargin& aBorderAndPadding); + virtual nsresult GetBorderAndPadding(nsMargin& aBorderAndPadding); virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const { + virtual nsresult GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("GroupBoxFrame"), aResult); } #endif @@ -235,7 +235,7 @@ nsGroupBoxFrame::GetCaptionBox(nsPresContext* aPresContext, nsRect& aCaptionRect return child; } -NS_IMETHODIMP +nsresult nsGroupBoxFrame::GetBorderAndPadding(nsMargin& aBorderAndPadding) { aBorderAndPadding.SizeTo(0,0,0,0); diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp index 2c0df3349acd..400b3a93aff6 100644 --- a/layout/xul/nsImageBoxFrame.cpp +++ b/layout/xul/nsImageBoxFrame.cpp @@ -121,7 +121,7 @@ NS_NewImageBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsImageBoxFrame) -NS_IMETHODIMP +nsresult nsImageBoxFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -593,7 +593,7 @@ nsImageBoxFrame::GetType() const } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsImageBoxFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ImageBox"), aResult); diff --git a/layout/xul/nsImageBoxFrame.h b/layout/xul/nsImageBoxFrame.h index 77ede6b06d3d..3c44ef13ed82 100644 --- a/layout/xul/nsImageBoxFrame.h +++ b/layout/xul/nsImageBoxFrame.h @@ -57,7 +57,7 @@ public: nsIFrame* aParent, nsIFrame* asPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -67,7 +67,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif /** diff --git a/layout/xul/nsLeafBoxFrame.cpp b/layout/xul/nsLeafBoxFrame.cpp index 0d797b105935..bcea0f785f6f 100644 --- a/layout/xul/nsLeafBoxFrame.cpp +++ b/layout/xul/nsLeafBoxFrame.cpp @@ -70,7 +70,7 @@ nsLeafBoxFrame::Init( UpdateMouseThrough(); } -NS_IMETHODIMP +nsresult nsLeafBoxFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -180,7 +180,7 @@ nsLeafBoxFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, aMargin, aBorder, aPadding, aShrinkWrap); } -NS_IMETHODIMP +nsresult nsLeafBoxFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -317,7 +317,7 @@ nsLeafBoxFrame::Reflow(nsPresContext* aPresContext, } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsLeafBoxFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("LeafBox"), aResult); @@ -330,7 +330,7 @@ nsLeafBoxFrame::GetType() const return nsGkAtoms::leafBoxFrame; } -NS_IMETHODIMP +nsresult nsLeafBoxFrame::CharacterDataChanged(CharacterDataChangeInfo* aInfo) { MarkIntrinsicWidthsDirty(); diff --git a/layout/xul/nsLeafBoxFrame.h b/layout/xul/nsLeafBoxFrame.h index 46680134bef5..3d866baca40a 100644 --- a/layout/xul/nsLeafBoxFrame.h +++ b/layout/xul/nsLeafBoxFrame.h @@ -34,7 +34,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif // nsIHTMLReflow overrides @@ -49,12 +49,12 @@ public: nsSize aMargin, nsSize aBorder, nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; - NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE; + virtual nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE; virtual void Init(nsIContent* aContent, nsIFrame* aParent, @@ -64,7 +64,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; diff --git a/layout/xul/nsListBoxBodyFrame.cpp b/layout/xul/nsListBoxBodyFrame.cpp index 2176ee77d310..0c394145ad98 100644 --- a/layout/xul/nsListBoxBodyFrame.cpp +++ b/layout/xul/nsListBoxBodyFrame.cpp @@ -217,7 +217,7 @@ nsListBoxBodyFrame::DestroyFrom(nsIFrame* aDestructRoot) nsBoxFrame::DestroyFrom(aDestructRoot); } -NS_IMETHODIMP +nsresult nsListBoxBodyFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/xul/nsListBoxBodyFrame.h b/layout/xul/nsListBoxBodyFrame.h index 85f965667c5d..eaff459b703c 100644 --- a/layout/xul/nsListBoxBodyFrame.h +++ b/layout/xul/nsListBoxBodyFrame.h @@ -53,7 +53,7 @@ public: nsIFrame* aPrevInFlow) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; // nsIScrollbarMediator NS_IMETHOD PositionChanged(nsScrollbarFrame* aScrollbar, int32_t aOldIndex, int32_t& aNewIndex) MOZ_OVERRIDE; diff --git a/layout/xul/nsMenuBarFrame.h b/layout/xul/nsMenuBarFrame.h index afc492a4ec9e..02ec7c5d8d16 100644 --- a/layout/xul/nsMenuBarFrame.h +++ b/layout/xul/nsMenuBarFrame.h @@ -94,7 +94,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("MenuBar"), aResult); } diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index e6585511adf7..cb549aa9b20e 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -327,7 +327,7 @@ nsMenuFrame::SetPopupFrame(nsFrameList& aFrameList) } } -NS_IMETHODIMP +nsresult nsMenuFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -389,7 +389,7 @@ nsMenuFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, WrapListsInRedirector(aBuilder, set, aLists); } -NS_IMETHODIMP +nsresult nsMenuFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -645,7 +645,7 @@ nsMenuFrame::SelectMenu(bool aActivateFlag) return NS_OK; } -NS_IMETHODIMP +nsresult nsMenuFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -753,7 +753,7 @@ nsMenuFrame::DoLayout(nsBoxLayoutState& aState) } #ifdef DEBUG_LAYOUT -NS_IMETHODIMP +nsresult nsMenuFrame::SetDebug(nsBoxLayoutState& aState, bool aDebug) { // see if our state matches the given debug state @@ -1284,7 +1284,7 @@ nsMenuFrame::PassMenuCommandEventToPopupManager() mDelayedMenuCommandEvent = nullptr; } -NS_IMETHODIMP +nsresult nsMenuFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -1301,7 +1301,7 @@ nsMenuFrame::RemoveFrame(ChildListID aListID, return nsBoxFrame::RemoveFrame(aListID, aOldFrame); } -NS_IMETHODIMP +nsresult nsMenuFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -1330,7 +1330,7 @@ nsMenuFrame::InsertFrames(ChildListID aListID, return nsBoxFrame::InsertFrames(aListID, aPrevFrame, aFrameList); } -NS_IMETHODIMP +nsresult nsMenuFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { diff --git a/layout/xul/nsMenuFrame.h b/layout/xul/nsMenuFrame.h index 66228124a355..255cbbc34749 100644 --- a/layout/xul/nsMenuFrame.h +++ b/layout/xul/nsMenuFrame.h @@ -90,7 +90,7 @@ public: nsIFrame* aPrevInFlow) MOZ_OVERRIDE; #ifdef DEBUG_LAYOUT - NS_IMETHOD SetDebug(nsBoxLayoutState& aState, bool aDebug) MOZ_OVERRIDE; + virtual nsresult SetDebug(nsBoxLayoutState& aState, bool aDebug) MOZ_OVERRIDE; #endif // The following methods are all overridden so that the menupopup @@ -98,7 +98,7 @@ public: // actual menu item at all. virtual const nsFrameList& GetChildList(ChildListID aList) const MOZ_OVERRIDE; virtual void GetChildLists(nsTArray* aLists) const MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; @@ -108,18 +108,18 @@ public: const nsDisplayListSet& aLists) MOZ_OVERRIDE; // this method can destroy the frame - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual nsIAtom* GetType() const MOZ_OVERRIDE { return nsGkAtoms::menuFrame; } @@ -194,7 +194,7 @@ public: void SetIsMenu(bool aIsMenu) { mIsMenu = aIsMenu; } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("Menu"), aResult); } @@ -243,7 +243,7 @@ protected: void Execute(mozilla::WidgetGUIEvent *aEvent); // This method can destroy the frame - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; virtual ~nsMenuFrame() { } diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index 71c4101ecef1..cfb95d28b178 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -353,7 +353,7 @@ private: nsRefPtr mPresContext; }; -NS_IMETHODIMP +nsresult nsMenuPopupFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { @@ -1819,7 +1819,7 @@ nsMenuPopupFrame::AttachedDismissalListener() // helpers ///////////////////////////////////////////////////////////// -NS_IMETHODIMP +nsresult nsMenuPopupFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/xul/nsMenuPopupFrame.h b/layout/xul/nsMenuPopupFrame.h index 80f5b5f747bf..cc610f544b93 100644 --- a/layout/xul/nsMenuPopupFrame.h +++ b/layout/xul/nsMenuPopupFrame.h @@ -177,7 +177,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -197,7 +197,7 @@ public: nsresult CreateWidgetForView(nsView* aView); uint8_t GetShadowStyle(); - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual bool IsLeaf() const MOZ_OVERRIDE; @@ -280,7 +280,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE { return nsGkAtoms::menuPopupFrame; } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("MenuPopup"), aResult); } diff --git a/layout/xul/nsPopupSetFrame.cpp b/layout/xul/nsPopupSetFrame.cpp index 26417464df23..477beff9d3eb 100644 --- a/layout/xul/nsPopupSetFrame.cpp +++ b/layout/xul/nsPopupSetFrame.cpp @@ -43,7 +43,7 @@ nsPopupSetFrame::GetType() const return nsGkAtoms::popupSetFrame; } -NS_IMETHODIMP +nsresult nsPopupSetFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -54,7 +54,7 @@ nsPopupSetFrame::AppendFrames(ChildListID aListID, return nsBoxFrame::AppendFrames(aListID, aFrameList); } -NS_IMETHODIMP +nsresult nsPopupSetFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -65,7 +65,7 @@ nsPopupSetFrame::RemoveFrame(ChildListID aListID, return nsBoxFrame::RemoveFrame(aListID, aOldFrame); } -NS_IMETHODIMP +nsresult nsPopupSetFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -77,7 +77,7 @@ nsPopupSetFrame::InsertFrames(ChildListID aListID, return nsBoxFrame::InsertFrames(aListID, aPrevFrame, aFrameList); } -NS_IMETHODIMP +nsresult nsPopupSetFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { diff --git a/layout/xul/nsPopupSetFrame.h b/layout/xul/nsPopupSetFrame.h index 1a6f521e62d2..5d700331e1ff 100644 --- a/layout/xul/nsPopupSetFrame.h +++ b/layout/xul/nsPopupSetFrame.h @@ -26,14 +26,14 @@ public: virtual void Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual const nsFrameList& GetChildList(ChildListID aList) const MOZ_OVERRIDE; @@ -47,7 +47,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("PopupSet"), aResult); } diff --git a/layout/xul/nsProgressMeterFrame.cpp b/layout/xul/nsProgressMeterFrame.cpp index a893f26e0496..f4f1565c82ce 100644 --- a/layout/xul/nsProgressMeterFrame.cpp +++ b/layout/xul/nsProgressMeterFrame.cpp @@ -116,7 +116,7 @@ nsProgressMeterFrame::DoLayout(nsBoxLayoutState& aState) return nsBoxFrame::DoLayout(aState); } -NS_IMETHODIMP +nsresult nsProgressMeterFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -176,7 +176,7 @@ nsProgressMeterFrame::AttributeChanged(int32_t aNameSpaceID, } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsProgressMeterFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("ProgressMeter"), aResult); diff --git a/layout/xul/nsProgressMeterFrame.h b/layout/xul/nsProgressMeterFrame.h index 47437a9b0202..3a4006720d3e 100644 --- a/layout/xul/nsProgressMeterFrame.h +++ b/layout/xul/nsProgressMeterFrame.h @@ -29,12 +29,12 @@ public: NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif protected: diff --git a/layout/xul/nsResizerFrame.cpp b/layout/xul/nsResizerFrame.cpp index 56edf320892c..504bd6bcb5be 100644 --- a/layout/xul/nsResizerFrame.cpp +++ b/layout/xul/nsResizerFrame.cpp @@ -49,7 +49,7 @@ nsResizerFrame::nsResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContex { } -NS_IMETHODIMP +nsresult nsResizerFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/xul/nsResizerFrame.h b/layout/xul/nsResizerFrame.h index ed806fbb25f9..255623ee74ba 100644 --- a/layout/xul/nsResizerFrame.h +++ b/layout/xul/nsResizerFrame.h @@ -27,7 +27,7 @@ public: nsResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; diff --git a/layout/xul/nsRootBoxFrame.cpp b/layout/xul/nsRootBoxFrame.cpp index 6807b9acaebd..e4296a2d3e8e 100644 --- a/layout/xul/nsRootBoxFrame.cpp +++ b/layout/xul/nsRootBoxFrame.cpp @@ -58,19 +58,19 @@ public: virtual nsresult AddTooltipSupport(nsIContent* aNode); virtual nsresult RemoveTooltipSupport(nsIContent* aNode); - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList); - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList); - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame); - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus); @@ -94,7 +94,7 @@ public: } #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const; + virtual nsresult GetFrameName(nsAString& aResult) const; #endif nsPopupSetFrame* mPopupSetFrame; @@ -123,7 +123,7 @@ nsRootBoxFrame::nsRootBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext): SetLayoutManager(layout); } -NS_IMETHODIMP +nsresult nsRootBoxFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -144,7 +144,7 @@ nsRootBoxFrame::AppendFrames(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsRootBoxFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -163,7 +163,7 @@ nsRootBoxFrame::InsertFrames(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsRootBoxFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -186,7 +186,7 @@ nsRootBoxFrame::RemoveFrame(ChildListID aListID, int32_t gReflows = 0; #endif -NS_IMETHODIMP +nsresult nsRootBoxFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -214,7 +214,7 @@ nsRootBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists); } -NS_IMETHODIMP +nsresult nsRootBoxFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -302,7 +302,7 @@ NS_QUERYFRAME_HEAD(nsRootBoxFrame) NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsRootBoxFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("RootBox"), aResult); diff --git a/layout/xul/nsScrollBoxFrame.cpp b/layout/xul/nsScrollBoxFrame.cpp index 3386c584a969..57d55397fcf9 100644 --- a/layout/xul/nsScrollBoxFrame.cpp +++ b/layout/xul/nsScrollBoxFrame.cpp @@ -24,11 +24,11 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot); - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus); @@ -73,7 +73,7 @@ NS_NewAutoRepeatBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsAutoRepeatBoxFrame) -NS_IMETHODIMP +nsresult nsAutoRepeatBoxFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -142,7 +142,7 @@ nsAutoRepeatBoxFrame::HandleRelease(nsPresContext* aPresContext, return NS_OK; } -NS_IMETHODIMP +nsresult nsAutoRepeatBoxFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/xul/nsScrollbarButtonFrame.cpp b/layout/xul/nsScrollbarButtonFrame.cpp index 9b67500ce9ab..7b5f381b2875 100644 --- a/layout/xul/nsScrollbarButtonFrame.cpp +++ b/layout/xul/nsScrollbarButtonFrame.cpp @@ -38,7 +38,7 @@ NS_NewScrollbarButtonFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsScrollbarButtonFrame) -NS_IMETHODIMP +nsresult nsScrollbarButtonFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/xul/nsScrollbarButtonFrame.h b/layout/xul/nsScrollbarButtonFrame.h index 015944c377c1..5d353600a65b 100644 --- a/layout/xul/nsScrollbarButtonFrame.h +++ b/layout/xul/nsScrollbarButtonFrame.h @@ -33,7 +33,7 @@ public: friend nsIFrame* NS_NewScrollbarButtonFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; diff --git a/layout/xul/nsScrollbarFrame.cpp b/layout/xul/nsScrollbarFrame.cpp index 35704c5e0853..23041511670b 100644 --- a/layout/xul/nsScrollbarFrame.cpp +++ b/layout/xul/nsScrollbarFrame.cpp @@ -53,7 +53,7 @@ nsScrollbarFrame::Init(nsIContent* aContent, mState |= NS_FRAME_REFLOW_ROOT; } -NS_IMETHODIMP +nsresult nsScrollbarFrame::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, @@ -80,7 +80,7 @@ nsScrollbarFrame::GetType() const return nsGkAtoms::scrollbarFrame; } -NS_IMETHODIMP +nsresult nsScrollbarFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -159,7 +159,7 @@ nsScrollbarFrame::GetScrollbarMediator() return sbm; } -NS_IMETHODIMP +nsresult nsScrollbarFrame::GetMargin(nsMargin& aMargin) { aMargin.SizeTo(0,0,0,0); diff --git a/layout/xul/nsScrollbarFrame.h b/layout/xul/nsScrollbarFrame.h index 2566441b48c7..498e410a33a3 100644 --- a/layout/xul/nsScrollbarFrame.h +++ b/layout/xul/nsScrollbarFrame.h @@ -26,13 +26,13 @@ public: NS_DECL_QUERYFRAME_TARGET(nsScrollbarFrame) #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("ScrollbarFrame"), aResult); } #endif // nsIFrame overrides - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -60,7 +60,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD Reflow(nsPresContext* aPresContext, + virtual nsresult Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) MOZ_OVERRIDE; @@ -81,7 +81,7 @@ public: */ virtual bool DoesClipChildren() MOZ_OVERRIDE { return true; } - NS_IMETHOD GetMargin(nsMargin& aMargin) MOZ_OVERRIDE; + virtual nsresult GetMargin(nsMargin& aMargin) MOZ_OVERRIDE; private: nsCOMPtr mScrollbarMediator; diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp index 51429921bec2..4b39d18bc266 100644 --- a/layout/xul/nsSliderFrame.cpp +++ b/layout/xul/nsSliderFrame.cpp @@ -92,7 +92,7 @@ nsSliderFrame::Init(nsIContent* aContent, mCurPos = GetCurrentPosition(aContent); } -NS_IMETHODIMP +nsresult nsSliderFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { @@ -103,7 +103,7 @@ nsSliderFrame::RemoveFrame(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsSliderFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) @@ -116,7 +116,7 @@ nsSliderFrame::InsertFrames(ChildListID aListID, return rv; } -NS_IMETHODIMP +nsresult nsSliderFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { @@ -217,7 +217,7 @@ public: bool mDragBeginning; }; -NS_IMETHODIMP +nsresult nsSliderFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -410,7 +410,7 @@ nsSliderFrame::DoLayout(nsBoxLayoutState& aState) } -NS_IMETHODIMP +nsresult nsSliderFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) @@ -792,7 +792,7 @@ nsSliderFrame::GetType() const return nsGkAtoms::sliderFrame; } -NS_IMETHODIMP +nsresult nsSliderFrame::SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) { diff --git a/layout/xul/nsSliderFrame.h b/layout/xul/nsSliderFrame.h index 9fe12551850c..c3fa4672e61d 100644 --- a/layout/xul/nsSliderFrame.h +++ b/layout/xul/nsSliderFrame.h @@ -47,7 +47,7 @@ public: virtual ~nsSliderFrame(); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SliderFrame"), aResult); } #endif @@ -58,14 +58,14 @@ public: NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; // nsIFrame overrides - NS_IMETHOD AppendFrames(ChildListID aListID, + virtual nsresult AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD InsertFrames(ChildListID aListID, + virtual nsresult InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) MOZ_OVERRIDE; - NS_IMETHOD RemoveFrame(ChildListID aListID, + virtual nsresult RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; @@ -78,7 +78,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -87,11 +87,11 @@ public: nsIFrame* asPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; - NS_IMETHOD SetInitialChildList(ChildListID aListID, + virtual nsresult SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) MOZ_OVERRIDE; virtual nsIAtom* GetType() const MOZ_OVERRIDE; diff --git a/layout/xul/nsSplitterFrame.cpp b/layout/xul/nsSplitterFrame.cpp index f7c55739cf2e..3e4846c5f46c 100644 --- a/layout/xul/nsSplitterFrame.cpp +++ b/layout/xul/nsSplitterFrame.cpp @@ -220,7 +220,7 @@ nsSplitterFrame::DestroyFrom(nsIFrame* aDestructRoot) } -NS_IMETHODIMP +nsresult nsSplitterFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { @@ -236,7 +236,7 @@ nsSplitterFrame::GetCursor(const nsPoint& aPoint, */ } -NS_IMETHODIMP +nsresult nsSplitterFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -374,7 +374,7 @@ nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } } -NS_IMETHODIMP +nsresult nsSplitterFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/xul/nsSplitterFrame.h b/layout/xul/nsSplitterFrame.h index 01b47afa061c..115f2c12b933 100644 --- a/layout/xul/nsSplitterFrame.h +++ b/layout/xul/nsSplitterFrame.h @@ -27,13 +27,13 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("SplitterFrame"), aResult); } #endif // nsIFrame overrides - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -41,7 +41,7 @@ public: nsIFrame* aParent, nsIFrame* aPrevInFlow) MOZ_OVERRIDE; - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) MOZ_OVERRIDE; NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; @@ -63,7 +63,7 @@ public: mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; diff --git a/layout/xul/nsStackFrame.h b/layout/xul/nsStackFrame.h index 0c423c58e031..f1f90b4e4e70 100644 --- a/layout/xul/nsStackFrame.h +++ b/layout/xul/nsStackFrame.h @@ -26,7 +26,7 @@ public: nsStyleContext* aContext); #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE { return MakeFrameName(NS_LITERAL_STRING("Stack"), aResult); } diff --git a/layout/xul/nsTextBoxFrame.cpp b/layout/xul/nsTextBoxFrame.cpp index f0d7525270dd..d05a61fa8ae6 100644 --- a/layout/xul/nsTextBoxFrame.cpp +++ b/layout/xul/nsTextBoxFrame.cpp @@ -68,7 +68,7 @@ NS_QUERYFRAME_HEAD(nsTextBoxFrame) NS_QUERYFRAME_ENTRY(nsTextBoxFrame) NS_QUERYFRAME_TAIL_INHERITING(nsTextBoxFrameSuper) -NS_IMETHODIMP +nsresult nsTextBoxFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -1090,7 +1090,7 @@ nsTextBoxFrame::GetBoxAscent(nsBoxLayoutState& aBoxLayoutState) } #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsTextBoxFrame::GetFrameName(nsAString& aResult) const { MakeFrameName(NS_LITERAL_STRING("TextBox"), aResult); diff --git a/layout/xul/nsTextBoxFrame.h b/layout/xul/nsTextBoxFrame.h index 5b3c3b70affc..f65796f0f4ed 100644 --- a/layout/xul/nsTextBoxFrame.h +++ b/layout/xul/nsTextBoxFrame.h @@ -35,12 +35,12 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif void UpdateAttributes(nsIAtom* aAttribute, diff --git a/layout/xul/nsTitleBarFrame.cpp b/layout/xul/nsTitleBarFrame.cpp index aaac8584755f..b5a1a7e86ab5 100644 --- a/layout/xul/nsTitleBarFrame.cpp +++ b/layout/xul/nsTitleBarFrame.cpp @@ -55,7 +55,7 @@ nsTitleBarFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists); } -NS_IMETHODIMP +nsresult nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/xul/nsTitleBarFrame.h b/layout/xul/nsTitleBarFrame.h index 79f00f884925..549ab8ad9fc2 100644 --- a/layout/xul/nsTitleBarFrame.h +++ b/layout/xul/nsTitleBarFrame.h @@ -22,7 +22,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; diff --git a/layout/xul/nsXULLabelFrame.cpp b/layout/xul/nsXULLabelFrame.cpp index d03e2d8c803f..6aaa356962bb 100644 --- a/layout/xul/nsXULLabelFrame.cpp +++ b/layout/xul/nsXULLabelFrame.cpp @@ -80,7 +80,7 @@ nsXULLabelFrame::DestroyFrom(nsIFrame* aDestructRoot) nsBlockFrame::DestroyFrom(aDestructRoot); } -NS_IMETHODIMP +nsresult nsXULLabelFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) @@ -106,7 +106,7 @@ nsXULLabelFrame::GetType() const // Diagnostics #ifdef DEBUG_FRAME_DUMP -NS_IMETHODIMP +nsresult nsXULLabelFrame::GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("XULLabel"), aResult); diff --git a/layout/xul/nsXULLabelFrame.h b/layout/xul/nsXULLabelFrame.h index 5fc955ffaa4d..a796e353bac8 100644 --- a/layout/xul/nsXULLabelFrame.h +++ b/layout/xul/nsXULLabelFrame.h @@ -30,7 +30,7 @@ public: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; @@ -42,7 +42,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP - NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; #endif protected: diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp index 3d374a689031..a90ef4f88d09 100644 --- a/layout/xul/tree/nsTreeBodyFrame.cpp +++ b/layout/xul/tree/nsTreeBodyFrame.cpp @@ -2522,7 +2522,7 @@ nsTreeBodyFrame::CalcHorzWidth(const ScrollParts& aParts) return width; } -NS_IMETHODIMP +nsresult nsTreeBodyFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { @@ -2563,7 +2563,7 @@ static uint32_t GetDropEffect(WidgetGUIEvent* aEvent) return action; } -NS_IMETHODIMP +nsresult nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext, WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) diff --git a/layout/xul/tree/nsTreeBodyFrame.h b/layout/xul/tree/nsTreeBodyFrame.h index 911aa4c8e835..08d15d538df1 100644 --- a/layout/xul/tree/nsTreeBodyFrame.h +++ b/layout/xul/tree/nsTreeBodyFrame.h @@ -150,10 +150,10 @@ public: nsIFrame* aPrevInFlow) MOZ_OVERRIDE; virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; - NS_IMETHOD GetCursor(const nsPoint& aPoint, + virtual nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) MOZ_OVERRIDE; - NS_IMETHOD HandleEvent(nsPresContext* aPresContext, + virtual nsresult HandleEvent(nsPresContext* aPresContext, mozilla::WidgetGUIEvent* aEvent, nsEventStatus* aEventStatus) MOZ_OVERRIDE; diff --git a/layout/xul/tree/nsTreeColFrame.cpp b/layout/xul/tree/nsTreeColFrame.cpp index 2a958a0b1fa3..0842e0cb1304 100644 --- a/layout/xul/tree/nsTreeColFrame.cpp +++ b/layout/xul/tree/nsTreeColFrame.cpp @@ -127,7 +127,7 @@ nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, nsDisplayXULTreeColSplitterTarget(aBuilder, this)); } -NS_IMETHODIMP +nsresult nsTreeColFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) diff --git a/layout/xul/tree/nsTreeColFrame.h b/layout/xul/tree/nsTreeColFrame.h index bad44a539151..10912b31549b 100644 --- a/layout/xul/tree/nsTreeColFrame.h +++ b/layout/xul/tree/nsTreeColFrame.h @@ -30,7 +30,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists) MOZ_OVERRIDE; - NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, + virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE; From dd3e43e814c48631a2ff137347091f64ca4bfea7 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Tue, 18 Feb 2014 00:08:41 -0800 Subject: [PATCH 41/56] Bug 973807 - Fixes to AndroidEclipse build backend. r=me Largest changes: run mach less frequently and add build logging. --- mobile/android/base/moz.build | 4 +- .../mozbuild/backend/android_eclipse.py | 26 +++---- .../.externalToolBuilders/Builder.launch | 5 +- .../templates/android_eclipse/build.xml | 74 +++++++++++++++++-- .../test/backend/test_android_eclipse.py | 16 ++-- 5 files changed, 98 insertions(+), 27 deletions(-) diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index 2c0c4371d89a..73315dcb41d5 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -502,13 +502,15 @@ main.recursive_make_targets += [OBJDIR + '/generated/' + f for f in mgjar.genera main.recursive_make_targets += [OBJDIR + '/generated/' + f for f in gbjar.generated_sources] main.included_projects += ['../' + generated.name, '../' + branding.name] +main.referenced_projects += [generated.name, branding.name] main.extra_jars += [CONFIG['ANDROID_COMPAT_LIB']] main.assets = TOPOBJDIR + '/dist/fennec/assets' main.libs = TOPOBJDIR + '/dist/fennec/lib' cpe = main.add_classpathentry('src', SRCDIR, dstdir='src/org/mozilla/gecko', - exclude_patterns=['org/mozilla/gecko/tests/**']) + exclude_patterns=['org/mozilla/gecko/tests/**', + 'org/mozilla/gecko/resources/**']) if not CONFIG['MOZ_CRASHREPORTER']: cpe.exclude_patterns += ['org/mozilla/gecko/CrashReporter.java'] main.add_classpathentry('generated', OBJDIR + '/generated', diff --git a/python/mozbuild/mozbuild/backend/android_eclipse.py b/python/mozbuild/mozbuild/backend/android_eclipse.py index 3c86e9d1f565..315b848610e1 100644 --- a/python/mozbuild/mozbuild/backend/android_eclipse.py +++ b/python/mozbuild/mozbuild/backend/android_eclipse.py @@ -106,13 +106,12 @@ class AndroidEclipseBackend(CommonBackend): def _Element_for_extra_jar(self, name): """Turn a referenced JAR name into an XML Element, like: - + """ e = ET.Element('classpathentry') e.set('kind', 'lib') - # All project directories are in the same root; this - # reference is absolute in the Eclipse namespace. - e.set('path', 'libs/' + name) + e.set('exported', 'true') + e.set('path', name) return e def _manifest_for_project(self, srcdir, project): @@ -130,17 +129,18 @@ class AndroidEclipseBackend(CommonBackend): for cpe in project._classpathentries: manifest.add_symlink(mozpath.join(srcdir, cpe.srcdir), cpe.dstdir) - # JARs and native libraries go in the same place. This - # wouldn't be a problem, except we only know the contents of - # (a subdirectory of) libs/ after a successful build and - # package, which is after build-backend time. So we use a - # pattern symlink that is resolved at manifest install time. + # JARs and native libraries go in the same place. For now, + # we're adding class path entries with the full path to + # required JAR files (which makes sense for JARs in the source + # directory, but probably doesn't for JARs in the object + # directory). This could be a problem because we only know + # the contents of (a subdirectory of) libs/ after a successful + # build and package, which is after build-backend time. So we + # use a pattern symlink that is resolved at manifest install + # time. if project.libs: manifest.add_pattern_copy(mozpath.join(srcdir, project.libs), '**', 'libs') - for extra_jar in sorted(project.extra_jars): - manifest.add_copy(mozpath.join(srcdir, extra_jar), mozpath.join('libs', os.path.basename(extra_jar))) - return manifest def _process_android_eclipse_project_data(self, data, srcdir, objdir): @@ -166,7 +166,7 @@ class AndroidEclipseBackend(CommonBackend): classpathentries.append(ET.tostring(e)) for name in sorted(data.extra_jars): - e = self._Element_for_extra_jar(os.path.basename(name)) + e = self._Element_for_extra_jar(mozpath.join(srcdir, name)) classpathentries.append(ET.tostring(e)) defines = {} diff --git a/python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/Builder.launch b/python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/Builder.launch index 5bb551b93a03..1e83d0e7f27c 100644 --- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/Builder.launch +++ b/python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/Builder.launch @@ -2,17 +2,18 @@ - + - + + diff --git a/python/mozbuild/mozbuild/backend/templates/android_eclipse/build.xml b/python/mozbuild/mozbuild/backend/templates/android_eclipse/build.xml index 876d6a0eeec0..1d3637422e23 100644 --- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/build.xml +++ b/python/mozbuild/mozbuild/backend/templates/android_eclipse/build.xml @@ -1,12 +1,76 @@ #filter substitution - - - - - + + + + + // This file can get large (!), but for a short time we want to + // log as much information for debugging build loops as possible. + + + + + + + + diff --git a/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py b/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py index 9d345d2a7fd7..6dda593ada46 100644 --- a/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py +++ b/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py @@ -96,6 +96,16 @@ class TestAndroidEclipseBackend(BackendTester): lines = [line.strip() for line in lines] self.assertIn('', lines) + def test_extra_jars(self): + """Ensure we add class path entries to extra jars iff asked to.""" + self.env = self._consume('android_eclipse', AndroidEclipseBackend) + self.assertExists('main2', '.classpath') + # This is brittle but simple. + with open(mozpath.join(self.env.topobjdir, 'android_eclipse', 'main2', '.classpath'), 'rt') as fh: + lines = fh.readlines() + lines = [line.strip() for line in lines] + self.assertIn('' % self.env.topsrcdir, lines) + def test_included_projects(self): """Ensure we include another project correctly.""" self.env = self._consume('android_eclipse', AndroidEclipseBackend) @@ -140,12 +150,6 @@ class TestAndroidEclipseBackend(BackendTester): self.assertNotInManifest('main1', 'assets') self.assertInManifest('main2', 'assets') - def test_manifest_extra_jars(self): - """Ensure we symlink extra jars iff asked to.""" - self.env = self._consume('android_eclipse', AndroidEclipseBackend) - self.assertNotInManifest('main1', 'libs') - self.assertInManifest('main2', 'libs/extra.jar') - if __name__ == '__main__': main() From 82a95053ba58c66320ab62638751df6e9ae7147c Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 00:10:10 -0800 Subject: [PATCH 42/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/4293080ceedf Author: Kevin Grandon Desc: Merge pull request #16359 from evanxd/bug-921723 Bug 921723 - Sync progress indicator persists onto day view ======== https://hg.mozilla.org/integration/gaia-central/rev/f2163cf15687 Author: Evan Xd Desc: Bug 921723 - Move the progress indicator on the below of time-header. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 70783477a4b3..aec8cb57fcb2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "da2401e07938b5f0d891ee477a752e37ccf9b9fa", + "revision": "4293080ceedfaaaaec5fc13695d3c747631687c7", "repo_path": "/integration/gaia-central" } From 2270be2544f6deade5de29d5445eb31e0e8f8212 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 00:16:02 -0800 Subject: [PATCH 43/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 585d6173e1cd..3f0fb30da75d 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index c06bc2438644..09a7ac0dab63 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 585d6173e1cd..3f0fb30da75d 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index ee22c142b664..a456d9ad5abb 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 73ee8601d542..b6f9db75b02b 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 6019e257bf3f..6eb86a46ad01 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 5d6007934a93..00b4101c4081 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 6811c7c91816..8770f5f847cc 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 05db988dbc30..220e5b7e0922 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From 2799490996110f53dce2d01775d7a304421f319a Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 00:25:11 -0800 Subject: [PATCH 44/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/8160f6a0e58f Author: Kevin Grandon Desc: Merge pull request #16384 from KevinGrandon/bug_941484_follow_up Bug 941484 - [System2] Fix bootstrap test ordering ======== https://hg.mozilla.org/integration/gaia-central/rev/9c47dd9176e0 Author: Kevin Grandon Desc: Bug 941484 - [System2] Fix bootstrap test ordering --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index aec8cb57fcb2..64c552f337f3 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "4293080ceedfaaaaec5fc13695d3c747631687c7", + "revision": "8160f6a0e58f1831d63a7e776624be0b77491f30", "repo_path": "/integration/gaia-central" } From 6a91e442e44a447c5ba9269fb18a3e8b5b859ef6 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 00:25:58 -0800 Subject: [PATCH 45/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 3f0fb30da75d..d8d15690d2c1 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 09a7ac0dab63..784e05786ce9 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 3f0fb30da75d..d8d15690d2c1 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index a456d9ad5abb..3a78269d8bbb 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index b6f9db75b02b..04d799043bcb 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 6eb86a46ad01..5d436a832e78 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 00b4101c4081..9788ca4bd9a2 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 8770f5f847cc..eea1d46fc5f9 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 220e5b7e0922..6b52ef0cef9b 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From a9f43c115f4c6ec24891da6c5767c6a7c62687d1 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Tue, 18 Feb 2014 21:31:55 +1300 Subject: [PATCH 46/56] b=973782 revert 8e574d7a951a, failing test from bug 938022 DONTBUILD --- content/media/webaudio/test/mochitest.ini | 1 - .../media/webaudio/test/test_bug938022.html | 28 ------------------- 2 files changed, 29 deletions(-) delete mode 100644 content/media/webaudio/test/test_bug938022.html diff --git a/content/media/webaudio/test/mochitest.ini b/content/media/webaudio/test/mochitest.ini index 727d763b25c5..9a7370c02cd1 100644 --- a/content/media/webaudio/test/mochitest.ini +++ b/content/media/webaudio/test/mochitest.ini @@ -63,7 +63,6 @@ support-files = [test_bug875221.html] [test_bug875402.html] [test_bug894150.html] -[test_bug938022.html] [test_bug956489.html] [test_bug964376.html] [test_channelMergerNode.html] diff --git a/content/media/webaudio/test/test_bug938022.html b/content/media/webaudio/test/test_bug938022.html deleted file mode 100644 index 9671c1a69193..000000000000 --- a/content/media/webaudio/test/test_bug938022.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - Test audio element currentTime is correct when used as media source - - - - -
-
-
- - From ac04e51450e19f5d31d47cbc09977fa04ebdf7fa Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 00:35:11 -0800 Subject: [PATCH 47/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/0976a3ff6388 Author: Luke Chang Desc: Merge pull request #16356 from luke-chang/971452_instantiable_activity_window_factory Bug 971452 - [System2] Instantiable ActivityWindowFactory, r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/a39e5e7ba971 Author: Luke Chang Desc: Bug 971452 - [System2] Instantiable ActivityWindowFactory --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 64c552f337f3..7dd209bc9a0b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "8160f6a0e58f1831d63a7e776624be0b77491f30", + "revision": "0976a3ff63886baac246768c6b8a7be12267a4ab", "repo_path": "/integration/gaia-central" } From bc6335c3193eada07be28093ad7cfff1fadcb9b2 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 00:41:00 -0800 Subject: [PATCH 48/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index d8d15690d2c1..63850dcab743 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@
- + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 784e05786ce9..8c0122335800 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index d8d15690d2c1..63850dcab743 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 3a78269d8bbb..485611fc28f5 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 04d799043bcb..49eac875b9fb 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 5d436a832e78..c6c1f748416b 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 9788ca4bd9a2..2b46933211c0 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index eea1d46fc5f9..2efa7616caf5 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 6b52ef0cef9b..eb0e0234a2fe 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From 3c55b95df3c358462e4d3d0f561a26681614bb5e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 01:15:13 -0800 Subject: [PATCH 49/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/16d0fa02d9f3 Author: Greg Weng Desc: Merge pull request #16292 from saminath/nfc_url_improve_4 Bug 969217 - Improvement for the function of sharing of URLs. r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/13a4b9341a9f Author: s.x.veerapandian Desc: Bug 969217 - Improvement for the function of sharing of URLs. r=alive --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 7dd209bc9a0b..9239a0a33375 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "0976a3ff63886baac246768c6b8a7be12267a4ab", + "revision": "16d0fa02d9f3d338d0d916ad02a32f463ce2cbe3", "repo_path": "/integration/gaia-central" } From e6e9cd287d944f29c92dba76ff861da23e26f7db Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 01:21:01 -0800 Subject: [PATCH 50/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 63850dcab743..8d1b11c928a5 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 8c0122335800..7dc1303de95b 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 63850dcab743..8d1b11c928a5 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 485611fc28f5..205dd0e587bd 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 49eac875b9fb..eac5ad361132 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index c6c1f748416b..ef83337b990e 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 2b46933211c0..17e16f7e0872 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 2efa7616caf5..16d4ea7d53a9 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index eb0e0234a2fe..b4957bda4fed 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From fe89abbea2acd1f632682be05a5f1e577ec5e7b9 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 01:25:11 -0800 Subject: [PATCH 51/56] Bumping gaia.json for 6 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/4da7d6e06cc0 Author: steveck-chung Desc: Merge pull request #16347 from steveck-chung/bug-972245 Bug 972245 - Photos can appear distorted in the call log and in the SMS(SMS part only), r=julienw. ======== https://hg.mozilla.org/integration/gaia-central/rev/c2b4329d63c3 Author: Steve Chung Desc: Bug 972245 - Photos can appear distorted in the call log and in the SMS app(SMS part) ======== https://hg.mozilla.org/integration/gaia-central/rev/62a77fd8abf3 Author: gasolin Desc: Merge pull request #16233 from gasolin/issue-968682 Bug 968682 - [settings] add marionette test for Notifications panel, r=arthur&evan ======== https://hg.mozilla.org/integration/gaia-central/rev/48a9a5fbcd6c Author: gasolin Desc: Bug 968682 - [settings] add marionette test for Notifications panel ======== https://hg.mozilla.org/integration/gaia-central/rev/69fd6752d88f Author: Timothy Guan-tin Chien Desc: Merge pull request #16280 from timdream/system2-hardwarebuttons Bug 971495 - [System2] Instantiable HardwareButtons, r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/68986d8dbc32 Author: Timothy Guan-tin Chien Desc: Bug 971495 - [System2] Instantiable HardwareButton --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 9239a0a33375..e63a357985b2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "16d0fa02d9f3d338d0d916ad02a32f463ce2cbe3", + "revision": "4da7d6e06cc0fdf293bd99a993e43186f55bc799", "repo_path": "/integration/gaia-central" } From 8e2b853ae3aa7c17c7c2bacfce9826f82ecde5d3 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 01:25:58 -0800 Subject: [PATCH 52/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 8d1b11c928a5..a5af31260ed7 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 7dc1303de95b..f11fefa87907 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 8d1b11c928a5..a5af31260ed7 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 205dd0e587bd..f41d8b095c76 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index eac5ad361132..6a950e9b6f2a 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index ef83337b990e..1f1ab5fd06fd 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index 17e16f7e0872..a96f8b48f933 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index 16d4ea7d53a9..b771f7e71794 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index b4957bda4fed..d2b3bdc1b7de 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From 8b5e90b81de4f22933899e8129d62fead2e6d8e0 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 01:50:11 -0800 Subject: [PATCH 53/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/84c55a230c57 Author: Julien Wajsberg Desc: Merge pull request #16348 from julienw/973490-npm-link Bug 973490 - [TestAgent] don't run `npm install` if `npm ink` is used r=... ======== https://hg.mozilla.org/integration/gaia-central/rev/fd6b8c15e5ac Author: Julien Wajsberg Desc: Bug 973490 - [TestAgent] don't run `npm install` if `npm ink` is used r=yurenju --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e63a357985b2..caa80c9cd172 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "4da7d6e06cc0fdf293bd99a993e43186f55bc799", + "revision": "84c55a230c57bdbfeb779b6a1b47e9634fddb637", "repo_path": "/integration/gaia-central" } From a81292a46a7809737a027c6610915739111571e5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 01:56:00 -0800 Subject: [PATCH 54/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a5af31260ed7..57c561786383 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index f11fefa87907..546d9d172248 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a5af31260ed7..57c561786383 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index f41d8b095c76..a744738ea821 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 6a950e9b6f2a..c8b0f0a3b690 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index 1f1ab5fd06fd..a413652ed7ed 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index a96f8b48f933..f160dd7ff025 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index b771f7e71794..aa80a99c68ec 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index d2b3bdc1b7de..8730c3017fa4 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - + From 9c750365d2146e8ee4b60e8ee43d52c69701ca9e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 02:05:11 -0800 Subject: [PATCH 55/56] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/8d15cd3ac0d0 Author: Timothy Guan-tin Chien Desc: Merge pull request #16393 from timdream/lockscreen-backgroundsize Bug 971654 - Correct lockscreen background sizing, r=snowmantw ======== https://hg.mozilla.org/integration/gaia-central/rev/689dd440bf7c Author: Timothy Guan-tin Chien Desc: Bug 971654 - Correct lockscreen background sizing --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index caa80c9cd172..8b1a888e0085 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "84c55a230c57bdbfeb779b6a1b47e9634fddb637", + "revision": "8d15cd3ac0d07cde9ff36ce611ae47e6ef30d9b0", "repo_path": "/integration/gaia-central" } From 2034a129a4e6856e6ab753fc604ef9e1907cfc8b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 18 Feb 2014 02:10:58 -0800 Subject: [PATCH 56/56] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/inari/sources.xml | 2 +- b2g/config/leo/sources.xml | 2 +- b2g/config/mako/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 57c561786383..9f89b4574051 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 546d9d172248..48c3494a597a 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 57c561786383..9f89b4574051 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index a744738ea821..e23c51fd8549 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index c8b0f0a3b690..fb5df089ead5 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,7 +10,7 @@ - + diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml index a413652ed7ed..e29cafb03970 100644 --- a/b2g/config/inari/sources.xml +++ b/b2g/config/inari/sources.xml @@ -12,7 +12,7 @@ - + diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml index f160dd7ff025..eecebdf6777e 100644 --- a/b2g/config/leo/sources.xml +++ b/b2g/config/leo/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml index aa80a99c68ec..d62639c8da4b 100644 --- a/b2g/config/mako/sources.xml +++ b/b2g/config/mako/sources.xml @@ -11,7 +11,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 8730c3017fa4..ac814e185830 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -11,7 +11,7 @@ - +