diff options
585 files changed, 27009 insertions, 9034 deletions
diff --git a/JavaScriptCore/API/APIShims.h b/JavaScriptCore/API/APIShims.h index d7276ec..9a6cacb 100644 --- a/JavaScriptCore/API/APIShims.h +++ b/JavaScriptCore/API/APIShims.h @@ -80,12 +80,10 @@ public: , m_globalData(&exec->globalData()) { resetCurrentIdentifierTable(); - m_globalData->timeoutChecker.start(); } ~APICallbackShim() { - m_globalData->timeoutChecker.stop(); setCurrentIdentifierTable(m_globalData->identifierTable); } diff --git a/JavaScriptCore/API/JSClassRef.cpp b/JavaScriptCore/API/JSClassRef.cpp index 747aa16..717488f 100644 --- a/JavaScriptCore/API/JSClassRef.cpp +++ b/JavaScriptCore/API/JSClassRef.cpp @@ -82,7 +82,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (!valueName.isNull()) { // Use a local variable here to sidestep an RVCT compiler bug. StaticValueEntry* entry = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes); - m_staticValues->add(valueName.rep()->ref(), entry); + UStringImpl* impl = valueName.rep(); + impl->ref(); + m_staticValues->add(impl, entry); } ++staticValue; } @@ -95,7 +97,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (!functionName.isNull()) { // Use a local variable here to sidestep an RVCT compiler bug. StaticFunctionEntry* entry = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes); - m_staticFunctions->add(functionName.rep()->ref(), entry); + UStringImpl* impl = functionName.rep(); + impl->ref(); + m_staticFunctions->add(impl, entry); } ++staticFunction; } @@ -167,7 +171,7 @@ OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) ASSERT(!it->first->isIdentifier()); // Use a local variable here to sidestep an RVCT compiler bug. StaticValueEntry* entry = new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes); - staticValues->add(UString::Rep::create(it->first->data(), it->first->size()), entry); + staticValues->add(UString::Rep::create(it->first->data(), it->first->length()), entry); } } else staticValues = 0; @@ -179,7 +183,7 @@ OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) ASSERT(!it->first->isIdentifier()); // Use a local variable here to sidestep an RVCT compiler bug. StaticFunctionEntry* entry = new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes); - staticFunctions->add(UString::Rep::create(it->first->data(), it->first->size()), entry); + staticFunctions->add(UString::Rep::create(it->first->data(), it->first->length()), entry); } } else diff --git a/JavaScriptCore/API/JSContextRef.cpp b/JavaScriptCore/API/JSContextRef.cpp index 6bdc3c8..2c76338 100644 --- a/JavaScriptCore/API/JSContextRef.cpp +++ b/JavaScriptCore/API/JSContextRef.cpp @@ -120,11 +120,13 @@ JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx) void JSGlobalContextRelease(JSGlobalContextRef ctx) { ExecState* exec = toJS(ctx); - APIEntryShim entryShim(exec, false); + JSLock lock(exec); + + JSGlobalData& globalData = exec->globalData(); + IdentifierTable* savedIdentifierTable = setCurrentIdentifierTable(globalData.identifierTable); gcUnprotect(exec->dynamicGlobalObject()); - JSGlobalData& globalData = exec->globalData(); if (globalData.refCount() == 2) { // One reference is held by JSGlobalObject, another added by JSGlobalContextRetain(). // The last reference was released, this is our last chance to collect. globalData.heap.destroy(); @@ -132,6 +134,8 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx) globalData.heap.collectAllGarbage(); globalData.deref(); + + setCurrentIdentifierTable(savedIdentifierTable); } JSObjectRef JSContextGetGlobalObject(JSContextRef ctx) diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index 4257344..3d1a925 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,625 @@ +2010-02-19 Oliver Hunt <oliver@apple.com> + + RS = Gavin Barraclough. + + Split the 32/64 version of JITPropertyAccess into a separate file. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JITPropertyAccess.cpp: + * jit/JITPropertyAccess32_64.cpp: Added. + (JSC::JIT::emit_op_put_by_index): + (JSC::JIT::emit_op_put_getter): + (JSC::JIT::emit_op_put_setter): + (JSC::JIT::emit_op_del_by_id): + (JSC::JIT::emit_op_method_check): + (JSC::JIT::emitSlow_op_method_check): + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitSlow_op_put_by_val): + (JSC::JIT::emit_op_get_by_id): + (JSC::JIT::emitSlow_op_get_by_id): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::compilePutDirectOffset): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchMethodCallProto): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::emit_op_get_by_pname): + (JSC::JIT::emitSlow_op_get_by_pname): + +2010-02-19 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Laszlo Gombos. + + Added additional parameter to create_rvct_stubs + for setting the regularexpression prefix. + Renamed it because it now works for other platforms too. + https://bugs.webkit.org/show_bug.cgi?id=34951 + + * DerivedSources.pro: + * create_jit_stubs: Copied from JavaScriptCore/create_rvct_stubs. + * create_rvct_stubs: Removed. + +2010-02-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve interpreter getter performance + https://bugs.webkit.org/show_bug.cgi?id=35138 + + Improve the performance of getter dispatch by making it possible + for the interpreter to cache the GetterSetter object lookup. + + To do this we simply need to make PropertySlot aware of getters + as a potentially cacheable property, and record the base and this + objects for a getter access. This allows us to use more-or-less + identical code to that used by the normal get_by_id caching, with + the dispatch being the only actual difference. + + I'm holding off of implementing this in the JIT until I do some + cleanup to try and making coding in the JIT not be as horrible + as it is currently. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::refStructures): + * bytecode/Opcode.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSObject.cpp: + (JSC::JSObject::fillGetterPropertySlot): + * runtime/PropertySlot.cpp: + (JSC::PropertySlot::functionGetter): + * runtime/PropertySlot.h: + (JSC::PropertySlot::isGetter): + (JSC::PropertySlot::isCacheable): + (JSC::PropertySlot::isCacheableValue): + (JSC::PropertySlot::setValueSlot): + (JSC::PropertySlot::setGetterSlot): + (JSC::PropertySlot::setCacheableGetterSlot): + (JSC::PropertySlot::clearOffset): + (JSC::PropertySlot::thisValue): + +2010-02-17 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Fixed a portion of: + <rdar://problem/7165917> | https://bugs.webkit.org/show_bug.cgi?id=28676 + Safari 4 does not release memory back to the operating system fast enough (28676) + + This patch fixes a surprisingly common edge case in which the page heap + would have only one free span, but that span would be larger than the + minimum free size, so we would decide not to free it, even though it + could be as large as 100MB or more! + + SunSpider reports no change on Mac or Windows. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavenge): Call shouldContinueScavenging() instead + of doing the math ourselves. Don't keep a local value for pagesDecommitted + because that lets free_committed_pages_ be wrong temporarily. Instead, + update free_committed_pages_ as we go. ASSERT that we aren't releasing + a span that has already been released, because we think this is impossible. + Finally, don't be afraid to release all free memory in the page heap when + scavenging. We only scavenge after 5 seconds of the application's working + set not growing, and we keep both thread caches and a central cache on + top of the page heap, so the extra free pages in the page heap were just + overkill. + +2010-02-17 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=35070 + Addition of 2 strings of length 2^31 may result in a string of length 0. + + Check for overflow when creating a new JSString as a result of an addition + or concatenation, throw an out of memory exception. + + * runtime/JSString.h: + (JSC::): + * runtime/Operations.h: + (JSC::jsString): + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + [Linux] Webkit incompatible with Java plugins + https://bugs.webkit.org/show_bug.cgi?id=24912 + + Add support for GFile to GOwnPtr. + + Based on original work by Gustavo Noronha. + + * wtf/gtk/GOwnPtr.cpp: + (WTF::GFile): + * wtf/gtk/GOwnPtr.h: + +2010-02-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Mark Rowe. + + Fix a handful of other leaks seen on the buildbot. + + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::deref): Delegate through to the subclass version of deref to ensure that + the correct cleanup takes place. This function previously featured some code that attempted to + skip deletion of static UStringImpl's. Closer inspection revealed that it was in fact equivalent + to "if (false)", meaning that UStringImpl's which had their final deref performed via this function + were leaked. + +2010-02-16 Mark Rowe <mrowe@apple.com> + + Reviewed by Gavin Barraclough. + + Fix a handful of leaks seen on the buildbot. + + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::deref): Call URopeImpl::destructNonRecursive rather than delete + to ensure that the rope's fibers are also destroyed. + +2010-02-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=34964 + Leaks tool reports false memory leaks due to Rope implementation. + + A rope is a recursive data structure where each node in the rope holds a set of + pointers, each of which may reference either a string (in UStringImpl form) or + another rope node. A low bit in each pointer is used to distinguish between + rope & string elements, in a fashion similar to the recently-removed + PtrAndFlags class (see https://bugs.webkit.org/show_bug.cgi?id=33731 ). Again, + this causes a problem for Leaks – refactor to remove the magic pointer + mangling. + + Move Rope out from JSString.h and rename to URopeImpl, to match UStringImpl. + Give UStringImpl and URopeImpl a common parent class, UStringOrRopeImpl. + Repurpose an otherwise invalid permutation to flags (static & should report + memory cost) to identify ropes. + + This allows us to change the rope's fibers to interrogate the object rather + than storing a bool within the low bits of the pointer (or in some cases the + use of a common parent class removes the need to determine the type at all - + there is a common interface to ref or get the length of either ropes or strings). + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::keyForCharacterSwitch): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + (JSC::Identifier::addSlowCase): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/JSString.h: + (JSC::): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::~JSString): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::JSStringFinalizerStruct::JSStringFinalizerStruct): + (JSC::RopeBuilder::JSStringFinalizerStruct::): + * runtime/UString.cpp: + (JSC::UString::toStrictUInt32): + (JSC::equal): + * runtime/UString.h: + (JSC::UString::isEmpty): + (JSC::UString::size): + * runtime/UStringImpl.cpp: + (JSC::URopeImpl::derefFibersNonRecursive): + (JSC::URopeImpl::destructNonRecursive): + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::isRope): + (JSC::UStringOrRopeImpl::length): + (JSC::UStringOrRopeImpl::ref): + (JSC::UStringOrRopeImpl::): + (JSC::UStringOrRopeImpl::operator new): + (JSC::UStringOrRopeImpl::UStringOrRopeImpl): + (JSC::UStringImpl::adopt): + (JSC::UStringImpl::createUninitialized): + (JSC::UStringImpl::tryCreateUninitialized): + (JSC::UStringImpl::data): + (JSC::UStringImpl::cost): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::): + (JSC::URopeImpl::tryCreateUninitialized): + (JSC::URopeImpl::initializeFiber): + (JSC::URopeImpl::fiberCount): + (JSC::URopeImpl::fibers): + (JSC::URopeImpl::deref): + (JSC::URopeImpl::URopeImpl): + (JSC::URopeImpl::hasOneRef): + (JSC::UStringOrRopeImpl::deref): + +2010-02-15 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32) + https://bugs.webkit.org/show_bug.cgi?id=34939 + + * jit/JITStubs.cpp: + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build Fix!). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Some general Rope related refactoring. + + Rename Rope::m_ropeLength to m_fiberCount, to be more descriptive. + Rename Rope::m_stringLength to simply m_length (since this is the + more conventional name for the length of a string). Move append + behaviour out into a new RopeBuilder class, so that Rope no longer + needs any knowledge of the JSString or UString implementation. + + Make Rope no longer be nested within JSString. + (Rope now no-longer need reside within JSString.h, but leaving + the change of moving this out to a different header as a separate + change from these renames). + + * JavaScriptCore.exp: + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * runtime/JSString.cpp: + (JSC::Rope::destructNonRecursive): + (JSC::Rope::~Rope): + (JSC::JSString::resolveRope): + (JSC::JSString::toBoolean): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::Rope::Fiber::Fiber): + (JSC::Rope::Fiber::deref): + (JSC::Rope::Fiber::ref): + (JSC::Rope::Fiber::refAndGetLength): + (JSC::Rope::Fiber::isRope): + (JSC::Rope::Fiber::rope): + (JSC::Rope::Fiber::isString): + (JSC::Rope::Fiber::string): + (JSC::Rope::Fiber::nonFiber): + (JSC::Rope::tryCreateUninitialized): + (JSC::Rope::append): + (JSC::Rope::fiberCount): + (JSC::Rope::length): + (JSC::Rope::fibers): + (JSC::Rope::Rope): + (JSC::Rope::operator new): + (JSC::): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::~JSString): + (JSC::RopeBuilder::length): + (JSC::RopeBuilder::canGetIndex): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::isRope): + (JSC::RopeBuilder::fiberCount): + (JSC::JSString::getStringPropertySlot): + * runtime/Operations.h: + (JSC::jsString): + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build fix). + + Add missing cast for !YARR (PPC) builds. + + * runtime/RegExp.cpp: + (JSC::RegExp::match): + +2010-02-14 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Many false leaks in release builds due to PtrAndFlags + + StructureTransitionTable was effectively a smart pointer type, + one machine word in size and wholly contained as a member of + of Structure. It either pointed to an actual table, or could + be used to describe a single transtion entry without use of a + table. + + This, however, worked by using a PtrAndFlags, which is not + compatible with the leaks tool. Since there is no clear way to + obtain another bit for 'free' here, and since there are bits + available up in Structure, merge this functionality back up into + Structure. Having this in a separate class was quite clean + from an enacapsulation perspective, but this solution doesn't + seem to bad - all table access is now intermediated through the + Structure::structureTransitionTableFoo methods, keeping the + optimization fairly well contained. + + This was the last use of PtrAndFlags, so removing the file too. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.h: + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::~Structure): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::hasTransition): + * runtime/Structure.h: + (JSC::Structure::): + (JSC::Structure::structureTransitionTableContains): + (JSC::Structure::structureTransitionTableGet): + (JSC::Structure::structureTransitionTableHasTransition): + (JSC::Structure::structureTransitionTableRemove): + (JSC::Structure::structureTransitionTableAdd): + (JSC::Structure::structureTransitionTable): + (JSC::Structure::setStructureTransitionTable): + (JSC::Structure::singleTransition): + (JSC::Structure::setSingleTransition): + * runtime/StructureTransitionTable.h: + * wtf/PtrAndFlags.h: Removed. + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Rubber Stamped by Geoff Garen. + + Bug 34948 - tryMakeString should fail on error in length calculation + + Ooops! - "bool overflow" argument should have been "bool& overflow". + + * runtime/UString.h: + (JSC::sumWithOverflow): + (JSC::tryMakeString): + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build Fix (pt 2!)). + + Some symbol names have changed, remove, will readd if required. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build Fix (pt 1?)). + + Some symbol names have changed, remove, will readd if required. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Removed some mistaken code added in http://trac.webkit.org/changeset/53860. + + * API/APIShims.h: + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): No need to start/stop the + timeout checker when calling out from the API to the client; we want to + monitor the VM for timeouts, not the client. This mistake was harmless / + undetectable, since it's totally redundant with the APIEntryShim, which + also starts / stops the timeout checker. + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 34952 - String lengths in UString should be unsigned. + This matches WebCore::StringImpl, and better unifies behaviour throughout JSC. + + * JavaScriptCore.exp: + * bytecode/EvalCodeCache.h: + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + * runtime/Identifier.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEscape): + * runtime/JSONObject.cpp: + (JSC::gap): + (JSC::Stringifier::indent): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncSplit): + (JSC::trimString): + * runtime/UString.cpp: + (JSC::UString::UString): + (JSC::UString::from): + (JSC::UString::getCString): + (JSC::UString::ascii): + (JSC::UString::operator[]): + (JSC::UString::toStrictUInt32): + (JSC::UString::find): + (JSC::UString::rfind): + (JSC::UString::substr): + (JSC::operator<): + (JSC::operator>): + (JSC::compare): + (JSC::equal): + (JSC::UString::UTF8String): + * runtime/UString.h: + (JSC::UString::size): + (JSC::operator==): + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::create): + * runtime/UStringImpl.h: + (JSC::UStringImpl::create): + (JSC::UStringImpl::size): + (JSC::UStringImpl::computeHash): + (JSC::UStringImpl::UStringImpl): + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 34948 - tryMakeString should fail on error in length calculation + + The sum of the length of substrings could overflow. + + * runtime/UString.h: + (JSC::sumWithOverflow): + (JSC::tryMakeString): + +2010-02-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Fixed <rdar://problem/7628524> Crash beneath JSGlobalContextRelease when + typing in Google search field with GuardMalloc/full page heap enabled + + * API/JSContextRef.cpp: Don't use APIEntryShim, since that requires + a JSGlobalData, which this function destroys. Do use setCurrentIdentifierTable + and JSLock instead, since those are the two features of APIEntryShim we + require. + +2010-02-15 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Laszlo Gombos. + + Added additional parameter to create_rvct_stubs + for setting the offset of thunkReturnAddress. + https://bugs.webkit.org/show_bug.cgi?id=34657 + + * create_rvct_stubs: + * jit/JITStubs.cpp: + +2010-02-15 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Fix QScriptValue::toIntXX methods. + + More ECMA Script compliance. + + [Qt] QScriptValue::toIntXX returns incorrect values + https://bugs.webkit.org/show_bug.cgi?id=34847 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::toInteger): + (QScriptValuePrivate::toInt32): + (QScriptValuePrivate::toUInt32): + (QScriptValuePrivate::toUInt16): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::toInteger_initData): + (tst_QScriptValue::toInteger_makeData): + (tst_QScriptValue::toInteger_test): + (tst_QScriptValue::toInt32_initData): + (tst_QScriptValue::toInt32_makeData): + (tst_QScriptValue::toInt32_test): + (tst_QScriptValue::toUInt32_initData): + (tst_QScriptValue::toUInt32_makeData): + (tst_QScriptValue::toUInt32_test): + (tst_QScriptValue::toUInt16_initData): + (tst_QScriptValue::toUInt16_makeData): + (tst_QScriptValue::toUInt16_test): + +2010-02-14 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Adam Barth. + + Implement NEVER_INLINE and NO_RETURN for RVCT + https://bugs.webkit.org/show_bug.cgi?id=34740 + + * wtf/AlwaysInline.h: + +2010-02-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Remove uses of PtrAndFlags from JIT data stuctures. + + These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid + permutation of pointer states in MethodCallLinkInfo to represent the removed bits. + + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::seenOnce): + (JSC::CallLinkInfo::setSeen): + (JSC::MethodCallLinkInfo::MethodCallLinkInfo): + (JSC::MethodCallLinkInfo::seenOnce): + (JSC::MethodCallLinkInfo::setSeen): + * jit/JIT.cpp: + (JSC::JIT::unlinkCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchMethodCallProto): + * runtime/UString.h: + +2010-02-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Many false leaks in release builds due to PtrAndFlags + + Remove UntypedPtrAndBitfield (similar to PtrAndFlags) in UStringImpl, + and steal bits from the refCount instead. + + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::baseSharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::cost): + (JSC::UStringImpl::isIdentifier): + (JSC::UStringImpl::setIsIdentifier): + (JSC::UStringImpl::ref): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::bufferOwnership): + (JSC::UStringImpl::isStatic): + (JSC::UStringImpl::): + +2010-02-12 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Removed an unnecessary data dependency from my last patch. + + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::markChildren): Since isAnyStringMarked being false + is a condition of entering the loop, we can just use '=' instead of '|='. + 2010-02-12 Janne Koskinen <janne.p.koskinen@digia.com> Reviewed by Tor Arne Vestbø. diff --git a/JavaScriptCore/DerivedSources.pro b/JavaScriptCore/DerivedSources.pro index bd9f6ab..28a229d 100644 --- a/JavaScriptCore/DerivedSources.pro +++ b/JavaScriptCore/DerivedSources.pro @@ -77,8 +77,8 @@ addExtraCompiler(jscbison) # GENERATOR 3: JIT Stub functions for RVCT rvctstubs.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h -rvctstubs.wkScript = $$PWD/create_rvct_stubs -rvctstubs.commands = perl $$rvctstubs.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} +rvctstubs.wkScript = $$PWD/create_jit_stubs +rvctstubs.commands = perl $$rvctstubs.wkScript --prefix RVCT ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} rvctstubs.depends = ${QMAKE_FILE_NAME} rvctstubs.input = RVCT_STUB_FILES rvctstubs.CONFIG += no_link diff --git a/JavaScriptCore/GNUmakefile.am b/JavaScriptCore/GNUmakefile.am index 4ac89d9..53e3c65 100644 --- a/JavaScriptCore/GNUmakefile.am +++ b/JavaScriptCore/GNUmakefile.am @@ -84,6 +84,7 @@ javascriptcore_sources += \ JavaScriptCore/jit/JITCall.cpp \ JavaScriptCore/jit/JITCode.h \ JavaScriptCore/jit/JITPropertyAccess.cpp \ + JavaScriptCore/jit/JITPropertyAccess32_64.cpp \ JavaScriptCore/jit/JITArithmetic.cpp \ JavaScriptCore/jit/ExecutableAllocator.cpp \ JavaScriptCore/jit/JIT.h \ diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp index f562b52..9355321 100644 --- a/JavaScriptCore/JavaScriptCore.exp +++ b/JavaScriptCore/JavaScriptCore.exp @@ -240,7 +240,7 @@ __ZN3JSC7UString4fromEj __ZN3JSC7UString4fromEl __ZN3JSC7UString9s_nullRepE __ZN3JSC7UStringC1EPKc -__ZN3JSC7UStringC1EPKti +__ZN3JSC7UStringC1EPKtj __ZN3JSC8Debugger23recompileAllJSFunctionsEPNS_12JSGlobalDataE __ZN3JSC8Debugger6attachEPNS_14JSGlobalObjectE __ZN3JSC8Debugger6detachEPNS_14JSGlobalObjectE @@ -270,7 +270,6 @@ __ZN3JSC8JSObject23allocatePropertyStorageEmm __ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_7JSValueE -__ZN3JSC8JSString4RopeD1Ev __ZN3JSC8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE __ZN3JSC8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringE __ZN3JSC8Profiler8profilerEv @@ -393,7 +392,7 @@ __ZNK3JSC7UString10UTF8StringEb __ZNK3JSC7UString14toStrictUInt32EPb __ZNK3JSC7UString5asciiEv __ZNK3JSC7UString6is8BitEv -__ZNK3JSC7UString6substrEii +__ZNK3JSC7UString6substrEjj __ZNK3JSC7UString8toUInt32EPb __ZNK3JSC7UString8toUInt32EPbb __ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE diff --git a/JavaScriptCore/JavaScriptCore.gypi b/JavaScriptCore/JavaScriptCore.gypi index c67b6a8..c0eb086 100644 --- a/JavaScriptCore/JavaScriptCore.gypi +++ b/JavaScriptCore/JavaScriptCore.gypi @@ -120,6 +120,7 @@ 'jit/JITInlineMethods.h', 'jit/JITOpcodes.cpp', 'jit/JITPropertyAccess.cpp', + 'jit/JITPropertyAccess32_64.cpp', 'jit/JITStubCall.h', 'jit/JITStubs.cpp', 'jit/JITStubs.h', diff --git a/JavaScriptCore/JavaScriptCore.pri b/JavaScriptCore/JavaScriptCore.pri index 75737ae..d4cfe10 100644 --- a/JavaScriptCore/JavaScriptCore.pri +++ b/JavaScriptCore/JavaScriptCore.pri @@ -107,6 +107,7 @@ SOURCES += \ jit/JIT.cpp \ jit/JITOpcodes.cpp \ jit/JITPropertyAccess.cpp \ + jit/JITPropertyAccess32_64.cpp \ jit/JITStubs.cpp \ parser/Lexer.cpp \ parser/Nodes.cpp \ diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def index 6afef77..9e1e74a 100644 --- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def +++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def @@ -17,7 +17,7 @@ EXPORTS ??0Structure@JSC@@AAE@VJSValue@1@ABVTypeInfo@1@I@Z ??0ThreadCondition@WTF@@QAE@XZ ??0UString@JSC@@QAE@PBD@Z - ??0UString@JSC@@QAE@PB_WH@Z + ??0UString@JSC@@QAE@PB_WI@Z ??1CString@JSC@@QAE@XZ ??1ClientData@JSGlobalData@JSC@@UAE@XZ ??1Collator@WTF@@QAE@XZ @@ -27,7 +27,6 @@ EXPORTS ??1JSGlobalObject@JSC@@UAE@XZ ??1Mutex@WTF@@QAE@XZ ??1RefCountedLeakCounter@WTF@@QAE@XZ - ??1Rope@JSString@JSC@@QAE@XZ ??1Structure@JSC@@QAE@XZ ??1ThreadCondition@WTF@@QAE@XZ ??1UStringImpl@JSC@@AAE@XZ @@ -61,7 +60,6 @@ EXPORTS ?className@JSObject@JSC@@UBE?AVUString@2@XZ ?collate@Collator@WTF@@QBE?AW4Result@12@PB_WI0I@Z ?collectAllGarbage@Heap@JSC@@QAEXXZ - ?computeHash@UStringImpl@JSC@@SAIPB_WH@Z ?configurable@PropertyDescriptor@JSC@@QBE_NXZ ?construct@JSC@@YAPAVJSObject@1@PAVExecState@1@VJSValue@1@W4ConstructType@1@ABTConstructData@1@ABVArgList@1@@Z ?constructArray@JSC@@YAPAVJSArray@1@PAVExecState@1@ABVArgList@1@@Z @@ -257,7 +255,7 @@ EXPORTS ?stopProfiling@Profiler@JSC@@QAE?AV?$PassRefPtr@VProfile@JSC@@@WTF@@PAVExecState@2@ABVUString@2@@Z ?stopSampling@JSGlobalData@JSC@@QAEXXZ ?strtod@WTF@@YANPBDPAPAD@Z - ?substr@UString@JSC@@QBE?AV12@HH@Z + ?substr@UString@JSC@@QBE?AV12@II@Z ?symbolTableGet@JSVariableObject@JSC@@IAE_NABVIdentifier@2@AAVPropertyDescriptor@2@@Z ?synthesizePrototype@JSValue@JSC@@ABEPAVJSObject@2@PAVExecState@2@@Z ?thisObject@DebuggerCallFrame@JSC@@QBEPAVJSObject@2@XZ diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj index 9c20af9..60022dd 100644 --- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj +++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj @@ -1721,6 +1721,10 @@ >
</File>
<File
+ RelativePath="..\..\jit\JITPropertyAccess32_64.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\jit\JITStubCall.h"
>
</File>
diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj index 5f904ce..2410466 100644 --- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj +++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj @@ -39,7 +39,6 @@ 088FA5BB0EF76D4300578E6F /* RandomNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 088FA5B90EF76D4300578E6F /* RandomNumber.cpp */; }; 088FA5BC0EF76D4300578E6F /* RandomNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 088FA5BA0EF76D4300578E6F /* RandomNumber.h */; settings = {ATTRIBUTES = (Private, ); }; }; 08E279E90EF83B10007DB523 /* RandomNumberSeed.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E279E80EF83B10007DB523 /* RandomNumberSeed.h */; }; - 0B1F921D0F1753500036468E /* PtrAndFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B1F921B0F17502D0036468E /* PtrAndFlags.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0B330C270F38C62300692DE3 /* TypeTraits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B330C260F38C62300692DE3 /* TypeTraits.cpp */; }; 0B4D7E630F319AC800AD7E58 /* TypeTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0BDFFAE00FC6192900D69EF4 /* CrossThreadRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BDFFAD40FC6171000D69EF4 /* CrossThreadRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -295,6 +294,7 @@ A7A1F7AC0F252B3C00E184E2 /* ByteArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7A1F7AA0F252B3C00E184E2 /* ByteArray.cpp */; }; A7A1F7AD0F252B3C00E184E2 /* ByteArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A1F7AB0F252B3C00E184E2 /* ByteArray.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7B48F490EE8936F00DCBDB6 /* ExecutableAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */; }; + A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */; }; A7C2217810C7479400F97913 /* JSZombie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C2216B10C7469C00F97913 /* JSZombie.cpp */; }; A7C530E4102A3813005BC741 /* MarkStackPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C530E3102A3813005BC741 /* MarkStackPosix.cpp */; }; A7D649AA1015224E009B2E1B /* PossiblyNull.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D649A91015224E009B2E1B /* PossiblyNull.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -861,6 +861,7 @@ A7A1F7AB0F252B3C00E184E2 /* ByteArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteArray.h; sourceTree = "<group>"; }; A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutableAllocator.h; sourceTree = "<group>"; }; A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocator.cpp; sourceTree = "<group>"; }; + A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess32_64.cpp; sourceTree = "<group>"; }; A7C2216810C745E000F97913 /* JSZombie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSZombie.h; sourceTree = "<group>"; }; A7C2216B10C7469C00F97913 /* JSZombie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSZombie.cpp; sourceTree = "<group>"; }; A7C530E3102A3813005BC741 /* MarkStackPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkStackPosix.cpp; sourceTree = "<group>"; }; @@ -1192,6 +1193,7 @@ 960626950FB8EC02009798AB /* JITStubCall.h */, 14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */, 14A6581A0F4E36F4000150FD /* JITStubs.h */, + A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */, ); path = jit; sourceTree = "<group>"; @@ -1981,7 +1983,6 @@ BC18C4550E16F5CD00B34460 /* PropertySlot.h in Headers */, BC18C4560E16F5CD00B34460 /* Protect.h in Headers */, BC257DF40E1F53740016B6C9 /* PrototypeFunction.h in Headers */, - 0B1F921D0F1753500036468E /* PtrAndFlags.h in Headers */, 147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */, 1429DA4A0ED245EC00B89619 /* Quantifier.h in Headers */, 088FA5BC0EF76D4300578E6F /* RandomNumber.h in Headers */, @@ -2504,6 +2505,7 @@ 1429DA820ED2482900B89619 /* WRECFunctors.cpp in Sources */, 1429DAE10ED2645B00B89619 /* WRECGenerator.cpp in Sources */, 1429DAC00ED263E700B89619 /* WRECParser.cpp in Sources */, + A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/JavaScriptCore/bytecode/CodeBlock.cpp b/JavaScriptCore/bytecode/CodeBlock.cpp index fd56ece..68debb2 100644 --- a/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/JavaScriptCore/bytecode/CodeBlock.cpp @@ -49,8 +49,8 @@ namespace JSC { static UString escapeQuotes(const UString& str) { UString result = str; - int pos = 0; - while ((pos = result.find('\"', pos)) >= 0) { + unsigned pos = 0; + while ((pos = result.find('\"', pos)) != UString::NotFound) { result = makeString(result.substr(0, pos), "\"\\\"\"", result.substr(pos + 1)); pos += 4; } @@ -765,6 +765,26 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator& printGetByIdOp(exec, location, it, "get_by_id_chain"); break; } + case op_get_by_id_getter_self: { + printGetByIdOp(exec, location, it, "get_by_id_getter_self"); + break; + } + case op_get_by_id_getter_self_list: { + printGetByIdOp(exec, location, it, "get_by_id_getter_self_list"); + break; + } + case op_get_by_id_getter_proto: { + printGetByIdOp(exec, location, it, "get_by_id_getter_proto"); + break; + } + case op_get_by_id_getter_proto_list: { + printGetByIdOp(exec, location, it, "get_by_id_getter_proto_list"); + break; + } + case op_get_by_id_getter_chain: { + printGetByIdOp(exec, location, it, "get_by_id_getter_chain"); + break; + } case op_get_by_id_generic: { printGetByIdOp(exec, location, it, "get_by_id_generic"); break; @@ -1355,16 +1375,16 @@ void CodeBlock::derefStructures(Instruction* vPC) const { Interpreter* interpreter = m_globalData->interpreter; - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self)) { vPC[4].u.structure->deref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_proto)) { vPC[4].u.structure->deref(); vPC[5].u.structure->deref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain)) { vPC[4].u.structure->deref(); vPC[5].u.structureChain->deref(); return; @@ -1385,7 +1405,9 @@ void CodeBlock::derefStructures(Instruction* vPC) const return; } if ((vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto_list)) - || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self_list))) { + || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self_list)) + || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_proto_list)) + || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self_list))) { PolymorphicAccessStructureList* polymorphicStructures = vPC[4].u.polymorphicStructures; polymorphicStructures->derefStructures(vPC[5].u.operand); delete polymorphicStructures; @@ -1400,16 +1422,16 @@ void CodeBlock::refStructures(Instruction* vPC) const { Interpreter* interpreter = m_globalData->interpreter; - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self)) { vPC[4].u.structure->ref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_proto)) { vPC[4].u.structure->ref(); vPC[5].u.structure->ref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain)) { vPC[4].u.structure->ref(); vPC[5].u.structureChain->ref(); return; diff --git a/JavaScriptCore/bytecode/CodeBlock.h b/JavaScriptCore/bytecode/CodeBlock.h index eb874cc..d92dc9d 100644 --- a/JavaScriptCore/bytecode/CodeBlock.h +++ b/JavaScriptCore/bytecode/CodeBlock.h @@ -36,7 +36,6 @@ #include "JSGlobalObject.h" #include "JumpTable.h" #include "Nodes.h" -#include "PtrAndFlags.h" #include "RegExp.h" #include "UString.h" #include <wtf/FastAllocBase.h> @@ -110,44 +109,54 @@ namespace JSC { CodeLocationNearCall callReturnLocation; CodeLocationDataLabelPtr hotPathBegin; CodeLocationNearCall hotPathOther; - PtrAndFlags<CodeBlock, HasSeenShouldRepatch> ownerCodeBlock; + CodeBlock* ownerCodeBlock; CodeBlock* callee; - unsigned position; + unsigned position : 31; + unsigned hasSeenShouldRepatch : 1; void setUnlinked() { callee = 0; } bool isLinked() { return callee; } bool seenOnce() { - return ownerCodeBlock.isFlagSet(hasSeenShouldRepatch); + return hasSeenShouldRepatch; } void setSeen() { - ownerCodeBlock.setFlag(hasSeenShouldRepatch); + hasSeenShouldRepatch = true; } }; struct MethodCallLinkInfo { MethodCallLinkInfo() : cachedStructure(0) + , cachedPrototypeStructure(0) { } bool seenOnce() { - return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch); + ASSERT(!cachedStructure); + return cachedPrototypeStructure; } void setSeen() { - cachedPrototypeStructure.setFlag(hasSeenShouldRepatch); + ASSERT(!cachedStructure && !cachedPrototypeStructure); + // We use the values of cachedStructure & cachedPrototypeStructure to indicate the + // current state. + // - In the initial state, both are null. + // - Once this transition has been taken once, cachedStructure is + // null and cachedPrototypeStructure is set to a nun-null value. + // - Once the call is linked both structures are set to non-null values. + cachedPrototypeStructure = (Structure*)1; } CodeLocationCall callReturnLocation; CodeLocationDataLabelPtr structureLabel; Structure* cachedStructure; - PtrAndFlags<Structure, HasSeenShouldRepatch> cachedPrototypeStructure; + Structure* cachedPrototypeStructure; }; struct FunctionRegisterInfo { diff --git a/JavaScriptCore/bytecode/EvalCodeCache.h b/JavaScriptCore/bytecode/EvalCodeCache.h index 05834fc..a036dd4 100644 --- a/JavaScriptCore/bytecode/EvalCodeCache.h +++ b/JavaScriptCore/bytecode/EvalCodeCache.h @@ -65,7 +65,7 @@ namespace JSC { bool isEmpty() const { return m_cacheMap.isEmpty(); } private: - static const int maxCacheableSourceLength = 256; + static const unsigned maxCacheableSourceLength = 256; static const int maxCacheEntries = 64; typedef HashMap<RefPtr<UString::Rep>, RefPtr<EvalExecutable> > EvalCacheMap; diff --git a/JavaScriptCore/bytecode/Opcode.h b/JavaScriptCore/bytecode/Opcode.h index d9b2153..56555f3 100644 --- a/JavaScriptCore/bytecode/Opcode.h +++ b/JavaScriptCore/bytecode/Opcode.h @@ -104,6 +104,11 @@ namespace JSC { macro(op_get_by_id_proto, 8) \ macro(op_get_by_id_proto_list, 8) \ macro(op_get_by_id_chain, 8) \ + macro(op_get_by_id_getter_self, 8) \ + macro(op_get_by_id_getter_self_list, 8) \ + macro(op_get_by_id_getter_proto, 8) \ + macro(op_get_by_id_getter_proto_list, 8) \ + macro(op_get_by_id_getter_chain, 8) \ macro(op_get_by_id_generic, 8) \ macro(op_get_array_length, 8) \ macro(op_get_string_length, 8) \ diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index b0a0877..f2193b0 100644 --- a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -1940,7 +1940,7 @@ static int32_t keyForCharacterSwitch(ExpressionNode* node, int32_t min, int32_t UNUSED_PARAM(max); ASSERT(node->isString()); UString::Rep* clause = static_cast<StringNode*>(node)->value().ustring().rep(); - ASSERT(clause->size() == 1); + ASSERT(clause->length() == 1); int32_t key = clause->data()[0]; ASSERT(key >= min); diff --git a/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/JavaScriptCore/bytecompiler/NodesCodegen.cpp index b66c50d..4162873 100644 --- a/JavaScriptCore/bytecompiler/NodesCodegen.cpp +++ b/JavaScriptCore/bytecompiler/NodesCodegen.cpp @@ -76,8 +76,8 @@ namespace JSC { static void substitute(UString& string, const UString& substring) { - int position = string.find("%s"); - ASSERT(position != -1); + unsigned position = string.find("%s"); + ASSERT(position != UString::NotFound); string = makeString(string.substr(0, position), substring, string.substr(position + 2)); } diff --git a/JavaScriptCore/create_rvct_stubs b/JavaScriptCore/create_jit_stubs index 0c49c4f..4d510ea 100644 --- a/JavaScriptCore/create_rvct_stubs +++ b/JavaScriptCore/create_jit_stubs @@ -1,6 +1,7 @@ #! /usr/bin/perl -w # # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) +# Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -18,9 +19,27 @@ # Boston, MA 02110-1301, USA. use strict; +use File::Basename; +use Getopt::Long; -my $file = $ARGV[0]; -shift; +my $usage = basename($0) . " --prefix prefix [--offset offset] file"; + +my $rtype_template = quotemeta("#rtype#"); +my $offset_template = quotemeta("#offset#"); +my $op_template = quotemeta("#op#"); + +my $prefix; +my $offset = 32; +my $file; + +my $getOptionsResult = GetOptions( + 'prefix=s' => \$prefix, + 'offset=i' => \$offset +); + +$file = $ARGV[0]; + +die "$usage\n" unless ($prefix and $file); my $stub_template = ""; my $stub = ""; @@ -28,20 +47,18 @@ my $stub = ""; my $rtype = ""; my $op = ""; -my $rtype_template = quotemeta("#rtype#"); -my $op_template = quotemeta("#op#"); - -print STDERR "Creating RVCT stubs for $file \n"; +print STDERR "Creating JIT stubs for $file \n"; open(IN, $file) or die "No such file $file"; while ( $_ = <IN> ) { - if ( /^RVCT\((.*)\)/ ) { + if ( /^$prefix\((.*)\)/ ) { $stub_template .= $1 . "\n"; } if ( /^DEFINE_STUB_FUNCTION\((.*), (.*)\)/ ) { $stub = $stub_template; $rtype = quotemeta($1); $op = quotemeta($2); + $stub =~ s/$offset_template/$offset/g; $stub =~ s/$rtype_template/$rtype/g; $stub =~ s/$op_template/$op/g; $stub =~ s/\\\*/\*/g; diff --git a/JavaScriptCore/interpreter/Interpreter.cpp b/JavaScriptCore/interpreter/Interpreter.cpp index 2498d69..6dbbcf9 100644 --- a/JavaScriptCore/interpreter/Interpreter.cpp +++ b/JavaScriptCore/interpreter/Interpreter.cpp @@ -40,6 +40,7 @@ #include "DebuggerCallFrame.h" #include "EvalCodeCache.h" #include "ExceptionHelpers.h" +#include "GetterSetter.h" #include "GlobalEvalFunction.h" #include "JSActivation.h" #include "JSArray.h" @@ -169,7 +170,7 @@ NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* PropertySlot slot(globalObject); if (globalObject->getPropertySlot(callFrame, ident, slot)) { JSValue result = slot.getValue(callFrame, ident); - if (slot.isCacheable() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { + if (slot.isCacheableValue() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { if (vPC[4].u.structure) vPC[4].u.structure->deref(); globalObject->structure()->ref(); @@ -1029,7 +1030,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* // Cache hit: Specialize instruction and ref Structures. if (slot.slotBase() == baseValue) { - vPC[0] = getOpcode(op_get_by_id_self); + vPC[0] = slot.isGetter() ? getOpcode(op_get_by_id_getter_self) : getOpcode(op_get_by_id_self); vPC[5] = slot.cachedOffset(); codeBlock->refStructures(vPC); @@ -1056,7 +1057,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* ASSERT(!baseObject->structure()->isUncacheableDictionary()); - vPC[0] = getOpcode(op_get_by_id_proto); + vPC[0] = slot.isGetter() ? getOpcode(op_get_by_id_getter_proto) : getOpcode(op_get_by_id_proto); vPC[5] = baseObject->structure(); vPC[6] = offset; @@ -1071,7 +1072,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* return; } - vPC[0] = getOpcode(op_get_by_id_chain); + vPC[0] = slot.isGetter() ? getOpcode(op_get_by_id_getter_chain) : getOpcode(op_get_by_id_chain); vPC[4] = structure; vPC[5] = structure->prototypeChain(callFrame); vPC[6] = count; @@ -2161,6 +2162,51 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi uncacheGetByID(callFrame->codeBlock(), vPC); NEXT_INSTRUCTION(); } +#if HAVE(COMPUTED_GOTO) + goto *(&&skip_id_getter_proto); +#endif + DEFINE_OPCODE(op_get_by_id_getter_proto) { + /* op_get_by_id_getter_proto dst(r) base(r) property(id) structure(sID) prototypeStructure(sID) offset(n) nop(n) + + Cached property access: Attempts to get a cached getter property from the + value base's prototype. If the cache misses, op_get_by_id_getter_proto + reverts to op_get_by_id. + */ + int base = vPC[2].u.operand; + JSValue baseValue = callFrame->r(base).jsValue(); + + if (LIKELY(baseValue.isCell())) { + JSCell* baseCell = asCell(baseValue); + Structure* structure = vPC[4].u.structure; + + if (LIKELY(baseCell->structure() == structure)) { + ASSERT(structure->prototypeForLookup(callFrame).isObject()); + JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame)); + Structure* prototypeStructure = vPC[5].u.structure; + + if (LIKELY(protoObject->structure() == prototypeStructure)) { + int dst = vPC[1].u.operand; + int offset = vPC[6].u.operand; + if (GetterSetter* getterSetter = asGetterSetter(protoObject->getDirectOffset(offset).asCell())) { + JSObject* getter = getterSetter->getter(); + CallData callData; + CallType callType = getter->getCallData(callData); + JSValue result = call(callFrame, getter, callType, callData, asObject(baseCell), ArgList()); + CHECK_FOR_EXCEPTION(); + callFrame->r(dst) = result; + } else + callFrame->r(dst) = jsUndefined(); + vPC += OPCODE_LENGTH(op_get_by_id_getter_proto); + NEXT_INSTRUCTION(); + } + } + } + uncacheGetByID(callFrame->codeBlock(), vPC); + NEXT_INSTRUCTION(); + } +#if HAVE(COMPUTED_GOTO) + skip_id_getter_proto: +#endif DEFINE_OPCODE(op_get_by_id_self_list) { // Polymorphic self access caching currently only supported when JITting. ASSERT_NOT_REACHED(); @@ -2175,6 +2221,20 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi vPC += OPCODE_LENGTH(op_get_by_id_proto_list); NEXT_INSTRUCTION(); } + DEFINE_OPCODE(op_get_by_id_getter_self_list) { + // Polymorphic self access caching currently only supported when JITting. + ASSERT_NOT_REACHED(); + // This case of the switch must not be empty, else (op_get_by_id_self_list == op_get_by_id_chain)! + vPC += OPCODE_LENGTH(op_get_by_id_self_list); + NEXT_INSTRUCTION(); + } + DEFINE_OPCODE(op_get_by_id_getter_proto_list) { + // Polymorphic prototype access caching currently only supported when JITting. + ASSERT_NOT_REACHED(); + // This case of the switch must not be empty, else (op_get_by_id_proto_list == op_get_by_id_chain)! + vPC += OPCODE_LENGTH(op_get_by_id_proto_list); + NEXT_INSTRUCTION(); + } DEFINE_OPCODE(op_get_by_id_chain) { /* op_get_by_id_chain dst(r) base(r) property(id) structure(sID) structureChain(chain) count(n) offset(n) @@ -2221,6 +2281,49 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi uncacheGetByID(callFrame->codeBlock(), vPC); NEXT_INSTRUCTION(); } +#if HAVE(COMPUTED_GOTO) + goto *(&&skip_id_getter_self); +#endif + DEFINE_OPCODE(op_get_by_id_getter_self) { + /* op_get_by_id_self dst(r) base(r) property(id) structure(sID) offset(n) nop(n) nop(n) + + Cached property access: Attempts to get a cached property from the + value base. If the cache misses, op_get_by_id_getter_self reverts to + op_get_by_id. + */ + int base = vPC[2].u.operand; + JSValue baseValue = callFrame->r(base).jsValue(); + + if (LIKELY(baseValue.isCell())) { + JSCell* baseCell = asCell(baseValue); + Structure* structure = vPC[4].u.structure; + + if (LIKELY(baseCell->structure() == structure)) { + ASSERT(baseCell->isObject()); + JSObject* baseObject = asObject(baseCell); + int dst = vPC[1].u.operand; + int offset = vPC[5].u.operand; + + if (GetterSetter* getterSetter = asGetterSetter(baseObject->getDirectOffset(offset).asCell())) { + JSObject* getter = getterSetter->getter(); + CallData callData; + CallType callType = getter->getCallData(callData); + JSValue result = call(callFrame, getter, callType, callData, baseObject, ArgList()); + CHECK_FOR_EXCEPTION(); + callFrame->r(dst) = result; + } else + callFrame->r(dst) = jsUndefined(); + + vPC += OPCODE_LENGTH(op_get_by_id_getter_self); + NEXT_INSTRUCTION(); + } + } + uncacheGetByID(callFrame->codeBlock(), vPC); + NEXT_INSTRUCTION(); + } +#if HAVE(COMPUTED_GOTO) + skip_id_getter_self: +#endif DEFINE_OPCODE(op_get_by_id_generic) { /* op_get_by_id_generic dst(r) base(r) property(id) nop(sID) nop(n) nop(n) nop(n) @@ -2241,6 +2344,61 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi vPC += OPCODE_LENGTH(op_get_by_id_generic); NEXT_INSTRUCTION(); } +#if HAVE(COMPUTED_GOTO) + goto *(&&skip_id_getter_chain); +#endif + DEFINE_OPCODE(op_get_by_id_getter_chain) { + /* op_get_by_id_getter_chain dst(r) base(r) property(id) structure(sID) structureChain(chain) count(n) offset(n) + + Cached property access: Attempts to get a cached property from the + value base's prototype chain. If the cache misses, op_get_by_id_getter_chain + reverts to op_get_by_id. + */ + int base = vPC[2].u.operand; + JSValue baseValue = callFrame->r(base).jsValue(); + + if (LIKELY(baseValue.isCell())) { + JSCell* baseCell = asCell(baseValue); + Structure* structure = vPC[4].u.structure; + + if (LIKELY(baseCell->structure() == structure)) { + RefPtr<Structure>* it = vPC[5].u.structureChain->head(); + size_t count = vPC[6].u.operand; + RefPtr<Structure>* end = it + count; + + while (true) { + JSObject* baseObject = asObject(baseCell->structure()->prototypeForLookup(callFrame)); + + if (UNLIKELY(baseObject->structure() != (*it).get())) + break; + + if (++it == end) { + int dst = vPC[1].u.operand; + int offset = vPC[7].u.operand; + if (GetterSetter* getterSetter = asGetterSetter(baseObject->getDirectOffset(offset).asCell())) { + JSObject* getter = getterSetter->getter(); + CallData callData; + CallType callType = getter->getCallData(callData); + JSValue result = call(callFrame, getter, callType, callData, asObject(baseCell), ArgList()); + CHECK_FOR_EXCEPTION(); + callFrame->r(dst) = result; + } else + callFrame->r(dst) = jsUndefined(); + vPC += OPCODE_LENGTH(op_get_by_id_getter_chain); + NEXT_INSTRUCTION(); + } + + // Update baseCell, so that next time around the loop we'll pick up the prototype's prototype. + baseCell = baseObject; + } + } + } + uncacheGetByID(callFrame->codeBlock(), vPC); + NEXT_INSTRUCTION(); + } +#if HAVE(COMPUTED_GOTO) + skip_id_getter_chain: +#endif DEFINE_OPCODE(op_get_array_length) { /* op_get_array_length dst(r) base(r) property(id) nop(sID) nop(n) nop(n) nop(n) @@ -2924,7 +3082,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi vPC += defaultOffset; else { UString::Rep* value = asString(scrutinee)->value(callFrame).rep(); - if (value->size() != 1) + if (value->length() != 1) vPC += defaultOffset; else vPC += callFrame->codeBlock()->characterSwitchJumpTable(tableIndex).offsetForValue(value->data()[0], defaultOffset); diff --git a/JavaScriptCore/jit/JIT.cpp b/JavaScriptCore/jit/JIT.cpp index c0da66d..78c5153 100644 --- a/JavaScriptCore/jit/JIT.cpp +++ b/JavaScriptCore/jit/JIT.cpp @@ -322,6 +322,11 @@ void JIT::privateCompileMainPass() case op_get_by_id_proto_list: case op_get_by_id_self: case op_get_by_id_self_list: + case op_get_by_id_getter_chain: + case op_get_by_id_getter_proto: + case op_get_by_id_getter_proto_list: + case op_get_by_id_getter_self: + case op_get_by_id_getter_self_list: case op_get_string_length: case op_put_by_id_generic: case op_put_by_id_replace: @@ -582,7 +587,7 @@ void JIT::unlinkCall(CallLinkInfo* callLinkInfo) // When the JSFunction is deleted the pointer embedded in the instruction stream will no longer be valid // (and, if a new JSFunction happened to be constructed at the same location, we could get a false positive // match). Reset the check so it no longer matches. - RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock.get()); + RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock); #if USE(JSVALUE32_64) repatchBuffer.repatch(callLinkInfo->hotPathBegin, 0); #else diff --git a/JavaScriptCore/jit/JITOpcodes.cpp b/JavaScriptCore/jit/JITOpcodes.cpp index c3f20f1..c470495 100644 --- a/JavaScriptCore/jit/JITOpcodes.cpp +++ b/JavaScriptCore/jit/JITOpcodes.cpp @@ -56,7 +56,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable Jump string_failureCases2 = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsStringVPtr)); // Checks out okay! - get the length from the Ustring. - load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_stringLength)), regT2); + load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_length)), regT2); Jump string_failureCases3 = branch32(Above, regT2, Imm32(INT_MAX)); move(regT2, regT0); @@ -1517,7 +1517,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable Jump string_failureCases2 = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsStringVPtr)); // Checks out okay! - get the length from the Ustring. - load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_stringLength)), regT0); + load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_length)), regT0); Jump string_failureCases3 = branch32(Above, regT0, Imm32(JSImmediate::maxImmediateInt)); diff --git a/JavaScriptCore/jit/JITPropertyAccess.cpp b/JavaScriptCore/jit/JITPropertyAccess.cpp index ef95f99..151bb03 100644 --- a/JavaScriptCore/jit/JITPropertyAccess.cpp +++ b/JavaScriptCore/jit/JITPropertyAccess.cpp @@ -24,6 +24,9 @@ */ #include "config.h" + +#if !USE(JSVALUE32_64) + #include "JIT.h" #if ENABLE(JIT) @@ -48,978 +51,6 @@ using namespace std; namespace JSC { -#if USE(JSVALUE32_64) - -void JIT::emit_op_put_by_index(Instruction* currentInstruction) -{ - unsigned base = currentInstruction[1].u.operand; - unsigned property = currentInstruction[2].u.operand; - unsigned value = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_put_by_index); - stubCall.addArgument(base); - stubCall.addArgument(Imm32(property)); - stubCall.addArgument(value); - stubCall.call(); -} - -void JIT::emit_op_put_getter(Instruction* currentInstruction) -{ - unsigned base = currentInstruction[1].u.operand; - unsigned property = currentInstruction[2].u.operand; - unsigned function = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_put_getter); - stubCall.addArgument(base); - stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(property))); - stubCall.addArgument(function); - stubCall.call(); -} - -void JIT::emit_op_put_setter(Instruction* currentInstruction) -{ - unsigned base = currentInstruction[1].u.operand; - unsigned property = currentInstruction[2].u.operand; - unsigned function = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_put_setter); - stubCall.addArgument(base); - stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(property))); - stubCall.addArgument(function); - stubCall.call(); -} - -void JIT::emit_op_del_by_id(Instruction* currentInstruction) -{ - unsigned dst = currentInstruction[1].u.operand; - unsigned base = currentInstruction[2].u.operand; - unsigned property = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_del_by_id); - stubCall.addArgument(base); - stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(property))); - stubCall.call(dst); -} - - -#if !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) - -/* ------------------------------ BEGIN: !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */ - -// Treat these as nops - the call will be handed as a regular get_by_id/op_call pair. -void JIT::emit_op_method_check(Instruction*) {} -void JIT::emitSlow_op_method_check(Instruction*, Vector<SlowCaseEntry>::iterator&) { ASSERT_NOT_REACHED(); } -#if ENABLE(JIT_OPTIMIZE_METHOD_CALLS) -#error "JIT_OPTIMIZE_METHOD_CALLS requires JIT_OPTIMIZE_PROPERTY_ACCESS" -#endif - -void JIT::emit_op_get_by_val(Instruction* currentInstruction) -{ - unsigned dst = currentInstruction[1].u.operand; - unsigned base = currentInstruction[2].u.operand; - unsigned property = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_get_by_val); - stubCall.addArgument(base); - stubCall.addArgument(property); - stubCall.call(dst); -} - -void JIT::emitSlow_op_get_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&) -{ - ASSERT_NOT_REACHED(); -} - -void JIT::emit_op_put_by_val(Instruction* currentInstruction) -{ - unsigned base = currentInstruction[1].u.operand; - unsigned property = currentInstruction[2].u.operand; - unsigned value = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_put_by_val); - stubCall.addArgument(base); - stubCall.addArgument(property); - stubCall.addArgument(value); - stubCall.call(); -} - -void JIT::emitSlow_op_put_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&) -{ - ASSERT_NOT_REACHED(); -} - -void JIT::emit_op_get_by_id(Instruction* currentInstruction) -{ - int dst = currentInstruction[1].u.operand; - int base = currentInstruction[2].u.operand; - int ident = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_get_by_id_generic); - stubCall.addArgument(base); - stubCall.addArgument(ImmPtr(&(m_codeBlock->identifier(ident)))); - stubCall.call(dst); - - m_propertyAccessInstructionIndex++; -} - -void JIT::emitSlow_op_get_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&) -{ - m_propertyAccessInstructionIndex++; - ASSERT_NOT_REACHED(); -} - -void JIT::emit_op_put_by_id(Instruction* currentInstruction) -{ - int base = currentInstruction[1].u.operand; - int ident = currentInstruction[2].u.operand; - int value = currentInstruction[3].u.operand; - - JITStubCall stubCall(this, cti_op_put_by_id_generic); - stubCall.addArgument(base); - stubCall.addArgument(ImmPtr(&(m_codeBlock->identifier(ident)))); - stubCall.addArgument(value); - stubCall.call(); - - m_propertyAccessInstructionIndex++; -} - -void JIT::emitSlow_op_put_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&) -{ - m_propertyAccessInstructionIndex++; - ASSERT_NOT_REACHED(); -} - -#else // !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) - -/* ------------------------------ BEGIN: ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */ - -#if ENABLE(JIT_OPTIMIZE_METHOD_CALLS) - -void JIT::emit_op_method_check(Instruction* currentInstruction) -{ - // Assert that the following instruction is a get_by_id. - ASSERT(m_interpreter->getOpcodeID((currentInstruction + OPCODE_LENGTH(op_method_check))->u.opcode) == op_get_by_id); - - currentInstruction += OPCODE_LENGTH(op_method_check); - - // Do the method check - check the object & its prototype's structure inline (this is the common case). - m_methodCallCompilationInfo.append(MethodCallCompilationInfo(m_propertyAccessInstructionIndex)); - MethodCallCompilationInfo& info = m_methodCallCompilationInfo.last(); - - int dst = currentInstruction[1].u.operand; - int base = currentInstruction[2].u.operand; - - emitLoad(base, regT1, regT0); - emitJumpSlowCaseIfNotJSCell(base, regT1); - - BEGIN_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck); - - Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), info.structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); - DataLabelPtr protoStructureToCompare, protoObj = moveWithPatch(ImmPtr(0), regT2); - Jump protoStructureCheck = branchPtrWithPatch(NotEqual, Address(regT2, OBJECT_OFFSETOF(JSCell, m_structure)), protoStructureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); - - // This will be relinked to load the function without doing a load. - DataLabelPtr putFunction = moveWithPatch(ImmPtr(0), regT0); - - END_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck); - - move(Imm32(JSValue::CellTag), regT1); - Jump match = jump(); - - ASSERT(differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj); - ASSERT(differenceBetween(info.structureToCompare, protoStructureToCompare) == patchOffsetMethodCheckProtoStruct); - ASSERT(differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction); - - // Link the failure cases here. - structureCheck.link(this); - protoStructureCheck.link(this); - - // Do a regular(ish) get_by_id (the slow case will be link to - // cti_op_get_by_id_method_check instead of cti_op_get_by_id. - compileGetByIdHotPath(); - - match.link(this); - emitStore(dst, regT1, regT0); - map(m_bytecodeIndex + OPCODE_LENGTH(op_method_check), dst, regT1, regT0); - - // We've already generated the following get_by_id, so make sure it's skipped over. - m_bytecodeIndex += OPCODE_LENGTH(op_get_by_id); -} - -void JIT::emitSlow_op_method_check(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - currentInstruction += OPCODE_LENGTH(op_method_check); - - int dst = currentInstruction[1].u.operand; - int base = currentInstruction[2].u.operand; - int ident = currentInstruction[3].u.operand; - - compileGetByIdSlowCase(dst, base, &(m_codeBlock->identifier(ident)), iter, true); - - // We've already generated the following get_by_id, so make sure it's skipped over. - m_bytecodeIndex += OPCODE_LENGTH(op_get_by_id); -} - -#else //!ENABLE(JIT_OPTIMIZE_METHOD_CALLS) - -// Treat these as nops - the call will be handed as a regular get_by_id/op_call pair. -void JIT::emit_op_method_check(Instruction*) {} -void JIT::emitSlow_op_method_check(Instruction*, Vector<SlowCaseEntry>::iterator&) { ASSERT_NOT_REACHED(); } - -#endif - -void JIT::emit_op_get_by_val(Instruction* currentInstruction) -{ - unsigned dst = currentInstruction[1].u.operand; - unsigned base = currentInstruction[2].u.operand; - unsigned property = currentInstruction[3].u.operand; - - emitLoad2(base, regT1, regT0, property, regT3, regT2); - - addSlowCase(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); - emitJumpSlowCaseIfNotJSCell(base, regT1); - addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr))); - - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT3); - addSlowCase(branch32(AboveOrEqual, regT2, Address(regT0, OBJECT_OFFSETOF(JSArray, m_vectorLength)))); - - load32(BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + 4), regT1); // tag - load32(BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0])), regT0); // payload - addSlowCase(branch32(Equal, regT1, Imm32(JSValue::EmptyValueTag))); - - emitStore(dst, regT1, regT0); - map(m_bytecodeIndex + OPCODE_LENGTH(op_get_by_val), dst, regT1, regT0); -} - -void JIT::emitSlow_op_get_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - unsigned dst = currentInstruction[1].u.operand; - unsigned base = currentInstruction[2].u.operand; - unsigned property = currentInstruction[3].u.operand; - - linkSlowCase(iter); // property int32 check - linkSlowCaseIfNotJSCell(iter, base); // base cell check - linkSlowCase(iter); // base array check - linkSlowCase(iter); // vector length check - linkSlowCase(iter); // empty value - - JITStubCall stubCall(this, cti_op_get_by_val); - stubCall.addArgument(base); - stubCall.addArgument(property); - stubCall.call(dst); -} - -void JIT::emit_op_put_by_val(Instruction* currentInstruction) -{ - unsigned base = currentInstruction[1].u.operand; - unsigned property = currentInstruction[2].u.operand; - unsigned value = currentInstruction[3].u.operand; - - emitLoad2(base, regT1, regT0, property, regT3, regT2); - - addSlowCase(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); - emitJumpSlowCaseIfNotJSCell(base, regT1); - addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr))); - addSlowCase(branch32(AboveOrEqual, regT2, Address(regT0, OBJECT_OFFSETOF(JSArray, m_vectorLength)))); - - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT3); - - Jump empty = branch32(Equal, BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + 4), Imm32(JSValue::EmptyValueTag)); - - Label storeResult(this); - emitLoad(value, regT1, regT0); - store32(regT0, BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]))); // payload - store32(regT1, BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + 4)); // tag - Jump end = jump(); - - empty.link(this); - add32(Imm32(1), Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_numValuesInVector))); - branch32(Below, regT2, Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_length))).linkTo(storeResult, this); - - add32(Imm32(1), regT2, regT0); - store32(regT0, Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_length))); - jump().linkTo(storeResult, this); - - end.link(this); -} - -void JIT::emitSlow_op_put_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - unsigned base = currentInstruction[1].u.operand; - unsigned property = currentInstruction[2].u.operand; - unsigned value = currentInstruction[3].u.operand; - - linkSlowCase(iter); // property int32 check - linkSlowCaseIfNotJSCell(iter, base); // base cell check - linkSlowCase(iter); // base not array check - linkSlowCase(iter); // in vector check - - JITStubCall stubPutByValCall(this, cti_op_put_by_val); - stubPutByValCall.addArgument(base); - stubPutByValCall.addArgument(property); - stubPutByValCall.addArgument(value); - stubPutByValCall.call(); -} - -void JIT::emit_op_get_by_id(Instruction* currentInstruction) -{ - int dst = currentInstruction[1].u.operand; - int base = currentInstruction[2].u.operand; - - emitLoad(base, regT1, regT0); - emitJumpSlowCaseIfNotJSCell(base, regT1); - compileGetByIdHotPath(); - emitStore(dst, regT1, regT0); - map(m_bytecodeIndex + OPCODE_LENGTH(op_get_by_id), dst, regT1, regT0); -} - -void JIT::compileGetByIdHotPath() -{ - // As for put_by_id, get_by_id requires the offset of the Structure and the offset of the access to be patched. - // Additionally, for get_by_id we need patch the offset of the branch to the slow case (we patch this to jump - // to array-length / prototype access tranpolines, and finally we also the the property-map access offset as a label - // to jump back to if one of these trampolies finds a match. - - BEGIN_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); - - Label hotPathBegin(this); - m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].hotPathBegin = hotPathBegin; - m_propertyAccessInstructionIndex++; - - DataLabelPtr structureToCompare; - Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); - addSlowCase(structureCheck); - ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure); - ASSERT(differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase); - - Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT2); - Label externalLoadComplete(this); - ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetGetByIdExternalLoad); - ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthGetByIdExternalLoad); - - DataLabel32 displacementLabel1 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT0); // payload - ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetGetByIdPropertyMapOffset1); - DataLabel32 displacementLabel2 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT1); // tag - ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetGetByIdPropertyMapOffset2); - - Label putResult(this); - ASSERT(differenceBetween(hotPathBegin, putResult) == patchOffsetGetByIdPutResult); - - END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); -} - -void JIT::emitSlow_op_get_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - int dst = currentInstruction[1].u.operand; - int base = currentInstruction[2].u.operand; - int ident = currentInstruction[3].u.operand; - - compileGetByIdSlowCase(dst, base, &(m_codeBlock->identifier(ident)), iter); -} - -void JIT::compileGetByIdSlowCase(int dst, int base, Identifier* ident, Vector<SlowCaseEntry>::iterator& iter, bool isMethodCheck) -{ - // As for the hot path of get_by_id, above, we ensure that we can use an architecture specific offset - // so that we only need track one pointer into the slow case code - we track a pointer to the location - // of the call (which we can use to look up the patch information), but should a array-length or - // prototype access trampoline fail we want to bail out back to here. To do so we can subtract back - // the distance from the call to the head of the slow case. - linkSlowCaseIfNotJSCell(iter, base); - linkSlowCase(iter); - - BEGIN_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); - -#ifndef NDEBUG - Label coldPathBegin(this); -#endif - JITStubCall stubCall(this, isMethodCheck ? cti_op_get_by_id_method_check : cti_op_get_by_id); - stubCall.addArgument(regT1, regT0); - stubCall.addArgument(ImmPtr(ident)); - Call call = stubCall.call(dst); - - END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); - - ASSERT(differenceBetween(coldPathBegin, call) == patchOffsetGetByIdSlowCaseCall); - - // Track the location of the call; this will be used to recover patch information. - m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].callReturnLocation = call; - m_propertyAccessInstructionIndex++; -} - -void JIT::emit_op_put_by_id(Instruction* currentInstruction) -{ - // In order to be able to patch both the Structure, and the object offset, we store one pointer, - // to just after the arguments have been loaded into registers 'hotPathBegin', and we generate code - // such that the Structure & offset are always at the same distance from this. - - int base = currentInstruction[1].u.operand; - int value = currentInstruction[3].u.operand; - - emitLoad2(base, regT1, regT0, value, regT3, regT2); - - emitJumpSlowCaseIfNotJSCell(base, regT1); - - BEGIN_UNINTERRUPTED_SEQUENCE(sequencePutById); - - Label hotPathBegin(this); - m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].hotPathBegin = hotPathBegin; - m_propertyAccessInstructionIndex++; - - // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over. - DataLabelPtr structureToCompare; - addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)))); - ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure); - - // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used. - Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); - Label externalLoadComplete(this); - ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetPutByIdExternalLoad); - ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthPutByIdExternalLoad); - - DataLabel32 displacementLabel1 = storePtrWithAddressOffsetPatch(regT2, Address(regT0, patchGetByIdDefaultOffset)); // payload - DataLabel32 displacementLabel2 = storePtrWithAddressOffsetPatch(regT3, Address(regT0, patchGetByIdDefaultOffset)); // tag - - END_UNINTERRUPTED_SEQUENCE(sequencePutById); - - ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetPutByIdPropertyMapOffset1); - ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetPutByIdPropertyMapOffset2); -} - -void JIT::emitSlow_op_put_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - int base = currentInstruction[1].u.operand; - int ident = currentInstruction[2].u.operand; - - linkSlowCaseIfNotJSCell(iter, base); - linkSlowCase(iter); - - JITStubCall stubCall(this, cti_op_put_by_id); - stubCall.addArgument(regT1, regT0); - stubCall.addArgument(ImmPtr(&(m_codeBlock->identifier(ident)))); - stubCall.addArgument(regT3, regT2); - Call call = stubCall.call(); - - // Track the location of the call; this will be used to recover patch information. - m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].callReturnLocation = call; - m_propertyAccessInstructionIndex++; -} - -// Compile a store into an object's property storage. May overwrite base. -void JIT::compilePutDirectOffset(RegisterID base, RegisterID valueTag, RegisterID valuePayload, Structure* structure, size_t cachedOffset) -{ - int offset = cachedOffset; - if (structure->isUsingInlineStorage()) - offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage) / sizeof(Register); - else - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); - emitStore(offset, valueTag, valuePayload, base); -} - -// Compile a load from an object's property storage. May overwrite base. -void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, Structure* structure, size_t cachedOffset) -{ - int offset = cachedOffset; - if (structure->isUsingInlineStorage()) - offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage) / sizeof(Register); - else - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); - emitLoad(offset, resultTag, resultPayload, base); -} - -void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset) -{ - if (base->isUsingInlineStorage()) { - load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]), resultPayload); - load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]) + 4, resultTag); - return; - } - - size_t offset = cachedOffset * sizeof(JSValue); - - PropertyStorage* protoPropertyStorage = &base->m_externalStorage; - loadPtr(static_cast<void*>(protoPropertyStorage), temp); - load32(Address(temp, offset), resultPayload); - load32(Address(temp, offset + 4), resultTag); -} - -void JIT::testPrototype(Structure* structure, JumpList& failureCases) -{ - if (structure->m_prototype.isNull()) - return; - - failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&asCell(structure->m_prototype)->m_structure), ImmPtr(asCell(structure->m_prototype)->m_structure))); -} - -void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress) -{ - // It is assumed that regT0 contains the basePayload and regT1 contains the baseTag. The value can be found on the stack. - - JumpList failureCases; - failureCases.append(branch32(NotEqual, regT1, Imm32(JSValue::CellTag))); - failureCases.append(branchPtr(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), ImmPtr(oldStructure))); - testPrototype(oldStructure, failureCases); - - // Verify that nothing in the prototype chain has a setter for this property. - for (RefPtr<Structure>* it = chain->head(); *it; ++it) - testPrototype(it->get(), failureCases); - - // Reallocate property storage if needed. - Call callTarget; - bool willNeedStorageRealloc = oldStructure->propertyStorageCapacity() != newStructure->propertyStorageCapacity(); - if (willNeedStorageRealloc) { - // This trampoline was called to like a JIT stub; before we can can call again we need to - // remove the return address from the stack, to prevent the stack from becoming misaligned. - preserveReturnAddressAfterCall(regT3); - - JITStubCall stubCall(this, cti_op_put_by_id_transition_realloc); - stubCall.skipArgument(); // base - stubCall.skipArgument(); // ident - stubCall.skipArgument(); // value - stubCall.addArgument(Imm32(oldStructure->propertyStorageCapacity())); - stubCall.addArgument(Imm32(newStructure->propertyStorageCapacity())); - stubCall.call(regT0); - - restoreReturnAddressBeforeReturn(regT3); - } - - sub32(Imm32(1), AbsoluteAddress(oldStructure->addressOfCount())); - add32(Imm32(1), AbsoluteAddress(newStructure->addressOfCount())); - storePtr(ImmPtr(newStructure), Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure))); - - load32(Address(stackPointerRegister, offsetof(struct JITStackFrame, args[2]) + sizeof(void*)), regT3); - load32(Address(stackPointerRegister, offsetof(struct JITStackFrame, args[2]) + sizeof(void*) + 4), regT2); - - // Write the value - compilePutDirectOffset(regT0, regT2, regT3, newStructure, cachedOffset); - - ret(); - - ASSERT(!failureCases.empty()); - failureCases.link(this); - restoreArgumentReferenceForTrampoline(); - Call failureCall = tailRecursiveCall(); - - LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); - - patchBuffer.link(failureCall, FunctionPtr(cti_op_put_by_id_fail)); - - if (willNeedStorageRealloc) { - ASSERT(m_calls.size() == 1); - patchBuffer.link(m_calls[0].from, FunctionPtr(cti_op_put_by_id_transition_realloc)); - } - - CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); - stubInfo->stubRoutine = entryLabel; - RepatchBuffer repatchBuffer(m_codeBlock); - repatchBuffer.relinkCallerToTrampoline(returnAddress, entryLabel); -} - -void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) -{ - RepatchBuffer repatchBuffer(codeBlock); - - // We don't want to patch more than once - in future go to cti_op_get_by_id_generic. - // Should probably go to JITStubs::cti_op_get_by_id_fail, but that doesn't do anything interesting right now. - repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_self_fail)); - - int offset = sizeof(JSValue) * cachedOffset; - - // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load - // and makes the subsequent load's offset automatically correct - if (structure->isUsingInlineStorage()) - repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetGetByIdExternalLoad)); - - // Patch the offset into the propoerty map to load from, then patch the Structure to look for. - repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetGetByIdStructure), structure); - repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset1), offset); // payload - repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset2), offset + 4); // tag -} - -void JIT::patchMethodCallProto(CodeBlock* codeBlock, MethodCallLinkInfo& methodCallLinkInfo, JSFunction* callee, Structure* structure, JSObject* proto, ReturnAddressPtr returnAddress) -{ - RepatchBuffer repatchBuffer(codeBlock); - - ASSERT(!methodCallLinkInfo.cachedStructure); - methodCallLinkInfo.cachedStructure = structure; - structure->ref(); - - Structure* prototypeStructure = proto->structure(); - ASSERT(!methodCallLinkInfo.cachedPrototypeStructure); - methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure; - prototypeStructure->ref(); - - repatchBuffer.repatch(methodCallLinkInfo.structureLabel, structure); - repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoObj), proto); - repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), prototypeStructure); - repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckPutFunction), callee); - - repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id)); -} - -void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) -{ - RepatchBuffer repatchBuffer(codeBlock); - - // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. - // Should probably go to cti_op_put_by_id_fail, but that doesn't do anything interesting right now. - repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_put_by_id_generic)); - - int offset = sizeof(JSValue) * cachedOffset; - - // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load - // and makes the subsequent load's offset automatically correct - if (structure->isUsingInlineStorage()) - repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetPutByIdExternalLoad)); - - // Patch the offset into the propoerty map to load from, then patch the Structure to look for. - repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetPutByIdStructure), structure); - repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset1), offset); // payload - repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset2), offset + 4); // tag -} - -void JIT::privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress) -{ - StructureStubInfo* stubInfo = &m_codeBlock->getStubInfo(returnAddress); - - // regT0 holds a JSCell* - - // Check for array - Jump failureCases1 = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr)); - - // Checks out okay! - get the length from the storage - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT2); - load32(Address(regT2, OBJECT_OFFSETOF(ArrayStorage, m_length)), regT2); - - Jump failureCases2 = branch32(Above, regT2, Imm32(INT_MAX)); - move(regT2, regT0); - move(Imm32(JSValue::Int32Tag), regT1); - Jump success = jump(); - - LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); - - // Use the patch information to link the failure cases back to the original slow case routine. - CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall); - patchBuffer.link(failureCases1, slowCaseBegin); - patchBuffer.link(failureCases2, slowCaseBegin); - - // On success return back to the hot patch code, at a point it will perform the store to dest for us. - patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); - - // Track the stub we have created so that it will be deleted later. - CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); - stubInfo->stubRoutine = entryLabel; - - // Finally patch the jump to slow case back in the hot path to jump here instead. - CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer(m_codeBlock); - repatchBuffer.relink(jumpLocation, entryLabel); - - // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. - repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_array_fail)); -} - -void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame) -{ - // regT0 holds a JSCell* - - // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is - // referencing the prototype object - let's speculatively load it's table nice and early!) - JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame)); - - Jump failureCases1 = checkStructure(regT0, structure); - - // Check the prototype object's Structure had not changed. - Structure** prototypeStructureAddress = &(protoObject->m_structure); -#if CPU(X86_64) - move(ImmPtr(prototypeStructure), regT3); - Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3); -#else - Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure)); -#endif - - // Checks out okay! - getDirectOffset - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); - - Jump success = jump(); - - LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); - - // Use the patch information to link the failure cases back to the original slow case routine. - CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall); - patchBuffer.link(failureCases1, slowCaseBegin); - patchBuffer.link(failureCases2, slowCaseBegin); - - // On success return back to the hot patch code, at a point it will perform the store to dest for us. - patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); - - // Track the stub we have created so that it will be deleted later. - CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); - stubInfo->stubRoutine = entryLabel; - - // Finally patch the jump to slow case back in the hot path to jump here instead. - CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer(m_codeBlock); - repatchBuffer.relink(jumpLocation, entryLabel); - - // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. - repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list)); -} - - -void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, size_t cachedOffset) -{ - // regT0 holds a JSCell* - - Jump failureCase = checkStructure(regT0, structure); - compileGetDirectOffset(regT0, regT1, regT0, structure, cachedOffset); - Jump success = jump(); - - LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); - - // Use the patch information to link the failure cases back to the original slow case routine. - CodeLocationLabel lastProtoBegin = polymorphicStructures->list[currentIndex - 1].stubRoutine; - if (!lastProtoBegin) - lastProtoBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall); - - patchBuffer.link(failureCase, lastProtoBegin); - - // On success return back to the hot patch code, at a point it will perform the store to dest for us. - patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); - - CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); - - structure->ref(); - polymorphicStructures->list[currentIndex].set(entryLabel, structure); - - // Finally patch the jump to slow case back in the hot path to jump here instead. - CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer(m_codeBlock); - repatchBuffer.relink(jumpLocation, entryLabel); -} - -void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, CallFrame* callFrame) -{ - // regT0 holds a JSCell* - - // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is - // referencing the prototype object - let's speculatively load it's table nice and early!) - JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame)); - - // Check eax is an object of the right Structure. - Jump failureCases1 = checkStructure(regT0, structure); - - // Check the prototype object's Structure had not changed. - Structure** prototypeStructureAddress = &(protoObject->m_structure); -#if CPU(X86_64) - move(ImmPtr(prototypeStructure), regT3); - Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3); -#else - Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure)); -#endif - - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); - - Jump success = jump(); - - LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); - - // Use the patch information to link the failure cases back to the original slow case routine. - CodeLocationLabel lastProtoBegin = prototypeStructures->list[currentIndex - 1].stubRoutine; - patchBuffer.link(failureCases1, lastProtoBegin); - patchBuffer.link(failureCases2, lastProtoBegin); - - // On success return back to the hot patch code, at a point it will perform the store to dest for us. - patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); - - CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); - - structure->ref(); - prototypeStructure->ref(); - prototypeStructures->list[currentIndex].set(entryLabel, structure, prototypeStructure); - - // Finally patch the jump to slow case back in the hot path to jump here instead. - CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer(m_codeBlock); - repatchBuffer.relink(jumpLocation, entryLabel); -} - -void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, CallFrame* callFrame) -{ - // regT0 holds a JSCell* - - ASSERT(count); - - JumpList bucketsOfFail; - - // Check eax is an object of the right Structure. - bucketsOfFail.append(checkStructure(regT0, structure)); - - Structure* currStructure = structure; - RefPtr<Structure>* chainEntries = chain->head(); - JSObject* protoObject = 0; - for (unsigned i = 0; i < count; ++i) { - protoObject = asObject(currStructure->prototypeForLookup(callFrame)); - currStructure = chainEntries[i].get(); - - // Check the prototype object's Structure had not changed. - Structure** prototypeStructureAddress = &(protoObject->m_structure); -#if CPU(X86_64) - move(ImmPtr(currStructure), regT3); - bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3)); -#else - bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure))); -#endif - } - ASSERT(protoObject); - - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); - Jump success = jump(); - - LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); - - // Use the patch information to link the failure cases back to the original slow case routine. - CodeLocationLabel lastProtoBegin = prototypeStructures->list[currentIndex - 1].stubRoutine; - - patchBuffer.link(bucketsOfFail, lastProtoBegin); - - // On success return back to the hot patch code, at a point it will perform the store to dest for us. - patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); - - CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); - - // Track the stub we have created so that it will be deleted later. - structure->ref(); - chain->ref(); - prototypeStructures->list[currentIndex].set(entryLabel, structure, chain); - - // Finally patch the jump to slow case back in the hot path to jump here instead. - CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer(m_codeBlock); - repatchBuffer.relink(jumpLocation, entryLabel); -} - -void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame) -{ - // regT0 holds a JSCell* - - ASSERT(count); - - JumpList bucketsOfFail; - - // Check eax is an object of the right Structure. - bucketsOfFail.append(checkStructure(regT0, structure)); - - Structure* currStructure = structure; - RefPtr<Structure>* chainEntries = chain->head(); - JSObject* protoObject = 0; - for (unsigned i = 0; i < count; ++i) { - protoObject = asObject(currStructure->prototypeForLookup(callFrame)); - currStructure = chainEntries[i].get(); - - // Check the prototype object's Structure had not changed. - Structure** prototypeStructureAddress = &(protoObject->m_structure); -#if CPU(X86_64) - move(ImmPtr(currStructure), regT3); - bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3)); -#else - bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure))); -#endif - } - ASSERT(protoObject); - - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); - Jump success = jump(); - - LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); - - // Use the patch information to link the failure cases back to the original slow case routine. - patchBuffer.link(bucketsOfFail, stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall)); - - // On success return back to the hot patch code, at a point it will perform the store to dest for us. - patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); - - // Track the stub we have created so that it will be deleted later. - CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); - stubInfo->stubRoutine = entryLabel; - - // Finally patch the jump to slow case back in the hot path to jump here instead. - CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer(m_codeBlock); - repatchBuffer.relink(jumpLocation, entryLabel); - - // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. - repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list)); -} - -/* ------------------------------ END: !ENABLE / ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */ - -#endif // !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) - -void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID structure, RegisterID offset) -{ - ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t)); - ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t)); - ASSERT(sizeof(JSValue) == 8); - - Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity)); - loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage)+OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); - loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage)+OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); - Jump finishedLoad = jump(); - notUsingInlineStorage.link(this); - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); - loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); - loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); - finishedLoad.link(this); -} - -void JIT::emit_op_get_by_pname(Instruction* currentInstruction) -{ - unsigned dst = currentInstruction[1].u.operand; - unsigned base = currentInstruction[2].u.operand; - unsigned property = currentInstruction[3].u.operand; - unsigned expected = currentInstruction[4].u.operand; - unsigned iter = currentInstruction[5].u.operand; - unsigned i = currentInstruction[6].u.operand; - - emitLoad2(property, regT1, regT0, base, regT3, regT2); - emitJumpSlowCaseIfNotJSCell(property, regT1); - addSlowCase(branchPtr(NotEqual, regT0, payloadFor(expected))); - // Property registers are now available as the property is known - emitJumpSlowCaseIfNotJSCell(base, regT3); - emitLoadPayload(iter, regT1); - - // Test base's structure - loadPtr(Address(regT2, OBJECT_OFFSETOF(JSCell, m_structure)), regT0); - addSlowCase(branchPtr(NotEqual, regT0, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))); - load32(addressFor(i), regT3); - sub32(Imm32(1), regT3); - addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots)))); - compileGetDirectOffset(regT2, regT1, regT0, regT0, regT3); - - emitStore(dst, regT1, regT0); - map(m_bytecodeIndex + OPCODE_LENGTH(op_get_by_pname), dst, regT1, regT0); -} - -void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) -{ - unsigned dst = currentInstruction[1].u.operand; - unsigned base = currentInstruction[2].u.operand; - unsigned property = currentInstruction[3].u.operand; - - linkSlowCaseIfNotJSCell(iter, property); - linkSlowCase(iter); - linkSlowCaseIfNotJSCell(iter, base); - linkSlowCase(iter); - linkSlowCase(iter); - - JITStubCall stubCall(this, cti_op_get_by_val); - stubCall.addArgument(base); - stubCall.addArgument(property); - stubCall.call(dst); -} - -#else // USE(JSVALUE32_64) - void JIT::emit_op_get_by_val(Instruction* currentInstruction) { unsigned dst = currentInstruction[1].u.operand; @@ -1594,7 +625,6 @@ void JIT::patchMethodCallProto(CodeBlock* codeBlock, MethodCallLinkInfo& methodC structure->ref(); Structure* prototypeStructure = proto->structure(); - ASSERT(!methodCallLinkInfo.cachedPrototypeStructure); methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure; prototypeStructure->ref(); @@ -1894,8 +924,8 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str #endif // !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) -#endif // USE(JSVALUE32_64) - } // namespace JSC #endif // ENABLE(JIT) + +#endif // !USE(JSVALUE32_64) diff --git a/JavaScriptCore/jit/JITPropertyAccess32_64.cpp b/JavaScriptCore/jit/JITPropertyAccess32_64.cpp new file mode 100644 index 0000000..f9e323d --- /dev/null +++ b/JavaScriptCore/jit/JITPropertyAccess32_64.cpp @@ -0,0 +1,1026 @@ +/* + * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if USE(JSVALUE32_64) + +#include "JIT.h" + +#if ENABLE(JIT) + +#include "CodeBlock.h" +#include "JITInlineMethods.h" +#include "JITStubCall.h" +#include "JSArray.h" +#include "JSFunction.h" +#include "JSPropertyNameIterator.h" +#include "Interpreter.h" +#include "LinkBuffer.h" +#include "RepatchBuffer.h" +#include "ResultType.h" +#include "SamplingTool.h" + +#ifndef NDEBUG +#include <stdio.h> +#endif + +using namespace std; + +namespace JSC { + +void JIT::emit_op_put_by_index(Instruction* currentInstruction) +{ + unsigned base = currentInstruction[1].u.operand; + unsigned property = currentInstruction[2].u.operand; + unsigned value = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_put_by_index); + stubCall.addArgument(base); + stubCall.addArgument(Imm32(property)); + stubCall.addArgument(value); + stubCall.call(); +} + +void JIT::emit_op_put_getter(Instruction* currentInstruction) +{ + unsigned base = currentInstruction[1].u.operand; + unsigned property = currentInstruction[2].u.operand; + unsigned function = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_put_getter); + stubCall.addArgument(base); + stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(property))); + stubCall.addArgument(function); + stubCall.call(); +} + +void JIT::emit_op_put_setter(Instruction* currentInstruction) +{ + unsigned base = currentInstruction[1].u.operand; + unsigned property = currentInstruction[2].u.operand; + unsigned function = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_put_setter); + stubCall.addArgument(base); + stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(property))); + stubCall.addArgument(function); + stubCall.call(); +} + +void JIT::emit_op_del_by_id(Instruction* currentInstruction) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_del_by_id); + stubCall.addArgument(base); + stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(property))); + stubCall.call(dst); +} + + +#if !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) + +/* ------------------------------ BEGIN: !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */ + +// Treat these as nops - the call will be handed as a regular get_by_id/op_call pair. +void JIT::emit_op_method_check(Instruction*) {} +void JIT::emitSlow_op_method_check(Instruction*, Vector<SlowCaseEntry>::iterator&) { ASSERT_NOT_REACHED(); } +#if ENABLE(JIT_OPTIMIZE_METHOD_CALLS) +#error "JIT_OPTIMIZE_METHOD_CALLS requires JIT_OPTIMIZE_PROPERTY_ACCESS" +#endif + +void JIT::emit_op_get_by_val(Instruction* currentInstruction) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_get_by_val); + stubCall.addArgument(base); + stubCall.addArgument(property); + stubCall.call(dst); +} + +void JIT::emitSlow_op_get_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&) +{ + ASSERT_NOT_REACHED(); +} + +void JIT::emit_op_put_by_val(Instruction* currentInstruction) +{ + unsigned base = currentInstruction[1].u.operand; + unsigned property = currentInstruction[2].u.operand; + unsigned value = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_put_by_val); + stubCall.addArgument(base); + stubCall.addArgument(property); + stubCall.addArgument(value); + stubCall.call(); +} + +void JIT::emitSlow_op_put_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&) +{ + ASSERT_NOT_REACHED(); +} + +void JIT::emit_op_get_by_id(Instruction* currentInstruction) +{ + int dst = currentInstruction[1].u.operand; + int base = currentInstruction[2].u.operand; + int ident = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_get_by_id_generic); + stubCall.addArgument(base); + stubCall.addArgument(ImmPtr(&(m_codeBlock->identifier(ident)))); + stubCall.call(dst); + + m_propertyAccessInstructionIndex++; +} + +void JIT::emitSlow_op_get_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&) +{ + m_propertyAccessInstructionIndex++; + ASSERT_NOT_REACHED(); +} + +void JIT::emit_op_put_by_id(Instruction* currentInstruction) +{ + int base = currentInstruction[1].u.operand; + int ident = currentInstruction[2].u.operand; + int value = currentInstruction[3].u.operand; + + JITStubCall stubCall(this, cti_op_put_by_id_generic); + stubCall.addArgument(base); + stubCall.addArgument(ImmPtr(&(m_codeBlock->identifier(ident)))); + stubCall.addArgument(value); + stubCall.call(); + + m_propertyAccessInstructionIndex++; +} + +void JIT::emitSlow_op_put_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&) +{ + m_propertyAccessInstructionIndex++; + ASSERT_NOT_REACHED(); +} + +#else // !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) + +/* ------------------------------ BEGIN: ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */ + +#if ENABLE(JIT_OPTIMIZE_METHOD_CALLS) + +void JIT::emit_op_method_check(Instruction* currentInstruction) +{ + // Assert that the following instruction is a get_by_id. + ASSERT(m_interpreter->getOpcodeID((currentInstruction + OPCODE_LENGTH(op_method_check))->u.opcode) == op_get_by_id); + + currentInstruction += OPCODE_LENGTH(op_method_check); + + // Do the method check - check the object & its prototype's structure inline (this is the common case). + m_methodCallCompilationInfo.append(MethodCallCompilationInfo(m_propertyAccessInstructionIndex)); + MethodCallCompilationInfo& info = m_methodCallCompilationInfo.last(); + + int dst = currentInstruction[1].u.operand; + int base = currentInstruction[2].u.operand; + + emitLoad(base, regT1, regT0); + emitJumpSlowCaseIfNotJSCell(base, regT1); + + BEGIN_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck); + + Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), info.structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); + DataLabelPtr protoStructureToCompare, protoObj = moveWithPatch(ImmPtr(0), regT2); + Jump protoStructureCheck = branchPtrWithPatch(NotEqual, Address(regT2, OBJECT_OFFSETOF(JSCell, m_structure)), protoStructureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); + + // This will be relinked to load the function without doing a load. + DataLabelPtr putFunction = moveWithPatch(ImmPtr(0), regT0); + + END_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck); + + move(Imm32(JSValue::CellTag), regT1); + Jump match = jump(); + + ASSERT(differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj); + ASSERT(differenceBetween(info.structureToCompare, protoStructureToCompare) == patchOffsetMethodCheckProtoStruct); + ASSERT(differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction); + + // Link the failure cases here. + structureCheck.link(this); + protoStructureCheck.link(this); + + // Do a regular(ish) get_by_id (the slow case will be link to + // cti_op_get_by_id_method_check instead of cti_op_get_by_id. + compileGetByIdHotPath(); + + match.link(this); + emitStore(dst, regT1, regT0); + map(m_bytecodeIndex + OPCODE_LENGTH(op_method_check), dst, regT1, regT0); + + // We've already generated the following get_by_id, so make sure it's skipped over. + m_bytecodeIndex += OPCODE_LENGTH(op_get_by_id); +} + +void JIT::emitSlow_op_method_check(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +{ + currentInstruction += OPCODE_LENGTH(op_method_check); + + int dst = currentInstruction[1].u.operand; + int base = currentInstruction[2].u.operand; + int ident = currentInstruction[3].u.operand; + + compileGetByIdSlowCase(dst, base, &(m_codeBlock->identifier(ident)), iter, true); + + // We've already generated the following get_by_id, so make sure it's skipped over. + m_bytecodeIndex += OPCODE_LENGTH(op_get_by_id); +} + +#else //!ENABLE(JIT_OPTIMIZE_METHOD_CALLS) + +// Treat these as nops - the call will be handed as a regular get_by_id/op_call pair. +void JIT::emit_op_method_check(Instruction*) {} +void JIT::emitSlow_op_method_check(Instruction*, Vector<SlowCaseEntry>::iterator&) { ASSERT_NOT_REACHED(); } + +#endif + +void JIT::emit_op_get_by_val(Instruction* currentInstruction) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + + emitLoad2(base, regT1, regT0, property, regT3, regT2); + + addSlowCase(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); + emitJumpSlowCaseIfNotJSCell(base, regT1); + addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr))); + + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT3); + addSlowCase(branch32(AboveOrEqual, regT2, Address(regT0, OBJECT_OFFSETOF(JSArray, m_vectorLength)))); + + load32(BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + 4), regT1); // tag + load32(BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0])), regT0); // payload + addSlowCase(branch32(Equal, regT1, Imm32(JSValue::EmptyValueTag))); + + emitStore(dst, regT1, regT0); + map(m_bytecodeIndex + OPCODE_LENGTH(op_get_by_val), dst, regT1, regT0); +} + +void JIT::emitSlow_op_get_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + + linkSlowCase(iter); // property int32 check + linkSlowCaseIfNotJSCell(iter, base); // base cell check + linkSlowCase(iter); // base array check + linkSlowCase(iter); // vector length check + linkSlowCase(iter); // empty value + + JITStubCall stubCall(this, cti_op_get_by_val); + stubCall.addArgument(base); + stubCall.addArgument(property); + stubCall.call(dst); +} + +void JIT::emit_op_put_by_val(Instruction* currentInstruction) +{ + unsigned base = currentInstruction[1].u.operand; + unsigned property = currentInstruction[2].u.operand; + unsigned value = currentInstruction[3].u.operand; + + emitLoad2(base, regT1, regT0, property, regT3, regT2); + + addSlowCase(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); + emitJumpSlowCaseIfNotJSCell(base, regT1); + addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr))); + addSlowCase(branch32(AboveOrEqual, regT2, Address(regT0, OBJECT_OFFSETOF(JSArray, m_vectorLength)))); + + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT3); + + Jump empty = branch32(Equal, BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + 4), Imm32(JSValue::EmptyValueTag)); + + Label storeResult(this); + emitLoad(value, regT1, regT0); + store32(regT0, BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]))); // payload + store32(regT1, BaseIndex(regT3, regT2, TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + 4)); // tag + Jump end = jump(); + + empty.link(this); + add32(Imm32(1), Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_numValuesInVector))); + branch32(Below, regT2, Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_length))).linkTo(storeResult, this); + + add32(Imm32(1), regT2, regT0); + store32(regT0, Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_length))); + jump().linkTo(storeResult, this); + + end.link(this); +} + +void JIT::emitSlow_op_put_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +{ + unsigned base = currentInstruction[1].u.operand; + unsigned property = currentInstruction[2].u.operand; + unsigned value = currentInstruction[3].u.operand; + + linkSlowCase(iter); // property int32 check + linkSlowCaseIfNotJSCell(iter, base); // base cell check + linkSlowCase(iter); // base not array check + linkSlowCase(iter); // in vector check + + JITStubCall stubPutByValCall(this, cti_op_put_by_val); + stubPutByValCall.addArgument(base); + stubPutByValCall.addArgument(property); + stubPutByValCall.addArgument(value); + stubPutByValCall.call(); +} + +void JIT::emit_op_get_by_id(Instruction* currentInstruction) +{ + int dst = currentInstruction[1].u.operand; + int base = currentInstruction[2].u.operand; + + emitLoad(base, regT1, regT0); + emitJumpSlowCaseIfNotJSCell(base, regT1); + compileGetByIdHotPath(); + emitStore(dst, regT1, regT0); + map(m_bytecodeIndex + OPCODE_LENGTH(op_get_by_id), dst, regT1, regT0); +} + +void JIT::compileGetByIdHotPath() +{ + // As for put_by_id, get_by_id requires the offset of the Structure and the offset of the access to be patched. + // Additionally, for get_by_id we need patch the offset of the branch to the slow case (we patch this to jump + // to array-length / prototype access tranpolines, and finally we also the the property-map access offset as a label + // to jump back to if one of these trampolies finds a match. + + BEGIN_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); + + Label hotPathBegin(this); + m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].hotPathBegin = hotPathBegin; + m_propertyAccessInstructionIndex++; + + DataLabelPtr structureToCompare; + Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); + addSlowCase(structureCheck); + ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure); + ASSERT(differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase); + + Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT2); + Label externalLoadComplete(this); + ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetGetByIdExternalLoad); + ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthGetByIdExternalLoad); + + DataLabel32 displacementLabel1 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT0); // payload + ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetGetByIdPropertyMapOffset1); + DataLabel32 displacementLabel2 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT1); // tag + ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetGetByIdPropertyMapOffset2); + + Label putResult(this); + ASSERT(differenceBetween(hotPathBegin, putResult) == patchOffsetGetByIdPutResult); + + END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); +} + +void JIT::emitSlow_op_get_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +{ + int dst = currentInstruction[1].u.operand; + int base = currentInstruction[2].u.operand; + int ident = currentInstruction[3].u.operand; + + compileGetByIdSlowCase(dst, base, &(m_codeBlock->identifier(ident)), iter); +} + +void JIT::compileGetByIdSlowCase(int dst, int base, Identifier* ident, Vector<SlowCaseEntry>::iterator& iter, bool isMethodCheck) +{ + // As for the hot path of get_by_id, above, we ensure that we can use an architecture specific offset + // so that we only need track one pointer into the slow case code - we track a pointer to the location + // of the call (which we can use to look up the patch information), but should a array-length or + // prototype access trampoline fail we want to bail out back to here. To do so we can subtract back + // the distance from the call to the head of the slow case. + linkSlowCaseIfNotJSCell(iter, base); + linkSlowCase(iter); + + BEGIN_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); + +#ifndef NDEBUG + Label coldPathBegin(this); +#endif + JITStubCall stubCall(this, isMethodCheck ? cti_op_get_by_id_method_check : cti_op_get_by_id); + stubCall.addArgument(regT1, regT0); + stubCall.addArgument(ImmPtr(ident)); + Call call = stubCall.call(dst); + + END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); + + ASSERT(differenceBetween(coldPathBegin, call) == patchOffsetGetByIdSlowCaseCall); + + // Track the location of the call; this will be used to recover patch information. + m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].callReturnLocation = call; + m_propertyAccessInstructionIndex++; +} + +void JIT::emit_op_put_by_id(Instruction* currentInstruction) +{ + // In order to be able to patch both the Structure, and the object offset, we store one pointer, + // to just after the arguments have been loaded into registers 'hotPathBegin', and we generate code + // such that the Structure & offset are always at the same distance from this. + + int base = currentInstruction[1].u.operand; + int value = currentInstruction[3].u.operand; + + emitLoad2(base, regT1, regT0, value, regT3, regT2); + + emitJumpSlowCaseIfNotJSCell(base, regT1); + + BEGIN_UNINTERRUPTED_SEQUENCE(sequencePutById); + + Label hotPathBegin(this); + m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].hotPathBegin = hotPathBegin; + m_propertyAccessInstructionIndex++; + + // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over. + DataLabelPtr structureToCompare; + addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)))); + ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure); + + // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used. + Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); + Label externalLoadComplete(this); + ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetPutByIdExternalLoad); + ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthPutByIdExternalLoad); + + DataLabel32 displacementLabel1 = storePtrWithAddressOffsetPatch(regT2, Address(regT0, patchGetByIdDefaultOffset)); // payload + DataLabel32 displacementLabel2 = storePtrWithAddressOffsetPatch(regT3, Address(regT0, patchGetByIdDefaultOffset)); // tag + + END_UNINTERRUPTED_SEQUENCE(sequencePutById); + + ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetPutByIdPropertyMapOffset1); + ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetPutByIdPropertyMapOffset2); +} + +void JIT::emitSlow_op_put_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +{ + int base = currentInstruction[1].u.operand; + int ident = currentInstruction[2].u.operand; + + linkSlowCaseIfNotJSCell(iter, base); + linkSlowCase(iter); + + JITStubCall stubCall(this, cti_op_put_by_id); + stubCall.addArgument(regT1, regT0); + stubCall.addArgument(ImmPtr(&(m_codeBlock->identifier(ident)))); + stubCall.addArgument(regT3, regT2); + Call call = stubCall.call(); + + // Track the location of the call; this will be used to recover patch information. + m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].callReturnLocation = call; + m_propertyAccessInstructionIndex++; +} + +// Compile a store into an object's property storage. May overwrite base. +void JIT::compilePutDirectOffset(RegisterID base, RegisterID valueTag, RegisterID valuePayload, Structure* structure, size_t cachedOffset) +{ + int offset = cachedOffset; + if (structure->isUsingInlineStorage()) + offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage) / sizeof(Register); + else + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); + emitStore(offset, valueTag, valuePayload, base); +} + +// Compile a load from an object's property storage. May overwrite base. +void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, Structure* structure, size_t cachedOffset) +{ + int offset = cachedOffset; + if (structure->isUsingInlineStorage()) + offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage) / sizeof(Register); + else + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); + emitLoad(offset, resultTag, resultPayload, base); +} + +void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset) +{ + if (base->isUsingInlineStorage()) { + load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]), resultPayload); + load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]) + 4, resultTag); + return; + } + + size_t offset = cachedOffset * sizeof(JSValue); + + PropertyStorage* protoPropertyStorage = &base->m_externalStorage; + loadPtr(static_cast<void*>(protoPropertyStorage), temp); + load32(Address(temp, offset), resultPayload); + load32(Address(temp, offset + 4), resultTag); +} + +void JIT::testPrototype(Structure* structure, JumpList& failureCases) +{ + if (structure->m_prototype.isNull()) + return; + + failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&asCell(structure->m_prototype)->m_structure), ImmPtr(asCell(structure->m_prototype)->m_structure))); +} + +void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress) +{ + // It is assumed that regT0 contains the basePayload and regT1 contains the baseTag. The value can be found on the stack. + + JumpList failureCases; + failureCases.append(branch32(NotEqual, regT1, Imm32(JSValue::CellTag))); + failureCases.append(branchPtr(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), ImmPtr(oldStructure))); + testPrototype(oldStructure, failureCases); + + // Verify that nothing in the prototype chain has a setter for this property. + for (RefPtr<Structure>* it = chain->head(); *it; ++it) + testPrototype(it->get(), failureCases); + + // Reallocate property storage if needed. + Call callTarget; + bool willNeedStorageRealloc = oldStructure->propertyStorageCapacity() != newStructure->propertyStorageCapacity(); + if (willNeedStorageRealloc) { + // This trampoline was called to like a JIT stub; before we can can call again we need to + // remove the return address from the stack, to prevent the stack from becoming misaligned. + preserveReturnAddressAfterCall(regT3); + + JITStubCall stubCall(this, cti_op_put_by_id_transition_realloc); + stubCall.skipArgument(); // base + stubCall.skipArgument(); // ident + stubCall.skipArgument(); // value + stubCall.addArgument(Imm32(oldStructure->propertyStorageCapacity())); + stubCall.addArgument(Imm32(newStructure->propertyStorageCapacity())); + stubCall.call(regT0); + + restoreReturnAddressBeforeReturn(regT3); + } + + sub32(Imm32(1), AbsoluteAddress(oldStructure->addressOfCount())); + add32(Imm32(1), AbsoluteAddress(newStructure->addressOfCount())); + storePtr(ImmPtr(newStructure), Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure))); + + load32(Address(stackPointerRegister, offsetof(struct JITStackFrame, args[2]) + sizeof(void*)), regT3); + load32(Address(stackPointerRegister, offsetof(struct JITStackFrame, args[2]) + sizeof(void*) + 4), regT2); + + // Write the value + compilePutDirectOffset(regT0, regT2, regT3, newStructure, cachedOffset); + + ret(); + + ASSERT(!failureCases.empty()); + failureCases.link(this); + restoreArgumentReferenceForTrampoline(); + Call failureCall = tailRecursiveCall(); + + LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); + + patchBuffer.link(failureCall, FunctionPtr(cti_op_put_by_id_fail)); + + if (willNeedStorageRealloc) { + ASSERT(m_calls.size() == 1); + patchBuffer.link(m_calls[0].from, FunctionPtr(cti_op_put_by_id_transition_realloc)); + } + + CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); + stubInfo->stubRoutine = entryLabel; + RepatchBuffer repatchBuffer(m_codeBlock); + repatchBuffer.relinkCallerToTrampoline(returnAddress, entryLabel); +} + +void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) +{ + RepatchBuffer repatchBuffer(codeBlock); + + // We don't want to patch more than once - in future go to cti_op_get_by_id_generic. + // Should probably go to JITStubs::cti_op_get_by_id_fail, but that doesn't do anything interesting right now. + repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_self_fail)); + + int offset = sizeof(JSValue) * cachedOffset; + + // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load + // and makes the subsequent load's offset automatically correct + if (structure->isUsingInlineStorage()) + repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetGetByIdExternalLoad)); + + // Patch the offset into the propoerty map to load from, then patch the Structure to look for. + repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetGetByIdStructure), structure); + repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset1), offset); // payload + repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset2), offset + 4); // tag +} + +void JIT::patchMethodCallProto(CodeBlock* codeBlock, MethodCallLinkInfo& methodCallLinkInfo, JSFunction* callee, Structure* structure, JSObject* proto, ReturnAddressPtr returnAddress) +{ + RepatchBuffer repatchBuffer(codeBlock); + + ASSERT(!methodCallLinkInfo.cachedStructure); + methodCallLinkInfo.cachedStructure = structure; + structure->ref(); + + Structure* prototypeStructure = proto->structure(); + methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure; + prototypeStructure->ref(); + + repatchBuffer.repatch(methodCallLinkInfo.structureLabel, structure); + repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoObj), proto); + repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), prototypeStructure); + repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckPutFunction), callee); + + repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id)); +} + +void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) +{ + RepatchBuffer repatchBuffer(codeBlock); + + // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. + // Should probably go to cti_op_put_by_id_fail, but that doesn't do anything interesting right now. + repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_put_by_id_generic)); + + int offset = sizeof(JSValue) * cachedOffset; + + // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load + // and makes the subsequent load's offset automatically correct + if (structure->isUsingInlineStorage()) + repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetPutByIdExternalLoad)); + + // Patch the offset into the propoerty map to load from, then patch the Structure to look for. + repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetPutByIdStructure), structure); + repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset1), offset); // payload + repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset2), offset + 4); // tag +} + +void JIT::privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress) +{ + StructureStubInfo* stubInfo = &m_codeBlock->getStubInfo(returnAddress); + + // regT0 holds a JSCell* + + // Check for array + Jump failureCases1 = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr)); + + // Checks out okay! - get the length from the storage + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT2); + load32(Address(regT2, OBJECT_OFFSETOF(ArrayStorage, m_length)), regT2); + + Jump failureCases2 = branch32(Above, regT2, Imm32(INT_MAX)); + move(regT2, regT0); + move(Imm32(JSValue::Int32Tag), regT1); + Jump success = jump(); + + LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); + + // Use the patch information to link the failure cases back to the original slow case routine. + CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall); + patchBuffer.link(failureCases1, slowCaseBegin); + patchBuffer.link(failureCases2, slowCaseBegin); + + // On success return back to the hot patch code, at a point it will perform the store to dest for us. + patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); + + // Track the stub we have created so that it will be deleted later. + CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); + stubInfo->stubRoutine = entryLabel; + + // Finally patch the jump to slow case back in the hot path to jump here instead. + CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); + RepatchBuffer repatchBuffer(m_codeBlock); + repatchBuffer.relink(jumpLocation, entryLabel); + + // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. + repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_array_fail)); +} + +void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame) +{ + // regT0 holds a JSCell* + + // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is + // referencing the prototype object - let's speculatively load it's table nice and early!) + JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame)); + + Jump failureCases1 = checkStructure(regT0, structure); + + // Check the prototype object's Structure had not changed. + Structure** prototypeStructureAddress = &(protoObject->m_structure); +#if CPU(X86_64) + move(ImmPtr(prototypeStructure), regT3); + Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3); +#else + Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure)); +#endif + + // Checks out okay! - getDirectOffset + compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + + Jump success = jump(); + + LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); + + // Use the patch information to link the failure cases back to the original slow case routine. + CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall); + patchBuffer.link(failureCases1, slowCaseBegin); + patchBuffer.link(failureCases2, slowCaseBegin); + + // On success return back to the hot patch code, at a point it will perform the store to dest for us. + patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); + + // Track the stub we have created so that it will be deleted later. + CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); + stubInfo->stubRoutine = entryLabel; + + // Finally patch the jump to slow case back in the hot path to jump here instead. + CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); + RepatchBuffer repatchBuffer(m_codeBlock); + repatchBuffer.relink(jumpLocation, entryLabel); + + // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. + repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list)); +} + + +void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, size_t cachedOffset) +{ + // regT0 holds a JSCell* + + Jump failureCase = checkStructure(regT0, structure); + compileGetDirectOffset(regT0, regT1, regT0, structure, cachedOffset); + Jump success = jump(); + + LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); + + // Use the patch information to link the failure cases back to the original slow case routine. + CodeLocationLabel lastProtoBegin = polymorphicStructures->list[currentIndex - 1].stubRoutine; + if (!lastProtoBegin) + lastProtoBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall); + + patchBuffer.link(failureCase, lastProtoBegin); + + // On success return back to the hot patch code, at a point it will perform the store to dest for us. + patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); + + CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); + + structure->ref(); + polymorphicStructures->list[currentIndex].set(entryLabel, structure); + + // Finally patch the jump to slow case back in the hot path to jump here instead. + CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); + RepatchBuffer repatchBuffer(m_codeBlock); + repatchBuffer.relink(jumpLocation, entryLabel); +} + +void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, CallFrame* callFrame) +{ + // regT0 holds a JSCell* + + // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is + // referencing the prototype object - let's speculatively load it's table nice and early!) + JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame)); + + // Check eax is an object of the right Structure. + Jump failureCases1 = checkStructure(regT0, structure); + + // Check the prototype object's Structure had not changed. + Structure** prototypeStructureAddress = &(protoObject->m_structure); +#if CPU(X86_64) + move(ImmPtr(prototypeStructure), regT3); + Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3); +#else + Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure)); +#endif + + compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + + Jump success = jump(); + + LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); + + // Use the patch information to link the failure cases back to the original slow case routine. + CodeLocationLabel lastProtoBegin = prototypeStructures->list[currentIndex - 1].stubRoutine; + patchBuffer.link(failureCases1, lastProtoBegin); + patchBuffer.link(failureCases2, lastProtoBegin); + + // On success return back to the hot patch code, at a point it will perform the store to dest for us. + patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); + + CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); + + structure->ref(); + prototypeStructure->ref(); + prototypeStructures->list[currentIndex].set(entryLabel, structure, prototypeStructure); + + // Finally patch the jump to slow case back in the hot path to jump here instead. + CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); + RepatchBuffer repatchBuffer(m_codeBlock); + repatchBuffer.relink(jumpLocation, entryLabel); +} + +void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, CallFrame* callFrame) +{ + // regT0 holds a JSCell* + + ASSERT(count); + + JumpList bucketsOfFail; + + // Check eax is an object of the right Structure. + bucketsOfFail.append(checkStructure(regT0, structure)); + + Structure* currStructure = structure; + RefPtr<Structure>* chainEntries = chain->head(); + JSObject* protoObject = 0; + for (unsigned i = 0; i < count; ++i) { + protoObject = asObject(currStructure->prototypeForLookup(callFrame)); + currStructure = chainEntries[i].get(); + + // Check the prototype object's Structure had not changed. + Structure** prototypeStructureAddress = &(protoObject->m_structure); +#if CPU(X86_64) + move(ImmPtr(currStructure), regT3); + bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3)); +#else + bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure))); +#endif + } + ASSERT(protoObject); + + compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + Jump success = jump(); + + LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); + + // Use the patch information to link the failure cases back to the original slow case routine. + CodeLocationLabel lastProtoBegin = prototypeStructures->list[currentIndex - 1].stubRoutine; + + patchBuffer.link(bucketsOfFail, lastProtoBegin); + + // On success return back to the hot patch code, at a point it will perform the store to dest for us. + patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); + + CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); + + // Track the stub we have created so that it will be deleted later. + structure->ref(); + chain->ref(); + prototypeStructures->list[currentIndex].set(entryLabel, structure, chain); + + // Finally patch the jump to slow case back in the hot path to jump here instead. + CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); + RepatchBuffer repatchBuffer(m_codeBlock); + repatchBuffer.relink(jumpLocation, entryLabel); +} + +void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame) +{ + // regT0 holds a JSCell* + + ASSERT(count); + + JumpList bucketsOfFail; + + // Check eax is an object of the right Structure. + bucketsOfFail.append(checkStructure(regT0, structure)); + + Structure* currStructure = structure; + RefPtr<Structure>* chainEntries = chain->head(); + JSObject* protoObject = 0; + for (unsigned i = 0; i < count; ++i) { + protoObject = asObject(currStructure->prototypeForLookup(callFrame)); + currStructure = chainEntries[i].get(); + + // Check the prototype object's Structure had not changed. + Structure** prototypeStructureAddress = &(protoObject->m_structure); +#if CPU(X86_64) + move(ImmPtr(currStructure), regT3); + bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3)); +#else + bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure))); +#endif + } + ASSERT(protoObject); + + compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + Jump success = jump(); + + LinkBuffer patchBuffer(this, m_codeBlock->executablePool()); + + // Use the patch information to link the failure cases back to the original slow case routine. + patchBuffer.link(bucketsOfFail, stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall)); + + // On success return back to the hot patch code, at a point it will perform the store to dest for us. + patchBuffer.link(success, stubInfo->hotPathBegin.labelAtOffset(patchOffsetGetByIdPutResult)); + + // Track the stub we have created so that it will be deleted later. + CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); + stubInfo->stubRoutine = entryLabel; + + // Finally patch the jump to slow case back in the hot path to jump here instead. + CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); + RepatchBuffer repatchBuffer(m_codeBlock); + repatchBuffer.relink(jumpLocation, entryLabel); + + // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. + repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list)); +} + +/* ------------------------------ END: !ENABLE / ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */ + +#endif // !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) + +void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID structure, RegisterID offset) +{ + ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t)); + ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t)); + ASSERT(sizeof(JSValue) == 8); + + Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity)); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage)+OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage)+OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); + Jump finishedLoad = jump(); + notUsingInlineStorage.link(this); + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); + finishedLoad.link(this); +} + +void JIT::emit_op_get_by_pname(Instruction* currentInstruction) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + unsigned expected = currentInstruction[4].u.operand; + unsigned iter = currentInstruction[5].u.operand; + unsigned i = currentInstruction[6].u.operand; + + emitLoad2(property, regT1, regT0, base, regT3, regT2); + emitJumpSlowCaseIfNotJSCell(property, regT1); + addSlowCase(branchPtr(NotEqual, regT0, payloadFor(expected))); + // Property registers are now available as the property is known + emitJumpSlowCaseIfNotJSCell(base, regT3); + emitLoadPayload(iter, regT1); + + // Test base's structure + loadPtr(Address(regT2, OBJECT_OFFSETOF(JSCell, m_structure)), regT0); + addSlowCase(branchPtr(NotEqual, regT0, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))); + load32(addressFor(i), regT3); + sub32(Imm32(1), regT3); + addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots)))); + compileGetDirectOffset(regT2, regT1, regT0, regT0, regT3); + + emitStore(dst, regT1, regT0); + map(m_bytecodeIndex + OPCODE_LENGTH(op_get_by_pname), dst, regT1, regT0); +} + +void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + + linkSlowCaseIfNotJSCell(iter, property); + linkSlowCase(iter); + linkSlowCaseIfNotJSCell(iter, base); + linkSlowCase(iter); + linkSlowCase(iter); + + JITStubCall stubCall(this, cti_op_get_by_val); + stubCall.addArgument(base); + stubCall.addArgument(property); + stubCall.call(dst); +} + +} // namespace JSC + +#endif // ENABLE(JIT) + +#endif // ENABLE(JSVALUE32_64) + diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp index 85471de..bf430a6 100644 --- a/JavaScriptCore/jit/JITStubs.cpp +++ b/JavaScriptCore/jit/JITStubs.cpp @@ -600,7 +600,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "ldr r5, [sp, #0x28]" "\n" "ldr r4, [sp, #0x24]" "\n" "ldr lr, [sp, #0x20]" "\n" - "add sp, sp, #0x3c" "\n" + "add sp, sp, #0x40" "\n" "bx lr" "\n" ); @@ -856,10 +856,11 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co } // Uncacheable: give up. - if (!slot.isCacheable()) { + if (!slot.isCacheableValue()) { ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic)); return; } + ASSERT(!slot.isGetter()); JSCell* baseCell = asCell(baseValue); Structure* structure = baseCell->structure(); @@ -1070,9 +1071,9 @@ RVCT(__asm #rtype# cti_#op#(STUB_ARGS_DECLARATION)) RVCT({) RVCT( ARM) RVCT( IMPORT JITStubThunked_#op#) -RVCT( str lr, [sp, #32]) +RVCT( str lr, [sp, ##offset#]) RVCT( bl JITStubThunked_#op#) -RVCT( ldr lr, [sp, #32]) +RVCT( ldr lr, [sp, ##offset#]) RVCT( bx lr) RVCT(}) RVCT() @@ -1289,7 +1290,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check) // If we successfully got something, then the base from which it is being accessed must // be an object. (Assertion to ensure asObject() call below is safe, which comes after // an isCacheable() chceck. - ASSERT(!slot.isCacheable() || slot.slotBase().isObject()); + ASSERT(!slot.isCacheableValue() || slot.slotBase().isObject()); // Check that: // * We're dealing with a JSCell, @@ -1300,7 +1301,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check) JSCell* specific; JSObject* slotBaseObject; if (baseValue.isCell() - && slot.isCacheable() + && slot.isCacheableValue() && !(structure = asCell(baseValue)->structure())->isUncacheableDictionary() && (slotBaseObject = asObject(slot.slotBase()))->getPropertySpecificValue(callFrame, ident, specific) && specific @@ -1374,7 +1375,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail) CHECK_FOR_EXCEPTION(); if (baseValue.isCell() - && slot.isCacheable() + && slot.isCacheableValue() && !asCell(baseValue)->structure()->isUncacheableDictionary() && slot.slotBase() == baseValue) { @@ -1447,7 +1448,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list) CHECK_FOR_EXCEPTION(); - if (!baseValue.isCell() || !slot.isCacheable() || asCell(baseValue)->structure()->isDictionary()) { + if (!baseValue.isCell() || !slot.isCacheableValue() || asCell(baseValue)->structure()->isDictionary()) { ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); return JSValue::encode(result); } @@ -2303,7 +2304,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_global) PropertySlot slot(globalObject); if (globalObject->getPropertySlot(callFrame, ident, slot)) { JSValue result = slot.getValue(callFrame, ident); - if (slot.isCacheable() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { + if (slot.isCacheableValue() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { GlobalResolveInfo& globalResolveInfo = callFrame->codeBlock()->globalResolveInfo(globalResolveInfoIndex); if (globalResolveInfo.structure) globalResolveInfo.structure->deref(); @@ -3023,7 +3024,7 @@ DEFINE_STUB_FUNCTION(void*, op_switch_char) if (scrutinee.isString()) { UString::Rep* value = asString(scrutinee)->value(callFrame).rep(); - if (value->size() == 1) + if (value->length() == 1) result = codeBlock->characterSwitchJumpTable(tableIndex).ctiForValue(value->data()[0]).executableAddress(); } diff --git a/JavaScriptCore/qt/api/qscriptvalue_p.h b/JavaScriptCore/qt/api/qscriptvalue_p.h index dea2298..8db43a7 100644 --- a/JavaScriptCore/qt/api/qscriptvalue_p.h +++ b/JavaScriptCore/qt/api/qscriptvalue_p.h @@ -525,26 +525,37 @@ bool QScriptValuePrivate::toBool() const qsreal QScriptValuePrivate::toInteger() const { - // TODO it is not true implementation! - return toNumber(); + qsreal result = toNumber(); + if (qIsNaN(result)) + return 0; + if (qIsInf(result)) + return result; + return (result > 0) ? qFloor(result) : -1 * qFloor(-result); } qint32 QScriptValuePrivate::toInt32() const { - // TODO it is not true implementation! - return toNumber(); + qsreal result = toInteger(); + // Orginaly it should look like that (result == 0 || qIsInf(result) || qIsNaN(result)), but + // some of these operation are invoked in toInteger subcall. + if (qIsInf(result)) + return 0; + return result; } quint32 QScriptValuePrivate::toUInt32() const { - // TODO it is not true implementation! - return toNumber(); + qsreal result = toInteger(); + // Orginaly it should look like that (result == 0 || qIsInf(result) || qIsNaN(result)), but + // some of these operation are invoked in toInteger subcall. + if (qIsInf(result)) + return 0; + return result; } quint16 QScriptValuePrivate::toUInt16() const { - // TODO it is not true implementation! - return toNumber(); + return toInt32(); } diff --git a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h index 828ef96..1b3c657 100644 --- a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h +++ b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h @@ -85,6 +85,18 @@ private slots: void toBoolean_data(); void toBoolean(); + void toInteger_data(); + void toInteger(); + + void toInt32_data(); + void toInt32(); + + void toUInt32_data(); + void toUInt32(); + + void toUInt16_data(); + void toUInt16(); + private: typedef void (tst_QScriptValue::*InitDataFunction)(); typedef void (tst_QScriptValue::*DefineDataFunction)(const char*); @@ -146,6 +158,22 @@ private: void toBoolean_makeData(const char*); void toBoolean_test(const char*, const QScriptValue&); + void toInteger_initData(); + void toInteger_makeData(const char*); + void toInteger_test(const char*, const QScriptValue&); + + void toInt32_initData(); + void toInt32_makeData(const char*); + void toInt32_test(const char*, const QScriptValue&); + + void toUInt32_initData(); + void toUInt32_makeData(const char*); + void toUInt32_test(const char*, const QScriptValue&); + + void toUInt16_initData(); + void toUInt16_makeData(const char*); + void toUInt16_test(const char*, const QScriptValue&); + private: QScriptEngine* engine; QHash<QString, QScriptValue> m_values; diff --git a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp index f9891a6..006b343 100644 --- a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp +++ b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp @@ -940,3 +940,511 @@ void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value) } DEFINE_TEST_FUNCTION(toBoolean) + + +void tst_QScriptValue::toInteger_initData() +{ + QTest::addColumn<qsreal>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toInteger_makeData(const char* expr) +{ + static QHash<QString, qsreal> toInteger; + if (toInteger.isEmpty()) { + toInteger.insert("QScriptValue()", 0); + toInteger.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(true)", 1); + toInteger.insert("QScriptValue(false)", 0); + toInteger.insert("QScriptValue(int(122))", 122); + toInteger.insert("QScriptValue(uint(124))", 124); + toInteger.insert("QScriptValue(0)", 0); + toInteger.insert("QScriptValue(0.0)", 0); + toInteger.insert("QScriptValue(123.0)", 123); + toInteger.insert("QScriptValue(6.37e-8)", 0); + toInteger.insert("QScriptValue(-6.37e-8)", 0); + toInteger.insert("QScriptValue(0x43211234)", 1126240820); + toInteger.insert("QScriptValue(0x10000)", 65536); + toInteger.insert("QScriptValue(0x10001)", 65537); + toInteger.insert("QScriptValue(qSNaN())", 0); + toInteger.insert("QScriptValue(qQNaN())", 0); + toInteger.insert("QScriptValue(qInf())", qInf()); + toInteger.insert("QScriptValue(-qInf())", qInf()); + toInteger.insert("QScriptValue(\"NaN\")", 0); + toInteger.insert("QScriptValue(\"Infinity\")", qInf()); + toInteger.insert("QScriptValue(\"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(\"ciao\")", 0); + toInteger.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(QString(\"\"))", 0); + toInteger.insert("QScriptValue(QString())", 0); + toInteger.insert("QScriptValue(QString(\"0\"))", 0); + toInteger.insert("QScriptValue(QString(\"123\"))", 123); + toInteger.insert("QScriptValue(QString(\"12.4\"))", 12); + toInteger.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(0, true)", 1); + toInteger.insert("QScriptValue(0, false)", 0); + toInteger.insert("QScriptValue(0, int(122))", 122); + toInteger.insert("QScriptValue(0, uint(124))", 124); + toInteger.insert("QScriptValue(0, 0)", 0); + toInteger.insert("QScriptValue(0, 0.0)", 0); + toInteger.insert("QScriptValue(0, 123.0)", 123); + toInteger.insert("QScriptValue(0, 6.37e-8)", 0); + toInteger.insert("QScriptValue(0, -6.37e-8)", 0); + toInteger.insert("QScriptValue(0, 0x43211234)", 1126240820); + toInteger.insert("QScriptValue(0, 0x10000)", 65536); + toInteger.insert("QScriptValue(0, 0x10001)", 65537); + toInteger.insert("QScriptValue(0, qSNaN())", 0); + toInteger.insert("QScriptValue(0, qQNaN())", 0); + toInteger.insert("QScriptValue(0, qInf())", qInf()); + toInteger.insert("QScriptValue(0, -qInf())", qInf()); + toInteger.insert("QScriptValue(0, \"NaN\")", 0); + toInteger.insert("QScriptValue(0, \"Infinity\")", qInf()); + toInteger.insert("QScriptValue(0, \"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(0, \"ciao\")", 0); + toInteger.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(0, QString(\"\"))", 0); + toInteger.insert("QScriptValue(0, QString())", 0); + toInteger.insert("QScriptValue(0, QString(\"0\"))", 0); + toInteger.insert("QScriptValue(0, QString(\"123\"))", 123); + toInteger.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toInteger.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(engine, true)", 1); + toInteger.insert("QScriptValue(engine, false)", 0); + toInteger.insert("QScriptValue(engine, int(122))", 122); + toInteger.insert("QScriptValue(engine, uint(124))", 124); + toInteger.insert("QScriptValue(engine, 0)", 0); + toInteger.insert("QScriptValue(engine, 0.0)", 0); + toInteger.insert("QScriptValue(engine, 123.0)", 123); + toInteger.insert("QScriptValue(engine, 6.37e-8)", 0); + toInteger.insert("QScriptValue(engine, -6.37e-8)", 0); + toInteger.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toInteger.insert("QScriptValue(engine, 0x10000)", 65536); + toInteger.insert("QScriptValue(engine, 0x10001)", 65537); + toInteger.insert("QScriptValue(engine, qSNaN())", 0); + toInteger.insert("QScriptValue(engine, qQNaN())", 0); + toInteger.insert("QScriptValue(engine, qInf())", qInf()); + toInteger.insert("QScriptValue(engine, -qInf())", qInf()); + toInteger.insert("QScriptValue(engine, \"NaN\")", 0); + toInteger.insert("QScriptValue(engine, \"Infinity\")", qInf()); + toInteger.insert("QScriptValue(engine, \"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(engine, \"ciao\")", 0); + toInteger.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(engine, QString(\"\"))", 0); + toInteger.insert("QScriptValue(engine, QString())", 0); + toInteger.insert("QScriptValue(engine, QString(\"0\"))", 0); + toInteger.insert("QScriptValue(engine, QString(\"123\"))", 123); + toInteger.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toInteger.insert("engine->evaluate(\"[]\")", 0); + toInteger.insert("engine->evaluate(\"{}\")", 0); + toInteger.insert("engine->evaluate(\"Object.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Date.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Array.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Function.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Error.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Object\")", 0); + toInteger.insert("engine->evaluate(\"Array\")", 0); + toInteger.insert("engine->evaluate(\"Number\")", 0); + toInteger.insert("engine->evaluate(\"Function\")", 0); + toInteger.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toInteger.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toInteger.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toInteger.insert("engine->evaluate(\"/foo/\")", 0); + toInteger.insert("engine->evaluate(\"new Object()\")", 0); + toInteger.insert("engine->evaluate(\"new Array()\")", 0); + toInteger.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toInteger.value(expr); +} + +void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsInf(expected)) { + QVERIFY(qIsInf(value.toInteger())); + return; + } + QCOMPARE(value.toInteger(), expected); +} + +DEFINE_TEST_FUNCTION(toInteger) + + +void tst_QScriptValue::toInt32_initData() +{ + QTest::addColumn<qint32>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toInt32_makeData(const char* expr) +{ + static QHash<QString, qint32> toInt32; + if (toInt32.isEmpty()) { + toInt32.insert("QScriptValue()", 0); + toInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(true)", 1); + toInt32.insert("QScriptValue(false)", 0); + toInt32.insert("QScriptValue(int(122))", 122); + toInt32.insert("QScriptValue(uint(124))", 124); + toInt32.insert("QScriptValue(0)", 0); + toInt32.insert("QScriptValue(0.0)", 0); + toInt32.insert("QScriptValue(123.0)", 123); + toInt32.insert("QScriptValue(6.37e-8)", 0); + toInt32.insert("QScriptValue(-6.37e-8)", 0); + toInt32.insert("QScriptValue(0x43211234)", 1126240820); + toInt32.insert("QScriptValue(0x10000)", 65536); + toInt32.insert("QScriptValue(0x10001)", 65537); + toInt32.insert("QScriptValue(qSNaN())", 0); + toInt32.insert("QScriptValue(qQNaN())", 0); + toInt32.insert("QScriptValue(qInf())", 0); + toInt32.insert("QScriptValue(-qInf())", 0); + toInt32.insert("QScriptValue(\"NaN\")", 0); + toInt32.insert("QScriptValue(\"Infinity\")", 0); + toInt32.insert("QScriptValue(\"-Infinity\")", 0); + toInt32.insert("QScriptValue(\"ciao\")", 0); + toInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(QString(\"\"))", 0); + toInt32.insert("QScriptValue(QString())", 0); + toInt32.insert("QScriptValue(QString(\"0\"))", 0); + toInt32.insert("QScriptValue(QString(\"123\"))", 123); + toInt32.insert("QScriptValue(QString(\"12.4\"))", 12); + toInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(0, true)", 1); + toInt32.insert("QScriptValue(0, false)", 0); + toInt32.insert("QScriptValue(0, int(122))", 122); + toInt32.insert("QScriptValue(0, uint(124))", 124); + toInt32.insert("QScriptValue(0, 0)", 0); + toInt32.insert("QScriptValue(0, 0.0)", 0); + toInt32.insert("QScriptValue(0, 123.0)", 123); + toInt32.insert("QScriptValue(0, 6.37e-8)", 0); + toInt32.insert("QScriptValue(0, -6.37e-8)", 0); + toInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); + toInt32.insert("QScriptValue(0, 0x10000)", 65536); + toInt32.insert("QScriptValue(0, 0x10001)", 65537); + toInt32.insert("QScriptValue(0, qSNaN())", 0); + toInt32.insert("QScriptValue(0, qQNaN())", 0); + toInt32.insert("QScriptValue(0, qInf())", 0); + toInt32.insert("QScriptValue(0, -qInf())", 0); + toInt32.insert("QScriptValue(0, \"NaN\")", 0); + toInt32.insert("QScriptValue(0, \"Infinity\")", 0); + toInt32.insert("QScriptValue(0, \"-Infinity\")", 0); + toInt32.insert("QScriptValue(0, \"ciao\")", 0); + toInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(0, QString(\"\"))", 0); + toInt32.insert("QScriptValue(0, QString())", 0); + toInt32.insert("QScriptValue(0, QString(\"0\"))", 0); + toInt32.insert("QScriptValue(0, QString(\"123\"))", 123); + toInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(engine, true)", 1); + toInt32.insert("QScriptValue(engine, false)", 0); + toInt32.insert("QScriptValue(engine, int(122))", 122); + toInt32.insert("QScriptValue(engine, uint(124))", 124); + toInt32.insert("QScriptValue(engine, 0)", 0); + toInt32.insert("QScriptValue(engine, 0.0)", 0); + toInt32.insert("QScriptValue(engine, 123.0)", 123); + toInt32.insert("QScriptValue(engine, 6.37e-8)", 0); + toInt32.insert("QScriptValue(engine, -6.37e-8)", 0); + toInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toInt32.insert("QScriptValue(engine, 0x10000)", 65536); + toInt32.insert("QScriptValue(engine, 0x10001)", 65537); + toInt32.insert("QScriptValue(engine, qSNaN())", 0); + toInt32.insert("QScriptValue(engine, qQNaN())", 0); + toInt32.insert("QScriptValue(engine, qInf())", 0); + toInt32.insert("QScriptValue(engine, -qInf())", 0); + toInt32.insert("QScriptValue(engine, \"NaN\")", 0); + toInt32.insert("QScriptValue(engine, \"Infinity\")", 0); + toInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); + toInt32.insert("QScriptValue(engine, \"ciao\")", 0); + toInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(engine, QString(\"\"))", 0); + toInt32.insert("QScriptValue(engine, QString())", 0); + toInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); + toInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); + toInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toInt32.insert("engine->evaluate(\"[]\")", 0); + toInt32.insert("engine->evaluate(\"{}\")", 0); + toInt32.insert("engine->evaluate(\"Object.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Date.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Array.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Function.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Error.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Object\")", 0); + toInt32.insert("engine->evaluate(\"Array\")", 0); + toInt32.insert("engine->evaluate(\"Number\")", 0); + toInt32.insert("engine->evaluate(\"Function\")", 0); + toInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toInt32.insert("engine->evaluate(\"/foo/\")", 0); + toInt32.insert("engine->evaluate(\"new Object()\")", 0); + toInt32.insert("engine->evaluate(\"new Array()\")", 0); + toInt32.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toInt32.value(expr); +} + +void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(qint32, expected); + QCOMPARE(value.toInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toInt32) + + +void tst_QScriptValue::toUInt32_initData() +{ + QTest::addColumn<quint32>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toUInt32_makeData(const char* expr) +{ + static QHash<QString, quint32> toUInt32; + if (toUInt32.isEmpty()) { + toUInt32.insert("QScriptValue()", 0); + toUInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(true)", 1); + toUInt32.insert("QScriptValue(false)", 0); + toUInt32.insert("QScriptValue(int(122))", 122); + toUInt32.insert("QScriptValue(uint(124))", 124); + toUInt32.insert("QScriptValue(0)", 0); + toUInt32.insert("QScriptValue(0.0)", 0); + toUInt32.insert("QScriptValue(123.0)", 123); + toUInt32.insert("QScriptValue(6.37e-8)", 0); + toUInt32.insert("QScriptValue(-6.37e-8)", 0); + toUInt32.insert("QScriptValue(0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(0x10000)", 65536); + toUInt32.insert("QScriptValue(0x10001)", 65537); + toUInt32.insert("QScriptValue(qSNaN())", 0); + toUInt32.insert("QScriptValue(qQNaN())", 0); + toUInt32.insert("QScriptValue(qInf())", 0); + toUInt32.insert("QScriptValue(-qInf())", 0); + toUInt32.insert("QScriptValue(\"NaN\")", 0); + toUInt32.insert("QScriptValue(\"Infinity\")", 0); + toUInt32.insert("QScriptValue(\"-Infinity\")", 0); + toUInt32.insert("QScriptValue(\"ciao\")", 0); + toUInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(QString(\"\"))", 0); + toUInt32.insert("QScriptValue(QString())", 0); + toUInt32.insert("QScriptValue(QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(QString(\"12.4\"))", 12); + toUInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(0, true)", 1); + toUInt32.insert("QScriptValue(0, false)", 0); + toUInt32.insert("QScriptValue(0, int(122))", 122); + toUInt32.insert("QScriptValue(0, uint(124))", 124); + toUInt32.insert("QScriptValue(0, 0)", 0); + toUInt32.insert("QScriptValue(0, 0.0)", 0); + toUInt32.insert("QScriptValue(0, 123.0)", 123); + toUInt32.insert("QScriptValue(0, 6.37e-8)", 0); + toUInt32.insert("QScriptValue(0, -6.37e-8)", 0); + toUInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(0, 0x10000)", 65536); + toUInt32.insert("QScriptValue(0, 0x10001)", 65537); + toUInt32.insert("QScriptValue(0, qSNaN())", 0); + toUInt32.insert("QScriptValue(0, qQNaN())", 0); + toUInt32.insert("QScriptValue(0, qInf())", 0); + toUInt32.insert("QScriptValue(0, -qInf())", 0); + toUInt32.insert("QScriptValue(0, \"NaN\")", 0); + toUInt32.insert("QScriptValue(0, \"Infinity\")", 0); + toUInt32.insert("QScriptValue(0, \"-Infinity\")", 0); + toUInt32.insert("QScriptValue(0, \"ciao\")", 0); + toUInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(0, QString(\"\"))", 0); + toUInt32.insert("QScriptValue(0, QString())", 0); + toUInt32.insert("QScriptValue(0, QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(0, QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toUInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(engine, true)", 1); + toUInt32.insert("QScriptValue(engine, false)", 0); + toUInt32.insert("QScriptValue(engine, int(122))", 122); + toUInt32.insert("QScriptValue(engine, uint(124))", 124); + toUInt32.insert("QScriptValue(engine, 0)", 0); + toUInt32.insert("QScriptValue(engine, 0.0)", 0); + toUInt32.insert("QScriptValue(engine, 123.0)", 123); + toUInt32.insert("QScriptValue(engine, 6.37e-8)", 0); + toUInt32.insert("QScriptValue(engine, -6.37e-8)", 0); + toUInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(engine, 0x10000)", 65536); + toUInt32.insert("QScriptValue(engine, 0x10001)", 65537); + toUInt32.insert("QScriptValue(engine, qSNaN())", 0); + toUInt32.insert("QScriptValue(engine, qQNaN())", 0); + toUInt32.insert("QScriptValue(engine, qInf())", 0); + toUInt32.insert("QScriptValue(engine, -qInf())", 0); + toUInt32.insert("QScriptValue(engine, \"NaN\")", 0); + toUInt32.insert("QScriptValue(engine, \"Infinity\")", 0); + toUInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); + toUInt32.insert("QScriptValue(engine, \"ciao\")", 0); + toUInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(engine, QString(\"\"))", 0); + toUInt32.insert("QScriptValue(engine, QString())", 0); + toUInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toUInt32.insert("engine->evaluate(\"[]\")", 0); + toUInt32.insert("engine->evaluate(\"{}\")", 0); + toUInt32.insert("engine->evaluate(\"Object.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Date.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Array.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Function.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Error.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Object\")", 0); + toUInt32.insert("engine->evaluate(\"Array\")", 0); + toUInt32.insert("engine->evaluate(\"Number\")", 0); + toUInt32.insert("engine->evaluate(\"Function\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toUInt32.insert("engine->evaluate(\"/foo/\")", 0); + toUInt32.insert("engine->evaluate(\"new Object()\")", 0); + toUInt32.insert("engine->evaluate(\"new Array()\")", 0); + toUInt32.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toUInt32.value(expr); +} + +void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(quint32, expected); + QCOMPARE(value.toUInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt32) + + +void tst_QScriptValue::toUInt16_initData() +{ + QTest::addColumn<quint16>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toUInt16_makeData(const char* expr) +{ + static QHash<QString, quint16> toUInt16; + if (toUInt16.isEmpty()) { + toUInt16.insert("QScriptValue()", 0); + toUInt16.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(true)", 1); + toUInt16.insert("QScriptValue(false)", 0); + toUInt16.insert("QScriptValue(int(122))", 122); + toUInt16.insert("QScriptValue(uint(124))", 124); + toUInt16.insert("QScriptValue(0)", 0); + toUInt16.insert("QScriptValue(0.0)", 0); + toUInt16.insert("QScriptValue(123.0)", 123); + toUInt16.insert("QScriptValue(6.37e-8)", 0); + toUInt16.insert("QScriptValue(-6.37e-8)", 0); + toUInt16.insert("QScriptValue(0x43211234)", 4660); + toUInt16.insert("QScriptValue(0x10000)", 0); + toUInt16.insert("QScriptValue(0x10001)", 1); + toUInt16.insert("QScriptValue(qSNaN())", 0); + toUInt16.insert("QScriptValue(qQNaN())", 0); + toUInt16.insert("QScriptValue(qInf())", 0); + toUInt16.insert("QScriptValue(-qInf())", 0); + toUInt16.insert("QScriptValue(\"NaN\")", 0); + toUInt16.insert("QScriptValue(\"Infinity\")", 0); + toUInt16.insert("QScriptValue(\"-Infinity\")", 0); + toUInt16.insert("QScriptValue(\"ciao\")", 0); + toUInt16.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(QString(\"\"))", 0); + toUInt16.insert("QScriptValue(QString())", 0); + toUInt16.insert("QScriptValue(QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(QString(\"12.4\"))", 12); + toUInt16.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(0, true)", 1); + toUInt16.insert("QScriptValue(0, false)", 0); + toUInt16.insert("QScriptValue(0, int(122))", 122); + toUInt16.insert("QScriptValue(0, uint(124))", 124); + toUInt16.insert("QScriptValue(0, 0)", 0); + toUInt16.insert("QScriptValue(0, 0.0)", 0); + toUInt16.insert("QScriptValue(0, 123.0)", 123); + toUInt16.insert("QScriptValue(0, 6.37e-8)", 0); + toUInt16.insert("QScriptValue(0, -6.37e-8)", 0); + toUInt16.insert("QScriptValue(0, 0x43211234)", 4660); + toUInt16.insert("QScriptValue(0, 0x10000)", 0); + toUInt16.insert("QScriptValue(0, 0x10001)", 1); + toUInt16.insert("QScriptValue(0, qSNaN())", 0); + toUInt16.insert("QScriptValue(0, qQNaN())", 0); + toUInt16.insert("QScriptValue(0, qInf())", 0); + toUInt16.insert("QScriptValue(0, -qInf())", 0); + toUInt16.insert("QScriptValue(0, \"NaN\")", 0); + toUInt16.insert("QScriptValue(0, \"Infinity\")", 0); + toUInt16.insert("QScriptValue(0, \"-Infinity\")", 0); + toUInt16.insert("QScriptValue(0, \"ciao\")", 0); + toUInt16.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(0, QString(\"\"))", 0); + toUInt16.insert("QScriptValue(0, QString())", 0); + toUInt16.insert("QScriptValue(0, QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(0, QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toUInt16.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(engine, true)", 1); + toUInt16.insert("QScriptValue(engine, false)", 0); + toUInt16.insert("QScriptValue(engine, int(122))", 122); + toUInt16.insert("QScriptValue(engine, uint(124))", 124); + toUInt16.insert("QScriptValue(engine, 0)", 0); + toUInt16.insert("QScriptValue(engine, 0.0)", 0); + toUInt16.insert("QScriptValue(engine, 123.0)", 123); + toUInt16.insert("QScriptValue(engine, 6.37e-8)", 0); + toUInt16.insert("QScriptValue(engine, -6.37e-8)", 0); + toUInt16.insert("QScriptValue(engine, 0x43211234)", 4660); + toUInt16.insert("QScriptValue(engine, 0x10000)", 0); + toUInt16.insert("QScriptValue(engine, 0x10001)", 1); + toUInt16.insert("QScriptValue(engine, qSNaN())", 0); + toUInt16.insert("QScriptValue(engine, qQNaN())", 0); + toUInt16.insert("QScriptValue(engine, qInf())", 0); + toUInt16.insert("QScriptValue(engine, -qInf())", 0); + toUInt16.insert("QScriptValue(engine, \"NaN\")", 0); + toUInt16.insert("QScriptValue(engine, \"Infinity\")", 0); + toUInt16.insert("QScriptValue(engine, \"-Infinity\")", 0); + toUInt16.insert("QScriptValue(engine, \"ciao\")", 0); + toUInt16.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(engine, QString(\"\"))", 0); + toUInt16.insert("QScriptValue(engine, QString())", 0); + toUInt16.insert("QScriptValue(engine, QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(engine, QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toUInt16.insert("engine->evaluate(\"[]\")", 0); + toUInt16.insert("engine->evaluate(\"{}\")", 0); + toUInt16.insert("engine->evaluate(\"Object.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Date.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Array.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Function.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Error.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Object\")", 0); + toUInt16.insert("engine->evaluate(\"Array\")", 0); + toUInt16.insert("engine->evaluate(\"Number\")", 0); + toUInt16.insert("engine->evaluate(\"Function\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toUInt16.insert("engine->evaluate(\"/foo/\")", 0); + toUInt16.insert("engine->evaluate(\"new Object()\")", 0); + toUInt16.insert("engine->evaluate(\"new Array()\")", 0); + toUInt16.insert("engine->evaluate(\"new Error()\")", 0); + } + newRow(expr) << toUInt16.value(expr); +} + +void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value) +{ + QFETCH(quint16, expected); + QCOMPARE(value.toUInt16(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt16) diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp index b64abad..6d79581 100644 --- a/JavaScriptCore/runtime/ArrayPrototype.cpp +++ b/JavaScriptCore/runtime/ArrayPrototype.cpp @@ -201,7 +201,7 @@ JSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue if (i) buffer.append(','); if (RefPtr<UString::Rep> rep = strBuffer[i]) - buffer.append(rep->data(), rep->size()); + buffer.append(rep->data(), rep->length()); } ASSERT(buffer.size() == totalSize); return jsString(exec, UString::adopt(buffer)); diff --git a/JavaScriptCore/runtime/Identifier.cpp b/JavaScriptCore/runtime/Identifier.cpp index 97929e2..46fcd0b 100644 --- a/JavaScriptCore/runtime/Identifier.cpp +++ b/JavaScriptCore/runtime/Identifier.cpp @@ -79,7 +79,7 @@ void deleteIdentifierTable(IdentifierTable* table) bool Identifier::equal(const UString::Rep* r, const char* s) { - int length = r->size(); + int length = r->length(); const UChar* d = r->data(); for (int i = 0; i != length; ++i) if (d[i] != (unsigned char)s[i]) @@ -87,12 +87,12 @@ bool Identifier::equal(const UString::Rep* r, const char* s) return s[length] == 0; } -bool Identifier::equal(const UString::Rep* r, const UChar* s, int length) +bool Identifier::equal(const UString::Rep* r, const UChar* s, unsigned length) { - if (r->size() != length) + if (r->length() != length) return false; const UChar* d = r->data(); - for (int i = 0; i != length; ++i) + for (unsigned i = 0; i != length; ++i) if (d[i] != s[i]) return false; return true; @@ -209,7 +209,7 @@ PassRefPtr<UString::Rep> Identifier::add(ExecState* exec, const UChar* s, int le PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UString::Rep* r) { ASSERT(!r->isIdentifier()); - if (r->size() == 1) { + if (r->length() == 1) { UChar c = r->data()[0]; if (c <= 0xFF) r = globalData->smallStrings.singleCharacterStringRep(c); @@ -220,7 +220,7 @@ PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UStri return r; } } - if (!r->size()) { + if (!r->length()) { UString::Rep::empty().hash(); return &UString::Rep::empty(); } diff --git a/JavaScriptCore/runtime/Identifier.h b/JavaScriptCore/runtime/Identifier.h index 1d1bd18..73e2af8 100644 --- a/JavaScriptCore/runtime/Identifier.h +++ b/JavaScriptCore/runtime/Identifier.h @@ -76,7 +76,7 @@ namespace JSC { static void remove(UString::Rep*); static bool equal(const UString::Rep*, const char*); - static bool equal(const UString::Rep*, const UChar*, int length); + static bool equal(const UString::Rep*, const UChar*, unsigned length); static bool equal(const UString::Rep* a, const UString::Rep* b) { return JSC::equal(a, b); } static PassRefPtr<UString::Rep> add(ExecState*, const char*); // Only to be used with string literals. diff --git a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp index 3ddac7c..0e1fbee 100644 --- a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp +++ b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp @@ -381,7 +381,7 @@ JSValue JSC_HOST_CALL globalFuncEscape(ExecState* exec, JSObject*, JSValue, cons JSStringBuilder builder; UString str = args.at(0).toString(exec); const UChar* c = str.data(); - for (int k = 0; k < str.size(); k++, c++) { + for (unsigned k = 0; k < str.size(); k++, c++) { int u = c[0]; if (u > 255) { char tmp[7]; diff --git a/JavaScriptCore/runtime/JSONObject.cpp b/JavaScriptCore/runtime/JSONObject.cpp index acd9280..d69a8da 100644 --- a/JavaScriptCore/runtime/JSONObject.cpp +++ b/JavaScriptCore/runtime/JSONObject.cpp @@ -135,7 +135,7 @@ static inline JSValue unwrapBoxedPrimitive(ExecState* exec, JSValue value) static inline UString gap(ExecState* exec, JSValue space) { - const int maxGapLength = 10; + const unsigned maxGapLength = 10; space = unwrapBoxedPrimitive(exec, space); // If the space value is a number, create a gap string with that number of spaces. @@ -456,7 +456,7 @@ inline bool Stringifier::willIndent() const inline void Stringifier::indent() { // Use a single shared string, m_repeatedGap, so we don't keep allocating new ones as we indent and unindent. - int newSize = m_indent.size() + m_gap.size(); + unsigned newSize = m_indent.size() + m_gap.size(); if (newSize > m_repeatedGap.size()) m_repeatedGap = makeString(m_repeatedGap, m_gap); ASSERT(newSize <= m_repeatedGap.size()); diff --git a/JavaScriptCore/runtime/JSObject.cpp b/JavaScriptCore/runtime/JSObject.cpp index d9500aa..61d3bb1 100644 --- a/JavaScriptCore/runtime/JSObject.cpp +++ b/JavaScriptCore/runtime/JSObject.cpp @@ -516,9 +516,12 @@ void JSObject::putDirectFunctionWithoutTransition(ExecState* exec, InternalFunct NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue* location) { - if (JSObject* getterFunction = asGetterSetter(*location)->getter()) - slot.setGetterSlot(getterFunction); - else + if (JSObject* getterFunction = asGetterSetter(*location)->getter()) { + if (!structure()->isDictionary()) + slot.setCacheableGetterSlot(this, getterFunction, offsetForLocation(location)); + else + slot.setGetterSlot(getterFunction); + } else slot.setUndefined(); } diff --git a/JavaScriptCore/runtime/JSString.cpp b/JavaScriptCore/runtime/JSString.cpp index 1e23a15..a72457e 100644 --- a/JavaScriptCore/runtime/JSString.cpp +++ b/JavaScriptCore/runtime/JSString.cpp @@ -31,48 +31,13 @@ namespace JSC { -void JSString::Rope::destructNonRecursive() -{ - Vector<Rope*, 32> workQueue; - Rope* rope = this; - - while (true) { - unsigned length = rope->ropeLength(); - for (unsigned i = 0; i < length; ++i) { - Fiber& fiber = rope->fibers(i); - if (fiber.isString()) - fiber.string()->deref(); - else { - Rope* nextRope = fiber.rope(); - if (nextRope->hasOneRef()) - workQueue.append(nextRope); - else - nextRope->deref(); - } - } - if (rope != this) - fastFree(rope); - - if (workQueue.isEmpty()) - return; - - rope = workQueue.last(); - workQueue.removeLast(); - } -} - -JSString::Rope::~Rope() -{ - destructNonRecursive(); -} - // Overview: this methods converts a JSString from holding a string in rope form // down to a simple UString representation. It does so by building up the string // backwards, since we want to avoid recursion, we expect that the tree structure // representing the rope is likely imbalanced with more nodes down the left side // (since appending to the string is likely more common) - and as such resolving // in this fashion should minimize work queue size. (If we built the queue forwards -// we would likely have to place all of the constituent UString::Reps into the +// we would likely have to place all of the constituent UStringImpls into the // Vector before performing any concatenation, but by working backwards we likely // only fill the queue with the number of substrings at any given level in a // rope-of-ropes.) @@ -82,39 +47,39 @@ void JSString::resolveRope(ExecState* exec) const // Allocate the buffer to hold the final string, position initially points to the end. UChar* buffer; - if (PassRefPtr<UStringImpl> newImpl = UStringImpl::tryCreateUninitialized(m_stringLength, buffer)) + if (PassRefPtr<UStringImpl> newImpl = UStringImpl::tryCreateUninitialized(m_length, buffer)) m_value = newImpl; else { - for (unsigned i = 0; i < m_ropeLength; ++i) { - m_fibers[i].deref(); - m_fibers[i] = static_cast<void*>(0); + for (unsigned i = 0; i < m_fiberCount; ++i) { + m_other.m_fibers[i]->deref(); + m_other.m_fibers[i] = 0; } - m_ropeLength = 0; + m_fiberCount = 0; ASSERT(!isRope()); ASSERT(m_value == UString()); throwOutOfMemoryError(exec); return; } - UChar* position = buffer + m_stringLength; + UChar* position = buffer + m_length; // Start with the current Rope. Vector<Rope::Fiber, 32> workQueue; Rope::Fiber currentFiber; - for (unsigned i = 0; i < (m_ropeLength - 1); ++i) - workQueue.append(m_fibers[i]); - currentFiber = m_fibers[m_ropeLength - 1]; + for (unsigned i = 0; i < (m_fiberCount - 1); ++i) + workQueue.append(m_other.m_fibers[i]); + currentFiber = m_other.m_fibers[m_fiberCount - 1]; while (true) { - if (currentFiber.isRope()) { - Rope* rope = currentFiber.rope(); + if (currentFiber->isRope()) { + Rope* rope = static_cast<URopeImpl*>(currentFiber); // Copy the contents of the current rope into the workQueue, with the last item in 'currentFiber' // (we will be working backwards over the rope). - unsigned ropeLengthMinusOne = rope->ropeLength() - 1; - for (unsigned i = 0; i < ropeLengthMinusOne; ++i) + unsigned fiberCountMinusOne = rope->fiberCount() - 1; + for (unsigned i = 0; i < fiberCountMinusOne; ++i) workQueue.append(rope->fibers(i)); - currentFiber = rope->fibers(ropeLengthMinusOne); + currentFiber = rope->fibers(fiberCountMinusOne); } else { - UString::Rep* string = currentFiber.string(); - unsigned length = string->size(); + UStringImpl* string = static_cast<UStringImpl*>(currentFiber); + unsigned length = string->length(); position -= length; UStringImpl::copyChars(position, string->data(), length); @@ -122,11 +87,11 @@ void JSString::resolveRope(ExecState* exec) const if (workQueue.isEmpty()) { // Create a string from the UChar buffer, clear the rope RefPtr. ASSERT(buffer == position); - for (unsigned i = 0; i < m_ropeLength; ++i) { - m_fibers[i].deref(); - m_fibers[i] = static_cast<void*>(0); + for (unsigned i = 0; i < m_fiberCount; ++i) { + m_other.m_fibers[i]->deref(); + m_other.m_fibers[i] = 0; } - m_ropeLength = 0; + m_fiberCount = 0; ASSERT(!isRope()); return; @@ -153,7 +118,7 @@ bool JSString::getPrimitiveNumber(ExecState* exec, double& number, JSValue& resu bool JSString::toBoolean(ExecState*) const { - return m_stringLength; + return m_length; } double JSString::toNumber(ExecState* exec) const @@ -215,13 +180,13 @@ bool JSString::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNam bool JSString::getStringPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { if (propertyName == exec->propertyNames().length) { - descriptor.setDescriptor(jsNumber(exec, m_stringLength), DontEnum | DontDelete | ReadOnly); + descriptor.setDescriptor(jsNumber(exec, m_length), DontEnum | DontDelete | ReadOnly); return true; } bool isStrictUInt32; unsigned i = propertyName.toStrictUInt32(&isStrictUInt32); - if (isStrictUInt32 && i < m_stringLength) { + if (isStrictUInt32 && i < m_length) { descriptor.setDescriptor(jsSingleCharacterSubstring(exec, value(exec), i), DontDelete | ReadOnly); return true; } diff --git a/JavaScriptCore/runtime/JSString.h b/JavaScriptCore/runtime/JSString.h index cff8e3a..0162282 100644 --- a/JavaScriptCore/runtime/JSString.h +++ b/JavaScriptCore/runtime/JSString.h @@ -67,109 +67,55 @@ namespace JSC { friend class JIT; friend class JSGlobalData; - // A Rope is a string composed of a set of substrings. - class Rope : public RefCounted<Rope> { - public: - // A Rope is composed from a set of smaller strings called Fibers. - // Each Fiber in a rope is either UString::Rep or another Rope. - class Fiber { - public: - Fiber() : m_value(0) {} - Fiber(UString::Rep* string) : m_value(reinterpret_cast<intptr_t>(string)) {} - Fiber(Rope* rope) : m_value(reinterpret_cast<intptr_t>(rope) | 1) {} - - Fiber(void* nonFiber) : m_value(reinterpret_cast<intptr_t>(nonFiber)) {} - - void deref() - { - if (isRope()) - rope()->deref(); - else - string()->deref(); - } - - Fiber& ref() - { - if (isString()) - string()->ref(); - else - rope()->ref(); - return *this; - } - - unsigned refAndGetLength() - { - if (isString()) { - UString::Rep* rep = string(); - return rep->ref()->size(); - } else { - Rope* r = rope(); - r->ref(); - return r->stringLength(); - } - } - - bool isRope() { return m_value & 1; } - Rope* rope() { return reinterpret_cast<Rope*>(m_value & ~1); } - bool isString() { return !isRope(); } - UString::Rep* string() { return reinterpret_cast<UString::Rep*>(m_value); } - - void* nonFiber() { return reinterpret_cast<void*>(m_value); } - private: - intptr_t m_value; - }; + typedef URopeImpl Rope; - // Creates a Rope comprising of 'ropeLength' Fibers. - // The Rope is constructed in an uninitialized state - initialize must be called for each Fiber in the Rope. - static PassRefPtr<Rope> createOrNull(unsigned ropeLength) + class RopeBuilder { + public: + RopeBuilder(unsigned fiberCount) + : m_index(0) + , m_rope(Rope::tryCreateUninitialized(fiberCount)) { - void* allocation; - if (tryFastMalloc(sizeof(Rope) + (ropeLength - 1) * sizeof(Fiber)).getValue(allocation)) - return adoptRef(new (allocation) Rope(ropeLength)); - return 0; } - ~Rope(); - void destructNonRecursive(); + bool isOutOfMemory() { return !m_rope; } - void append(unsigned &index, Fiber& fiber) + void append(Rope::Fiber& fiber) { - m_fibers[index++] = fiber; - m_stringLength += fiber.refAndGetLength(); + ASSERT(m_rope); + m_rope->initializeFiber(m_index, fiber); } - void append(unsigned &index, const UString& string) + void append(const UString& string) { - UString::Rep* rep = string.rep(); - m_fibers[index++] = Fiber(rep); - m_stringLength += rep->ref()->size(); + ASSERT(m_rope); + m_rope->initializeFiber(m_index, string.rep()); } - void append(unsigned& index, JSString* jsString) + void append(JSString* jsString) { if (jsString->isRope()) { - for (unsigned i = 0; i < jsString->m_ropeLength; ++i) - append(index, jsString->m_fibers[i]); + for (unsigned i = 0; i < jsString->m_fiberCount; ++i) + append(jsString->m_other.m_fibers[i]); } else - append(index, jsString->string()); + append(jsString->string()); + } + + PassRefPtr<Rope> release() + { + ASSERT(m_index == m_rope->fiberCount()); + return m_rope.release(); } - unsigned ropeLength() { return m_ropeLength; } - unsigned stringLength() { return m_stringLength; } - Fiber& fibers(unsigned index) { return m_fibers[index]; } + unsigned length() { return m_rope->length(); } private: - Rope(unsigned ropeLength) : m_ropeLength(ropeLength), m_stringLength(0) {} - void* operator new(size_t, void* inPlace) { return inPlace; } - - unsigned m_ropeLength; - unsigned m_stringLength; - Fiber m_fibers[1]; + unsigned m_index; + RefPtr<Rope> m_rope; }; ALWAYS_INLINE JSString(JSGlobalData* globalData, const UString& value) : JSCell(globalData->stringStructure.get()) - , m_stringLength(value.size()) + , m_length(value.size()) , m_value(value) - , m_ropeLength(0) + , m_fiberCount(0) { Heap::heap(this)->reportExtraMemoryCost(value.cost()); } @@ -177,72 +123,72 @@ namespace JSC { enum HasOtherOwnerType { HasOtherOwner }; JSString(JSGlobalData* globalData, const UString& value, HasOtherOwnerType) : JSCell(globalData->stringStructure.get()) - , m_stringLength(value.size()) + , m_length(value.size()) , m_value(value) - , m_ropeLength(0) + , m_fiberCount(0) { } JSString(JSGlobalData* globalData, PassRefPtr<UString::Rep> value, HasOtherOwnerType) : JSCell(globalData->stringStructure.get()) - , m_stringLength(value->size()) + , m_length(value->length()) , m_value(value) - , m_ropeLength(0) + , m_fiberCount(0) { } - JSString(JSGlobalData* globalData, PassRefPtr<JSString::Rope> rope) + JSString(JSGlobalData* globalData, PassRefPtr<Rope> rope) : JSCell(globalData->stringStructure.get()) - , m_stringLength(rope->stringLength()) - , m_ropeLength(1) + , m_length(rope->length()) + , m_fiberCount(1) { - m_fibers[0] = rope.releaseRef(); + m_other.m_fibers[0] = rope.releaseRef(); } // This constructor constructs a new string by concatenating s1 & s2. - // This should only be called with ropeLength <= 3. - JSString(JSGlobalData* globalData, unsigned ropeLength, JSString* s1, JSString* s2) + // This should only be called with fiberCount <= 3. + JSString(JSGlobalData* globalData, unsigned fiberCount, JSString* s1, JSString* s2) : JSCell(globalData->stringStructure.get()) - , m_stringLength(s1->length() + s2->length()) - , m_ropeLength(ropeLength) + , m_length(s1->length() + s2->length()) + , m_fiberCount(fiberCount) { - ASSERT(ropeLength <= s_maxInternalRopeLength); + ASSERT(fiberCount <= s_maxInternalRopeLength); unsigned index = 0; appendStringInConstruct(index, s1); appendStringInConstruct(index, s2); - ASSERT(ropeLength == index); + ASSERT(fiberCount == index); } // This constructor constructs a new string by concatenating s1 & s2. - // This should only be called with ropeLength <= 3. - JSString(JSGlobalData* globalData, unsigned ropeLength, JSString* s1, const UString& u2) + // This should only be called with fiberCount <= 3. + JSString(JSGlobalData* globalData, unsigned fiberCount, JSString* s1, const UString& u2) : JSCell(globalData->stringStructure.get()) - , m_stringLength(s1->length() + u2.size()) - , m_ropeLength(ropeLength) + , m_length(s1->length() + u2.size()) + , m_fiberCount(fiberCount) { - ASSERT(ropeLength <= s_maxInternalRopeLength); + ASSERT(fiberCount <= s_maxInternalRopeLength); unsigned index = 0; appendStringInConstruct(index, s1); appendStringInConstruct(index, u2); - ASSERT(ropeLength == index); + ASSERT(fiberCount == index); } // This constructor constructs a new string by concatenating s1 & s2. - // This should only be called with ropeLength <= 3. - JSString(JSGlobalData* globalData, unsigned ropeLength, const UString& u1, JSString* s2) + // This should only be called with fiberCount <= 3. + JSString(JSGlobalData* globalData, unsigned fiberCount, const UString& u1, JSString* s2) : JSCell(globalData->stringStructure.get()) - , m_stringLength(u1.size() + s2->length()) - , m_ropeLength(ropeLength) + , m_length(u1.size() + s2->length()) + , m_fiberCount(fiberCount) { - ASSERT(ropeLength <= s_maxInternalRopeLength); + ASSERT(fiberCount <= s_maxInternalRopeLength); unsigned index = 0; appendStringInConstruct(index, u1); appendStringInConstruct(index, s2); - ASSERT(ropeLength == index); + ASSERT(fiberCount == index); } // This constructor constructs a new string by concatenating v1, v2 & v3. - // This should only be called with ropeLength <= 3 ... which since every - // value must require a ropeLength of at least one implies that the length + // This should only be called with fiberCount <= 3 ... which since every + // value must require a fiberCount of at least one implies that the length // for each value must be exactly 1! JSString(ExecState* exec, JSValue v1, JSValue v2, JSValue v3) : JSCell(exec->globalData().stringStructure.get()) - , m_stringLength(0) - , m_ropeLength(s_maxInternalRopeLength) + , m_length(0) + , m_fiberCount(s_maxInternalRopeLength) { unsigned index = 0; appendValueInConstructAndIncrementLength(exec, index, v1); @@ -253,26 +199,24 @@ namespace JSC { JSString(JSGlobalData* globalData, const UString& value, JSStringFinalizerCallback finalizer, void* context) : JSCell(globalData->stringStructure.get()) - , m_stringLength(value.size()) + , m_length(value.size()) , m_value(value) - , m_ropeLength(0) + , m_fiberCount(0) { // nasty hack because we can't union non-POD types - m_fibers[0] = reinterpret_cast<void*>(reinterpret_cast<ptrdiff_t>(finalizer)); - m_fibers[1] = context; + m_other.m_finalizerCallback = finalizer; + m_other.m_finalizerContext = context; Heap::heap(this)->reportExtraMemoryCost(value.cost()); } ~JSString() { ASSERT(vptr() == JSGlobalData::jsStringVPtr); - for (unsigned i = 0; i < m_ropeLength; ++i) - m_fibers[i].deref(); + for (unsigned i = 0; i < m_fiberCount; ++i) + m_other.m_fibers[i]->deref(); - if (!m_ropeLength && m_fibers[0].nonFiber()) { - JSStringFinalizerCallback finalizer = reinterpret_cast<JSStringFinalizerCallback>(m_fibers[0].nonFiber()); - finalizer(this, m_fibers[1].nonFiber()); - } + if (!m_fiberCount && m_other.m_finalizerCallback) + m_other.m_finalizerCallback(this, m_other.m_finalizerContext); } const UString& value(ExecState* exec) const @@ -288,13 +232,13 @@ namespace JSC { ASSERT(isRope() == m_value.isNull()); return m_value; } - unsigned length() { return m_stringLength; } + unsigned length() { return m_length; } bool getStringPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); bool getStringPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); bool getStringPropertyDescriptor(ExecState*, const Identifier& propertyName, PropertyDescriptor&); - bool canGetIndex(unsigned i) { return i < m_stringLength; } + bool canGetIndex(unsigned i) { return i < m_length; } JSString* getIndex(ExecState*, unsigned); static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(StringType, OverridesGetOwnPropertySlot | NeedsThisConversion), AnonymousSlotCount); } @@ -303,7 +247,7 @@ namespace JSC { enum VPtrStealingHackType { VPtrStealingHack }; JSString(VPtrStealingHackType) : JSCell(0) - , m_ropeLength(0) + , m_fiberCount(0) { } @@ -311,14 +255,19 @@ namespace JSC { void appendStringInConstruct(unsigned& index, const UString& string) { - m_fibers[index++] = Rope::Fiber(string.rep()->ref()); + UStringImpl* impl = string.rep(); + impl->ref(); + m_other.m_fibers[index++] = impl; } void appendStringInConstruct(unsigned& index, JSString* jsString) { if (jsString->isRope()) { - for (unsigned i = 0; i < jsString->m_ropeLength; ++i) - m_fibers[index++] = jsString->m_fibers[i].ref(); + for (unsigned i = 0; i < jsString->m_fiberCount; ++i) { + Rope::Fiber fiber = jsString->m_other.m_fibers[i]; + fiber->ref(); + m_other.m_fibers[index++] = fiber; + } } else appendStringInConstruct(index, jsString->string()); } @@ -328,13 +277,15 @@ namespace JSC { if (v.isString()) { ASSERT(asCell(v)->isString()); JSString* s = static_cast<JSString*>(asCell(v)); - ASSERT(s->ropeLength() == 1); + ASSERT(s->fiberCount() == 1); appendStringInConstruct(index, s); - m_stringLength += s->length(); + m_length += s->length(); } else { UString u(v.toString(exec)); - m_fibers[index++] = Rope::Fiber(u.rep()->ref()); - m_stringLength += u.size(); + UStringImpl* impl = u.rep(); + impl->ref(); + m_other.m_fibers[index++] = impl; + m_length += u.size(); } } @@ -357,14 +308,24 @@ namespace JSC { static const unsigned s_maxInternalRopeLength = 3; // A string is represented either by a UString or a Rope. - unsigned m_stringLength; + unsigned m_length; mutable UString m_value; - mutable unsigned m_ropeLength; - mutable Rope::Fiber m_fibers[s_maxInternalRopeLength]; + mutable unsigned m_fiberCount; + // This structure exists to support a temporary workaround for a GC issue. + struct JSStringFinalizerStruct { + JSStringFinalizerStruct() : m_finalizerCallback(0) {} + union { + mutable Rope::Fiber m_fibers[s_maxInternalRopeLength]; + struct { + JSStringFinalizerCallback m_finalizerCallback; + void* m_finalizerContext; + }; + }; + } m_other; - bool isRope() const { return m_ropeLength; } + bool isRope() const { return m_fiberCount; } UString& string() { ASSERT(!isRope()); return m_value; } - unsigned ropeLength() { return m_ropeLength ? m_ropeLength : 1; } + unsigned fiberCount() { return m_fiberCount ? m_fiberCount : 1; } friend JSValue jsString(ExecState* exec, JSString* s1, JSString* s2); friend JSValue jsString(ExecState* exec, const UString& u1, JSString* s2); @@ -493,13 +454,13 @@ namespace JSC { ALWAYS_INLINE bool JSString::getStringPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { if (propertyName == exec->propertyNames().length) { - slot.setValue(jsNumber(exec, m_stringLength)); + slot.setValue(jsNumber(exec, m_length)); return true; } bool isStrictUInt32; unsigned i = propertyName.toStrictUInt32(&isStrictUInt32); - if (isStrictUInt32 && i < m_stringLength) { + if (isStrictUInt32 && i < m_length) { slot.setValue(jsSingleCharacterSubstring(exec, value(exec), i)); return true; } @@ -509,7 +470,7 @@ namespace JSC { ALWAYS_INLINE bool JSString::getStringPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { - if (propertyName < m_stringLength) { + if (propertyName < m_length) { slot.setValue(jsSingleCharacterSubstring(exec, value(exec), propertyName)); return true; } diff --git a/JavaScriptCore/runtime/NumberPrototype.cpp b/JavaScriptCore/runtime/NumberPrototype.cpp index fa32b86..5680eb1 100644 --- a/JavaScriptCore/runtime/NumberPrototype.cpp +++ b/JavaScriptCore/runtime/NumberPrototype.cpp @@ -265,11 +265,11 @@ JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue z.append(m); m = z.build(); k = f + 1; - ASSERT(k == m.size()); + ASSERT(k == static_cast<int>(m.size())); } int kMinusf = k - f; - if (kMinusf < m.size()) + if (kMinusf < static_cast<int>(m.size())) return jsString(exec, makeString(s, m.substr(0, kMinusf), ".", m.substr(kMinusf))); return jsString(exec, makeString(s, m.substr(0, kMinusf))); } @@ -444,7 +444,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSV if (e == precision - 1) return jsString(exec, makeString(s, m)); if (e >= 0) { - if (e + 1 < m.size()) + if (e + 1 < static_cast<int>(m.size())) return jsString(exec, makeString(s, m.substr(0, e + 1), ".", m.substr(e + 1))); return jsString(exec, makeString(s, m)); } diff --git a/JavaScriptCore/runtime/Operations.h b/JavaScriptCore/runtime/Operations.h index 9b27074..cc0d603 100644 --- a/JavaScriptCore/runtime/Operations.h +++ b/JavaScriptCore/runtime/Operations.h @@ -37,132 +37,167 @@ namespace JSC { ALWAYS_INLINE JSValue jsString(ExecState* exec, JSString* s1, JSString* s2) { - if (!s1->length()) + unsigned length1 = s1->length(); + if (!length1) return s2; - if (!s2->length()) + unsigned length2 = s2->length(); + if (!length2) return s1; + if ((length1 + length2) < length1) + return throwOutOfMemoryError(exec); - unsigned ropeLength = s1->ropeLength() + s2->ropeLength(); + unsigned fiberCount = s1->fiberCount() + s2->fiberCount(); JSGlobalData* globalData = &exec->globalData(); - if (ropeLength <= JSString::s_maxInternalRopeLength) - return new (globalData) JSString(globalData, ropeLength, s1, s2); + if (fiberCount <= JSString::s_maxInternalRopeLength) + return new (globalData) JSString(globalData, fiberCount, s1, s2); - unsigned index = 0; - RefPtr<JSString::Rope> rope = JSString::Rope::createOrNull(ropeLength); - if (UNLIKELY(!rope)) + JSString::RopeBuilder ropeBuilder(fiberCount); + if (UNLIKELY(ropeBuilder.isOutOfMemory())) return throwOutOfMemoryError(exec); - rope->append(index, s1); - rope->append(index, s2); - ASSERT(index == ropeLength); - return new (globalData) JSString(globalData, rope.release()); + ropeBuilder.append(s1); + ropeBuilder.append(s2); + return new (globalData) JSString(globalData, ropeBuilder.release()); } ALWAYS_INLINE JSValue jsString(ExecState* exec, const UString& u1, JSString* s2) { - unsigned ropeLength = 1 + s2->ropeLength(); + unsigned length1 = u1.size(); + if (!length1) + return s2; + unsigned length2 = s2->length(); + if (!length2) + return jsString(exec, u1); + if ((length1 + length2) < length1) + return throwOutOfMemoryError(exec); + + unsigned fiberCount = 1 + s2->fiberCount(); JSGlobalData* globalData = &exec->globalData(); - if (ropeLength <= JSString::s_maxInternalRopeLength) - return new (globalData) JSString(globalData, ropeLength, u1, s2); + if (fiberCount <= JSString::s_maxInternalRopeLength) + return new (globalData) JSString(globalData, fiberCount, u1, s2); - unsigned index = 0; - RefPtr<JSString::Rope> rope = JSString::Rope::createOrNull(ropeLength); - if (UNLIKELY(!rope)) + JSString::RopeBuilder ropeBuilder(fiberCount); + if (UNLIKELY(ropeBuilder.isOutOfMemory())) return throwOutOfMemoryError(exec); - rope->append(index, u1); - rope->append(index, s2); - ASSERT(index == ropeLength); - return new (globalData) JSString(globalData, rope.release()); + ropeBuilder.append(u1); + ropeBuilder.append(s2); + return new (globalData) JSString(globalData, ropeBuilder.release()); } ALWAYS_INLINE JSValue jsString(ExecState* exec, JSString* s1, const UString& u2) { - unsigned ropeLength = s1->ropeLength() + 1; + unsigned length1 = s1->length(); + if (!length1) + return jsString(exec, u2); + unsigned length2 = u2.size(); + if (!length2) + return s1; + if ((length1 + length2) < length1) + return throwOutOfMemoryError(exec); + + unsigned fiberCount = s1->fiberCount() + 1; JSGlobalData* globalData = &exec->globalData(); - if (ropeLength <= JSString::s_maxInternalRopeLength) - return new (globalData) JSString(globalData, ropeLength, s1, u2); + if (fiberCount <= JSString::s_maxInternalRopeLength) + return new (globalData) JSString(globalData, fiberCount, s1, u2); - unsigned index = 0; - RefPtr<JSString::Rope> rope = JSString::Rope::createOrNull(ropeLength); - if (UNLIKELY(!rope)) + JSString::RopeBuilder ropeBuilder(fiberCount); + if (UNLIKELY(ropeBuilder.isOutOfMemory())) return throwOutOfMemoryError(exec); - rope->append(index, s1); - rope->append(index, u2); - ASSERT(index == ropeLength); - return new (globalData) JSString(globalData, rope.release()); + ropeBuilder.append(s1); + ropeBuilder.append(u2); + return new (globalData) JSString(globalData, ropeBuilder.release()); } ALWAYS_INLINE JSValue jsString(ExecState* exec, Register* strings, unsigned count) { ASSERT(count >= 3); - unsigned ropeLength = 0; + unsigned fiberCount = 0; for (unsigned i = 0; i < count; ++i) { JSValue v = strings[i].jsValue(); if (LIKELY(v.isString())) - ropeLength += asString(v)->ropeLength(); + fiberCount += asString(v)->fiberCount(); else - ++ropeLength; + ++fiberCount; } JSGlobalData* globalData = &exec->globalData(); - if (ropeLength == 3) + if (fiberCount == 3) return new (globalData) JSString(exec, strings[0].jsValue(), strings[1].jsValue(), strings[2].jsValue()); - RefPtr<JSString::Rope> rope = JSString::Rope::createOrNull(ropeLength); - if (UNLIKELY(!rope)) + JSString::RopeBuilder ropeBuilder(fiberCount); + if (UNLIKELY(ropeBuilder.isOutOfMemory())) return throwOutOfMemoryError(exec); - unsigned index = 0; + unsigned length = 0; + bool overflow = false; + for (unsigned i = 0; i < count; ++i) { JSValue v = strings[i].jsValue(); if (LIKELY(v.isString())) - rope->append(index, asString(v)); + ropeBuilder.append(asString(v)); else - rope->append(index, v.toString(exec)); + ropeBuilder.append(v.toString(exec)); + + unsigned newLength = ropeBuilder.length(); + if (newLength < length) + overflow = true; + length = newLength; } - ASSERT(index == ropeLength); - return new (globalData) JSString(globalData, rope.release()); + if (overflow) + return throwOutOfMemoryError(exec); + + return new (globalData) JSString(globalData, ropeBuilder.release()); } ALWAYS_INLINE JSValue jsString(ExecState* exec, JSValue thisValue, const ArgList& args) { - unsigned ropeLength = 0; + unsigned fiberCount = 0; if (LIKELY(thisValue.isString())) - ropeLength += asString(thisValue)->ropeLength(); + fiberCount += asString(thisValue)->fiberCount(); else - ++ropeLength; + ++fiberCount; for (unsigned i = 0; i < args.size(); ++i) { JSValue v = args.at(i); if (LIKELY(v.isString())) - ropeLength += asString(v)->ropeLength(); + fiberCount += asString(v)->fiberCount(); else - ++ropeLength; + ++fiberCount; } - RefPtr<JSString::Rope> rope = JSString::Rope::createOrNull(ropeLength); - if (UNLIKELY(!rope)) + JSString::RopeBuilder ropeBuilder(fiberCount); + if (UNLIKELY(ropeBuilder.isOutOfMemory())) return throwOutOfMemoryError(exec); - unsigned index = 0; if (LIKELY(thisValue.isString())) - rope->append(index, asString(thisValue)); + ropeBuilder.append(asString(thisValue)); else - rope->append(index, thisValue.toString(exec)); + ropeBuilder.append(thisValue.toString(exec)); + + unsigned length = 0; + bool overflow = false; + for (unsigned i = 0; i < args.size(); ++i) { JSValue v = args.at(i); if (LIKELY(v.isString())) - rope->append(index, asString(v)); + ropeBuilder.append(asString(v)); else - rope->append(index, v.toString(exec)); + ropeBuilder.append(v.toString(exec)); + + unsigned newLength = ropeBuilder.length(); + if (newLength < length) + overflow = true; + length = newLength; } - ASSERT(index == ropeLength); + + if (overflow) + return throwOutOfMemoryError(exec); JSGlobalData* globalData = &exec->globalData(); - return new (globalData) JSString(globalData, rope.release()); + return new (globalData) JSString(globalData, ropeBuilder.release()); } // ECMA 11.9.3 diff --git a/JavaScriptCore/runtime/PropertySlot.cpp b/JavaScriptCore/runtime/PropertySlot.cpp index a0a2f48..8b6ceb9 100644 --- a/JavaScriptCore/runtime/PropertySlot.cpp +++ b/JavaScriptCore/runtime/PropertySlot.cpp @@ -35,10 +35,10 @@ JSValue PropertySlot::functionGetter(ExecState* exec, const Identifier&, const P CallData callData; CallType callType = slot.m_data.getterFunc->getCallData(callData); if (callType == CallTypeHost) - return callData.native.function(exec, slot.m_data.getterFunc, slot.slotBase(), exec->emptyList()); + return callData.native.function(exec, slot.m_data.getterFunc, slot.thisValue(), exec->emptyList()); ASSERT(callType == CallTypeJS); // FIXME: Can this be done more efficiently using the callData? - return asFunction(slot.m_data.getterFunc)->call(exec, slot.slotBase(), exec->emptyList()); + return asFunction(slot.m_data.getterFunc)->call(exec, slot.thisValue(), exec->emptyList()); } } // namespace JSC diff --git a/JavaScriptCore/runtime/PropertySlot.h b/JavaScriptCore/runtime/PropertySlot.h index 15d9034..a364e42 100644 --- a/JavaScriptCore/runtime/PropertySlot.h +++ b/JavaScriptCore/runtime/PropertySlot.h @@ -71,7 +71,9 @@ namespace JSC { return m_getValue(exec, Identifier::from(exec, propertyName), *this); } - bool isCacheable() const { return m_offset != WTF::notFound; } + bool isGetter() const { return m_isGetter; } + bool isCacheable() const { return m_isCacheable; } + bool isCacheableValue() const { return m_isCacheable && !m_isGetter; } size_t cachedOffset() const { ASSERT(isCacheable()); @@ -102,6 +104,8 @@ namespace JSC { m_slotBase = slotBase; m_data.valueSlot = valueSlot; m_offset = offset; + m_isCacheable = true; + m_isGetter = false; } void setValue(JSValue value) @@ -139,14 +143,28 @@ namespace JSC { m_slotBase = slotBase; m_data.index = index; } - + void setGetterSlot(JSObject* getterFunc) { ASSERT(getterFunc); + m_thisValue = m_slotBase; m_getValue = functionGetter; m_data.getterFunc = getterFunc; + m_isGetter = true; } - + + void setCacheableGetterSlot(JSValue slotBase, JSObject* getterFunc, unsigned offset) + { + ASSERT(getterFunc); + m_getValue = functionGetter; + m_thisValue = m_slotBase; + m_slotBase = slotBase; + m_data.getterFunc = getterFunc; + m_offset = offset; + m_isCacheable = true; + m_isGetter = true; + } + void setUndefined() { setValue(jsUndefined()); @@ -182,11 +200,14 @@ namespace JSC { { // Clear offset even in release builds, in case this PropertySlot has been used before. // (For other data members, we don't need to clear anything because reuse would meaningfully overwrite them.) - m_offset = WTF::notFound; + m_offset = 0; + m_isCacheable = false; + m_isGetter = false; } unsigned index() const { return m_data.index; } + JSValue thisValue() const { return m_thisValue; } private: static JSValue functionGetter(ExecState*, const Identifier&, const PropertySlot&); @@ -201,8 +222,11 @@ namespace JSC { } m_data; JSValue m_value; + JSValue m_thisValue; size_t m_offset; + bool m_isCacheable : 1; + bool m_isGetter : 1; }; } // namespace JSC diff --git a/JavaScriptCore/runtime/RegExp.cpp b/JavaScriptCore/runtime/RegExp.cpp index 4e958f4..85d41ee 100644 --- a/JavaScriptCore/runtime/RegExp.cpp +++ b/JavaScriptCore/runtime/RegExp.cpp @@ -71,11 +71,11 @@ inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern, const US { // NOTE: The global flag is handled on a case-by-case basis by functions like // String::match and RegExpObject::match. - if (flags.find('g') != -1) + if (flags.find('g') != UString::NotFound) m_flagBits |= Global; - if (flags.find('i') != -1) + if (flags.find('i') != UString::NotFound) m_flagBits |= IgnoreCase; - if (flags.find('m') != -1) + if (flags.find('m') != UString::NotFound) m_flagBits |= Multiline; compile(globalData); @@ -117,7 +117,7 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector) if (ovector) ovector->clear(); - if (startOffset > s.size() || s.isNull()) + if (static_cast<unsigned>(startOffset) > s.size() || s.isNull()) return -1; #if ENABLE(YARR_JIT) @@ -188,7 +188,7 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector) if (ovector) ovector->clear(); - if (startOffset > s.size() || s.isNull()) + if (static_cast<unsigned>(startOffset) > s.size() || s.isNull()) return -1; #if ENABLE(WREC) diff --git a/JavaScriptCore/runtime/SmallStrings.cpp b/JavaScriptCore/runtime/SmallStrings.cpp index d9d4377..78bd4e4 100644 --- a/JavaScriptCore/runtime/SmallStrings.cpp +++ b/JavaScriptCore/runtime/SmallStrings.cpp @@ -83,7 +83,7 @@ void SmallStrings::markChildren(MarkStack& markStack) bool isAnyStringMarked = isMarked(m_emptyString); for (unsigned i = 0; i < numCharactersToStore && !isAnyStringMarked; ++i) - isAnyStringMarked |= isMarked(m_singleCharacterStrings[i]); + isAnyStringMarked = isMarked(m_singleCharacterStrings[i]); if (!isAnyStringMarked) { clear(); diff --git a/JavaScriptCore/runtime/StringPrototype.cpp b/JavaScriptCore/runtime/StringPrototype.cpp index 8c014ec..bef4083 100644 --- a/JavaScriptCore/runtime/StringPrototype.cpp +++ b/JavaScriptCore/runtime/StringPrototype.cpp @@ -150,7 +150,7 @@ bool StringPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier // ------------------------------ Functions -------------------------- -static NEVER_INLINE UString substituteBackreferencesSlow(const UString& replacement, const UString& source, const int* ovector, RegExp* reg, int i) +static NEVER_INLINE UString substituteBackreferencesSlow(const UString& replacement, const UString& source, const int* ovector, RegExp* reg, unsigned i) { Vector<UChar> substitutedReplacement; int offset = 0; @@ -206,7 +206,7 @@ static NEVER_INLINE UString substituteBackreferencesSlow(const UString& replacem i += 1 + advance; offset = i + 1; substitutedReplacement.append(source.data() + backrefStart, backrefLength); - } while ((i = replacement.find('$', i + 1)) != -1); + } while ((i = replacement.find('$', i + 1)) != UString::NotFound); if (replacement.size() - offset) substitutedReplacement.append(replacement.data() + offset, replacement.size() - offset); @@ -217,8 +217,8 @@ static NEVER_INLINE UString substituteBackreferencesSlow(const UString& replacem static inline UString substituteBackreferences(const UString& replacement, const UString& source, const int* ovector, RegExp* reg) { - int i = replacement.find('$', 0); - if (UNLIKELY(i != -1)) + unsigned i = replacement.find('$', 0); + if (UNLIKELY(i != UString::NotFound)) return substituteBackreferencesSlow(replacement, source, ovector, reg, i); return replacement; } @@ -329,7 +329,7 @@ JSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue RegExpConstructor* regExpConstructor = exec->lexicalGlobalObject()->regExpConstructor(); int lastIndex = 0; - int startPosition = 0; + unsigned startPosition = 0; Vector<StringRange, 16> sourceRanges; Vector<UString, 16> replacements; @@ -432,7 +432,7 @@ JSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue if (!lastIndex && replacements.isEmpty()) return sourceVal; - if (lastIndex < source.size()) + if (static_cast<unsigned>(lastIndex) < source.size()) sourceRanges.append(StringRange(lastIndex, source.size() - lastIndex)); return jsSpliceSubstringsWithSeparators(exec, sourceVal, source, sourceRanges.data(), sourceRanges.size(), replacements.data(), replacements.size()); @@ -441,9 +441,9 @@ JSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue // Not a regular expression, so treat the pattern as a string. UString patternString = pattern.toString(exec); - int matchPos = source.find(patternString); + unsigned matchPos = source.find(patternString); - if (matchPos == -1) + if (matchPos == UString::NotFound) return sourceVal; int matchLen = patternString.size(); @@ -541,7 +541,10 @@ JSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue pos = static_cast<int>(dpos); } - return jsNumber(exec, s.find(u2, pos)); + unsigned result = s.find(u2, pos); + if (result == UString::NotFound) + return jsNumber(exec, -1); + return jsNumber(exec, result); } JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -563,7 +566,11 @@ JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSV else if (isnan(dpos)) dpos = len; #endif - return jsNumber(exec, s.rfind(u2, static_cast<int>(dpos))); + + unsigned result = s.rfind(u2, static_cast<unsigned>(dpos)); + if (result == UString::NotFound) + return jsNumber(exec, -1); + return jsNumber(exec, result); } JSValue JSC_HOST_CALL stringProtoFuncMatch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -675,7 +682,7 @@ JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue t JSArray* result = constructEmptyArray(exec); unsigned i = 0; - int p0 = 0; + unsigned p0 = 0; unsigned limit = a1.isUndefined() ? 0xFFFFFFFFU : a1.toUInt32(exec); if (a0.inherits(&RegExpObject::info)) { RegExp* reg = asRegExpObject(a0)->regExp(); @@ -683,7 +690,7 @@ JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue t // empty string matched by regexp -> empty array return result; } - int pos = 0; + unsigned pos = 0; while (i != limit && pos < s.size()) { Vector<int, 32> ovector; int mpos = reg->match(s, pos, &ovector); @@ -691,7 +698,7 @@ JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue t break; int mlen = ovector[1] - ovector[0]; pos = mpos + (mlen == 0 ? 1 : mlen); - if (mpos != p0 || mlen) { + if (static_cast<unsigned>(mpos) != p0 || mlen) { result->put(exec, i++, jsSubstring(exec, s, p0, mpos - p0)); p0 = mpos + mlen; } @@ -713,8 +720,9 @@ JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue t while (i != limit && p0 < s.size() - 1) result->put(exec, i++, jsSingleCharacterSubstring(exec, s, p0++)); } else { - int pos; - while (i != limit && (pos = s.find(u2, p0)) >= 0) { + unsigned pos; + + while (i != limit && (pos = s.find(u2, p0)) != UString::NotFound) { result->put(exec, i++, jsSubstring(exec, s, p0, pos - p0)); p0 = pos + u2.size(); } @@ -1022,12 +1030,12 @@ static inline bool isTrimWhitespace(UChar c) static inline JSValue trimString(ExecState* exec, JSValue thisValue, int trimKind) { UString str = thisValue.toThisString(exec); - int left = 0; + unsigned left = 0; if (trimKind & TrimLeft) { while (left < str.size() && isTrimWhitespace(str[left])) left++; } - int right = str.size(); + unsigned right = str.size(); if (trimKind & TrimRight) { while (right > left && isTrimWhitespace(str[right - 1])) right--; diff --git a/JavaScriptCore/runtime/Structure.cpp b/JavaScriptCore/runtime/Structure.cpp index 546e2bf..ebf8a4c 100644 --- a/JavaScriptCore/runtime/Structure.cpp +++ b/JavaScriptCore/runtime/Structure.cpp @@ -79,6 +79,106 @@ static HashSet<Structure*>& liveStructureSet = *(new HashSet<Structure*>); static int comparePropertyMapEntryIndices(const void* a, const void* b); +inline void Structure::setTransitionTable(TransitionTable* table) +{ + ASSERT(m_isUsingSingleSlot); +#ifndef NDEBUG + setSingleTransition(0); +#endif + m_isUsingSingleSlot = false; + m_transitions.m_table = table; + // This implicitly clears the flag that indicates we're using a single transition + ASSERT(!m_isUsingSingleSlot); +} + +// The contains and get methods accept imprecise matches, so if an unspecialised transition exists +// for the given key they will consider that transition to be a match. If a specialised transition +// exists and it matches the provided specificValue, get will return the specific transition. +inline bool Structure::transitionTableContains(const StructureTransitionTableHash::Key& key, JSCell* specificValue) +{ + if (m_isUsingSingleSlot) { + Structure* existingTransition = singleTransition(); + return existingTransition && existingTransition->m_nameInPrevious.get() == key.first + && existingTransition->m_attributesInPrevious == key.second + && (existingTransition->m_specificValueInPrevious == specificValue || existingTransition->m_specificValueInPrevious == 0); + } + TransitionTable::iterator find = transitionTable()->find(key); + if (find == transitionTable()->end()) + return false; + + return find->second.first || find->second.second->transitionedFor(specificValue); +} + +inline Structure* Structure::transitionTableGet(const StructureTransitionTableHash::Key& key, JSCell* specificValue) const +{ + if (m_isUsingSingleSlot) { + Structure* existingTransition = singleTransition(); + if (existingTransition && existingTransition->m_nameInPrevious.get() == key.first + && existingTransition->m_attributesInPrevious == key.second + && (existingTransition->m_specificValueInPrevious == specificValue || existingTransition->m_specificValueInPrevious == 0)) + return existingTransition; + return 0; + } + + Transition transition = transitionTable()->get(key); + if (transition.second && transition.second->transitionedFor(specificValue)) + return transition.second; + return transition.first; +} + +inline bool Structure::transitionTableHasTransition(const StructureTransitionTableHash::Key& key) const +{ + if (m_isUsingSingleSlot) { + Structure* transition = singleTransition(); + return transition && transition->m_nameInPrevious == key.first + && transition->m_attributesInPrevious == key.second; + } + return transitionTable()->contains(key); +} + +inline void Structure::transitionTableRemove(const StructureTransitionTableHash::Key& key, JSCell* specificValue) +{ + if (m_isUsingSingleSlot) { + ASSERT(transitionTableContains(key, specificValue)); + setSingleTransition(0); + return; + } + TransitionTable::iterator find = transitionTable()->find(key); + if (!specificValue) + find->second.first = 0; + else + find->second.second = 0; + if (!find->second.first && !find->second.second) + transitionTable()->remove(find); +} + +inline void Structure::transitionTableAdd(const StructureTransitionTableHash::Key& key, Structure* structure, JSCell* specificValue) +{ + if (m_isUsingSingleSlot) { + if (!singleTransition()) { + setSingleTransition(structure); + return; + } + Structure* existingTransition = singleTransition(); + TransitionTable* transitionTable = new TransitionTable; + setTransitionTable(transitionTable); + if (existingTransition) + transitionTableAdd(std::make_pair(existingTransition->m_nameInPrevious.get(), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); + } + if (!specificValue) { + TransitionTable::iterator find = transitionTable()->find(key); + if (find == transitionTable()->end()) + transitionTable()->add(key, Transition(structure, 0)); + else + find->second.first = structure; + } else { + // If we're adding a transition to a specific value, then there cannot be + // an existing transition + ASSERT(!transitionTable()->contains(key)); + transitionTable()->add(key, Transition(0, structure)); + } +} + void Structure::dumpStatistics() { #if DUMP_STRUCTURE_ID_STATISTICS @@ -136,7 +236,10 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo, unsigned anony , m_attributesInPrevious(0) , m_specificFunctionThrashCount(0) , m_anonymousSlotCount(anonymousSlotCount) + , m_isUsingSingleSlot(true) { + m_transitions.m_singleTransition = 0; + ASSERT(m_prototype); ASSERT(m_prototype.isObject() || m_prototype.isNull()); @@ -159,7 +262,7 @@ Structure::~Structure() { if (m_previous) { ASSERT(m_nameInPrevious); - m_previous->table.remove(make_pair(m_nameInPrevious.get(), m_attributesInPrevious), m_specificValueInPrevious); + m_previous->transitionTableRemove(make_pair(m_nameInPrevious.get(), m_attributesInPrevious), m_specificValueInPrevious); } @@ -177,6 +280,9 @@ Structure::~Structure() fastFree(m_propertyTable); } + if (!m_isUsingSingleSlot) + delete transitionTable(); + #ifndef NDEBUG #if ENABLE(JSC_MULTIPLE_THREADS) MutexLocker protect(ignoreSetMutex); @@ -340,7 +446,7 @@ PassRefPtr<Structure> Structure::addPropertyTransitionToExistingStructure(Struct ASSERT(!structure->isDictionary()); ASSERT(structure->typeInfo().type() == ObjectType); - if (Structure* existingTransition = structure->table.get(make_pair(propertyName.ustring().rep(), attributes), specificValue)) { + if (Structure* existingTransition = structure->transitionTableGet(make_pair(propertyName.ustring().rep(), attributes), specificValue)) { ASSERT(existingTransition->m_offset != noOffset); offset = existingTransition->m_offset + existingTransition->m_anonymousSlotCount; ASSERT(offset >= structure->m_anonymousSlotCount); @@ -405,7 +511,7 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con transition->m_offset = offset - structure->m_anonymousSlotCount; ASSERT(structure->anonymousSlotCount() == transition->anonymousSlotCount()); - structure->table.add(make_pair(propertyName.ustring().rep(), attributes), transition.get(), specificValue); + structure->transitionTableAdd(make_pair(propertyName.ustring().rep(), attributes), transition.get(), specificValue); return transition.release(); } @@ -852,7 +958,7 @@ size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCel bool Structure::hasTransition(UString::Rep* rep, unsigned attributes) { - return table.hasTransition(make_pair(rep, attributes)); + return transitionTableHasTransition(make_pair(rep, attributes)); } size_t Structure::remove(const Identifier& propertyName) diff --git a/JavaScriptCore/runtime/Structure.h b/JavaScriptCore/runtime/Structure.h index 95cf94c..968443a 100644 --- a/JavaScriptCore/runtime/Structure.h +++ b/JavaScriptCore/runtime/Structure.h @@ -179,6 +179,20 @@ namespace JSC { // Since the number of transitions is always the same as m_offset, we keep the size of Structure down by not storing both. return m_offset == noOffset ? 0 : m_offset + 1; } + + typedef std::pair<Structure*, Structure*> Transition; + typedef HashMap<StructureTransitionTableHash::Key, Transition, StructureTransitionTableHash, StructureTransitionTableHashTraits> TransitionTable; + + inline bool transitionTableContains(const StructureTransitionTableHash::Key& key, JSCell* specificValue); + inline void transitionTableRemove(const StructureTransitionTableHash::Key& key, JSCell* specificValue); + inline void transitionTableAdd(const StructureTransitionTableHash::Key& key, Structure* structure, JSCell* specificValue); + inline bool transitionTableHasTransition(const StructureTransitionTableHash::Key& key) const; + inline Structure* transitionTableGet(const StructureTransitionTableHash::Key& key, JSCell* specificValue) const; + + TransitionTable* transitionTable() const { ASSERT(!m_isUsingSingleSlot); return m_transitions.m_table; } + inline void setTransitionTable(TransitionTable* table); + Structure* singleTransition() const { ASSERT(m_isUsingSingleSlot); return m_transitions.m_singleTransition; } + void setSingleTransition(Structure* structure) { ASSERT(m_isUsingSingleSlot); m_transitions.m_singleTransition = structure; } bool isValid(ExecState*, StructureChain* cachedPrototypeChain) const; @@ -199,7 +213,11 @@ namespace JSC { RefPtr<UString::Rep> m_nameInPrevious; JSCell* m_specificValueInPrevious; - StructureTransitionTable table; + // 'm_isUsingSingleSlot' indicates whether we are using the single transition optimisation. + union { + TransitionTable* m_table; + Structure* m_singleTransition; + } m_transitions; WeakGCPtr<JSPropertyNameIterator> m_enumerationCache; @@ -224,7 +242,8 @@ namespace JSC { #endif unsigned m_specificFunctionThrashCount : 2; unsigned m_anonymousSlotCount : 5; - // 5 free bits + unsigned m_isUsingSingleSlot : 1; + // 4 free bits }; inline size_t Structure::get(const Identifier& propertyName) @@ -271,58 +290,7 @@ namespace JSC { return m_propertyTable->entries()[entryIndex - 1].offset; } } - - bool StructureTransitionTable::contains(const StructureTransitionTableHash::Key& key, JSCell* specificValue) - { - if (usingSingleTransitionSlot()) { - Structure* existingTransition = singleTransition(); - return existingTransition && existingTransition->m_nameInPrevious.get() == key.first - && existingTransition->m_attributesInPrevious == key.second - && (existingTransition->m_specificValueInPrevious == specificValue || existingTransition->m_specificValueInPrevious == 0); - } - TransitionTable::iterator find = table()->find(key); - if (find == table()->end()) - return false; - - return find->second.first || find->second.second->transitionedFor(specificValue); - } - Structure* StructureTransitionTable::get(const StructureTransitionTableHash::Key& key, JSCell* specificValue) const - { - if (usingSingleTransitionSlot()) { - Structure* existingTransition = singleTransition(); - if (existingTransition && existingTransition->m_nameInPrevious.get() == key.first - && existingTransition->m_attributesInPrevious == key.second - && (existingTransition->m_specificValueInPrevious == specificValue || existingTransition->m_specificValueInPrevious == 0)) - return existingTransition; - return 0; - } - - Transition transition = table()->get(key); - if (transition.second && transition.second->transitionedFor(specificValue)) - return transition.second; - return transition.first; - } - - bool StructureTransitionTable::hasTransition(const StructureTransitionTableHash::Key& key) const - { - if (usingSingleTransitionSlot()) { - Structure* transition = singleTransition(); - return transition && transition->m_nameInPrevious == key.first - && transition->m_attributesInPrevious == key.second; - } - return table()->contains(key); - } - - void StructureTransitionTable::reifySingleTransition() - { - ASSERT(usingSingleTransitionSlot()); - Structure* existingTransition = singleTransition(); - TransitionTable* transitionTable = new TransitionTable; - setTransitionTable(transitionTable); - if (existingTransition) - add(std::make_pair(existingTransition->m_nameInPrevious.get(), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); - } } // namespace JSC #endif // Structure_h diff --git a/JavaScriptCore/runtime/StructureTransitionTable.h b/JavaScriptCore/runtime/StructureTransitionTable.h index 320dbdd..d1dc2d9 100644 --- a/JavaScriptCore/runtime/StructureTransitionTable.h +++ b/JavaScriptCore/runtime/StructureTransitionTable.h @@ -30,7 +30,6 @@ #include <wtf/HashFunctions.h> #include <wtf/HashMap.h> #include <wtf/HashTraits.h> -#include <wtf/PtrAndFlags.h> #include <wtf/OwnPtr.h> #include <wtf/RefPtr.h> @@ -67,99 +66,6 @@ namespace JSC { static bool isDeletedValue(const TraitType& value) { return FirstTraits::isDeletedValue(value.first); } }; - class StructureTransitionTable { - typedef std::pair<Structure*, Structure*> Transition; - typedef HashMap<StructureTransitionTableHash::Key, Transition, StructureTransitionTableHash, StructureTransitionTableHashTraits> TransitionTable; - public: - StructureTransitionTable() { - m_transitions.m_singleTransition.set(0); - m_transitions.m_singleTransition.setFlag(usingSingleSlot); - } - - ~StructureTransitionTable() { - if (!usingSingleTransitionSlot()) - delete table(); - } - - // The contains and get methods accept imprecise matches, so if an unspecialised transition exists - // for the given key they will consider that transition to be a match. If a specialised transition - // exists and it matches the provided specificValue, get will return the specific transition. - inline bool contains(const StructureTransitionTableHash::Key&, JSCell* specificValue); - inline Structure* get(const StructureTransitionTableHash::Key&, JSCell* specificValue) const; - inline bool hasTransition(const StructureTransitionTableHash::Key& key) const; - void remove(const StructureTransitionTableHash::Key& key, JSCell* specificValue) - { - if (usingSingleTransitionSlot()) { - ASSERT(contains(key, specificValue)); - setSingleTransition(0); - return; - } - TransitionTable::iterator find = table()->find(key); - if (!specificValue) - find->second.first = 0; - else - find->second.second = 0; - if (!find->second.first && !find->second.second) - table()->remove(find); - } - void add(const StructureTransitionTableHash::Key& key, Structure* structure, JSCell* specificValue) - { - if (usingSingleTransitionSlot()) { - if (!singleTransition()) { - setSingleTransition(structure); - return; - } - reifySingleTransition(); - } - if (!specificValue) { - TransitionTable::iterator find = table()->find(key); - if (find == table()->end()) - table()->add(key, Transition(structure, 0)); - else - find->second.first = structure; - } else { - // If we're adding a transition to a specific value, then there cannot be - // an existing transition - ASSERT(!table()->contains(key)); - table()->add(key, Transition(0, structure)); - } - } - - private: - TransitionTable* table() const { ASSERT(!usingSingleTransitionSlot()); return m_transitions.m_table; } - Structure* singleTransition() const { - ASSERT(usingSingleTransitionSlot()); - return m_transitions.m_singleTransition.get(); - } - bool usingSingleTransitionSlot() const { return m_transitions.m_singleTransition.isFlagSet(usingSingleSlot); } - void setSingleTransition(Structure* structure) - { - ASSERT(usingSingleTransitionSlot()); - m_transitions.m_singleTransition.set(structure); - } - - void setTransitionTable(TransitionTable* table) - { - ASSERT(usingSingleTransitionSlot()); -#ifndef NDEBUG - setSingleTransition(0); -#endif - m_transitions.m_table = table; - // This implicitly clears the flag that indicates we're using a single transition - ASSERT(!usingSingleTransitionSlot()); - } - inline void reifySingleTransition(); - - enum UsingSingleSlot { - usingSingleSlot - }; - // Last bit indicates whether we are using the single transition optimisation - union { - TransitionTable* m_table; - PtrAndFlagsBase<Structure, UsingSingleSlot> m_singleTransition; - } m_transitions; - }; - } // namespace JSC #endif // StructureTransitionTable_h diff --git a/JavaScriptCore/runtime/UString.cpp b/JavaScriptCore/runtime/UString.cpp index 4a89a23..1684ec2 100644 --- a/JavaScriptCore/runtime/UString.cpp +++ b/JavaScriptCore/runtime/UString.cpp @@ -167,12 +167,12 @@ UString::UString(const char* c) { } -UString::UString(const char* c, int length) +UString::UString(const char* c, unsigned length) : m_rep(Rep::create(c, length)) { } -UString::UString(const UChar* c, int length) +UString::UString(const UChar* c, unsigned length) { if (length == 0) m_rep = &Rep::empty(); @@ -206,7 +206,7 @@ UString UString::from(int i) *--p = '-'; } - return UString(p, static_cast<int>(end - p)); + return UString(p, static_cast<unsigned>(end - p)); } UString UString::from(long long i) @@ -239,7 +239,7 @@ UString UString::from(long long i) *--p = '-'; } - return UString(p, static_cast<int>(end - p)); + return UString(p, static_cast<unsigned>(end - p)); } UString UString::from(unsigned int u) @@ -257,7 +257,7 @@ UString UString::from(unsigned int u) } } - return UString(p, static_cast<int>(end - p)); + return UString(p, static_cast<unsigned>(end - p)); } UString UString::from(long l) @@ -286,7 +286,7 @@ UString UString::from(long l) *--p = '-'; } - return UString(p, static_cast<int>(end - p)); + return UString(p, end - p); } UString UString::from(double d) @@ -299,8 +299,8 @@ UString UString::from(double d) bool UString::getCString(CStringBuffer& buffer) const { - int length = size(); - int neededSize = length + 1; + unsigned length = size(); + unsigned neededSize = length + 1; buffer.resize(neededSize); char* buf = buffer.data(); @@ -324,8 +324,8 @@ char* UString::ascii() const { static char* asciiBuffer = 0; - int length = size(); - int neededSize = length + 1; + unsigned length = size(); + unsigned neededSize = length + 1; delete[] asciiBuffer; asciiBuffer = new char[neededSize]; @@ -355,7 +355,7 @@ bool UString::is8Bit() const return true; } -UChar UString::operator[](int pos) const +UChar UString::operator[](unsigned pos) const { if (pos >= size()) return '\0'; @@ -495,7 +495,7 @@ uint32_t UString::toStrictUInt32(bool* ok) const *ok = false; // Empty string is not OK. - int len = m_rep->size(); + unsigned len = m_rep->length(); if (len == 0) return 0; const UChar* p = m_rep->data(); @@ -539,12 +539,9 @@ uint32_t UString::toStrictUInt32(bool* ok) const } } -int UString::find(const UString& f, int pos) const +unsigned UString::find(const UString& f, unsigned pos) const { - int fsz = f.size(); - - if (pos < 0) - pos = 0; + unsigned fsz = f.size(); if (fsz == 1) { UChar ch = f[0]; @@ -553,16 +550,16 @@ int UString::find(const UString& f, int pos) const if (*c == ch) return static_cast<int>(c - data()); } - return -1; + return NotFound; } - int sz = size(); + unsigned sz = size(); if (sz < fsz) - return -1; + return NotFound; if (fsz == 0) return pos; const UChar* end = data() + sz - fsz; - int fsizeminusone = (fsz - 1) * sizeof(UChar); + unsigned fsizeminusone = (fsz - 1) * sizeof(UChar); const UChar* fdata = f.data(); unsigned short fchar = fdata[0]; ++fdata; @@ -571,48 +568,44 @@ int UString::find(const UString& f, int pos) const return static_cast<int>(c - data()); } - return -1; + return NotFound; } -int UString::find(UChar ch, int pos) const +unsigned UString::find(UChar ch, unsigned pos) const { - if (pos < 0) - pos = 0; const UChar* end = data() + size(); for (const UChar* c = data() + pos; c < end; c++) { if (*c == ch) return static_cast<int>(c - data()); } - return -1; + return NotFound; } -int UString::rfind(const UString& f, int pos) const +unsigned UString::rfind(const UString& f, unsigned pos) const { - int sz = size(); - int fsz = f.size(); + unsigned sz = size(); + unsigned fsz = f.size(); if (sz < fsz) - return -1; - if (pos < 0) - pos = 0; + return NotFound; if (pos > sz - fsz) pos = sz - fsz; if (fsz == 0) return pos; - int fsizeminusone = (fsz - 1) * sizeof(UChar); + unsigned fsizeminusone = (fsz - 1) * sizeof(UChar); const UChar* fdata = f.data(); for (const UChar* c = data() + pos; c >= data(); c--) { if (*c == *fdata && !memcmp(c + 1, fdata + 1, fsizeminusone)) return static_cast<int>(c - data()); } - return -1; + return NotFound; } -int UString::rfind(UChar ch, int pos) const +unsigned UString::rfind(UChar ch, unsigned pos) const { if (isEmpty()) - return -1; + return NotFound; if (pos + 1 >= size()) pos = size() - 1; for (const UChar* c = data() + pos; c >= data(); c--) { @@ -620,21 +613,18 @@ int UString::rfind(UChar ch, int pos) const return static_cast<int>(c - data()); } - return -1; + return NotFound; } -UString UString::substr(int pos, int len) const +UString UString::substr(unsigned pos, unsigned len) const { - int s = size(); + unsigned s = size(); - if (pos < 0) - pos = 0; - else if (pos >= s) + if (pos >= s) pos = s; - if (len < 0) - len = s; - if (pos + len >= s) - len = s - pos; + unsigned limit = s - pos; + if (len > limit) + len = limit; if (pos == 0 && len == s) return *this; @@ -661,12 +651,12 @@ bool operator==(const UString& s1, const char *s2) bool operator<(const UString& s1, const UString& s2) { - const int l1 = s1.size(); - const int l2 = s2.size(); - const int lmin = l1 < l2 ? l1 : l2; + const unsigned l1 = s1.size(); + const unsigned l2 = s2.size(); + const unsigned lmin = l1 < l2 ? l1 : l2; const UChar* c1 = s1.data(); const UChar* c2 = s2.data(); - int l = 0; + unsigned l = 0; while (l < lmin && *c1 == *c2) { c1++; c2++; @@ -680,12 +670,12 @@ bool operator<(const UString& s1, const UString& s2) bool operator>(const UString& s1, const UString& s2) { - const int l1 = s1.size(); - const int l2 = s2.size(); - const int lmin = l1 < l2 ? l1 : l2; + const unsigned l1 = s1.size(); + const unsigned l2 = s2.size(); + const unsigned lmin = l1 < l2 ? l1 : l2; const UChar* c1 = s1.data(); const UChar* c2 = s2.data(); - int l = 0; + unsigned l = 0; while (l < lmin && *c1 == *c2) { c1++; c2++; @@ -699,12 +689,12 @@ bool operator>(const UString& s1, const UString& s2) int compare(const UString& s1, const UString& s2) { - const int l1 = s1.size(); - const int l2 = s2.size(); - const int lmin = l1 < l2 ? l1 : l2; + const unsigned l1 = s1.size(); + const unsigned l2 = s2.size(); + const unsigned lmin = l1 < l2 ? l1 : l2; const UChar* c1 = s1.data(); const UChar* c2 = s2.data(); - int l = 0; + unsigned l = 0; while (l < lmin && *c1 == *c2) { c1++; c2++; @@ -722,12 +712,12 @@ int compare(const UString& s1, const UString& s2) bool equal(const UString::Rep* r, const UString::Rep* b) { - int length = r->size(); - if (length != b->size()) + unsigned length = r->length(); + if (length != b->length()) return false; const UChar* d = r->data(); const UChar* s = b->data(); - for (int i = 0; i != length; ++i) { + for (unsigned i = 0; i != length; ++i) { if (d[i] != s[i]) return false; } @@ -737,7 +727,7 @@ bool equal(const UString::Rep* r, const UString::Rep* b) CString UString::UTF8String(bool strict) const { // Allocate a buffer big enough to hold all the characters. - const int length = size(); + const unsigned length = size(); Vector<char, 1024> buffer(length * 3); // Convert to runs of 8-bit characters. diff --git a/JavaScriptCore/runtime/UString.h b/JavaScriptCore/runtime/UString.h index 7d9ec49..75b43b7 100644 --- a/JavaScriptCore/runtime/UString.h +++ b/JavaScriptCore/runtime/UString.h @@ -31,7 +31,6 @@ #include <wtf/CrossThreadRefCounted.h> #include <wtf/OwnFastMallocPtr.h> #include <wtf/PassRefPtr.h> -#include <wtf/PtrAndFlags.h> #include <wtf/RefPtr.h> #include <wtf/Vector.h> #include <wtf/unicode/Unicode.h> @@ -83,8 +82,8 @@ namespace JSC { public: UString(); UString(const char*); // Constructor for null-terminated string. - UString(const char*, int length); - UString(const UChar*, int length); + UString(const char*, unsigned length); + UString(const UChar*, unsigned length); UString(const Vector<UChar>& buffer); UString(const UString& s) @@ -133,13 +132,13 @@ namespace JSC { const UChar* data() const { return m_rep->data(); } bool isNull() const { return m_rep == s_nullRep; } - bool isEmpty() const { return !m_rep->size(); } + bool isEmpty() const { return !m_rep->length(); } bool is8Bit() const; - int size() const { return m_rep->size(); } + unsigned size() const { return m_rep->length(); } - UChar operator[](int pos) const; + UChar operator[](unsigned pos) const; double toDouble(bool tolerateTrailingJunk, bool tolerateEmptyString) const; double toDouble(bool tolerateTrailingJunk) const; @@ -151,12 +150,13 @@ namespace JSC { unsigned toArrayIndex(bool* ok = 0) const; - int find(const UString& f, int pos = 0) const; - int find(UChar, int pos = 0) const; - int rfind(const UString& f, int pos) const; - int rfind(UChar, int pos) const; + static const unsigned NotFound = 0xFFFFFFFFu; + unsigned find(const UString& f, unsigned pos = 0) const; + unsigned find(UChar, unsigned pos = 0) const; + unsigned rfind(const UString& f, unsigned pos) const; + unsigned rfind(UChar, unsigned pos) const; - UString substr(int pos = 0, int len = -1) const; + UString substr(unsigned pos = 0, unsigned len = 0xFFFFFFFF) const; static const UString& null() { return *s_nullUString; } @@ -182,7 +182,7 @@ namespace JSC { ALWAYS_INLINE bool operator==(const UString& s1, const UString& s2) { - int size = s1.size(); + unsigned size = s1.size(); switch (size) { case 0: return !s2.size(); @@ -246,9 +246,7 @@ namespace JSC { // We'd rather not do shared substring append for small strings, since // this runs too much risk of a tiny initial string holding down a // huge buffer. - // FIXME: this should be size_t but that would cause warnings until we - // fix UString sizes to be size_t instead of int - static const int minShareSize = Heap::minExtraCost / sizeof(UChar); + static const unsigned minShareSize = Heap::minExtraCost / sizeof(UChar); struct IdentifierRepHash : PtrHash<RefPtr<JSC::UString::Rep> > { static unsigned hash(const RefPtr<JSC::UString::Rep>& key) { return key->existingHash(); } @@ -327,6 +325,14 @@ namespace JSC { unsigned m_length; }; + inline void sumWithOverflow(unsigned& total, unsigned addend, bool& overflow) + { + unsigned oldTotal = total; + total = oldTotal + addend; + if (total < oldTotal) + overflow = true; + } + template<typename StringType1, typename StringType2> PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2) { @@ -334,7 +340,11 @@ namespace JSC { StringTypeAdapter<StringType2> adapter2(string2); UChar* buffer; - unsigned length = adapter1.length() + adapter2.length(); + bool overflow = false; + unsigned length = adapter1.length(); + sumWithOverflow(length, adapter2.length(), overflow); + if (overflow) + return 0; PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer); if (!resultImpl) return 0; @@ -355,7 +365,12 @@ namespace JSC { StringTypeAdapter<StringType3> adapter3(string3); UChar* buffer; - unsigned length = adapter1.length() + adapter2.length() + adapter3.length(); + bool overflow = false; + unsigned length = adapter1.length(); + sumWithOverflow(length, adapter2.length(), overflow); + sumWithOverflow(length, adapter3.length(), overflow); + if (overflow) + return 0; PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer); if (!resultImpl) return 0; @@ -379,7 +394,13 @@ namespace JSC { StringTypeAdapter<StringType4> adapter4(string4); UChar* buffer; - unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length(); + bool overflow = false; + unsigned length = adapter1.length(); + sumWithOverflow(length, adapter2.length(), overflow); + sumWithOverflow(length, adapter3.length(), overflow); + sumWithOverflow(length, adapter4.length(), overflow); + if (overflow) + return 0; PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer); if (!resultImpl) return 0; @@ -406,7 +427,14 @@ namespace JSC { StringTypeAdapter<StringType5> adapter5(string5); UChar* buffer; - unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length(); + bool overflow = false; + unsigned length = adapter1.length(); + sumWithOverflow(length, adapter2.length(), overflow); + sumWithOverflow(length, adapter3.length(), overflow); + sumWithOverflow(length, adapter4.length(), overflow); + sumWithOverflow(length, adapter5.length(), overflow); + if (overflow) + return 0; PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer); if (!resultImpl) return 0; @@ -436,7 +464,15 @@ namespace JSC { StringTypeAdapter<StringType6> adapter6(string6); UChar* buffer; - unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length() + adapter6.length(); + bool overflow = false; + unsigned length = adapter1.length(); + sumWithOverflow(length, adapter2.length(), overflow); + sumWithOverflow(length, adapter3.length(), overflow); + sumWithOverflow(length, adapter4.length(), overflow); + sumWithOverflow(length, adapter5.length(), overflow); + sumWithOverflow(length, adapter6.length(), overflow); + if (overflow) + return 0; PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer); if (!resultImpl) return 0; @@ -469,7 +505,16 @@ namespace JSC { StringTypeAdapter<StringType7> adapter7(string7); UChar* buffer; - unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length() + adapter6.length() + adapter7.length(); + bool overflow = false; + unsigned length = adapter1.length(); + sumWithOverflow(length, adapter2.length(), overflow); + sumWithOverflow(length, adapter3.length(), overflow); + sumWithOverflow(length, adapter4.length(), overflow); + sumWithOverflow(length, adapter5.length(), overflow); + sumWithOverflow(length, adapter6.length(), overflow); + sumWithOverflow(length, adapter7.length(), overflow); + if (overflow) + return 0; PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer); if (!resultImpl) return 0; @@ -505,7 +550,17 @@ namespace JSC { StringTypeAdapter<StringType8> adapter8(string8); UChar* buffer; - unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length() + adapter6.length() + adapter7.length() + adapter8.length(); + bool overflow = false; + unsigned length = adapter1.length(); + sumWithOverflow(length, adapter2.length(), overflow); + sumWithOverflow(length, adapter3.length(), overflow); + sumWithOverflow(length, adapter4.length(), overflow); + sumWithOverflow(length, adapter5.length(), overflow); + sumWithOverflow(length, adapter6.length(), overflow); + sumWithOverflow(length, adapter7.length(), overflow); + sumWithOverflow(length, adapter8.length(), overflow); + if (overflow) + return 0; PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer); if (!resultImpl) return 0; diff --git a/JavaScriptCore/runtime/UStringImpl.cpp b/JavaScriptCore/runtime/UStringImpl.cpp index 9882007..b7d9a40 100644 --- a/JavaScriptCore/runtime/UStringImpl.cpp +++ b/JavaScriptCore/runtime/UStringImpl.cpp @@ -50,7 +50,7 @@ PassRefPtr<UStringImpl> UStringImpl::create(const char* c) return result; } -PassRefPtr<UStringImpl> UStringImpl::create(const char* c, int length) +PassRefPtr<UStringImpl> UStringImpl::create(const char* c, unsigned length) { ASSERT(c); @@ -59,12 +59,12 @@ PassRefPtr<UStringImpl> UStringImpl::create(const char* c, int length) UChar* d; PassRefPtr<UStringImpl> result = UStringImpl::createUninitialized(length, d); - for (int i = 0; i < length; i++) + for (unsigned i = 0; i < length; i++) d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend return result; } -PassRefPtr<UStringImpl> UStringImpl::create(const UChar* buffer, int length) +PassRefPtr<UStringImpl> UStringImpl::create(const UChar* buffer, unsigned length) { UChar* newBuffer; PassRefPtr<UStringImpl> impl = createUninitialized(length, newBuffer); @@ -75,12 +75,14 @@ PassRefPtr<UStringImpl> UStringImpl::create(const UChar* buffer, int length) SharedUChar* UStringImpl::baseSharedBuffer() { ASSERT((bufferOwnership() == BufferShared) - || ((bufferOwnership() == BufferOwned) && !m_dataBuffer.asPtr<void*>())); + || ((bufferOwnership() == BufferOwned) && !m_buffer)); - if (bufferOwnership() != BufferShared) - m_dataBuffer = UntypedPtrAndBitfield(SharedUChar::create(new OwnFastMallocPtr<UChar>(m_data)).releaseRef(), BufferShared); + if (bufferOwnership() != BufferShared) { + m_refCountAndFlags = (m_refCountAndFlags & ~s_refCountMaskBufferOwnership) | BufferShared; + m_bufferShared = SharedUChar::create(new OwnFastMallocPtr<UChar>(m_data)).releaseRef(); + } - return m_dataBuffer.asPtr<SharedUChar*>(); + return m_bufferShared; } SharedUChar* UStringImpl::sharedBuffer() @@ -108,12 +110,43 @@ UStringImpl::~UStringImpl() if (bufferOwnership() == BufferOwned) fastFree(m_data); else if (bufferOwnership() == BufferSubstring) - m_dataBuffer.asPtr<UStringImpl*>()->deref(); + m_bufferSubstring->deref(); else { ASSERT(bufferOwnership() == BufferShared); - m_dataBuffer.asPtr<SharedUChar*>()->deref(); + m_bufferShared->deref(); } } } +void URopeImpl::derefFibersNonRecursive(Vector<URopeImpl*, 32>& workQueue) +{ + unsigned length = fiberCount(); + for (unsigned i = 0; i < length; ++i) { + Fiber& fiber = fibers(i); + if (fiber->isRope()) { + URopeImpl* nextRope = static_cast<URopeImpl*>(fiber); + if (nextRope->hasOneRef()) + workQueue.append(nextRope); + else + nextRope->deref(); + } else + static_cast<UStringImpl*>(fiber)->deref(); + } +} + +void URopeImpl::destructNonRecursive() +{ + Vector<URopeImpl*, 32> workQueue; + + derefFibersNonRecursive(workQueue); + delete this; + + while (!workQueue.isEmpty()) { + URopeImpl* rope = workQueue.last(); + workQueue.removeLast(); + rope->derefFibersNonRecursive(workQueue); + delete rope; + } } + +} // namespace JSC diff --git a/JavaScriptCore/runtime/UStringImpl.h b/JavaScriptCore/runtime/UStringImpl.h index bbea0aa..142e01d 100644 --- a/JavaScriptCore/runtime/UStringImpl.h +++ b/JavaScriptCore/runtime/UStringImpl.h @@ -40,72 +40,93 @@ class IdentifierTable; typedef CrossThreadRefCounted<OwnFastMallocPtr<UChar> > SharedUChar; -class UntypedPtrAndBitfield { +class UStringOrRopeImpl : public Noncopyable { public: - UntypedPtrAndBitfield() {} + bool isRope() { return (m_refCountAndFlags & s_refCountIsRope) == s_refCountIsRope; } + unsigned length() const { return m_length; } - UntypedPtrAndBitfield(void* ptrValue, uintptr_t bitValue) - : m_value(reinterpret_cast<uintptr_t>(ptrValue) | bitValue) -#ifndef NDEBUG - , m_leaksPtr(ptrValue) -#endif - { - ASSERT(ptrValue == asPtr<void*>()); - ASSERT((*this & ~s_alignmentMask) == bitValue); - } + void ref() { m_refCountAndFlags += s_refCountIncrement; } + inline void deref(); + +protected: + enum BufferOwnership { + BufferInternal, + BufferOwned, + BufferSubstring, + BufferShared, + }; + + using Noncopyable::operator new; + void* operator new(size_t, void* inPlace) { return inPlace; } - template<typename T> - T asPtr() const { return reinterpret_cast<T>(m_value & s_alignmentMask); } + // For SmallStringStorage, which allocates an array and uses an in-place new. + UStringOrRopeImpl() { } - UntypedPtrAndBitfield& operator&=(uintptr_t bits) + UStringOrRopeImpl(unsigned length, BufferOwnership ownership) + : m_refCountAndFlags(s_refCountIncrement | s_refCountFlagShouldReportedCost | ownership) + , m_length(length) { - m_value &= bits | s_alignmentMask; - return *this; + ASSERT(!isRope()); } - UntypedPtrAndBitfield& operator|=(uintptr_t bits) + enum StaticStringConstructType { ConstructStaticString }; + UStringOrRopeImpl(unsigned length, StaticStringConstructType) + : m_refCountAndFlags(s_refCountFlagStatic | BufferOwned) + , m_length(length) { - m_value |= bits & ~s_alignmentMask; - return *this; + ASSERT(!isRope()); } - uintptr_t operator&(uintptr_t mask) const + enum RopeConstructType { ConstructRope }; + UStringOrRopeImpl(RopeConstructType) + : m_refCountAndFlags(s_refCountIncrement | s_refCountIsRope) + , m_length(0) { - return m_value & mask & ~s_alignmentMask; + ASSERT(isRope()); } -private: - static const uintptr_t s_alignmentMask = ~static_cast<uintptr_t>(0x7); - uintptr_t m_value; -#ifndef NDEBUG - void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced. -#endif + // The bottom 5 bits hold flags, the top 27 bits hold the ref count. + // When dereferencing UStringImpls we check for the ref count AND the + // static bit both being zero - static strings are never deleted. + static const unsigned s_refCountMask = 0xFFFFFFE0; + static const unsigned s_refCountIncrement = 0x20; + static const unsigned s_refCountFlagStatic = 0x10; + static const unsigned s_refCountFlagShouldReportedCost = 0x8; + static const unsigned s_refCountFlagIsIdentifier = 0x4; + static const unsigned s_refCountMaskBufferOwnership = 0x3; + // Use an otherwise invalid permutation of flags (static & shouldReportedCost - + // static strings do not set shouldReportedCost in the constructor, and this bit + // is only ever cleared, not set) to identify objects that are ropes. + static const unsigned s_refCountIsRope = s_refCountFlagStatic | s_refCountFlagShouldReportedCost; + + unsigned m_refCountAndFlags; + unsigned m_length; }; -class UStringImpl : Noncopyable { +class UStringImpl : public UStringOrRopeImpl { public: template<size_t inlineCapacity> static PassRefPtr<UStringImpl> adopt(Vector<UChar, inlineCapacity>& vector) { if (unsigned length = vector.size()) { ASSERT(vector.data()); - return adoptRef(new UStringImpl(vector.releaseBuffer(), length, BufferOwned)); + return adoptRef(new UStringImpl(vector.releaseBuffer(), length)); } return &empty(); } static PassRefPtr<UStringImpl> create(const char* c); - static PassRefPtr<UStringImpl> create(const char* c, int length); - static PassRefPtr<UStringImpl> create(const UChar* buffer, int length); + static PassRefPtr<UStringImpl> create(const char* c, unsigned length); + static PassRefPtr<UStringImpl> create(const UChar* buffer, unsigned length); - static PassRefPtr<UStringImpl> create(PassRefPtr<UStringImpl> rep, int offset, int length) + static PassRefPtr<UStringImpl> create(PassRefPtr<UStringImpl> rep, unsigned offset, unsigned length) { ASSERT(rep); rep->checkConsistency(); return adoptRef(new UStringImpl(rep->m_data + offset, length, rep->bufferOwnerString())); } - static PassRefPtr<UStringImpl> create(PassRefPtr<SharedUChar> sharedBuffer, UChar* buffer, int length) + static PassRefPtr<UStringImpl> create(PassRefPtr<SharedUChar> sharedBuffer, UChar* buffer, unsigned length) { return adoptRef(new UStringImpl(buffer, length, sharedBuffer)); } @@ -121,7 +142,7 @@ public: CRASH(); UStringImpl* resultImpl = static_cast<UStringImpl*>(fastMalloc(sizeof(UChar) * length + sizeof(UStringImpl))); output = reinterpret_cast<UChar*>(resultImpl + 1); - return adoptRef(new(resultImpl) UStringImpl(output, length, BufferInternal)); + return adoptRef(new(resultImpl) UStringImpl(length)); } static PassRefPtr<UStringImpl> tryCreateUninitialized(unsigned length, UChar*& output) @@ -137,31 +158,36 @@ public: if (!tryFastMalloc(sizeof(UChar) * length + sizeof(UStringImpl)).getValue(resultImpl)) return 0; output = reinterpret_cast<UChar*>(resultImpl + 1); - return adoptRef(new(resultImpl) UStringImpl(output, length, BufferInternal)); + return adoptRef(new(resultImpl) UStringImpl(length)); } SharedUChar* sharedBuffer(); UChar* data() const { return m_data; } - int size() const { return m_length; } size_t cost() { // For substrings, return the cost of the base string. if (bufferOwnership() == BufferSubstring) - return m_dataBuffer.asPtr<UStringImpl*>()->cost(); + return m_bufferSubstring->cost(); - if (m_dataBuffer & s_reportedCostBit) - return 0; - m_dataBuffer |= s_reportedCostBit; - return m_length; + if (m_refCountAndFlags & s_refCountFlagShouldReportedCost) { + m_refCountAndFlags &= ~s_refCountFlagShouldReportedCost; + return m_length; + } + return 0; } unsigned hash() const { if (!m_hash) m_hash = computeHash(data(), m_length); return m_hash; } unsigned existingHash() const { ASSERT(m_hash); return m_hash; } // fast path for Identifiers void setHash(unsigned hash) { ASSERT(hash == computeHash(data(), m_length)); m_hash = hash; } // fast path for Identifiers - bool isIdentifier() const { return m_isIdentifier; } - void setIsIdentifier(bool isIdentifier) { m_isIdentifier = isIdentifier; } + bool isIdentifier() const { return m_refCountAndFlags & s_refCountFlagIsIdentifier; } + void setIsIdentifier(bool isIdentifier) + { + if (isIdentifier) + m_refCountAndFlags |= s_refCountFlagIsIdentifier; + else + m_refCountAndFlags &= ~s_refCountFlagIsIdentifier; + } - UStringImpl* ref() { m_refCount += s_refCountIncrement; return this; } - ALWAYS_INLINE void deref() { if (!(m_refCount -= s_refCountIncrement)) delete this; } + ALWAYS_INLINE void deref() { m_refCountAndFlags -= s_refCountIncrement; if (!(m_refCountAndFlags & (s_refCountMask | s_refCountFlagStatic))) delete this; } static void copyChars(UChar* destination, const UChar* source, unsigned numCharacters) { @@ -172,8 +198,8 @@ public: memcpy(destination, source, numCharacters * sizeof(UChar)); } - static unsigned computeHash(const UChar* s, int length) { ASSERT(length >= 0); return WTF::stringHash(s, length); } - static unsigned computeHash(const char* s, int length) { ASSERT(length >= 0); return WTF::stringHash(s, length); } + static unsigned computeHash(const UChar* s, unsigned length) { return WTF::stringHash(s, length); } + static unsigned computeHash(const char* s, unsigned length) { return WTF::stringHash(s, length); } static unsigned computeHash(const char* s) { return WTF::stringHash(s); } static UStringImpl& empty() { return *s_empty; } @@ -187,109 +213,145 @@ public: } private: - enum BufferOwnership { - BufferInternal, - BufferOwned, - BufferSubstring, - BufferShared, - }; - // For SmallStringStorage, which allocates an array and uses an in-place new. UStringImpl() { } - // Used to construct normal strings with an internal or external buffer. - UStringImpl(UChar* data, int length, BufferOwnership ownership) - : m_data(data) - , m_length(length) - , m_refCount(s_refCountIncrement) + // Used to construct normal strings with an internal buffer. + UStringImpl(unsigned length) + : UStringOrRopeImpl(length, BufferInternal) + , m_data(reinterpret_cast<UChar*>(this + 1)) + , m_buffer(0) + , m_hash(0) + { + checkConsistency(); + } + + // Used to construct normal strings with an external buffer. + UStringImpl(UChar* data, unsigned length) + : UStringOrRopeImpl(length, BufferOwned) + , m_data(data) + , m_buffer(0) , m_hash(0) - , m_isIdentifier(false) - , m_dataBuffer(0, ownership) { - ASSERT((ownership == BufferInternal) || (ownership == BufferOwned)); checkConsistency(); } // Used to construct static strings, which have an special refCount that can never hit zero. // This means that the static string will never be destroyed, which is important because // static strings will be shared across threads & ref-counted in a non-threadsafe manner. - enum StaticStringConstructType { ConstructStaticString }; - UStringImpl(UChar* data, int length, StaticStringConstructType) - : m_data(data) - , m_length(length) - , m_refCount(s_staticRefCountInitialValue) + UStringImpl(UChar* data, unsigned length, StaticStringConstructType) + : UStringOrRopeImpl(length, ConstructStaticString) + , m_data(data) + , m_buffer(0) , m_hash(0) - , m_isIdentifier(false) - , m_dataBuffer(0, BufferOwned) { checkConsistency(); } // Used to create new strings that are a substring of an existing string. - UStringImpl(UChar* data, int length, PassRefPtr<UStringImpl> base) - : m_data(data) - , m_length(length) - , m_refCount(s_refCountIncrement) + UStringImpl(UChar* data, unsigned length, PassRefPtr<UStringImpl> base) + : UStringOrRopeImpl(length, BufferSubstring) + , m_data(data) + , m_bufferSubstring(base.releaseRef()) , m_hash(0) - , m_isIdentifier(false) - , m_dataBuffer(base.releaseRef(), BufferSubstring) { // Do use static strings as a base for substrings; UntypedPtrAndBitfield assumes // that all pointers will be at least 8-byte aligned, we cannot guarantee that of // UStringImpls that are not heap allocated. - ASSERT(m_dataBuffer.asPtr<UStringImpl*>()->size()); - ASSERT(!m_dataBuffer.asPtr<UStringImpl*>()->isStatic()); + ASSERT(m_bufferSubstring->length()); + ASSERT(!m_bufferSubstring->isStatic()); checkConsistency(); } // Used to construct new strings sharing an existing shared buffer. - UStringImpl(UChar* data, int length, PassRefPtr<SharedUChar> sharedBuffer) - : m_data(data) - , m_length(length) - , m_refCount(s_refCountIncrement) + UStringImpl(UChar* data, unsigned length, PassRefPtr<SharedUChar> sharedBuffer) + : UStringOrRopeImpl(length, BufferShared) + , m_data(data) + , m_bufferShared(sharedBuffer.releaseRef()) , m_hash(0) - , m_isIdentifier(false) - , m_dataBuffer(sharedBuffer.releaseRef(), BufferShared) { checkConsistency(); } - using Noncopyable::operator new; - void* operator new(size_t, void* inPlace) { return inPlace; } - ~UStringImpl(); // This number must be at least 2 to avoid sharing empty, null as well as 1 character strings from SmallStrings. - static const int s_minLengthToShare = 10; + static const unsigned s_minLengthToShare = 10; static const unsigned s_copyCharsInlineCutOff = 20; - static const uintptr_t s_bufferOwnershipMask = 3; - static const uintptr_t s_reportedCostBit = 4; - // We initialize and increment/decrement the refCount for all normal (non-static) strings by the value 2. - // We initialize static strings with an odd number (specifically, 1), such that the refCount cannot reach zero. - static const int s_refCountIncrement = 2; - static const int s_staticRefCountInitialValue = 1; - - UStringImpl* bufferOwnerString() { return (bufferOwnership() == BufferSubstring) ? m_dataBuffer.asPtr<UStringImpl*>() : this; } - const UStringImpl* bufferOwnerString() const { return (bufferOwnership() == BufferSubstring) ? m_dataBuffer.asPtr<UStringImpl*>() : this; } + + UStringImpl* bufferOwnerString() { return (bufferOwnership() == BufferSubstring) ? m_bufferSubstring : this; } + const UStringImpl* bufferOwnerString() const { return (bufferOwnership() == BufferSubstring) ? m_bufferSubstring : this; } SharedUChar* baseSharedBuffer(); - unsigned bufferOwnership() const { return m_dataBuffer & s_bufferOwnershipMask; } - bool isStatic() const { return m_refCount & 1; } + unsigned bufferOwnership() const { return m_refCountAndFlags & s_refCountMaskBufferOwnership; } + bool isStatic() const { return m_refCountAndFlags & s_refCountFlagStatic; } // unshared data UChar* m_data; - int m_length; - unsigned m_refCount; - mutable unsigned m_hash : 31; - mutable unsigned m_isIdentifier : 1; - UntypedPtrAndBitfield m_dataBuffer; + union { + void* m_buffer; + UStringImpl* m_bufferSubstring; + SharedUChar* m_bufferShared; + }; + mutable unsigned m_hash; JS_EXPORTDATA static UStringImpl* s_empty; friend class JIT; friend class SmallStringsStorage; + friend class UStringOrRopeImpl; friend void initializeUString(); }; +class URopeImpl : public UStringOrRopeImpl { +public: + // A URopeImpl is composed from a set of smaller strings called Fibers. + // Each Fiber in a rope is either UStringImpl or another URopeImpl. + typedef UStringOrRopeImpl* Fiber; + + // Creates a URopeImpl comprising of 'fiberCount' Fibers. + // The URopeImpl is constructed in an uninitialized state - initialize must be called for each Fiber in the URopeImpl. + static PassRefPtr<URopeImpl> tryCreateUninitialized(unsigned fiberCount) + { + void* allocation; + if (tryFastMalloc(sizeof(URopeImpl) + (fiberCount - 1) * sizeof(Fiber)).getValue(allocation)) + return adoptRef(new (allocation) URopeImpl(fiberCount)); + return 0; + } + + void initializeFiber(unsigned &index, Fiber fiber) + { + m_fibers[index++] = fiber; + fiber->ref(); + m_length += fiber->length(); + } + + unsigned fiberCount() { return m_fiberCount; } + Fiber& fibers(unsigned index) { return m_fibers[index]; } + + ALWAYS_INLINE void deref() { m_refCountAndFlags -= s_refCountIncrement; if (!(m_refCountAndFlags & s_refCountMask)) destructNonRecursive(); } + +private: + URopeImpl(unsigned fiberCount) : UStringOrRopeImpl(ConstructRope), m_fiberCount(fiberCount) {} + + void destructNonRecursive(); + void derefFibersNonRecursive(Vector<URopeImpl*, 32>& workQueue); + + bool hasOneRef() { return (m_refCountAndFlags & s_refCountMask) == s_refCountIncrement; } + + unsigned m_fiberCount; + Fiber m_fibers[1]; + + friend class UStringOrRopeImpl; +}; + +inline void UStringOrRopeImpl::deref() +{ + if (isRope()) + static_cast<URopeImpl*>(this)->deref(); + else + static_cast<UStringImpl*>(this)->deref(); +} + bool equal(const UStringImpl*, const UStringImpl*); } diff --git a/JavaScriptCore/wtf/AlwaysInline.h b/JavaScriptCore/wtf/AlwaysInline.h index 4e7224c..ce27df6 100644 --- a/JavaScriptCore/wtf/AlwaysInline.h +++ b/JavaScriptCore/wtf/AlwaysInline.h @@ -33,6 +33,8 @@ #ifndef NEVER_INLINE #if COMPILER(GCC) #define NEVER_INLINE __attribute__((__noinline__)) +#elif COMPILER(RVCT) +#define NEVER_INLINE __declspec(noinline) #else #define NEVER_INLINE #endif @@ -57,6 +59,8 @@ #ifndef NO_RETURN #if COMPILER(GCC) #define NO_RETURN __attribute((__noreturn__)) +#elif COMPILER(RVCT) +#define NO_RETURN __declspec(noreturn) #else #define NO_RETURN #endif diff --git a/JavaScriptCore/wtf/FastMalloc.cpp b/JavaScriptCore/wtf/FastMalloc.cpp index 79d2bfb..90d1e3f 100644 --- a/JavaScriptCore/wtf/FastMalloc.cpp +++ b/JavaScriptCore/wtf/FastMalloc.cpp @@ -1248,13 +1248,6 @@ static const int kScavengeTimerDelayInSeconds = 5; // Number of free committed pages that we want to keep around. static const size_t kMinimumFreeCommittedPageCount = 512; -// During a scavenge, we'll release up to a fraction of the free committed pages. -#if OS(WINDOWS) -// We are slightly less aggressive in releasing memory on Windows due to performance reasons. -static const int kMaxScavengeAmountFactor = 3; -#else -static const int kMaxScavengeAmountFactor = 2; -#endif #endif class TCMalloc_PageHeap { @@ -1507,39 +1500,35 @@ ALWAYS_INLINE void TCMalloc_PageHeap::signalScavenger() #endif -void TCMalloc_PageHeap::scavenge() +void TCMalloc_PageHeap::scavenge() { - // If we have to commit memory in the last 5 seconds, it means we don't have enough free committed pages - // for the amount of allocations that we do. So hold off on releasing memory back to the system. + // If we've recently commited pages, our working set is growing, so now is + // not a good time to free pages. if (pages_committed_since_last_scavenge_ > 0) { pages_committed_since_last_scavenge_ = 0; return; } - Length pagesDecommitted = 0; - for (int i = kMaxPages; i >= 0; i--) { + + for (int i = kMaxPages; i >= 0 && shouldContinueScavenging(); i--) { SpanList* slist = (static_cast<size_t>(i) == kMaxPages) ? &large_ : &free_[i]; if (!DLL_IsEmpty(&slist->normal)) { // Release the last span on the normal portion of this list Span* s = slist->normal.prev; - // Only decommit up to a fraction of the free committed pages if pages_allocated_since_last_scavenge_ > 0. - if ((pagesDecommitted + s->length) * kMaxScavengeAmountFactor > free_committed_pages_) - continue; DLL_Remove(s); - TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift), - static_cast<size_t>(s->length << kPageShift)); + ASSERT(!s->decommitted); if (!s->decommitted) { - pagesDecommitted += s->length; + TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift), + static_cast<size_t>(s->length << kPageShift)); + ASSERT(free_committed_pages_ >= s->length); + free_committed_pages_ -= s->length; s->decommitted = true; } DLL_Prepend(&slist->returned, s); - // We can stop scavenging if the number of free committed pages left is less than or equal to the minimum number we want to keep around. - if (free_committed_pages_ <= kMinimumFreeCommittedPageCount + pagesDecommitted) - break; } } + + ASSERT(!shouldContinueScavenging()); pages_committed_since_last_scavenge_ = 0; - ASSERT(free_committed_pages_ >= pagesDecommitted); - free_committed_pages_ -= pagesDecommitted; } ALWAYS_INLINE bool TCMalloc_PageHeap::shouldContinueScavenging() const diff --git a/JavaScriptCore/wtf/PtrAndFlags.h b/JavaScriptCore/wtf/PtrAndFlags.h deleted file mode 100644 index 1e1bee0..0000000 --- a/JavaScriptCore/wtf/PtrAndFlags.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef PtrAndFlags_h -#define PtrAndFlags_h - -#include <wtf/Assertions.h> - -namespace WTF { - template<class T, typename FlagEnum> class PtrAndFlagsBase { - public: - bool isFlagSet(FlagEnum flagNumber) const { ASSERT(flagNumber < 2); return m_ptrAndFlags & (1 << flagNumber); } - void setFlag(FlagEnum flagNumber) { ASSERT(flagNumber < 2); m_ptrAndFlags |= (1 << flagNumber);} - void clearFlag(FlagEnum flagNumber) { ASSERT(flagNumber < 2); m_ptrAndFlags &= ~(1 << flagNumber);} - T* get() const { return reinterpret_cast<T*>(m_ptrAndFlags & ~3); } - void set(T* ptr) - { - ASSERT(!(reinterpret_cast<intptr_t>(ptr) & 3)); - m_ptrAndFlags = reinterpret_cast<intptr_t>(ptr) | (m_ptrAndFlags & 3); -#ifndef NDEBUG - m_leaksPtr = ptr; -#endif - } - - bool operator!() const { return !get(); } - T* operator->() const { return reinterpret_cast<T*>(m_ptrAndFlags & ~3); } - - protected: - intptr_t m_ptrAndFlags; -#ifndef NDEBUG - void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced. -#endif - }; - - template<class T, typename FlagEnum> class PtrAndFlags : public PtrAndFlagsBase<T, FlagEnum> { - public: - PtrAndFlags() - { - PtrAndFlagsBase<T, FlagEnum>::m_ptrAndFlags = 0; - } - PtrAndFlags(T* ptr) - { - PtrAndFlagsBase<T, FlagEnum>::m_ptrAndFlags = 0; - PtrAndFlagsBase<T, FlagEnum>::set(ptr); - } - }; -} // namespace WTF - -using WTF::PtrAndFlagsBase; -using WTF::PtrAndFlags; - -#endif // PtrAndFlags_h diff --git a/JavaScriptCore/wtf/gtk/GOwnPtr.cpp b/JavaScriptCore/wtf/gtk/GOwnPtr.cpp index 1a151b9..da0d839 100644 --- a/JavaScriptCore/wtf/gtk/GOwnPtr.cpp +++ b/JavaScriptCore/wtf/gtk/GOwnPtr.cpp @@ -19,6 +19,7 @@ #include "config.h" #include "GOwnPtr.h" +#include <gio/gio.h> #include <glib.h> namespace WTF { @@ -57,4 +58,10 @@ template <> void freeOwnedGPtr<GDir>(GDir* ptr) if (ptr) g_dir_close(ptr); } + +template <> void freeOwnedGPtr<GFile>(GFile* ptr) +{ + if (ptr) + g_object_unref(ptr); +} } // namespace WTF diff --git a/JavaScriptCore/wtf/gtk/GOwnPtr.h b/JavaScriptCore/wtf/gtk/GOwnPtr.h index ad2c30e..1fc594c 100644 --- a/JavaScriptCore/wtf/gtk/GOwnPtr.h +++ b/JavaScriptCore/wtf/gtk/GOwnPtr.h @@ -35,6 +35,7 @@ typedef struct _GMutex GMutex; typedef struct _GPatternSpec GPatternSpec; typedef struct _GDir GDir; typedef struct _GHashTable GHashTable; +typedef struct _GFile GFile; extern "C" void g_free(void*); namespace WTF { @@ -47,6 +48,7 @@ template<> void freeOwnedGPtr<GMutex>(GMutex*); template<> void freeOwnedGPtr<GPatternSpec>(GPatternSpec*); template<> void freeOwnedGPtr<GDir>(GDir*); template<> void freeOwnedGPtr<GHashTable>(GHashTable*); +template<> void freeOwnedGPtr<GFile>(GFile*); template <typename T> class GOwnPtr : public Noncopyable { public: diff --git a/LayoutTests/fast/events/touch/basic-touch-events-expected.txt b/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt index 7ae4527..67db8dc 100644 --- a/LayoutTests/fast/events/touch/basic-touch-events-expected.txt +++ b/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt @@ -1,50 +1,8 @@ -This tests basic touch event support. -single touch sequence -PASS lastEvent.type is "touchstart" -PASS lastEvent.touches.length is 1 -PASS lastEvent.changedTouches.length is 1 -PASS lastEvent.targetTouches.length is 1 -PASS lastEvent.shiftKey is false -PASS lastEvent.touches[0].target.id is "touchtarget" -PASS lastEvent.touches[0].pageX is 10 -PASS lastEvent.touches[0].pageY is 10 -PASS lastEvent.touches[0].clientX is 10 -PASS lastEvent.touches[0].clientY is 10 -PASS lastEvent.touches[0].identifier is 0 -PASS lastEvent.changedTouches[0].pageX is 10 -PASS lastEvent.changedTouches[0].pageY is 10 -PASS lastEvent.changedTouches[0].clientX is 10 -PASS lastEvent.changedTouches[0].clientY is 10 -PASS lastEvent.changedTouches[0].identifier is 0 -PASS lastEvent.targetTouches[0].pageX is 10 -PASS lastEvent.targetTouches[0].pageY is 10 -PASS lastEvent.targetTouches[0].clientX is 10 -PASS lastEvent.targetTouches[0].clientY is 10 -PASS lastEvent.targetTouches[0].identifier is 0 -PASS lastEvent.type is "touchmove" -PASS lastEvent.touches.length is 1 -PASS lastEvent.changedTouches.length is 1 -PASS lastEvent.targetTouches.length is 1 -PASS lastEvent.touches[0].pageX is 20 -PASS lastEvent.touches[0].pageY is 15 -PASS lastEvent.touches[0].clientX is 20 -PASS lastEvent.touches[0].clientY is 15 -PASS lastEvent.touches[0].identifier is 0 -PASS lastEvent.shiftKey is true -PASS lastEvent.altKey is true -PASS lastEvent.ctrlKey is false -PASS lastEvent.metaKey is false -PASS lastEvent.type is "touchend" -PASS lastEvent.touches.length is 0 -PASS lastEvent.changedTouches.length is 1 -PASS lastEvent.targetTouches.length is 0 -PASS lastEvent.changedTouches[0].pageX is 20 -PASS lastEvent.changedTouches[0].pageY is 15 -PASS lastEvent.changedTouches[0].clientX is 20 -PASS lastEvent.changedTouches[0].clientY is 15 -PASS lastEvent.changedTouches[0].identifier is 0 -PASS lastEvent.shiftKey is false -PASS lastEvent.altKey is false +This tests basic multi touch event support. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + multi touch sequence Two touchpoints pressed PASS lastEvent.type is "touchstart" @@ -131,17 +89,6 @@ PASS lastEvent.changedTouches[0].pageY is 30 PASS lastEvent.changedTouches[0].clientX is 20 PASS lastEvent.changedTouches[0].clientY is 30 PASS lastEvent.changedTouches[0].identifier is 1 -verify touch targets -PASS lastEvent.type is "touchstart" -PASS lastEvent.touches.length is 1 -PASS lastEvent.changedTouches.length is 1 -PASS lastEvent.targetTouches.length is 1 -PASS lastEvent.targetTouches[0].target.tagName is "DIV" -PASS lastEvent.type is "touchmove" -PASS lastEvent.touches.length is 1 -PASS lastEvent.changedTouches.length is 1 -PASS lastEvent.targetTouches.length is 0 -PASS lastEvent.touches[0].target.tagName is "HTML" PASS successfullyParsed is true TEST COMPLETE diff --git a/LayoutTests/fast/events/touch/basic-touch-events.html b/LayoutTests/fast/events/touch/basic-multi-touch-events.html index c50c6fc..951e169 100644 --- a/LayoutTests/fast/events/touch/basic-touch-events.html +++ b/LayoutTests/fast/events/touch/basic-multi-touch-events.html @@ -3,11 +3,12 @@ <head> <link rel="stylesheet" href="../../js/resources/js-test-style.css"> <script src="../../js/resources/js-test-pre.js"></script> +<script src="../../js/resources/js-test-post-function.js"></script> </head> <body> <p id="description"></p> <div id="console"></div> -<script src="script-tests/basic-touch-events.js"></script> -<script src="../../js/resources/js-test-post.js"></script> +<script src="script-tests/basic-multi-touch-events.js"></script> + </body> </html> diff --git a/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt b/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt new file mode 100644 index 0000000..634faa1 --- /dev/null +++ b/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt @@ -0,0 +1,64 @@ +This tests basic single touch event support. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS lastEvent.type is "touchstart" +PASS lastEvent.touches.length is 1 +PASS lastEvent.changedTouches.length is 1 +PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.shiftKey is false +PASS lastEvent.touches[0].target.id is "touchtarget" +PASS lastEvent.touches[0].pageX is 10 +PASS lastEvent.touches[0].pageY is 10 +PASS lastEvent.touches[0].clientX is 10 +PASS lastEvent.touches[0].clientY is 10 +PASS lastEvent.touches[0].identifier is 0 +PASS lastEvent.changedTouches[0].pageX is 10 +PASS lastEvent.changedTouches[0].pageY is 10 +PASS lastEvent.changedTouches[0].clientX is 10 +PASS lastEvent.changedTouches[0].clientY is 10 +PASS lastEvent.changedTouches[0].identifier is 0 +PASS lastEvent.targetTouches[0].pageX is 10 +PASS lastEvent.targetTouches[0].pageY is 10 +PASS lastEvent.targetTouches[0].clientX is 10 +PASS lastEvent.targetTouches[0].clientY is 10 +PASS lastEvent.targetTouches[0].identifier is 0 +PASS lastEvent.type is "touchmove" +PASS lastEvent.touches.length is 1 +PASS lastEvent.changedTouches.length is 1 +PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.touches[0].pageX is 20 +PASS lastEvent.touches[0].pageY is 15 +PASS lastEvent.touches[0].clientX is 20 +PASS lastEvent.touches[0].clientY is 15 +PASS lastEvent.touches[0].identifier is 0 +PASS lastEvent.shiftKey is true +PASS lastEvent.altKey is true +PASS lastEvent.ctrlKey is false +PASS lastEvent.metaKey is false +PASS lastEvent.type is "touchend" +PASS lastEvent.touches.length is 0 +PASS lastEvent.changedTouches.length is 1 +PASS lastEvent.targetTouches.length is 0 +PASS lastEvent.changedTouches[0].pageX is 20 +PASS lastEvent.changedTouches[0].pageY is 15 +PASS lastEvent.changedTouches[0].clientX is 20 +PASS lastEvent.changedTouches[0].clientY is 15 +PASS lastEvent.changedTouches[0].identifier is 0 +PASS lastEvent.shiftKey is false +PASS lastEvent.altKey is false +PASS lastEvent.type is "touchstart" +PASS lastEvent.touches.length is 1 +PASS lastEvent.changedTouches.length is 1 +PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.targetTouches[0].target.tagName is "DIV" +PASS lastEvent.type is "touchmove" +PASS lastEvent.touches.length is 1 +PASS lastEvent.changedTouches.length is 1 +PASS lastEvent.targetTouches.length is 0 +PASS lastEvent.touches[0].target.tagName is "HTML" +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/events/touch/basic-single-touch-events.html b/LayoutTests/fast/events/touch/basic-single-touch-events.html new file mode 100644 index 0000000..4f870f4 --- /dev/null +++ b/LayoutTests/fast/events/touch/basic-single-touch-events.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> +<head> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +<script src="../../js/resources/js-test-post-function.js"></script> +</head> +<body> +<p id="description"></p> +<div id="console"></div> +<script src="script-tests/basic-single-touch-events.js"></script> +</body> +</html> diff --git a/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js new file mode 100644 index 0000000..abfaf90 --- /dev/null +++ b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js @@ -0,0 +1,115 @@ +var div = document.createElement("div"); +div.id = "touchtarget"; +div.style.width = "100px"; +div.style.height = "100px"; +div.style.backgroundColor = "blue"; + +var lastEvent = null; +var touchEventsReceived = 0; +var EXPECTED_TOUCH_EVENTS_TOTAL = 4; + +function touchEventCallback() { + if (window.eventSender) { + lastEvent = event; + verifyTouch(touchEventsReceived++); + } else { + debug(event.type); + } + + if (window.layoutTestController && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) { + // If we've got here, we can safely say we were successfully parsed :) We need to + // call the isSucccessfullyParsed function to output the correct TEST COMPLETE + // footer message. + successfullyParsed = true; + isSuccessfullyParsed(); + layoutTestController.notifyDone(); + } +} + +div.addEventListener("touchstart", touchEventCallback, false); +div.addEventListener("touchmove", touchEventCallback, false); +div.addEventListener("touchend", touchEventCallback, false); +document.body.insertBefore(div, document.body.firstChild); + +function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount) +{ + shouldBeEqualToString("lastEvent.type", type); + shouldBe("lastEvent.touches.length", totalTouchCount.toString()); + shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); + shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); +} + +function verifyTouchPoint(list, point, x, y, id) +{ + shouldBe("lastEvent." + list + "[" + point + "].pageX", x.toString()); + shouldBe("lastEvent." + list + "[" + point + "].pageY", y.toString()); + shouldBe("lastEvent." + list + "[" + point + "].clientX", x.toString()); + shouldBe("lastEvent." + list + "[" + point + "].clientY", y.toString()); + shouldBe("lastEvent." + list + "[" + point + "].identifier", id.toString()); +} + +function verifyTouch(which) { + switch (which) { + case 0: + verifyTouchEvent("touchstart", 2, 2, 2); + verifyTouchPoint("touches", 0, 10, 10, 0); + verifyTouchPoint("touches", 1, 20, 30, 1); + verifyTouchPoint("changedTouches", 0, 10, 10, 0); + verifyTouchPoint("changedTouches", 1, 20, 30, 1); + verifyTouchPoint("targetTouches", 0, 10, 10, 0); + verifyTouchPoint("targetTouches", 1, 20, 30, 1); + break; + case 1: + verifyTouchEvent("touchmove", 2, 1, 2); + verifyTouchPoint("touches", 0, 15, 15, 0); + verifyTouchPoint("changedTouches", 0, 15, 15, 0); + verifyTouchPoint("touches", 1, 20, 30, 1); + break; + case 2: + verifyTouchEvent("touchend", 1, 1, 1); + verifyTouchPoint("touches", 0, 20, 30, 1); + verifyTouchPoint("changedTouches", 0, 15, 15, 0); + verifyTouchPoint("targetTouches", 0, 20, 30, 1); + break; + case 3: + verifyTouchEvent("touchend", 0, 1, 0); + verifyTouchPoint("changedTouches", 0, 20, 30, 1); + break; + + default: testFailed("Wrong number of touch events! (" + which + ")"); + } +} + +function multiTouchSequence() +{ + debug("multi touch sequence"); + + debug("Two touchpoints pressed"); + eventSender.addTouchPoint(10, 10); + eventSender.addTouchPoint(20, 30); + eventSender.touchStart(); + + debug("First touchpoint moved"); + eventSender.updateTouchPoint(0, 15, 15); + eventSender.touchMove(); + + debug("First touchpoint is released"); + eventSender.releaseTouchPoint(0); + eventSender.touchEnd(); + + debug("Last remaining touchpoint is released"); + eventSender.releaseTouchPoint(0); + eventSender.touchEnd(); +} + +if (window.eventSender) { + description("This tests basic multi touch event support."); + + lastEvent = null; + eventSender.clearTouchPoints(); + multiTouchSequence(); +} else { + debug("This test requires DumpRenderTree. Tap on the blue rect to log.") +} + +var successfullyParsed = true; diff --git a/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js b/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js new file mode 100644 index 0000000..ca99d83 --- /dev/null +++ b/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js @@ -0,0 +1,132 @@ +var div = document.createElement("div"); +div.id = "touchtarget"; +div.style.width = "100px"; +div.style.height = "100px"; +div.style.backgroundColor = "blue"; + +var lastEvent = null; +var touchEventsReceived = 0; +var EXPECTED_TOUCH_EVENTS_TOTAL = 5; + +function touchEventCallback() { + if (window.eventSender) { + lastEvent = event; + verifyTouch(touchEventsReceived++); + } else { + debug(event.type); + } + + if (window.layoutTestController && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) { + // If we've got here, we can safely say we were successfully parsed :) We need to + // call the isSucccessfullyParsed function to output the correct TEST COMPLETE + // footer message. + successfullyParsed = true; + isSuccessfullyParsed(); + layoutTestController.notifyDone(); + } +} + +div.addEventListener("touchstart", touchEventCallback, false); +div.addEventListener("touchmove", touchEventCallback, false); +div.addEventListener("touchend", touchEventCallback, false); +document.body.insertBefore(div, document.body.firstChild); + +function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount) +{ + shouldBeEqualToString("lastEvent.type", type); + shouldBe("lastEvent.touches.length", totalTouchCount.toString()); + shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); + shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); +} + +function verifyTouchPoint(list, point, x, y, id) +{ + shouldBe("lastEvent." + list + "[" + point + "].pageX", x.toString()); + shouldBe("lastEvent." + list + "[" + point + "].pageY", y.toString()); + shouldBe("lastEvent." + list + "[" + point + "].clientX", x.toString()); + shouldBe("lastEvent." + list + "[" + point + "].clientY", y.toString()); + shouldBe("lastEvent." + list + "[" + point + "].identifier", id.toString()); +} + +function verifyTouch(which) { + switch (which) { + case 0: + verifyTouchEvent("touchstart", 1, 1, 1); + shouldBe("lastEvent.shiftKey", "false"); + shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget"); + verifyTouchPoint("touches", 0, 10, 10, 0); + verifyTouchPoint("changedTouches", 0, 10, 10, 0); + verifyTouchPoint("targetTouches", 0, 10, 10, 0); + break; + case 1: + verifyTouchEvent("touchmove", 1, 1, 1); + verifyTouchPoint("touches", 0, 20, 15, 0); + shouldBe("lastEvent.shiftKey", "true"); + shouldBe("lastEvent.altKey", "true"); + shouldBe("lastEvent.ctrlKey", "false"); + shouldBe("lastEvent.metaKey", "false"); + break; + case 2: + verifyTouchEvent("touchend", 0, 1, 0); + verifyTouchPoint("changedTouches", 0, 20, 15, 0); + shouldBe("lastEvent.shiftKey", "false"); + shouldBe("lastEvent.altKey", "false"); + break; + case 3: + verifyTouchEvent("touchstart", 1, 1, 1); + shouldBeEqualToString("lastEvent.targetTouches[0].target.tagName", "DIV"); + break; + case 4: + verifyTouchEvent("touchmove", 1, 1, 0); + shouldBeEqualToString("lastEvent.touches[0].target.tagName", "HTML"); + break; + + default: testFailed("Wrong number of touch events! (" + which + ")"); + } +} + +function singleTouchSequence() +{ + eventSender.addTouchPoint(10, 10); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 20, 15); + eventSender.setTouchModifier("shift", true); + eventSender.setTouchModifier("alt", true); + eventSender.touchMove(); + + eventSender.setTouchModifier("shift", false); + eventSender.setTouchModifier("alt", false); + + eventSender.releaseTouchPoint(0); + eventSender.touchEnd(); +} + +function touchTargets() +{ + eventSender.addTouchPoint(10, 10); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 1000, 1000); + eventSender.touchMove(); +} + +if (window.layoutTestController) + layoutTestController.waitUntilDone(); + +if (window.eventSender) { + description("This tests basic single touch event support."); + + lastEvent = null; + eventSender.clearTouchPoints(); + singleTouchSequence(); + + lastEvent = null; + eventSender.clearTouchPoints(); + touchTargets(); + +} else { + debug("This test requires DumpRenderTree. Tap on the blue rect to log.") +} + + diff --git a/LayoutTests/fast/events/touch/script-tests/basic-touch-events.js b/LayoutTests/fast/events/touch/script-tests/basic-touch-events.js deleted file mode 100644 index 6766abc..0000000 --- a/LayoutTests/fast/events/touch/script-tests/basic-touch-events.js +++ /dev/null @@ -1,154 +0,0 @@ -description = "This tests basic touch event support."; - -var div = document.createElement("div"); -div.id = "touchtarget"; -div.style.width = "100px"; -div.style.height = "100px"; -div.style.backgroundColor = "blue"; - -var lastEvent = null; - -function appendEventLog() { - if (window.eventSender) { - lastEvent = event; - } else { - debug(event.type); - } -} - -div.addEventListener("touchstart", appendEventLog, false); -div.addEventListener("touchmove", appendEventLog, false); -div.addEventListener("touchend", appendEventLog, false); -document.body.insertBefore(div, document.body.firstChild); - -function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount) -{ - shouldBeEqualToString("lastEvent.type", type); - shouldBe("lastEvent.touches.length", totalTouchCount.toString()); - shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); - shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); -} - -function verifyTouchPoint(list, point, x, y, id) -{ - shouldBe("lastEvent." + list + "[" + point + "].pageX", x.toString()); - shouldBe("lastEvent." + list + "[" + point + "].pageY", y.toString()); - shouldBe("lastEvent." + list + "[" + point + "].clientX", x.toString()); - shouldBe("lastEvent." + list + "[" + point + "].clientY", y.toString()); - shouldBe("lastEvent." + list + "[" + point + "].identifier", id.toString()); -} - -function singleTouchSequence() -{ - debug("single touch sequence"); - - eventSender.addTouchPoint(10, 10); - eventSender.touchStart(); - - verifyTouchEvent("touchstart", 1, 1, 1); - shouldBe("lastEvent.shiftKey", "false"); - shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget"); - verifyTouchPoint("touches", 0, 10, 10, 0); - verifyTouchPoint("changedTouches", 0, 10, 10, 0); - verifyTouchPoint("targetTouches", 0, 10, 10, 0); - - eventSender.updateTouchPoint(0, 20, 15); - eventSender.setTouchModifier("shift", true); - eventSender.setTouchModifier("alt", true); - eventSender.touchMove(); - - verifyTouchEvent("touchmove", 1, 1, 1); - verifyTouchPoint("touches", 0, 20, 15, 0); - shouldBe("lastEvent.shiftKey", "true"); - shouldBe("lastEvent.altKey", "true"); - shouldBe("lastEvent.ctrlKey", "false"); - shouldBe("lastEvent.metaKey", "false"); - - eventSender.setTouchModifier("shift", false); - eventSender.setTouchModifier("alt", false); - - eventSender.releaseTouchPoint(0); - eventSender.touchEnd(); - - verifyTouchEvent("touchend", 0, 1, 0); - verifyTouchPoint("changedTouches", 0, 20, 15, 0); - shouldBe("lastEvent.shiftKey", "false"); - shouldBe("lastEvent.altKey", "false"); -} - -function multiTouchSequence() -{ - debug("multi touch sequence"); - - debug("Two touchpoints pressed"); - eventSender.addTouchPoint(10, 10); - eventSender.addTouchPoint(20, 30); - eventSender.touchStart(); - verifyTouchEvent("touchstart", 2, 2, 2); - verifyTouchPoint("touches", 0, 10, 10, 0); - verifyTouchPoint("touches", 1, 20, 30, 1); - verifyTouchPoint("changedTouches", 0, 10, 10, 0); - verifyTouchPoint("changedTouches", 1, 20, 30, 1); - verifyTouchPoint("targetTouches", 0, 10, 10, 0); - verifyTouchPoint("targetTouches", 1, 20, 30, 1); - - debug("First touchpoint moved"); - eventSender.updateTouchPoint(0, 15, 15); - eventSender.touchMove(); - verifyTouchEvent("touchmove", 2, 1, 2); - verifyTouchPoint("touches", 0, 15, 15, 0); - verifyTouchPoint("changedTouches", 0, 15, 15, 0); - verifyTouchPoint("touches", 1, 20, 30, 1); - - debug("First touchpoint is released"); - eventSender.releaseTouchPoint(0); - eventSender.touchEnd(); - verifyTouchEvent("touchend", 1, 1, 1); - verifyTouchPoint("touches", 0, 20, 30, 1); - verifyTouchPoint("changedTouches", 0, 15, 15, 0); - verifyTouchPoint("targetTouches", 0, 20, 30, 1); - - debug("Last remaining touchpoint is released"); - eventSender.releaseTouchPoint(0); - eventSender.touchEnd(); - verifyTouchEvent("touchend", 0, 1, 0); - verifyTouchPoint("changedTouches", 0, 20, 30, 1); -} - -function touchTargets() -{ - debug("verify touch targets"); - - eventSender.addTouchPoint(10, 10); - eventSender.touchStart(); - - verifyTouchEvent("touchstart", 1, 1, 1); - shouldBeEqualToString("lastEvent.targetTouches[0].target.tagName", "DIV"); - - eventSender.updateTouchPoint(0, 1000, 1000); - eventSender.touchMove(); - - verifyTouchEvent("touchmove", 1, 1, 0); - shouldBeEqualToString("lastEvent.touches[0].target.tagName", "HTML"); -} - -if (window.eventSender) { - debug(description); - - lastEvent = null; - eventSender.clearTouchPoints(); - singleTouchSequence(); - - lastEvent = null; - eventSender.clearTouchPoints(); - multiTouchSequence(); - - lastEvent = null; - eventSender.clearTouchPoints(); - touchTargets(); - -} else { - debug("This test requires DumpRenderTree. Tap on the blue rect to log.") -} - -var successfullyParsed = true; diff --git a/LayoutTests/platform/android-v8/storage/statement-error-callback-expected.txt b/LayoutTests/platform/android-v8/storage/statement-error-callback-expected.txt index 44eef7a..8d35ed9 100644 --- a/LayoutTests/platform/android-v8/storage/statement-error-callback-expected.txt +++ b/LayoutTests/platform/android-v8/storage/statement-error-callback-expected.txt @@ -1,5 +1,10 @@ -CONSOLE MESSAGE: line 54: Uncaught Exception in Statement error callback -This test confirms that if the statement error callback returns true or throws an exception we do not execute any further statements in that transaction and instead execute the transaction error callback immediately. +CONSOLE MESSAGE: line 75: Uncaught Exception in statement error callback +This test confirms that a transaction is immediately rolled back if and only if a statement's error callback throws an exception, returns true, or doesn't return any value. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. PASS - the transaction error callback was invoked. PASS - the transaction error callback was invoked. Test Complete diff --git a/LayoutTests/storage/database-lock-after-reload.html b/LayoutTests/storage/database-lock-after-reload.html index ad34d5b..8bdaddc 100644 --- a/LayoutTests/storage/database-lock-after-reload.html +++ b/LayoutTests/storage/database-lock-after-reload.html @@ -28,7 +28,7 @@ function addData(db) // Insert a large amount of data that will take a little while to run. Schedule a timout to run that will load a new page // whilst the transaction is still in progress, interrupting the transaction. This should not leave the database locked and on // the next page we should be able to insert some more data. - tx.executeSql("INSERT INTO DataTest (testData) VALUES (randomBlob(524200 ))", [], function(tx, result) { }, errorFunction); + tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))", [], function(tx, result) { }, errorFunction); location.href = "./resources/database-lock-after-reload-2.html"; }, errorFunction, function() { finishTest(); diff --git a/LayoutTests/storage/null-callbacks-expected.txt b/LayoutTests/storage/null-callbacks-expected.txt new file mode 100644 index 0000000..8311675 --- /dev/null +++ b/LayoutTests/storage/null-callbacks-expected.txt @@ -0,0 +1,2 @@ +This test checks that 'null' can be used wherever we expect an optional callback. +PASS diff --git a/LayoutTests/storage/null-callbacks.html b/LayoutTests/storage/null-callbacks.html new file mode 100644 index 0000000..4ca0e1c --- /dev/null +++ b/LayoutTests/storage/null-callbacks.html @@ -0,0 +1,46 @@ +<html> +<head> +<script> +function finishTest() +{ + if (window.layoutTestController) + layoutTestController.notifyDone(); +} + +function runTest() +{ + if (window.layoutTestController) { + layoutTestController.clearAllDatabases(); + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); + } + + try { + var db = openDatabase("NullCallbacks", "1.0", "Test for null callbacks.", 1); + db.transaction(function(tx) { + tx.executeSql("CREATE TABLE IF NOT EXISTS Test (Foo INT)", null); + tx.executeSql("INSERT INTO Test VALUES (?)", [1], null, null); + tx.executeSql("INSERT INTO Test VALUES (?)", [2], null); + tx.executeSql("INSERT INTO Test VALUES (3)", null, null, null); + tx.executeSql("INSERT INTO Test VALUES (?)", [4], null, + function(tx, error) {}); + }, null, null); + + db.transaction(function(tx) { + tx.executeSql("INSERT INTO Test VALUES (?)", [5]); + }, null, function() { finishTest(); }); + } catch(err) { + document.getElementById("console").innerHTML = "FAIL"; + finishTest(); + } +} + +</script> +</head> + +<body onload="runTest()"> +This test checks that 'null' can be used wherever we expect an optional callback. +<pre id="console">PASS</pre> +</body> + +</html> diff --git a/LayoutTests/storage/private-browsing-readonly.html b/LayoutTests/storage/private-browsing-readonly.html index 70a209a..972b123 100644 --- a/LayoutTests/storage/private-browsing-readonly.html +++ b/LayoutTests/storage/private-browsing-readonly.html @@ -46,6 +46,7 @@ function privateBrowsingErrorFunction(tx, error) { ++completed; writeMessageToLog("Private browsing statement " + completed + " completed with an error\n" + error.message); + return false; } function runSetup(transaction) diff --git a/LayoutTests/storage/quota-tracking.html b/LayoutTests/storage/quota-tracking.html index fb2cc9e..2b5b49d 100644 --- a/LayoutTests/storage/quota-tracking.html +++ b/LayoutTests/storage/quota-tracking.html @@ -1,9 +1,9 @@ <html> <head> <script> -var database1; -var database2; -var database3; +var database1 = null; +var database2 = null; +var database3 = null; function log(message) { @@ -39,13 +39,15 @@ function checkCompletion(db) { log("Done adding data"); - db.complete = true; - if (database1.complete && database2.complete && database3.complete) + if (database3) { finishTest(); - else if (database2.complete) + } else if (database2) { + database3 = openDatabase("QuotaManagementDatabase3", "1.0", "Test for quota management <rdar://5628468>", 1); testDatabase(database3); - else + } else { + database2 = openDatabase("QuotaManagementDatabase2", "1.0", "Test for quota management <rdar://5628468>", 1); testDatabase(database2); + } } function addData(db) @@ -95,12 +97,6 @@ function runTest() } database1 = openDatabase("QuotaManagementDatabase1", "1.0", "Test for quota management <rdar://5628468>", 1); - database2 = openDatabase("QuotaManagementDatabase2", "1.0", "Test for quota management <rdar://5628468>", 1); - database3 = openDatabase("QuotaManagementDatabase3", "1.0", "Test for quota management <rdar://5628468>", 1); - database1.complete = false; - database2.complete = false; - database3.complete = false; - testDatabase(database1); } diff --git a/LayoutTests/storage/statement-error-callback-expected.txt b/LayoutTests/storage/statement-error-callback-expected.txt index ca117a8..791dfb6 100644 --- a/LayoutTests/storage/statement-error-callback-expected.txt +++ b/LayoutTests/storage/statement-error-callback-expected.txt @@ -1,5 +1,10 @@ -CONSOLE MESSAGE: line 0: Exception in Statement error callback -This test confirms that if the statement error callback returns true or throws an exception we do not execute any further statements in that transaction and instead execute the transaction error callback immediately. +CONSOLE MESSAGE: line 0: Exception in statement error callback +This test confirms that a transaction is immediately rolled back if and only if a statement's error callback throws an exception, returns true, or doesn't return any value. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. +PASS - the transaction error callback was invoked. PASS - the transaction error callback was invoked. PASS - the transaction error callback was invoked. Test Complete diff --git a/LayoutTests/storage/statement-error-callback.html b/LayoutTests/storage/statement-error-callback.html index 3675548..060a881 100644 --- a/LayoutTests/storage/statement-error-callback.html +++ b/LayoutTests/storage/statement-error-callback.html @@ -15,7 +15,8 @@ function finishTest() } var txCallbackCount = 0; -var NUMBER_OF_TRANSACTIONS = 2; +var NUMBER_OF_TRANSACTIONS = 7; +var database; function transactionErrorFunction(error) { @@ -31,6 +32,22 @@ function transactionSuccessFunction(message) finishTest(); } +function runTransactionExpectedToFail(statementErrorCallback) +{ + database.transaction(function(tx) { + tx.executeSql("CREATE TABLE IF NOT EXISTS StatementErrorCallbackTest (randomData)"); + tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test']); + tx.executeSql("THIS STATEMENT WILL FAIL", [], + function(tx, data) { + log("FAIL - this statement should have failed"); + finishTest(); + }, statementErrorCallback); + tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test1'], + function(error) { log("FAIL - This statement should not have been executed"); }, + function() { log("FAIL - This statement should not have been executed"); }); + }, transactionErrorFunction, transactionSuccessFunction); +} + function runTest() { if (window.layoutTestController) { @@ -38,29 +55,36 @@ function runTest() layoutTestController.dumpAsText(); layoutTestController.waitUntilDone(); } - - var database = openDatabase("bug-28872", "1.0", "statement error callback test", 1024); - - database.transaction(function(tx) { - tx.executeSql("CREATE TABLE IF NOT EXISTS StatementErrorCallbackTest (randomData)"); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test']); - tx.executeSql("THIS STATEMENT WILL FAIL", [], function(message) { log("FAIL - this statement should have failed"); finishTest(); }, function(error) { return true; }); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test1'], function(message) { log("FAIL - This statement should not have been executed"); }, function(message) { log("FAIL - This statement should not have been executed"); }); - }, transactionErrorFunction, transactionSuccessFunction); - database.transaction(function(tx) { + database = openDatabase("bug-28872", "1.0", "statement error callback test", 1024); + database.transaction(function(tx) { tx.executeSql("CREATE TABLE IF NOT EXISTS StatementErrorCallbackTest (randomData)"); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test']); - tx.executeSql("THIS STATEMENT WILL FAIL", [], function(message) { log("FAIL - this statement should have failed"); finishTest(); }, function(error) { throw "Exception in Statement error callback"; return false; }); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test1'], function(message) { log("FAIL - This statement should not have been executed"); }, function(message) { log("FAIL - This statement should not have been executed"); }); - }, transactionErrorFunction, transactionSuccessFunction); + tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test']); + tx.executeSql("THIS STATEMENT WILL FAIL", [], + function(tx, data) { + log("FAIL - this statement should have failed"); + finishTest(); + }, function(tx, error) { return false; }); + tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test1'], + function(tx, data) { }, + function(tx, error) { log("FAIL - This statement should not have caused an error"); }); + }, function(error) { log("FAIL - The transaction error callback should not have been invoked"); }, + function() { }); + + runTransactionExpectedToFail(function(error) { return true; }); + runTransactionExpectedToFail(function(error) { throw "Exception in statement error callback"; return false; }); + runTransactionExpectedToFail(function(error) {}); + runTransactionExpectedToFail(function(error) { return null; }); + runTransactionExpectedToFail(function(error) { return "some string"; }); + runTransactionExpectedToFail(function(error) { return 1234; }); + runTransactionExpectedToFail(function(error) { return {a: 2, b: "abc"}; }); } </script> </head> <body onload="runTest()"> -This test confirms that if the statement error callback returns true or throws an exception we do not execute any further statements in that transaction and instead execute the transaction error callback immediately. +This test confirms that a transaction is immediately rolled back if and only if a statement's error callback throws an exception, returns true, or doesn't return any value. <pre id="console"> </pre> </body> diff --git a/WEBKIT_MERGE_REVISION b/WEBKIT_MERGE_REVISION index c4b8c03..17cb9bb 100644 --- a/WEBKIT_MERGE_REVISION +++ b/WEBKIT_MERGE_REVISION @@ -1,4 +1,4 @@ We use a WebKit revision that has been used for a Chromium release. -http://src.chromium.org/svn/releases/5.0.328.0/DEPS -http://svn.webkit.org/repository/webkit/trunk@54731 +http://src.chromium.org/svn/releases/5.0.335.0/DEPS +http://svn.webkit.org/repository/webkit/trunk@55033 diff --git a/WebCore/Android.mk b/WebCore/Android.mk index 9af1bae..f6576ae 100644 --- a/WebCore/Android.mk +++ b/WebCore/Android.mk @@ -646,6 +646,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ rendering/RenderSVGInline.cpp \ rendering/RenderSVGInlineText.cpp \ rendering/RenderSVGModelObject.cpp \ + rendering/RenderSVGResourceMasker.cpp \ rendering/RenderSVGRoot.cpp \ rendering/RenderSVGShadowTreeRootContainer.cpp \ rendering/RenderSVGTSpan.cpp \ @@ -901,7 +902,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ svg/graphics/SVGResourceClipper.cpp \ svg/graphics/SVGResourceFilter.cpp \ svg/graphics/SVGResourceMarker.cpp \ - svg/graphics/SVGResourceMasker.cpp \ \ svg/graphics/filters/SVGFEConvolveMatrix.cpp \ svg/graphics/filters/SVGFEDiffuseLighting.cpp \ diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 5a13318..01d1a54 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,2863 @@ +2010-02-19 Dirk Schulze <krit@webkit.org> + + Reviewed by Nikolas Zimmermann. + + RenderSVGResourceMasker causes an Assert on Wind builds during DRT + https://bugs.webkit.org/show_bug.cgi?id=35182 + + We remove the Assert for now and return earlier, if the HashMap of the Masker + does not contain the RenderObject. The RenderObject is an identifiert to get + a already calculated mask. + A race condition during parsing can cause the invalidation call, before the mask + got calculated (only during DRT on Win build bots). + The real bug will be fixed with: https://bugs.webkit.org/show_bug.cgi?id=35181 + + * rendering/RenderSVGResourceMasker.cpp: + (WebCore::RenderSVGResourceMasker::invalidateClient): + +2010-02-18 Peter Kasting <pkasting@google.com> + + Reviewed by Darin Fisher. + + Make Pasteboard::writeImage() safe against NULL cachedImages, and clean + up some code. + https://bugs.webkit.org/show_bug.cgi?id=35136 + + * loader/ImageLoader.cpp: + (WebCore::ImageLoader::updateRenderer): Shorten some code. + * page/DragController.cpp: + (WebCore::getImage): Shorten some code. + * platform/chromium/PasteboardChromium.cpp: + (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). + * platform/gtk/PasteboardGtk.cpp: + (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). + * platform/mac/PasteboardMac.mm: + (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). + * platform/qt/PasteboardQt.cpp: + (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). + * platform/win/PasteboardWin.cpp: + (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). + +2010-02-19 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Rubberstamped by Noam Rosenthal, who wrote the original code. + + Make mouse wheel scrolling work when using the GraphicsLayer. + + * platform/graphics/qt/GraphicsLayerQt.cpp: + (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl): + +2010-02-19 Nate Chapin <japhet@chromium.org> + + Reviewed by Dimitri Glazkov. + + [V8] Fix Worker crash regression in r54972 + + https://bugs.webkit.org/show_bug.cgi?id=35166 + + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::instantiateV8Object): Properly unwrap global objects when inside a WorkerContext. + +2010-02-19 Steve Block <steveblock@google.com> + + Not reviewed. Reverts r55020 which causes crashes in Chromium LayoutTests + + * bindings/generic/RuntimeEnabledFeatures.cpp: + * storage/Database.cpp: + +2010-02-19 Steve Block <steveblock@google.com> + + Reviewed by David Levin. + + Sets default values of V8 runtime enabler flags to match behavior with JSC + https://bugs.webkit.org/show_bug.cgi?id=35095 + + No new tests, modifies a Chromium feature only. + + * bindings/generic/RuntimeEnabledFeatures.cpp: Modified. Sets appcache and geolocation flag defaults to 'on' + * storage/Database.cpp: Modified. Sets database flag default to 'on'. + +2010-02-19 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Pavel Feldman. + + WebInspector: Elements panel: Correctly show empty elements' ending tags + for XML and HTML documents. + https://bugs.webkit.org/show_bug.cgi?id=26315 + + Test: inspector/elements-panel-xhtml-structure.xhtml + + * inspector/InspectorController.cpp: + (WebCore::InspectorController::populateScriptObjects): + * inspector/front-end/ElementsTreeOutline.js: + (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode): + (WebInspector.ElementsTreeOutline.prototype.get isXMLMimeType): + (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired): + (WebInspector.ElementsTreeElement.prototype.onexpand): + (WebInspector.ElementsTreeElement.prototype.oncollapse): + (WebInspector.ElementsTreeElement.prototype.updateTitle.callback): + (WebInspector.ElementsTreeElement.prototype.updateTitle): + (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo): + +2010-02-19 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed. Chromium build fix: reverting r54997 and r54998. + + * bindings/v8/custom/V8LocationCustom.cpp: + (WebCore::V8Location::protocolAccessorSetter): + * platform/KURLGoogle.cpp: + (WebCore::KURL::setProtocol): + (WebCore::KURL::isHierarchical): + +2010-02-17 Philippe Normand <pnormand@igalia.com> + + Reviewed by Eric Seidel. + + [GTK] RTP/RTSP streams playback support + https://bugs.webkit.org/show_bug.cgi?id=33662 + + Added live pipelines support in updateStates(). + + * manual-tests/video-rtsp.html: Added. + * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: + (WebCore::MediaPlayerPrivate::seek): + (WebCore::MediaPlayerPrivate::updateStates): + +2010-02-18 Yaar Schnitman <yaar@chromium.org> + + Reviewed by Darin Adler. + + Normalize custom ctors for Image, Option, Audio + https://bugs.webkit.org/show_bug.cgi?id=34782 + + Test: fast/js/custom-constructors.html + + * bindings/js/JSAudioConstructor.cpp: + (WebCore::JSAudioConstructor::JSAudioConstructor): + (WebCore::constructAudio): + * bindings/js/JSImageConstructor.cpp: + (WebCore::constructImage): + * bindings/js/JSOptionConstructor.cpp: + (WebCore::constructHTMLOptionElement): + * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: + (WebCore::v8HTMLAudioElementConstructorCallback): + * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: + (WebCore::v8HTMLImageElementConstructorCallback): + * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: + (WebCore::v8HTMLOptionElementConstructorCallback): + * html/HTMLAudioElement.cpp: + (WebCore::HTMLAudioElement::HTMLAudioElement): + (WebCore::HTMLAudioElement::createForJSConstructor): + * html/HTMLAudioElement.h: + * html/HTMLImageElement.cpp: + (WebCore::HTMLImageElement::createForJSConstructor): + (WebCore::HTMLImageElement::mapToEntry): + (WebCore::HTMLImageElement::createRenderer): + (WebCore::HTMLImageElement::attach): + (WebCore::HTMLImageElement::width): + (WebCore::HTMLImageElement::height): + (WebCore::HTMLImageElement::naturalHeight): + * html/HTMLImageElement.h: + * html/HTMLOptionElement.cpp: + (WebCore::HTMLOptionElement::HTMLOptionElement): + (WebCore::HTMLOptionElement::createForJSConstructor): + (WebCore::HTMLOptionElement::ownerSelectElement): + (WebCore::HTMLOptionElement::nonRendererRenderStyle): + (WebCore::HTMLOptionElement::disabled): + (WebCore::HTMLOptionElement::insertedIntoTree): + * html/HTMLOptionElement.h: + +2010-02-12 Brett Wilson <brettw@chromium.org> + + Reviewed by Adam Barth. + + Update the Google-URL version of KURL and the V8 bindings to the new + behavior of KURL.IsStandard. + + https://bugs.webkit.org/show_bug.cgi?id=34859 + + This is covered by fast/dom/Window/invalid-protocol.html + + * bindings/v8/custom/V8LocationCustom.cpp: + (WebCore::V8Location::protocolAccessorSetter): + * platform/KURLGoogle.cpp: + (WebCore::KURL::setProtocol): + (WebCore::KURL::isHierarchical): + +2010-02-18 Simon Fraser <simon.fraser@apple.com> + + No Review. + + Remove a couple of extraneous spaces that got added to the project file + by hand-ending. + + * WebCore.xcodeproj/project.pbxproj: + +2010-02-18 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7535894> Page contents missing from snapshot on Newsweek.com article + + Add logic to determine when painting via the software rendering path will give an equivalent + result to the accelerated compositing presentation. This tests for the presence of 3D transforms + via the existing RenderLayerCompositor::has3DContent() method. + + * WebCore.base.exp: Export FrameView's isSoftwareRenderable(), paintBehavior() and setPaintBehavior(). + * page/FrameView.h: + * page/FrameView.cpp: + (WebCore::FrameView::isSoftwareRenderable): New method. + (WebCore::FrameView::paintBehavior): Make this non-inline so that we can reliably export it. + +2010-02-18 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + <rdar://problem/7658811> Multiple style recalcs due to getComputedStyle() on “display: none;” element + when there are pending style sheets + + Test: fast/css/getComputedStyle/pending-stylesheet.html + + When querying a property of a computed style declaration for a non-rendered element, + CSSStyleSelector::styleForElement() was called, and if there were pending style sheet, it + would behave as if the lack of renderer is due to FOUC suppression, and set a flag on + the document causing it to recalculate style. On the next computed style property access, + style would be recalculated for the document, but then the flag would get set again if the + element did not have a renderer. + + * dom/Document.cpp: + (WebCore::Document::styleForElementIgnoringPendingStylesheets): Added. Temporarily sets + m_ignorePendingStylesheets around the call to CSSStyleSelector::styleForElement(). + * dom/Document.h: + * dom/Element.cpp: + (WebCore::Element::computedStyle): Use Document::styleForElementIgnoringPendingStylesheets(). + +2010-02-18 Dirk Schulze <krit@webkit.org> + + Reviewed by Nikolas Zimmermann. + + Move SVGResources to Renderers, starting with Masker + https://bugs.webkit.org/show_bug.cgi?id=35020 + + We have rendering specific code in WebCore/svg/graphics. The goal is to move + this code into suitable Renderers. This helps us to clean up the code and makes + maintenance easier. It also makes it possible to remove rendering specific code + from SVG*Elements into this renderers. So the Renderer contains everything that + is needed to use the resource. + RenderSVGResource will be the base class for all new resource render classes like + RenderSVGResourceMasker, RenderSVGResourceClipper and the other resources. + + This patch starts moving SVGResourceMasker to RenderSVGResourceMasker. + Another benefit is the much more useful result in DRT on using masker. + + * Android.mk: + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * rendering/RenderObject.cpp: + (WebCore::RenderObject::toRenderSVGResource): Conversion to RenderSVGResource base class. + * rendering/RenderObject.h: + (WebCore::RenderObject::isSVGResource): Check if renderer is a resource. + * rendering/RenderPath.cpp: + * rendering/RenderSVGImage.cpp: + (WebCore::RenderSVGImage::destroy): Renderer gets destroyed, unregister it from it's resources. + * rendering/RenderSVGImage.h: Some code clean up according to the webkit style. + (WebCore::RenderSVGImage::toSVGRenderBase): + (WebCore::RenderSVGImage::renderName): + (WebCore::RenderSVGImage::isSVGImage): + (WebCore::RenderSVGImage::localToParentTransform): + (WebCore::RenderSVGImage::strokeBoundingBox): + (WebCore::RenderSVGImage::requiresLayer): + (WebCore::RenderSVGImage::localTransform): + * rendering/RenderSVGInlineText.h: + (WebCore::RenderSVGInlineText::objectBoundingBox): Needed for SVGRenderTreeAsText + * rendering/RenderSVGModelObject.cpp: + (WebCore::RenderSVGModelObject::destroy): Renderer gets destroyed, unregister it from it's resources. + * rendering/RenderSVGModelObject.h: + * rendering/RenderSVGResource.h: Added. + (WebCore::): Base class for all Resource renderers like masker, clipper and others. + (WebCore::RenderSVGResource::RenderSVGResource): + (WebCore::RenderSVGResource::cast): + (WebCore::RenderSVGResource::toRenderSVGResource): + (WebCore::RenderSVGResource::isSVGResource): + (WebCore::RenderSVGResource::drawsContents): + (WebCore::getRenderSVGResourceById): + * rendering/RenderSVGResourceMasker.cpp: Added. + (WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker): + (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker): + (WebCore::RenderSVGResourceMasker::invalidateClients): Status of masker changed, remove all clients. + (WebCore::RenderSVGResourceMasker::invalidateClient): Status of an object changed, remove pending client. + (WebCore::RenderSVGResourceMasker::applyResource): Apply masker to object. + (WebCore::RenderSVGResourceMasker::resourceBoundingBox): boundingBox of the resource, depending on the object. + (WebCore::RenderSVGResourceMasker::createMaskImage): Creates the mask image, the context gets clipped with. + * rendering/RenderSVGResourceMasker.h: Added. + (WebCore::MaskerData::MaskerData): + (WebCore::RenderSVGResourceMasker::renderName): + (WebCore::RenderSVGResourceMasker::maskUnits): Unit of mask for DRT. + (WebCore::RenderSVGResourceMasker::maskContentUnits): Unit of childs from mask for DRT. + (WebCore::RenderSVGResourceMasker::resourceType): + * rendering/RenderSVGRoot.cpp: + (WebCore::RenderSVGRoot::destroy): Renderer gets destroyed, unregister it from it's resources. + * rendering/RenderSVGRoot.h: + * rendering/RenderSVGText.cpp: + (WebCore::RenderSVGText::destroy): dito. + * rendering/RenderSVGText.h: + * rendering/RenderTreeAsText.cpp: + (WebCore::write): + * rendering/SVGRenderSupport.cpp: + (WebCore::SVGRenderBase::prepareToRenderSVGContent): + (WebCore::SVGRenderBase::maskerBoundingBoxForRenderer): + (WebCore::SVGRenderBase::deregisterFromResources): Unregister object from all it's resources after status changed. + * rendering/SVGRenderSupport.h: + (WebCore::SVGRenderBase::toSVGRenderBase): + (WebCore::SVGRenderBase::strokeBoundingBox): + (WebCore::SVGRenderBase::markerBoundingBox): + * rendering/SVGRenderTreeAsText.cpp: Update TreeAsText to dump maskers correctly. + (WebCore::operator<<): + (WebCore::writeSVGResource): + (WebCore::writeSVGContainer): + (WebCore::writeSVGText): + (WebCore::writeSVGInlineText): + (WebCore::writeSVGImage): + (WebCore::write): + (WebCore::writeResourcesToObject): + * rendering/SVGRenderTreeAsText.h: + * svg/SVGMaskElement.cpp: Update Masker to use the new renderer. + (WebCore::SVGMaskElement::svgAttributeChanged): + (WebCore::SVGMaskElement::childrenChanged): + (WebCore::SVGMaskElement::maskBoundingBox): + (WebCore::SVGMaskElement::createRenderer): + * svg/SVGMaskElement.h: + * svg/SVGStyledElement.cpp: We need to tell the renderer to unregister object, after the status changed. + (WebCore::SVGStyledElement::invalidateResources): + (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain): + * svg/SVGUnitTypes.h: Conversion of integer to SVGUnitType. + (WebCore::toUnitType): + * svg/graphics/SVGResource.h: + (WebCore::): + (WebCore::SVGResource::isMarker): + * svg/graphics/SVGResourceMasker.cpp: Removed. + * svg/graphics/SVGResourceMasker.h: Removed. + +2010-02-18 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Dimitri Glazkov. + + Allow creating/dropping virtual tables when the module is FTS2. + + https://bugs.webkit.org/show_bug.cgi?id=34867 + + * storage/DatabaseAuthorizer.cpp: + (WebCore::DatabaseAuthorizer::createVTable): + (WebCore::DatabaseAuthorizer::dropVTable): + +2010-02-18 Peter Kasting <pkasting@google.com> + + Not reviewed, Chromium build fix. + + r54963 had a typo in the WebCore.gypi change. + https://bugs.webkit.org/show_bug.cgi?id=35003 + + * WebCore.gypi: + +2010-02-18 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Simon Fraser. + + Changing forward declaration of TimingFunction in GraphicsLayer.h from + class to struct to match its actual definition in TimingFunction.h + + https://bugs.webkit.org/show_bug.cgi?id=35069 + + + * platform/graphics/GraphicsLayer.h: + Change forward declaration from: class TimingFunction to: + struct TimingFunction + +2010-02-18 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Minor improvement to hybrid QPixmap + https://bugs.webkit.org/show_bug.cgi?id=34507 + Instead of having toHTMLImageElement which creates a new element, + assignToHTMLImageElement would set an existing HTML <img/> element to + contain the native QPixmap/QImge. + Also made some style fixes. + + Additions to existing tests: see WebKit/qt/tests + + * bridge/qt/qt_pixmapruntime.cpp: + (JSC::Bindings::QtPixmapWidthField::valueFromInstance): style + (JSC::Bindings::QtPixmapHeightField::valueFromInstance): style + (JSC::Bindings::QtPixmapAssignToElementMethod::name): assignTo + (JSC::Bindings::QtPixmapAssignToElementMethod::invoke): new function + (JSC::Bindings::QtPixmapAssignToElementMethod::numParameters): 1 + (JSC::Bindings::QtPixmapToDataUrlMethod::invoke): style + (JSC::Bindings::QtPixmapToStringMethod::invoke): style + (JSC::Bindings::QtPixmapInstance::invokeMethod): style + (JSC::Bindings::QtPixmapClass::methodsNamed): new func, removed old + (JSC::Bindings::QtPixmapInstance::getPropertyNames): ditto + (JSC::Bindings::QtPixmapInstance::defaultValue): style + (JSC::Bindings::QtPixmapInstance::valueOf): style + (JSC::Bindings::QtPixmapInstance::toPixmap): style + (JSC::Bindings::QtPixmapInstance::variantFromObject): style + +2010-02-18 Peter Kasting <pkasting@google.com> + + Not reviewed, bustage fix. + + An extraneous line in r54839 broke GIF animation. + + * platform/image-decoders/gif/GIFImageReader.cpp: + (GIFImageReader::read): + +2010-02-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7650652> REGRESSION: Selection painting issue in bug review textbox + https://bugs.webkit.org/show_bug.cgi?id=34946 + + Test: fast/repaint/selection-gap-overflow-scroll-2.html + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::paintSelection): localToContainerQuad() adjusts for + overflow scroll, but RenderLayer::addBlockSelectionGapsBounds() takes + non-scrolled coordinates, so account for that. + +2010-02-17 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Darin Adler. + + Change the V8 and JSC SQLStatementErrorCallback to interpret + 'undefined' return values as 'true', as required by the spec. + + https://bugs.webkit.org/show_bug.cgi?id=35048 + + * bindings/js/JSCustomSQLStatementErrorCallback.cpp: + (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): + * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: + (WebCore::V8CustomSQLStatementErrorCallback::handleEvent): + * bindings/v8/custom/V8CustomVoidCallback.cpp: + (WebCore::invokeCallbackHelper): + (WebCore::invokeCallback): + (WebCore::invokeCallbackTreatUndefinedAsTrue): + * bindings/v8/custom/V8CustomVoidCallback.h: + +2010-02-17 Ojan Vafai <ojan@chromium.org> + + Reviewed by Adam Barth. + + keyboard selection sometimes moves the wrong end of the selection for Win/Linux + https://bugs.webkit.org/show_bug.cgi?id=35066 + + On Windows/Linux keyboard based selections should always move the same + end of the seleciton. On Mac, lineboundary and documentboundary changes + move different ends of the selection depending on which direction your + extending. + + Test: editing/selection/extend-after-mouse-selection.html + + * editing/SelectionController.cpp: + (WebCore::SelectionController::positionForPlatform): + (WebCore::SelectionController::startForPlatform): + (WebCore::SelectionController::endForPlatform): + (WebCore::SelectionController::modifyExtendingRight): + (WebCore::SelectionController::modifyExtendingForward): + (WebCore::SelectionController::modifyMovingForward): + (WebCore::SelectionController::modifyExtendingBackward): + (WebCore::SelectionController::modifyMovingBackward): + * editing/SelectionController.h: + +2010-02-18 Timothy Hatcher <timothy@apple.com> + + Add "with" to the list of keywords to syntax highlight. + + http://webkit.org/b/35123 + + Reviewed by Pavel Feldman. + + * inspector/front-end/SourceJavaScriptTokenizer.js: + (WebInspector.SourceJavaScriptTokenizer): Add "width" to _keywords. + * inspector/front-end/SourceJavaScriptTokenizer.re2js: + (WebInspector.SourceJavaScriptTokenizer): Ditto. + +2010-02-17 Peter Kasting <pkasting@google.com> + + Reviewed by Adam Barth. + + Rework PNG-in-ICO decoding to copy the decoded framebuffer into the ICO + decoder, making the logic less crazy and more like the other decoders. + https://bugs.webkit.org/show_bug.cgi?id=28751 + + * platform/image-decoders/ImageDecoder.cpp: + (WebCore::RGBA32Buffer::operator=): + * platform/image-decoders/ImageDecoder.h: + (WebCore::RGBA32Buffer::RGBA32Buffer): + * platform/image-decoders/ico/ICOImageDecoder.cpp: + (WebCore::ICOImageDecoder::frameBufferAtIndex): + (WebCore::ICOImageDecoder::decodeAtIndex): + * platform/image-decoders/ico/ICOImageDecoder.h: + * platform/image-decoders/qt/RGBA32BufferQt.cpp: + (WebCore::RGBA32Buffer::operator=): + * platform/image-decoders/skia/ImageDecoderSkia.cpp: + (WebCore::RGBA32Buffer::operator=): + +2010-02-18 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: multiple popovers on screen at the same time. + + https://bugs.webkit.org/show_bug.cgi?id=35105 + + * inspector/front-end/Popover.js: + (WebInspector.Popover.prototype.show): + (WebInspector.Popover.prototype.hide): + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype._showPopup): + +2010-02-18 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Expand Object.__proto__ properly. + + https://bugs.webkit.org/show_bug.cgi?id=35113 + + * inspector/front-end/EventListenersSidebarPane.js: + * inspector/front-end/InjectedScript.js: + (injectedScriptConstructor): + * inspector/front-end/ObjectProxy.js: + (WebInspector.ObjectProxy): + * inspector/front-end/PropertiesSidebarPane.js: + (WebInspector.PropertiesSidebarPane.prototype.update.callback): + * inspector/front-end/inspector.js: + (WebInspector.log.logMessage): + (WebInspector.log): + +2010-02-18 Nate Chapin <japhet@chromium.org> + + Reviewed by Adam Barth. + + [V8] Merge the DOMWindow and WorkerContext object wrapping code paths, + and use a faster method of disambiguating between the types of contexts. + + https://bugs.webkit.org/show_bug.cgi?id=35009 + + * bindings/scripts/CodeGeneratorV8.pm: Remove logic determining whether we need to + handle the WorkerContext case. + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::globalObjectPrototypeIsDOMWindow): + (WebCore::V8DOMWrapper::instantiateV8Object): Merge instantiateV8Object paths. + * bindings/v8/V8DOMWrapper.h: + +2010-02-18 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Remove some duplication between PluginView and Widget methods, and + move the setSelfVisible calls to the parent class. + + * platform/gtk/WidgetGtk.cpp: + (WebCore::Widget::show): + (WebCore::Widget::hide): + * plugins/gtk/PluginViewGtk.cpp: + (WebCore::PluginView::setFocus): + (WebCore::PluginView::show): + (WebCore::PluginView::hide): + +2010-02-18 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7655195> Switch Leopard back to using CGShading to avoid CGGradient leaks + + Define USE_CG_SHADING on for Tiger and Leopard, and use it to toggle the methods + used for Core Graphics gradient drawing. + + * platform/graphics/Gradient.h: + * platform/graphics/cg/GradientCG.cpp: + (WebCore::Gradient::platformDestroy): + (WebCore::Gradient::paint): + +2010-02-18 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: on-hover evaluation renders nodes and arrays as strings. + + https://bugs.webkit.org/show_bug.cgi?id=35103 + + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): + +2010-02-18 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Particularly constructed WebFrames can try to access a null HistoryItem + <rdar://problem/7638892> and https://bugs.webkit.org/show_bug.cgi?id=35063 + + Test: fast/loader/api-test-new-window-data-load-base-url.html + + * loader/HistoryController.cpp: + (WebCore::HistoryController::updateBackForwardListForFragmentScroll): We have a known case where a fragment scroll + might take place with a null m_currentItem. updateBackForwardListClippedAtTarget() will either move m_currentItem + to m_previousItem then create a new m_currentItem... or it will do nothing. So we either have both an m_currentItem + and m_previousItem, or we have neither. In the case where we have no m_previousItem, return early. + +2010-02-18 Nate Chapin <japhet@chromium.org> + + Reviewed by Eric Seidel. + + [V8] Correctly handle the case where the event field on the + global object is a v8::Object, but not a DOM wrapper. + + https://bugs.webkit.org/show_bug.cgi?id=34899 + + Test: fast/dom/Window/window-event-override-no-crash.html + + * bindings/v8/ScriptController.cpp: + (WebCore::ScriptController::processingUserGesture): + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::isValidDOMObject): + (WebCore::V8DOMWrapper::isWrapperOfType): + * bindings/v8/V8DOMWrapper.h: + +2010-02-18 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed, Qt build fix. + + * inspector/front-end/WebKit.qrc: + +2010-02-18 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Implement evaluate-on-hover for scripts panel. + + https://bugs.webkit.org/show_bug.cgi?id=35003 + + * WebCore.gypi: + * WebCore.vcproj/WebCore.vcproj: + * inspector/front-end/Images/gearButtonGlyph.png: Added. + * inspector/front-end/Images/popoverArrows.png: Added. + * inspector/front-end/Images/popoverBackground.png: Added. + * inspector/front-end/Images/thumbActiveHoriz.png: Added. + * inspector/front-end/Images/thumbActiveVert.png: Added. + * inspector/front-end/Images/thumbHoriz.png: Added. + * inspector/front-end/Images/thumbHoverHoriz.png: Added. + * inspector/front-end/Images/thumbHoverVert.png: Added. + * inspector/front-end/Images/thumbVert.png: Added. + * inspector/front-end/Images/trackHoriz.png: Added. + * inspector/front-end/Images/trackVert.png: Added. + * inspector/front-end/Popup.js: + (WebInspector.Popup): + (WebInspector.Popup.prototype.show): + (WebInspector.Popup.prototype.hide): + (WebInspector.Popup.prototype._positionElement): + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype._createViewerIfNeeded): + (WebInspector.SourceFrame.prototype._scroll): + (WebInspector.SourceFrame.prototype._mouseDown): + (WebInspector.SourceFrame.prototype._mouseUp): + (WebInspector.SourceFrame.prototype._mouseMove): + (WebInspector.SourceFrame.prototype._mouseOut): + (WebInspector.SourceFrame.prototype._resetHoverTimer): + (WebInspector.SourceFrame.prototype._hidePopup): + (WebInspector.SourceFrame.prototype._mouseHover): + (WebInspector.SourceFrame.prototype._showPopup.showTextPopup): + (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): + (WebInspector.SourceFrame.prototype._showPopup.evaluateCallback): + (WebInspector.SourceFrame.prototype._showPopup): + (WebInspector.HoverPropertiesSection): + (WebInspector.HoverPropertiesSection.prototype.update): + * inspector/front-end/TextEditorHighlighter.js: + (WebInspector.TextEditorHighlighter): + (WebInspector.TextEditorHighlighter.prototype._lex): + * inspector/front-end/TextViewer.js: + (WebInspector.TextViewer.prototype._paintLine): + * inspector/front-end/WebKit.qrc: + * inspector/front-end/inspector.css: + * inspector/front-end/inspector.html: + * inspector/front-end/inspectorSyntaxHighlight.css: + * inspector/front-end/popover.css: Added. + +2010-02-18 Ben Murdoch <benm@google.com> + + Reviewed by Jeremy Orlow. + + [v8] Complete upstreaming of V8 Touch Event bindings + https://bugs.webkit.org/show_bug.cgi?id=35094 + + No new tests required. + + * bindings/v8/V8Index.cpp: Add generated touch event headers. + +2010-02-18 Steve Block <steveblock@google.com> + + Reviewed by Jeremy Orlow. + + Updates Android V8 build to use DerivedSourcesAllInOne.cpp + https://bugs.webkit.org/show_bug.cgi?id=35083 + + No new tests, build fix only. + + * Android.derived.v8bindings.mk: + * Android.v8bindings.mk: + +2010-02-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + fast/frames/iframe-reparenting.html crashing on GTK Debug bots + https://bugs.webkit.org/show_bug.cgi?id=35081 + + Check that the client is alive after every call to it, since any + of them could cause the load to be cancelled, and the client to go + away. + + This is much better than protecting a specific subclass of + ResourceHandleClient (ResourceLoader), which makes us fail when + any other client is used. + + Test: fast/frames/iframe-reparenting.html + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::parseDataUrl): + +2010-02-18 Ben Murdoch <benm@google.com> + + Reviewed by Nate Chapin. + + [v8] [Android] V8 bindings for touch events are missing. + https://bugs.webkit.org/show_bug.cgi?id=33795 + + No new tests as this just enables touch events in V8. Existing touch tests suffice. + + * WebCore.gypi: Add Touch idl files. + * bindings/scripts/CodeGeneratorV8.pm: Add TouchList to typeCanFailConversion map. + * bindings/v8/DOMObjectsInclude.h: Add touch headers. + * bindings/v8/DerivedSourcesAllInOne.cpp: Add touch generated bindings. + * bindings/v8/V8Index.h: Add touch DOM object types. + * bindings/v8/custom/V8EventCustom.cpp: Add conversion of event to touch event. + * Android.derived.jscbindings.mk: Add the touch derived sources to the makefile. + * Android.derived.v8bindings.mk: Add the touch derived sources to the makefile. + +2010-02-18 William Chan <willchan@chromium.org> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=35071 + Disable loader limiting of requests per host for the chromium port. + + No tests because we're only changing a constant. + + * platform/network/chromium/ResourceRequest.cpp: + (WebCore::initializeMaximumHTTPConnectionCountPerHost): + +2010-02-18 Xan Lopez <xlopez@igalia.com> + + Reviewed by Eric Seidel. + + [Linux] Webkit incompatible with Java plugins + https://bugs.webkit.org/show_bug.cgi?id=24912 + + The NP Version supported by WebKit is at the moment hardcoded in + PluginPackage.cpp (to 24), but not all backends actually implement + the methods needed to claim this. Introduce a new method to be + implemented by each backend where the maximum supported version + can be specified, and set the GTK+ port NPVersion to 19. This + fixes an instantaneous crasher in the Sun Java NPAPI plugin. + + * plugins/PluginPackage.cpp: + (WebCore::PluginPackage::initializeBrowserFuncs): + * plugins/PluginPackage.h: + * plugins/gtk/PluginPackageGtk.cpp: + (WebCore::PluginPackage::NPVersion): + * plugins/mac/PluginPackageMac.cpp: + (WebCore::PluginPackage::NPVersion): + * plugins/qt/PluginPackageQt.cpp: + (WebCore::PluginPackage::NPVersion): + * plugins/symbian/PluginPackageSymbian.cpp: + (WebCore::PluginPackage::NPVersion): + * plugins/win/PluginPackageWin.cpp: + (WebCore::PluginPackage::NPVersion): + +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + Test: fast/frames/iframe-reparenting-new-page.html + + * html/HTMLFrameElementBase.cpp: + (WebCore::HTMLFrameElementBase::setName): + Move the code setting the frame name into a separate function. + + (WebCore::HTMLFrameElementBase::setNameAndOpenURL): + (WebCore::HTMLFrameElementBase::updateOnReparenting): + Called on the frame that was just re-parented and inserted into another Document. + Simply invoke Frame::transferChildFrameToNewDocument(...); + + (WebCore::HTMLFrameElementBase::insertedIntoDocument): + * html/HTMLFrameElementBase.h: + * html/HTMLFrameOwnerElement.h: + (WebCore::HTMLFrameOwnerElement::setName): + Make this a virtual function, to be able to reach it via Frame::m_ownerElement. + + * loader/EmptyClients.h: + (WebCore::EmptyFrameLoaderClient::adoptFrame): + * loader/FrameLoaderClient.h: + Add a new method, didTransferChildFrameToNewDocument(). + It compliments createFrame() in that a frame which was re-parented + in DOM and potentially changes Page, should notify the WebKit + implementation about potential ownership change. + Many embedders assume that Page owns all the Frames, or at least + all Frames are destroyed before 'their' Page is destroyed. Obviously, if Frame + can be transferred to another Page, the embedders should be notified. + + * page/Frame.cpp: + (WebCore::Frame::transferChildFrameToNewDocument): + Added, makes actual adjustments for Frame - resets the Page, + updates the frame tree and frame name, calls to FrameLoaderClient + to update external objects and recurses into children. + Can only be used on child frames. + + * page/Frame.h: + +2010-02-17 Tony Chang <tony@chromium.org> + + Reviewed by Eric Seidel. + + Copying and pasting into a contenteditable area can create <div>s surrounded by <span>s + https://bugs.webkit.org/show_bug.cgi?id=26937 + + This happens because of a span added when we copy that is used to + preserve styles. To avoid this, when we paste, make sure to apply + the styles to the span's children and then remove the style span. + + This change is covered by existing layout tests. + + * editing/ReplaceSelectionCommand.cpp: + (WebCore::ReplaceSelectionCommand::handleStyleSpans): + (WebCore::ReplaceSelectionCommand::copyStyleToChildren): + * editing/ReplaceSelectionCommand.h: + +2010-02-17 Tony Chang <tony@chromium.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=34914 + When pasting absolute font sizes into a content editable area with + page zoom, adjust the font sizes to be the same after page zoom is + applied. + + Test: editing/pasteboard/page-zoom.html + + * editing/ReplaceSelectionCommand.cpp: + (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance): + +2010-02-17 Tony Chang <tony@chromium.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=34737 + Copying styled list items then pasting into a list + should work the same as copying unstyle list items: + it shouldn't indent an extra level, but styles should + be copied. + + Small cleanups to insertAsListItems to make variable names + more descriptive. + + Test: editing/pasteboard/paste-list-003.html + + * editing/ReplaceSelectionCommand.cpp: + (WebCore::ReplaceSelectionCommand::doApply): + (WebCore::ReplaceSelectionCommand::insertAsListItems): + +2010-02-17 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Port PlatformKeyboardEvent + https://bugs.webkit.org/show_bug.cgi?id=34794 + + Retrieve the type, key code, text and modifiers from BREW's keyboard event. + + * platform/PlatformKeyboardEvent.h: + * platform/brew/PlatformKeyboardEventBrew.cpp: Added. + (WebCore::keyIdentifierForBrewKeyCode): + (WebCore::windowsKeyCodeForKeyEvent): + (WebCore::singleCharacterString): + (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): + (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): + (WebCore::PlatformKeyboardEvent::currentCapsLockState): + +2010-02-17 Hayato Ito <hayato@chromium.org> + + Reviewed by Eric Seidel. + + Support CSS page-break-inside with a value of 'avoid'. + + https://bugs.webkit.org/show_bug.cgi?id=34080 + + Test: printing/page-break-inside.html + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::paintChildren): + +2010-02-17 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by Alexey Proskuryakov. + + WebSocket bufferedAmount should not be 0 when send after close. + https://bugs.webkit.org/show_bug.cgi?id=34633 + + Fixed bug in webkit r54694. check m_client after it calls user + callback, because user callback may call close(), which would + call onclose event handler. + + Test: websocket/tests/bufferedAmount-after-close.html + + * websockets/ThreadableWebSocketChannelClientWrapper.h: + (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): + * websockets/WebSocket.cpp: + (WebCore::WebSocket::WebSocket): + (WebCore::WebSocket::send): + (WebCore::WebSocket::close): + (WebCore::WebSocket::bufferedAmount): + (WebCore::WebSocket::didConnect): + (WebCore::WebSocket::didClose): + * websockets/WebSocket.h: + * websockets/WebSocketChannel.cpp: + (WebCore::WebSocketChannel::WebSocketChannel): + (WebCore::WebSocketChannel::send): + (WebCore::WebSocketChannel::bufferedAmount): + (WebCore::WebSocketChannel::didClose): + (WebCore::WebSocketChannel::didReceiveData): + * websockets/WebSocketChannel.h: + * websockets/WebSocketChannelClient.h: + (WebCore::WebSocketChannelClient::didClose): + * websockets/WorkerThreadableWebSocketChannel.cpp: + (WebCore::workerContextDidClose): + (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): + * websockets/WorkerThreadableWebSocketChannel.h: + +2010-02-17 Yuzo Fujishima <yuzo@google.com> + + Reviewed by Eric Seidel. + + In diffing render styles, consider all pseudo style changes. + Without this patch, only :before and :after are considered. This is the cause of the following bug. + https://bugs.webkit.org/show_bug.cgi?id=32187 + + Test: fast/css/first-letter-first-line-hover.html + + * dom/Node.cpp: + (WebCore::Node::diff): + * rendering/style/RenderStyle.cpp: + (WebCore::RenderStyle::hasAnyPublicPseudoStyles): + * rendering/style/RenderStyle.h: + * rendering/style/RenderStyleConstants.h: + (WebCore::): + +2010-02-17 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Add WebCore::prefetchDNS + https://bugs.webkit.org/show_bug.cgi?id=34873 + + DNS prefetching is not implemented because the maximum number + of UDP sockets is quite small in most BREW devices. + + * platform/network/brew/DNSBrew.cpp: Added. + (WebCore::prefetchDNS): + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + It's hard for Chromium port to load an icon inside + Icon::createIconForFiles() because of sanbox and multi-process + architecture. So this change adds a method to request an icon to + Chrome class, and makes FileChooser receives an Icon instance + asynchronously. Synchronous loading also works with the new interface. + + Because all ports don't have implementations of Chrome::iconForFiles() + yet, FileChooser tries to load an Icon synchronously with + Icon::createIconForFiles(), then tries to load an Icon asynchronously + with Chrome::iconForFiles() if Icon::createIconForFiles() returns 0. + + The existing Icon::createIconForFiles() implementations should be + moved to Chrome::iconForFiles(). We're going to remove + Icon::createIconForFiles(). + + * loader/EmptyClients.h: + (WebCore::EmptyChromeClient::iconForFiles): Add an empty implementation. + * page/Chrome.cpp: + (WebCore::Chrome::iconForFiles): Delegate to ChromeClient::iconForFiles(). + * page/Chrome.h: + * page/ChromeClient.h: + (WebCore::ChromeClient::iconForFiles): Add a declaration as a pure virtual method. + * platform/FileChooser.cpp: + (WebCore::FileChooser::FileChooser): Use loadIcon(). + (WebCore::FileChooser::chooseFiles): ditto. + (WebCore::FileChooser::loadIcon): Added. + (WebCore::FileChooser::iconLoaded): Added. + * platform/FileChooser.h: Add two methods to FileChooserClient; repaint() and iconForFiles(). + * platform/graphics/Icon.h: Add a FIXME comment. + * platform/graphics/gtk/IconGtk.cpp: ditto. + * platform/graphics/mac/IconMac.mm: ditto. + * platform/graphics/qt/IconQt.cpp: ditto. + * platform/graphics/win/IconWin.cpp: ditto. + * rendering/RenderFileUploadControl.cpp: + (WebCore::RenderFileUploadControl::iconForFiles): Delegate to Chrome::iconForFiles(). + (WebCore::RenderFileUploadControl::click): Use chrome(). + (WebCore::RenderFileUploadControl::chrome): + * rendering/RenderFileUploadControl.h: + (WebCore::RenderFileUploadControl::repaint): + +2010-02-17 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Bug 35065: Delay between page loading and animated GIF playing + <http://webkit.org/b/35065> / <rdar://problem/7109548> + + BitmapImage::startAnimation was adding the current frame duration to the desired start time + of the frame for every time it was called. If the function then bailed out due to not having + sufficient data to render the frame, this would lead to the desired start time of the frame + being pushed out multiple times. On an animated GIF that took mulitple seconds to load this + could happen many times for a single frame, resulting in the start time of the second frame + of the animation being pushed out by as much as five seconds. + + * platform/graphics/BitmapImage.cpp: + (WebCore::BitmapImage::startAnimation): Change the order of the code slightly so that the + desired start time is only updated after determining that we have sufficient data to handle + the next frame. + +2010-02-17 Stephan Aßmus <superstippi@gmx.de> + + Reviewed by Eric Seidel. + + Implemented homeDirectoryPath() and listDirectory() on the Haiku platform. + https://bugs.webkit.org/show_bug.cgi?id=34687 + + Covered by existing tests. + + * platform/haiku/FileSystemHaiku.cpp: + (WebCore::homeDirectoryPath): Implemented + (WebCore::listDirectory): Implemented + +2010-02-17 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Port userIdleTime + https://bugs.webkit.org/show_bug.cgi?id=34259 + + Return an arbitrarily high userIdleTime so that releasing pages from the page + cache isn't postponed. + + * platform/brew/SystemTimeBrew.cpp: Added. + (WebCore::userIdleTime): + +2010-02-17 Dirk Schulze <krit@webkit.org> + + Rolling out r54909. Breaks SL and Win. + +2010-02-17 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Dimitri Glazkov. + + Fix Chromium's bindings for Database.transaction(): a 'null' + callback should be treated as no callback. + + Test: storage/null-callbacks.html + + https://bugs.webkit.org/show_bug.cgi?id=35047 + + * bindings/v8/custom/V8DatabaseCustom.cpp: + (WebCore::createTransaction): + +2010-02-17 Dirk Schulze <krit@webkit.org> + + Reviewed by Nikolas Zimmermann. + + Move SVGResources to Renderers, starting with Masker + https://bugs.webkit.org/show_bug.cgi?id=35020 + + We have rendering specific code in WebCore/svg/graphics. The goal is to move + this code into suitable Renderers. This helps us to clean up the code and makes + maintenance easier. It also makes it possible to remove rendering specific code + from SVG*Elements into this renderers. So the Renderer contains everything that + is needed to use the resource. + RenderSVGResource will be the base class for all new resource render classes like + RenderSVGResourceMasker, RenderSVGResourceClipper and the other resources. + + This patch starts moving SVGResourceMasker to RenderSVGResourceMasker. + Another benefit is the much more useful result in DRT on using masker. + + * Android.mk: + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * rendering/RenderObject.cpp: + (WebCore::RenderObject::toRenderSVGResource): Conversion to RenderSVGResource base class. + * rendering/RenderObject.h: + (WebCore::RenderObject::isSVGResource): Check if renderer is a resource. + * rendering/RenderPath.cpp: + * rendering/RenderSVGImage.cpp: + (WebCore::RenderSVGImage::destroy): Renderer gets destroyed, unregister it from it's resources. + * rendering/RenderSVGImage.h: Some code clean up according to the webkit style. + (WebCore::RenderSVGImage::toSVGRenderBase): + (WebCore::RenderSVGImage::renderName): + (WebCore::RenderSVGImage::isSVGImage): + (WebCore::RenderSVGImage::localToParentTransform): + (WebCore::RenderSVGImage::strokeBoundingBox): + (WebCore::RenderSVGImage::requiresLayer): + (WebCore::RenderSVGImage::localTransform): + * rendering/RenderSVGInlineText.h: + (WebCore::RenderSVGInlineText::objectBoundingBox): Needed for SVGRenderTreeAsText + * rendering/RenderSVGModelObject.cpp: + (WebCore::RenderSVGModelObject::destroy): Renderer gets destroyed, unregister it from it's resources. + * rendering/RenderSVGModelObject.h: + * rendering/RenderSVGResource.h: Added. + (WebCore::): Base class for all Resource renderers like masker, clipper and others. + (WebCore::RenderSVGResource::RenderSVGResource): + (WebCore::RenderSVGResource::cast): + (WebCore::RenderSVGResource::toRenderSVGResource): + (WebCore::RenderSVGResource::isSVGResource): + (WebCore::RenderSVGResource::drawsContents): + (WebCore::getRenderSVGResourceById): + * rendering/RenderSVGResourceMasker.cpp: Added. + (WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker): + (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker): + (WebCore::RenderSVGResourceMasker::invalidateClients): Status of masker changed, remove all clients. + (WebCore::RenderSVGResourceMasker::invalidateClient): Status of an object changed, remove pending client. + (WebCore::RenderSVGResourceMasker::applyResource): Apply masker to object. + (WebCore::RenderSVGResourceMasker::resourceBoundingBox): boundingBox of the resource, depending on the object. + (WebCore::RenderSVGResourceMasker::createMaskImage): Creates the mask image, the context gets clipped with. + * rendering/RenderSVGResourceMasker.h: Added. + (WebCore::MaskerData::MaskerData): + (WebCore::RenderSVGResourceMasker::renderName): + (WebCore::RenderSVGResourceMasker::maskUnits): Unit of mask for DRT. + (WebCore::RenderSVGResourceMasker::maskContentUnits): Unit of childs from mask for DRT. + (WebCore::RenderSVGResourceMasker::resourceType): + * rendering/RenderSVGRoot.cpp: + (WebCore::RenderSVGRoot::destroy): Renderer gets destroyed, unregister it from it's resources. + * rendering/RenderSVGRoot.h: + * rendering/RenderSVGText.cpp: + (WebCore::RenderSVGText::destroy): dito. + * rendering/RenderSVGText.h: + * rendering/RenderTreeAsText.cpp: + (WebCore::write): + * rendering/SVGRenderSupport.cpp: + (WebCore::SVGRenderBase::prepareToRenderSVGContent): + (WebCore::SVGRenderBase::maskerBoundingBoxForRenderer): + (WebCore::SVGRenderBase::deregisterFromResources): Unregister object from all it's resources after status changed. + * rendering/SVGRenderSupport.h: + (WebCore::SVGRenderBase::toSVGRenderBase): + (WebCore::SVGRenderBase::strokeBoundingBox): + (WebCore::SVGRenderBase::markerBoundingBox): + * rendering/SVGRenderTreeAsText.cpp: Update TreeAsText to dump maskers correctly. + (WebCore::operator<<): + (WebCore::writeSVGResource): + (WebCore::writeSVGContainer): + (WebCore::writeSVGText): + (WebCore::writeSVGInlineText): + (WebCore::writeSVGImage): + (WebCore::write): + (WebCore::writeResourcesToObject): + * rendering/SVGRenderTreeAsText.h: + * svg/SVGMaskElement.cpp: Update Masker to use the new renderer. + (WebCore::SVGMaskElement::svgAttributeChanged): + (WebCore::SVGMaskElement::childrenChanged): + (WebCore::SVGMaskElement::maskBoundingBox): + (WebCore::SVGMaskElement::createRenderer): + * svg/SVGMaskElement.h: + * svg/SVGStyledElement.cpp: We need to tell the renderer to unregister object, after the status changed. + (WebCore::SVGStyledElement::invalidateResources): + (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain): + * svg/SVGUnitTypes.h: Conversion of integer to SVGUnitType. + (WebCore::toUnitType): + * svg/graphics/SVGResource.h: + (WebCore::): + (WebCore::SVGResource::isMarker): + * svg/graphics/SVGResourceMasker.cpp: Removed. + * svg/graphics/SVGResourceMasker.h: Removed. + +2010-02-17 Kenneth Russell <kbr@google.com> + + Reviewed by Oliver Hunt. + + Refactor texImage2D and texSubImage2D taking Image to use common code + https://bugs.webkit.org/show_bug.cgi?id=34458 + + Merged the Safari and Chromium code which extracts the data from + Image objects into common entry points on GraphicsContext3D. This + immediately fixes the following three problems: + - Chromium not implementing texSubImage2D taking Image. + - Safari not obeying the flipY parameter to texImage2D or + texSubImage2D taking Image. + - Safari not obeying the premultipyAlpha parameter to texImage2D + or texSubImage2D taking Image. + Added new test verifying the behavior of texImage2D and + texSubImage2D and the flipY parameter. The premultiplyAlpha + parameter can not be tested yet as the implementation is not yet + spec compliant. This will be fixed in a follow-on bug. + + Ran all WebGL demos in demo repository on Safari and Chromium; + textures are now the right way up in both browsers, and + transparent textures in Particles demo now look correct in Safari. + + Test: fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html + + * WebCore.gyp/WebCore.gyp: + * WebCore.gypi: + * WebCore.xcodeproj/project.pbxproj: + * platform/graphics/GraphicsContext3D.cpp: Added. + (WebCore::GraphicsContext3D::extractImageData): + (WebCore::GraphicsContext3D::processImageData): + (WebCore::GraphicsContext3D::premultiplyAlpha): + (WebCore::GraphicsContext3D::unmultiplyAlpha): + * platform/graphics/GraphicsContext3D.h: + (WebCore::GraphicsContext3D::): + * platform/graphics/cg/GraphicsContext3DCG.cpp: Added. + (WebCore::GraphicsContext3D::getImageData): + * platform/graphics/mac/GraphicsContext3DMac.cpp: + (WebCore::GraphicsContext3D::texImage2D): + (WebCore::GraphicsContext3D::texSubImage2D): + * platform/graphics/skia/GraphicsContext3DSkia.cpp: Added. + (WebCore::GraphicsContext3D::getImageData): + +2010-02-17 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Ariya Hidayat. + + [Qt] GraphicsLayer: support perspective and 3D transforms + https://bugs.webkit.org/show_bug.cgi?id=34960 + + New tests: http://webkit.org/blog-files/3d-transforms/perspective-by-example.html + + * platform/graphics/qt/GraphicsLayerQt.cpp: + (WebCore::GraphicsLayerQtImpl::updateTransform): + (WebCore::GraphicsLayerQtImpl::setBaseTransform): + (WebCore::GraphicsLayerQtImpl::computeTransform): + (WebCore::GraphicsLayerQtImpl::flushChanges): + (WebCore::TransformAnimationQt::~TransformAnimationQt): + +2010-02-17 Peter Kasting <pkasting@google.com> + + Unreviewed, build fix. + + Fix crashes due to an omitted line in r54839. + + * platform/image-decoders/png/PNGImageDecoder.cpp: + (WebCore::decodingFailed): + +2010-02-17 Alok Priyadarshi <alokp@chromium.org> + + Reviewed by Ariya Hidayat. + + Bug 34900: Implement accelerated compositing for chromium. + https://bugs.webkit.org/show_bug.cgi?id=34900 + + Do not exclude files needed for accelerated compositing. In fact there is no need to exclude these files. + These files are already guarded with WTF_USE_ACCELERATED_COMPOSITING flag. + + * WebCore.gyp/WebCore.gyp: Removed GraphicsLayer.cpp, RenderLayerBacking.cpp, + and RenderLayerCompositor.cpp from excluded list. + +2010-02-17 Jian Li <jianli@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Remove the obsolete chromium interface for handling DownloadURL. + https://bugs.webkit.org/show_bug.cgi?id=34982 + + * platform/chromium/ChromiumDataObject.cpp: + (WebCore::ChromiumDataObject::clear): + (WebCore::ChromiumDataObject::hasData): + (WebCore::ChromiumDataObject::ChromiumDataObject): + * platform/chromium/ChromiumDataObject.h: + * platform/chromium/ClipboardChromium.cpp: + (WebCore::ClipboardChromium::setData): + +2010-02-17 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7645569> REGRESSION (r51324): Incorrect marker rects for blocks that span multiple columns + + * manual-tests/match-marker-rects.html: Added. + * rendering/InlineTextBox.cpp: + (WebCore::InlineTextBox::paintTextMatchMarker): Use the text renderer rather + than its ancestor block for the local-to-absolute transformation. + (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto. + +2010-02-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Does not send an Accept header for subresources, causing some sites to break + https://bugs.webkit.org/show_bug.cgi?id=33242 + + Set */* as the Accept header when downloading resources + that did not set an Accept header. This behaviour is similar to + the one adopted by Chromium. + + Test: http/tests/misc/image-checks-for-accept.html + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::startHttp): + +2010-02-17 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Fixes initialization order of members for GeolocationServiceChromium. + https://bugs.webkit.org/show_bug.cgi?id=35034 + + * platform/chromium/GeolocationServiceChromium.cpp: + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + [Linux] Webkit incompatible with Java plugins + https://bugs.webkit.org/show_bug.cgi?id=24912 + + Resolve symlinks before trying to load plugins as modules, since + GModule won't do it. + + Based on original work by Gustavo Noronha. + + * plugins/gtk/PluginPackageGtk.cpp: + (WebCore::PluginPackage::load): + +2010-02-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Protect the resource loader object from disappearing during + parseDataUrl. + + Tested by testdownload API test. + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::parseDataUrl): + +2010-02-17 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Implements GeolocationServices for Chromium. + https://bugs.webkit.org/show_bug.cgi?id=32068 + + This is part of implementing Geolocation framework for Chromium. Existing layout tests should pass. + + * WebCore.gypi: + * page/Geolocation.h: + * platform/GeolocationService.h: + +2010-02-17 Steve Block <steveblock@google.com> + + Reviewed by Ariya Hidayat. + + Adds missing platform and feature guards to V8 bindings + https://bugs.webkit.org/show_bug.cgi?id=34987 + + No new tests, build fix only. + + * bindings/v8/V8Proxy.cpp: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge + * bindings/v8/V8Proxy.h: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge + * bindings/v8/custom/V8DocumentCustom.cpp: Modified. Adds XPATH guards + +2010-02-17 Steve Block <steveblock@google.com> + + Reviewed by Ariya Hidayat. + + Include WebCore's npruntime.h for Android in V8 bindings + https://bugs.webkit.org/show_bug.cgi?id=35002 + + Currently, the V8 bindings include bindings/npruntime.h, which is a + Chromium-specific file outside of the WebKit tree. + + No new tests, build fix only. + + * bindings/v8/NPV8Object.cpp: + * bindings/v8/NPV8Object.h: + * bindings/v8/V8NPObject.h: + * bindings/v8/V8NPUtils.h: + * bindings/v8/npruntime_impl.h: + * bindings/v8/npruntime_priv.h: + +2010-01-07 Philippe Normand <pnormand@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GStreamer] Should handle BUFFERING messages + https://bugs.webkit.org/show_bug.cgi?id=30004 + + Initial support for on-disk buffering of videos. This works only + for Quicktime and flv though. + + * css/mediaControlsGtk.css: + * platform/gtk/RenderThemeGtk.cpp: + (WebCore::RenderThemeGtk::paintMediaSliderTrack): Draw the + buffering status in the media controls. + * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: + (WebCore::mediaPlayerPrivateMessageCallback): Defer buffering + messages handling to processBufferingStats(). + (WebCore::bufferingTimeoutCallback): Closure called periodically + during the on-disk buffering process. + (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): New instance + variables and create playbin2 here instead of doing it in load(). + (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): New instance + variables. + (WebCore::MediaPlayerPrivate::load): Simply set uri on playbin2 + instead of creating the pipeline and setting uri all together. + (WebCore::MediaPlayerPrivate::processBufferingStats): Start a new + timeout source if the player is starting on-disk buffering. + (WebCore::MediaPlayerPrivate::queryBufferingStats): Method called + 200ms during on-disk buffering to update the maxTimeLoaded and few + other private variables. + (WebCore::MediaPlayerPrivate::maxTimeSeekable): + (WebCore::MediaPlayerPrivate::maxTimeLoaded): + (WebCore::MediaPlayerPrivate::bytesLoaded): Fixed implementations + regarding buffering. + (WebCore::MediaPlayerPrivate::totalBytes): Improved logging. + (WebCore::MediaPlayerPrivate::updateStates): Start playback if it + was internally paused at beginning of on-disk buffering and set + ready/network states depending on the state of the on-disk + buffering process. + (WebCore::MediaPlayerPrivate::didEnd): Emit durationChanged. + (WebCore::MediaPlayerPrivate::setAutobuffer): Edit playbin2 flags + property depending on autoBuffer value. + (WebCore::MediaPlayerPrivate::createGSTPlayBin): Don't set uri + there, it is now done in load(). + * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: New methods + and instance variables. + +2010-02-16 Chris Evans <cevans@chromium.org> + + Reviewed by Adam Barth. + + Add a new setting which gives the option of assigning every file:/// + to its own unique domain. + + https://bugs.webkit.org/show_bug.cgi?id=34778 + + Test: Pending in forthcoming separate change due to non-trivial + dependencies. + + * dom/Document.cpp: + (WebCore::Document::initSecurityContext): Place file:/// URI documents + into their own unique domains if the new setting requires it. + * page/Settings.h: + * page/Settings.cpp: + (WebCore::Settings::setAllowFileAccessFromFileURLs): Simple setter. + * page/SecurityOrigin.h: + * page/SecurityOrigin.cpp: + (WebCore::SecurityOrigin::makeUnique): Add simple ability to force an + origin to be considered unique. + +2010-02-16 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: drosera/demo.js not syntax highlighted correctly. + + https://bugs.webkit.org/show_bug.cgi?id=35008 + + * inspector/front-end/SourceTokenizer.js: + (WebInspector.SourceTokenizer.Registry): + (WebInspector.SourceTokenizer.Registry.prototype.getTokenizer): + +2010-02-16 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: prefer smooth scrolling to instant highlight. + + https://bugs.webkit.org/show_bug.cgi?id=34978 + + * inspector/front-end/TextViewer.js: + (WebInspector.TextViewer): + (WebInspector.TextViewer.prototype._scroll): + (WebInspector.TextChunk): + (WebInspector.TextChunk.prototype._createRow): + * inspector/front-end/textViewer.css: + +2010-02-16 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Nikolas Zimmermann. + + SVG not rendered as background-image from data URI + https://bugs.webkit.org/show_bug.cgi?id=33630 + + When the background image is an SVG image, and it is smaller than the area + it is supposed to fill, we were using renderSubTreeToImage to draw it. + That call was not going through all the drawing phases, and so the SVG itself + would not be drawn. + + Test: svg/css/background-image-svg.html + + * svg/graphics/SVGImage.cpp: + (WebCore::SVGImage::nativeImageForCurrentFrame): + +2010-02-16 Bryan Yeung <bryeung@chromium.org> + + Reviewed by Nikolas Zimmermann. + + Remove the bounds on stroke width and miter for the skia platform. + https://bugs.webkit.org/show_bug.cgi?id=34954 + + Test: svg/custom/stroke-width-large.svg + + * platform/graphics/skia/PlatformContextSkia.cpp: + (PlatformContextSkia::setupPaintForStroking): + +2010-02-16 MORITA Hajime <morrita@gmail.com> + + Reviewed by Nikolas Zimmermann. + + REGRESSION: SVG text disappaears after double click + https://bugs.webkit.org/show_bug.cgi?id=34880 + + Tests: svg/text/selection-doubleclick.svg + svg/text/selection-tripleclick.svg + + * rendering/SVGRootInlineBox.cpp: + (WebCore::SVGRootInlineBoxPaintWalker::mayHaveSelection): + Use InlineTextBox::selectionStartEnd() instead of + RenderObject::selectionStartEnd() because latter may span multiple + comparing startPos and endPos is irrelevant in some cases. + former selectionStartEnd() is for single line and comparing + startPos and endPos will make sense. + +2010-02-16 Jessie Berlin <jberlin@webkit.org> + + Reviewed by Timothy Hatcher. + + Inspector should display Array lengths in the property lists. + https://bugs.webkit.org/show_bug.cgi?id=20695 + + * inspector/front-end/InjectedScript.js: + (injectedScriptConstructor): + For objects of type 'array' (which includes Arrays, NodeLists, and HTMLCollections), make the length of the object available via propertyLength on the proxy object. + * inspector/front-end/ObjectPropertiesSection.js: + (WebInspector.ObjectPropertyTreeElement.prototype.update): + For properties that have propertyLength defined, append it to the displayed description. + +2010-02-16 Yusuke Sato <yusukes@chromium.org> + + Reviewed by Dimitri Glazkov. + + [Chromium] OpenType font with CFF glyphs is not handled correctly on Windows XP + https://bugs.webkit.org/show_bug.cgi?id=34735 + + Use 0xFFFF as invalidGlyph when fontData is a OpenType font with CFF glyphs. + + Test: fast/css/font-face-opentype.html + + * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp: + (WebCore::fillBMPGlyphs): + +2010-02-16 Darin Adler <darin@apple.com> + + * page/MediaCanStartListener.h: Fixed license. + +2010-02-16 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Generalize delayed plug-in start for background tabs for use for other media + https://bugs.webkit.org/show_bug.cgi?id=34981 + + Also did some simple cleanup of HTMLMediaElement to get ready to make it + a client of the same mechanism. + + * WebCore.base.exp: Added Page::setCanStartMedia and resorted. + * WebCore.xcodeproj/project.pbxproj: Added MediaCanStartListener.h. + + * html/HTMLAudioElement.h: Added an implementation of isVideo since that + is now a pure virtual function in HTMLMediaElement. Also made tagPriority + private. + + * html/HTMLMediaElement.h: Made it clearer that HTMLMediaElement is an + abstract base class by making its constructor protected and making the + isVideo function a pure virtual function. + + * page/Page.cpp: + (WebCore::Page::Page): Updated for name change from m_canStartPlugins + to m_canStartMedia. + (WebCore::Page::addMediaCanStartListener): Renamed and added an assertion. + (WebCore::Page::removeUnstartedMedia): Ditto. + (WebCore::Page::setCanStartMedia): Renamed plugin to media and moved + the code here from PageWin.cpp. The main change from the one in PageWin.cpp + is that this function calls mediaCanStart rather than explicitly calling a + combination of start and dispatchDidFailToStartPlugin on a PluginView. + + * page/Page.h: Re-sorted forward class declarations. Renamed the plugin + starting functions to media starting names and changed types from + PluginView to MediaCanStartListener. + + * page/MediaCanStartListener.h: Added. + + * page/win/PageWin.cpp: Moved setCanStartPlugins to the platform-independent + Page.cpp file so it can be used for more than just Windows plug-ins. + + * plugins/PluginView.cpp: Sorted includes. + (WebCore::PluginView::startOrAddToUnstartedList): Use addMediaCanStartListener. + (WebCore::PluginView::mediaCanStart): Added. Called when the page decides that + media can start. Contains the code that used to be in Page::setCanStartPlugins. + (WebCore::PluginView::removeFromUnstartedListIfNecessary): Use + removeMediaCanStartListener. + + * plugins/PluginView.h: Adopted MediaCanStartListener. + +2010-02-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=34999 + Compositing layers inside overflow:scroll divs are not always updated on scrolling + + When RenderLayer::scrollToOffset() updates compositing layer positions, it needs + to start updating at its stacking context rather than just its compositing ancestor. + The stacking context is guaranteed to contain all descendants of the overflow + layer, including those that are not direct descendants of the overflow layer in stacking + (and therefore compositing) order. + + Test: compositing/overflow/scroll-ancestor-update.html + + * rendering/RenderLayer.cpp: + (WebCore::RenderLayer::scrollToOffset): + +2010-02-16 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + Allow FloatRect::center() to return fractional coordinates. It was + mistakenly converting to integers. + + * platform/graphics/FloatRect.h: + (WebCore::FloatRect::center): + +2010-02-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=34964 + Leaks tool reports false memory leaks due to Rope implementation. + + Renamed cUStringImpl::size() to UStringImpl::size()UStringImpl::length() + (matches WebCore::StringImpl). + + * bridge/jni/jsc/JavaStringJSC.h: + (JSC::Bindings::JavaStringImpl::length): + * platform/text/AtomicString.cpp: + (WebCore::AtomicString::add): + (WebCore::AtomicString::find): + +2010-02-15 Jon Honeycutt <jhoneycutt@apple.com> + + <rdar://problem/7288853> Message about missing plugin does not specify + the type or download link for download + + Reviewed by Mark Rowe. + + * plugins/PluginDatabase.cpp: + (WebCore::PluginDatabase::findPlugin): + Only update the mimeType out param if we find a plug-in for the file + extension. + +2010-02-16 Simon Fraser <simon.fraser@apple.com> + + Build fix for Tiger. + + Add #if USE(ACCELERATED_COMPOSITING) around the call to mediaPlayerRenderingModeChanged(). + + * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: + (WebCore::MediaPlayerPrivate::setUpVideoRendering): + +2010-02-16 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Eric Carlson. + + Buildfix for r54826. + + HTMLMediaElement class defined by HTMLMediaElement.h in #if ENABLE(VIDEO) block, + it should be in #if ENABLE(VIDEO) block in rendering/RenderLayerBacking.cpp too. + + * rendering/RenderLayerBacking.cpp: Missing #if ENABLE(VIDEO) guard added. + (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): + +2010-02-16 Julie Parent <jparent@chromium.org> + + Unreviewed: Chromium build fix. + + http://trac.webkit.org/changeset/54823 introduced an unused variable. Remove it. + + * platform/image-decoders/ImageDecoder.cpp: + (WebCore::ImageDecoder::create): + +2010-02-16 Mark Rowe <mrowe@apple.com> + + Reviewed by Alexey Proskuryakov. + + Bug 34974: Leak of ScheduledAction during layout tests + <https://bugs.webkit.org/show_bug.cgi?id=34974> + + ScheduledAction::create was returning a raw pointer which was threaded down through to an OwnPtr in DOMTimer. + If any of the code paths in between hit an error case and returned early the raw pointer would be leaked. We + can avoid this by passing it as a PassOwnPtr. This will ensure that the ScheduledAction is cleaned up should + an error case be hit. + + * bindings/js/JSDOMWindowCustom.cpp: + (WebCore::JSDOMWindow::setTimeout): Store the newly-created ScheduledAction in an OwnPtr and then hand it off + as the function argument. + (WebCore::JSDOMWindow::setInterval): Ditto. + * bindings/js/JSWorkerContextCustom.cpp: + (WebCore::JSWorkerContext::setTimeout): Ditto. + (WebCore::JSWorkerContext::setInterval): Ditto. + * bindings/js/ScheduledAction.cpp: + (WebCore::ScheduledAction::create): Return a PassOwnPtr. + * bindings/js/ScheduledAction.h: + * page/DOMTimer.cpp: + (WebCore::DOMTimer::DOMTimer): Update argument type. + (WebCore::DOMTimer::install): Ditto. + * page/DOMTimer.h: + * page/DOMWindow.cpp: + (WebCore::DOMWindow::setTimeout): Ditto. + (WebCore::DOMWindow::setInterval): Ditto. + * page/DOMWindow.h: + +2010-02-16 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by David Hyatt. + + SVG units don't stay consistently sized on zoom + https://bugs.webkit.org/show_bug.cgi?id=14004 + + Large step towards making WebKit an usable SVG viewer. + + Make zooming into SVG documents work as expected, in both standalone and XHTML/SVG compound documents. + SVG applies a global scale to the document, whereas CSS zooms all individual length units (on full-page-zoom). + Scaling has to be avoided for all SVG specific CSS properties (already works) and for some selected CSS + properties shared between CSS & SVG that explicitely need a different treatment in the context of SVG. + To name a few: font-size, letter-spacing, etc. should stay invariant under zoom in SVG document fragments. + + Some new rules regarding zooming: + - "Zoom text only" should never affect SVG documents, neither text nor content should zoom. + This option doesn't make much sense for SVG, so it's wise to avoid side-effects and disable it. + In compound documents the SVG would stay as-is and only text of surrounding XHTML content would zoom. + + - "Full page zoom" is the only zoom mode affecting SVG. (Panning only works in standalone documents.) + + Cover all mentioned cases above by a new set of layout tests. + + Tests: svg/zoom/page/absolute-sized-document-no-scrollbars.svg + svg/zoom/page/absolute-sized-document-scrollbars.svg + svg/zoom/page/relative-sized-document-scrollbars.svg + svg/zoom/page/zoom-coords-viewattr-01-b.svg + svg/zoom/page/zoom-foreignObject.svg + svg/zoom/page/zoom-hixie-mixed-008.xml + svg/zoom/page/zoom-hixie-mixed-009.xml + svg/zoom/page/zoom-hixie-rendering-model-004.xhtml + svg/zoom/page/zoom-svg-float-border-padding.xml + svg/zoom/text/absolute-sized-document-no-scrollbars.svg + svg/zoom/text/absolute-sized-document-scrollbars.svg + svg/zoom/text/relative-sized-document-scrollbars.svg + svg/zoom/text/zoom-coords-viewattr-01-b.svg + svg/zoom/text/zoom-foreignObject.svg + svg/zoom/text/zoom-hixie-mixed-008.xml + svg/zoom/text/zoom-hixie-mixed-009.xml + svg/zoom/text/zoom-hixie-rendering-model-004.xhtml + svg/zoom/text/zoom-svg-float-border-padding.xml + + * css/CSSStyleSelector.cpp: Blacklist certain properties not to be zoomed for SVG elements. + (WebCore::CSSStyleSelector::styleForDocument): Don't zoom font-sizes. + (WebCore::CSSStyleSelector::applyProperty): Ditto (+ letter/word-spacing). + (WebCore::CSSStyleSelector::setFontSize): Ditto. + (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Never apply text zoom to SVG. + * css/CSSStyleSelector.h: + * css/SVGCSSStyleSelector.cpp: -webkit-shadow + SVG was incorrectly respecting zoom factor. + (WebCore::CSSStyleSelector::applySVGProperty): + * page/Frame.cpp: + (WebCore::Frame::shouldApplyTextZoom): Remove SVG special cases. + (WebCore::Frame::shouldApplyPageZoom): Ditto. + (WebCore::Frame::setZoomFactor): Don't force setZoomsTextOnly() - SVG now uses FPZ as well. + * rendering/RenderSVGRoot.cpp: + (WebCore::RenderSVGRoot::calcReplacedWidth): CSSPropertyWidth is explicitely not scaled by CSSStyleSelector, fix that for outermost <svg> elements. + (WebCore::RenderSVGRoot::calcReplacedHeight): Ditto for CSSPropertyHeight. + (WebCore::RenderSVGRoot::layout): Simplify & cleanup code, take advantage of new calcWidth/Height functionality, no need to scale anything here. + (WebCore::RenderSVGRoot::paint): Use parentOriginToBorderBox() instead of duplicating code. + (WebCore::RenderSVGRoot::calcViewport): Simplify code. + (WebCore::RenderSVGRoot::localToBorderBoxTransform): Calculate viewBoxToViewTransformation() against unscaled width()/height() values. + * rendering/RenderSVGRoot.h: + * svg/SVGLength.cpp: + (WebCore::SVGLength::PercentageOfViewport): Cleanup & document function. + * svg/SVGSVGElement.cpp: + (WebCore::SVGSVGElement::currentScale): Return pageZoomFactor(), not just the zoomFactor() - as we want to ignore text-only zoom. + (WebCore::SVGSVGElement::setCurrentScale): Pass isTextOnly=false to setZoomFactor(). + +2010-02-16 Julie Parent <jparent@chromium.org> + + Unreviewed: Chromium build fix. + + https://bugs.webkit.org/show_bug.cgi?id=34998 + + Move include of JavaScriptProfile.h behind if (USE_JSC). + + * inspector/InspectorController.cpp: + +2010-02-16 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoffrey Garen and Kevin Decker. + + https://bugs.webkit.org/show_bug.cgi?id=34989 + <rdar://problem/7417965> Cursor disappears on scroll bars that are over plugin content + + * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): Added some + comments about the way we pass events down to plug-ins. + +2010-02-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Eric Carlson. + + With hardware acceleration turned off, video frames never display if poster + image is specified + https://bugs.webkit.org/show_bug.cgi?id=34965 + + HTMLVideoElement's m_shouldDisplayPosterImage was never updated after + the movie supplied its first video frame, so the poster would continue to show. + + Fixed by calling updatePosterImage() from mediaPlayerRepaint(), which is called + each time a new frame is available. updatePosterImage() is cheap. + + Also made updatePosterImage() virtual on HTMLMediaElement to avoid a number of + ugly casts. + + Test: manual-tests/media-elements/video-replaces-poster.html + + * html/HTMLMediaElement.cpp: + (WebCore::HTMLMediaElement::noneSupported): Call updatePosterImage() without video check. + (WebCore::HTMLMediaElement::setNetworkState): Ditto. + (WebCore::HTMLMediaElement::setReadyState): Ditto. + (WebCore::HTMLMediaElement::mediaPlayerRepaint): Call udpatePosterImage(). + * html/HTMLMediaElement.h: + (WebCore::HTMLMediaElement::updatePosterImage): Make this an empty virtual + method on the base class. + * html/HTMLVideoElement.h: Override updatePosterImage(). + +2010-02-16 Simon Fraser <simon.fraser@apple.com> + + Build fix for platforms without ACCELERATED_COMPOSITING defined. + + mediaPlayerRenderingModeChanged() is only available when ACCELERATED_COMPOSITING is defined. + + * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: + (WebCore::MediaPlayerPrivate::setUpVideoRendering): + +2010-02-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Eric Carlson. + + Autoplaying video with poster doesn't reliably show up + https://bugs.webkit.org/show_bug.cgi?id=34966 + + A timing issue with compositing updates when replacing the poster image + with the video could cause the video to not display. + + Fix by making video layer hook up more similar to WebGL etc, by having the + video kick off a recalcStyle() via a SyntheticStyleChange. This requires + vending a PlaformLayer* from the media player, up through the element. + + Test: media/video-replaces-poster.html + + * html/HTMLMediaElement.cpp: + (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged): Use setNeedsStyleRecalc() + to kick off a compositing update. + + * html/HTMLMediaElement.h: + (WebCore::HTMLMediaElement::platformLayer): Export the media engine's layer. + + * platform/graphics/MediaPlayer.cpp: + (WebCore::NullMediaPlayerPrivate::platformLayer): Method to vend the media layer. + (WebCore::MediaPlayer::platformLayer): + + * platform/graphics/MediaPlayer.h: + (WebCore::MediaPlayerClient::mediaPlayerRenderingModeChanged): New client callback + to indicate that the rendering mode changed. The element uses this to kick off a + recalcStyle. + + * platform/graphics/MediaPlayerPrivate.h: + (WebCore::MediaPlayerPrivateInterface::platformLayer): Method to vend the media layer. + * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Ditto + * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: + (WebCore::MediaPlayerPrivate::createQTMovieLayer): No longer parent the layer directly + via setContentsToMedia(). + (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged): Ditto. + (WebCore::MediaPlayerPrivate::setUpVideoRendering): Tell the client that the + rendering mode changed. + (WebCore::MediaPlayerPrivate::platformLayer): Method to vend the media layer. + * rendering/RenderLayerBacking.cpp: + (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Call setContentsToMedia() + here. + + * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Add platformLayer(). + * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: + (WebCore::MediaPlayerPrivate::platformLayer): Method to vend the media layer. + (WebCore::MediaPlayerPrivate::setUpVideoRendering): Call mediaPlayerRenderingModeChanged() + (WebCore::MediaPlayerPrivate::createLayerForMovie): Don't parent the layer ourselves any more. + + * rendering/RenderVideo.h: videoGraphicsLayer() is no longer needed. + * rendering/RenderVideo.cpp: Ditto. + +2010-02-12 Peter Kasting <pkasting@google.com> + + Reviewed by Adam Barth. + + Code cleanup in ImageDecoders; no functional change. + https://bugs.webkit.org/show_bug.cgi?id=28751 + + * Make code mostly comply with the style guide (switch indenting, use of + "!" vs. "== 0", don't unnecessarily wrap lines, etc.) + * Eliminate m_allDataReceived in ICO/BMP decoders since it's in the + base ImageDecoder class + * Remove some useless or wrong comments, add others + * Wrap comments at 80 columns (most already were) for + consistency/readability + * Avoid casts by using correct variable types + * Consistent naming of decode() function/args + * Shorter code in some places + * Make declaration and definition order match + + * platform/graphics/qt/ImageDecoderQt.cpp: + (WebCore::ImageDecoderQt::frameCount): + (WebCore::ImageDecoderQt::frameBufferAtIndex): + (WebCore::ImageDecoderQt::forceLoadEverything): + * platform/image-decoders/ImageDecoder.cpp: + (WebCore::ImageDecoder::create): + (WebCore::RGBA32Buffer::clear): + (WebCore::RGBA32Buffer::setSize): + * platform/image-decoders/ImageDecoder.h: + (WebCore::RGBA32Buffer::): + (WebCore::ImageDecoder::ImageDecoder): + * platform/image-decoders/bmp/BMPImageDecoder.cpp: + (WebCore::BMPImageDecoder::BMPImageDecoder): + (WebCore::BMPImageDecoder::setData): + (WebCore::BMPImageDecoder::isSizeAvailable): + (WebCore::BMPImageDecoder::frameBufferAtIndex): + (WebCore::BMPImageDecoder::decode): + (WebCore::BMPImageDecoder::decodeHelper): + (WebCore::BMPImageDecoder::processFileHeader): + * platform/image-decoders/bmp/BMPImageDecoder.h: + (WebCore::BMPImageDecoder::readUint32): + * platform/image-decoders/bmp/BMPImageReader.cpp: + (WebCore::BMPImageReader::BMPImageReader): + (WebCore::BMPImageReader::decodeBMP): + (WebCore::BMPImageReader::readInfoHeaderSize): + (WebCore::BMPImageReader::processInfoHeader): + (WebCore::BMPImageReader::readInfoHeader): + (WebCore::BMPImageReader::isInfoHeaderValid): + (WebCore::BMPImageReader::processBitmasks): + (WebCore::BMPImageReader::processColorTable): + (WebCore::BMPImageReader::processRLEData): + (WebCore::BMPImageReader::processNonRLEData): + * platform/image-decoders/bmp/BMPImageReader.h: + (WebCore::BMPImageReader::readUint32): + (WebCore::BMPImageReader::pastEndOfImage): + (WebCore::BMPImageReader::readCurrentPixel): + (WebCore::BMPImageReader::getComponent): + (WebCore::BMPImageReader::getAlpha): + (WebCore::BMPImageReader::setI): + (WebCore::BMPImageReader::setRGBA): + * platform/image-decoders/gif/GIFImageDecoder.cpp: + (WebCore::GIFImageDecoder::GIFImageDecoder): + (WebCore::GIFImageDecoder::setData): + (WebCore::GIFImageDecoder::isSizeAvailable): + (WebCore::GIFImageDecoder::frameCount): + (WebCore::GIFImageDecoder::frameBufferAtIndex): + (WebCore::GIFImageDecoder::clearFrameBufferCache): + (WebCore::GIFImageDecoder::sizeNowAvailable): + (WebCore::GIFImageDecoder::haveDecodedRow): + (WebCore::GIFImageDecoder::frameComplete): + (WebCore::GIFImageDecoder::decode): + (WebCore::GIFImageDecoder::initFrameBuffer): + * platform/image-decoders/gif/GIFImageDecoder.h: + (WebCore::GIFImageDecoder::): + (WebCore::GIFImageDecoder::filenameExtension): + * platform/image-decoders/gif/GIFImageReader.cpp: + (GIFImageReader::do_lzw): + (GIFImageReader::read): + * platform/image-decoders/gif/GIFImageReader.h: + (GIFImageReader::~GIFImageReader): + * platform/image-decoders/ico/ICOImageDecoder.cpp: + (WebCore::ICOImageDecoder::ICOImageDecoder): + (WebCore::ICOImageDecoder::~ICOImageDecoder): + (WebCore::ICOImageDecoder::setData): + (WebCore::ICOImageDecoder::isSizeAvailable): + (WebCore::ICOImageDecoder::frameSizeAtIndex): + (WebCore::ICOImageDecoder::frameCount): + (WebCore::ICOImageDecoder::frameBufferAtIndex): + (WebCore::ICOImageDecoder::compareEntries): + (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex): + (WebCore::ICOImageDecoder::decode): + (WebCore::ICOImageDecoder::decodeDirectory): + (WebCore::ICOImageDecoder::decodeAtIndex): + (WebCore::ICOImageDecoder::processDirectoryEntries): + (WebCore::ICOImageDecoder::readDirectoryEntry): + * platform/image-decoders/ico/ICOImageDecoder.h: + (WebCore::ICOImageDecoder::readUint16): + (WebCore::ICOImageDecoder::readUint32): + * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: + (WebCore::): + (WebCore::JPEGImageReader::JPEGImageReader): + (WebCore::JPEGImageReader::skipBytes): + (WebCore::JPEGImageReader::decode): + (WebCore::error_exit): + (WebCore::fill_input_buffer): + (WebCore::term_source): + (WebCore::JPEGImageDecoder::setData): + (WebCore::JPEGImageDecoder::setSize): + (WebCore::JPEGImageDecoder::frameBufferAtIndex): + (WebCore::JPEGImageDecoder::jpegComplete): + (WebCore::JPEGImageDecoder::decode): + * platform/image-decoders/jpeg/JPEGImageDecoder.h: + (WebCore::JPEGImageDecoder::filenameExtension): + * platform/image-decoders/png/PNGImageDecoder.cpp: + (WebCore::decodingFailed): + (WebCore::decodingWarning): + (WebCore::headerAvailable): + (WebCore::rowAvailable): + (WebCore::pngComplete): + (WebCore::PNGImageReader::PNGImageReader): + (WebCore::PNGImageReader::close): + (WebCore::PNGImageReader::decode): + (WebCore::PNGImageReader::createInterlaceBuffer): + (WebCore::PNGImageDecoder::setData): + (WebCore::PNGImageDecoder::frameBufferAtIndex): + (WebCore::PNGImageDecoder::headerAvailable): + (WebCore::PNGImageDecoder::rowAvailable): + (WebCore::PNGImageDecoder::pngComplete): + (WebCore::PNGImageDecoder::decode): + * platform/image-decoders/png/PNGImageDecoder.h: + (WebCore::PNGImageDecoder::filenameExtension): + * platform/image-decoders/qt/RGBA32BufferQt.cpp: + (WebCore::RGBA32Buffer::setDecodedImage): + +2010-02-16 Csaba Osztrogonác <ossy@webkit.org> + + [Qt] Unreviewed buildfix. + + * WebCore.pro: Missing backslash added. + +2010-02-16 Mikhail Naganov <mnaganov@chromium.org> + + Reviewed by Pavel Feldman. + + Move JSC-specific wrappers for Profile and ProfileNode to bindings/js. + + https://bugs.webkit.org/show_bug.cgi?id=34848 + + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * bindings/js/JavaScriptProfile.cpp: Added. + (WebCore::profileCache): + (WebCore::getTitleCallback): + (WebCore::getHeadCallback): + (WebCore::getUniqueIdCallback): + (WebCore::focus): + (WebCore::exclude): + (WebCore::restoreAll): + (WebCore::finalize): + (WebCore::ProfileClass): + (WebCore::toJS): + * bindings/js/JavaScriptProfile.h: Added. + * bindings/js/JavaScriptProfileNode.cpp: Added. + (WebCore::profileNodeCache): + (WebCore::getFunctionName): + (WebCore::getURL): + (WebCore::getLineNumber): + (WebCore::getTotalTime): + (WebCore::getSelfTime): + (WebCore::getNumberOfCalls): + (WebCore::getChildren): + (WebCore::getVisible): + (WebCore::getCallUID): + (WebCore::finalize): + (WebCore::ProfileNodeClass): + (WebCore::toJS): + * bindings/js/JavaScriptProfileNode.h: Added. + * inspector/JavaScriptProfile.cpp: Removed. + * inspector/JavaScriptProfile.h: Removed. + * inspector/JavaScriptProfileNode.cpp: Removed. + * inspector/JavaScriptProfileNode.h: Removed. + +2010-02-16 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: Elements Panel: Limit the number of initially loaded element children + https://bugs.webkit.org/show_bug.cgi?id=34421 + + Test: inspector/elements-panel-limited-children.html + + * English.lproj/localizedStrings.js: + * inspector/front-end/DOMAgent.js: + (WebInspector.DOMNode.prototype._insertChild): + * inspector/front-end/ElementsPanel.js: + (WebInspector.ElementsPanel.prototype.updateModifiedNodes): + * inspector/front-end/ElementsTreeOutline.js: + (WebInspector.ElementsTreeOutline.prototype.createTreeElementFor): + (WebInspector.ElementsTreeOutline.prototype.revealAndSelectNode): + (WebInspector.ElementsTreeElement): + (WebInspector.ElementsTreeElement.prototype.get expandedChildrenLimit): + (WebInspector.ElementsTreeElement.prototype.set expandedChildrenLimit): + (WebInspector.ElementsTreeElement.prototype.get expandedChildCount): + (WebInspector.ElementsTreeElement.prototype.showChild): + (WebInspector.ElementsTreeElement.prototype.insertChildElement): + (WebInspector.ElementsTreeElement.prototype.moveChild): + (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode): + (WebInspector.ElementsTreeElement.prototype._updateChildren): + (WebInspector.ElementsTreeElement.prototype.adjustCollapsedRange): + (WebInspector.ElementsTreeElement.prototype.handleLoadAllChildren): + (): + * inspector/front-end/inspector.css: + +2010-02-16 Ismail Donmez <ismail@namtrac.org> + + Reviewed by Pavel Feldman. + + Fix compilation with inspector disabled. + https://bugs.webkit.org/show_bug.cgi?id=32724 + + * rendering/RenderLayerBacking.cpp: + (WebCore::inspectorTimelineAgent): + +2010-02-16 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: turn off line wrapping in source view. + + https://bugs.webkit.org/show_bug.cgi?id=34935 + + * inspector/front-end/TextViewer.js: + (WebInspector.TextViewer.prototype.markAndRevealRange): + (WebInspector.TextViewer.prototype._paintLine): + * inspector/front-end/textViewer.css: + * inspector/front-end/utilities.js: + +2010-02-16 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: let search iterate over views in Resources + and keep the view in Scripts. + + https://bugs.webkit.org/show_bug.cgi?id=34968 + + * inspector/front-end/Panel.js: + (WebInspector.Panel.prototype.jumpToNextSearchResult): + (WebInspector.Panel.prototype.jumpToPreviousSearchResult): + (WebInspector.Panel.prototype.showSourceLineForURL): + (WebInspector.Panel.prototype.searchIteratesOverViews): + * inspector/front-end/ResourcesPanel.js: + (WebInspector.ResourcesPanel.prototype.get _resources): + (WebInspector.ResourcesPanel.prototype.searchIteratesOverViews): + * inspector/front-end/SourceView.js: + (WebInspector.SourceView.prototype.showingLastSearchResult): + * inspector/front-end/inspector.js: + (WebInspector.documentKeyDown): + (WebInspector.focusSearchField): + +2010-02-16 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Ariya Hidayat. + + [Qt] canvas clipping is buggy + https://bugs.webkit.org/show_bug.cgi?id=32405 + + Apparently the bug was in GraphicsContext::roundToDevicePixels, we + didn't take unto accounts rotation, so the device pixels were rounded + incorrectly. The new formula is a 1:1 copy from GraphicsContextCG so + it should be rather safe + + Test: http://glimr.rubyforge.org/cake/canvas.html#Polaroids now looks right + + * platform/graphics/qt/GraphicsContextQt.cpp: + (WebCore::GraphicsContext::roundToDevicePixels): Copy the formula from + GraphicsContextCG + +2010-02-16 Yury Semikhatsky <yurys@chromium.org> + + Not Reviewed, build fix. + + * platform/graphics/FloatRect.h: + (WebCore::FloatRect::center): make conversion from float to int explicit so that compiler + doesn't complain about that. + +2010-02-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7645609> [webView selectionRect] API is broken for multicolumn layout + + Refine the fix for https://bugs.webkit.org/show_bug.cgi?id=34923 by using the center of + a quad’s bounding box, rather than its top left, as the reference point passed to + offsetFromContainer(). This ensures that if a sliver off the top of the selection rect is in + one column, but most of it is on another column, the single rect we return will be for the + second column. + + * platform/graphics/FloatRect.h: + (WebCore::FloatRect::center): Added. + * rendering/RenderObject.cpp: + (WebCore::RenderObject::localToContainerQuad): Use the center instead of the top left. + +2010-02-15 MORITA Hajime <morrita@gmail.com> + + Reviewed by Nikolas Zimmermann. + + SVG text refactor: reduce paint specific callbacks on SVGTextChunkWalker + + https://bugs.webkit.org/show_bug.cgi?id=34831 + + No new tests, no change of functionality. + + * rendering/SVGCharacterLayoutInfo.h: + (WebCore::SVGTextChunkWalker::SVGTextChunkWalker): + Removed setupBackground(), setupFill(), setupFillSelection(), + setupStroke(), setupStrokeSelection(), setupForeground() + and associated member variables. + + * rendering/SVGRootInlineBox.cpp: + (WebCore::SVGRootInlineBoxPaintWalker::setupBackground): + renamed from chunkSetupBackgroundCallback. + (WebCore::SVGRootInlineBoxPaintWalker::setupFill): + renamed from chunkSetupFillCallback. + (WebCore::SVGRootInlineBoxPaintWalker::setupFillSelection): + renamed from chunkSetupFillSelectionCallback. + (WebCore::SVGRootInlineBoxPaintWalker::setupStroke): + renamed from chunkSetupStrokeCallback. + (WebCore::SVGRootInlineBoxPaintWalker::setupStrokeSelection): + renamed from chunkSetupStrokeSelectionCallback. + (WebCore::SVGRootInlineBoxPaintWalker::setupForeground): + renamed from chunkSetupForegroundCallback. + (WebCore::SVGRootInlineBoxPaintWalker::paintChunk): + renamed from chunkPortionCallback. + (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback): + extracted from walkTextChunks. + (WebCore::SVGRootInlineBox::paint): + follow SVGTextChunkWalker change. + (WebCore::SVGRootInlineBox::walkTextChunks): + moved paint some specific code to SVGRootInlineBoxPaintWalker::chunkPortionCallback(). + +2010-02-15 Dan Bernstein <mitz@apple.com> + + Try to fix the Chromium build. + + * rendering/RenderThemeChromiumMac.mm: + (WebCore::RenderThemeChromiumMac::convertToPaintingRect): + +2010-02-14 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Many false leaks in release builds due to PtrAndFlags + + PtrAndFlags has now been removed; remove forwarding header. + + * ForwardingHeaders/wtf/PtrAndFlags.h: Removed. + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 34952 - String lengths in UString should be unsigned. + This matches WebCore::StringImpl, and better unifies behaviour throughout JSC. + + * bindings/js/JSDOMWindowCustom.cpp: + (WebCore::JSDOMWindow::atob): + (WebCore::JSDOMWindow::btoa): + +2010-02-15 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + [GTK] Crashes when going back to a page that has data: URIs, with page cache enabled + https://bugs.webkit.org/show_bug.cgi?id=34944 + + Set the URL in the newly created response, when parsing data: + URIs. + + Test: fast/harness/page-cache-crash-on-data-urls.html + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::parseDataUrl): + +2010-02-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7647300> Incorrect client rects for blocks the span multiple columns and their descendants + https://bugs.webkit.org/show_bug.cgi?id=34923 + + Test: fast/multicol/client-rects.html + + In column layout, a different transform applies to different points in + the block and its descendants, depending on their y coordinate within the + block. offsetFromContainer() used to return the offset that applied to + the origin. With this change, it returns the offset that applies to a + given reference point. When mapping a quad from local to absolute + coordinates, the top left of the quad’s bounding box is used as that + reference point. + + * editing/SelectionController.cpp: + (WebCore::SelectionController::layout): Pass the caret’s origin as the + reference point to offsetFromContainer(). + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::adjustForColumns): Adds the offset between the + given point and its image under the column paint-time transform to the + given offset. Used by offsetFromContainer() where it had previously used + adjustRectForColumns(), which takes a rect and operates less efficiently. + * rendering/RenderBlock.h: + * rendering/RenderBox.cpp: + (WebCore::RenderBox::mapLocalToContainer): Pass the transformed point as + the reference point to offsetFromContainer(). + (WebCore::RenderBox::mapAbsoluteToLocalPoint): Pass a point to + offsetFromContainer(). + (WebCore::RenderBox::offsetFromContainer): Use adjustForColumns() instead + of adjustRectForColumns(), and use the reference point to get the right + adjustment for the point of interest, instead of the origin, in case this + box spans multiple columns. + * rendering/RenderBox.h: + * rendering/RenderInline.cpp: + (WebCore::RenderInline::offsetFromContainer): Ditto. Actually apply the + column offset to the computation, which previously this function didn’t + do. + (WebCore::RenderInline::mapLocalToContainer): Pass the transformed point + as the reference point to offsetFromContainer(). + (WebCore::RenderInline::mapAbsoluteToLocalPoint): Pass a point to + offsetFromContainer(). + * rendering/RenderInline.h: + * rendering/RenderObject.cpp: + (WebCore::RenderObject::mapLocalToContainer): Apply column adjustment, + based on the reference point, to the transform if needed. + (WebCore::RenderObject::localToContainerQuad): Initialize the + TransformState with the top left corner of the quad’s bounding box. It + is later used as the reference point when deciding on which column to + base the calculations. + (WebCore::RenderObject::offsetFromContainer): Adjust for columns. + (WebCore::RenderObject::offsetFromAncestorContainer): Pass the origin + as the reference point to offsetFromContainer(). + * rendering/RenderObject.h: + (WebCore::RenderObject::adjustForColumns): Added. + * rendering/RenderTableCell.cpp: + (WebCore::RenderTableCell::offsetFromContainer): Pass the reference + point through. + * rendering/RenderTableCell.h: + * rendering/RenderText.cpp: + (WebCore::RenderText::absoluteRectsForRange): Map (the origin of) each + rect to absolute coordinates individually. + * rendering/RenderThemeMac.mm: + (WebCore::RenderThemeMac::convertToPaintingRect): Pass a point to + offsetFromContainer(). + +2010-02-12 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/7130641> Browser objects identity is not preserved by Safari + + Test: plugins/netscape-browser-object-identity.html + + * bridge/runtime_root.h: (JSC::Bindings::RootObject::addInvalidationCallback): + RootObject can now call out during invalidation, making it possible for other code to know + when this happens. + + * bridge/runtime_root.cpp: + (JSC::Bindings::RootObject::InvalidationCallback::~InvalidationCallback): Empty destructor, + in cpp file since it's virtual. + (JSC::Bindings::RootObject::invalidate): Invoke invalidation callbacks. + + * bridge/NP_jsobject.cpp: + (ObjectMap): Keep a JSObject->NPObject map for each RootObject. It somewhat cleaner to + keep it outside RootObject, because (1) it is agnostic of what kinds of objects can wrap + JSObject, and (2) out of process NPAPI implementation also keeps its corresponding map + separately, due to supporting per-instance granularity (as opposed to per-RootObject here). + (jsDeallocate): Remove the corresponding map entry. + (_NPN_CreateScriptObject): Try to fetch existing object from the map, incrementing refcount. + +2010-02-15 Philippe Normand <pnormand@igalia.com> + + Rubber-stamped by Gustavo Noronha Silva. + + Removed redefine of LOG_VERBOSE. This should not have commited in + the first place. + + * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: + +2010-02-15 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: incorrect syntax highlighting as HTML in a script tag. + We were preserving initial lexer state upon entering other tags while in <script> + but were not doing it for <script tag itself. As a result, nested script + tags were failing to highlight. + + https://bugs.webkit.org/show_bug.cgi?id=34934 + + * inspector/front-end/SourceHTMLTokenizer.js: + (WebInspector.SourceHTMLTokenizer.prototype.nextToken): + * inspector/front-end/SourceHTMLTokenizer.re2js: + +2010-02-15 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein. + + Add a progress-indicator logging channel to WebCore, and convert the old WebKit Logging + messages over to WebCore-style. + + No new tests. (Logging changes only) + + * loader/ProgressTracker.cpp: + (WebCore::ProgressTracker::progressStarted): + (WebCore::ProgressTracker::progressCompleted): + (WebCore::ProgressTracker::finalProgressComplete): + (WebCore::ProgressTracker::incrementProgress): + + * platform/Logging.cpp: + (WebCore::): + (WebCore::getChannelFromName): + * platform/Logging.h: + +2010-02-15 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] QtWebkit bridge: enable passing a QWebElement to a signal/slot/property + https://bugs.webkit.org/show_bug.cgi?id=34901 + + When a signal/slot/property is of type QWebElement, it can seamlessly + connect with JS objects that hold a WebCore element. + + New tests, see WebKit/qt/ChangeLog + + * bridge/qt/qt_runtime.cpp: + (JSC::Bindings::QtWebElementRuntime::create): A proxy to QWebElement + constructor + (JSC::Bindings::QtWebElementRuntime::get): A proxy to + QWebElement::element + (JSC::Bindings::convertValueToQVariant): handle QWebElement + (JSC::Bindings::convertQVariantToValue): handle QWebElement + +2010-02-15 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed, Chromium build fix (force conversion of property names to + strings in Web Inspector's injected script). + + * inspector/front-end/InjectedScript.js: + (injectedScriptConstructor): + +2010-02-15 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed: touch InspectorController in order to kick win bot tests + with new injected script contents. + + * inspector/InspectorController.cpp: + +2010-02-14 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: highlight actual search match in elements panel. + + https://bugs.webkit.org/show_bug.cgi?id=34251 + + * inspector/front-end/ElementsPanel.js: + (WebInspector.ElementsPanel.prototype.searchCanceled): + (WebInspector.ElementsPanel.prototype.performSearch): + (WebInspector.ElementsPanel.prototype.addNodesToSearchResult): + (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult): + (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult): + (WebInspector.ElementsPanel.prototype._highlightCurrentSearchResult): + (WebInspector.ElementsPanel.prototype._hideSearchHighlights): + * inspector/front-end/InjectedScript.js: + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype.findSearchMatches): + * inspector/front-end/TextViewer.js: + (WebInspector.TextViewer.prototype._paintLine): + * inspector/front-end/textViewer.css: + * inspector/front-end/utilities.js: + +2010-02-14 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: XPathResult objects are not expanded in console. + + https://bugs.webkit.org/show_bug.cgi?id=34926 + + * inspector/front-end/InjectedScript.js: + (injectedScriptConstructor): + * inspector/front-end/ObjectPropertiesSection.js: + (WebInspector.ObjectPropertiesSection.prototype.updateProperties): + (WebInspector.ObjectPropertiesSection.CompareProperties): + (WebInspector.ObjectPropertyTreeElement.prototype.update): + * inspector/front-end/Section.js: + (WebInspector.Section): + * inspector/front-end/inspector.css: + +2010-02-10 Philippe Normand <pnormand@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [Gtk] wrong video aspect ratio + https://bugs.webkit.org/show_bug.cgi?id=34790 + + Fixed natural size calculation regarding pixel aspect ratio and + display aspect ratio. + + Test: media/video-display-aspect-ratio.html + + * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: + (WebCore::greatestCommonDivisor): + (WebCore::MediaPlayerPrivate::naturalSize): + +2010-02-14 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + HTML5 iframe sandbox bypass of window.top.location navigation via <form target="_top"> + https://bugs.webkit.org/show_bug.cgi?id=33277 + + submitForm wasn't respecting shouldAllowNavigation. Instead of calling + the wrapper function, we need to call shouldAllowNavigation because we + need to handle the "frame not found" case differently than the + "navigation denied" case. + + Test: http/tests/security/sandboxed-iframe-form-top.html + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::submitForm): + +2010-02-14 Kent Tamura <tkent@chromium.org> + + No review. Touch RenderRuny*.cpp to fix Chromium/Windows build bot. + + * rendering/RenderRuby.cpp: Add a comment for #endf. + * rendering/RenderRubyBase.cpp: Add a comment for #endf. + * rendering/RenderRubyRun.cpp: Add a comment for #endf. + * rendering/RenderRubyText.cpp: Add a comment for #endf. + +2010-02-13 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: cache created row, span and text elements + in TextView to improve scroller performance on debug build. + + https://bugs.webkit.org/show_bug.cgi?id=34921 + + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype.set visible): + * inspector/front-end/TextViewer.js: + (WebInspector.TextViewer): + (WebInspector.TextViewer.prototype.freeCachedElements): + (WebInspector.TextViewer.prototype._buildChunks): + (WebInspector.TextViewer.prototype._makeLineAChunk): + (WebInspector.TextViewer.prototype._paintLine): + (WebInspector.TextViewer.prototype._releaseLines): + (WebInspector.TextViewer.prototype._appendSpan): + (WebInspector.TextViewer.prototype._appendTextNode): + (WebInspector.TextChunk): + (WebInspector.TextChunk.prototype.set expanded): + (WebInspector.TextChunk.prototype._lineNumberText): + (WebInspector.TextChunk.prototype._createRow): + +2010-02-13 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Refactor parsing/serialization functions in HTMLInputElement. + https://bugs.webkit.org/show_bug.cgi?id=34852 + + - Rename formStringToDouble() to parseToDoubleForNumberType() + - Rename formStringToDateComponents() to parseToDateComponents() + - Rename formStringFromDouble() to serializeForNumberType() + - Add serializeForDateTimeTypes() + The code is moved from setValueAsDate() and setDateValue(). + - Add serialize() + + parseToDouble() is the top-level function to parse a + type-dependent string and return a double + value. parseToDoubleForNumber() and parseToDateComponents() + functions are helper functions for it. serialize() is the + top-level function to serialize a double value to a type-dependent + string, and serializeForNumberType() and + serializeForDateTimeTypes() are helper functions for it. + + No tests because of no functional changes. + + * html/HTMLInputElement.cpp: + (WebCore::HTMLInputElement::stepMismatch): + (WebCore::HTMLInputElement::getAllowedValueStep): + (WebCore::HTMLInputElement::parseToDouble): + (WebCore::HTMLInputElement::valueAsDate): + (WebCore::HTMLInputElement::setValueAsDate): + (WebCore::HTMLInputElement::setValueAsNumber): + (WebCore::HTMLInputElement::serializeForDateTimeTypes): + (WebCore::HTMLInputElement::serialize): + (WebCore::HTMLInputElement::serializeForNumberType): + (WebCore::HTMLInputElement::parseToDoubleForNumberType): + (WebCore::HTMLInputElement::parseToDateComponents): + * html/HTMLInputElement.h: + * html/ValidityState.cpp: + (WebCore::ValidityState::typeMismatch): + * rendering/RenderSlider.cpp: + (WebCore::SliderRange::valueFromElement): + (WebCore::RenderSlider::updateFromElement): + (WebCore::RenderSlider::setValueForPosition): + +2010-01-05 Ojan Vafai <ojan@chromium.org> + + Reviewed by Dan Bernstein. + + Improve text control intrinsic widths. + https://bugs.webkit.org/show_bug.cgi?id=25566 + https://bugs.webkit.org/show_bug.cgi?id=25581 + https://bugs.webkit.org/show_bug.cgi?id=25958 + + For Mac fonts that have invalid avgCharWidth entries in the OS/2 table, + fallback to the Safari 4- behavior of using the width of a zero. For other + fonts, make Mac match Windows (and thus IE) metrics. + + Lucida Grande is hard-coded to match MS Shell Dlg for inputs and + Courier New for textareas in order to match Safari Win, Firefox and, in + some cases IE (IE uses different default fonts depending on encoding). + + The only case where we still don't match Windows is if no font-size is + set. The default font-size for form controls on the Mac is smaller and + thus text-control widths will be slightly smaller. + + No new tests. Covered by existing tests. + + * platform/graphics/mac/SimpleFontDataMac.mm: + (WebCore::SimpleFontData::platformCharWidthInit): + * rendering/RenderTextControl.cpp: + (WebCore::): + (WebCore::RenderTextControl::hasValidAvgCharWidth): + (WebCore::RenderTextControl::getAvgCharWidth): + (WebCore::RenderTextControl::calcPrefWidths): + * rendering/RenderTextControl.h: + (WebCore::RenderTextControl::scaleEmToUnits): + * rendering/RenderTextControlMultiLine.cpp: + (WebCore::RenderTextControlMultiLine::getAvgCharWidth): + * rendering/RenderTextControlMultiLine.h: + * rendering/RenderTextControlSingleLine.cpp: + (WebCore::RenderTextControlSingleLine::getAvgCharWidth): + (WebCore::RenderTextControlSingleLine::preferredContentWidth): + * rendering/RenderTextControlSingleLine.h: + +2010-02-11 Ariya Hidayat <ariya.hidayat@gmail.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Unnecessary QBrush construction for doing a solid color stroke + https://bugs.webkit.org/show_bug.cgi?id=34874 + + Use the similar trick like in r54347, i.e. use the special brush for + solid color to avoid expensive QBrush constructor. + + * platform/graphics/qt/GraphicsContextQt.cpp: + (WebCore::GraphicsContext::setPlatformStrokeColor): + +2010-02-11 Darin Fisher <darin@chromium.org> + + Reviewed by Jeremy Orlow. + + Pass the Document along to the ChromiumBridge cookie methods. + + https://bugs.webkit.org/show_bug.cgi?id=34878 + + * platform/chromium/ChromiumBridge.h: + * platform/network/chromium/CookieJarChromium.cpp: + (WebCore::setCookies): + (WebCore::cookies): + (WebCore::cookiesEnabled): + (WebCore::getRawCookies): + (WebCore::deleteCookie): + +2010-02-12 Eric Seidel <eric@webkit.org> + + No review, rolling out r54694. + http://trac.webkit.org/changeset/54694 + https://bugs.webkit.org/show_bug.cgi?id=34633 + + This appears to have caused crashes on the Leopard bot. See + bug 34898. + + * websockets/ThreadableWebSocketChannelClientWrapper.h: + (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): + * websockets/WebSocket.cpp: + (WebCore::WebSocket::WebSocket): + (WebCore::WebSocket::send): + (WebCore::WebSocket::close): + (WebCore::WebSocket::bufferedAmount): + (WebCore::WebSocket::didConnect): + (WebCore::WebSocket::didClose): + * websockets/WebSocket.h: + * websockets/WebSocketChannel.cpp: + (WebCore::WebSocketChannel::WebSocketChannel): + (WebCore::WebSocketChannel::send): + (WebCore::WebSocketChannel::bufferedAmount): + (WebCore::WebSocketChannel::didClose): + * websockets/WebSocketChannel.h: + * websockets/WebSocketChannelClient.h: + (WebCore::WebSocketChannelClient::didClose): + * websockets/WorkerThreadableWebSocketChannel.cpp: + (WebCore::workerContextDidClose): + (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): + * websockets/WorkerThreadableWebSocketChannel.h: + +2010-02-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Workers' EventListeners should be removed before JSGlobalData is destroyed + https://bugs.webkit.org/show_bug.cgi?id=34903 + + (Patch co-developed with Alexey Proskuryakov). + + Since http://trac.webkit.org/changeset/54460 the EventListeners registered by a + worker thread are not removed until after the thread's JSGlobalData has been + destroyed. This is slightly worrisome since the JSEventListener contains + JSObject*s, which will be dangling once the heap is destroyed. The + JSEventListeners may also reference the worker thread's normal world, which + again it makes no sense to keep around after the JSGlobalData is freed. + + Remove all event listeners immediately prior to tearing down the JSGlobalData. + + https://bugs.webkit.org/show_bug.cgi?id=34728 addressed the symptoms of this + problem, and it is probably cleaner to make the client data's normal world no + longer be a member (since it is a ref-counted object), however they should be + no requirement to 'detatch' – it makes no sense for anyone to be referencing + the world after the JSGlobalData has gone away (the world's purpose is to hold + wrapper objects in the JSGlobalData's heap). Keep the restructuring that makes + the normal world no longer be a member, but remove the detach mechanism this + patch added & replace with stronger ASSERTs. + + * bindings/js/JSDOMBinding.cpp: + (WebCore::DOMWrapperWorld::~DOMWrapperWorld): + * bindings/js/JSDOMBinding.h: + (WebCore::WebCoreJSClientData::~WebCoreJSClientData): + * workers/WorkerThread.cpp: + (WebCore::WorkerThreadShutdownStartTask::performTask): + +2010-02-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Remove uses of PtrAndFlags from WebCore::StringImpl. + + These break the OS X Leaks tool. Use a bits stolen from the refCount to hold the + 'InTable' and 'HasTerminatingNullCharacter' flags, along with the string type + (fixes a leak where the string data is allocated at the address (this + 1), and is + misinterpreted as being an internal buffer). + + * WebCore.base.exp: + * platform/text/StringImpl.cpp: + (WebCore::StringImpl::StringImpl): + (WebCore::StringImpl::~StringImpl): + (WebCore::StringImpl::create): + (WebCore::StringImpl::createWithTerminatingNullCharacter): + (WebCore::StringImpl::crossThreadString): + (WebCore::StringImpl::sharedBuffer): + * platform/text/StringImpl.h: + (WebCore::StringImpl::): + (WebCore::StringImpl::hasTerminatingNullCharacter): + (WebCore::StringImpl::inTable): + (WebCore::StringImpl::setInTable): + (WebCore::StringImpl::ref): + (WebCore::StringImpl::deref): + (WebCore::StringImpl::hasOneRef): + (WebCore::StringImpl::operator new): + (WebCore::StringImpl::bufferOwnership): + * storage/OriginUsageRecord.cpp: + (WebCore::OriginUsageRecord::addDatabase): + (WebCore::OriginUsageRecord::markDatabase): + +2010-02-12 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Dirk Schulze. + + Repaint bug on Text selection in foreignObject + https://bugs.webkit.org/show_bug.cgi?id=16939 + + Tests: svg/overflow/overflow-on-foreignObject.svg + svg/text/foreignObject-text-clipping-bug.xml + + Selecting text contained in <foreignObject> leads to artefacts. Same for zooming/panning. + RenderForeignObject contained old legacy code returning FloatRect() for repaintRectInLocalCoordinates, + which is obviously wrong. Fixing that leads to even more problems, as the underlying RenderBlock + did not reflect the x/y translation set on the <foreignObject>. This is problematic, as laying out + positioned objects in the XHTML subtree depends on proper size/location values of the frameRect. + + Correctly clip on overflow="hidden". overflow="scroll" & friends are not yet supported, see lengthy + comment in RenderSVGBlock why we either need RenderLayer for RenderForeignObject or need to rework + overflow handling to avoid RenderLayer. + + SVGForeignObjectElement uses a hacky custom solution to synchronize CSS width/height properties with + the SVG width/height attributes. Remove all of that code and just implement calcWidth/calcHeight in + RenderForeignObject, grabbing the right values from SVGForeignObjectElement::width/height upon layout. + + * rendering/RenderForeignObject.cpp: + (WebCore::RenderForeignObject::paint): Clip properly to the actual bounds of the foreignObject, respecting that x/y translation is handled by RenderBlock now. + (WebCore::RenderForeignObject::clippedOverflowRectForRepaint): Added missing function, forward to SVGRenderBase just like all other SVG renderers. + (WebCore::RenderForeignObject::computeRectForRepaint): Remove manual implementation, forward to SVGRenderBase. + (WebCore::RenderForeignObject::localToParentTransform): Respect x/y translation here _after_ applying localTransform(). + (WebCore::RenderForeignObject::calcWidth): Override RenderBlock::calcWidth to grab width() from SVGForeignObjectElement. + (WebCore::RenderForeignObject::calcHeight): Override RenderBlock::calcHeight to grab height() from SVGForeignObjectElement. + (WebCore::RenderForeignObject::layout): Calculate viewport once and cache it. Push x/y location down to RenderBlock - analogous to RenderSVGText. + (WebCore::RenderForeignObject::nodeAtFloatPoint): Adapt to x/y translation changes (map through localTransform, not localToParentTransform). Respect overflow clipping. + (WebCore::RenderForeignObject::mapLocalToContainer): Set useTransforms=true, to avoid assertions when selecting text in foreign objects. + * rendering/RenderForeignObject.h: + (WebCore::RenderForeignObject::objectBoundingBox): Return cached m_viewport. + (WebCore::RenderForeignObject::strokeBoundingBox): Ditto. + (WebCore::RenderForeignObject::repaintRectInLocalCoordinates): Ditto. + * rendering/RenderSVGBlock.cpp: + (WebCore::RenderSVGBlock::setStyle): Cleanup code, move setHasOverflowClip() overrides in updateBoxModelInfoFromStyle where it belongs. + (WebCore::RenderSVGBlock::updateBoxModelInfoFromStyle): Added to force setting setHasOverflowClip(false). + * rendering/RenderSVGBlock.h: + * svg/SVGForeignObjectElement.cpp: Kill a lot of custom code - it was just plain wrong to utilize CSS to push width/height information down to RenderBlock. + (WebCore::SVGForeignObjectElement::svgAttributeChanged): + 2010-02-12 Dan Bernstein <mitz@apple.com> Reviewed by Simon Fraser. @@ -152,6 +3012,31 @@ * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage): use cookieRequestHeaderFieldValue() instead of cookies() to include HttpOnly cookies. +2010-02-16 Sebastian Dröge <sebastian.droege@collabora.co.uk> + + Reviewed by Gustavo Noronha Silva. + + Notify about size changes in the WebKit GStreamer source. + + https://bugs.webkit.org/show_bug.cgi?id=34881 + + * platform/graphics/gtk/WebKitWebSourceGStreamer.cpp: + (webkit_web_src_init): + (StreamingClient::didReceiveResponse): + * platform/graphics/gtk/WebKitWebSourceGStreamer.h: + This makes sure that other GStreamer elements know about the + size and on-disk buffering actually works. + Only notify about size changes if gst-plugins-base before + 0.10.27 is used, because from that version onwards this is + automatically handled. + + If appsrc 0.10.27 or later is used, set the min-percent property + to 20% to allow more time to pass between the need-data signal + and starvation of the pipeline. + + Also reset the size when stopping the source and send EOS + on seeking failures. + 2010-02-11 Ariya Hidayat <ariya.hidayat@gmail.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js Binary files differindex 9196692..65d9528 100644 --- a/WebCore/English.lproj/localizedStrings.js +++ b/WebCore/English.lproj/localizedStrings.js diff --git a/WebCore/ForwardingHeaders/wtf/PtrAndFlags.h b/WebCore/ForwardingHeaders/wtf/PtrAndFlags.h deleted file mode 100644 index bb6ed9a..0000000 --- a/WebCore/ForwardingHeaders/wtf/PtrAndFlags.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef WebCore_FWD_PtrAndFlags_h -#define WebCore_FWD_PtrAndFlags_h -#include <JavaScriptCore/PtrAndFlags.h> -#endif - diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am index e0c9dc6..17fe33f 100644 --- a/WebCore/GNUmakefile.am +++ b/WebCore/GNUmakefile.am @@ -465,6 +465,10 @@ webcore_sources += \ WebCore/bindings/js/JSXSLTProcessorConstructor.cpp \ WebCore/bindings/js/JSXSLTProcessorConstructor.h \ WebCore/bindings/js/JSXSLTProcessorCustom.cpp \ + WebCore/bindings/js/JavaScriptProfile.cpp \ + WebCore/bindings/js/JavaScriptProfile.h \ + WebCore/bindings/js/JavaScriptProfileNode.cpp \ + WebCore/bindings/js/JavaScriptProfileNode.h \ WebCore/bindings/js/ScheduledAction.cpp \ WebCore/bindings/js/ScheduledAction.h \ WebCore/bindings/js/ScriptArray.cpp \ @@ -1224,10 +1228,6 @@ webcore_sources += \ WebCore/inspector/JavaScriptDebugListener.h \ WebCore/inspector/JavaScriptDebugServer.cpp \ WebCore/inspector/JavaScriptDebugServer.h \ - WebCore/inspector/JavaScriptProfile.cpp \ - WebCore/inspector/JavaScriptProfile.h \ - WebCore/inspector/JavaScriptProfileNode.cpp \ - WebCore/inspector/JavaScriptProfileNode.h \ WebCore/inspector/TimelineRecordFactory.cpp \ WebCore/inspector/TimelineRecordFactory.h \ WebCore/loader/Cache.cpp \ @@ -2990,6 +2990,9 @@ webcore_sources += \ WebCore/rendering/RenderSVGInlineText.h \ WebCore/rendering/RenderSVGModelObject.cpp \ WebCore/rendering/RenderSVGModelObject.h \ + WebCore/rendering/RenderSVGResource.h \ + WebCore/rendering/RenderSVGResourceMasker.cpp \ + WebCore/rendering/RenderSVGResourceMasker.h \ WebCore/rendering/RenderSVGRoot.cpp \ WebCore/rendering/RenderSVGRoot.h \ WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp \ @@ -3332,8 +3335,6 @@ webcore_sources += \ WebCore/svg/graphics/SVGResourceListener.h \ WebCore/svg/graphics/SVGResourceMarker.cpp \ WebCore/svg/graphics/SVGResourceMarker.h \ - WebCore/svg/graphics/SVGResourceMasker.cpp \ - WebCore/svg/graphics/SVGResourceMasker.h \ WebCore/svg/graphics/filters/SVGDistantLightSource.h \ WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp \ WebCore/svg/graphics/filters/SVGFEConvolveMatrix.h \ diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp index a0a5262..2afdd34 100644 --- a/WebCore/WebCore.base.exp +++ b/WebCore/WebCore.base.exp @@ -144,7 +144,6 @@ __ZN7WebCore10StringImpl7ustringEv __ZN7WebCore10StringImpl8endsWithEPS0_b __ZN7WebCore10StringImplD1Ev __ZN7WebCore10StringImplcvP8NSStringEv -__ZN7WebCore10StringImpldlEPv __ZN7WebCore10handCursorEv __ZN7WebCore10setCookiesEPNS_8DocumentERKNS_4KURLERKNS_6StringE __ZN7WebCore11BitmapImageC1EP7CGImagePNS_13ImageObserverE @@ -495,6 +494,7 @@ __ZN7WebCore4Page14setMediaVolumeEf __ZN7WebCore4Page15addSchedulePairEN3WTF10PassRefPtrINS_12SchedulePairEEE __ZN7WebCore4Page15backForwardListEv __ZN7WebCore4Page15didMoveOnscreenEv +__ZN7WebCore4Page16setCanStartMediaEb __ZN7WebCore4Page16setDefersLoadingEb __ZN7WebCore4Page17willMoveOffscreenEv __ZN7WebCore4Page18removeSchedulePairEN3WTF10PassRefPtrINS_12SchedulePairEEE @@ -653,7 +653,6 @@ __ZN7WebCore8Settings23setEditableLinkBehaviorENS_20EditableLinkBehaviorE __ZN7WebCore8Settings23setLoadDeferringEnabledEb __ZN7WebCore8Settings23setNeedsTigerMailQuirksEb __ZN7WebCore8Settings23setPluginAllowedRunTimeEj -__ZN7WebCore8Settings28setFrameSetFlatteningEnabledEb __ZN7WebCore8Settings23setUsesEncodingDetectorEb __ZN7WebCore8Settings24setApplicationChromeModeEb __ZN7WebCore8Settings24setTextAreasAreResizableEb @@ -669,8 +668,10 @@ __ZN7WebCore8Settings27setFTPDirectoryTemplatePathERKNS_6StringE __ZN7WebCore8Settings27setLoadsImagesAutomaticallyEb __ZN7WebCore8Settings27setLocalStorageDatabasePathERKNS_6StringE __ZN7WebCore8Settings28setForceFTPDirectoryListingsEb +__ZN7WebCore8Settings28setFrameSetFlatteningEnabledEb __ZN7WebCore8Settings29setAuthorAndUserStylesEnabledEb __ZN7WebCore8Settings29setWebArchiveDebugModeEnabledEb +__ZN7WebCore8Settings30setAllowFileAccessFromFileURLsEb __ZN7WebCore8Settings31setShrinksStandaloneImagesToFitEb __ZN7WebCore8Settings32setAcceleratedCompositingEnabledEb __ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb @@ -712,6 +713,9 @@ __ZN7WebCore9FrameView23updateCanHaveScrollbarsEv __ZN7WebCore9FrameView29forceLayoutWithPageWidthRangeEffb __ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb __ZN7WebCore9FrameView29syncCompositingStateRecursiveEv +__ZNK7WebCore9FrameView20isSoftwareRenderableEv +__ZN7WebCore9FrameView16setPaintBehaviorEj +__ZNK7WebCore9FrameView13paintBehaviorEv __ZN7WebCore9FrameView6createEPNS_5FrameE __ZN7WebCore9FrameView6createEPNS_5FrameERKNS_7IntSizeE __ZN7WebCore9HTMLNames10listingTagE diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp index e40da56..0c8d035 100644 --- a/WebCore/WebCore.gyp/WebCore.gyp +++ b/WebCore/WebCore.gyp/WebCore.gyp @@ -741,9 +741,6 @@ '../dom/StaticStringList.cpp', '../loader/icon/IconFetcher.cpp', '../loader/UserStyleSheetLoader.cpp', - '../platform/graphics/GraphicsLayer.cpp', - '../platform/graphics/RenderLayerBacking.cpp', - '../platform/graphics/RenderLayerCompositor.cpp', # We use a multi-process version from the WebKit API. '../dom/default/PlatformMessagePortChannel.cpp', @@ -959,6 +956,7 @@ '../platform/graphics/skia/FloatPointSkia.cpp', '../platform/graphics/skia/FloatRectSkia.cpp', '../platform/graphics/skia/GradientSkia.cpp', + '../platform/graphics/skia/GraphicsContext3DSkia.cpp', '../platform/graphics/skia/GraphicsContextSkia.cpp', '../platform/graphics/skia/ImageBufferSkia.cpp', '../platform/graphics/skia/ImageSkia.cpp', diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi index 63edea7..b8316cf 100644 --- a/WebCore/WebCore.gypi +++ b/WebCore/WebCore.gypi @@ -620,6 +620,10 @@ 'bindings/js/JSXSLTProcessorConstructor.cpp', 'bindings/js/JSXSLTProcessorConstructor.h', 'bindings/js/JSXSLTProcessorCustom.cpp', + 'bindings/js/JavaScriptProfile.cpp', + 'bindings/js/JavaScriptProfile.h', + 'bindings/js/JavaScriptProfileNode.cpp', + 'bindings/js/JavaScriptProfileNode.h', 'bindings/js/ScheduledAction.cpp', 'bindings/js/ScheduledAction.h', 'bindings/js/ScriptArray.cpp', @@ -1613,10 +1617,6 @@ 'inspector/JavaScriptDebugListener.h', 'inspector/JavaScriptDebugServer.cpp', 'inspector/JavaScriptDebugServer.h', - 'inspector/JavaScriptProfile.cpp', - 'inspector/JavaScriptProfile.h', - 'inspector/JavaScriptProfileNode.cpp', - 'inspector/JavaScriptProfileNode.h', 'inspector/TimelineRecordFactory.cpp', 'inspector/TimelineRecordFactory.h', 'loader/appcache/ApplicationCache.cpp', @@ -1928,6 +1928,7 @@ 'platform/chromium/FramelessScrollView.h', 'platform/chromium/FramelessScrollViewClient.h', 'platform/chromium/GeolocationServiceChromium.cpp', + 'platform/chromium/GeolocationServiceChromium.h', 'platform/chromium/KeyCodeConversion.h', 'platform/chromium/KeyCodeConversionGtk.cpp', 'platform/chromium/KeyboardCodesPosix.h', @@ -1979,6 +1980,7 @@ 'platform/graphics/cg/FloatRectCG.cpp', 'platform/graphics/cg/FloatSizeCG.cpp', 'platform/graphics/cg/GradientCG.cpp', + 'platform/graphics/cg/GraphicsContext3DCG.cpp', 'platform/graphics/cg/GraphicsContextCG.cpp', 'platform/graphics/cg/GraphicsContextPlatformPrivateCG.h', 'platform/graphics/cg/ImageBufferCG.cpp', @@ -2142,6 +2144,7 @@ 'platform/graphics/skia/GradientSkia.cpp', 'platform/graphics/skia/GraphicsContextPlatformPrivate.h', 'platform/graphics/skia/GraphicsContextSkia.cpp', + 'platform/graphics/skia/GraphicsContext3DSkia.cpp', 'platform/graphics/skia/ImageBufferSkia.cpp', 'platform/graphics/skia/ImageSkia.cpp', 'platform/graphics/skia/IntPointSkia.cpp', @@ -2279,6 +2282,7 @@ 'platform/graphics/Gradient.h', 'platform/graphics/GraphicsContext.cpp', 'platform/graphics/GraphicsContext.h', + 'platform/graphics/GraphicsContext3D.cpp', 'platform/graphics/GraphicsContext3D.h', 'platform/graphics/GraphicsContextPrivate.h', 'platform/graphics/GraphicsLayer.cpp', @@ -3097,6 +3101,9 @@ 'rendering/RenderSVGInlineText.h', 'rendering/RenderSVGModelObject.cpp', 'rendering/RenderSVGModelObject.h', + 'rendering/RenderSVGResource.h', + 'rendering/RenderSVGResourceMasker.cpp', + 'rendering/RenderSVGResourceMasker.h', 'rendering/RenderSVGRoot.cpp', 'rendering/RenderSVGRoot.h', 'rendering/RenderSVGShadowTreeRootContainer.cpp', @@ -3323,8 +3330,6 @@ 'svg/graphics/SVGResourceListener.h', 'svg/graphics/SVGResourceMarker.cpp', 'svg/graphics/SVGResourceMarker.h', - 'svg/graphics/SVGResourceMasker.cpp', - 'svg/graphics/SVGResourceMasker.h', 'svg/ColorDistance.cpp', 'svg/ColorDistance.h', 'svg/ElementTimeControl.h', @@ -3751,7 +3756,7 @@ 'inspector/front-end/Panel.js', 'inspector/front-end/PanelEnablerView.js', 'inspector/front-end/Placard.js', - 'inspector/front-end/Popup.js', + 'inspector/front-end/Popover.js', 'inspector/front-end/ProfileDataGridTree.js', 'inspector/front-end/ProfilesPanel.js', 'inspector/front-end/ProfileView.js', @@ -3797,6 +3802,7 @@ 'inspector/front-end/audits.css', 'inspector/front-end/inspector.css', 'inspector/front-end/inspectorSyntaxHighlight.css', + 'inspector/front-end/popover.css', 'inspector/front-end/textViewer.css', ], 'webinspector_image_files': [ @@ -3834,6 +3840,7 @@ 'inspector/front-end/Images/excludeButtonGlyph.png', 'inspector/front-end/Images/focusButtonGlyph.png', 'inspector/front-end/Images/forward.png', + 'inspector/front-end/Images/gearButtonGlyph.png', 'inspector/front-end/Images/glossyHeader.png', 'inspector/front-end/Images/glossyHeaderPressed.png', 'inspector/front-end/Images/glossyHeaderSelected.png', @@ -3851,6 +3858,8 @@ 'inspector/front-end/Images/paneSettingsButtons.png', 'inspector/front-end/Images/pauseOnExceptionButtonGlyph.png', 'inspector/front-end/Images/percentButtonGlyph.png', + 'inspector/front-end/Images/popoverArrows.png', + 'inspector/front-end/Images/popoverBackground.png', 'inspector/front-end/Images/profileGroupIcon.png', 'inspector/front-end/Images/profileIcon.png', 'inspector/front-end/Images/profilesIcon.png', @@ -3894,6 +3903,12 @@ 'inspector/front-end/Images/statusbarResizerVertical.png', 'inspector/front-end/Images/storageIcon.png', 'inspector/front-end/Images/successGreenDot.png', + 'inspector/front-end/Images/thumbActiveHoriz.png', + 'inspector/front-end/Images/thumbActiveVert.png', + 'inspector/front-end/Images/thumbHoriz.png', + 'inspector/front-end/Images/thumbVert.png', + 'inspector/front-end/Images/thumbHoverHoriz.png', + 'inspector/front-end/Images/thumbHoverVert.png', 'inspector/front-end/Images/timelineHollowPillBlue.png', 'inspector/front-end/Images/timelineHollowPillGray.png', 'inspector/front-end/Images/timelineHollowPillGreen.png', @@ -3919,6 +3934,8 @@ 'inspector/front-end/Images/timelinePillRed.png', 'inspector/front-end/Images/timelinePillYellow.png', 'inspector/front-end/Images/toolbarItemSelected.png', + 'inspector/front-end/Images/trackHoriz.png', + 'inspector/front-end/Images/trackVert.png', 'inspector/front-end/Images/treeDownTriangleBlack.png', 'inspector/front-end/Images/treeDownTriangleWhite.png', 'inspector/front-end/Images/treeRightTriangleBlack.png', diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro index 13d6314..4cb4794 100644 --- a/WebCore/WebCore.pro +++ b/WebCore/WebCore.pro @@ -339,6 +339,10 @@ SOURCES += \ bindings/js/JSLazyEventListener.cpp \ bindings/js/JSPluginElementFunctions.cpp \ bindings/js/JSPopStateEventCustom.cpp \ + bindings/js/JavaScriptProfile.h \ + bindings/js/JavaScriptProfileNode.h \ + bindings/js/JavaScriptProfile.cpp \ + bindings/js/JavaScriptProfileNode.cpp \ bindings/js/ScriptArray.cpp \ bindings/js/ScriptCachedFrameData.cpp \ bindings/js/ScriptCallFrame.cpp \ @@ -1371,8 +1375,6 @@ HEADERS += \ inspector/InspectorTimelineAgent.h \ inspector/JavaScriptCallFrame.h \ inspector/JavaScriptDebugServer.h \ - inspector/JavaScriptProfile.h \ - inspector/JavaScriptProfileNode.h \ inspector/TimelineRecordFactory.h \ loader/appcache/ApplicationCacheGroup.h \ loader/appcache/ApplicationCacheHost.h \ @@ -1654,6 +1656,8 @@ HEADERS += \ rendering/RenderSVGInline.h \ rendering/RenderSVGInlineText.h \ rendering/RenderSVGModelObject.h \ + rendering/RenderSVGResource.h \ + rendering/RenderSVGResourceMasker.h \ rendering/RenderSVGRoot.h \ rendering/RenderSVGShadowTreeRootContainer.h \ rendering/RenderSVGText.h \ @@ -1745,7 +1749,6 @@ HEADERS += \ svg/graphics/SVGResourceFilter.h \ svg/graphics/SVGResource.h \ svg/graphics/SVGResourceMarker.h \ - svg/graphics/SVGResourceMasker.h \ svg/SVGAElement.h \ svg/SVGAltGlyphElement.h \ svg/SVGAngle.h \ @@ -2596,7 +2599,6 @@ contains(DEFINES, ENABLE_SVG=1) { svg/graphics/SVGResource.cpp \ svg/graphics/SVGResourceFilter.cpp \ svg/graphics/SVGResourceMarker.cpp \ - svg/graphics/SVGResourceMasker.cpp \ rendering/RenderForeignObject.cpp \ rendering/RenderPath.cpp \ rendering/RenderSVGBlock.cpp \ @@ -2607,6 +2609,7 @@ contains(DEFINES, ENABLE_SVG=1) { rendering/RenderSVGInline.cpp \ rendering/RenderSVGInlineText.cpp \ rendering/RenderSVGModelObject.cpp \ + rendering/RenderSVGResourceMasker.cpp \ rendering/RenderSVGRoot.cpp \ rendering/RenderSVGShadowTreeRootContainer.cpp \ rendering/RenderSVGText.cpp \ @@ -2628,8 +2631,6 @@ contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) { bindings/js/JSJavaScriptCallFrameCustom.cpp \ inspector/JavaScriptCallFrame.cpp \ inspector/JavaScriptDebugServer.cpp \ - inspector/JavaScriptProfile.cpp \ - inspector/JavaScriptProfileNode.cpp } contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1) { diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj index 14d93a9..02d3070 100644 --- a/WebCore/WebCore.vcproj/WebCore.vcproj +++ b/WebCore/WebCore.vcproj/WebCore.vcproj @@ -27641,6 +27641,18 @@ >
</File>
<File
+ RelativePath="..\rendering\RenderSVGResource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\RenderSVGResourceMasker.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\RenderSVGResourceMasker.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\RenderSVGRoot.cpp"
>
</File>
@@ -39916,6 +39928,22 @@ </FileConfiguration>
</File>
<File
+ RelativePath="..\bindings\js\JavaScriptProfile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\js\JavaScriptProfile.h"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\js\JavaScriptProfileNode.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\js\JavaScriptProfileNode.h"
+ >
+ </File>
+ <File
RelativePath="..\bindings\js\ScheduledAction.cpp"
>
<FileConfiguration
@@ -41775,14 +41803,6 @@ RelativePath="..\svg\graphics\SVGResourceMarker.h"
>
</File>
- <File
- RelativePath="..\svg\graphics\SVGResourceMasker.cpp"
- >
- </File>
- <File
- RelativePath="..\svg\graphics\SVGResourceMasker.h"
- >
- </File>
<Filter
Name="filters"
>
@@ -42701,22 +42721,6 @@ >
</File>
<File
- RelativePath="..\inspector\JavaScriptProfile.cpp"
- >
- </File>
- <File
- RelativePath="..\inspector\JavaScriptProfile.h"
- >
- </File>
- <File
- RelativePath="..\inspector\JavaScriptProfileNode.cpp"
- >
- </File>
- <File
- RelativePath="..\inspector\JavaScriptProfileNode.h"
- >
- </File>
- <File
RelativePath="..\inspector\TimelineRecordFactory.cpp"
>
</File>
@@ -42904,7 +42908,11 @@ >
</File>
<File
- RelativePath="..\inspector\front-end\Popup.js"
+ RelativePath="..\inspector\front-end\popover.css"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\Popover.js"
>
</File>
<File
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj index 5fa0e31..289ae48 100644 --- a/WebCore/WebCore.xcodeproj/project.pbxproj +++ b/WebCore/WebCore.xcodeproj/project.pbxproj @@ -64,6 +64,9 @@ 082341C50FCF3A9500D75BD6 /* WMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 082341C30FCF3A9400D75BD6 /* WMLSelectElement.cpp */; }; 082341C60FCF3A9500D75BD6 /* WMLSelectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */; }; 082FCAC4110927CE00CC4821 /* JSSVGContextCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 083192AA112B43050083C3B9 /* RenderSVGResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 083192A7112B43050083C3B9 /* RenderSVGResource.h */; }; + 083192AB112B43050083C3B9 /* RenderSVGResourceMasker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 083192A8112B43050083C3B9 /* RenderSVGResourceMasker.cpp */; }; + 083192AC112B43050083C3B9 /* RenderSVGResourceMasker.h in Headers */ = {isa = PBXBuildFile; fileRef = 083192A9112B43050083C3B9 /* RenderSVGResourceMasker.h */; }; 08385FF610F0186000BFE07B /* SVGMarkerData.h in Headers */ = {isa = PBXBuildFile; fileRef = 08385FF510F0186000BFE07B /* SVGMarkerData.h */; }; 0839476C0ECE4BD600027350 /* WMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB84B00ECE373300DC064E /* WMLElementFactory.cpp */; }; 0839476D0ECE4BD600027350 /* WMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 08FB84B10ECE373300DC064E /* WMLElementFactory.h */; }; @@ -528,10 +531,6 @@ 1C81B95A0E97330800266E07 /* InspectorController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81B9560E97330800266E07 /* InspectorController.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C81B9570E97330800266E07 /* InspectorController.cpp */; }; 1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81B9580E97330800266E07 /* InspectorClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 1C81B9FF0E9733CB00266E07 /* JavaScriptProfileNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81B9FB0E9733CB00266E07 /* JavaScriptProfileNode.h */; }; - 1C81BA000E9733CB00266E07 /* JavaScriptProfileNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C81B9FC0E9733CB00266E07 /* JavaScriptProfileNode.cpp */; }; - 1C81BA010E9733CB00266E07 /* JavaScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81B9FD0E9733CB00266E07 /* JavaScriptProfile.h */; }; - 1C81BA020E9733CB00266E07 /* JavaScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C81B9FE0E9733CB00266E07 /* JavaScriptProfile.cpp */; }; 1C81BA090E97348300266E07 /* JavaScriptCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C81BA030E97348300266E07 /* JavaScriptCallFrame.cpp */; }; 1C81BA0A0E97348300266E07 /* JavaScriptCallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81BA040E97348300266E07 /* JavaScriptCallFrame.h */; }; 1C81BA0C0E97348300266E07 /* JavaScriptDebugListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81BA060E97348300266E07 /* JavaScriptDebugListener.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -1243,6 +1242,8 @@ 65DF323C09D1DE65000BE325 /* JSCanvasPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DF323609D1DE65000BE325 /* JSCanvasPattern.h */; }; 65DF326109D1E199000BE325 /* UserAgentStyleSheetsData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581AF09D14EE6000E61D7 /* UserAgentStyleSheetsData.cpp */; }; 65FEA86909833ADE00BED4AB /* Page.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65FEA86809833ADE00BED4AB /* Page.cpp */; }; + 6E21C6C01126338500A7BE02 /* GraphicsContext3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */; }; + 6E21C6C21126339900A7BE02 /* GraphicsContext3DCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */; }; 6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */; }; 6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */; }; 6E4E91AC10F7FB3100A2779C /* CanvasContextAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */; }; @@ -2194,6 +2195,7 @@ 9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 9307F1D60AF2D59000DBA31A /* HitTestResult.h */; settings = {ATTRIBUTES = (Private, ); }; }; 930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 930908900AF7EDE40081DF01 /* HitTestRequest.h */; }; 930FC68A1072B9280045293E /* TextRenderingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 930FC6891072B9280045293E /* TextRenderingMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 931BCC611124DFCB00BE70DD /* MediaCanStartListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 931BCC601124DFCB00BE70DD /* MediaCanStartListener.h */; }; 9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581AC09D14EE6000E61D7 /* CharsetData.cpp */; }; 9327A94209968D1A0068A546 /* HTMLOptionsCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */; }; 932871C00B20DEB70049035A /* PlatformMenuDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 932871BF0B20DEB70049035A /* PlatformMenuDescription.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -2458,6 +2460,10 @@ 97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */; }; 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */; }; 97EF7DFE107E55B700D7C49C /* ScriptControllerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */; }; + 9F2A322B1125A0A2003C3056 /* JavaScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F2A32271125A0A2003C3056 /* JavaScriptProfile.cpp */; }; + 9F2A322C1125A0A2003C3056 /* JavaScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F2A32281125A0A2003C3056 /* JavaScriptProfile.h */; }; + 9F2A322D1125A0A2003C3056 /* JavaScriptProfileNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F2A32291125A0A2003C3056 /* JavaScriptProfileNode.cpp */; }; + 9F2A322E1125A0A2003C3056 /* JavaScriptProfileNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F2A322A1125A0A2003C3056 /* JavaScriptProfileNode.h */; }; 9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */; }; 9F6FC1971122E82A00E80196 /* ScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */; settings = {ATTRIBUTES = (Private, ); }; }; 9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304C11184B4100AD0126 /* ScriptProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -3687,8 +3693,6 @@ B25599B80D00D8BA00BB825C /* SVGResourceListener.h in Headers */ = {isa = PBXBuildFile; fileRef = B25599200D00D8B900BB825C /* SVGResourceListener.h */; }; B25599B90D00D8BA00BB825C /* SVGResourceMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25599210D00D8B900BB825C /* SVGResourceMarker.cpp */; }; B25599BA0D00D8BA00BB825C /* SVGResourceMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = B25599220D00D8B900BB825C /* SVGResourceMarker.h */; }; - B25599BB0D00D8BA00BB825C /* SVGResourceMasker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25599230D00D8B900BB825C /* SVGResourceMasker.cpp */; }; - B25599BC0D00D8BA00BB825C /* SVGResourceMasker.h in Headers */ = {isa = PBXBuildFile; fileRef = B25599240D00D8B900BB825C /* SVGResourceMasker.h */; }; B25DFAAF0B2E2929000E6510 /* JSSVGMatrixCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */; }; B262B8040D1F32D000158F09 /* SVGFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B262B8030D1F32D000158F09 /* SVGFont.cpp */; }; B26554EA0B80D74900A50EC3 /* RenderSVGTextPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B26554E80B80D74900A50EC3 /* RenderSVGTextPath.cpp */; }; @@ -4745,7 +4749,7 @@ E1C415DE0F655D7C0092D2FB /* CrossOriginPreflightResultCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C415DD0F655D7C0092D2FB /* CrossOriginPreflightResultCache.cpp */; }; E1C416120F6562FD0092D2FB /* CrossOriginAccessControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C416110F6562FD0092D2FB /* CrossOriginAccessControl.h */; }; E1C416170F6563180092D2FB /* CrossOriginAccessControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C416160F6563180092D2FB /* CrossOriginAccessControl.cpp */; }; - E1C4DE690EA75C1E0023CCD6 /* ActiveDOMObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */; }; + E1C4DE690EA75C1E0023CCD6 /* ActiveDOMObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; E1C4DE6E0EA75C650023CCD6 /* ActiveDOMObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C4DE6D0EA75C650023CCD6 /* ActiveDOMObject.cpp */; }; E1C8BE5D0E8BD15A0064CB7D /* JSWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C8BE5C0E8BD15A0064CB7D /* JSWorker.cpp */; }; E1CA5CBC0E8CDCAF00E8EF90 /* JSWorkerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1CA5CBB0E8CDCAF00E8EF90 /* JSWorkerCustom.cpp */; }; @@ -5353,6 +5357,9 @@ 082341C30FCF3A9400D75BD6 /* WMLSelectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLSelectElement.cpp; sourceTree = "<group>"; }; 082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLSelectElement.h; sourceTree = "<group>"; }; 082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGContextCache.h; sourceTree = "<group>"; }; + 083192A7112B43050083C3B9 /* RenderSVGResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResource.h; sourceTree = "<group>"; }; + 083192A8112B43050083C3B9 /* RenderSVGResourceMasker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceMasker.cpp; sourceTree = "<group>"; }; + 083192A9112B43050083C3B9 /* RenderSVGResourceMasker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceMasker.h; sourceTree = "<group>"; }; 08385FF510F0186000BFE07B /* SVGMarkerData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMarkerData.h; sourceTree = "<group>"; }; 083DAEA20F01A7FB00342754 /* RenderTextControlMultiLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControlMultiLine.cpp; sourceTree = "<group>"; }; 083DAEA30F01A7FB00342754 /* RenderTextControlMultiLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTextControlMultiLine.h; sourceTree = "<group>"; }; @@ -5847,10 +5854,6 @@ 1C81B9570E97330800266E07 /* InspectorController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorController.cpp; sourceTree = "<group>"; }; 1C81B9580E97330800266E07 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = "<group>"; }; 1C81B9590E97330800266E07 /* front-end */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "front-end"; sourceTree = "<group>"; }; - 1C81B9FB0E9733CB00266E07 /* JavaScriptProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptProfileNode.h; sourceTree = "<group>"; }; - 1C81B9FC0E9733CB00266E07 /* JavaScriptProfileNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptProfileNode.cpp; sourceTree = "<group>"; }; - 1C81B9FD0E9733CB00266E07 /* JavaScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptProfile.h; sourceTree = "<group>"; }; - 1C81B9FE0E9733CB00266E07 /* JavaScriptProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptProfile.cpp; sourceTree = "<group>"; }; 1C81BA030E97348300266E07 /* JavaScriptCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptCallFrame.cpp; sourceTree = "<group>"; }; 1C81BA040E97348300266E07 /* JavaScriptCallFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptCallFrame.h; sourceTree = "<group>"; }; 1C81BA050E97348300266E07 /* JavaScriptCallFrame.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JavaScriptCallFrame.idl; sourceTree = "<group>"; }; @@ -6657,6 +6660,8 @@ 65DF323609D1DE65000BE325 /* JSCanvasPattern.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCanvasPattern.h; sourceTree = "<group>"; }; 65F80697054D9F86008BF776 /* BlockExceptions.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BlockExceptions.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 65FEA86809833ADE00BED4AB /* Page.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Page.cpp; sourceTree = "<group>"; }; + 6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3D.cpp; sourceTree = "<group>"; }; + 6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DCG.cpp; sourceTree = "<group>"; }; 6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLGetInfo.cpp; path = canvas/WebGLGetInfo.cpp; sourceTree = "<group>"; }; 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLGetInfo.h; path = canvas/WebGLGetInfo.h; sourceTree = "<group>"; }; 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasContextAttributes.cpp; path = canvas/CanvasContextAttributes.cpp; sourceTree = "<group>"; }; @@ -7565,6 +7570,7 @@ 9307F1D60AF2D59000DBA31A /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = "<group>"; }; 930908900AF7EDE40081DF01 /* HitTestRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestRequest.h; sourceTree = "<group>"; }; 930FC6891072B9280045293E /* TextRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextRenderingMode.h; sourceTree = "<group>"; }; + 931BCC601124DFCB00BE70DD /* MediaCanStartListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaCanStartListener.h; sourceTree = "<group>"; }; 9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLOptionsCollection.cpp; sourceTree = "<group>"; }; 932871BF0B20DEB70049035A /* PlatformMenuDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlatformMenuDescription.h; sourceTree = "<group>"; }; 932E16080AF578340025F408 /* FrameLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameLoader.cpp; sourceTree = "<group>"; }; @@ -7805,6 +7811,10 @@ 97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSSAuditor.cpp; sourceTree = "<group>"; }; 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSSAuditor.h; sourceTree = "<group>"; }; 97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptControllerBase.cpp; sourceTree = "<group>"; }; + 9F2A32271125A0A2003C3056 /* JavaScriptProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptProfile.cpp; sourceTree = "<group>"; }; + 9F2A32281125A0A2003C3056 /* JavaScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptProfile.h; sourceTree = "<group>"; }; + 9F2A32291125A0A2003C3056 /* JavaScriptProfileNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptProfileNode.cpp; sourceTree = "<group>"; }; + 9F2A322A1125A0A2003C3056 /* JavaScriptProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptProfileNode.h; sourceTree = "<group>"; }; 9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptDebugServer.cpp; sourceTree = "<group>"; }; 9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugServer.h; sourceTree = "<group>"; }; 9F72304C11184B4100AD0126 /* ScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfile.h; sourceTree = "<group>"; }; @@ -8923,8 +8933,6 @@ B25599200D00D8B900BB825C /* SVGResourceListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceListener.h; sourceTree = "<group>"; }; B25599210D00D8B900BB825C /* SVGResourceMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourceMarker.cpp; sourceTree = "<group>"; }; B25599220D00D8B900BB825C /* SVGResourceMarker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceMarker.h; sourceTree = "<group>"; }; - B25599230D00D8B900BB825C /* SVGResourceMasker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourceMasker.cpp; sourceTree = "<group>"; }; - B25599240D00D8B900BB825C /* SVGResourceMasker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceMasker.h; sourceTree = "<group>"; }; B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGMatrixCustom.cpp; sourceTree = "<group>"; }; B262B8030D1F32D000158F09 /* SVGFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFont.cpp; sourceTree = "<group>"; }; B26554E80B80D74900A50EC3 /* RenderSVGTextPath.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGTextPath.cpp; sourceTree = "<group>"; }; @@ -10644,10 +10652,6 @@ 1C81BA060E97348300266E07 /* JavaScriptDebugListener.h */, 1C81BA070E97348300266E07 /* JavaScriptDebugServer.cpp */, 1C81BA080E97348300266E07 /* JavaScriptDebugServer.h */, - 1C81B9FE0E9733CB00266E07 /* JavaScriptProfile.cpp */, - 1C81B9FD0E9733CB00266E07 /* JavaScriptProfile.h */, - 1C81B9FC0E9733CB00266E07 /* JavaScriptProfileNode.cpp */, - 1C81B9FB0E9733CB00266E07 /* JavaScriptProfileNode.h */, BCC64F5F0DCFB84E0081EF3B /* localizedStrings.js */, 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */, 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */, @@ -11490,6 +11494,7 @@ BCE1C41A0D982980003B02F2 /* Location.cpp */, BCE1C4190D982980003B02F2 /* Location.h */, BCE1C4220D9829F2003B02F2 /* Location.idl */, + 931BCC601124DFCB00BE70DD /* MediaCanStartListener.h */, 93EB355E09E37FD600F43799 /* MouseEventWithHitTestResults.cpp */, 935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */, A9C6E5A30D746458006442E9 /* Navigator.cpp */, @@ -14274,8 +14279,6 @@ B25599200D00D8B900BB825C /* SVGResourceListener.h */, B25599210D00D8B900BB825C /* SVGResourceMarker.cpp */, B25599220D00D8B900BB825C /* SVGResourceMarker.h */, - B25599230D00D8B900BB825C /* SVGResourceMasker.cpp */, - B25599240D00D8B900BB825C /* SVGResourceMasker.h */, ); path = graphics; sourceTree = "<group>"; @@ -14326,6 +14329,7 @@ B275352C0B053814002CE64F /* FloatRectCG.cpp */, B275352D0B053814002CE64F /* FloatSizeCG.cpp */, BC53C60A0DA56CF10021EB5D /* GradientCG.cpp */, + 6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */, B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */, A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */, B2A10B930B3818D700099AA4 /* ImageBufferCG.cpp */, @@ -14441,6 +14445,7 @@ BC53C5F40DA56B920021EB5D /* Gradient.h */, B2A015920AF6CD53006BCE0E /* GraphicsContext.cpp */, B2A015930AF6CD53006BCE0E /* GraphicsContext.h */, + 6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */, 49C7B9FB1042D3650009D447 /* GraphicsContext3D.h */, A88FE3330E5EEE87008D8C0F /* GraphicsContextPrivate.h */, 0F580B090F12A2690051D689 /* GraphicsLayer.cpp */, @@ -14632,6 +14637,10 @@ B21127A50B3186770009BE53 /* JSSVGPODTypeWrapper.h */, E1C36D320EB0A094007410BC /* JSWorkerContextBase.cpp */, E1C36D330EB0A094007410BC /* JSWorkerContextBase.h */, + 9F2A32271125A0A2003C3056 /* JavaScriptProfile.cpp */, + 9F2A32281125A0A2003C3056 /* JavaScriptProfile.h */, + 9F2A32291125A0A2003C3056 /* JavaScriptProfileNode.cpp */, + 9F2A322A1125A0A2003C3056 /* JavaScriptProfileNode.h */, BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */, BCA378BB0D15F64200B793D6 /* ScheduledAction.h */, 7A1E88F3101CC384000C4DF5 /* ScriptArray.cpp */, @@ -15715,6 +15724,9 @@ 853CA9D10AEEC5E9002372DC /* RenderSVGInlineText.h */, A8F5C0B70F9285AC0098E06B /* RenderSVGModelObject.cpp */, A8F5C0B60F9285AC0098E06B /* RenderSVGModelObject.h */, + 083192A7112B43050083C3B9 /* RenderSVGResource.h */, + 083192A8112B43050083C3B9 /* RenderSVGResourceMasker.cpp */, + 083192A9112B43050083C3B9 /* RenderSVGResourceMasker.h */, AA31B5B20C1DFD1000AE7083 /* RenderSVGRoot.cpp */, AA31B5B30C1DFD1000AE7083 /* RenderSVGRoot.h */, 08DAB9B81103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp */, @@ -17306,8 +17318,6 @@ 1C81BA0A0E97348300266E07 /* JavaScriptCallFrame.h in Headers */, 1C81BA0C0E97348300266E07 /* JavaScriptDebugListener.h in Headers */, 1C81BA0E0E97348300266E07 /* JavaScriptDebugServer.h in Headers */, - 1C81BA010E9733CB00266E07 /* JavaScriptProfile.h in Headers */, - 1C81B9FF0E9733CB00266E07 /* JavaScriptProfileNode.h in Headers */, 59BC393F11054A1300FD85DB /* JavaStringJSC.h in Headers */, 1A569D040D7E2B82007C3983 /* jni_jsobject.h in Headers */, 5913953B110758450083EC55 /* JNIBridge.h in Headers */, @@ -17953,6 +17963,8 @@ 853CA9DB0AEEC5E9002372DC /* RenderSVGInline.h in Headers */, 853CA9DD0AEEC5E9002372DC /* RenderSVGInlineText.h in Headers */, A8F5C0B80F9285AC0098E06B /* RenderSVGModelObject.h in Headers */, + 083192AA112B43050083C3B9 /* RenderSVGResource.h in Headers */, + 083192AC112B43050083C3B9 /* RenderSVGResourceMasker.h in Headers */, AA31B5B50C1DFD1000AE7083 /* RenderSVGRoot.h in Headers */, 08DAB9BB1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.h in Headers */, 853CA9DF0AEEC5E9002372DC /* RenderSVGText.h in Headers */, @@ -18277,7 +18289,6 @@ B25599B70D00D8BA00BB825C /* SVGResourceFilter.h in Headers */, B25599B80D00D8BA00BB825C /* SVGResourceListener.h in Headers */, B25599BA0D00D8BA00BB825C /* SVGResourceMarker.h in Headers */, - B25599BC0D00D8BA00BB825C /* SVGResourceMasker.h in Headers */, 853CA9E90AEEC608002372DC /* SVGRootInlineBox.h in Headers */, B2227AA30D00BF220071B782 /* SVGScriptElement.h in Headers */, B2227AA60D00BF220071B782 /* SVGSetElement.h in Headers */, @@ -18533,6 +18544,9 @@ BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */, BCE789861120E7A60060ECE5 /* BidiRun.h in Headers */, 9F6FC1971122E82A00E80196 /* ScriptDebugServer.h in Headers */, + 931BCC611124DFCB00BE70DD /* MediaCanStartListener.h in Headers */, + 9F2A322C1125A0A2003C3056 /* JavaScriptProfile.h in Headers */, + 9F2A322E1125A0A2003C3056 /* JavaScriptProfileNode.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -19498,8 +19512,6 @@ 59A9E7B01104758800DFB4C1 /* JavaInstanceJSC.cpp in Sources */, 1C81BA090E97348300266E07 /* JavaScriptCallFrame.cpp in Sources */, 1C81BA0D0E97348300266E07 /* JavaScriptDebugServer.cpp in Sources */, - 1C81BA020E9733CB00266E07 /* JavaScriptProfile.cpp in Sources */, - 1C81BA000E9733CB00266E07 /* JavaScriptProfileNode.cpp in Sources */, 1A569D030D7E2B82007C3983 /* jni_jsobject.mm in Sources */, 1A569D050D7E2B82007C3983 /* jni_objc.mm in Sources */, 5913953D1107584E0083EC55 /* JNIBridge.cpp in Sources */, @@ -20195,6 +20207,7 @@ 853CA9DA0AEEC5E9002372DC /* RenderSVGInline.cpp in Sources */, 853CA9DC0AEEC5E9002372DC /* RenderSVGInlineText.cpp in Sources */, A8F5C0B90F9285AC0098E06B /* RenderSVGModelObject.cpp in Sources */, + 083192AB112B43050083C3B9 /* RenderSVGResourceMasker.cpp in Sources */, AA31B5B40C1DFD1000AE7083 /* RenderSVGRoot.cpp in Sources */, 08DAB9BA1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp in Sources */, 853CA9DE0AEEC5E9002372DC /* RenderSVGText.cpp in Sources */, @@ -20495,7 +20508,6 @@ B25599B40D00D8BA00BB825C /* SVGResourceClipper.cpp in Sources */, B25599B60D00D8BA00BB825C /* SVGResourceFilter.cpp in Sources */, B25599B90D00D8BA00BB825C /* SVGResourceMarker.cpp in Sources */, - B25599BB0D00D8BA00BB825C /* SVGResourceMasker.cpp in Sources */, 853CA9E80AEEC608002372DC /* SVGRootInlineBox.cpp in Sources */, B2227AA20D00BF220071B782 /* SVGScriptElement.cpp in Sources */, B2227AA50D00BF220071B782 /* SVGSetElement.cpp in Sources */, @@ -20715,6 +20727,10 @@ BCE7898B1120E8020060ECE5 /* BidiRun.cpp in Sources */, 9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */, 76FF17E311235673001D61B5 /* PluginViewNone.cpp in Sources */, + 9F2A322B1125A0A2003C3056 /* JavaScriptProfile.cpp in Sources */, + 9F2A322D1125A0A2003C3056 /* JavaScriptProfileNode.cpp in Sources */, + 6E21C6C01126338500A7BE02 /* GraphicsContext3D.cpp in Sources */, + 6E21C6C21126339900A7BE02 /* GraphicsContext3DCG.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WebCore/bindings/js/JSAudioConstructor.cpp b/WebCore/bindings/js/JSAudioConstructor.cpp index 174cc11..77bb120 100644 --- a/WebCore/bindings/js/JSAudioConstructor.cpp +++ b/WebCore/bindings/js/JSAudioConstructor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -30,10 +30,7 @@ #include "JSAudioConstructor.h" #include "HTMLAudioElement.h" -#include "HTMLNames.h" #include "JSHTMLAudioElement.h" -#include "ScriptExecutionContext.h" -#include "Text.h" #include <runtime/Error.h> using namespace JSC; @@ -46,24 +43,30 @@ JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globa : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->objectPrototype()), globalObject) { putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None); - putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum); + putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontDelete | DontEnum); } static JSObject* constructAudio(ExecState* exec, JSObject* constructor, const ArgList& args) { - JSAudioConstructor* jsAudio = static_cast<JSAudioConstructor*>(constructor); - // FIXME: Why doesn't this need the call toJS on the document like JSImageConstructor? - Document* document = jsAudio->document(); + JSAudioConstructor* jsConstructor = static_cast<JSAudioConstructor*>(constructor); + + Document* document = jsConstructor->document(); if (!document) return throwError(exec, ReferenceError, "Audio constructor associated document is unavailable"); - RefPtr<HTMLAudioElement> audio = new HTMLAudioElement(HTMLNames::audioTag, document); - audio->setAutobuffer(true); - if (args.size() > 0) { - audio->setSrc(args.at(0).toString(exec)); - audio->scheduleLoad(); - } - return asObject(toJS(exec, jsAudio->globalObject(), audio.release())); + // Calling toJS on the document causes the JS document wrapper to be + // added to the window object. This is done to ensure that JSDocument::markChildren + // will be called, which will cause the audio element to be marked if necessary. + toJS(exec, jsConstructor->globalObject(), document); + + // FIXME: This converts an undefined argument to the string "undefined", but possibly we + // should treat it as if no argument was passed instead, by checking the value of args.at + // rather than looking at args.size. + String src; + if (args.size() > 0) + src = args.at(0).toString(exec); + return asObject(toJS(exec, jsConstructor->globalObject(), + HTMLAudioElement::createForJSConstructor(document, src))); } ConstructType JSAudioConstructor::getConstructData(ConstructData& constructData) diff --git a/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp b/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp index 6178509..4d5de79 100644 --- a/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp +++ b/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp @@ -77,7 +77,7 @@ bool JSCustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, // Therefore an exception and returning true are the same thing - so, return true on an exception return true; } - return result.toBoolean(exec); + return !result.isFalse(); } } diff --git a/WebCore/bindings/js/JSDOMBinding.cpp b/WebCore/bindings/js/JSDOMBinding.cpp index d718cba..abba405 100644 --- a/WebCore/bindings/js/JSDOMBinding.cpp +++ b/WebCore/bindings/js/JSDOMBinding.cpp @@ -151,11 +151,9 @@ DOMWrapperWorld::DOMWrapperWorld(JSC::JSGlobalData* globalData, bool isNormal) DOMWrapperWorld::~DOMWrapperWorld() { - if (m_globalData) { - JSGlobalData::ClientData* clientData = m_globalData->clientData; - ASSERT(clientData); - static_cast<WebCoreJSClientData*>(clientData)->forgetWorld(this); - } + JSGlobalData::ClientData* clientData = m_globalData->clientData; + ASSERT(clientData); + static_cast<WebCoreJSClientData*>(clientData)->forgetWorld(this); for (HashSet<Document*>::iterator iter = documentsWithWrappers.begin(); iter != documentsWithWrappers.end(); ++iter) forgetWorldOfDOMNodesForDocument(*iter, this); diff --git a/WebCore/bindings/js/JSDOMBinding.h b/WebCore/bindings/js/JSDOMBinding.h index 930f9cc..807bf82 100644 --- a/WebCore/bindings/js/JSDOMBinding.h +++ b/WebCore/bindings/js/JSDOMBinding.h @@ -144,7 +144,6 @@ namespace WebCore { } ~DOMWrapperWorld(); - void detachFromGlobalData() { m_globalData = 0; } void rememberDocument(Document* document) { documentsWithWrappers.add(document); } void forgetDocument(Document* document) { documentsWithWrappers.remove(document); } @@ -201,7 +200,9 @@ namespace WebCore { { ASSERT(m_worldSet.contains(m_normalWorld.get())); ASSERT(m_worldSet.size() == 1); - m_normalWorld->detachFromGlobalData(); + ASSERT(m_normalWorld->hasOneRef()); + m_normalWorld.clear(); + ASSERT(m_worldSet.isEmpty()); } DOMWrapperWorld* normalWorld() { return m_normalWorld.get(); } diff --git a/WebCore/bindings/js/JSDOMWindowCustom.cpp b/WebCore/bindings/js/JSDOMWindowCustom.cpp index b8cd1dc..bbd4a51 100644 --- a/WebCore/bindings/js/JSDOMWindowCustom.cpp +++ b/WebCore/bindings/js/JSDOMWindowCustom.cpp @@ -912,13 +912,13 @@ JSValue JSDOMWindow::postMessage(ExecState* exec, const ArgList& args) JSValue JSDOMWindow::setTimeout(ExecState* exec, const ArgList& args) { - ScheduledAction* action = ScheduledAction::create(exec, args, currentWorld(exec)); + OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, args, currentWorld(exec)); if (exec->hadException()) return jsUndefined(); int delay = args.at(1).toInt32(exec); ExceptionCode ec = 0; - int result = impl()->setTimeout(action, delay, ec); + int result = impl()->setTimeout(action.release(), delay, ec); setDOMException(exec, ec); return jsNumber(exec, result); @@ -926,13 +926,13 @@ JSValue JSDOMWindow::setTimeout(ExecState* exec, const ArgList& args) JSValue JSDOMWindow::setInterval(ExecState* exec, const ArgList& args) { - ScheduledAction* action = ScheduledAction::create(exec, args, currentWorld(exec)); + OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, args, currentWorld(exec)); if (exec->hadException()) return jsUndefined(); int delay = args.at(1).toInt32(exec); ExceptionCode ec = 0; - int result = impl()->setInterval(action, delay, ec); + int result = impl()->setInterval(action.release(), delay, ec); setDOMException(exec, ec); return jsNumber(exec, result); @@ -954,7 +954,7 @@ JSValue JSDOMWindow::atob(ExecState* exec, const ArgList& args) } Vector<char> in(s.size()); - for (int i = 0; i < s.size(); ++i) + for (unsigned i = 0; i < s.size(); ++i) in[i] = static_cast<char>(s.data()[i]); Vector<char> out; @@ -980,7 +980,7 @@ JSValue JSDOMWindow::btoa(ExecState* exec, const ArgList& args) } Vector<char> in(s.size()); - for (int i = 0; i < s.size(); ++i) + for (unsigned i = 0; i < s.size(); ++i) in[i] = static_cast<char>(s.data()[i]); Vector<char> out; diff --git a/WebCore/bindings/js/JSImageConstructor.cpp b/WebCore/bindings/js/JSImageConstructor.cpp index 0f4a991..a574326 100644 --- a/WebCore/bindings/js/JSImageConstructor.cpp +++ b/WebCore/bindings/js/JSImageConstructor.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) - * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,6 @@ #include "HTMLNames.h" #include "JSHTMLImageElement.h" #include "JSNode.h" -#include "ScriptExecutionContext.h" #include <runtime/Error.h> using namespace JSC; @@ -43,35 +42,30 @@ JSImageConstructor::JSImageConstructor(ExecState* exec, JSDOMGlobalObject* globa static JSObject* constructImage(ExecState* exec, JSObject* constructor, const ArgList& args) { - bool widthSet = false; - bool heightSet = false; - int width = 0; - int height = 0; - if (args.size() > 0) { - widthSet = true; - width = args.at(0).toInt32(exec); - } - if (args.size() > 1) { - heightSet = true; - height = args.at(1).toInt32(exec); - } - JSImageConstructor* jsConstructor = static_cast<JSImageConstructor*>(constructor); Document* document = jsConstructor->document(); if (!document) return throwError(exec, ReferenceError, "Image constructor associated document is unavailable"); // Calling toJS on the document causes the JS document wrapper to be - // added to the window object. This is done to ensure that JSDocument::mark - // will be called (which will cause the image element to be marked if necessary). + // added to the window object. This is done to ensure that JSDocument::markChildren + // will be called, which will cause the image element to be marked if necessary. toJS(exec, jsConstructor->globalObject(), document); + int width; + int height; + int* optionalWidth = 0; + int* optionalHeight = 0; + if (args.size() > 0) { + width = args.at(0).toInt32(exec); + optionalWidth = &width; + } + if (args.size() > 1) { + height = args.at(1).toInt32(exec); + optionalHeight = &height; + } - RefPtr<HTMLImageElement> image = new HTMLImageElement(HTMLNames::imgTag, document); - if (widthSet) - image->setWidth(width); - if (heightSet) - image->setHeight(height); - return asObject(toJS(exec, jsConstructor->globalObject(), image.release())); + return asObject(toJS(exec, jsConstructor->globalObject(), + HTMLImageElement::createForJSConstructor(document, optionalWidth, optionalHeight))); } ConstructType JSImageConstructor::getConstructData(ConstructData& constructData) diff --git a/WebCore/bindings/js/JSOptionConstructor.cpp b/WebCore/bindings/js/JSOptionConstructor.cpp index 7da0666..995903e 100644 --- a/WebCore/bindings/js/JSOptionConstructor.cpp +++ b/WebCore/bindings/js/JSOptionConstructor.cpp @@ -49,21 +49,18 @@ static JSObject* constructHTMLOptionElement(ExecState* exec, JSObject* construct if (!document) return throwError(exec, ReferenceError, "Option constructor associated document is unavailable"); - RefPtr<HTMLOptionElement> element = static_pointer_cast<HTMLOptionElement>(document->createElement(HTMLNames::optionTag, false)); - - ExceptionCode ec = 0; - RefPtr<Text> text = document->createTextNode(""); + String data; if (!args.at(0).isUndefined()) - text->setData(args.at(0).toString(exec), ec); - if (ec == 0) - element->appendChild(text.release(), ec); - if (ec == 0 && !args.at(1).isUndefined()) - element->setValue(args.at(1).toString(exec)); - if (ec == 0) - element->setDefaultSelected(args.at(2).toBoolean(exec)); - if (ec == 0) - element->setSelected(args.at(3).toBoolean(exec)); + data = args.at(0).toString(exec); + String value; + if (!args.at(1).isUndefined()) + value = args.at(1).toString(exec); + bool defaultSelected = args.at(2).toBoolean(exec); + bool selected = args.at(3).toBoolean(exec); + + ExceptionCode ec = 0; + RefPtr<HTMLOptionElement> element = HTMLOptionElement::createForJSConstructor(document, data, value, defaultSelected, selected, ec); if (ec) { setDOMException(exec, ec); return 0; diff --git a/WebCore/bindings/js/JSWorkerContextCustom.cpp b/WebCore/bindings/js/JSWorkerContextCustom.cpp index d6c8dbd..bf9409c 100644 --- a/WebCore/bindings/js/JSWorkerContextCustom.cpp +++ b/WebCore/bindings/js/JSWorkerContextCustom.cpp @@ -143,20 +143,20 @@ JSValue JSWorkerContext::removeEventListener(ExecState* exec, const ArgList& arg JSValue JSWorkerContext::setTimeout(ExecState* exec, const ArgList& args) { - ScheduledAction* action = ScheduledAction::create(exec, args, currentWorld(exec)); + OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, args, currentWorld(exec)); if (exec->hadException()) return jsUndefined(); int delay = args.at(1).toInt32(exec); - return jsNumber(exec, impl()->setTimeout(action, delay)); + return jsNumber(exec, impl()->setTimeout(action.release(), delay)); } JSValue JSWorkerContext::setInterval(ExecState* exec, const ArgList& args) { - ScheduledAction* action = ScheduledAction::create(exec, args, currentWorld(exec)); + OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, args, currentWorld(exec)); if (exec->hadException()) return jsUndefined(); int delay = args.at(1).toInt32(exec); - return jsNumber(exec, impl()->setInterval(action, delay)); + return jsNumber(exec, impl()->setInterval(action.release(), delay)); } diff --git a/WebCore/inspector/JavaScriptProfile.cpp b/WebCore/bindings/js/JavaScriptProfile.cpp index 2203f0b..8e56ed8 100644 --- a/WebCore/inspector/JavaScriptProfile.cpp +++ b/WebCore/bindings/js/JavaScriptProfile.cpp @@ -26,14 +26,14 @@ #include "config.h" #include "JavaScriptProfile.h" -#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC) +#if ENABLE(JAVASCRIPT_DEBUGGER) #include "JavaScriptProfileNode.h" -#include <profiler/Profile.h> #include <JavaScriptCore/APICast.h> #include <JavaScriptCore/JSObjectRef.h> #include <JavaScriptCore/JSStringRef.h> #include <JavaScriptCore/OpaqueJSString.h> +#include <profiler/Profile.h> #include <runtime/JSObject.h> #include <runtime/JSValue.h> #include <wtf/StdLibExtras.h> @@ -47,7 +47,7 @@ namespace WebCore { typedef HashMap<Profile*, JSObject*> ProfileMap; static ProfileMap& profileCache() -{ +{ DEFINE_STATIC_LOCAL(ProfileMap, staticProfiles, ()); return staticProfiles; } diff --git a/WebCore/inspector/JavaScriptProfile.h b/WebCore/bindings/js/JavaScriptProfile.h index 2500881..7b75b97 100644 --- a/WebCore/inspector/JavaScriptProfile.h +++ b/WebCore/bindings/js/JavaScriptProfile.h @@ -26,18 +26,18 @@ #ifndef JavaScriptProfile_h #define JavaScriptProfile_h -#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC) +#if ENABLE(JAVASCRIPT_DEBUGGER) #include <runtime/JSValue.h> namespace JSC { - class ExecState; - class Profile; +class ExecState; +class Profile; } namespace WebCore { - JSC::JSValue toJS(JSC::ExecState*, JSC::Profile*); +JSC::JSValue toJS(JSC::ExecState*, JSC::Profile*); } // namespace WebCore diff --git a/WebCore/inspector/JavaScriptProfileNode.cpp b/WebCore/bindings/js/JavaScriptProfileNode.cpp index 6387c85..7d60b24 100644 --- a/WebCore/inspector/JavaScriptProfileNode.cpp +++ b/WebCore/bindings/js/JavaScriptProfileNode.cpp @@ -26,15 +26,15 @@ #include "config.h" #include "JavaScriptProfileNode.h" -#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC) +#if ENABLE(JAVASCRIPT_DEBUGGER) #include "JSDOMBinding.h" -#include <profiler/ProfileNode.h> #include <JavaScriptCore/APICast.h> -#include <JavaScriptCore/JSObjectRef.h> #include <JavaScriptCore/JSContextRef.h> +#include <JavaScriptCore/JSObjectRef.h> #include <JavaScriptCore/JSRetainPtr.h> #include <JavaScriptCore/JSStringRef.h> +#include <profiler/ProfileNode.h> #include <runtime/JSLock.h> #include <runtime/JSValue.h> #include <wtf/StdLibExtras.h> diff --git a/WebCore/inspector/JavaScriptProfileNode.h b/WebCore/bindings/js/JavaScriptProfileNode.h index 2685ac6..f01be19 100644 --- a/WebCore/inspector/JavaScriptProfileNode.h +++ b/WebCore/bindings/js/JavaScriptProfileNode.h @@ -26,20 +26,20 @@ #ifndef JavaScriptProfileNode_h #define JavaScriptProfileNode_h -#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC) +#if ENABLE(JAVASCRIPT_DEBUGGER) -#include <runtime/JSValue.h> #include <JavaScriptCore/JSBase.h> +#include <runtime/JSValue.h> namespace JSC { - class ExecState; - class ProfileNode; +class ExecState; +class ProfileNode; } namespace WebCore { - JSClassRef ProfileNodeClass(); - JSC::JSValue toJS(JSC::ExecState*, JSC::ProfileNode*); +JSClassRef ProfileNodeClass(); +JSC::JSValue toJS(JSC::ExecState*, JSC::ProfileNode*); } // namespace WebCore diff --git a/WebCore/bindings/js/ScheduledAction.cpp b/WebCore/bindings/js/ScheduledAction.cpp index be90125..be62bb8 100644 --- a/WebCore/bindings/js/ScheduledAction.cpp +++ b/WebCore/bindings/js/ScheduledAction.cpp @@ -47,7 +47,7 @@ using namespace JSC; namespace WebCore { -ScheduledAction* ScheduledAction::create(ExecState* exec, const ArgList& args, DOMWrapperWorld* isolatedWorld) +PassOwnPtr<ScheduledAction> ScheduledAction::create(ExecState* exec, const ArgList& args, DOMWrapperWorld* isolatedWorld) { JSValue v = args.at(0); CallData callData; diff --git a/WebCore/bindings/js/ScheduledAction.h b/WebCore/bindings/js/ScheduledAction.h index dd13ab1..3b7e001 100644 --- a/WebCore/bindings/js/ScheduledAction.h +++ b/WebCore/bindings/js/ScheduledAction.h @@ -24,6 +24,7 @@ #include <JSDOMBinding.h> #include <runtime/JSCell.h> #include <runtime/Protect.h> +#include <wtf/PassOwnPtr.h> #include <wtf/Vector.h> namespace JSC { @@ -42,7 +43,7 @@ namespace WebCore { */ class ScheduledAction : public Noncopyable { public: - static ScheduledAction* create(JSC::ExecState*, const JSC::ArgList&, DOMWrapperWorld* isolatedWorld); + static PassOwnPtr<ScheduledAction> create(JSC::ExecState*, const JSC::ArgList&, DOMWrapperWorld* isolatedWorld); void execute(ScriptExecutionContext*); @@ -56,7 +57,7 @@ namespace WebCore { void executeFunctionInContext(JSC::JSGlobalObject*, JSC::JSValue thisValue); void execute(Document*); -#if ENABLE(WORKERS) +#if ENABLE(WORKERS) void execute(WorkerContext*); #endif diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp index 4e8ba5e..40a71be 100644 --- a/WebCore/bindings/v8/ScriptController.cpp +++ b/WebCore/bindings/v8/ScriptController.cpp @@ -171,7 +171,7 @@ bool ScriptController::processingUserGesture(DOMWrapperWorld*) const v8::Handle<v8::Object> global = v8Context->Global(); v8::Handle<v8::Value> jsEvent = global->Get(v8::String::NewSymbol("event")); - Event* event = (!jsEvent.IsEmpty() && jsEvent->IsObject()) ? V8Event::toNative(v8::Handle<v8::Object>::Cast(jsEvent)) : 0; + Event* event = V8DOMWrapper::isValidDOMObject(jsEvent) ? V8Event::toNative(v8::Handle<v8::Object>::Cast(jsEvent)) : 0; // Based on code from kjs_bindings.cpp. // Note: This is more liberal than Firefox's implementation. diff --git a/WebCore/bindings/v8/V8DOMWrapper.cpp b/WebCore/bindings/v8/V8DOMWrapper.cpp index d567a49..cf11e6c 100644 --- a/WebCore/bindings/v8/V8DOMWrapper.cpp +++ b/WebCore/bindings/v8/V8DOMWrapper.cpp @@ -300,7 +300,7 @@ v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(V8Proxy* proxy, V8ClassI proxy = V8Proxy::retrieve(V8DOMWindow::toNative(globalPrototype)->frame()); #if ENABLE(WORKERS) else - workerContext = V8WorkerContext::toNative(globalPrototype); + workerContext = V8WorkerContext::toNative(lookupDOMWrapper(V8WorkerContext::GetTemplate(), context->Global())); #endif } } @@ -349,15 +349,19 @@ bool V8DOMWrapper::maybeDOMWrapper(v8::Handle<v8::Value> value) } #endif -bool V8DOMWrapper::isWrapperOfType(v8::Handle<v8::Value> value, V8ClassIndex::V8WrapperType classType) +bool V8DOMWrapper::isValidDOMObject(v8::Handle<v8::Value> value) { if (value.IsEmpty() || !value->IsObject()) return false; + return v8::Handle<v8::Object>::Cast(value)->InternalFieldCount(); +} - v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value); - if (!object->InternalFieldCount()) +bool V8DOMWrapper::isWrapperOfType(v8::Handle<v8::Value> value, V8ClassIndex::V8WrapperType classType) +{ + if (!isValidDOMObject(value)) return false; + v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value); ASSERT(object->InternalFieldCount() >= v8DefaultWrapperInternalFieldCount); v8::Handle<v8::Value> wrapper = object->GetInternalField(v8DOMWrapperObjectIndex); diff --git a/WebCore/bindings/v8/V8DOMWrapper.h b/WebCore/bindings/v8/V8DOMWrapper.h index afac577..8a3fa3f 100644 --- a/WebCore/bindings/v8/V8DOMWrapper.h +++ b/WebCore/bindings/v8/V8DOMWrapper.h @@ -179,6 +179,8 @@ namespace WebCore { static void setJSWrapperForActiveDOMObject(void*, v8::Persistent<v8::Object>); static void setJSWrapperForDOMNode(Node*, v8::Persistent<v8::Object>); + static bool isValidDOMObject(v8::Handle<v8::Value>); + // Check whether a V8 value is a wrapper of type |classType|. static bool isWrapperOfType(v8::Handle<v8::Value>, V8ClassIndex::V8WrapperType); diff --git a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp index 84a3b96..f733ede 100644 --- a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp @@ -75,10 +75,9 @@ bool V8CustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, // statement, if any, or onto the next overall step otherwise. Otherwise, // the error callback did not return false, or there was no error callback. // Jump to the last step in the overall steps. - return invokeCallback(m_callback, 2, argv, callbackReturnValue) || callbackReturnValue; + return invokeCallbackTreatOnlyExplicitFalseAsFalse(m_callback, 2, argv, callbackReturnValue) || callbackReturnValue; } } // namespace WebCore #endif - diff --git a/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp b/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp index 94cb104..8c69e76 100644 --- a/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp @@ -64,7 +64,7 @@ void V8CustomVoidCallback::handleEvent() invokeCallback(m_callback, 0, 0, callbackReturnValue); } -bool invokeCallback(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8::Value> argv[], bool& callbackReturnValue) +static bool invokeCallbackHelper(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8::Value> argv[], v8::Handle<v8::Value>& returnValue) { v8::TryCatch exceptionCatcher; @@ -87,9 +87,7 @@ bool invokeCallback(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8 V8Proxy* proxy = V8Proxy::retrieve(); ASSERT(proxy); - v8::Handle<v8::Value> result = proxy->callFunction(callbackFunction, thisObject, argc, argv); - - callbackReturnValue = !result.IsEmpty() && result->IsBoolean() && result->BooleanValue(); + returnValue = proxy->callFunction(callbackFunction, thisObject, argc, argv); if (exceptionCatcher.HasCaught()) { v8::Local<v8::Message> message = exceptionCatcher.Message(); @@ -100,4 +98,20 @@ bool invokeCallback(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8 return false; } +bool invokeCallback(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8::Value> argv[], bool& callbackReturnValue) +{ + v8::Handle<v8::Value> returnValue; + bool result = invokeCallbackHelper(callback, argc, argv, returnValue); + callbackReturnValue = !returnValue.IsEmpty() && returnValue->IsBoolean() && returnValue->BooleanValue(); + return result; +} + +bool invokeCallbackTreatOnlyExplicitFalseAsFalse(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8::Value> argv[], bool& callbackReturnValue) +{ + v8::Handle<v8::Value> returnValue; + bool result = invokeCallbackHelper(callback, argc, argv, returnValue); + callbackReturnValue = !returnValue.IsEmpty() && !returnValue->IsFalse(); + return result; +} + } // namespace WebCore diff --git a/WebCore/bindings/v8/custom/V8CustomVoidCallback.h b/WebCore/bindings/v8/custom/V8CustomVoidCallback.h index 586296b..6b7b3e8 100644 --- a/WebCore/bindings/v8/custom/V8CustomVoidCallback.h +++ b/WebCore/bindings/v8/custom/V8CustomVoidCallback.h @@ -60,6 +60,7 @@ private: // Returns false if callback failed (null, wrong type, or threw exception). bool invokeCallback(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8::Value> argv[], bool& callbackReturnValue); +bool invokeCallbackTreatOnlyExplicitFalseAsFalse(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8::Value> argv[], bool& callbackReturnValue); } // namespace WebCore diff --git a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp index abd6ff6..9915d77 100644 --- a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp +++ b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp @@ -104,7 +104,7 @@ static v8::Handle<v8::Value> createTransaction(const v8::Arguments& args, bool r RefPtr<V8CustomSQLTransactionCallback> callback = V8CustomSQLTransactionCallback::create(args[0], frame); RefPtr<V8CustomSQLTransactionErrorCallback> errorCallback; - if (args.Length() > 1) { + if (args.Length() > 1 && !isUndefinedOrNull(args[1])) { if (!args[1]->IsObject()) return throwError("Transaction error callback must be of valid type."); @@ -112,7 +112,7 @@ static v8::Handle<v8::Value> createTransaction(const v8::Arguments& args, bool r } RefPtr<V8CustomVoidCallback> successCallback; - if (args.Length() > 2) { + if (args.Length() > 2 && !isUndefinedOrNull(args[2])) { if (!args[2]->IsObject()) return throwError("Transaction success callback must be of valid type."); diff --git a/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp b/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp index 06c6c1d..9b75db8 100644 --- a/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp +++ b/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -60,15 +60,14 @@ static v8::Handle<v8::Value> v8HTMLAudioElementConstructorCallback(const v8::Arg return throwError("Audio constructor associated document is unavailable", V8Proxy::ReferenceError); // Make sure the document is added to the DOM Node map. Otherwise, the HTMLAudioElement instance - // may end up being the only node in the map and get garbage-ccollected prematurely. + // may end up being the only node in the map and get garbage-collected prematurely. toV8(document); - RefPtr<HTMLAudioElement> audio = new HTMLAudioElement(HTMLNames::audioTag, document); - audio->setAutobuffer(true); - if (args.Length() > 0) { - audio->setSrc(toWebCoreString(args[0])); - audio->scheduleLoad(); - } + + String src; + if (args.Length() > 0) + src = toWebCoreString(args[0]); + RefPtr<HTMLAudioElement> audio = HTMLAudioElement::createForJSConstructor(document, src); V8DOMWrapper::setDOMWrapper(args.Holder(), V8ClassIndex::ToInt(V8ClassIndex::AUDIO), audio.get()); audio->ref(); diff --git a/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp b/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp index 1873188..29b4813 100644 --- a/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp +++ b/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2009, 2010 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -61,15 +61,25 @@ static v8::Handle<v8::Value> v8HTMLImageElementConstructorCallback(const v8::Arg // Make sure the document is added to the DOM Node map. Otherwise, the HTMLImageElement instance // may end up being the only node in the map and get garbage-ccollected prematurely. + // FIXME: The correct way to do this would be to make HTMLImageElement derive from + // ActiveDOMObject and use its interface to keep its wrapper alive. Then we would + // remove this code and the special case in isObservableThroughDOM. toV8(document); - RefPtr<HTMLImageElement> image = new HTMLImageElement(HTMLNames::imgTag, document); + int width; + int height; + int* optionalWidth = 0; + int* optionalHeight = 0; if (args.Length() > 0) { - image->setWidth(toInt32(args[0])); - if (args.Length() > 1) - image->setHeight(toInt32(args[1])); + width = toInt32(args[0]); + optionalWidth = &width; + } + if (args.Length() > 1) { + height = toInt32(args[1]); + optionalHeight = &height; } + RefPtr<HTMLImageElement> image = HTMLImageElement::createForJSConstructor(document, optionalWidth, optionalHeight); V8DOMWrapper::setDOMWrapper(args.Holder(), V8ClassIndex::ToInt(V8ClassIndex::IMAGE), image.get()); image->ref(); V8DOMWrapper::setJSWrapperForDOMNode(image.get(), v8::Persistent<v8::Object>::New(args.Holder())); diff --git a/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp b/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp index 3113eb5..1ff1d2e 100644 --- a/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp +++ b/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -59,32 +59,24 @@ static v8::Handle<v8::Value> v8HTMLOptionElementConstructorCallback(const v8::Ar if (!document) return throwError("Option constructor associated document is unavailable", V8Proxy::ReferenceError); - RefPtr<HTMLOptionElement> option = new HTMLOptionElement(HTMLNames::optionTag, document); + String data; + String value; + bool defaultSelected = false; + bool selected = false; + if (args.Length() > 0 && !args[0]->IsUndefined()) + data = toWebCoreString(args[0]); + if (args.Length() > 1 && !args[1]->IsUndefined()) + value = toWebCoreString(args[1]); + if (args.Length() > 2) + defaultSelected = args[2]->BooleanValue(); + if (args.Length() > 3) + selected = args[3]->BooleanValue(); ExceptionCode ec = 0; - RefPtr<Text> text = document->createTextNode(""); - if (args.Length() > 0) { - if (!args[0]->IsUndefined()) { - text->setData(toWebCoreString(args[0]), ec); - if (ec) - throwError(ec); - } - - option->appendChild(text.release(), ec); - if (ec) - throwError(ec); - - if (args.Length() > 1) { - if (!args[1]->IsUndefined()) - option->setValue(toWebCoreString(args[1])); - - if (args.Length() > 2) { - option->setDefaultSelected(args[2]->BooleanValue()); - if (args.Length() > 3) - option->setSelected(args[3]->BooleanValue()); - } - } - } + RefPtr<HTMLOptionElement> option = HTMLOptionElement::createForJSConstructor(document, data, value, defaultSelected, selected, ec); + + if (ec) + throwError(ec); V8DOMWrapper::setDOMWrapper(args.Holder(), V8ClassIndex::ToInt(V8ClassIndex::OPTION), option.get()); option->ref(); diff --git a/WebCore/bridge/NP_jsobject.cpp b/WebCore/bridge/NP_jsobject.cpp index 09851df..2b1d17f 100644 --- a/WebCore/bridge/NP_jsobject.cpp +++ b/WebCore/bridge/NP_jsobject.cpp @@ -51,6 +51,64 @@ using namespace JSC; using namespace JSC::Bindings; using namespace WebCore; +class ObjectMap { +public: + NPObject* get(RootObject* rootObject, JSObject* jsObject) + { + return m_map.get(rootObject).get(jsObject); + } + + void add(RootObject* rootObject, JSObject* jsObject, NPObject* npObject) + { + HashMap<RootObject*, JSToNPObjectMap>::iterator iter = m_map.find(rootObject); + if (iter == m_map.end()) { + rootObject->addInvalidationCallback(&m_invalidationCallback); + iter = m_map.add(rootObject, JSToNPObjectMap()).first; + } + + ASSERT(iter->second.find(jsObject) == iter->second.end()); + iter->second.add(jsObject, npObject); + } + + void remove(RootObject* rootObject) + { + HashMap<RootObject*, JSToNPObjectMap>::iterator iter = m_map.find(rootObject); + ASSERT(iter != m_map.end()); + m_map.remove(iter); + } + + void remove(RootObject* rootObject, JSObject* jsObject) + { + HashMap<RootObject*, JSToNPObjectMap>::iterator iter = m_map.find(rootObject); + ASSERT(iter != m_map.end()); + ASSERT(iter->second.find(jsObject) != iter->second.end()); + + iter->second.remove(jsObject); + } + +private: + struct RootObjectInvalidationCallback : public RootObject::InvalidationCallback { + virtual void operator()(RootObject*); + }; + RootObjectInvalidationCallback m_invalidationCallback; + + // JSObjects are protected by RootObject. + typedef HashMap<JSObject*, NPObject*> JSToNPObjectMap; + HashMap<RootObject*, JSToNPObjectMap> m_map; +}; + + +static ObjectMap& objectMap() +{ + DEFINE_STATIC_LOCAL(ObjectMap, map, ()); + return map; +} + +void ObjectMap::RootObjectInvalidationCallback::operator()(RootObject* rootObject) +{ + objectMap().remove(rootObject); +} + static void getListFromVariantArgs(ExecState* exec, const NPVariant* args, unsigned argCount, RootObject* rootObject, MarkedArgumentBuffer& aList) { for (unsigned i = 0; i < argCount; ++i) @@ -66,8 +124,10 @@ static void jsDeallocate(NPObject* npObj) { JavaScriptObject* obj = reinterpret_cast<JavaScriptObject*>(npObj); - if (obj->rootObject && obj->rootObject->isValid()) + if (obj->rootObject && obj->rootObject->isValid()) { + objectMap().remove(obj->rootObject, obj->imp); obj->rootObject->gcUnprotect(obj->imp); + } if (obj->rootObject) obj->rootObject->deref(); @@ -83,12 +143,18 @@ static NPClass* NPNoScriptObjectClass = &noScriptClass; NPObject* _NPN_CreateScriptObject(NPP npp, JSObject* imp, PassRefPtr<RootObject> rootObject) { + if (NPObject* object = objectMap().get(rootObject.get(), imp)) + return _NPN_RetainObject(object); + JavaScriptObject* obj = reinterpret_cast<JavaScriptObject*>(_NPN_CreateObject(npp, NPScriptObjectClass)); obj->rootObject = rootObject.releaseRef(); - if (obj->rootObject) + if (obj->rootObject) { obj->rootObject->gcProtect(imp); + objectMap().add(obj->rootObject, imp, reinterpret_cast<NPObject*>(obj)); + } + obj->imp = imp; return reinterpret_cast<NPObject*>(obj); diff --git a/WebCore/bridge/jni/jsc/JavaStringJSC.h b/WebCore/bridge/jni/jsc/JavaStringJSC.h index 720f887..7c37f70 100644 --- a/WebCore/bridge/jni/jsc/JavaStringJSC.h +++ b/WebCore/bridge/jni/jsc/JavaStringJSC.h @@ -69,7 +69,7 @@ public: return m_utf8String.c_str(); } const jchar* uchars() const { return (const jchar*)m_rep->data(); } - int length() const { return m_rep->size(); } + int length() const { return m_rep->length(); } UString uString() const { return UString(m_rep); } private: diff --git a/WebCore/bridge/qt/qt_pixmapruntime.cpp b/WebCore/bridge/qt/qt_pixmapruntime.cpp index edae5a9..5978804 100644 --- a/WebCore/bridge/qt/qt_pixmapruntime.cpp +++ b/WebCore/bridge/qt/qt_pixmapruntime.cpp @@ -20,11 +20,7 @@ #include "qt_pixmapruntime.h" #include "CachedImage.h" -#include "DOMWindow.h" #include "HTMLImageElement.h" -#include "HTMLNames.h" -#include "JSDOMBinding.h" -#include "JSDOMWindow.h" #include "JSGlobalObject.h" #include "JSHTMLImageElement.h" #include "JSLock.h" @@ -54,18 +50,19 @@ public: class QtPixmapWidthField : public Field { public: static const char* name() { return "width"; } - virtual JSValue valueFromInstance(ExecState* exec, const Instance* pixmap) const + virtual JSValue valueFromInstance(ExecState* exec, const Instance* instance) const { - return jsNumber(exec, static_cast<const QtPixmapInstance*>(pixmap)->width()); + return jsNumber(exec, static_cast<const QtPixmapInstance*>(instance)->width()); } virtual void setValueToInstance(ExecState*, const Instance*, JSValue) const {} }; + class QtPixmapHeightField : public Field { public: static const char* name() { return "height"; } - virtual JSValue valueFromInstance(ExecState* exec, const Instance* inst) const + virtual JSValue valueFromInstance(ExecState* exec, const Instance* instance) const { - return jsNumber(exec, static_cast<const QtPixmapInstance*>(inst)->height()); + return jsNumber(exec, static_cast<const QtPixmapInstance*>(instance)->height()); } virtual void setValueToInstance(ExecState*, const Instance*, JSValue) const {} }; @@ -76,77 +73,68 @@ public: { return 0; } - virtual JSValue invoke(ExecState* exec, QVariant&, PassRefPtr<RootObject> root, QtPixmapInstance* inst) = 0; + virtual JSValue invoke(ExecState* exec, QtPixmapInstance*, const ArgList&) = 0; }; -class QtPixmapCreateElementMethod : public QtPixmapRuntimeMethod { +// this function receives an HTML image element as a parameter, makes it display the pixmap/image from Qt +class QtPixmapAssignToElementMethod : public QtPixmapRuntimeMethod { public: - static const char* name() { return "toHTMLImageElement"; } - JSValue invoke(ExecState* exec, QVariant& v, PassRefPtr<RootObject> root, QtPixmapInstance*) + static const char* name() { return "assignToHTMLImageElement"; } + JSValue invoke(ExecState* exec, QtPixmapInstance* instance, const ArgList& args) { - QPixmap pxm; - if (v.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>())) { - pxm = QPixmap::fromImage(v.value<QImage>()); - v = QVariant::fromValue<QPixmap>(pxm); - } else - pxm = v.value<QPixmap>(); - - Document* document = 0; - JSDOMGlobalObject* global = static_cast<JSDOMGlobalObject*>(root->globalObject()); - if (global) { - DOMWindow* dWindow = toDOMWindow(global); - if (dWindow) - document = dWindow->document(); - } - - if (document) { - PassRefPtr<StillImage> img = WebCore::StillImage::create(pxm); - RefPtr<HTMLImageElement> image = new HTMLImageElement(HTMLNames::imgTag, document); - image->setCachedImage(new CachedImage(img.get())); - toJS(exec, global, document); - return asObject(toJS(exec, global, image.release())); - } + if (!args.size()) + return jsUndefined(); + + JSObject* objectArg = args.at(0).toObject(exec); + if (!objectArg) + return jsUndefined(); + + if (!objectArg->inherits(&JSHTMLImageElement::s_info)) + return jsUndefined(); + + // we now know that we have a valid <img> element as the argument, we can attach the pixmap to it. + PassRefPtr<StillImage> stillImage = WebCore::StillImage::create(instance->toPixmap()); + HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(objectArg)->impl()); + imageElement->setCachedImage(new CachedImage(stillImage.get())); + JSDOMGlobalObject* global = static_cast<JSDOMGlobalObject*>(instance->rootObject()->globalObject()); + toJS(exec, global, imageElement->document()); return jsUndefined(); } + virtual int numParameters() const + { + return 1; + } }; +// this function encodes the image to a dataUrl, to be used in background etc. Note: very slow. class QtPixmapToDataUrlMethod : public QtPixmapRuntimeMethod { public: static const char* name() { return "toDataUrl"; } - JSValue invoke(ExecState* exec, QVariant& v, PassRefPtr<RootObject> root, QtPixmapInstance*) + JSValue invoke(ExecState* exec, QtPixmapInstance* instance, const ArgList&) { - QImage image; - // for getting the data url, we always prefer the image. - if (v.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>())) { - image = v.value<QPixmap>().toImage(); - v = QVariant::fromValue<QImage>(image); - } else - image = v.value<QImage>(); - QByteArray ba; - QBuffer b(&ba); - image.save(&b, "PNG"); - const QString b64 = QString("data:image/png;base64,") + ba.toBase64(); - const UString ustring((UChar*)b64.utf16(), b64.length()); + QByteArray byteArray; + QBuffer buffer(&byteArray); + instance->toImage().save(&buffer, "PNG"); + const QString encodedString = QString("data:image/png;base64,") + byteArray.toBase64(); + const UString ustring((UChar*)encodedString.utf16(), encodedString.length()); return jsString(exec, ustring); } - }; class QtPixmapToStringMethod : public QtPixmapRuntimeMethod { public: static const char* name() { return "toString"; } - JSValue invoke(ExecState* exec, QVariant& v, PassRefPtr<RootObject> root, QtPixmapInstance* inst) + JSValue invoke(ExecState* exec, QtPixmapInstance* instance, const ArgList&) { - return inst->valueOf(exec); + return instance->valueOf(exec); } - }; struct QtPixmapMetaData { QtPixmapToDataUrlMethod toDataUrlMethod; - QtPixmapCreateElementMethod createElementMethod; + QtPixmapAssignToElementMethod assignToElementMethod; QtPixmapToStringMethod toStringMethod; QtPixmapHeightField heightField; QtPixmapWidthField widthField; @@ -179,7 +167,6 @@ QtPixmapRuntimeObjectImp::QtPixmapRuntimeObjectImp(ExecState* exec, PassRefPtr<I const ClassInfo QtPixmapRuntimeObjectImp::s_info = { "QtPixmapRuntimeObject", &RuntimeObjectImp::s_info, 0, 0 }; - QtPixmapClass::QtPixmapClass() { } @@ -193,8 +180,8 @@ Class* QtPixmapInstance::getClass() const JSValue QtPixmapInstance::invokeMethod(ExecState* exec, const MethodList& methods, const ArgList& args) { if (methods.size() == 1) { - QtPixmapRuntimeMethod* mtd = static_cast<QtPixmapRuntimeMethod*>(methods[0]); - return mtd->invoke(exec, data, rootObject(), this); + QtPixmapRuntimeMethod* method = static_cast<QtPixmapRuntimeMethod*>(methods[0]); + return method->invoke(exec, this, args); } return jsUndefined(); } @@ -204,8 +191,8 @@ MethodList QtPixmapClass::methodsNamed(const Identifier& identifier, Instance*) MethodList methods; if (identifier == QtPixmapToDataUrlMethod::name()) methods.append(&qt_pixmap_metaData.toDataUrlMethod); - else if (identifier == QtPixmapCreateElementMethod::name()) - methods.append(&qt_pixmap_metaData.createElementMethod); + else if (identifier == QtPixmapAssignToElementMethod::name()) + methods.append(&qt_pixmap_metaData.assignToElementMethod); else if (identifier == QtPixmapToStringMethod::name()) methods.append(&qt_pixmap_metaData.toStringMethod); return methods; @@ -223,7 +210,7 @@ Field* QtPixmapClass::fieldNamed(const Identifier& identifier, Instance*) const void QtPixmapInstance::getPropertyNames(ExecState*exec, PropertyNameArray& arr) { arr.add(Identifier(exec, UString(QtPixmapToDataUrlMethod::name()))); - arr.add(Identifier(exec, UString(QtPixmapCreateElementMethod::name()))); + arr.add(Identifier(exec, UString(QtPixmapAssignToElementMethod::name()))); arr.add(Identifier(exec, UString(QtPixmapToStringMethod::name()))); arr.add(Identifier(exec, UString(QtPixmapWidthField::name()))); arr.add(Identifier(exec, UString(QtPixmapHeightField::name()))); @@ -236,15 +223,17 @@ JSValue QtPixmapInstance::defaultValue(ExecState* exec, PreferredPrimitiveType p (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>()) && !(data.value<QImage>()).isNull()) || (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>()) && !data.value<QPixmap>().isNull())); } + if (ptype == PreferString) return valueOf(exec); + return jsUndefined(); } JSValue QtPixmapInstance::valueOf(ExecState* exec) const { - const QString toStr = QString("[Qt Native Pixmap %1,%2]").arg(width()).arg(height()); - UString ustring((UChar*)toStr.utf16(), toStr.length()); + const QString stringValue = QString("[Qt Native Pixmap %1,%2]").arg(width()).arg(height()); + UString ustring((UChar*)stringValue.utf16(), stringValue.length()); return jsString(exec, ustring); } @@ -275,62 +264,78 @@ QPixmap QtPixmapInstance::toPixmap() { if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>())) return data.value<QPixmap>(); + if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>())) { - const QPixmap pxm = QPixmap::fromImage(data.value<QImage>()); - data = QVariant::fromValue<QPixmap>(pxm); - return pxm; + const QPixmap pixmap = QPixmap::fromImage(data.value<QImage>()); + data = QVariant::fromValue<QPixmap>(pixmap); + return pixmap; } - return QPixmap(); + return QPixmap(); } QImage QtPixmapInstance::toImage() { if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>())) return data.value<QImage>(); + if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>())) { - const QImage img = data.value<QPixmap>().toImage(); - data = QVariant::fromValue<QImage>(img); - return img; + const QImage image = data.value<QPixmap>().toImage(); + data = QVariant::fromValue<QImage>(image); + return image; } + return QImage(); } QVariant QtPixmapInstance::variantFromObject(JSObject* object, QMetaType::Type hint) { - if (!object) { + if (!object) + goto returnEmptyVariant; + + if (object->inherits(&JSHTMLImageElement::s_info)) { + JSHTMLImageElement* elementJSWrapper = static_cast<JSHTMLImageElement*>(object); + HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(elementJSWrapper->impl()); + + if (!imageElement) + goto returnEmptyVariant; + + CachedImage* cachedImage = imageElement->cachedImage(); + if (!cachedImage) + goto returnEmptyVariant; + + Image* image = cachedImage->image(); + if (!image) + goto returnEmptyVariant; + + QPixmap* pixmap = image->nativeImageForCurrentFrame(); + if (!pixmap) + goto returnEmptyVariant; + + return (hint == static_cast<QMetaType::Type>(qMetaTypeId<QPixmap>())) + ? QVariant::fromValue<QPixmap>(*pixmap) + : QVariant::fromValue<QImage>(pixmap->toImage()); + } + + if (object->inherits(&QtPixmapRuntimeObjectImp::s_info)) { + QtPixmapRuntimeObjectImp* imp = static_cast<QtPixmapRuntimeObjectImp*>(object); + QtPixmapInstance* instance = static_cast<QtPixmapInstance*>(imp->getInternalInstance()); + if (!instance) + goto returnEmptyVariant; + if (hint == qMetaTypeId<QPixmap>()) - return QVariant::fromValue<QPixmap>(QPixmap()); + return QVariant::fromValue<QPixmap>(instance->toPixmap()); + if (hint == qMetaTypeId<QImage>()) - return QVariant::fromValue<QImage>(QImage()); - } else if (object->inherits(&JSHTMLImageElement::s_info)) { - JSHTMLImageElement* el = static_cast<JSHTMLImageElement*>(object); - HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(el->impl()); - if (imageElement) { - CachedImage* cImg = imageElement->cachedImage(); - if (cImg) { - Image* img = cImg->image(); - if (img) { - QPixmap* pxm = img->nativeImageForCurrentFrame(); - if (pxm) { - return (hint == static_cast<QMetaType::Type>(qMetaTypeId<QPixmap>())) - ? QVariant::fromValue<QPixmap>(*pxm) - : QVariant::fromValue<QImage>(pxm->toImage()); - } - } - } - } - } else if (object->inherits(&QtPixmapRuntimeObjectImp::s_info)) { - QtPixmapRuntimeObjectImp* imp = static_cast<QtPixmapRuntimeObjectImp*>(object); - QtPixmapInstance* inst = static_cast<QtPixmapInstance*>(imp->getInternalInstance()); - if (inst) { - if (hint == qMetaTypeId<QPixmap >()) - return QVariant::fromValue<QPixmap>(inst->toPixmap()); - if (hint == qMetaTypeId<QImage>()) - return QVariant::fromValue<QImage>(inst->toImage()); - } + return QVariant::fromValue<QImage>(instance->toImage()); } - return 0; + +returnEmptyVariant: + if (hint == qMetaTypeId<QPixmap>()) + return QVariant::fromValue<QPixmap>(QPixmap()); + if (hint == qMetaTypeId<QImage>()) + return QVariant::fromValue<QImage>(QImage()); + return QVariant(); } JSObject* QtPixmapInstance::createRuntimeObject(ExecState* exec, PassRefPtr<RootObject> root, const QVariant& data) { diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp index 9601a4a..ada9f01 100644 --- a/WebCore/bridge/qt/qt_runtime.cpp +++ b/WebCore/bridge/qt/qt_runtime.cpp @@ -29,7 +29,10 @@ #include "JSArray.h" #include "JSByteArray.h" #include "JSDOMBinding.h" +#include "JSDOMWindow.h" +#include <JSFunction.h> #include "JSGlobalObject.h" +#include "JSHTMLElement.h" #include "JSLock.h" #include "JSObject.h" #include "ObjectPrototype.h" @@ -45,7 +48,7 @@ #include "qt_instance.h" #include "qt_pixmapruntime.h" #include "qvarlengtharray.h" -#include <JSFunction.h> +#include "qwebelement.h" #include <limits.h> #include <runtime/Error.h> #include <runtime_array.h> @@ -114,6 +117,21 @@ QDebug operator<<(QDebug dbg, const JSRealType &c) } #endif +// this is here as a proxy, so we'd have a class to friend in QWebElement, +// as getting/setting a WebCore in QWebElement is private +class QtWebElementRuntime { +public: + static QWebElement create(Element* element) + { + return QWebElement(element); + } + + static Element* get(const QWebElement& element) + { + return element.m_element; + } +}; + static JSRealType valueRealType(ExecState* exec, JSValue val) { if (val.isNumber()) @@ -722,6 +740,11 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type break; } else if (QtPixmapInstance::canHandle(static_cast<QMetaType::Type>(hint))) { ret = QtPixmapInstance::variantFromObject(object, static_cast<QMetaType::Type>(hint)); + } else if (hint == (QMetaType::Type) qMetaTypeId<QWebElement>()) { + if (object && object->inherits(&JSHTMLElement::s_info)) + ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSHTMLElement*>(object))->impl())); + else + ret = QVariant::fromValue<QWebElement>(QWebElement()); } else if (hint == (QMetaType::Type) qMetaTypeId<QVariant>()) { if (value.isUndefinedOrNull()) { if (distance) @@ -854,6 +877,17 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con if (QtPixmapInstance::canHandle(static_cast<QMetaType::Type>(variant.type()))) return QtPixmapInstance::createRuntimeObject(exec, root, variant); + if (type == qMetaTypeId<QWebElement>()) { + if (!root->globalObject()->inherits(&JSDOMWindow::s_info)) + return jsUndefined(); + + Document* document = (static_cast<JSDOMWindow*>(root->globalObject()))->impl()->document(); + if (!document) + return jsUndefined(); + + return toJS(exec, toJSDOMGlobalObject(document, exec), QtWebElementRuntime::get(variant.value<QWebElement>())); + } + if (type == QMetaType::QVariantMap) { // create a new object, and stuff properties into it JSObject* ret = constructEmptyObject(exec); diff --git a/WebCore/bridge/runtime_root.cpp b/WebCore/bridge/runtime_root.cpp index 143c3ad..b179d56 100644 --- a/WebCore/bridge/runtime_root.cpp +++ b/WebCore/bridge/runtime_root.cpp @@ -71,6 +71,10 @@ RootObject* findRootObject(JSGlobalObject* globalObject) return 0; } +RootObject::InvalidationCallback::~InvalidationCallback() +{ +} + PassRefPtr<RootObject> RootObject::create(const void* nativeHandle, JSGlobalObject* globalObject) { return adoptRef(new RootObject(nativeHandle, globalObject)); @@ -109,6 +113,14 @@ void RootObject::invalidate() m_nativeHandle = 0; m_globalObject = 0; + { + HashSet<InvalidationCallback*>::iterator end = m_invalidationCallbacks.end(); + for (HashSet<InvalidationCallback*>::iterator iter = m_invalidationCallbacks.begin(); iter != end; ++iter) + (**iter)(this); + + m_invalidationCallbacks.clear(); + } + ProtectCountSet::iterator end = m_protectCountSet.end(); for (ProtectCountSet::iterator it = m_protectCountSet.begin(); it != end; ++it) JSC::gcUnprotect(it->first); diff --git a/WebCore/bridge/runtime_root.h b/WebCore/bridge/runtime_root.h index fdd73c4..a81afb8 100644 --- a/WebCore/bridge/runtime_root.h +++ b/WebCore/bridge/runtime_root.h @@ -72,6 +72,13 @@ public: void addRuntimeObject(RuntimeObjectImp*); void removeRuntimeObject(RuntimeObjectImp*); + + struct InvalidationCallback { + virtual void operator()(RootObject*) = 0; + virtual ~InvalidationCallback(); + }; + void addInvalidationCallback(InvalidationCallback* callback) { m_invalidationCallbacks.add(callback); } + private: RootObject(const void* nativeHandle, JSGlobalObject*); @@ -79,9 +86,11 @@ private: const void* m_nativeHandle; ProtectedPtr<JSGlobalObject> m_globalObject; - ProtectCountSet m_protectCountSet; + ProtectCountSet m_protectCountSet; HashSet<RuntimeObjectImp*> m_runtimeObjects; + + HashSet<InvalidationCallback*> m_invalidationCallbacks; }; } // namespace Bindings diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp index 8f00d2a..f7f2707 100644 --- a/WebCore/css/CSSStyleSelector.cpp +++ b/WebCore/css/CSSStyleSelector.cpp @@ -1119,7 +1119,8 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForDocument(Document* document) fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1); int size = CSSStyleSelector::fontSizeForKeyword(document, CSSValueMedium, false); fontDescription.setSpecifiedSize(size); - fontDescription.setComputedSize(CSSStyleSelector::getComputedSizeFromSpecifiedSize(document, fontDescription.isAbsoluteSize(), size, documentStyle->effectiveZoom())); + bool useSVGZoomRules = document->isSVGDocument(); + fontDescription.setComputedSize(CSSStyleSelector::getComputedSizeFromSpecifiedSize(document, documentStyle.get(), fontDescription.isAbsoluteSize(), size, useSVGZoomRules)); } documentStyle->setFontDescription(fontDescription); @@ -2983,6 +2984,16 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) float zoomFactor = m_style->effectiveZoom(); + // SVG handles zooming in a different way compared to CSS. The whole document is scaled instead + // of each individual length value in the render style / tree. CSSPrimitiveValue::computeLength*() + // multiplies each resolved length with the zoom multiplier - so for SVG we need to disable that. + // Though all CSS values that can be applied to outermost <svg> elements (width/height/border/padding...) + // need to respect the scaling. RenderBox (the parent class of RenderSVGRoot) grabs values like + // width/height/border/padding/... from the RenderStyle -> for SVG these values would never scale, + // if we'd pass a 1.0 zoom factor everyhwere. So we only pass a zoom factor of 1.0 for specific + // properties that are NOT allowed to scale within a zoomed SVG document (letter/word-spacing/font-size). + bool useSVGZoomRules = m_element && m_element->isSVGElement(); + Length l; bool apply = false; @@ -3624,7 +3635,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) } else { if (!primitiveValue) return; - width = primitiveValue->computeLengthInt(style(), m_rootElementStyle, zoomFactor); + width = primitiveValue->computeLengthInt(style(), m_rootElementStyle, useSVGZoomRules ? 1.0f : zoomFactor); } switch (id) { case CSSPropertyLetterSpacing: @@ -4034,7 +4045,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) if (primitiveValue->getIdent() == CSSValueNormal) lineHeight = Length(-100.0, Percent); else if (CSSPrimitiveValue::isUnitTypeLength(type)) { - double multiplier = m_style->effectiveZoom(); + double multiplier = zoomFactor; if (m_style->textSizeAdjust() && m_checker.m_document->frame() && m_checker.m_document->frame()->shouldApplyTextZoom()) multiplier *= m_checker.m_document->frame()->textZoomFactor(); lineHeight = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, multiplier), Fixed); @@ -4516,7 +4527,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) fontDescription.setUsePrinterFont(m_checker.m_document->printing()); // Handle the zoom factor. - fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.m_document, fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), m_style->effectiveZoom())); + fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.m_document, m_style.get(), fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), useSVGZoomRules)); if (m_style->setFontDescription(fontDescription)) m_fontDirty = true; } @@ -5868,11 +5879,20 @@ void CSSStyleSelector::checkForGenericFamilyChange(RenderStyle* style, RenderSty void CSSStyleSelector::setFontSize(FontDescription& fontDescription, float size) { fontDescription.setSpecifiedSize(size); - fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.m_document, fontDescription.isAbsoluteSize(), size, m_style->effectiveZoom())); + + bool useSVGZoomRules = m_element && m_element->isSVGElement(); + fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.m_document, m_style.get(), fontDescription.isAbsoluteSize(), size, useSVGZoomRules)); } -float CSSStyleSelector::getComputedSizeFromSpecifiedSize(Document* document, bool isAbsoluteSize, float specifiedSize, float zoomFactor) +float CSSStyleSelector::getComputedSizeFromSpecifiedSize(Document* document, RenderStyle* style, bool isAbsoluteSize, float specifiedSize, bool useSVGZoomRules) { + float zoomFactor = 1.0f; + if (!useSVGZoomRules) { + zoomFactor = style->effectiveZoom(); + if (document->frame() && document->frame()->shouldApplyTextZoom()) + zoomFactor *= document->frame()->textZoomFactor(); + } + // We support two types of minimum font size. The first is a hard override that applies to // all fonts. This is "minSize." The second type of minimum font size is a "smart minimum" // that is applied only when the Web page can't know what size it really asked for, e.g., @@ -5889,10 +5909,6 @@ float CSSStyleSelector::getComputedSizeFromSpecifiedSize(Document* document, boo int minSize = settings->minimumFontSize(); int minLogicalSize = settings->minimumLogicalFontSize(); - - if (document->frame() && document->frame()->shouldApplyTextZoom()) - zoomFactor *= document->frame()->textZoomFactor(); - float zoomedSize = specifiedSize * zoomFactor; // Apply the hard minimum first. We only apply the hard minimum if after zooming we're still too small. diff --git a/WebCore/css/CSSStyleSelector.h b/WebCore/css/CSSStyleSelector.h index aac1bae..644051c 100644 --- a/WebCore/css/CSSStyleSelector.h +++ b/WebCore/css/CSSStyleSelector.h @@ -131,7 +131,7 @@ public: void applyPropertyToStyle(int id, CSSValue*, RenderStyle*); private: - static float getComputedSizeFromSpecifiedSize(Document*, bool isAbsoluteSize, float specifiedSize, float zoomFactor = 1.0f); + static float getComputedSizeFromSpecifiedSize(Document*, RenderStyle*, bool isAbsoluteSize, float specifiedSize, bool useSVGZoomRules); public: Color getColorFromPrimitiveValue(CSSPrimitiveValue*); diff --git a/WebCore/css/SVGCSSStyleSelector.cpp b/WebCore/css/SVGCSSStyleSelector.cpp index 5ba7344..5651a0a 100644 --- a/WebCore/css/SVGCSSStyleSelector.cpp +++ b/WebCore/css/SVGCSSStyleSelector.cpp @@ -534,14 +534,12 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value) if (!value->isValueList()) return; - float zoomFactor = m_style->effectiveZoom(); - CSSValueList *list = static_cast<CSSValueList*>(value); ASSERT(list->length() == 1); ShadowValue* item = static_cast<ShadowValue*>(list->itemWithoutBoundsCheck(0)); - int x = item->x->computeLengthInt(style(), m_rootElementStyle, zoomFactor); - int y = item->y->computeLengthInt(style(), m_rootElementStyle, zoomFactor); - int blur = item->blur ? item->blur->computeLengthInt(style(), m_rootElementStyle, zoomFactor) : 0; + int x = item->x->computeLengthInt(style(), m_rootElementStyle); + int y = item->y->computeLengthInt(style(), m_rootElementStyle); + int blur = item->blur ? item->blur->computeLengthInt(style(), m_rootElementStyle) : 0; Color color; if (item->color) color = getColorFromPrimitiveValue(item->color.get()); @@ -564,5 +562,4 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value) } -// vim:ts=4:noet -#endif // ENABLE(SVG) +#endif diff --git a/WebCore/css/mediaControlsGtk.css b/WebCore/css/mediaControlsGtk.css index 8e98ab1..cc6da14 100644 --- a/WebCore/css/mediaControlsGtk.css +++ b/WebCore/css/mediaControlsGtk.css @@ -41,6 +41,8 @@ audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-bu audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container { height: 20px; + border-left: 1px solid rgba(255, 255, 255, 0.2); + border-right: 1px solid rgba(255, 255, 255, 0.2); } audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp index 1f8edeb..ae23960 100644 --- a/WebCore/dom/Document.cpp +++ b/WebCore/dom/Document.cpp @@ -1500,6 +1500,17 @@ void Document::updateLayoutIgnorePendingStylesheets() m_ignorePendingStylesheets = oldIgnore; } +PassRefPtr<RenderStyle> Document::styleForElementIgnoringPendingStylesheets(Element* element) +{ + ASSERT_ARG(element, element->document() == this); + + bool oldIgnore = m_ignorePendingStylesheets; + m_ignorePendingStylesheets = true; + RefPtr<RenderStyle> style = styleSelector()->styleForElement(element, element->parent() ? element->parent()->computedStyle() : 0); + m_ignorePendingStylesheets = oldIgnore; + return style.release(); +} + void Document::createStyleSelector() { bool matchAuthorAndUserStyles = true; @@ -4522,6 +4533,10 @@ void Document::initSecurityContext() // Some clients want file:// URLs to have universal access, but that // setting is dangerous for other clients. securityOrigin()->grantUniversalAccess(); + } else if (!settings->allowFileAccessFromFileURLs() && securityOrigin()->isLocal()) { + // Some clients want file:// URLs to have even tighter restrictions by + // default, and not be able to access other local files. + securityOrigin()->makeUnique(); } } diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h index e7c470b..3ddcaab 100644 --- a/WebCore/dom/Document.h +++ b/WebCore/dom/Document.h @@ -469,6 +469,7 @@ public: virtual void updateStyleIfNeeded(); void updateLayout(); void updateLayoutIgnorePendingStylesheets(); + PassRefPtr<RenderStyle> styleForElementIgnoringPendingStylesheets(Element*); static void updateStyleForAllDocuments(); // FIXME: Try to reduce the # of calls to this function. DocLoader* docLoader() { return m_docLoader.get(); } diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp index 0a1bc75..9e4b48d 100644 --- a/WebCore/dom/Element.cpp +++ b/WebCore/dom/Element.cpp @@ -1359,7 +1359,7 @@ RenderStyle* Element::computedStyle() ElementRareData* data = ensureRareData(); if (!data->m_computedStyle) - data->m_computedStyle = document()->styleSelector()->styleForElement(this, parent() ? parent()->computedStyle() : 0); + data->m_computedStyle = document()->styleForElementIgnoringPendingStylesheets(this); return data->m_computedStyle.get(); } diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp index efb6d78..49006fc 100644 --- a/WebCore/dom/Node.cpp +++ b/WebCore/dom/Node.cpp @@ -322,25 +322,20 @@ Node::StyleChange Node::diff(const RenderStyle* s1, const RenderStyle* s2) // If the pseudoStyles have changed, we want any StyleChange that is not NoChange // because setStyle will do the right thing with anything else. - if (ch == NoChange && s1->hasPseudoStyle(BEFORE)) { - RenderStyle* ps2 = s2->getCachedPseudoStyle(BEFORE); - if (!ps2) - ch = NoInherit; - else { - RenderStyle* ps1 = s1->getCachedPseudoStyle(BEFORE); - ch = ps1 && *ps1 == *ps2 ? NoChange : NoInherit; - } - } - if (ch == NoChange && s1->hasPseudoStyle(AFTER)) { - RenderStyle* ps2 = s2->getCachedPseudoStyle(AFTER); - if (!ps2) - ch = NoInherit; - else { - RenderStyle* ps1 = s1->getCachedPseudoStyle(AFTER); - ch = ps2 && *ps1 == *ps2 ? NoChange : NoInherit; + if (ch == NoChange && s1->hasAnyPublicPseudoStyles()) { + for (PseudoId pseudoId = FIRST_PUBLIC_PSEUDOID; ch == NoChange && pseudoId < FIRST_INTERNAL_PSEUDOID; pseudoId = static_cast<PseudoId>(pseudoId + 1)) { + if (s1->hasPseudoStyle(pseudoId)) { + RenderStyle* ps2 = s2->getCachedPseudoStyle(pseudoId); + if (!ps2) + ch = NoInherit; + else { + RenderStyle* ps1 = s1->getCachedPseudoStyle(pseudoId); + ch = ps1 && *ps1 == *ps2 ? NoChange : NoInherit; + } + } } } - + return ch; } diff --git a/WebCore/editing/ReplaceSelectionCommand.cpp b/WebCore/editing/ReplaceSelectionCommand.cpp index f26757e..bac090c 100644 --- a/WebCore/editing/ReplaceSelectionCommand.cpp +++ b/WebCore/editing/ReplaceSelectionCommand.cpp @@ -468,6 +468,17 @@ void ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance() e->getInlineStyleDecl()->setProperty(CSSPropertyDisplay, CSSValueInline); if (e->renderer() && e->renderer()->style()->floating() != FNONE) e->getInlineStyleDecl()->setProperty(CSSPropertyFloat, CSSValueNone); + + // Undo the effects of page zoom if we have an absolute font size. When we copy, we + // compute the new font size as an absolute size so pasting will cause the zoom to be + // applied twice. + if (e->renderer() && e->renderer()->style() && e->renderer()->style()->effectiveZoom() != 1.0 + && e->renderer()->style()->fontDescription().isAbsoluteSize()) { + float newSize = e->renderer()->style()->fontDescription().specifiedSize() / e->renderer()->style()->effectiveZoom(); + ExceptionCode ec = 0; + e->style()->setProperty(CSSPropertyFontSize, String::number(newSize), false, ec); + ASSERT(!ec); + } } if (node == m_lastLeafInserted) break; @@ -638,10 +649,11 @@ void ReplaceSelectionCommand::handleStyleSpans() } // There are non-redundant styles on sourceDocumentStyleSpan, but there is no - // copiedRangeStyleSpan. Clear the redundant styles from sourceDocumentStyleSpan - // and return. + // copiedRangeStyleSpan. Remove the span, because it could be surrounding block elements, + // and apply the styles to its children. if (sourceDocumentStyle->length() > 0 && !copiedRangeStyleSpan) { - setNodeAttribute(static_cast<Element*>(sourceDocumentStyleSpan), styleAttr, sourceDocumentStyle->cssText()); + copyStyleToChildren(sourceDocumentStyleSpan, sourceDocumentStyle.get()); + removeNodePreservingChildren(sourceDocumentStyleSpan); return; } @@ -673,6 +685,34 @@ void ReplaceSelectionCommand::handleStyleSpans() setNodeAttribute(static_cast<Element*>(copiedRangeStyleSpan), styleAttr, copiedRangeStyle->cssText()); } +// Take the style attribute of a span and apply it to it's children instead. This allows us to +// convert invalid HTML where a span contains block elements into valid HTML while preserving +// styles. +void ReplaceSelectionCommand::copyStyleToChildren(Node* parentNode, const CSSMutableStyleDeclaration* parentStyle) +{ + ASSERT(parentNode->hasTagName(spanTag)); + for (Node* childNode = parentNode->firstChild(); childNode; childNode = childNode->nextSibling()) { + if (childNode->isTextNode() || !isBlock(childNode) || childNode->hasTagName(preTag)) { + // In this case, put a span tag around the child node. + RefPtr<Node> newSpan = parentNode->cloneNode(false); + setNodeAttribute(static_cast<Element*>(newSpan.get()), styleAttr, parentStyle->cssText()); + insertNodeAfter(newSpan, childNode); + ExceptionCode ec = 0; + newSpan->appendChild(childNode, ec); + ASSERT(!ec); + childNode = newSpan.get(); + } else if (childNode->isHTMLElement()) { + // Copy the style attribute and merge them into the child node. We don't want to override + // existing styles, so don't clobber on merge. + RefPtr<CSSMutableStyleDeclaration> newStyle = parentStyle->copy(); + HTMLElement* childElement = static_cast<HTMLElement*>(childNode); + RefPtr<CSSMutableStyleDeclaration> existingStyles = childElement->getInlineStyleDecl()->copy(); + existingStyles->merge(newStyle.get(), false); + setNodeAttribute(childElement, styleAttr, existingStyles->cssText()); + } + } +} + void ReplaceSelectionCommand::mergeEndIfNeeded() { if (!m_shouldMergeEnd) @@ -871,7 +911,8 @@ void ReplaceSelectionCommand::doApply() fragment.removeNode(refNode); Node* blockStart = enclosingBlock(insertionPos.node()); - if (isListElement(refNode.get()) && blockStart->renderer()->isListItem()) + if ((isListElement(refNode.get()) || (isStyleSpan(refNode.get()) && isListElement(refNode->firstChild()))) + && blockStart->renderer()->isListItem()) refNode = insertAsListItems(refNode, blockStart, insertionPos); else insertNodeAtAndUpdateNodesInserted(refNode, insertionPos); @@ -1122,15 +1163,15 @@ void ReplaceSelectionCommand::insertNodeBeforeAndUpdateNodesInserted(PassRefPtr< // If the user is inserting a list into an existing list, instead of nesting the list, // we put the list items into the existing list. -Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<Node> listElement, Node* insertionNode, const Position& p) +Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<Node> listElement, Node* insertionBlock, const Position& insertPos) { while (listElement->hasChildNodes() && isListElement(listElement->firstChild()) && listElement->childNodeCount() == 1) listElement = listElement->firstChild(); - bool isStart = isStartOfParagraph(p); - bool isEnd = isEndOfParagraph(p); + bool isStart = isStartOfParagraph(insertPos); + bool isEnd = isEndOfParagraph(insertPos); - Node* lastNode = insertionNode; + Node* lastNode = insertionBlock; while (RefPtr<Node> listItem = listElement->firstChild()) { ExceptionCode ec = 0; listElement->removeChild(listItem.get(), ec); diff --git a/WebCore/editing/ReplaceSelectionCommand.h b/WebCore/editing/ReplaceSelectionCommand.h index 19f63bb..e995e79 100644 --- a/WebCore/editing/ReplaceSelectionCommand.h +++ b/WebCore/editing/ReplaceSelectionCommand.h @@ -69,6 +69,7 @@ private: void negateStyleRulesThatAffectAppearance(); void handleStyleSpans(); + void copyStyleToChildren(Node* parentNode, const CSSMutableStyleDeclaration* parentStyle); void handlePasteAsQuotationNode(); virtual void removeNodePreservingChildren(Node*); diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp index 5b2d0d0..25982d4 100644 --- a/WebCore/editing/SelectionController.cpp +++ b/WebCore/editing/SelectionController.cpp @@ -265,6 +265,33 @@ TextDirection SelectionController::directionOfEnclosingBlock() return LTR; } +VisiblePosition SelectionController::positionForPlatform(bool isGetStart) const +{ + Position pos; + Settings* settings = m_frame ? m_frame->settings() : 0; + if (settings && settings->editingBehavior() == EditingMacBehavior) + pos = isGetStart ? m_selection.start() : m_selection.end(); + else { + // Linux and Windows always extend selections from the extent endpoint. + // FIXME: VisibleSelection should be fixed to ensure as an invariant that + // base/extent always point to the same nodes as start/end, but which points + // to which depends on the value of isBaseFirst. Then this can be changed + // to just return m_sel.extent(). + pos = m_selection.isBaseFirst() ? m_selection.end() : m_selection.start(); + } + return VisiblePosition(pos, m_selection.affinity()); +} + +VisiblePosition SelectionController::startForPlatform() const +{ + return positionForPlatform(true); +} + +VisiblePosition SelectionController::endForPlatform() const +{ + return positionForPlatform(false); +} + VisiblePosition SelectionController::modifyExtendingRight(TextGranularity granularity) { VisiblePosition pos(m_selection.extent(), m_selection.affinity()); @@ -298,7 +325,7 @@ VisiblePosition SelectionController::modifyExtendingRight(TextGranularity granul pos = modifyExtendingForward(granularity); } return pos; -} +} VisiblePosition SelectionController::modifyExtendingForward(TextGranularity granularity) { @@ -320,16 +347,16 @@ VisiblePosition SelectionController::modifyExtendingForward(TextGranularity gran pos = nextParagraphPosition(pos, xPosForVerticalArrowNavigation(EXTENT)); break; case SentenceBoundary: - pos = endOfSentence(VisiblePosition(m_selection.end(), m_selection.affinity())); + pos = endOfSentence(endForPlatform()); break; case LineBoundary: - pos = logicalEndOfLine(VisiblePosition(m_selection.end(), m_selection.affinity())); + pos = logicalEndOfLine(endForPlatform()); break; case ParagraphBoundary: - pos = endOfParagraph(VisiblePosition(m_selection.end(), m_selection.affinity())); + pos = endOfParagraph(endForPlatform()); break; case DocumentBoundary: - pos = VisiblePosition(m_selection.end(), m_selection.affinity()); + pos = endForPlatform(); if (isEditablePosition(pos.deepEquivalent())) pos = endOfEditableContent(pos); else @@ -385,25 +412,25 @@ VisiblePosition SelectionController::modifyMovingForward(TextGranularity granula case LineGranularity: { // down-arrowing from a range selection that ends at the start of a line needs // to leave the selection at that line start (no need to call nextLinePosition!) - pos = VisiblePosition(m_selection.end(), m_selection.affinity()); + pos = endForPlatform(); if (!isRange() || !isStartOfLine(pos)) pos = nextLinePosition(pos, xPosForVerticalArrowNavigation(START)); break; } case ParagraphGranularity: - pos = nextParagraphPosition(VisiblePosition(m_selection.end(), m_selection.affinity()), xPosForVerticalArrowNavigation(START)); + pos = nextParagraphPosition(endForPlatform(), xPosForVerticalArrowNavigation(START)); break; case SentenceBoundary: - pos = endOfSentence(VisiblePosition(m_selection.end(), m_selection.affinity())); + pos = endOfSentence(endForPlatform()); break; case LineBoundary: - pos = logicalEndOfLine(VisiblePosition(m_selection.end(), m_selection.affinity())); + pos = logicalEndOfLine(endForPlatform()); break; case ParagraphBoundary: - pos = endOfParagraph(VisiblePosition(m_selection.end(), m_selection.affinity())); + pos = endOfParagraph(endForPlatform()); break; case DocumentBoundary: - pos = VisiblePosition(m_selection.end(), m_selection.affinity()); + pos = endForPlatform(); if (isEditablePosition(pos.deepEquivalent())) pos = endOfEditableContent(pos); else @@ -473,16 +500,16 @@ VisiblePosition SelectionController::modifyExtendingBackward(TextGranularity gra pos = previousParagraphPosition(pos, xPosForVerticalArrowNavigation(EXTENT)); break; case SentenceBoundary: - pos = startOfSentence(VisiblePosition(m_selection.start(), m_selection.affinity())); + pos = startOfSentence(startForPlatform()); break; case LineBoundary: - pos = logicalStartOfLine(VisiblePosition(m_selection.start(), m_selection.affinity())); + pos = logicalStartOfLine(startForPlatform()); break; case ParagraphBoundary: - pos = startOfParagraph(VisiblePosition(m_selection.start(), m_selection.affinity())); + pos = startOfParagraph(startForPlatform()); break; case DocumentBoundary: - pos = VisiblePosition(m_selection.start(), m_selection.affinity()); + pos = startForPlatform(); if (isEditablePosition(pos.deepEquivalent())) pos = startOfEditableContent(pos); else @@ -534,22 +561,22 @@ VisiblePosition SelectionController::modifyMovingBackward(TextGranularity granul pos = previousSentencePosition(VisiblePosition(m_selection.extent(), m_selection.affinity())); break; case LineGranularity: - pos = previousLinePosition(VisiblePosition(m_selection.start(), m_selection.affinity()), xPosForVerticalArrowNavigation(START)); + pos = previousLinePosition(startForPlatform(), xPosForVerticalArrowNavigation(START)); break; case ParagraphGranularity: - pos = previousParagraphPosition(VisiblePosition(m_selection.start(), m_selection.affinity()), xPosForVerticalArrowNavigation(START)); + pos = previousParagraphPosition(startForPlatform(), xPosForVerticalArrowNavigation(START)); break; case SentenceBoundary: - pos = startOfSentence(VisiblePosition(m_selection.start(), m_selection.affinity())); + pos = startOfSentence(startForPlatform()); break; case LineBoundary: - pos = logicalStartOfLine(VisiblePosition(m_selection.start(), m_selection.affinity())); + pos = logicalStartOfLine(startForPlatform()); break; case ParagraphBoundary: - pos = startOfParagraph(VisiblePosition(m_selection.start(), m_selection.affinity())); + pos = startOfParagraph(startForPlatform()); break; case DocumentBoundary: - pos = VisiblePosition(m_selection.start(), m_selection.affinity()); + pos = startForPlatform(); if (isEditablePosition(pos.deepEquivalent())) pos = startOfEditableContent(pos); else @@ -840,7 +867,6 @@ void SelectionController::layout() RenderObject* caretPainter = caretRenderer(); // Compute an offset between the renderer and the caretPainter - IntSize offsetFromPainter; bool unrooted = false; while (renderer != caretPainter) { RenderObject* containerObject = renderer->container(); @@ -848,15 +874,12 @@ void SelectionController::layout() unrooted = true; break; } - offsetFromPainter += renderer->offsetFromContainer(containerObject); + localRect.move(renderer->offsetFromContainer(containerObject, localRect.location())); renderer = containerObject; } - if (!unrooted) { - // Move the caret rect to the coords of the painter - localRect.move(offsetFromPainter); + if (!unrooted) m_caretRect = localRect; - } m_absCaretBoundsDirty = true; } diff --git a/WebCore/editing/SelectionController.h b/WebCore/editing/SelectionController.h index 7cad435..6849cb6 100644 --- a/WebCore/editing/SelectionController.h +++ b/WebCore/editing/SelectionController.h @@ -140,6 +140,10 @@ private: TextDirection directionOfEnclosingBlock(); + VisiblePosition positionForPlatform(bool isGetStart) const; + VisiblePosition startForPlatform() const; + VisiblePosition endForPlatform() const; + VisiblePosition modifyExtendingRight(TextGranularity); VisiblePosition modifyExtendingForward(TextGranularity); VisiblePosition modifyMovingRight(TextGranularity); diff --git a/WebCore/html/HTMLAudioElement.cpp b/WebCore/html/HTMLAudioElement.cpp index 6adf9ea..347b8c4 100644 --- a/WebCore/html/HTMLAudioElement.cpp +++ b/WebCore/html/HTMLAudioElement.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -20,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -34,11 +35,22 @@ namespace WebCore { using namespace HTMLNames; -HTMLAudioElement::HTMLAudioElement(const QualifiedName& tagName, Document* doc) - : HTMLMediaElement(tagName, doc) +HTMLAudioElement::HTMLAudioElement(const QualifiedName& tagName, Document* document) + : HTMLMediaElement(tagName, document) { ASSERT(hasTagName(audioTag)); } +PassRefPtr<HTMLAudioElement> HTMLAudioElement::createForJSConstructor(Document* document, const String& src) +{ + RefPtr<HTMLAudioElement> audio = new HTMLAudioElement(audioTag, document); + audio->setAutobuffer(true); + if (!src.isNull()) { + audio->setSrc(src); + audio->scheduleLoad(); + } + return audio.release(); +} + } #endif diff --git a/WebCore/html/HTMLAudioElement.h b/WebCore/html/HTMLAudioElement.h index 1dbe44f..2f06f1a 100644 --- a/WebCore/html/HTMLAudioElement.h +++ b/WebCore/html/HTMLAudioElement.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -20,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef HTMLAudioElement_h @@ -28,14 +29,17 @@ #if ENABLE(VIDEO) +#include "Document.h" #include "HTMLMediaElement.h" namespace WebCore { class HTMLAudioElement : public HTMLMediaElement { public: + static PassRefPtr<HTMLAudioElement> createForJSConstructor(Document*, const String& src); HTMLAudioElement(const QualifiedName&, Document*); - +private: + virtual bool isVideo() const { return false; } virtual int tagPriority() const { return 5; } }; diff --git a/WebCore/html/HTMLFrameElementBase.cpp b/WebCore/html/HTMLFrameElementBase.cpp index 3890850..9d84b62 100644 --- a/WebCore/html/HTMLFrameElementBase.cpp +++ b/WebCore/html/HTMLFrameElementBase.cpp @@ -150,7 +150,7 @@ void HTMLFrameElementBase::parseMappedAttribute(MappedAttribute *attr) HTMLFrameOwnerElement::parseMappedAttribute(attr); } -void HTMLFrameElementBase::setNameAndOpenURL() +void HTMLFrameElementBase::setName() { m_frameName = getAttribute(nameAttr); if (m_frameName.isNull()) @@ -158,7 +158,11 @@ void HTMLFrameElementBase::setNameAndOpenURL() if (Frame* parentFrame = document()->frame()) m_frameName = parentFrame->tree()->uniqueChildName(m_frameName); - +} + +void HTMLFrameElementBase::setNameAndOpenURL() +{ + setName(); openURL(); } @@ -167,6 +171,14 @@ void HTMLFrameElementBase::setNameAndOpenURLCallback(Node* n) static_cast<HTMLFrameElementBase*>(n)->setNameAndOpenURL(); } +void HTMLFrameElementBase::updateOnReparenting() +{ + ASSERT(m_remainsAliveOnRemovalFromTree); + + if (Frame* frame = contentFrame()) + frame->transferChildFrameToNewDocument(); +} + void HTMLFrameElementBase::insertedIntoDocument() { HTMLFrameOwnerElement::insertedIntoDocument(); @@ -175,6 +187,9 @@ void HTMLFrameElementBase::insertedIntoDocument() // Othewise, a synchronous load that executed JavaScript would see incorrect // (0) values for the frame's renderer-dependent properties, like width. m_shouldOpenURLAfterAttach = true; + + if (m_remainsAliveOnRemovalFromTree) + updateOnReparenting(); } void HTMLFrameElementBase::removedFromDocument() diff --git a/WebCore/html/HTMLFrameElementBase.h b/WebCore/html/HTMLFrameElementBase.h index ea93ae7..7717df0 100644 --- a/WebCore/html/HTMLFrameElementBase.h +++ b/WebCore/html/HTMLFrameElementBase.h @@ -64,8 +64,11 @@ private: virtual bool isURLAttribute(Attribute*) const; + virtual void setName(); + virtual void willRemove(); void checkAttachedTimerFired(Timer<HTMLFrameElementBase>*); + void updateOnReparenting(); bool viewSourceMode() const { return m_viewSource; } diff --git a/WebCore/html/HTMLFrameOwnerElement.h b/WebCore/html/HTMLFrameOwnerElement.h index 4a56e45..804ab22 100644 --- a/WebCore/html/HTMLFrameOwnerElement.h +++ b/WebCore/html/HTMLFrameOwnerElement.h @@ -59,6 +59,7 @@ protected: private: friend class Frame; + virtual void setName() { } virtual bool isFrameOwnerElement() const { return true; } virtual bool isKeyboardFocusable(KeyboardEvent*) const { return m_contentFrame; } diff --git a/WebCore/html/HTMLImageElement.cpp b/WebCore/html/HTMLImageElement.cpp index 4592461..d3cea92 100644 --- a/WebCore/html/HTMLImageElement.cpp +++ b/WebCore/html/HTMLImageElement.cpp @@ -1,7 +1,8 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -58,6 +59,16 @@ HTMLImageElement::~HTMLImageElement() m_form->removeImgElement(this); } +PassRefPtr<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document* document, const int* optionalWidth, const int* optionalHeight) +{ + RefPtr<HTMLImageElement> image = new HTMLImageElement(imgTag, document); + if (optionalWidth) + image->setWidth(*optionalWidth); + if (optionalHeight > 0) + image->setHeight(*optionalHeight); + return image.release(); +} + bool HTMLImageElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const { if (attrName == widthAttr || @@ -68,7 +79,7 @@ bool HTMLImageElement::mapToEntry(const QualifiedName& attrName, MappedAttribute result = eUniversal; return false; } - + if (attrName == borderAttr || attrName == alignAttr) { result = eReplaced; // Shared with embed and iframe elements. return false; @@ -161,7 +172,7 @@ RenderObject* HTMLImageElement::createRenderer(RenderArena* arena, RenderStyle* { if (style->contentData()) return RenderObject::createObject(this, style); - + return new (arena) RenderImage(this); } @@ -174,7 +185,7 @@ void HTMLImageElement::attach() if (imageObj->hasImage()) return; imageObj->setCachedImage(m_imageLoader.image()); - + // If we have no image at all because we have no src attribute, set // image height and width for the alt text instead. if (!m_imageLoader.image() && !imageObj->cachedImage()) @@ -241,7 +252,7 @@ int HTMLImageElement::width(bool ignorePendingStylesheets) const int width = getAttribute(widthAttr).toInt(&ok); if (ok) return width; - + // if the image is available, use its width if (m_imageLoader.image()) { float zoomFactor = document()->frame() ? document()->frame()->pageZoomFactor() : 1.0f; @@ -265,7 +276,7 @@ int HTMLImageElement::height(bool ignorePendingStylesheets) const int height = getAttribute(heightAttr).toInt(&ok); if (ok) return height; - + // if the image is available, use its height if (m_imageLoader.image()) { float zoomFactor = document()->frame() ? document()->frame()->pageZoomFactor() : 1.0f; @@ -293,10 +304,10 @@ int HTMLImageElement::naturalHeight() const { if (!m_imageLoader.image()) return 0; - + return m_imageLoader.image()->imageSize(1.0f).height(); } - + bool HTMLImageElement::isURLAttribute(Attribute* attr) const { return attr->name() == srcAttr diff --git a/WebCore/html/HTMLImageElement.h b/WebCore/html/HTMLImageElement.h index 14e5fa3..d7df1dc 100644 --- a/WebCore/html/HTMLImageElement.h +++ b/WebCore/html/HTMLImageElement.h @@ -1,7 +1,8 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -34,6 +35,8 @@ class HTMLFormElement; class HTMLImageElement : public HTMLElement { friend class HTMLFormElement; public: + static PassRefPtr<HTMLImageElement> createForJSConstructor(Document*, const int* optionalWidth, const int* optionalHeight); + HTMLImageElement(const QualifiedName&, Document*, HTMLFormElement* = 0); ~HTMLImageElement(); @@ -53,7 +56,7 @@ public: int naturalWidth() const; int naturalHeight() const; - + bool isServerMap() const { return ismap && usemap.isEmpty(); } String altText() const; diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp index ee0c75d..c3f6703 100644 --- a/WebCore/html/HTMLInputElement.cpp +++ b/WebCore/html/HTMLInputElement.cpp @@ -503,7 +503,7 @@ bool HTMLInputElement::stepMismatch() const return false; case NUMBER: { double doubleValue; - if (!formStringToDouble(value(), &doubleValue)) + if (!parseToDoubleForNumberType(value(), &doubleValue)) return false; doubleValue = fabs(doubleValue - stepBase()); if (isinf(doubleValue)) @@ -624,7 +624,7 @@ bool HTMLInputElement::getAllowedValueStep(double* step) const if (equalIgnoringCase(stepString, "any")) return false; double parsed; - if (!formStringToDouble(stepString, &parsed) || parsed <= 0.0) { + if (!parseToDoubleForNumberType(stepString, &parsed) || parsed <= 0.0) { *step = defaultStep * stepScaleFactor; return true; } @@ -1618,7 +1618,7 @@ double HTMLInputElement::parseToDouble(const String& src, double defaultValue) c case TIME: case WEEK: { DateComponents date; - if (!formStringToDateComponents(inputType(), src, &date)) + if (!parseToDateComponents(inputType(), src, &date)) return defaultValue; double msec = date.millisecondsSinceEpoch(); ASSERT(isfinite(msec)); @@ -1626,7 +1626,7 @@ double HTMLInputElement::parseToDouble(const String& src, double defaultValue) c } case MONTH: { DateComponents date; - if (!formStringToDateComponents(inputType(), src, &date)) + if (!parseToDateComponents(inputType(), src, &date)) return defaultValue; double months = date.monthsSinceEpoch(); ASSERT(isfinite(months)); @@ -1635,7 +1635,7 @@ double HTMLInputElement::parseToDouble(const String& src, double defaultValue) c case NUMBER: case RANGE: { double numberValue; - if (!formStringToDouble(src, &numberValue)) + if (!parseToDoubleForNumberType(src, &numberValue)) return defaultValue; ASSERT(isfinite(numberValue)); return numberValue; @@ -1673,7 +1673,7 @@ double HTMLInputElement::valueAsDate() const return parseToDouble(value(), DateComponents::invalidMilliseconds()); case MONTH: { DateComponents date; - if (!formStringToDateComponents(inputType(), value(), &date)) + if (!parseToDateComponents(inputType(), value(), &date)) return DateComponents::invalidMilliseconds(); double msec = date.millisecondsSinceEpoch(); ASSERT(isfinite(msec)); @@ -1707,24 +1707,22 @@ double HTMLInputElement::valueAsDate() const void HTMLInputElement::setValueAsDate(double value, ExceptionCode& ec) { - DateComponents date; - bool success; switch (inputType()) { case DATE: - success = date.setMillisecondsSinceEpochForDate(value); - break; case DATETIME: - success = date.setMillisecondsSinceEpochForDateTime(value); - break; - case MONTH: - success = date.setMillisecondsSinceEpochForMonth(value); - break; case TIME: - success = date.setMillisecondsSinceMidnight(value); - break; case WEEK: - success = date.setMillisecondsSinceEpochForWeek(value); - break; + setValue(serializeForDateTimeTypes(value)); + return; + case MONTH: { + DateComponents date; + if (!date.setMillisecondsSinceEpochForMonth(value)) { + setValue(String()); + return; + } + setValue(date.toString()); + return; + } case BUTTON: case CHECKBOX: case COLOR: @@ -1746,33 +1744,8 @@ void HTMLInputElement::setValueAsDate(double value, ExceptionCode& ec) case URL: ec = INVALID_STATE_ERR; return; - default: - ASSERT_NOT_REACHED(); - success = false; } - if (!success) { - setValue(String()); - return; - } - setDateValue(date); -} - -void HTMLInputElement::setDateValue(const DateComponents& date) -{ - double step; - if (!getAllowedValueStep(&step)) { - setValue(date.toString()); - return; - } - if (!fmod(step, msecPerMinute)) { - setValue(date.toString(DateComponents::None)); - return; - } - if (!fmod(step, msecPerSecond)) { - setValue(date.toString(DateComponents::Second)); - return; - } - setValue(date.toString(DateComponents::Millisecond)); + ASSERT_NOT_REACHED(); } double HTMLInputElement::valueAsNumber() const @@ -1820,32 +1793,109 @@ void HTMLInputElement::setValueAsNumber(double newValue, ExceptionCode& ec) switch (inputType()) { case DATE: case DATETIME: + case DATETIMELOCAL: + case MONTH: + case NUMBER: + case RANGE: case TIME: case WEEK: - setValueAsDate(newValue, ec); + setValue(serialize(newValue)); return; - case MONTH: { - DateComponents date; - if (!date.setMonthsSinceEpoch(newValue)) { - setValue(String()); - return; - } - setValue(date.toString()); + + case BUTTON: + case CHECKBOX: + case COLOR: + case EMAIL: + case FILE: + case HIDDEN: + case IMAGE: + case ISINDEX: + case PASSWORD: + case RADIO: + case RESET: + case SEARCH: + case SUBMIT: + case TELEPHONE: + case TEXT: + case URL: + ec = INVALID_STATE_ERR; return; } - case DATETIMELOCAL: { - DateComponents date; - if (!date.setMillisecondsSinceEpochForDateTimeLocal(newValue)) { - setValue(String()); - return; - } - setDateValue(date); - return; + ASSERT_NOT_REACHED(); +} + +String HTMLInputElement::serializeForDateTimeTypes(double value) const +{ + bool success = false; + DateComponents date; + switch (inputType()) { + case DATE: + success = date.setMillisecondsSinceEpochForDate(value); + break; + case DATETIME: + success = date.setMillisecondsSinceEpochForDateTime(value); + break; + case DATETIMELOCAL: + success = date.setMillisecondsSinceEpochForDateTimeLocal(value); + break; + case MONTH: + success = date.setMonthsSinceEpoch(value); + break; + case TIME: + success = date.setMillisecondsSinceMidnight(value); + break; + case WEEK: + success = date.setMillisecondsSinceEpochForWeek(value); + break; + case NUMBER: + case RANGE: + case BUTTON: + case CHECKBOX: + case COLOR: + case EMAIL: + case FILE: + case HIDDEN: + case IMAGE: + case ISINDEX: + case PASSWORD: + case RADIO: + case RESET: + case SEARCH: + case SUBMIT: + case TELEPHONE: + case TEXT: + case URL: + ASSERT_NOT_REACHED(); + return String(); } + if (!success) + return String(); + + double step; + if (!getAllowedValueStep(&step)) + return date.toString(); + if (!fmod(step, msecPerMinute)) + return date.toString(DateComponents::None); + if (!fmod(step, msecPerSecond)) + return date.toString(DateComponents::Second); + return date.toString(DateComponents::Millisecond); +} + +String HTMLInputElement::serialize(double value) const +{ + if (!isfinite(value)) + return String(); + switch (inputType()) { + case DATE: + case DATETIME: + case DATETIMELOCAL: + case MONTH: + case TIME: + case WEEK: + return serializeForDateTimeTypes(value); case NUMBER: case RANGE: - setValue(formStringFromDouble(newValue)); - return; + return serializeForNumberType(value); case BUTTON: case CHECKBOX: @@ -1863,11 +1913,10 @@ void HTMLInputElement::setValueAsNumber(double newValue, ExceptionCode& ec) case TELEPHONE: case TEXT: case URL: - ec = INVALID_STATE_ERR; - return; + break; } ASSERT_NOT_REACHED(); - return; + return String(); } String HTMLInputElement::placeholder() const @@ -2573,7 +2622,7 @@ bool HTMLInputElement::willValidate() const inputType() != BUTTON && inputType() != RESET; } -String HTMLInputElement::formStringFromDouble(double number) +String HTMLInputElement::serializeForNumberType(double number) { // According to HTML5, "the best representation of the number n as a floating // point number" is a string produced by applying ToString() to n. @@ -2583,7 +2632,7 @@ String HTMLInputElement::formStringFromDouble(double number) return String(buffer, length); } -bool HTMLInputElement::formStringToDouble(const String& src, double* out) +bool HTMLInputElement::parseToDoubleForNumberType(const String& src, double* out) { // See HTML5 2.4.4.3 `Real numbers.' @@ -2609,7 +2658,7 @@ bool HTMLInputElement::formStringToDouble(const String& src, double* out) return true; } -bool HTMLInputElement::formStringToDateComponents(InputType type, const String& formString, DateComponents* out) +bool HTMLInputElement::parseToDateComponents(InputType type, const String& formString, DateComponents* out) { if (formString.isEmpty()) return false; diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h index 4665437..40930ac 100644 --- a/WebCore/html/HTMLInputElement.h +++ b/WebCore/html/HTMLInputElement.h @@ -262,14 +262,14 @@ public: // Converts the specified string to a floating number. // If the conversion fails, the return value is false. Take care that leading or trailing unnecessary characters make failures. This returns false for an empty string input. // The double* parameter may be 0. - static bool formStringToDouble(const String&, double*); + static bool parseToDoubleForNumberType(const String&, double*); // Converts the specified number to a string. This is an implementation of // HTML5's "algorithm to convert a number to a string" for NUMBER/RANGE types. - static String formStringFromDouble(double); + static String serializeForNumberType(double); // Parses the specified string as the InputType, and returns true if it is successfully parsed. // An instance pointed by the DateComponents* parameter will have parsed values and be // modified even if the parsing fails. The DateComponents* parameter may be 0. - static bool formStringToDateComponents(InputType, const String&, DateComponents*); + static bool parseToDateComponents(InputType, const String&, DateComponents*); protected: virtual void willMoveToNewOwnerDocument(); @@ -305,11 +305,14 @@ private: // succeeds; Returns defaultValue otherwise. This function can // return NaN or Infinity only if defaultValue is NaN or Infinity. double parseToDouble(const String&, double defaultValue) const; - - // Generates a suitable string for the specified DateComponents and the - // step value, and calls setValue() with it. - void setDateValue(const DateComponents&); - + // Create a string representation of the specified double value for the + // current input type. If NaN or Infinity is specified, this returns an + // emtpy string. This should not be called for types without valueAsNumber. + String serialize(double) const; + // Create a string representation of the specified double value for the + // current input type. The type must be one of DATE, DATETIME, + // DATETIMELOCAL, MONTH, TIME, and WEEK. + String serializeForDateTimeTypes(double) const; #if ENABLE(DATALIST) HTMLDataListElement* dataList() const; diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp index 279aac7..12b93ef 100644 --- a/WebCore/html/HTMLMediaElement.cpp +++ b/WebCore/html/HTMLMediaElement.cpp @@ -664,8 +664,8 @@ void HTMLMediaElement::noneSupported() // 9 -Abort these steps. Until the load() method is invoked, the element won't attempt to load another resource. - if (isVideo()) - static_cast<HTMLVideoElement*>(this)->updatePosterImage(); + updatePosterImage(); + if (renderer()) renderer()->updateFromElement(); } @@ -743,9 +743,7 @@ void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state) else if (state == MediaPlayer::FormatError && m_loadState == LoadingFromSrcAttr) noneSupported(); - if (isVideo()) - static_cast<HTMLVideoElement*>(this)->updatePosterImage(); - + updatePosterImage(); return; } @@ -883,8 +881,8 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state) shouldUpdatePosterImage = true; } - if (shouldUpdatePosterImage && isVideo()) - static_cast<HTMLVideoElement*>(this)->updatePosterImage(); + if (shouldUpdatePosterImage) + updatePosterImage(); updatePlayState(); } @@ -1506,6 +1504,8 @@ void HTMLMediaElement::mediaPlayerRepaint(MediaPlayer*) beginProcessingMediaPlayerCallback(); if (renderer()) renderer()->repaint(); + + updatePosterImage(); endProcessingMediaPlayerCallback(); } @@ -1529,11 +1529,10 @@ bool HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated(MediaPlayer*) return false; } -GraphicsLayer* HTMLMediaElement::mediaPlayerGraphicsLayer(MediaPlayer*) +void HTMLMediaElement::mediaPlayerRenderingModeChanged(MediaPlayer*) { - if (renderer() && renderer()->isVideo()) - return toRenderVideo(renderer())->videoGraphicsLayer(); - return 0; + // Kick off a fake recalcStyle that will update the compositing tree. + setNeedsStyleRecalc(SyntheticStyleChange); } #endif @@ -1878,6 +1877,13 @@ PlatformMedia HTMLMediaElement::platformMedia() const return m_player ? m_player->platformMedia() : NoPlatformMedia; } +#if USE(ACCELERATED_COMPOSITING) +PlatformLayer* HTMLMediaElement::platformLayer() const +{ + return m_player ? m_player->platformLayer() : 0; +} +#endif + bool HTMLMediaElement::hasClosedCaptions() const { return m_player && m_player->hasClosedCaptions(); diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h index 45a41c6..07801da 100644 --- a/WebCore/html/HTMLMediaElement.h +++ b/WebCore/html/HTMLMediaElement.h @@ -46,7 +46,6 @@ class TimeRanges; class HTMLMediaElement : public HTMLElement, public MediaPlayerClient { public: - HTMLMediaElement(const QualifiedName&, Document*); virtual ~HTMLMediaElement(); bool checkDTD(const Node* newChild); @@ -63,7 +62,7 @@ public: MediaPlayer* player() const { return m_player.get(); } - virtual bool isVideo() const { return false; } + virtual bool isVideo() const = 0; virtual bool hasVideo() const { return false; } virtual bool hasAudio() const; @@ -75,6 +74,9 @@ public: virtual bool supportsSave() const; PlatformMedia platformMedia() const; +#if USE(ACCELERATED_COMPOSITING) + PlatformLayer* platformLayer() const; +#endif void scheduleLoad(); @@ -174,12 +176,15 @@ public: bool processingUserGesture() const; protected: + HTMLMediaElement(const QualifiedName&, Document*); + float getTimeOffsetAttribute(const QualifiedName&, float valueOnError) const; void setTimeOffsetAttribute(const QualifiedName&, float value); virtual void documentWillBecomeInactive(); virtual void documentDidBecomeActive(); virtual void mediaVolumeDidChange(); + virtual void updatePosterImage() { } void setReadyState(MediaPlayer::ReadyState); void setNetworkState(MediaPlayer::NetworkState); @@ -200,7 +205,7 @@ private: // MediaPlayerClient virtual void mediaPlayerSizeChanged(MediaPlayer*); #if USE(ACCELERATED_COMPOSITING) virtual bool mediaPlayerRenderingCanBeAccelerated(MediaPlayer*); - virtual GraphicsLayer* mediaPlayerGraphicsLayer(MediaPlayer*); + virtual void mediaPlayerRenderingModeChanged(MediaPlayer*); #endif private: diff --git a/WebCore/html/HTMLOptionElement.cpp b/WebCore/html/HTMLOptionElement.cpp index cab4e18..2752cbb 100644 --- a/WebCore/html/HTMLOptionElement.cpp +++ b/WebCore/html/HTMLOptionElement.cpp @@ -2,8 +2,9 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2001 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. * (C) 2006 Alexey Proskuryakov (ap@nypop.com) + * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -41,13 +42,33 @@ namespace WebCore { using namespace HTMLNames; -HTMLOptionElement::HTMLOptionElement(const QualifiedName& tagName, Document* doc, HTMLFormElement* f) - : HTMLFormControlElement(tagName, doc, f) +HTMLOptionElement::HTMLOptionElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form) + : HTMLFormControlElement(tagName, document, form) , m_style(0) { ASSERT(hasTagName(optionTag)); } +PassRefPtr<HTMLOptionElement> HTMLOptionElement::createForJSConstructor(Document* document, const String& data, const String& value, + bool defaultSelected, bool selected, ExceptionCode& ec) +{ + RefPtr<HTMLOptionElement> element = new HTMLOptionElement(optionTag, document); + + RefPtr<Text> text = Text::create(document, data.isNull() ? "" : data); + + ec = 0; + element->appendChild(text.release(), ec); + if (ec) + return 0; + + if (!value.isNull()) + element->setValue(value); + element->setDefaultSelected(defaultSelected); + element->setSelected(selected); + + return element.release(); +} + bool HTMLOptionElement::checkDTD(const Node* newChild) { return newChild->isTextNode() || newChild->hasTagName(scriptTag); @@ -178,7 +199,7 @@ HTMLSelectElement* HTMLOptionElement::ownerSelectElement() const if (!select) return 0; - + return static_cast<HTMLSelectElement*>(select); } @@ -207,9 +228,9 @@ void HTMLOptionElement::setRenderStyle(PassRefPtr<RenderStyle> newStyle) m_style = newStyle; } -RenderStyle* HTMLOptionElement::nonRendererRenderStyle() const -{ - return m_style.get(); +RenderStyle* HTMLOptionElement::nonRendererRenderStyle() const +{ + return m_style.get(); } String HTMLOptionElement::textIndentedToRespectGroupLabel() const @@ -218,8 +239,8 @@ String HTMLOptionElement::textIndentedToRespectGroupLabel() const } bool HTMLOptionElement::disabled() const -{ - return ownElementDisabled() || (parentNode() && static_cast<HTMLFormControlElement*>(parentNode())->disabled()); +{ + return ownElementDisabled() || (parentNode() && static_cast<HTMLFormControlElement*>(parentNode())->disabled()); } void HTMLOptionElement::insertedIntoTree(bool deep) @@ -231,7 +252,7 @@ void HTMLOptionElement::insertedIntoTree(bool deep) select->setSelectedIndex(index(), false); select->scrollToSelection(); } - + HTMLFormControlElement::insertedIntoTree(deep); } diff --git a/WebCore/html/HTMLOptionElement.h b/WebCore/html/HTMLOptionElement.h index 7be9e9a..4255f25 100644 --- a/WebCore/html/HTMLOptionElement.h +++ b/WebCore/html/HTMLOptionElement.h @@ -3,6 +3,7 @@ * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Dirk Mueller (mueller@kde.org) * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. + * Copyright (C) 2010 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -39,6 +40,9 @@ class HTMLOptionElement : public HTMLFormControlElement, public OptionElement { public: HTMLOptionElement(const QualifiedName&, Document*, HTMLFormElement* = 0); + static PassRefPtr<HTMLOptionElement> createForJSConstructor(Document*, const String& data, const String& value, + bool defaultSelected, bool selected, ExceptionCode&); + virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; } virtual int tagPriority() const { return 2; } virtual bool checkDTD(const Node* newChild); @@ -48,7 +52,7 @@ public: virtual void attach(); virtual void detach(); virtual void setRenderStyle(PassRefPtr<RenderStyle>); - + virtual const AtomicString& formControlType() const; virtual String text() const; @@ -78,10 +82,10 @@ public: bool ownElementDisabled() const { return HTMLFormControlElement::disabled(); } virtual bool disabled() const; - + virtual void insertedIntoTree(bool); virtual void accessKeyAction(bool); - + private: virtual RenderStyle* nonRendererRenderStyle() const; diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp index 9319034..51db115 100644 --- a/WebCore/html/HTMLPlugInElement.cpp +++ b/WebCore/html/HTMLPlugInElement.cpp @@ -151,6 +151,12 @@ bool HTMLPlugInElement::checkDTD(const Node* newChild) void HTMLPlugInElement::defaultEventHandler(Event* event) { + // Firefox seems to use a fake event listener to dispatch events to plug-in (tested with mouse events only). + // This is observable via different order of events - in Firefox, event listeners specified in HTML attributes fires first, then an event + // gets dispatched to plug-in, and only then other event listeners fire. Hopefully, this difference does not matter in practice. + + // FIXME: Mouse down and scroll events are passed down to plug-in via custom code in EventHandler; these code paths should be united. + RenderObject* r = renderer(); if (!r || !r->isWidget()) return; diff --git a/WebCore/html/HTMLVideoElement.h b/WebCore/html/HTMLVideoElement.h index a5c005c..d12667e 100644 --- a/WebCore/html/HTMLVideoElement.h +++ b/WebCore/html/HTMLVideoElement.h @@ -70,7 +70,6 @@ public: bool webkitSupportsFullscreen(); bool webkitDisplayingFullscreen(); - void updatePosterImage(); bool shouldDisplayPosterImage() const { return m_shouldDisplayPosterImage; } void paint(GraphicsContext*, const IntRect&); @@ -79,6 +78,7 @@ public: private: virtual bool hasAvailableVideoFrame() const; + virtual void updatePosterImage(); OwnPtr<HTMLImageLoader> m_imageLoader; KURL m_posterURL; diff --git a/WebCore/html/ValidityState.cpp b/WebCore/html/ValidityState.cpp index 1e0a07b..c6c58a5 100644 --- a/WebCore/html/ValidityState.cpp +++ b/WebCore/html/ValidityState.cpp @@ -80,7 +80,7 @@ bool ValidityState::typeMismatch() const case HTMLInputElement::COLOR: return !isValidColorString(value); case HTMLInputElement::NUMBER: - return !HTMLInputElement::formStringToDouble(value, 0); + return !HTMLInputElement::parseToDoubleForNumberType(value, 0); case HTMLInputElement::URL: return !KURL(KURL(), value).isValid(); case HTMLInputElement::EMAIL: { @@ -100,7 +100,7 @@ bool ValidityState::typeMismatch() const case HTMLInputElement::MONTH: case HTMLInputElement::TIME: case HTMLInputElement::WEEK: - return !HTMLInputElement::formStringToDateComponents(input->inputType(), value, 0); + return !HTMLInputElement::parseToDateComponents(input->inputType(), value, 0); case HTMLInputElement::BUTTON: case HTMLInputElement::CHECKBOX: case HTMLInputElement::FILE: diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp index 3d0ba9e..b487ad8 100644 --- a/WebCore/inspector/InspectorController.cpp +++ b/WebCore/inspector/InspectorController.cpp @@ -24,7 +24,7 @@ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -64,7 +64,6 @@ #include "InspectorFrontendHost.h" #include "InspectorResource.h" #include "InspectorTimelineAgent.h" -#include "JavaScriptProfile.h" #include "Page.h" #include "ProgressTracker.h" #include "Range.h" @@ -101,6 +100,7 @@ #include "JSJavaScriptCallFrame.h" #include "JavaScriptCallFrame.h" #include "JavaScriptDebugServer.h" +#include "JavaScriptProfile.h" #include <runtime/JSLock.h> #include <runtime/UString.h> @@ -654,12 +654,13 @@ void InspectorController::populateScriptObjects() return; m_frontend->populateFrontendSettings(setting(FrontendSettingsSettingName)); - m_domAgent->setDocument(m_inspectedPage->mainFrame()->document()); ResourcesMap::iterator resourcesEnd = m_resources.end(); for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it) it->second->updateScriptObject(m_frontend.get()); + m_domAgent->setDocument(m_inspectedPage->mainFrame()->document()); + if (m_expiredConsoleMessageCount) m_frontend->updateConsoleMessageExpiredCount(m_expiredConsoleMessageCount); unsigned messageCount = m_consoleMessages.size(); diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js index 6889408..834f527 100644 --- a/WebCore/inspector/front-end/DOMAgent.js +++ b/WebCore/inspector/front-end/DOMAgent.js @@ -153,10 +153,13 @@ WebInspector.DOMNode.prototype = { _insertChild: function(prev, payload) { var node = new WebInspector.DOMNode(this.ownerDocument, payload); - if (!prev) - // First node - this.children = [ node ]; - else + if (!prev) { + if (!this.children) { + // First node + this.children = [ node ]; + } else + this.children.unshift(node); + } else this.children.splice(this.children.indexOf(prev) + 1, 0, node); this._renumber(); return node; diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js index e839a60..897fdd1 100644 --- a/WebCore/inspector/front-end/ElementsPanel.js +++ b/WebCore/inspector/front-end/ElementsPanel.js @@ -245,13 +245,8 @@ WebInspector.ElementsPanel.prototype = { searchCanceled: function() { - if (this._searchResults) { - for (var i = 0; i < this._searchResults.length; ++i) { - var treeElement = this.treeOutline.findTreeElement(this._searchResults[i]); - if (treeElement) - treeElement.highlighted = false; - } - } + delete this._searchQuery; + this._hideSearchHighlights(); WebInspector.updateSearchMatchesCount(0, this); @@ -271,6 +266,7 @@ WebInspector.ElementsPanel.prototype = { this._updatedMatchCountOnce = false; this._matchesCountUpdateTimeout = null; + this._searchQuery = query; InjectedScriptAccess.getDefault().performSearch(whitespaceTrimmedQuery, function() {}); }, @@ -304,25 +300,10 @@ WebInspector.ElementsPanel.prototype = { if (!node) continue; - if (!this._searchResults.length) { - this._currentSearchResultIndex = 0; - - // Only change the focusedDOMNode if the search was manually performed, because - // the search may have been performed programmatically and we wouldn't want to - // change the current focusedDOMNode. - if (WebInspector.currentFocusElement === document.getElementById("search")) - this.focusedDOMNode = node; - } - + this._currentSearchResultIndex = 0; this._searchResults.push(node); - - // Highlight the tree element to show it matched the search. - // FIXME: highlight the substrings in text nodes and attributes. - var treeElement = this.treeOutline.findTreeElement(node); - if (treeElement) - treeElement.highlighted = true; } - + this._highlightCurrentSearchResult(); this._updateMatchesCountSoon(); }, @@ -330,18 +311,41 @@ WebInspector.ElementsPanel.prototype = { { if (!this._searchResults || !this._searchResults.length) return; + if (++this._currentSearchResultIndex >= this._searchResults.length) this._currentSearchResultIndex = 0; - this.focusedDOMNode = this._searchResults[this._currentSearchResultIndex]; + this._highlightCurrentSearchResult(); }, jumpToPreviousSearchResult: function() { if (!this._searchResults || !this._searchResults.length) return; + if (--this._currentSearchResultIndex < 0) this._currentSearchResultIndex = (this._searchResults.length - 1); - this.focusedDOMNode = this._searchResults[this._currentSearchResultIndex]; + this._highlightCurrentSearchResult(); + }, + + _highlightCurrentSearchResult: function() + { + this._hideSearchHighlights(); + var node = this._searchResults[this._currentSearchResultIndex]; + var treeElement = this.treeOutline.findTreeElement(node); + if (treeElement) { + treeElement.highlightSearchResults(this._searchQuery); + treeElement.reveal(); + } + }, + + _hideSearchHighlights: function(node) + { + for (var i = 0; this._searchResults && i < this._searchResults.length; ++i) { + var node = this._searchResults[i]; + var treeElement = this.treeOutline.findTreeElement(node); + if (treeElement) + treeElement.highlightSearchResults(null); + } }, renameSelector: function(oldIdentifier, newIdentifier, oldSelector, newSelector) @@ -523,7 +527,8 @@ WebInspector.ElementsPanel.prototype = { if (this.recentlyModifiedNodes[i].updated) { var nodeItem = this.treeOutline.findTreeElement(node); - nodeItem.updateTitle(); + if (nodeItem) + nodeItem.updateTitle(); continue; } diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js index 4a8dae0..fe7ae53 100644 --- a/WebCore/inspector/front-end/ElementsTreeOutline.js +++ b/WebCore/inspector/front-end/ElementsTreeOutline.js @@ -59,9 +59,16 @@ WebInspector.ElementsTreeOutline.prototype = { this._rootDOMNode = x; + this._isXMLMimeType = !!(WebInspector.mainResource && WebInspector.mainResource.mimeType && WebInspector.mainResource.mimeType.match(/x(?:ht)?ml/i)); + this.update(); }, + get isXMLMimeType() + { + return this._isXMLMimeType; + }, + get focusedDOMNode() { return this._focusedDOMNode; @@ -155,12 +162,27 @@ WebInspector.ElementsTreeOutline.prototype = { return treeElement; }, + createTreeElementFor: function(node) + { + var treeElement = this.findTreeElement(node); + if (treeElement) + return treeElement; + if (!node.parentNode) + return null; + + var treeElement = this.createTreeElementFor(node.parentNode); + if (treeElement && treeElement.showChild(node.index)) + return treeElement.children[node.index]; + + return null; + }, + revealAndSelectNode: function(node) { if (!node) return; - var treeElement = this.findTreeElement(node); + var treeElement = this.createTreeElementFor(node); if (!treeElement) return; @@ -277,9 +299,9 @@ WebInspector.ElementsTreeOutline.prototype = { var tag = event.target.enclosingNodeOrSelfWithClass("webkit-html-tag"); var textNode = event.target.enclosingNodeOrSelfWithClass("webkit-html-text-node"); - if (tag) + if (tag && listItem.treeElement._populateTagContextMenu) listItem.treeElement._populateTagContextMenu(contextMenu, event); - else if (textNode) + else if (textNode && listItem.treeElement._populateTextContextMenu) listItem.treeElement._populateTextContextMenu(contextMenu, textNode); contextMenu.show(event); } @@ -296,27 +318,28 @@ WebInspector.ElementsTreeElement = function(node) if (this.representedObject.nodeType == Node.ELEMENT_NODE) this._canAddAttributes = true; + this._searchQuery = null; + this._expandedChildrenLimit = WebInspector.ElementsTreeElement.InitialChildrenLimit; } -WebInspector.ElementsTreeElement.prototype = { - get highlighted() - { - return this._highlighted; - }, +WebInspector.ElementsTreeElement.InitialChildrenLimit = 500; + +// A union of HTML4 and HTML5-Draft elements that explicitly +// or implicitly (for HTML5) forbid the closing tag. +// FIXME: Revise once HTML5 Final is published. +WebInspector.ElementsTreeElement.ForbiddenClosingTagElements = [ + "area", "base", "basefont", "br", "canvas", "col", "command", "embed", "frame", + "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source" +].keySet(); - set highlighted(x) +WebInspector.ElementsTreeElement.prototype = { + highlightSearchResults: function(searchQuery) { - if (this._highlighted === x) + if (this._searchQuery === searchQuery) return; - this._highlighted = x; - - if (this.listItemElement) { - if (x) - this.listItemElement.addStyleClass("highlighted"); - else - this.listItemElement.removeStyleClass("highlighted"); - } + this._searchQuery = searchQuery; + this.updateTitle(); }, get hovered() @@ -341,6 +364,42 @@ WebInspector.ElementsTreeElement.prototype = { } }, + get expandedChildrenLimit() + { + return this._expandedChildrenLimit; + }, + + set expandedChildrenLimit(x) + { + if (this._expandedChildrenLimit === x) + return; + + this._expandedChildrenLimit = x; + if (this.treeOutline && !this._updateChildrenInProgress) + this._updateChildren(true); + }, + + get expandedChildCount() + { + var count = this.children.length; + if (count && this.children[count - 1].elementCloseTag) + count--; + if (count && this.children[count - 1].expandAllButton) + count--; + return count; + }, + + showChild: function(index) + { + if (index >= this.expandedChildrenLimit) { + this._expandedChildrenLimit = index + 1; + this._updateChildren(true); + } + + // Whether index-th child is visible in the children tree + return this.expandedChildCount > index; + }, + createTooltipForImageNode: function(node, callback) { function createTooltipThenCallback(properties) @@ -386,9 +445,6 @@ WebInspector.ElementsTreeElement.prototype = { { this.listItemElement.addEventListener("mousedown", this.onmousedown.bind(this), false); - if (this._highlighted) - this.listItemElement.addStyleClass("highlighted"); - if (this._hovered) { this.updateSelection(); this.listItemElement.addStyleClass("hovered"); @@ -422,9 +478,34 @@ WebInspector.ElementsTreeElement.prototype = { WebInspector.domAgent.getChildNodesAsync(this.representedObject, this._updateChildren.bind(this, fullRefresh)); }, + insertChildElement: function(child, index) + { + var newElement = new WebInspector.ElementsTreeElement(child); + newElement.selectable = this.treeOutline.selectEnabled; + this.insertChild(newElement, index); + return newElement; + }, + + moveChild: function(child, targetIndex) + { + var wasSelected = child.selected; + treeElement.removeChild(child); + treeElement.insertChild(child, targetIndex); + if (wasSelected) + existingTreeElement.select(); + }, + _updateChildren: function(fullRefresh) { + if (this._updateChildrenInProgress) + return; + + this._updateChildrenInProgress = true; + var focusedNode = this.treeOutline.focusedDOMNode; + var originalScrollTop; if (fullRefresh) { + var treeOutlineContainerElement = this.treeOutline.element.parentNode; + originalScrollTop = treeOutlineContainerElement.scrollTop; var selectedTreeElement = this.treeOutline.selectedTreeElement; if (selectedTreeElement && selectedTreeElement.hasAncestor(this)) this.select(); @@ -433,6 +514,7 @@ WebInspector.ElementsTreeElement.prototype = { var treeElement = this; var treeChildIndex = 0; + var elementToSelect; function updateChildrenOfNode(node) { @@ -443,7 +525,7 @@ WebInspector.ElementsTreeElement.prototype = { if (!currentTreeElement || currentTreeElement.representedObject !== child) { // Find any existing element that is later in the children list. var existingTreeElement = null; - for (var i = (treeChildIndex + 1); i < treeElement.children.length; ++i) { + for (var i = (treeChildIndex + 1), size = treeElement.expandedChildCount; i < size; ++i) { if (treeElement.children[i].representedObject === child) { existingTreeElement = treeElement.children[i]; break; @@ -452,16 +534,16 @@ WebInspector.ElementsTreeElement.prototype = { if (existingTreeElement && existingTreeElement.parent === treeElement) { // If an existing element was found and it has the same parent, just move it. - var wasSelected = existingTreeElement.selected; - treeElement.removeChild(existingTreeElement); - treeElement.insertChild(existingTreeElement, treeChildIndex); - if (wasSelected) - existingTreeElement.select(); + treeElement.moveChild(existingTreeElement, treeChildIndex); } else { // No existing element found, insert a new element. - var newElement = new WebInspector.ElementsTreeElement(child); - newElement.selectable = treeOutline.selectEnabled; - treeElement.insertChild(newElement, treeChildIndex); + if (treeChildIndex < treeElement.expandedChildrenLimit) { + var newElement = treeElement.insertChildElement(child, treeChildIndex); + if (child === focusedNode) + elementToSelect = newElement; + if (treeElement.expandedChildCount > treeElement.expandedChildrenLimit) + treeElement.expandedChildrenLimit++; + } } } @@ -490,6 +572,7 @@ WebInspector.ElementsTreeElement.prototype = { } updateChildrenOfNode(this.representedObject); + this.adjustCollapsedRange(false); var lastChild = this.children[this.children.length - 1]; if (this.representedObject.nodeType == Node.ELEMENT_NODE && (!lastChild || !lastChild.elementCloseTag)) { @@ -499,15 +582,66 @@ WebInspector.ElementsTreeElement.prototype = { item.elementCloseTag = true; this.appendChild(item); } + + // We want to restore the original selection and tree scroll position after a full refresh, if possible. + if (fullRefresh && elementToSelect) { + elementToSelect.select(); + if (treeOutlineContainerElement && originalScrollTop <= treeOutlineContainerElement.scrollHeight) + treeOutlineContainerElement.scrollTop = originalScrollTop; + } + + delete this._updateChildrenInProgress; + }, + + adjustCollapsedRange: function() + { + // Ensure precondition: only the tree elements for node children are found in the tree + // (not the Expand All button or the closing tag). + if (this.expandAllButtonElement && this.expandAllButtonElement.__treeElement.parent) + this.removeChild(this.expandAllButtonElement.__treeElement); + + const node = this.representedObject; + if (!node.children) + return; + const childNodeCount = node.children.length; + + // In case some nodes from the expanded range were removed, pull some nodes from the collapsed range into the expanded range at the bottom. + for (var i = this.expandedChildCount, limit = Math.min(this.expandedChildrenLimit, childNodeCount); i < limit; ++i) + this.insertChildElement(node.children[i], i); + + const expandedChildCount = this.expandedChildCount; + if (childNodeCount > this.expandedChildCount) { + var targetButtonIndex = expandedChildCount; + if (!this.expandAllButtonElement) { + var title = "<button class=\"show-all-nodes\" value=\"\" />"; + var item = new TreeElement(title, null, false); + item.selectable = false; + item.expandAllButton = true; + this.insertChild(item, targetButtonIndex); + this.expandAllButtonElement = item.listItemElement.firstChild; + this.expandAllButtonElement.__treeElement = item; + this.expandAllButtonElement.addEventListener("click", this.handleLoadAllChildren.bind(this), false); + } else if (!this.expandAllButtonElement.__treeElement.parent) + this.insertChild(this.expandAllButtonElement.__treeElement, targetButtonIndex); + this.expandAllButtonElement.textContent = WebInspector.UIString("Show All Nodes (%d More)", childNodeCount - expandedChildCount); + } else if (this.expandAllButtonElement) + delete this.expandAllButtonElement; + }, + + handleLoadAllChildren: function() + { + this.expandedChildrenLimit = Math.max(this.representedObject._childNodeCount, this.expandedChildrenLimit + WebInspector.ElementsTreeElement.InitialChildrenLimit); }, onexpand: function() { + this.updateTitle(); this.treeOutline.updateSelection(); }, oncollapse: function() { + this.updateTitle(); this.treeOutline.updateSelection(); }, @@ -879,11 +1013,12 @@ WebInspector.ElementsTreeElement.prototype = { var self = this; function callback(tooltipText) { - var title = self._nodeTitleInfo(self.representedObject, self.hasChildren, WebInspector.linkifyURL, tooltipText).title; + var title = self._nodeTitleInfo(WebInspector.linkifyURL, tooltipText).title; self.title = "<span class=\"highlight\">" + title + "</span>"; delete self.selectionElement; self.updateSelection(); self._preventFollowingLinksOnDoubleClick(); + self._highlightSearchResults(); }; // TODO: Replace with InjectedScriptAccess.getBasicProperties(obj, [names]). @@ -916,9 +1051,10 @@ WebInspector.ElementsTreeElement.prototype = { return hrefValue; }, - _nodeTitleInfo: function(node, hasChildren, linkify, tooltipText) + _nodeTitleInfo: function(linkify, tooltipText) { - var info = {title: "", hasChildren: hasChildren}; + var node = this.representedObject; + var info = {title: "", hasChildren: this.hasChildren}; switch (node.nodeType) { case Node.DOCUMENT_NODE: @@ -930,7 +1066,8 @@ WebInspector.ElementsTreeElement.prototype = { break; case Node.ELEMENT_NODE: - info.title = "<span class=\"webkit-html-tag\"><" + node.nodeName.toLowerCase().escapeHTML(); + var tagName = node.nodeName.toLowerCase().escapeHTML(); + info.title = "<span class=\"webkit-html-tag\"><" + tagName; if (node.hasAttributes()) { for (var i = 0; i < node.attributes.length; ++i) { @@ -951,15 +1088,21 @@ WebInspector.ElementsTreeElement.prototype = { } info.title += "></span>​"; + const closingTagHTML = "<span class=\"webkit-html-tag\"></" + tagName + "></span>​"; + var textChild = onlyTextChild.call(node); + var showInlineText = textChild && textChild.textContent.length < Preferences.maxInlineTextChildLength; + + if (!this.expanded && (!showInlineText && (this.treeOutline.isXMLMimeType || !WebInspector.ElementsTreeElement.ForbiddenClosingTagElements[tagName]))) { + if (this.hasChildren) + info.title += "<span class=\"webkit-html-text-node\">…</span>​"; + info.title += closingTagHTML; + } + // If this element only has a single child that is a text node, // just show that text and the closing tag inline rather than // create a subtree for them - - var textChild = onlyTextChild.call(node); - var showInlineText = textChild && textChild.textContent.length < Preferences.maxInlineTextChildLength; - if (showInlineText) { - info.title += "<span class=\"webkit-html-text-node\">" + textChild.nodeValue.escapeHTML() + "</span>​<span class=\"webkit-html-tag\"></" + node.nodeName.toLowerCase().escapeHTML() + "></span>"; + info.title += "<span class=\"webkit-html-text-node\">" + textChild.nodeValue.escapeHTML() + "</span>​" + closingTagHTML; info.hasChildren = false; } break; @@ -1038,6 +1181,7 @@ WebInspector.ElementsTreeElement.prototype = { return; parentElement.removeChild(self); + parentElement.adjustCollapsedRange(true); } var callId = WebInspector.Callback.wrap(removeNodeCallback); @@ -1077,6 +1221,23 @@ WebInspector.ElementsTreeElement.prototype = { _copyHTML: function() { InspectorBackend.copyNode(this.representedObject.id); + }, + + _highlightSearchResults: function() + { + if (!this._searchQuery) + return; + var text = this.listItemElement.textContent; + var regexObject = createSearchRegex(this._searchQuery); + + var offset = 0; + var match = regexObject.exec(text); + while (match) { + highlightSearchResult(this.listItemElement, offset + match.index, match[0].length); + offset += match.index + 1; + text = text.substring(match.index + 1); + match = regexObject.exec(text); + } } } diff --git a/WebCore/inspector/front-end/EventListenersSidebarPane.js b/WebCore/inspector/front-end/EventListenersSidebarPane.js index 649eea8..e454256 100644 --- a/WebCore/inspector/front-end/EventListenersSidebarPane.js +++ b/WebCore/inspector/front-end/EventListenersSidebarPane.js @@ -191,7 +191,7 @@ WebInspector.EventListenerBar.prototype = { // Just build properties in place - no need to reach out for injected script. var value = this.eventListener[propertyName]; if (value instanceof WebInspector.DOMNode) - value = new WebInspector.ObjectProxy(value.injectedScriptId, value.id, [], 0, appropriateSelectorForNode(value), true); + value = new WebInspector.ObjectProxy(value.injectedScriptId, value.id, [], appropriateSelectorForNode(value), true); else value = WebInspector.ObjectProxy.wrapPrimitiveValue(value); properties.push(new WebInspector.ObjectPropertyProxy(propertyName, value)); diff --git a/WebCore/inspector/front-end/Images/gearButtonGlyph.png b/WebCore/inspector/front-end/Images/gearButtonGlyph.png Binary files differnew file mode 100644 index 0000000..19659c9 --- /dev/null +++ b/WebCore/inspector/front-end/Images/gearButtonGlyph.png diff --git a/WebCore/inspector/front-end/Images/popoverArrows.png b/WebCore/inspector/front-end/Images/popoverArrows.png Binary files differnew file mode 100644 index 0000000..ccefa16 --- /dev/null +++ b/WebCore/inspector/front-end/Images/popoverArrows.png diff --git a/WebCore/inspector/front-end/Images/popoverBackground.png b/WebCore/inspector/front-end/Images/popoverBackground.png Binary files differnew file mode 100644 index 0000000..f20c988 --- /dev/null +++ b/WebCore/inspector/front-end/Images/popoverBackground.png diff --git a/WebCore/inspector/front-end/Images/thumbActiveHoriz.png b/WebCore/inspector/front-end/Images/thumbActiveHoriz.png Binary files differnew file mode 100644 index 0000000..a6ee561 --- /dev/null +++ b/WebCore/inspector/front-end/Images/thumbActiveHoriz.png diff --git a/WebCore/inspector/front-end/Images/thumbActiveVert.png b/WebCore/inspector/front-end/Images/thumbActiveVert.png Binary files differnew file mode 100644 index 0000000..a3eabe8 --- /dev/null +++ b/WebCore/inspector/front-end/Images/thumbActiveVert.png diff --git a/WebCore/inspector/front-end/Images/thumbHoriz.png b/WebCore/inspector/front-end/Images/thumbHoriz.png Binary files differnew file mode 100644 index 0000000..c16559a --- /dev/null +++ b/WebCore/inspector/front-end/Images/thumbHoriz.png diff --git a/WebCore/inspector/front-end/Images/thumbHoverHoriz.png b/WebCore/inspector/front-end/Images/thumbHoverHoriz.png Binary files differnew file mode 100644 index 0000000..0fe8d6a --- /dev/null +++ b/WebCore/inspector/front-end/Images/thumbHoverHoriz.png diff --git a/WebCore/inspector/front-end/Images/thumbHoverVert.png b/WebCore/inspector/front-end/Images/thumbHoverVert.png Binary files differnew file mode 100644 index 0000000..30e315a --- /dev/null +++ b/WebCore/inspector/front-end/Images/thumbHoverVert.png diff --git a/WebCore/inspector/front-end/Images/thumbVert.png b/WebCore/inspector/front-end/Images/thumbVert.png Binary files differnew file mode 100644 index 0000000..61fbc06 --- /dev/null +++ b/WebCore/inspector/front-end/Images/thumbVert.png diff --git a/WebCore/inspector/front-end/Images/trackHoriz.png b/WebCore/inspector/front-end/Images/trackHoriz.png Binary files differnew file mode 100644 index 0000000..517d306 --- /dev/null +++ b/WebCore/inspector/front-end/Images/trackHoriz.png diff --git a/WebCore/inspector/front-end/Images/trackVert.png b/WebCore/inspector/front-end/Images/trackVert.png Binary files differnew file mode 100644 index 0000000..d49620d --- /dev/null +++ b/WebCore/inspector/front-end/Images/trackVert.png diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js index 95867c4..8d8fa88 100644 --- a/WebCore/inspector/front-end/InjectedScript.js +++ b/WebCore/inspector/front-end/InjectedScript.js @@ -485,25 +485,30 @@ InjectedScript.getProperties = function(objectProxy, ignoreHasOwnProperty, abbre var object = InjectedScript._resolveObject(objectProxy); if (!InjectedScript._isDefined(object)) return false; - var properties = []; + var propertyNames = ignoreHasOwnProperty ? InjectedScript._getPropertyNames(object) : Object.getOwnPropertyNames(object); + if (!ignoreHasOwnProperty && object.__proto__) + propertyNames.push("__proto__"); // Go over properties, prepare results. - for (var propertyName in object) { - if (!ignoreHasOwnProperty && "hasOwnProperty" in object && !object.hasOwnProperty(propertyName)) - continue; + for (var i = 0; i < propertyNames.length; ++i) { + var propertyName = propertyNames[i]; var property = {}; - property.name = propertyName; + property.name = propertyName + ""; property.parentObjectProxy = objectProxy; var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName); if (!property.isGetter) { - var childObject = object[propertyName]; - var childObjectProxy = new InjectedScript.createProxyObject(childObject, objectProxy.objectId, abbreviate); - childObjectProxy.path = objectProxy.path ? objectProxy.path.slice() : []; - childObjectProxy.path.push(propertyName); - childObjectProxy.protoDepth = objectProxy.protoDepth || 0; - property.value = childObjectProxy; + try { + var childObject = object[propertyName]; + var childObjectProxy = new InjectedScript.createProxyObject(childObject, objectProxy.objectId, abbreviate); + childObjectProxy.path = objectProxy.path ? objectProxy.path.slice() : []; + childObjectProxy.path.push(propertyName); + property.value = childObjectProxy; + } catch(e) { + property.value = { description: e.toString() }; + property.isError = true; + } } else { // FIXME: this should show something like "getter" (bug 16734). property.value = { description: "\u2014" }; // em dash @@ -571,24 +576,25 @@ InjectedScript.setOuterHTML = function(nodeId, value, expanded) return InjectedScriptHost.pushNodePathToFrontend(newNode, expanded, false); } -InjectedScript._getPropertyNames = function(object, resultSet) +InjectedScript._populatePropertyNames = function(object, resultSet) { - if (Object.getOwnPropertyNames) { - for (var o = object; o; o = o.__proto__) { - try { - var names = Object.getOwnPropertyNames(o); - for (var i = 0; i < names.length; ++i) - resultSet[names[i]] = true; - } catch (e) { - } + for (var o = object; o; o = o.__proto__) { + try { + var names = Object.getOwnPropertyNames(o); + for (var i = 0; i < names.length; ++i) + resultSet[names[i] + ""] = true; + } catch (e) { } - } else { - // Chromium doesn't support getOwnPropertyNames yet. - for (var name in object) - resultSet[name] = true; } } +InjectedScript._getPropertyNames = function(object, resultSet) +{ + var propertyNameSet = {}; + InjectedScript._populatePropertyNames(object, propertyNameSet); + return Object.keys(propertyNameSet); +} + InjectedScript.getCompletions = function(expression, includeInspectorCommandLineAPI, callFrameId) { var props = {}; @@ -605,7 +611,7 @@ InjectedScript.getCompletions = function(expression, includeInspectorCommandLine // Evaluate into properties in scope of the selected call frame. var scopeChain = callFrame.scopeChain; for (var i = 0; i < scopeChain.length; ++i) - InjectedScript._getPropertyNames(scopeChain[i], props); + InjectedScript._populatePropertyNames(scopeChain[i], props); } } else { if (!expression) @@ -613,7 +619,7 @@ InjectedScript.getCompletions = function(expression, includeInspectorCommandLine expressionResult = InjectedScript._evaluateOn(InjectedScript._window().eval, InjectedScript._window(), expression); } if (typeof expressionResult == "object") - InjectedScript._getPropertyNames(expressionResult, props); + InjectedScript._populatePropertyNames(expressionResult, props); if (includeInspectorCommandLineAPI) for (var prop in InjectedScript._window().console._inspectorCommandLineAPI) if (prop.charAt(0) !== '_') @@ -677,6 +683,12 @@ InjectedScript.addInspectedNode = function(nodeId) InjectedScript.performSearch = function(whitespaceTrimmedQuery) { + // FIXME: Few things are missing here: + // 1) Search works with node granularity - number of matches within node is not calculated. + // 2) Search does not work outside main documents' domain - we need to use specific InjectedScript instances + // for other domains. + // 3) There is no need to push all search results to the front-end at a time, pushing next / previous result + // is sufficient. var tagNameQuery = whitespaceTrimmedQuery; var attributeNameQuery = whitespaceTrimmedQuery; var startTagFound = (tagNameQuery.indexOf("<") === 0); @@ -1073,10 +1085,6 @@ InjectedScript._resolveObject = function(objectProxy) for (var i = 0; InjectedScript._isDefined(object) && path && i < path.length; ++i) object = object[path[i]]; - // Get to the necessary proto layer. - for (var i = 0; InjectedScript._isDefined(object) && protoDepth && i < protoDepth; ++i) - object = object.__proto__; - return object; } @@ -1136,14 +1144,12 @@ InjectedScript.createProxyObject = function(object, objectId, abbreviate) result.injectedScriptId = injectedScriptId; result.objectId = objectId; result.type = InjectedScript._type(object); + if (result.type === "array") + result.propertyLength = object.length; var type = typeof object; - if ((type === "object" && object !== null) || type === "function") { - for (var subPropertyName in object) { - result.hasChildren = true; - break; - } - } + + result.hasChildren = (type === "object" && object !== null && (Object.getOwnPropertyNames(object).length || object.__proto__)) || type === "function"; try { result.description = InjectedScript._describe(object, abbreviate); } catch (e) { diff --git a/WebCore/inspector/front-end/ObjectPropertiesSection.js b/WebCore/inspector/front-end/ObjectPropertiesSection.js index 6d71090..a32e799 100644 --- a/WebCore/inspector/front-end/ObjectPropertiesSection.js +++ b/WebCore/inspector/front-end/ObjectPropertiesSection.js @@ -77,6 +77,7 @@ WebInspector.ObjectPropertiesSection.prototype = { var infoElement = new TreeElement(title, null, false); this.propertiesTreeOutline.appendChild(infoElement); } + this.propertiesForTest = properties; } } @@ -86,6 +87,10 @@ WebInspector.ObjectPropertiesSection.CompareProperties = function(propertyA, pro { var a = propertyA.name; var b = propertyB.name; + if (a === "__proto__") + return 1; + if (b === "__proto__") + return -1; // if used elsewhere make sure to // - convert a and b to strings (not needed here, properties are all strings) @@ -173,8 +178,12 @@ WebInspector.ObjectPropertyTreeElement.prototype = { this.valueElement = document.createElement("span"); this.valueElement.className = "value"; this.valueElement.textContent = this.property.value.description; + if (typeof this.property.value.propertyLength !== "undefined") + this.valueElement.textContent += " (" + this.property.value.propertyLength + ")"; if (this.property.isGetter) - this.valueElement.addStyleClass("dimmed"); + this.valueElement.addStyleClass("dimmed"); + if (this.property.isError) + this.valueElement.addStyleClass("error"); this.listItemElement.removeChildren(); diff --git a/WebCore/inspector/front-end/ObjectProxy.js b/WebCore/inspector/front-end/ObjectProxy.js index 62517b8..ef139c6 100644 --- a/WebCore/inspector/front-end/ObjectProxy.js +++ b/WebCore/inspector/front-end/ObjectProxy.js @@ -28,12 +28,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -WebInspector.ObjectProxy = function(injectedScriptId, objectId, path, protoDepth, description, hasChildren) +WebInspector.ObjectProxy = function(injectedScriptId, objectId, path, description, hasChildren) { this.objectId = objectId; this.injectedScriptId = injectedScriptId; this.path = path || []; - this.protoDepth = protoDepth || 0; this.description = description; this.hasChildren = hasChildren; } diff --git a/WebCore/inspector/front-end/Panel.js b/WebCore/inspector/front-end/Panel.js index 5e81e2d..5b01191 100644 --- a/WebCore/inspector/front-end/Panel.js +++ b/WebCore/inspector/front-end/Panel.js @@ -230,16 +230,17 @@ WebInspector.Panel.prototype = { var currentView = this._searchResults[this._currentSearchResultIndex]; if (currentView.showingLastSearchResult()) { - if (++this._currentSearchResultIndex >= this._searchResults.length) - this._currentSearchResultIndex = 0; - currentView = this._searchResults[this._currentSearchResultIndex]; + if (this.searchIteratesOverViews()) { + if (++this._currentSearchResultIndex >= this._searchResults.length) + this._currentSearchResultIndex = 0; + currentView = this._searchResults[this._currentSearchResultIndex]; + } showFirstResult = true; } if (currentView !== this.visibleView) { - currentView = this.visibleView; - this._currentSearchResultIndex = 0; - showFirstResult = true; + this.showView(currentView); + WebInspector.focusSearchField(); } if (showFirstResult) @@ -264,14 +265,18 @@ WebInspector.Panel.prototype = { var currentView = this._searchResults[this._currentSearchResultIndex]; if (currentView.showingFirstSearchResult()) { - if (--this._currentSearchResultIndex < 0) - this._currentSearchResultIndex = (this._searchResults.length - 1); - currentView = this._searchResults[this._currentSearchResultIndex]; + if (this.searchIteratesOverViews()) { + if (--this._currentSearchResultIndex < 0) + this._currentSearchResultIndex = (this._searchResults.length - 1); + currentView = this._searchResults[this._currentSearchResultIndex]; + } showLastResult = true; } - if (currentView !== this.visibleView) + if (currentView !== this.visibleView) { this.showView(currentView); + WebInspector.focusSearchField(); + } if (showLastResult) currentView.jumpToLastSearchResult(); @@ -376,6 +381,11 @@ WebInspector.Panel.prototype = { showSourceLineForURL: function(url, line) { return false; + }, + + searchIteratesOverViews: function() + { + return false; } } diff --git a/WebCore/inspector/front-end/Popover.js b/WebCore/inspector/front-end/Popover.js new file mode 100644 index 0000000..70e4ac9 --- /dev/null +++ b/WebCore/inspector/front-end/Popover.js @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +WebInspector.Popover = function(contentElement) +{ + this.element = document.createElement("div"); + this.element.className = "popover"; + + this._popupArrowElement = document.createElement("div"); + this._popupArrowElement.className = "arrow"; + this.element.appendChild(this._popupArrowElement); + + this.contentElement = contentElement; +} + +WebInspector.Popover.prototype = { + show: function(anchor, preferredWidth, preferredHeight) + { + // This should not happen, but we hide previous popup to be on the safe side. + if (WebInspector.Popover._popoverElement) + document.body.removeChild(WebInspector.Popover._popoverElement); + WebInspector.Popover._popoverElement = this.element; + + // Temporarily attach in order to measure preferred dimensions. + this.contentElement.positionAt(0, 0); + document.body.appendChild(this.contentElement); + var preferredWidth = preferredWidth || this.contentElement.offsetWidth; + var preferredHeight = preferredHeight || this.contentElement.offsetHeight; + + this.contentElement.addStyleClass("content"); + this.element.appendChild(this.contentElement); + document.body.appendChild(this.element); + this._positionElement(anchor, preferredWidth, preferredHeight); + }, + + hide: function() + { + delete WebInspector.Popover._popoverElement; + document.body.removeChild(this.element); + }, + + _positionElement: function(anchorElement, preferredWidth, preferredHeight) + { + const borderWidth = 25; + const scrollerWidth = 11; + const arrowHeight = 10; + const arrowOffset = 15; + + // Skinny tooltips are not pretty, their arrow location is not nice. + preferredWidth = Math.max(preferredWidth, 50); + const totalWidth = window.innerWidth; + const totalHeight = window.innerHeight; + + var anchorBox = {x: anchorElement.totalOffsetLeft, y: anchorElement.totalOffsetTop, width: anchorElement.offsetWidth, height: anchorElement.offsetHeight}; + while (anchorElement !== document.body) { + if (anchorElement.scrollLeft) + anchorBox.x -= anchorElement.scrollLeft; + if (anchorElement.scrollTop) + anchorBox.y -= anchorElement.scrollTop; + anchorElement = anchorElement.parentElement; + } + + var newElementPosition = { x: 0, y: 0, width: preferredWidth + borderWidth * 2, height: preferredHeight + borderWidth * 2 }; + + var verticalAlignment; + var roomAbove = anchorBox.y; + var roomBelow = totalHeight - anchorBox.y - anchorBox.height; + + if (roomAbove > roomBelow) { + // Positioning above the anchor. + if (anchorBox.y > newElementPosition.height) + newElementPosition.y = anchorBox.y - newElementPosition.height; + else { + newElementPosition.y = 0; + newElementPosition.height = anchorBox.y - newElementPosition.y; + // Reserve room for vertical scroller anyways. + newElementPosition.width += scrollerWidth; + } + verticalAlignment = "bottom"; + } else { + // Positioning below the anchor. + newElementPosition.y = anchorBox.y + anchorBox.height; + if (newElementPosition.y + newElementPosition.height >= totalHeight) { + newElementPosition.height = totalHeight - anchorBox.y - anchorBox.height; + // Reserve room for vertical scroller. + newElementPosition.width += scrollerWidth; + } + // Align arrow. + newElementPosition.y -= arrowHeight; + verticalAlignment = "top"; + } + + var horizontalAlignment; + if (anchorBox.x + newElementPosition.width < totalWidth) { + newElementPosition.x = Math.max(0, anchorBox.x) - borderWidth - arrowOffset; + horizontalAlignment = "left"; + } else if (newElementPosition.width < totalWidth) { + newElementPosition.x = totalWidth - newElementPosition.width; + horizontalAlignment = "right"; + // Position arrow accurately. + this._popupArrowElement.style.right = totalWidth - anchorBox.x - borderWidth - anchorBox.width + "px"; + } else { + newElementPosition.x = 0; + newElementPosition.width = totalWidth; + horizontalAlignment = "left"; + if (verticalAlignment === "bottom") + newElementPosition.y -= scrollerWidth; + // Position arrow accurately. + this._popupArrowElement.style.left = anchorBox.x - borderWidth + "px"; + } + + // Reserve room for horizontal scroller. + newElementPosition.height += scrollerWidth; + + this.element.className = "popover " + verticalAlignment + "-" + horizontalAlignment + "-arrow"; + this.element.positionAt(newElementPosition.x, newElementPosition.y); + this.element.style.width = newElementPosition.width + "px"; + this.element.style.height = newElementPosition.height + "px"; + } +} diff --git a/WebCore/inspector/front-end/Popup.js b/WebCore/inspector/front-end/Popup.js deleted file mode 100644 index 9c8ef24..0000000 --- a/WebCore/inspector/front-end/Popup.js +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * This class provides a popup that can be shown relative to an anchor element - * or at an arbitrary absolute position. - * Points are Objects: {x: xValue, y: yValue}. - * Rectangles are Objects: {x: xValue, y: yValue, width: widthValue, height: heightValue}. - * - * element is an optional unparented visible element (style.display != "none" AND style.visibility != "hidden"). - * If the element is absent/undefined, it must have been set with the element(x) setter before the show() method invocation. - */ -WebInspector.Popup = function(element) -{ - if (element) - this.element = element; - this._keyHandler = this._keyEventHandler.bind(this); - this._mouseDownHandler = this._mouseDownEventHandler.bind(this); - this._visible = false; - this._autoHide = true; -} - -WebInspector.Popup.prototype = { - show: function() - { - if (this.visible) - return; - var ownerDocument = this._contentElement.ownerDocument; - if (!ownerDocument) - return; - - this._glasspaneElement = ownerDocument.createElement("div"); - this._glasspaneElement.className = "popup-glasspane"; - ownerDocument.body.appendChild(this._glasspaneElement); - - this._contentElement.positionAt(0, 0); - this._contentElement.removeStyleClass("hidden"); - ownerDocument.body.appendChild(this._contentElement); - - this.positionElement(); - this._visible = true; - ownerDocument.addEventListener("keydown", this._keyHandler, false); - ownerDocument.addEventListener("mousedown", this._mouseDownHandler, false); - }, - - hide: function() - { - if (this.visible) { - this._visible = false; - this._contentElement.ownerDocument.removeEventListener("keydown", this._keyHandler, false); - this._contentElement.ownerDocument.removeEventListener("mousedown", this._mouseDownHandler, false); - this._glasspaneElement.parentElement.removeChild(this._glasspaneElement); - this._contentElement.parentElement.removeChild(this._contentElement); - } - }, - - get visible() - { - return this._visible; - }, - - set element(x) - { - this._checkNotVisible(); - this._contentElement = x; - this._contentElement.addStyleClass("hidden"); - }, - - get element() - { - return this._contentElement; - }, - - positionElement: function() - { - var element = this._contentElement; - var anchorElement = this._anchorElement; - - var targetDocument = element.ownerDocument; - var targetDocumentBody = targetDocument.body; - var targetDocumentElement = targetDocument.documentElement; - var clippingBox = {x: 0, y: 0, width: targetDocumentElement.clientWidth, height: targetDocumentElement.clientHeight}; - var parentElement = element.offsetParent || element.parentElement; - - var anchorPosition = {x: anchorElement.totalOffsetLeft, y: anchorElement.totalOffsetTop}; - - // FIXME(apavlov@chromium.org): Translate anchorPosition to the element.ownerDocument frame when https://bugs.webkit.org/show_bug.cgi?id=28913 is fixed. - var anchorBox = {x: anchorPosition.x, y: anchorPosition.y, width: anchorElement.offsetWidth, height: anchorElement.offsetHeight}; - var elementBox = {x: element.totalOffsetLeft, y: element.totalOffsetTop, width: element.offsetWidth, height: element.offsetHeight}; - var newElementPosition = {x: 0, y: 0}; - - if (anchorBox.y - elementBox.height >= clippingBox.y) - newElementPosition.y = anchorBox.y - elementBox.height; - else - newElementPosition.y = Math.min(anchorBox.y + anchorBox.height, Math.max(clippingBox.y, clippingBox.y + clippingBox.height - elementBox.height)); - - if (anchorBox.x + elementBox.height <= clippingBox.x + clippingBox.height) - newElementPosition.x = anchorBox.x; - else - newElementPosition.x = Math.max(clippingBox.x, clippingBox.x + clippingBox.height - elementBox.height); - element.positionAt(newElementPosition.x, newElementPosition.y); - }, - - set anchor(x) - { - this._checkNotVisible(); - this._anchorElement = x; - }, - - get anchor() - { - return this._anchorElement; - }, - - set autoHide(x) - { - this._autoHide = x; - }, - - _checkNotVisible: function() - { - if (this.visible) - throw new Error("The popup must not be visible."); - }, - - _keyEventHandler: function(event) - { - // Escape hides the popup. - if (event.keyIdentifier == "U+001B") { - this.hide(); - event.preventDefault(); - event.handled = true; - } - }, - - _mouseDownEventHandler: function(event) - { - if (this._autoHide && event.originalTarget === this._glasspaneElement) - this.hide(); - } -} diff --git a/WebCore/inspector/front-end/PropertiesSidebarPane.js b/WebCore/inspector/front-end/PropertiesSidebarPane.js index 857d9a7..9df6448 100644 --- a/WebCore/inspector/front-end/PropertiesSidebarPane.js +++ b/WebCore/inspector/front-end/PropertiesSidebarPane.js @@ -48,12 +48,14 @@ WebInspector.PropertiesSidebarPane.prototype = { body.removeChildren(); self.sections = []; + var path = []; // Get array of prototype user-friendly names. for (var i = 0; i < prototypes.length; ++i) { - var prototype = new WebInspector.ObjectProxy(node.injectedScriptId, node.id, [], i); + var prototype = new WebInspector.ObjectProxy(node.injectedScriptId, node.id, path.slice()); var section = new WebInspector.ObjectPropertiesSection(prototype, prototypes[i], WebInspector.UIString("Prototype")); self.sections.push(section); body.appendChild(section.element); + path.push("__proto__"); } }; InjectedScriptAccess.get(node.injectedScriptId).getPrototypes(node.id, callback); diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js index 40a380c..19325bb 100644 --- a/WebCore/inspector/front-end/ResourcesPanel.js +++ b/WebCore/inspector/front-end/ResourcesPanel.js @@ -706,6 +706,11 @@ WebInspector.ResourcesPanel.prototype = { get _resources() { return this.items; + }, + + searchIteratesOverViews: function() + { + return true; } } diff --git a/WebCore/inspector/front-end/Section.js b/WebCore/inspector/front-end/Section.js index 394f86d..7710192 100644 --- a/WebCore/inspector/front-end/Section.js +++ b/WebCore/inspector/front-end/Section.js @@ -31,6 +31,7 @@ WebInspector.Section = function(title, subtitle) { this.element = document.createElement("div"); this.element.className = "section"; + this.element.sectionForTest = this; this.headerElement = document.createElement("div"); this.headerElement.className = "header"; diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js index 0f90700..799628e 100644 --- a/WebCore/inspector/front-end/SourceFrame.js +++ b/WebCore/inspector/front-end/SourceFrame.js @@ -45,6 +45,7 @@ WebInspector.SourceFrame = function(parentElement, addBreakpointDelegate, remove this._addBreakpointDelegate = addBreakpointDelegate; this._removeBreakpointDelegate = removeBreakpointDelegate; + this._popoverObjectGroup = "popover"; } WebInspector.SourceFrame.prototype = { @@ -53,6 +54,9 @@ WebInspector.SourceFrame.prototype = { { this._visible = visible; this._createViewerIfNeeded(); + if (!visible && this._textViewer) + this._textViewer.freeCachedElements(); + }, get executionLine() @@ -157,6 +161,8 @@ WebInspector.SourceFrame.prototype = { element.addEventListener("keydown", this._keyDown.bind(this), true); element.addEventListener("contextmenu", this._contextMenu.bind(this), true); element.addEventListener("mousedown", this._mouseDown.bind(this), true); + element.addEventListener("mousemove", this._mouseMove.bind(this), true); + element.addEventListener("scroll", this._scroll.bind(this), true); this._parentElement.appendChild(element); this._needsProgramCounterImage = true; @@ -193,14 +199,7 @@ WebInspector.SourceFrame.prototype = { var ranges = []; // First do case-insensitive search. - var regex = ""; - for (var i = 0; i < query.length; ++i) { - var char = query.charAt(i); - if (char === "]") - char = "\\]"; - regex += "[" + char + "]"; - } - var regexObject = new RegExp(regex, "i"); + var regexObject = createSearchRegex(query); this._collectRegexMatches(regexObject, ranges); // Then try regex search if user knows the / / hint. @@ -427,8 +426,15 @@ WebInspector.SourceFrame.prototype = { contextMenu.show(event); }, + _scroll: function(event) + { + this._hidePopup(); + }, + _mouseDown: function(event) { + this._resetHoverTimer(); + this._hidePopup(); if (event.button != 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return; if (event.target.className !== "webkit-line-number") @@ -445,6 +451,164 @@ WebInspector.SourceFrame.prototype = { event.preventDefault(); }, + _mouseMove: function(event) + { + // Pretend that nothing has happened. + if (this._hoverElement === event.target) + return; + + this._resetHoverTimer(); + + // User has 500ms to reach the popup. + if (this._popup) { + var self = this; + function doHide() + { + self._hidePopup(); + delete self._hidePopupTimer; + } + this._hidePopupTimer = setTimeout(doHide, 500); + } + + this._hoverElement = event.target; + + // Now that cleanup routines are set up above, leave this in case we are not on a break. + if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused) + return; + + // We are interested in identifiers and "this" keyword. + if (this._hoverElement.hasStyleClass("webkit-javascript-keyword")) { + if (this._hoverElement.textContent !== "this") + return; + } else if (!this._hoverElement.hasStyleClass("webkit-javascript-ident")) + return; + + const toolTipDelay = 1500; + this._hoverTimer = setTimeout(this._mouseHover.bind(this, this._hoverElement), toolTipDelay); + }, + + _resetHoverTimer: function() + { + if (this._hoverTimer) { + clearTimeout(this._hoverTimer); + delete this._hoverTimer; + } + }, + + _hidePopup: function() + { + if (this._popup) { + this._popup.hide(); + delete this._popup; + InspectorBackend.releaseWrapperObjectGroup(0, this._popoverObjectGroup); + } + }, + + _mouseHover: function(element) + { + delete this._hoverTimer; + + if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused) + return; + + var lineRow = element.enclosingNodeOrSelfWithNodeName("tr"); + if (!lineRow) + return; + + // Find text offset of the hovered node (iterate over text nodes until we hit ours). + var offset = 0; + var node = lineRow.lastChild.traverseNextTextNode(lineRow.lastChild); + while (node && node !== element.firstChild) { + offset += node.nodeValue.length; + node = node.traverseNextTextNode(lineRow.lastChild); + } + + // Imagine that the line is "foo(A.B.C.D)" and we hit C. Following code goes through following steps: + // "foo(A.B.C" -> "C.B.A(oof" -> "C.B.A" -> "A.B.C" (target eval expression). + var lineNumber = lineRow.lineNumber; + var prefix = this._textModel.line(lineNumber).substring(0, offset + element.textContent.length); + var reversedPrefix = prefix.split("").reverse().join(""); + var match = /[a-zA-Z\x80-\xFF\_$0-9.]+/.exec(reversedPrefix); + if (!match) + return; + var expression = match[0].split("").reverse().join(""); + this._showPopup(element, expression); + }, + + _showPopup: function(element, expression) + { + function killHidePopupTimer() + { + if (this._hidePopupTimer) { + clearTimeout(this._hidePopupTimer); + delete this._hidePopupTimer; + + // We know that we reached the popup, but we might have moved over other elements. + // Discard pending command. + this._resetHoverTimer(); + } + } + + function showTextPopup(text) + { + if (!WebInspector.panels.scripts.paused) + return; + + var popupContentElement = document.createElement("span"); + popupContentElement.className = "monospace"; + popupContentElement.style.whiteSpace = "pre"; + popupContentElement.textContent = text; + this._popup = new WebInspector.Popover(popupContentElement); + this._popup.show(element); + popupContentElement.addEventListener("mousemove", killHidePopupTimer.bind(this), true); + } + + function showObjectPopup(result) + { + if (!WebInspector.panels.scripts.paused) + return; + + var popupContentElement = null; + if (result.type !== "object" && result.type !== "node" && result.type !== "array") { + popupContentElement = document.createElement("span"); + popupContentElement.className = "monospace"; + popupContentElement.style.whiteSpace = "pre"; + popupContentElement.textContent = result.description; + this._popup = new WebInspector.Popover(popupContentElement); + this._popup.show(element); + } else { + var popupContentElement = document.createElement("div"); + + var titleElement = document.createElement("div"); + titleElement.className = "source-frame-popover-title monospace"; + titleElement.textContent = result.description; + popupContentElement.appendChild(titleElement); + + var section = new WebInspector.ObjectPropertiesSection(result, "", null, false); + section.expanded = true; + section.element.addStyleClass("source-frame-popover-tree"); + section.headerElement.addStyleClass("hidden"); + popupContentElement.appendChild(section.element); + + this._popup = new WebInspector.Popover(popupContentElement); + const popupWidth = 300; + const popupHeight = 250; + this._popup.show(element, popupWidth, popupHeight); + } + popupContentElement.addEventListener("mousemove", killHidePopupTimer.bind(this), true); + } + + function evaluateCallback(result, exception) + { + if (exception) + return; + if (!WebInspector.panels.scripts.paused) + return; + showObjectPopup.call(this, result); + } + WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, this._popoverObjectGroup, evaluateCallback.bind(this)); + }, + _editBreakpointCondition: function(breakpoint) { this._showBreakpointConditionPopup(breakpoint.line); @@ -662,4 +826,5 @@ WebInspector.SourceFrame.prototype = { } } + WebInspector.SourceFrame.prototype.__proto__ = WebInspector.Object.prototype; diff --git a/WebCore/inspector/front-end/SourceHTMLTokenizer.js b/WebCore/inspector/front-end/SourceHTMLTokenizer.js index 8856ff5..3c9bd8c 100644 --- a/WebCore/inspector/front-end/SourceHTMLTokenizer.js +++ b/WebCore/inspector/front-end/SourceHTMLTokenizer.js @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Tue Feb 2 00:44:38 2010 */ +/* Generated by re2c 0.13.5 on Mon Feb 15 19:30:21 2010 */ /* * Copyright (C) 2009 Google Inc. All rights reserved. * @@ -413,6 +413,12 @@ case 66: ++cursor; this.setLexCondition(this._lexConditions.TAG); { + if (this._parseCondition & this._parseConditions.SCRIPT) { + // Do not tokenize script tag contents, keep lexer state although processing "<". + this.setLexCondition(this._lexConditions.INITIAL); + this.tokenType = null; + return cursor; + } this.tokenType = "html-tag"; this._parseCondition = this._parseConditions.SCRIPT; this._setExpectingAttribute(); diff --git a/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js b/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js index 89c535a..cfa8834 100644 --- a/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js +++ b/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js @@ -174,6 +174,12 @@ WebInspector.SourceHTMLTokenizer.prototype = { <INITIAL> ScriptStart => TAG { + if (this._parseCondition & this._parseConditions.SCRIPT) { + // Do not tokenize script tag contents, keep lexer state although processing "<". + this.setLexCondition(this._lexConditions.INITIAL); + this.tokenType = null; + return cursor; + } this.tokenType = "html-tag"; this._parseCondition = this._parseConditions.SCRIPT; this._setExpectingAttribute(); diff --git a/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js index 816023f..75abeee 100644 --- a/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js +++ b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js @@ -49,7 +49,7 @@ WebInspector.SourceJavaScriptTokenizer = function() "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for", "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if", "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger", - "class", "enum", "export", "extends", "import", "super", "get", "set" + "class", "enum", "export", "extends", "import", "super", "get", "set", "with" ].keySet(); this._lexConditions = { diff --git a/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js index 8630ccb..053c82f 100644 --- a/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js +++ b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js @@ -48,7 +48,7 @@ WebInspector.SourceJavaScriptTokenizer = function() "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for", "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if", "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger", - "class", "enum", "export", "extends", "import", "super", "get", "set" + "class", "enum", "export", "extends", "import", "super", "get", "set", "with" ].keySet(); this._lexConditions = { diff --git a/WebCore/inspector/front-end/SourceTokenizer.js b/WebCore/inspector/front-end/SourceTokenizer.js index 1192383..d498028 100644 --- a/WebCore/inspector/front-end/SourceTokenizer.js +++ b/WebCore/inspector/front-end/SourceTokenizer.js @@ -74,10 +74,11 @@ WebInspector.SourceTokenizer.prototype = { WebInspector.SourceTokenizer.Registry = function() { this._tokenizers = {}; this._tokenizerConstructors = { - "text/css": WebInspector.SourceCSSTokenizer, - "text/html": WebInspector.SourceHTMLTokenizer, - "text/javascript": WebInspector.SourceJavaScriptTokenizer, - "application/x-javascript": WebInspector.SourceJavaScriptTokenizer + "text/css": "SourceCSSTokenizer", + "text/html": "SourceHTMLTokenizer", + "text/javascript": "SourceJavaScriptTokenizer", + "application/javascript": "SourceJavaScriptTokenizer", + "application/x-javascript": "SourceJavaScriptTokenizer" }; } @@ -93,9 +94,10 @@ WebInspector.SourceTokenizer.Registry.prototype = { { if (!this._tokenizerConstructors[mimeType]) return null; - var tokenizer = this._tokenizers[mimeType]; + var tokenizerClass = this._tokenizerConstructors[mimeType]; + var tokenizer = this._tokenizers[tokenizerClass]; if (!tokenizer) { - tokenizer = new this._tokenizerConstructors[mimeType](); + tokenizer = new WebInspector[tokenizerClass](); this._tokenizers[mimeType] = tokenizer; } return tokenizer; diff --git a/WebCore/inspector/front-end/TextEditorHighlighter.js b/WebCore/inspector/front-end/TextEditorHighlighter.js index c73e036..cf0b590 100644 --- a/WebCore/inspector/front-end/TextEditorHighlighter.js +++ b/WebCore/inspector/front-end/TextEditorHighlighter.js @@ -32,36 +32,8 @@ WebInspector.TextEditorHighlighter = function(textModel, damageCallback) { this._textModel = textModel; - - this._styles = []; - - this._styles["css-comment"] = "rgb(0, 116, 0)"; - this._styles["css-params"] = "rgb(7, 144, 154)"; - this._styles["css-string"] = "rgb(7, 144, 154)"; - this._styles["css-keyword"] = "rgb(7, 144, 154)"; - this._styles["css-number"] = "rgb(50, 0, 255)"; - this._styles["css-property"] = "rgb(200, 0, 0)"; - this._styles["css-at-rule"] = "rgb(200, 0, 0)"; - this._styles["css-selector"] = "rgb(0, 0, 0)"; - this._styles["css-important"] = "rgb(200, 0, 180)"; - - /* Keep this in sync with inspector.css and view-source.css */ - this._styles["html-tag"] = "rgb(136, 18, 128)"; - this._styles["html-attribute-name"] = "rgb(153, 69, 0)"; - this._styles["html-attribute-value"] = "rgb(26, 26, 166)"; - this._styles["html-comment"] = "rgb(35, 110, 37)"; - this._styles["html-doctype"] = "rgb(192, 192, 192)"; - this._styles["html-external-link"] = "#00e"; - this._styles["html-resource-link"] = "#00e"; - - this._styles["javascript-comment"] = "rgb(0, 116, 0)"; - this._styles["javascript-string"] = "rgb(196, 26, 22)"; - this._styles["javascript-regexp"] = "rgb(196, 26, 22)"; - this._styles["javascript-keyword"] = "rgb(170, 13, 145)"; - this._styles["javascript-number"] = "rgb(28, 0, 207)"; - - this.mimeType = "text/html"; - this._damageCallback = damageCallback; + this._tokenizer = WebInspector.SourceTokenizer.Registry.getInstance().getTokenizer("text/html"); + this._damageCallback = damageCallback; } WebInspector.TextEditorHighlighter.prototype = { @@ -190,7 +162,7 @@ WebInspector.TextEditorHighlighter.prototype = { var newColumn = this._tokenizer.nextToken(column); var tokenType = this._tokenizer.tokenType; if (tokenType) - attributes[column] = { length: newColumn - column, tokenType: tokenType, style: this._styles[tokenType] }; + attributes[column] = { length: newColumn - column, tokenType: tokenType }; column = newColumn; } while (column < line.length) } diff --git a/WebCore/inspector/front-end/TextViewer.js b/WebCore/inspector/front-end/TextViewer.js index 096464f..9be6a00 100644 --- a/WebCore/inspector/front-end/TextViewer.js +++ b/WebCore/inspector/front-end/TextViewer.js @@ -50,6 +50,9 @@ WebInspector.TextViewer = function(textModel, platform, url) this._defaultChunkSize = 50; this._paintCoalescingLevel = 0; + + this.freeCachedElements(); + this._buildChunks(); } WebInspector.TextViewer.prototype = { @@ -96,7 +99,10 @@ WebInspector.TextViewer.prototype = { this._rangeToMark = range; this.revealLine(range.startLine); this._paintLines(range.startLine, range.startLine + 1); + if (this._markedRangeElement) + this._markedRangeElement.scrollIntoViewIfNeeded(); } + delete this._markedRangeElement; }, highlightLine: function(lineNumber) @@ -111,14 +117,20 @@ WebInspector.TextViewer.prototype = { chunk.addDecoration("webkit-highlighted-line"); }, + freeCachedElements: function() + { + this._cachedSpans = []; + this._cachedTextNodes = []; + this._cachedRows = []; + }, + _buildChunks: function() { this._linesContainerElement.removeChildren(); - var paintLinesCallback = this._paintLines.bind(this); this._textChunks = []; for (var i = 0; i < this._textModel.linesCount; i += this._defaultChunkSize) { - var chunk = new WebInspector.TextChunk(this._textModel, i, i + this._defaultChunkSize, paintLinesCallback); + var chunk = new WebInspector.TextChunk(this, i, i + this._defaultChunkSize); this._textChunks.push(chunk); this._linesContainerElement.appendChild(chunk.element); } @@ -140,23 +152,22 @@ WebInspector.TextViewer.prototype = { oldChunk.expanded = false; var insertIndex = oldChunk.chunkNumber + 1; - var paintLinesCallback = this._paintLines.bind(this); // Prefix chunk. if (lineNumber > oldChunk.startLine) { - var prefixChunk = new WebInspector.TextChunk(this._textModel, oldChunk.startLine, lineNumber, paintLinesCallback); + var prefixChunk = new WebInspector.TextChunk(this, oldChunk.startLine, lineNumber); this._textChunks.splice(insertIndex++, 0, prefixChunk); this._linesContainerElement.insertBefore(prefixChunk.element, oldChunk.element); } // Line chunk. - var lineChunk = new WebInspector.TextChunk(this._textModel, lineNumber, lineNumber + 1, paintLinesCallback); + var lineChunk = new WebInspector.TextChunk(this, lineNumber, lineNumber + 1); this._textChunks.splice(insertIndex++, 0, lineChunk); this._linesContainerElement.insertBefore(lineChunk.element, oldChunk.element); // Suffix chunk. if (oldChunk.startLine + oldChunk.linesCount > lineNumber + 1) { - var suffixChunk = new WebInspector.TextChunk(this._textModel, lineNumber + 1, oldChunk.startLine + oldChunk.linesCount, paintLinesCallback); + var suffixChunk = new WebInspector.TextChunk(this, lineNumber + 1, oldChunk.startLine + oldChunk.linesCount); this._textChunks.splice(insertIndex, 0, suffixChunk); this._linesContainerElement.insertBefore(suffixChunk.element, oldChunk.element); } @@ -185,7 +196,11 @@ WebInspector.TextViewer.prototype = { _scroll: function() { - this._repaintAll(); + var scrollTop = this.element.scrollTop; + setTimeout(function() { + if (scrollTop === this.element.scrollTop) + this._repaintAll(); + }.bind(this), 50); }, beginUpdates: function(enabled) @@ -320,7 +335,7 @@ WebInspector.TextViewer.prototype = { if (!highlighterState) { if (this._rangeToMark && this._rangeToMark.startLine === lineNumber) - this._markRange(element, line, this._rangeToMark.startColumn, this._rangeToMark.endColumn); + this._markedRangeElement = highlightSearchResult(element, this._rangeToMark.startColumn, this._rangeToMark.endColumn - this._rangeToMark.startColumn); return; } @@ -330,30 +345,53 @@ WebInspector.TextViewer.prototype = { for (var j = 0; j < line.length;) { if (j > 1000) { // This line is too long - do not waste cycles on minified js highlighting. + plainTextStart = j; break; } var attribute = highlighterState && highlighterState.attributes[j]; - if (!attribute || !attribute.style) { + if (!attribute || !attribute.tokenType) { if (plainTextStart === -1) plainTextStart = j; j++; } else { if (plainTextStart !== -1) { - element.appendChild(document.createTextNode(line.substring(plainTextStart, j))); + this._appendTextNode(element, line.substring(plainTextStart, j)); plainTextStart = -1; } - element.appendChild(this._createSpan(line.substring(j, j + attribute.length), attribute.tokenType)); + this._appendSpan(element, line.substring(j, j + attribute.length), attribute.tokenType); j += attribute.length; } } if (plainTextStart !== -1) - element.appendChild(document.createTextNode(line.substring(plainTextStart, line.length))); + this._appendTextNode(element, line.substring(plainTextStart, line.length)); if (this._rangeToMark && this._rangeToMark.startLine === lineNumber) - this._markRange(element, line, this._rangeToMark.startColumn, this._rangeToMark.endColumn); + this._markedRangeElement = highlightSearchResult(element, this._rangeToMark.startColumn, this._rangeToMark.endColumn - this._rangeToMark.startColumn); if (lineRow.decorationsElement) element.appendChild(lineRow.decorationsElement); }, + _releaseLinesHighlight: function(fromLine, toLine) + { + for (var i = fromLine; i < toLine; ++i) { + var lineRow = this._textModel.getAttribute(i, "line-row"); + if (!lineRow) + continue; + var element = lineRow.lastChild; + if ("spans" in element) { + var spans = element.spans; + for (var j = 0; j < spans.length; ++j) + this._cachedSpans.push(spans[j]); + delete element.spans; + } + if ("textNodes" in element) { + var textNodes = element.textNodes; + for (var j = 0; j < textNodes.length; ++j) + this._cachedTextNodes.push(textNodes[j]); + delete element.textNodes; + } + } + }, + _getSelection: function() { var selection = window.getSelection(); @@ -447,15 +485,33 @@ WebInspector.TextViewer.prototype = { return { line: lineRow.lineNumber, column: column }; }, - _createSpan: function(content, className) + _appendSpan: function(element, content, className) { - if (className === "html-resource-link" || className === "html-external-link") - return this._createLink(content, className === "html-external-link"); + if (className === "html-resource-link" || className === "html-external-link") { + element.appendChild(this._createLink(content, className === "html-external-link")); + return; + } - var span = document.createElement("span"); + var span = this._cachedSpans.pop() || document.createElement("span"); span.className = "webkit-" + className; - span.appendChild(document.createTextNode(content)); - return span; + span.textContent = content; + element.appendChild(span); + if (!("spans" in element)) + element.spans = []; + element.spans.push(span); + }, + + _appendTextNode: function(element, text) + { + var textNode = this._cachedTextNodes.pop(); + if (textNode) { + textNode.nodeValue = text; + } else + textNode = document.createTextNode(text); + element.appendChild(textNode); + if (!("textNodes" in element)) + element.textNodes = []; + element.textNodes.push(textNode); }, _createLink: function(content, isExternal) @@ -484,58 +540,19 @@ WebInspector.TextViewer.prototype = { return WebInspector.completeURL(this._url, hrefValue); }, - _markRange: function(element, lineText, startOffset, endOffset) - { - var markNode = document.createElement("span"); - markNode.className = "webkit-markup"; - markNode.textContent = lineText.substring(startOffset, endOffset); - - var markLength = endOffset - startOffset; - var boundary = element.rangeBoundaryForOffset(startOffset); - var textNode = boundary.container; - var text = textNode.textContent; - - if (boundary.offset + markLength < text.length) { - // Selection belong to a single split mode. - textNode.textContent = text.substring(boundary.offset + markLength); - textNode.parentElement.insertBefore(markNode, textNode); - var prefixNode = document.createTextNode(text.substring(0, boundary.offset)); - textNode.parentElement.insertBefore(prefixNode, markNode); - return; - } - - var parentElement = textNode.parentElement; - var anchorElement = textNode.nextSibling; - - markLength -= text.length - boundary.offset; - textNode.textContent = text.substring(0, boundary.offset); - textNode = textNode.traverseNextTextNode(element); - - while (textNode) { - var text = textNode.textContent; - if (markLength < text.length) { - textNode.textContent = text.substring(markLength); - break; - } - - markLength -= text.length; - textNode.textContent = ""; - textNode = textNode.traverseNextTextNode(element); - } - - parentElement.insertBefore(markNode, anchorElement); - }, - resize: function() { this._repaintAll(); } } -WebInspector.TextChunk = function(textModel, startLine, endLine, paintLinesCallback) +var cachedSpans = []; + +WebInspector.TextChunk = function(textViewer, startLine, endLine) { + this._textViewer = textViewer; this.element = document.createElement("tr"); - this._textModel = textModel; + this._textModel = textViewer._textModel; this.element.chunk = this; this.element.lineNumber = startLine; @@ -545,7 +562,6 @@ WebInspector.TextChunk = function(textModel, startLine, endLine, paintLinesCallb this._lineNumberElement = document.createElement("td"); this._lineNumberElement.className = "webkit-line-number"; - this._lineNumberElement.textContent = this._lineNumberText(this.startLine); this.element.appendChild(this._lineNumberElement); this._lineContentElement = document.createElement("td"); @@ -554,11 +570,14 @@ WebInspector.TextChunk = function(textModel, startLine, endLine, paintLinesCallb this._expanded = false; + var lineNumbers = []; var lines = []; - for (var i = this.startLine; i < this.startLine + this.linesCount; ++i) + for (var i = startLine; i < endLine; ++i) { + lineNumbers.push(i + 1); lines.push(this._textModel.line(i)); + } + this._lineNumberElement.textContent = lineNumbers.join("\n"); this._lineContentElement.textContent = lines.join("\n"); - this._paintLines = paintLinesCallback; } WebInspector.TextChunk.prototype = { @@ -601,40 +620,30 @@ WebInspector.TextChunk.prototype = { if (this.linesCount === 1) { this._textModel.setAttribute(this.startLine, "line-row", this.element); if (expanded) - this._paintLines(this.startLine, this.startLine + 1); + this._textViewer._paintLines(this.startLine, this.startLine + 1); return; } if (expanded) { var parentElement = this.element.parentElement; for (var i = this.startLine; i < this.startLine + this.linesCount; ++i) { - var lineRow = document.createElement("tr"); - lineRow.lineNumber = i; - - var lineNumberElement = document.createElement("td"); - lineNumberElement.className = "webkit-line-number"; - lineNumberElement.textContent = this._lineNumberText(i); - lineRow.appendChild(lineNumberElement); - - var lineContentElement = document.createElement("td"); - lineContentElement.className = "webkit-line-content"; - lineContentElement.textContent = this._textModel.line(i); - lineRow.appendChild(lineContentElement); - + var lineRow = this._createRow(i); this._textModel.setAttribute(i, "line-row", lineRow); parentElement.insertBefore(lineRow, this.element); } parentElement.removeChild(this.element); - this._paintLines(this.startLine, this.startLine + this.linesCount); + this._textViewer._paintLines(this.startLine, this.startLine + this.linesCount); } else { var firstLine = this._textModel.getAttribute(this.startLine, "line-row"); var parentElement = firstLine.parentElement; + this._textViewer._releaseLinesHighlight(this.startLine, this.startLine + this.linesCount); parentElement.insertBefore(this.element, firstLine); for (var i = this.startLine; i < this.startLine + this.linesCount; ++i) { var lineRow = this._textModel.getAttribute(i, "line-row"); this._textModel.removeAttribute(i, "line-row"); + this._textViewer._cachedRows.push(lineRow); parentElement.removeChild(lineRow); } } @@ -652,15 +661,28 @@ WebInspector.TextChunk.prototype = { return result; }, - _lineNumberText: function(lineNumber) + _createRow: function(lineNumber) { - var totalDigits = Math.ceil(Math.log(this._textModel.linesCount + 1) / Math.log(10)); - var digits = Math.ceil(Math.log(lineNumber + 2) / Math.log(10)); + var cachedRows = this._textViewer._cachedRows; + if (cachedRows.length) { + var lineRow = cachedRows[cachedRows.length - 1]; + cachedRows.length--; + var lineNumberElement = lineRow.firstChild; + var lineContentElement = lineRow.lastChild; + } else { + var lineRow = document.createElement("tr"); - var text = ""; - for (var i = digits; i < totalDigits; ++i) - text += " "; - text += lineNumber + 1; - return text; + var lineNumberElement = document.createElement("td"); + lineNumberElement.className = "webkit-line-number"; + lineRow.appendChild(lineNumberElement); + + var lineContentElement = document.createElement("td"); + lineContentElement.className = "webkit-line-content"; + lineRow.appendChild(lineContentElement); + } + lineRow.lineNumber = lineNumber; + lineNumberElement.textContent = lineNumber + 1; + lineContentElement.textContent = this._textModel.line(lineNumber); + return lineRow; } } diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc index efa2bfc..73309d1 100644 --- a/WebCore/inspector/front-end/WebKit.qrc +++ b/WebCore/inspector/front-end/WebKit.qrc @@ -45,7 +45,7 @@ <file>Panel.js</file> <file>PanelEnablerView.js</file> <file>Placard.js</file> - <file>Popup.js</file> + <file>Popover.js</file> <file>ProfileDataGridTree.js</file> <file>ProfilesPanel.js</file> <file>ProfileView.js</file> @@ -91,6 +91,7 @@ <file>audits.css</file> <file>inspector.css</file> <file>inspectorSyntaxHighlight.css</file> + <file>popover.css</file> <file>textViewer.css</file> <file>Images/back.png</file> <file>Images/checker.png</file> @@ -125,6 +126,7 @@ <file>Images/excludeButtonGlyph.png</file> <file>Images/focusButtonGlyph.png</file> <file>Images/forward.png</file> + <file>Images/gearButtonGlyph.png</file> <file>Images/glossyHeader.png</file> <file>Images/glossyHeaderPressed.png</file> <file>Images/glossyHeaderSelected.png</file> @@ -142,6 +144,8 @@ <file>Images/paneSettingsButtons.png</file> <file>Images/pauseOnExceptionButtonGlyph.png</file> <file>Images/percentButtonGlyph.png</file> + <file>Images/popoverArrows.png</file> + <file>Images/popoverBackground.png</file> <file>Images/profileGroupIcon.png</file> <file>Images/profileIcon.png</file> <file>Images/profilesIcon.png</file> @@ -185,6 +189,12 @@ <file>Images/statusbarResizerVertical.png</file> <file>Images/storageIcon.png</file> <file>Images/successGreenDot.png</file> + <file>Images/thumbActiveHoriz.png</file> + <file>Images/thumbActiveVert.png</file> + <file>Images/thumbHoriz.png</file> + <file>Images/thumbVert.png</file> + <file>Images/thumbHoverHoriz.png</file> + <file>Images/thumbHoverVert.png</file> <file>Images/timelineBarBlue.png</file> <file>Images/timelineBarGray.png</file> <file>Images/timelineBarGreen.png</file> @@ -210,6 +220,8 @@ <file>Images/timelinePillRed.png</file> <file>Images/timelinePillYellow.png</file> <file>Images/toolbarItemSelected.png</file> + <file>Images/trackHoriz.png</file> + <file>Images/trackVert.png</file> <file>Images/treeDownTriangleBlack.png</file> <file>Images/treeDownTriangleWhite.png</file> <file>Images/treeRightTriangleBlack.png</file> diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css index 53f1e4b..76b31fc 100644 --- a/WebCore/inspector/front-end/inspector.css +++ b/WebCore/inspector/front-end/inspector.css @@ -29,8 +29,11 @@ body { cursor: default; - height: 100%; - width: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; overflow: hidden; font-family: Lucida Grande, sans-serif; font-size: 10px; @@ -1348,7 +1351,6 @@ body.inactive .placard.selected { margin: 0; padding: 2px 6px 3px; list-style: none; - background-color: white; min-height: 18px; } @@ -1577,6 +1579,10 @@ li.editing .swatch, li.editing .enabled-button, li.editing-sub-part .delete-but color: rgb(100, 100, 100); } +.section .properties .value.error { + color: red; +} + .section .properties .number, .event-properties .number { color: blue; } @@ -2245,7 +2251,7 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des margin: 0 0 5px 20px; } -.panel-enabler-view button:not(.status-bar-item), .pane button { +.panel-enabler-view button:not(.status-bar-item), .pane button, button.show-all-nodes { color: rgb(6, 6, 6); background-color: transparent; border: 1px solid rgb(165, 165, 165); @@ -2262,6 +2268,13 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des height: 24px; } +button.show-all-nodes { + font-size: 13px; + margin: 0; + padding: 0 20px; + height: 20px; +} + .panel-enabler-view.welcome { z-index: auto; } @@ -2293,12 +2306,12 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des padding: 2px 9px; } -.panel-enabler-view button:active:not(.status-bar-item), .pane button:active { +.panel-enabler-view button:active:not(.status-bar-item), .pane button:active, button.show-all-nodes:active { background-color: rgb(215, 215, 215); background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239))); } -body.inactive .panel-enabler-view button:not(.status-bar-item), .panel-enabler-view button:disabled:not(.status-bar-item), body.inactive .pane button, .pane button:disabled { +body.inactive .panel-enabler-view button:not(.status-bar-item), .panel-enabler-view button:disabled:not(.status-bar-item), body.inactive .pane button, .pane button:disabled, body.inactive button.show-all-nodes { color: rgb(130, 130, 130); border-color: rgb(212, 212, 212); background-color: rgb(239, 239, 239); @@ -3801,3 +3814,21 @@ ol.breakpoint-list { outline: none !important; -webkit-user-modify: read-write; } + +.source-frame-popover-title { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + font-weight: bold; + padding-left: 18px; +} + +.source-frame-popover-tree { + border-top: 1px solid rgb(190, 190, 190); + overflow: auto; + position: absolute; + top: 15px; + bottom: 0; + left: 0; + right: 0; +} diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html index 4ddd10e..85633b5 100644 --- a/WebCore/inspector/front-end/inspector.html +++ b/WebCore/inspector/front-end/inspector.html @@ -30,9 +30,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="audits.css"> - <link rel="stylesheet" type="text/css" href="textViewer.css"> <link rel="stylesheet" type="text/css" href="inspector.css"> <link rel="stylesheet" type="text/css" href="inspectorSyntaxHighlight.css"> + <link rel="stylesheet" type="text/css" href="popover.css"> + <link rel="stylesheet" type="text/css" href="textViewer.css"> <script type="text/javascript" src="utilities.js"></script> <script type="text/javascript" src="treeoutline.js"></script> <script type="text/javascript" src="inspector.js"></script> @@ -43,7 +44,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <script type="text/javascript" src="ContextMenu.js"></script> <script type="text/javascript" src="KeyboardShortcut.js"></script> <script type="text/javascript" src="TextPrompt.js"></script> - <script type="text/javascript" src="Popup.js"></script> + <script type="text/javascript" src="Popover.js"></script> <script type="text/javascript" src="Placard.js"></script> <script type="text/javascript" src="View.js"></script> <script type="text/javascript" src="Callback.js"></script> diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js index 77d3f42..8bcdf63 100644 --- a/WebCore/inspector/front-end/inspector.js +++ b/WebCore/inspector/front-end/inspector.js @@ -686,9 +686,7 @@ WebInspector.documentKeyDown = function(event) var isFindKey = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey; if (isFindKey) { - var searchField = document.getElementById("search"); - searchField.focus(); - searchField.select(); + WebInspector.focusSearchField(); event.preventDefault(); } @@ -878,6 +876,13 @@ WebInspector.updateSearchLabel = function() } } +WebInspector.focusSearchField = function() +{ + var searchField = document.getElementById("search"); + searchField.focus(); + searchField.select(); +} + WebInspector.toggleAttach = function() { this.attached = !this.attached; @@ -1337,7 +1342,7 @@ WebInspector.log = function(message) WebInspector.log.repeatCount = repeatCount; // ConsoleMessage expects a proxy object - message = new WebInspector.ObjectProxy(null, null, [], 0, message, false); + message = new WebInspector.ObjectProxy(null, null, [], message, false); // post the message var msg = new WebInspector.ConsoleMessage( diff --git a/WebCore/inspector/front-end/inspectorSyntaxHighlight.css b/WebCore/inspector/front-end/inspectorSyntaxHighlight.css index 1292f00..0965a5c 100644 --- a/WebCore/inspector/front-end/inspectorSyntaxHighlight.css +++ b/WebCore/inspector/front-end/inspectorSyntaxHighlight.css @@ -26,29 +26,29 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - .webkit-css-comment { - color: rgb(0, 116, 0); - } +.webkit-css-comment { + color: rgb(0, 116, 0); +} - .webkit-css-url, .webkit-css-color, .webkit-css-string, .webkit-css-keyword { - color: rgb(7, 144, 154); +.webkit-css-url, .webkit-css-color, .webkit-css-string, .webkit-css-keyword { + color: rgb(7, 144, 154); } - .webkit-css-number { - color: rgb(50, 0, 255); - } +.webkit-css-number { + color: rgb(50, 0, 255); +} - .webkit-css-property, .webkit-css-at-rule { - color: rgb(200, 0, 0); - } +.webkit-css-property, .webkit-css-at-rule { + color: rgb(200, 0, 0); +} - .webkit-css-selector { - rgb(0, 0, 0); - } +.webkit-css-selector { + color: black; +} - .webkit-css-important { - color: rgb(200, 0, 180); - } +.webkit-css-important { + color: rgb(200, 0, 180); +} .webkit-javascript-comment { color: rgb(0, 116, 0); @@ -66,6 +66,10 @@ color: rgb(196, 26, 22); } +.webkit-javascript-ident { + color: black; +} + .webkit-html-comment { /* Keep this in sync with view-source.css (.webkit-html-comment) */ color: rgb(35, 110, 37); diff --git a/WebCore/inspector/front-end/popover.css b/WebCore/inspector/front-end/popover.css new file mode 100644 index 0000000..ae6f610 --- /dev/null +++ b/WebCore/inspector/front-end/popover.css @@ -0,0 +1,200 @@ +.popover { + position: absolute; + -webkit-border-image: url(Images/popoverBackground.png) 25 25 25 25; + border-width: 25px; + z-index: 100; + pointer-events: none; +} + +.popover .content { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + pointer-events: auto; + overflow: auto; +} + +.popover .arrow { + position: absolute; + background-image: url(Images/popoverArrows.png); + width: 19px; + height: 19px; + margin-left: 15px; + margin-top: -25px; + top: 0; + left: 0; +} + +.popover.top-left-arrow .arrow { + /* The default is top-left, no styles needed. */ +} + +.popover.top-right-arrow .arrow { + right: 25px; + left: auto; +} + +.popover.bottom-left-arrow .arrow { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -25px; + background-position: 0 -19px; +} + +.popover.bottom-right-arrow .arrow { + right: 15px; + left: auto; + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -25px; + background-position: 0 -19px; +} + +.popover.left-top-arrow .arrow { + top: 0; + margin-top: 15px; + margin-left: -25px; + background-position: 0 -38px; +} + +.popover.left-bottom-arrow .arrow { + top: auto; + bottom: 0; + margin-bottom: 15px; + margin-left: -25px; + background-position: 0 -38px; +} + +.popover.right-top-arrow .arrow { + right: 0; + left: auto; + top: 0; + margin-top: 15px; + margin-right: -25px; + background-position: 0 -57px; +} + +.popover.right-bottom-arrow .arrow { + right: 0; + left: auto; + top: auto; + bottom: 0; + margin-bottom: 15px; + margin-right: -25px; + background-position: 0 -57px; +} + +.popover ::-webkit-scrollbar { + width: 11px; + height: 11px; +} + +.popover ::-webkit-scrollbar-corner { + display: none; +} + +.popover ::-webkit-resizer { + display: none; +} + +/* Horizontal Scrollbar Styles */ + +.popover ::-webkit-scrollbar:horizontal:corner-present { + border-right-width: 0; +} + +.popover ::-webkit-scrollbar-thumb:horizontal { + -webkit-border-image: url(Images/thumbHoriz.png) 0 11 0 11; + border-color: transparent; + border-width: 0 11px; + min-width: 20px; +} + +.popover ::-webkit-scrollbar-thumb:horizontal:hover { + -webkit-border-image: url(Images/thumbHoverHoriz.png) 0 11 0 11; +} + +.popover ::-webkit-scrollbar-thumb:horizontal:active { + -webkit-border-image: url(Images/thumbActiveHoriz.png) 0 11 0 11; +} + +.popover ::-webkit-scrollbar-track-piece:horizontal:start { + margin-left: 5px; +} + +.popover ::-webkit-scrollbar-track-piece:horizontal:end { + margin-right: 5px; +} + +.popover ::-webkit-scrollbar-track-piece:horizontal:end:corner-present { + margin-right: 4px; +} + +.popover ::-webkit-scrollbar-track-piece:horizontal:decrement { + -webkit-border-image: url(Images/trackHoriz.png) 0 11 0 11; + border-color: transparent; + border-width: 0 0 0 11px; +} + +.popover ::-webkit-scrollbar-track-piece:horizontal:increment { + -webkit-border-image: url(Images/trackHoriz.png) 0 11 0 11; + border-color: transparent; + border-width: 0 11px 0 0; +} + +/* Vertical Scrollbar Styles */ + + +.popover ::-webkit-scrollbar:vertical:corner-present { + border-bottom-width: 0; +} + +.popover ::-webkit-scrollbar-thumb:vertical { + -webkit-border-image: url(Images/thumbVert.png) 11 0 11 0; + border-color: transparent; + border-width: 11px 0; + min-height: 20px; +} + +.popover ::-webkit-scrollbar-thumb:vertical:hover { + -webkit-border-image: url(Images/thumbHoverVert.png) 11 0 11 0; +} + +.popover ::-webkit-scrollbar-thumb:vertical:active { + -webkit-border-image: url(Images/thumbActiveVert.png) 11 0 11 0; +} + + +.popover ::-webkit-scrollbar-track-piece:vertical:start { + margin-top: 5px; +} + +.popover ::-webkit-scrollbar-track-piece:vertical:end { + margin-bottom: 5px; +} + +.popover ::-webkit-scrollbar-track-piece:vertical:end:corner-present { + margin-bottom: 4px; +} + +.popover ::-webkit-scrollbar-track-piece:vertical:decrement { + -webkit-border-image: url(Images/trackVert.png) 11 0 11 0; + border-color: transparent; + border-width: 11px 0 0 0; +} + +.popover ::-webkit-scrollbar-track-piece:vertical:increment { + -webkit-border-image: url(Images/trackVert.png) 11 0 11 0; + border-color: transparent; + border-width: 0 0 11px 0; +} + +/* Forced Scrollbar Mode Styles */ + +.popover ::-webkit-scrollbar-button { + display: none; +} diff --git a/WebCore/inspector/front-end/textViewer.css b/WebCore/inspector/front-end/textViewer.css index af079bc..1447dfd 100644 --- a/WebCore/inspector/front-end/textViewer.css +++ b/WebCore/inspector/front-end/textViewer.css @@ -4,14 +4,13 @@ left:0; right:0; bottom:0; - white-space: pre-wrap; + white-space: pre; overflow: auto; } .text-editor-lines { border: 0; width: 100%; - vertical-align: baseline; -webkit-border-horizontal-spacing: 0; -webkit-border-vertical-spacing: 0; -webkit-user-select: text; @@ -63,21 +62,20 @@ .webkit-line-number { color: rgb(128, 128, 128); text-align: right; - white-space: pre; word-break: normal; -webkit-user-select: none; background-color: rgb(240, 240, 240); border-right: 1px solid rgb(187, 187, 187) !important; padding-left: 2px; padding-right: 2px; - vertical-align: top; background-repeat: no-repeat; background-position: right 1px; + vertical-align: top; } .webkit-line-content { - white-space: pre-wrap; padding-left: 2px; + vertical-align: top; } .webkit-execution-line .webkit-line-number { @@ -130,13 +128,14 @@ outline: 1px solid rgb(64, 115, 244); } -.webkit-markup { +.webkit-search-result { -webkit-border-radius: 4px; - padding: 2px 1px 2px 3px; - margin-left: -4px; - margin-top: -2px; + padding: 2px 2px 2px 3px; + margin: -2px -2px -2px -3px; + opacity: 0.8; -webkit-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px; background-color: rgb(241, 234, 0); + color: black; } .webkit-highlighted-line .webkit-line-content { diff --git a/WebCore/inspector/front-end/utilities.js b/WebCore/inspector/front-end/utilities.js index 60d3b45..f30ab9f 100644 --- a/WebCore/inspector/front-end/utilities.js +++ b/WebCore/inspector/front-end/utilities.js @@ -271,7 +271,7 @@ Element.prototype.__defineGetter__("totalOffsetLeft", function() { var total = 0; for (var element = this; element; element = element.offsetParent) - total += element.offsetLeft; + total += element.offsetLeft + (this !== element ? element.clientLeft : 0); return total; }); @@ -279,7 +279,7 @@ Element.prototype.__defineGetter__("totalOffsetTop", function() { var total = 0; for (var element = this; element; element = element.offsetParent) - total += element.offsetTop; + total += element.offsetTop + (this !== element ? element.clientTop : 0); return total; }); @@ -850,3 +850,60 @@ function isEnterKey(event) { // Check if in IME. return event.keyCode !== 229 && event.keyIdentifier === "Enter"; } + + +function highlightSearchResult(element, offset, length) +{ + var lineText = element.textContent; + var endOffset = offset + length; + var highlightNode = document.createElement("span"); + highlightNode.className = "webkit-search-result"; + highlightNode.textContent = lineText.substring(offset, endOffset); + + var boundary = element.rangeBoundaryForOffset(offset); + var textNode = boundary.container; + var text = textNode.textContent; + + if (boundary.offset + length < text.length) { + // Selection belong to a single split mode. + textNode.textContent = text.substring(boundary.offset + length); + textNode.parentElement.insertBefore(highlightNode, textNode); + var prefixNode = document.createTextNode(text.substring(0, boundary.offset)); + textNode.parentElement.insertBefore(prefixNode, highlightNode); + return highlightNode; + } + + var parentElement = textNode.parentElement; + var anchorElement = textNode.nextSibling; + + length -= text.length - boundary.offset; + textNode.textContent = text.substring(0, boundary.offset); + textNode = textNode.traverseNextTextNode(element); + + while (textNode) { + var text = textNode.textContent; + if (length < text.length) { + textNode.textContent = text.substring(length); + break; + } + + length -= text.length; + textNode.textContent = ""; + textNode = textNode.traverseNextTextNode(element); + } + + parentElement.insertBefore(highlightNode, anchorElement); + return highlightNode; +} + +function createSearchRegex(query) +{ + var regex = ""; + for (var i = 0; i < query.length; ++i) { + var char = query.charAt(i); + if (char === "]") + char = "\\]"; + regex += "[" + char + "]"; + } + return new RegExp(regex, "i"); +} diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h index 5b24bd3..6004b55 100644 --- a/WebCore/loader/EmptyClients.h +++ b/WebCore/loader/EmptyClients.h @@ -150,6 +150,7 @@ public: #endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { } + virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) { } virtual void formStateDidChange(const Node*) { } @@ -301,6 +302,7 @@ public: virtual void didDisplayInsecureContent() { } virtual void didRunInsecureContent(SecurityOrigin*) { } virtual PassRefPtr<Frame> createFrame(const KURL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) { return 0; } + virtual void didTransferChildFrameToNewDocument() { } virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool) { return 0; } virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { return 0; } diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp index 514f98a..d28dc50 100644 --- a/WebCore/loader/FrameLoader.cpp +++ b/WebCore/loader/FrameLoader.cpp @@ -480,7 +480,9 @@ void FrameLoader::submitForm(const char* action, const String& url, PassRefPtr<F #endif String targetOrBaseTarget = target.isEmpty() ? m_frame->document()->baseTarget() : target; - Frame* targetFrame = findFrameForNavigation(targetOrBaseTarget); + Frame* targetFrame = m_frame->tree()->find(targetOrBaseTarget); + if (!shouldAllowNavigation(targetFrame)) + return; if (!targetFrame) { targetFrame = m_frame; frameRequest.setFrameName(targetOrBaseTarget); diff --git a/WebCore/loader/FrameLoaderClient.h b/WebCore/loader/FrameLoaderClient.h index 2668958..4f78805 100644 --- a/WebCore/loader/FrameLoaderClient.h +++ b/WebCore/loader/FrameLoaderClient.h @@ -219,6 +219,7 @@ namespace WebCore { virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0; + virtual void didTransferChildFrameToNewDocument() = 0; virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0; virtual void redirectDataToPlugin(Widget* pluginWidget) = 0; diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp index 43c9979..55b68dc 100644 --- a/WebCore/loader/HistoryController.cpp +++ b/WebCore/loader/HistoryController.cpp @@ -109,6 +109,10 @@ void HistoryController::updateBackForwardListForFragmentScroll() // Since the document isn't changed as a result of a fragment scroll, we should // preserve the DocumentSequenceNumber of the previous item. + if (!m_previousItem) + return; + + ASSERT(m_currentItem); m_currentItem->setDocumentSequenceNumber(m_previousItem->documentSequenceNumber()); } diff --git a/WebCore/loader/ImageLoader.cpp b/WebCore/loader/ImageLoader.cpp index c61d133..929b28a 100644 --- a/WebCore/loader/ImageLoader.cpp +++ b/WebCore/loader/ImageLoader.cpp @@ -230,7 +230,7 @@ void ImageLoader::updateRenderer() // is a complete image. This prevents flickering in the case where a dynamic // change is happening between two images. CachedImage* cachedImage = imageRenderer->cachedImage(); - if (m_image != cachedImage && (m_imageComplete || !imageRenderer->cachedImage())) + if (m_image != cachedImage && (m_imageComplete || !cachedImage)) imageRenderer->setCachedImage(m_image.get()); } } diff --git a/WebCore/loader/ProgressTracker.cpp b/WebCore/loader/ProgressTracker.cpp index 0c9f2fb..458de68 100644 --- a/WebCore/loader/ProgressTracker.cpp +++ b/WebCore/loader/ProgressTracker.cpp @@ -26,10 +26,12 @@ #include "config.h" #include "ProgressTracker.h" +#include "CString.h" #include "DocumentLoader.h" #include "Frame.h" #include "FrameLoader.h" #include "FrameLoaderClient.h" +#include "Logging.h" #include "ResourceResponse.h" #include <wtf/CurrentTime.h> @@ -97,7 +99,7 @@ void ProgressTracker::reset() void ProgressTracker::progressStarted(Frame* frame) { - // LOG (Progress, "frame %p(%@), _private->numProgressTrackedFrames %d, _private->originatingProgressFrame %p", frame, [frame name], _private->numProgressTrackedFrames, _private->originatingProgressFrame); + LOG(Progress, "Progress started (%p) - frame %p(\"%s\"), value %f, tracked frames %d, originating frame %p", this, frame, frame->tree()->name().string().utf8().data(), m_progressValue, m_numProgressTrackedFrames, m_originatingProgressFrame.get()); frame->loader()->client()->willChangeEstimatedProgress(); @@ -115,7 +117,7 @@ void ProgressTracker::progressStarted(Frame* frame) void ProgressTracker::progressCompleted(Frame* frame) { - // LOG (Progress, "frame %p(%@), _private->numProgressTrackedFrames %d, _private->originatingProgressFrame %p", frame, [frame name], _private->numProgressTrackedFrames, _private->originatingProgressFrame); + LOG(Progress, "Progress completed (%p) - frame %p(\"%s\"), value %f, tracked frames %d, originating frame %p", this, frame, frame->tree()->name().string().utf8().data(), m_progressValue, m_numProgressTrackedFrames, m_originatingProgressFrame.get()); if (m_numProgressTrackedFrames <= 0) return; @@ -132,7 +134,7 @@ void ProgressTracker::progressCompleted(Frame* frame) void ProgressTracker::finalProgressComplete() { - // LOG (Progress, ""); + LOG(Progress, "Final progress complete (%p)", this); RefPtr<Frame> frame = m_originatingProgressFrame.release(); @@ -151,7 +153,7 @@ void ProgressTracker::finalProgressComplete() void ProgressTracker::incrementProgress(unsigned long identifier, const ResourceResponse& response) { - // LOG (Progress, "_private->numProgressTrackedFrames %d, _private->originatingProgressFrame %p", _private->numProgressTrackedFrames, _private->originatingProgressFrame); + LOG(Progress, "Progress incremented (%p) - value %f, tracked frames %d, originating frame %p", this, m_progressValue, m_numProgressTrackedFrames, m_originatingProgressFrame.get()); if (m_numProgressTrackedFrames <= 0) return; @@ -214,7 +216,7 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i double now = currentTime(); double notifiedProgressTimeDelta = now - m_lastNotifiedProgressTime; - // LOG (Progress, "_private->progressValue %g, _private->numProgressTrackedFrames %d", _private->progressValue, _private->numProgressTrackedFrames); + LOG(Progress, "Progress incremented (%p) - value %f, tracked frames %d", this, m_progressValue, m_numProgressTrackedFrames); double notificationProgressDelta = m_progressValue - m_lastNotifiedProgressValue; if ((notificationProgressDelta >= m_progressNotificationInterval || notifiedProgressTimeDelta >= m_progressNotificationTimeInterval) && diff --git a/WebCore/manual-tests/match-marker-rects.html b/WebCore/manual-tests/match-marker-rects.html new file mode 100644 index 0000000..d650965 --- /dev/null +++ b/WebCore/manual-tests/match-marker-rects.html @@ -0,0 +1,33 @@ +<style> + div { + height: 50px; + width: 110px; + margin: 10px 0; + padding: 10px; + border: solid black; + font-size: 25px; + } + + div.columns { + -webkit-columns: 2; + -webkit-column-gap: 10px; + } + + div.scroll { + overflow-y: scroll; + } +</style> +<p> + In Safari, choose Edit > Find > Find, and type the strings “xyz” + and “123”. The white “holes” in the Find overlay + should line up with the matching text below. +</p> +<div class="columns"> + <br>xyz +</div> +<div class="scroll" id="scroll"> + <br><br>123<br><br> +</div> +<script> + document.getElementById("scroll").scrollTop = 100; +</script> diff --git a/WebCore/manual-tests/media-elements/video-replaces-poster.html b/WebCore/manual-tests/media-elements/video-replaces-poster.html new file mode 100644 index 0000000..8d852aa --- /dev/null +++ b/WebCore/manual-tests/media-elements/video-replaces-poster.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> + <head> + </head> + <body> + <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34965">https://bugs.webkit.org/show_bug.cgi?id=34965</a><br> + Disable accelerated compositing and reload this test. You should see the test video + start playing.</p> + + <video width="480" height="270" type="video/mp4" + src="../../../LayoutTests/media/content/test.mp4" + poster="../../../LayoutTests/media/content/abe.png" autoplay> + </video> + </body> +</html> diff --git a/WebCore/manual-tests/video-rtsp.html b/WebCore/manual-tests/video-rtsp.html new file mode 100644 index 0000000..4fff987 --- /dev/null +++ b/WebCore/manual-tests/video-rtsp.html @@ -0,0 +1,11 @@ +<html> +<head> +<title>RTSP playback test</title> +</head> +<body> +<video with=640 height=352 autoplay controls src="rtsp://a2047.v1411b.c1411.g.vq.akamaistream.net/5/2047/1411/2_h264_650/1a1a1ae454c430950065de4cbb2f94c226950c7ae655b61a48a91475e243acda3dac194879adde0f/wwdc_2006_2_650.mov"></video> +<p>Test that QuickTime file with RTSP URL loads.<p> +<script>start()</script> +<pre id="console"></pre> +</body> +</html> diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp index d3b46ad..cb7f6bf 100644 --- a/WebCore/page/Chrome.cpp +++ b/WebCore/page/Chrome.cpp @@ -427,6 +427,11 @@ void Chrome::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser) m_client->runOpenPanel(frame, fileChooser); } +void Chrome::iconForFiles(const Vector<String>& filenames, PassRefPtr<FileChooser> fileChooser) +{ + m_client->iconForFiles(filenames, fileChooser); +} + bool Chrome::setCursor(PlatformCursorHandle cursor) { return m_client->setCursor(cursor); diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h index 3039b90..9227f87 100644 --- a/WebCore/page/Chrome.h +++ b/WebCore/page/Chrome.h @@ -136,6 +136,7 @@ namespace WebCore { void cancelGeolocationPermissionRequestForFrame(Frame*); void runOpenPanel(Frame*, PassRefPtr<FileChooser>); + void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); bool setCursor(PlatformCursorHandle); diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h index 1615f3a..1b8b734 100644 --- a/WebCore/page/ChromeClient.h +++ b/WebCore/page/ChromeClient.h @@ -190,6 +190,9 @@ namespace WebCore { virtual void cancelGeolocationPermissionRequestForFrame(Frame*) = 0; virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) = 0; + // Asynchronous request to load an icon for specified filenames. + // This is called only if Icon::createIconForFiles() returns 0. + virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) = 0; virtual bool setCursor(PlatformCursorHandle) = 0; diff --git a/WebCore/page/DOMTimer.cpp b/WebCore/page/DOMTimer.cpp index 8971bb7..72dc9ac 100644 --- a/WebCore/page/DOMTimer.cpp +++ b/WebCore/page/DOMTimer.cpp @@ -43,7 +43,7 @@ double DOMTimer::s_minTimerInterval = 0.010; // 10 milliseconds static int timerNestingLevel = 0; -DOMTimer::DOMTimer(ScriptExecutionContext* context, ScheduledAction* action, int timeout, bool singleShot) +DOMTimer::DOMTimer(ScriptExecutionContext* context, PassOwnPtr<ScheduledAction> action, int timeout, bool singleShot) : ActiveDOMObject(context, this) , m_action(action) , m_nextFireInterval(0) @@ -82,7 +82,7 @@ DOMTimer::~DOMTimer() scriptExecutionContext()->removeTimeout(m_timeoutId); } -int DOMTimer::install(ScriptExecutionContext* context, ScheduledAction* action, int timeout, bool singleShot) +int DOMTimer::install(ScriptExecutionContext* context, PassOwnPtr<ScheduledAction> action, int timeout, bool singleShot) { // DOMTimer constructor links the new timer into a list of ActiveDOMObjects held by the 'context'. // The timer is deleted when context is deleted (DOMTimer::contextDestroyed) or explicitly via DOMTimer::removeById(), diff --git a/WebCore/page/DOMTimer.h b/WebCore/page/DOMTimer.h index 460430f..da38178 100644 --- a/WebCore/page/DOMTimer.h +++ b/WebCore/page/DOMTimer.h @@ -28,20 +28,21 @@ #define DOMTimer_h #include "ActiveDOMObject.h" +#include "ScheduledAction.h" #include "Timer.h" #include <wtf/OwnPtr.h> +#include <wtf/PassOwnPtr.h> namespace WebCore { class InspectorTimelineAgent; - class ScheduledAction; class DOMTimer : public TimerBase, public ActiveDOMObject { public: virtual ~DOMTimer(); // Creates a new timer owned by specified ScriptExecutionContext, starts it // and returns its Id. - static int install(ScriptExecutionContext*, ScheduledAction*, int timeout, bool singleShot); + static int install(ScriptExecutionContext*, PassOwnPtr<ScheduledAction>, int timeout, bool singleShot); static void removeById(ScriptExecutionContext*, int timeoutId); // ActiveDOMObject @@ -59,7 +60,7 @@ namespace WebCore { static void setMinTimerInterval(double value) { s_minTimerInterval = value; } private: - DOMTimer(ScriptExecutionContext*, ScheduledAction*, int timeout, bool singleShot); + DOMTimer(ScriptExecutionContext*, PassOwnPtr<ScheduledAction>, int timeout, bool singleShot); virtual void fired(); int m_timeoutId; diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp index 2f0f84f..6af22c3 100644 --- a/WebCore/page/DOMWindow.cpp +++ b/WebCore/page/DOMWindow.cpp @@ -1252,7 +1252,7 @@ void DOMWindow::resizeTo(float width, float height) const page->chrome()->setWindowRect(fr); } -int DOMWindow::setTimeout(ScheduledAction* action, int timeout, ExceptionCode& ec) +int DOMWindow::setTimeout(PassOwnPtr<ScheduledAction> action, int timeout, ExceptionCode& ec) { ScriptExecutionContext* context = scriptExecutionContext(); if (!context) { @@ -1270,7 +1270,7 @@ void DOMWindow::clearTimeout(int timeoutId) DOMTimer::removeById(context, timeoutId); } -int DOMWindow::setInterval(ScheduledAction* action, int timeout, ExceptionCode& ec) +int DOMWindow::setInterval(PassOwnPtr<ScheduledAction> action, int timeout, ExceptionCode& ec) { ScriptExecutionContext* context = scriptExecutionContext(); if (!context) { diff --git a/WebCore/page/DOMWindow.h b/WebCore/page/DOMWindow.h index dc1e68c..4452dbb 100644 --- a/WebCore/page/DOMWindow.h +++ b/WebCore/page/DOMWindow.h @@ -237,9 +237,9 @@ namespace WebCore { void resizeTo(float width, float height) const; // Timers - int setTimeout(ScheduledAction*, int timeout, ExceptionCode&); + int setTimeout(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&); void clearTimeout(int timeoutId); - int setInterval(ScheduledAction*, int timeout, ExceptionCode&); + int setInterval(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&); void clearInterval(int timeoutId); // Events diff --git a/WebCore/page/DragController.cpp b/WebCore/page/DragController.cpp index c9769df..18e3195 100644 --- a/WebCore/page/DragController.cpp +++ b/WebCore/page/DragController.cpp @@ -556,14 +556,9 @@ static CachedImage* getCachedImage(Element* element) static Image* getImage(Element* element) { ASSERT(element); - RenderObject* renderer = element->renderer(); - if (!renderer || !renderer->isImage()) - return 0; - - RenderImage* image = toRenderImage(renderer); - if (image->cachedImage() && !image->cachedImage()->errorOccurred()) - return image->cachedImage()->image(); - return 0; + CachedImage* cachedImage = getCachedImage(element); + return (cachedImage && !cachedImage->errorOccurred()) ? + cachedImage->image() : 0; } static void prepareClipboardForImageDrag(Frame* src, Clipboard* clipboard, Element* node, const KURL& linkURL, const KURL& imageURL, const String& label) diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp index 947cb06..87c9733 100644 --- a/WebCore/page/Frame.cpp +++ b/WebCore/page/Frame.cpp @@ -674,10 +674,6 @@ bool Frame::shouldApplyTextZoom() const { if (m_zoomFactor == 1.0f || !isZoomFactorTextOnly()) return false; -#if ENABLE(SVG) - if (m_doc->isSVGDocument()) - return false; -#endif return true; } @@ -685,10 +681,6 @@ bool Frame::shouldApplyPageZoom() const { if (m_zoomFactor == 1.0f || isZoomFactorTextOnly()) return false; -#if ENABLE(SVG) - if (m_doc->isSVGDocument()) - return false; -#endif return true; } @@ -698,16 +690,13 @@ void Frame::setZoomFactor(float percent, bool isTextOnly) return; #if ENABLE(SVG) - // SVG doesn't care if the zoom factor is text only. It will always apply a - // zoom to the whole SVG. + // Respect SVGs zoomAndPan="disabled" property in standalone SVG documents. + // FIXME: How to handle compound documents + zoomAndPan="disabled"? Needs SVG WG clarification. if (m_doc->isSVGDocument()) { if (!static_cast<SVGDocument*>(m_doc.get())->zoomAndPanEnabled()) return; - m_zoomFactor = percent; - m_page->settings()->setZoomsTextOnly(true); // We do this to avoid doing any scaling of CSS pixels, since the SVG has its own notion of zoom. if (m_doc->renderer()) - m_doc->renderer()->repaint(); - return; + m_doc->renderer()->setNeedsLayout(true); } #endif @@ -1631,6 +1620,54 @@ void Frame::disconnectOwnerElement() m_ownerElement = 0; } +// The frame is moved in DOM, potentially to another page. +void Frame::transferChildFrameToNewDocument() +{ + ASSERT(m_ownerElement); + Frame* newParent = m_ownerElement->document()->frame(); + bool didTransfer = false; + + // Switch page. + Page* newPage = newParent ? newParent->page() : 0; + if (m_page != newPage) { + if (page()->focusController()->focusedFrame() == this) + page()->focusController()->setFocusedFrame(0); + + if (m_page) + m_page->decrementFrameCount(); + + m_page = newPage; + + if (newPage) + newPage->incrementFrameCount(); + + didTransfer = true; + } + + // Update the frame tree. + Frame* oldParent = tree()->parent(); + if (oldParent != newParent) { + if (oldParent) + oldParent->tree()->removeChild(this); + if (newParent) { + newParent->tree()->appendChild(this); + m_ownerElement->setName(); + } + didTransfer = true; + } + + // Avoid unnecessary calls to client and frame subtree if the frame ended + // up on the same page and under the same parent frame. + if (didTransfer) { + // Let external clients update themselves. + loader()->client()->didTransferChildFrameToNewDocument(); + + // Do the same for all the children. + for (Frame* child = tree()->firstChild(); child; child = child->tree()->nextSibling()) + child->transferChildFrameToNewDocument(); + } +} + String Frame::documentTypeString() const { if (DocumentType* doctype = document()->doctype()) diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h index 33bb435..26d1efa 100644 --- a/WebCore/page/Frame.h +++ b/WebCore/page/Frame.h @@ -76,6 +76,8 @@ namespace WebCore { Page* page() const; void detachFromPage(); + void transferChildFrameToNewDocument(); + HTMLFrameOwnerElement* ownerElement() const; void pageDestroyed(); diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp index fb078a9..356ada2 100644 --- a/WebCore/page/FrameView.cpp +++ b/WebCore/page/FrameView.cpp @@ -496,6 +496,19 @@ bool FrameView::syncCompositingStateRecursive() #endif } +bool FrameView::isSoftwareRenderable() const +{ +#if USE(ACCELERATED_COMPOSITING) + RenderView* view = m_frame->contentRenderer(); + if (!view) + return true; + + return !view->compositor()->has3DContent(); +#else + return true; +#endif +} + void FrameView::didMoveOnscreen() { RenderView* view = m_frame->contentRenderer(); @@ -1795,7 +1808,12 @@ void FrameView::setPaintBehavior(PaintBehavior behavior) { m_paintBehavior = behavior; } - + +PaintBehavior FrameView::paintBehavior() const +{ + return m_paintBehavior; +} + bool FrameView::isPainting() const { return m_isPainting; diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h index b27ffd8..1d5a312 100644 --- a/WebCore/page/FrameView.h +++ b/WebCore/page/FrameView.h @@ -106,6 +106,10 @@ public: // Returns true if the sync was completed. bool syncCompositingStateRecursive(); + // Returns true when a paint with the PaintBehaviorFlattenCompositingLayers flag set gives + // a faithful representation of the content. + bool isSoftwareRenderable() const; + void didMoveOnscreen(); void willMoveOffscreen(); @@ -170,7 +174,7 @@ public: virtual void paintContents(GraphicsContext*, const IntRect& damageRect); void setPaintBehavior(PaintBehavior); - PaintBehavior paintBehavior() const { return m_paintBehavior; } + PaintBehavior paintBehavior() const; bool isPainting() const; void setNodeToDraw(Node*); diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h index b30deac..358e4a3 100644 --- a/WebCore/page/Geolocation.h +++ b/WebCore/page/Geolocation.h @@ -85,10 +85,13 @@ public: void setShouldClearCache(bool shouldClearCache) { m_shouldClearCache = shouldClearCache; } bool shouldClearCache() const { return m_shouldClearCache; } + Frame* frame() const { return m_frame; } #if ENABLE(CLIENT_BASED_GEOLOCATION) void setPosition(GeolocationPosition*); void setError(GeolocationError*); +#else + GeolocationService* getGeolocationService() const { return m_service.get(); } #endif private: diff --git a/WebCore/page/MediaCanStartListener.h b/WebCore/page/MediaCanStartListener.h new file mode 100644 index 0000000..317babf --- /dev/null +++ b/WebCore/page/MediaCanStartListener.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef MediaCanStartListener_h +#define MediaCanStartListener_h + +namespace WebCore { + +class MediaCanStartListener { +public: + virtual void mediaCanStart() = 0; +protected: + virtual ~MediaCanStartListener() { } +}; + +} + +#endif diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp index a3e89b5..d348d73 100644 --- a/WebCore/page/Page.cpp +++ b/WebCore/page/Page.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All Rights Reserved. * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * This library is free software; you can redistribute it and/or @@ -46,6 +46,7 @@ #include "InspectorController.h" #include "InspectorTimelineAgent.h" #include "Logging.h" +#include "MediaCanStartListener.h" #include "Navigator.h" #include "NetworkStateNotifier.h" #include "PageGroup.h" @@ -159,7 +160,7 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi , m_debugger(0) , m_customHTMLTokenizerTimeDelay(-1) , m_customHTMLTokenizerChunkSize(-1) - , m_canStartPlugins(true) + , m_canStartMedia(true) { #if !ENABLE(CONTEXT_MENUS) UNUSED_PARAM(contextMenuClient); @@ -413,17 +414,37 @@ PluginData* Page::pluginData() const return m_pluginData.get(); } -void Page::addUnstartedPlugin(PluginView* view) +void Page::addMediaCanStartListener(MediaCanStartListener* listener) { - ASSERT(!m_canStartPlugins); - m_unstartedPlugins.add(view); + ASSERT(!m_canStartMedia); + ASSERT(!m_mediaCanStartListeners.contains(listener)); + m_mediaCanStartListeners.add(listener); } -void Page::removeUnstartedPlugin(PluginView* view) +void Page::removeMediaCanStartListener(MediaCanStartListener* listener) { - ASSERT(!m_canStartPlugins); - ASSERT(m_unstartedPlugins.contains(view)); - m_unstartedPlugins.remove(view); + ASSERT(!m_canStartMedia); + ASSERT(m_mediaCanStartListeners.contains(listener)); + m_mediaCanStartListeners.remove(listener); +} + +void Page::setCanStartMedia(bool canStartMedia) +{ + if (m_canStartMedia == canStartMedia) + return; + + m_canStartMedia = canStartMedia; + + if (!m_canStartMedia || m_mediaCanStartListeners.isEmpty()) + return; + + Vector<MediaCanStartListener*> listeners; + copyToVector(m_mediaCanStartListeners, listeners); + m_mediaCanStartListeners.clear(); + + size_t size = listeners.size(); + for (size_t i = 0; i < size; ++i) + listeners[i]->mediaCanStart(); } static Frame* incrementFrame(Frame* curr, bool forward, bool wrapFlag) diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h index 1417c87..04a545c 100644 --- a/WebCore/page/Page.h +++ b/WebCore/page/Page.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * This library is free software; you can redistribute it and/or @@ -59,26 +59,27 @@ namespace WebCore { class InspectorClient; class InspectorController; class InspectorTimelineAgent; + class MediaCanStartListener; class Node; class PageGroup; class PluginData; class PluginHalter; class PluginHalterClient; - class PluginView; class ProgressTracker; class RenderTheme; class VisibleSelection; class SelectionController; class Settings; + #if ENABLE(DOM_STORAGE) class StorageNamespace; #endif -#if ENABLE(WML) - class WMLPageState; -#endif #if ENABLE(NOTIFICATIONS) class NotificationPresenter; #endif +#if ENABLE(WML) + class WMLPageState; +#endif typedef uint64_t LinkHash; @@ -96,10 +97,10 @@ namespace WebCore { static void refreshPlugins(bool reload); PluginData* pluginData() const; - void setCanStartPlugins(bool); - bool canStartPlugins() const { return m_canStartPlugins; } - void addUnstartedPlugin(PluginView*); - void removeUnstartedPlugin(PluginView*); + void setCanStartMedia(bool); + bool canStartMedia() const { return m_canStartMedia; } + void addMediaCanStartListener(MediaCanStartListener*); + void removeMediaCanStartListener(MediaCanStartListener*); EditorClient* editorClient() const { return m_editorClient; } @@ -310,8 +311,8 @@ namespace WebCore { double m_customHTMLTokenizerTimeDelay; int m_customHTMLTokenizerChunkSize; - bool m_canStartPlugins; - HashSet<PluginView*> m_unstartedPlugins; + bool m_canStartMedia; + HashSet<MediaCanStartListener*> m_mediaCanStartListeners; OwnPtr<PluginHalter> m_pluginHalter; diff --git a/WebCore/page/SecurityOrigin.cpp b/WebCore/page/SecurityOrigin.cpp index af63637..fe6efbd 100644 --- a/WebCore/page/SecurityOrigin.cpp +++ b/WebCore/page/SecurityOrigin.cpp @@ -286,6 +286,11 @@ void SecurityOrigin::grantUniversalAccess() m_universalAccess = true; } +void SecurityOrigin::makeUnique() +{ + m_isUnique = true; +} + bool SecurityOrigin::isLocal() const { return shouldTreatURLSchemeAsLocal(m_protocol); diff --git a/WebCore/page/SecurityOrigin.h b/WebCore/page/SecurityOrigin.h index b441474..c96bb83 100644 --- a/WebCore/page/SecurityOrigin.h +++ b/WebCore/page/SecurityOrigin.h @@ -138,6 +138,9 @@ public: // addition, the SandboxOrigin flag is inherited by iframes. bool isUnique() const { return m_isUnique; } + // Marks an origin as being unique. + void makeUnique(); + // Convert this SecurityOrigin into a string. The string // representation of a SecurityOrigin is similar to a URL, except it // lacks a path component. The string representation does not encode diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp index c495a23..c59bdd0 100644 --- a/WebCore/page/Settings.cpp +++ b/WebCore/page/Settings.cpp @@ -87,6 +87,7 @@ Settings::Settings(Page* page) , m_isJavaScriptEnabled(false) , m_isWebSecurityEnabled(true) , m_allowUniversalAccessFromFileURLs(true) + , m_allowFileAccessFromFileURLs(true) , m_javaScriptCanOpenWindowsAutomatically(false) , m_shouldPrintBackgrounds(false) , m_textAreasAreResizable(false) @@ -265,6 +266,11 @@ void Settings::setAllowUniversalAccessFromFileURLs(bool allowUniversalAccessFrom m_allowUniversalAccessFromFileURLs = allowUniversalAccessFromFileURLs; } +void Settings::setAllowFileAccessFromFileURLs(bool allowFileAccessFromFileURLs) +{ + m_allowFileAccessFromFileURLs = allowFileAccessFromFileURLs; +} + void Settings::setJavaEnabled(bool isJavaEnabled) { m_isJavaEnabled = isJavaEnabled; diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h index 652c13d..44b4642 100644 --- a/WebCore/page/Settings.h +++ b/WebCore/page/Settings.h @@ -135,6 +135,9 @@ namespace WebCore { void setAllowUniversalAccessFromFileURLs(bool); bool allowUniversalAccessFromFileURLs() const { return m_allowUniversalAccessFromFileURLs; } + void setAllowFileAccessFromFileURLs(bool); + bool allowFileAccessFromFileURLs() const { return m_allowFileAccessFromFileURLs; } + void setJavaScriptCanOpenWindowsAutomatically(bool); bool javaScriptCanOpenWindowsAutomatically() const { return m_javaScriptCanOpenWindowsAutomatically; } @@ -423,6 +426,7 @@ namespace WebCore { bool m_isJavaScriptEnabled : 1; bool m_isWebSecurityEnabled : 1; bool m_allowUniversalAccessFromFileURLs: 1; + bool m_allowFileAccessFromFileURLs: 1; bool m_javaScriptCanOpenWindowsAutomatically : 1; bool m_shouldPrintBackgrounds : 1; bool m_textAreasAreResizable : 1; diff --git a/WebCore/page/win/PageWin.cpp b/WebCore/page/win/PageWin.cpp index 5d7450c..3ef7728 100644 --- a/WebCore/page/win/PageWin.cpp +++ b/WebCore/page/win/PageWin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,37 +26,8 @@ #include "config.h" #include "Page.h" -#include "Frame.h" -#include "FrameLoaderClient.h" -#include "FrameView.h" -#include "FloatRect.h" -#include "PluginView.h" -#include <windows.h> - namespace WebCore { HINSTANCE Page::s_instanceHandle = 0; -void Page::setCanStartPlugins(bool canStartPlugins) -{ - if (m_canStartPlugins == canStartPlugins) - return; - - m_canStartPlugins = canStartPlugins; - - if (!m_canStartPlugins || m_unstartedPlugins.isEmpty()) - return; - - Vector<PluginView*> unstartedPlugins; - copyToVector(m_unstartedPlugins, unstartedPlugins); - m_unstartedPlugins.clear(); - - for (size_t i = 0; i < unstartedPlugins.size(); ++i) { - if (unstartedPlugins[i]->start()) - continue; - unstartedPlugins[i]->parentFrame()->loader()->client()->dispatchDidFailToStartPlugin(unstartedPlugins[i]); - } -} - } // namespace WebCore - diff --git a/WebCore/platform/FileChooser.cpp b/WebCore/platform/FileChooser.cpp index 9fad392..a2d4770 100644 --- a/WebCore/platform/FileChooser.cpp +++ b/WebCore/platform/FileChooser.cpp @@ -39,9 +39,9 @@ FileChooserClient::~FileChooserClient() inline FileChooser::FileChooser(FileChooserClient* client, const Vector<String>& initialFilenames) : m_client(client) - , m_icon(Icon::createIconForFiles(initialFilenames)) { m_filenames = initialFilenames; + loadIcon(); } PassRefPtr<FileChooser> FileChooser::create(FileChooserClient* client, const Vector<String>& initialFilenames) @@ -71,9 +71,24 @@ void FileChooser::chooseFiles(const Vector<String>& filenames) if (m_filenames == filenames) return; m_filenames = filenames; - m_icon = Icon::createIconForFiles(filenames); + loadIcon(); if (m_client) m_client->valueChanged(); } +void FileChooser::loadIcon() +{ + m_icon = Icon::createIconForFiles(m_filenames); + // If synchronous icon loading failed, try asynchronous loading. + if (!m_icon && m_filenames.size() && m_client) + m_client->iconForFiles(m_filenames); +} + +void FileChooser::iconLoaded(PassRefPtr<Icon> icon) +{ + m_icon = icon; + if (m_icon && m_client) + m_client->repaint(); +} + } diff --git a/WebCore/platform/FileChooser.h b/WebCore/platform/FileChooser.h index 0764a6a..e7feb3e 100644 --- a/WebCore/platform/FileChooser.h +++ b/WebCore/platform/FileChooser.h @@ -41,8 +41,10 @@ class Icon; class FileChooserClient { public: virtual void valueChanged() = 0; + virtual void repaint() = 0; virtual bool allowsMultipleFiles() = 0; virtual String acceptTypes() = 0; + virtual void iconForFiles(const Vector<String>&) = 0; virtual ~FileChooserClient(); }; @@ -63,13 +65,16 @@ public: void chooseFile(const String& path); void chooseFiles(const Vector<String>& paths); - + // Called when FileChooserClient finishes to load an icon requested by iconForFiles(). + void iconLoaded(PassRefPtr<Icon>); + bool allowsMultipleFiles() const { return m_client ? m_client->allowsMultipleFiles() : false; } // Acceptable MIME types. It's an 'accept' attribute value of the corresponding INPUT element. String acceptTypes() const { return m_client ? m_client->acceptTypes() : String(); } private: FileChooser(FileChooserClient*, const Vector<String>& initialFilenames); + void loadIcon(); FileChooserClient* m_client; Vector<String> m_filenames; diff --git a/WebCore/platform/GeolocationService.cpp b/WebCore/platform/GeolocationService.cpp index be9553b..7e1f755 100644 --- a/WebCore/platform/GeolocationService.cpp +++ b/WebCore/platform/GeolocationService.cpp @@ -25,12 +25,13 @@ #include "config.h" #include "GeolocationService.h" -#include "Geoposition.h" + #include "GeolocationServiceMock.h" +#include "Geoposition.h" #include "PositionError.h" -#include <wtf/CurrentTime.h> #include <wtf/Assertions.h> +#include <wtf/CurrentTime.h> namespace WebCore { diff --git a/WebCore/platform/GeolocationService.h b/WebCore/platform/GeolocationService.h index f991f67..363865d 100644 --- a/WebCore/platform/GeolocationService.h +++ b/WebCore/platform/GeolocationService.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef GeolocationService_h @@ -46,7 +46,7 @@ class GeolocationService : public Noncopyable { public: static GeolocationService* create(GeolocationServiceClient*); virtual ~GeolocationService() { } - + #if PLATFORM(ANDROID) // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 virtual bool startUpdating(PositionOptions*, bool suspend) { return false; } @@ -54,7 +54,7 @@ public: virtual bool startUpdating(PositionOptions*) { return false; } #endif virtual void stopUpdating() { } - + virtual void suspend() { } virtual void resume() { } @@ -68,6 +68,7 @@ public: protected: GeolocationService(GeolocationServiceClient*); + GeolocationServiceClient* geolocationServiceClient() const { return m_geolocationServiceClient; } private: GeolocationServiceClient* m_geolocationServiceClient; diff --git a/WebCore/platform/Logging.cpp b/WebCore/platform/Logging.cpp index f3c6f1c..2358d41 100644 --- a/WebCore/platform/Logging.cpp +++ b/WebCore/platform/Logging.cpp @@ -59,6 +59,7 @@ WTFLogChannel LogMedia = { 0x01000000, "WebCoreLogLevel", WTFLogChan WTFLogChannel LogPlugins = { 0x02000000, "WebCoreLogLevel", WTFLogChannelOff }; WTFLogChannel LogArchives = { 0x04000000, "WebCoreLogLevel", WTFLogChannelOff }; +WTFLogChannel LogProgress = { 0x08000000, "WebCoreLogLevel", WTFLogChannelOff }; WTFLogChannel* getChannelFromName(const String& channelName) { @@ -110,6 +111,9 @@ WTFLogChannel* getChannelFromName(const String& channelName) if (equalIgnoringCase(channelName, String("PopupBlocking"))) return &LogPopupBlocking; + if (equalIgnoringCase(channelName, String("Progress"))) + return &LogProgress; + if (equalIgnoringCase(channelName, String("SpellingAndGrammar"))) return &LogSpellingAndGrammar; diff --git a/WebCore/platform/Logging.h b/WebCore/platform/Logging.h index 5c958fe..a3dfe62 100644 --- a/WebCore/platform/Logging.h +++ b/WebCore/platform/Logging.h @@ -57,6 +57,7 @@ namespace WebCore { extern WTFLogChannel LogMedia; extern WTFLogChannel LogPlugins; extern WTFLogChannel LogArchives; + extern WTFLogChannel LogProgress; void InitializeLoggingChannelsIfNecessary(); WTFLogChannel* getChannelFromName(const String& channelName); diff --git a/WebCore/platform/PlatformKeyboardEvent.h b/WebCore/platform/PlatformKeyboardEvent.h index 2b94cce..b2dfe03 100644 --- a/WebCore/platform/PlatformKeyboardEvent.h +++ b/WebCore/platform/PlatformKeyboardEvent.h @@ -63,6 +63,12 @@ class wxKeyEvent; class BMessage; #endif +#if PLATFORM(BREWMP) +typedef unsigned short uint16; +typedef unsigned long int uint32; +#define AEEEvent uint16 +#endif + namespace WebCore { class PlatformKeyboardEvent : public FastAllocBase { @@ -164,6 +170,10 @@ namespace WebCore { PlatformKeyboardEvent(BMessage*); #endif +#if PLATFORM(BREWMP) + PlatformKeyboardEvent(AEEEvent, uint16, uint32, Type); +#endif + #if PLATFORM(WIN) || PLATFORM(CHROMIUM) bool isSystemKey() const { return m_isSystemKey; } #endif diff --git a/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp b/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp new file mode 100644 index 0000000..758d15c --- /dev/null +++ b/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2010 Company 100, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "PlatformKeyboardEvent.h" + +#include "KeyboardCodes.h" +#include "NotImplemented.h" + +#include <AEEEvent.h> +#include <AEEStdDef.h> +#include <AEEVCodes.h> + +namespace WebCore { + +static String keyIdentifierForBrewKeyCode(int16 keyCode) +{ + switch (keyCode) { + case AVK_LALT: + case AVK_RALT: + return "Alt"; + case AVK_LCTRL: + case AVK_RCTRL: + return "Control"; + case AVK_LSHIFT: + case AVK_RSHIFT: + return "Shift"; + case AVK_CAPLK: + return "CapsLock"; + case AVK_FUNCTION1: + return "F1"; + case AVK_FUNCTION2: + return "F2"; + case AVK_FUNCTION3: + return "F3"; + case AVK_FUNCTION4: + return "F4"; + case AVK_FUNCTION5: + return "F5"; + case AVK_FUNCTION6: + return "F6"; + case AVK_FUNCTION7: + return "F7"; + case AVK_FUNCTION8: + return "F8"; + case AVK_FUNCTION9: + return "F9"; + case AVK_FUNCTION10: + return "F10"; + case AVK_FUNCTION11: + return "F11"; + case AVK_FUNCTION12: + return "F12"; + case AVK_PRSCRN: + return "PrintScreen"; + case AVK_LEFT: + return "Left"; + case AVK_RIGHT: + return "Right"; + case AVK_UP: + return "Up"; + case AVK_DOWN: + return "Down"; + case AVK_TXINSERT: + return "Insert"; + case AVK_ENTER: + return "Enter"; + case AVK_TXHOME: + return "Home"; + case AVK_TXDELETE: + // Standard says that DEL becomes U+007F. + return "U+007F"; + case AVK_TXEND: + return "End"; + case AVK_TXPGUP: + return "PageUp"; + case AVK_TXPGDOWN: + return "PageDown"; + default: + return String::format("U+%04X", toASCIIUpper(keyCode)); + } +} + +static int windowsKeyCodeForKeyEvent(uint16 code) +{ + switch (code) { + case AVK_A: + return VK_BACK; // (08) BACKSPACE key + case AVK_ENTER: + return VK_RETURN; // (0D) Return key + case AVK_SPACE: + return VK_SPACE; // (20) SPACEBAR + case AVK_TXPGUP: + return VK_PRIOR; // (21) PAGE UP key + case AVK_TXPGDOWN: + return VK_NEXT; // (22) PAGE DOWN key + case AVK_TXEND: + return VK_END; // (23) END key + case AVK_TXHOME: + return VK_HOME; // (24) HOME key + case AVK_LEFT: + return VK_LEFT; // (25) LEFT ARROW key + case AVK_UP: + return VK_UP; // (26) UP ARROW key + case AVK_RIGHT: + return VK_RIGHT; // (27) RIGHT ARROW key + case AVK_DOWN: + return VK_DOWN; // (28) DOWN ARROW key + case AVK_TXINSERT: + return VK_INSERT; // (2D) INS key + case AVK_TXDELETE: + return VK_DELETE; // (2E) DEL key + default: + return 0; + } +} + +static inline String singleCharacterString(UChar c) +{ + return String(&c, 1); +} + +PlatformKeyboardEvent::PlatformKeyboardEvent(AEEEvent event, uint16 code, uint32 modifiers, Type type) + : m_type(type) + , m_text((type == Char) ? singleCharacterString(code) : String()) + , m_unmodifiedText((type == Char) ? singleCharacterString(code) : String()) + , m_keyIdentifier((type == Char) ? String() : keyIdentifierForBrewKeyCode(code)) + , m_autoRepeat(modifiers & KB_AUTOREPEAT) + , m_windowsVirtualKeyCode((type == RawKeyDown || type == KeyUp) ? windowsKeyCodeForKeyEvent(code) : 0) + , m_nativeVirtualKeyCode(code) + , m_isKeypad(false) + , m_shiftKey(modifiers & (KB_LSHIFT | KB_RSHIFT)) + , m_ctrlKey(modifiers & (KB_LCTRL | KB_RCTRL)) + , m_altKey(modifiers & (KB_LALT | KB_RALT)) + , m_metaKey(false) +{ +} + +void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool) +{ + // No KeyDown events on BREW to disambiguate. + ASSERT_NOT_REACHED(); +} + +bool PlatformKeyboardEvent::currentCapsLockState() +{ + notImplemented(); + return false; +} + +} // namespace WebCore + diff --git a/WebCore/platform/brew/SystemTimeBrew.cpp b/WebCore/platform/brew/SystemTimeBrew.cpp new file mode 100644 index 0000000..c1e39fb --- /dev/null +++ b/WebCore/platform/brew/SystemTimeBrew.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2010 Company 100. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "SystemTime.h" + +#include <float.h> + +namespace WebCore { + +float userIdleTime() +{ + // return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed + return FLT_MAX; +} + +} + diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h index 83f9c81..5a085be 100644 --- a/WebCore/platform/chromium/ChromiumBridge.h +++ b/WebCore/platform/chromium/ChromiumBridge.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Google Inc. All rights reserved. + * Copyright (c) 2010, Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -53,6 +53,8 @@ namespace WebCore { class Cursor; class Document; class Frame; + class GeolocationServiceBridge; + class GeolocationServiceChromium; class GraphicsContext; class Image; class IntRect; @@ -83,12 +85,12 @@ namespace WebCore { static void clipboardWriteImage(NativeImagePtr, const KURL&, const String&); // Cookies ------------------------------------------------------------ - static void setCookies(const KURL& url, const KURL& firstPartyForCookies, const String& value); - static String cookies(const KURL& url, const KURL& firstPartyForCookies); - static String cookieRequestHeaderFieldValue(const KURL& url, const KURL& firstPartyForCookies); - static bool rawCookies(const KURL& url, const KURL& firstPartyForCookies, Vector<Cookie>*); - static void deleteCookie(const KURL& url, const String& cookieName); - static bool cookiesEnabled(const KURL& url, const KURL& firstPartyForCookies); + static void setCookies(const Document*, const KURL&, const String& value); + static String cookies(const Document*, const KURL&); + static String cookieRequestHeaderFieldValue(const Document*, const KURL&); + static bool rawCookies(const Document*, const KURL& url, Vector<Cookie>&); + static void deleteCookie(const Document*, const KURL& url, const String& cookieName); + static bool cookiesEnabled(const Document*); // DNS ---------------------------------------------------------------- static void prefetchDNS(const String& hostname); @@ -117,6 +119,9 @@ namespace WebCore { // Forms -------------------------------------------------------------- static void notifyFormStateChanged(const Document*); + // Geolocation -------------------------------------------------------- + static GeolocationServiceBridge* createGeolocationServiceBridge(GeolocationServiceChromium*); + // HTML5 DB ----------------------------------------------------------- #if ENABLE(DATABASE) // Returns a handle to the DB file and ooptionally a handle to its containing directory diff --git a/WebCore/platform/chromium/ChromiumDataObject.cpp b/WebCore/platform/chromium/ChromiumDataObject.cpp index 695da9f..77a5f0f 100644 --- a/WebCore/platform/chromium/ChromiumDataObject.cpp +++ b/WebCore/platform/chromium/ChromiumDataObject.cpp @@ -37,7 +37,6 @@ void ChromiumDataObject::clear() { url = KURL(); urlTitle = ""; - downloadURL = KURL(); downloadMetadata = ""; fileExtension = ""; filenames.clear(); @@ -52,7 +51,6 @@ void ChromiumDataObject::clear() bool ChromiumDataObject::hasData() const { return !url.isEmpty() - || !downloadURL.isEmpty() || !downloadMetadata.isEmpty() || !fileExtension.isEmpty() || !filenames.isEmpty() @@ -64,7 +62,6 @@ bool ChromiumDataObject::hasData() const ChromiumDataObject::ChromiumDataObject(const ChromiumDataObject& other) : url(other.url) , urlTitle(other.urlTitle) - , downloadURL(other.downloadURL) , downloadMetadata(other.downloadMetadata) , fileExtension(other.fileExtension) , filenames(other.filenames) diff --git a/WebCore/platform/chromium/ChromiumDataObject.h b/WebCore/platform/chromium/ChromiumDataObject.h index 186a1a0..5fae3e3 100644 --- a/WebCore/platform/chromium/ChromiumDataObject.h +++ b/WebCore/platform/chromium/ChromiumDataObject.h @@ -59,7 +59,6 @@ namespace WebCore { KURL url; String urlTitle; - KURL downloadURL; String downloadMetadata; String fileExtension; diff --git a/WebCore/platform/chromium/ClipboardChromium.cpp b/WebCore/platform/chromium/ClipboardChromium.cpp index 933d839..a1f60a6 100644 --- a/WebCore/platform/chromium/ClipboardChromium.cpp +++ b/WebCore/platform/chromium/ClipboardChromium.cpp @@ -161,9 +161,6 @@ bool ClipboardChromium::setData(const String& type, const String& data) if (winType == ClipboardDataTypeDownloadURL) { m_dataObject->downloadMetadata = data; - KURL url = KURL(ParsedURLString, data); - if (url.isValid()) - m_dataObject->downloadURL = url; return true; } diff --git a/WebCore/platform/chromium/GeolocationServiceChromium.cpp b/WebCore/platform/chromium/GeolocationServiceChromium.cpp index 65886b0..4e00908 100644 --- a/WebCore/platform/chromium/GeolocationServiceChromium.cpp +++ b/WebCore/platform/chromium/GeolocationServiceChromium.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Google Inc. All rights reserved. + * Copyright (c) 2010, Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -29,27 +29,79 @@ */ #include "config.h" -#include "GeolocationService.h" +#include "GeolocationServiceChromium.h" + +#include "ChromiumBridge.h" namespace WebCore { -class GeolocationServiceChromium : public GeolocationService { -public: - GeolocationServiceChromium(GeolocationServiceClient* c) - : GeolocationService(c) - { - } - // FIXME: Implement. https://bugs.webkit.org/show_bug.cgi?id=32068 -}; +GeolocationServiceChromium::GeolocationServiceChromium(GeolocationServiceClient* c) + : GeolocationService(c), + m_geolocation(reinterpret_cast<Geolocation*>(c)), + m_geolocationServiceBridge(ChromiumBridge::createGeolocationServiceBridge(this)), + m_lastPosition(Geoposition::create(Coordinates::create(0.0, 0.0, false, 0.0, 0.0, false, 0.0, false, 0.0, false, 0.0), 0)), + m_lastError(PositionError::create(PositionError::POSITION_UNAVAILABLE, "")) +{ +} + +void GeolocationServiceChromium::setIsAllowed(bool allowed) +{ + m_geolocation->setIsAllowed(allowed); +} + +void GeolocationServiceChromium::setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) +{ + m_lastPosition = Geoposition::create(Coordinates::create(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed), timestamp); + positionChanged(); +} + +void GeolocationServiceChromium::setLastError(int errorCode, const String& message) +{ + m_lastError = PositionError::create(static_cast<PositionError::ErrorCode>(errorCode), message); + errorOccurred(); +} + +Frame* GeolocationServiceChromium::frame() +{ + return m_geolocation->frame(); +} + +bool GeolocationServiceChromium::startUpdating(PositionOptions* options) +{ + return m_geolocationServiceBridge->startUpdating(options); +} + +void GeolocationServiceChromium::stopUpdating() +{ + return m_geolocationServiceBridge->stopUpdating(); +} + +void GeolocationServiceChromium::suspend() +{ + return m_geolocationServiceBridge->suspend(); +} + +void GeolocationServiceChromium::resume() +{ + return m_geolocationServiceBridge->resume(); +} + +Geoposition* GeolocationServiceChromium::lastPosition() const +{ + return m_lastPosition.get(); +} + +PositionError* GeolocationServiceChromium::lastError() const +{ + return m_lastError.get(); +} -// This guard is the counterpart of the one in WebCore/platform/GeolocationService.cpp -#if ENABLE(GEOLOCATION) -static GeolocationService* createGeolocationService(GeolocationServiceClient* c) +static GeolocationService* createGeolocationServiceChromium(GeolocationServiceClient* c) { return new GeolocationServiceChromium(c); } -GeolocationService::FactoryFunction* GeolocationService::s_factoryFunction = &createGeolocationService; -#endif +// Sets up the factory function for GeolocationService. +GeolocationService::FactoryFunction* GeolocationService::s_factoryFunction = &createGeolocationServiceChromium; } // namespace WebCore diff --git a/WebCore/platform/chromium/GeolocationServiceChromium.h b/WebCore/platform/chromium/GeolocationServiceChromium.h new file mode 100644 index 0000000..e32de8b --- /dev/null +++ b/WebCore/platform/chromium/GeolocationServiceChromium.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2010, Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef GeolocationServiceChromium_h +#define GeolocationServiceChromium_h + +#include "Geolocation.h" +#include "GeolocationService.h" +#include "Geoposition.h" +#include "PlatformString.h" +#include "PositionError.h" + +namespace WebCore { + +// Provides an interface for GeolocationServiceChromium to call into the embedder. +class GeolocationServiceBridge { +public: + // Called by GeolocationServiceChromium. + virtual bool startUpdating(PositionOptions*) = 0; + virtual void stopUpdating() = 0; + virtual void suspend() = 0; + virtual void resume() = 0; + + // Called by the embedder, to identify this bridge. + virtual int getBridgeId() const = 0; +}; + +// This class extends GeolocationService, and uses GeolocationServiceBridge to +// call into the embedder, as well as provides a few extra methods so that the +// embedder can notify permission, position, error, etc. +class GeolocationServiceChromium : public GeolocationService { +public: + explicit GeolocationServiceChromium(GeolocationServiceClient*); + + GeolocationServiceBridge* geolocationServiceBridge() const { return m_geolocationServiceBridge.get(); } + void setIsAllowed(bool allowed); + void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp); + void setLastError(int errorCode, const String& message); + Frame* frame(); + + // From GeolocationService. + virtual bool startUpdating(PositionOptions*); + virtual void stopUpdating(); + virtual void suspend(); + virtual void resume(); + virtual Geoposition* lastPosition() const; + virtual PositionError* lastError() const; + +private: + Geolocation* m_geolocation; + OwnPtr<GeolocationServiceBridge> m_geolocationServiceBridge; + RefPtr<Geoposition> m_lastPosition; + RefPtr<PositionError> m_lastError; +}; + +} // namespace WebCore + +#endif // GeolocationServiceChromium_h diff --git a/WebCore/platform/chromium/PasteboardChromium.cpp b/WebCore/platform/chromium/PasteboardChromium.cpp index d4f9a27..6904050 100644 --- a/WebCore/platform/chromium/PasteboardChromium.cpp +++ b/WebCore/platform/chromium/PasteboardChromium.cpp @@ -125,7 +125,8 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String& title) ASSERT(node->renderer()->isImage()); RenderImage* renderer = toRenderImage(node->renderer()); CachedImage* cachedImage = renderer->cachedImage(); - ASSERT(cachedImage); + if (!cachedImage || cachedImage->errorOccurred()) + return; Image* image = cachedImage->image(); ASSERT(image); diff --git a/WebCore/platform/graphics/BitmapImage.cpp b/WebCore/platform/graphics/BitmapImage.cpp index 0b94efb..0cd3907 100644 --- a/WebCore/platform/graphics/BitmapImage.cpp +++ b/WebCore/platform/graphics/BitmapImage.cpp @@ -270,6 +270,18 @@ void BitmapImage::startAnimation(bool catchUpIfNecessary) if (m_frameTimer || !shouldAnimate() || frameCount() <= 1) return; + // Don't advance the animation to an incomplete frame. + size_t nextFrame = (m_currentFrame + 1) % frameCount(); + if (!m_allDataReceived && !frameIsCompleteAtIndex(nextFrame)) + return; + + // Don't advance past the last frame if we haven't decoded the whole image + // yet and our repetition count is potentially unset. The repetition count + // in a GIF can potentially come after all the rest of the image data, so + // wait on it. + if (!m_allDataReceived && repetitionCount(false) == cAnimationLoopOnce && m_currentFrame >= (frameCount() - 1)) + return; + // Determine time for next frame to start. By ignoring paint and timer lag // in this calculation, we make the animation appear to run at its desired // rate regardless of how fast it's being repainted. @@ -288,18 +300,6 @@ void BitmapImage::startAnimation(bool catchUpIfNecessary) m_desiredFrameStartTime = time + currentDuration; } - // Don't advance the animation to an incomplete frame. - size_t nextFrame = (m_currentFrame + 1) % frameCount(); - if (!m_allDataReceived && !frameIsCompleteAtIndex(nextFrame)) - return; - - // Don't advance past the last frame if we haven't decoded the whole image - // yet and our repetition count is potentially unset. The repetition count - // in a GIF can potentially come after all the rest of the image data, so - // wait on it. - if (!m_allDataReceived && repetitionCount(false) == cAnimationLoopOnce && m_currentFrame >= (frameCount() - 1)) - return; - // The image may load more slowly than it's supposed to animate, so that by // the time we reach the end of the first repetition, we're well behind. // Clamp the desired frame start time in this case, so that we don't skip diff --git a/WebCore/platform/graphics/FloatRect.h b/WebCore/platform/graphics/FloatRect.h index 74a6293..b265121 100644 --- a/WebCore/platform/graphics/FloatRect.h +++ b/WebCore/platform/graphics/FloatRect.h @@ -99,6 +99,8 @@ public: float right() const { return x() + width(); } float bottom() const { return y() + height(); } + FloatPoint center() const { return FloatPoint(x() + width() / 2, y() + height() / 2); } + void move(const FloatSize& delta) { m_location += delta; } void move(float dx, float dy) { m_location.move(dx, dy); } diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h index e1be1fe..0efd3bf 100644 --- a/WebCore/platform/graphics/Gradient.h +++ b/WebCore/platform/graphics/Gradient.h @@ -37,7 +37,9 @@ #if PLATFORM(CG) -#ifdef BUILDING_ON_TIGER +#define USE_CG_SHADING defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) + +#if USE_CG_SHADING typedef struct CGShading* CGShadingRef; typedef CGShadingRef PlatformGradient; #else diff --git a/WebCore/platform/graphics/GraphicsContext3D.cpp b/WebCore/platform/graphics/GraphicsContext3D.cpp new file mode 100644 index 0000000..3eb9818 --- /dev/null +++ b/WebCore/platform/graphics/GraphicsContext3D.cpp @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(3D_CANVAS) + +#include "GraphicsContext3D.h" + +#include "Image.h" + +namespace WebCore { + +bool GraphicsContext3D::extractImageData(Image* image, + bool flipY, + bool premultiplyAlpha, + Vector<uint8_t>& imageData, + unsigned int* format, + unsigned int* internalFormat) +{ + if (!image) + return false; + AlphaOp alphaOp = kAlphaDoNothing; + bool hasAlphaChannel = true; + if (!getImageData(image, imageData, premultiplyAlpha, + &hasAlphaChannel, &alphaOp, format)) + return false; + processImageData(imageData.data(), + image->width(), + image->height(), + flipY, + alphaOp); + *internalFormat = (hasAlphaChannel ? RGBA : RGB); + return true; +} + +void GraphicsContext3D::processImageData(uint8_t* imageData, + unsigned width, + unsigned height, + bool flipVertically, + AlphaOp alphaOp) +{ + switch (alphaOp) { + case kAlphaDoPremultiply: + premultiplyAlpha(imageData, width * height); + break; + case kAlphaDoUnmultiply: + unmultiplyAlpha(imageData, width * height); + break; + default: + break; + } + + if (flipVertically && width && height) { + int rowBytes = width * 4; + uint8_t* tempRow = new uint8_t[rowBytes]; + for (unsigned i = 0; i < height / 2; i++) { + uint8_t* lowRow = imageData + (rowBytes * i); + uint8_t* highRow = imageData + (rowBytes * (height - i - 1)); + memcpy(tempRow, lowRow, rowBytes); + memcpy(lowRow, highRow, rowBytes); + memcpy(highRow, tempRow, rowBytes); + } + delete[] tempRow; + } +} + +// Premultiply alpha into color channels. +void GraphicsContext3D::premultiplyAlpha(unsigned char* rgbaData, int numPixels) +{ + for (int j = 0; j < numPixels; j++) { + float r = rgbaData[4*j+0] / 255.0f; + float g = rgbaData[4*j+1] / 255.0f; + float b = rgbaData[4*j+2] / 255.0f; + float a = rgbaData[4*j+3] / 255.0f; + rgbaData[4*j+0] = (unsigned char) (r * a * 255.0f); + rgbaData[4*j+1] = (unsigned char) (g * a * 255.0f); + rgbaData[4*j+2] = (unsigned char) (b * a * 255.0f); + } +} + +// Remove premultiplied alpha from color channels. +// FIXME: this is lossy. Must retrieve original values from HTMLImageElement. +void GraphicsContext3D::unmultiplyAlpha(unsigned char* rgbaData, int numPixels) +{ + for (int j = 0; j < numPixels; j++) { + float r = rgbaData[4*j+0] / 255.0f; + float g = rgbaData[4*j+1] / 255.0f; + float b = rgbaData[4*j+2] / 255.0f; + float a = rgbaData[4*j+3] / 255.0f; + if (a > 0.0f) { + r /= a; + g /= a; + b /= a; + r = (r > 1.0f) ? 1.0f : r; + g = (g > 1.0f) ? 1.0f : g; + b = (b > 1.0f) ? 1.0f : b; + rgbaData[4*j+0] = (unsigned char) (r * 255.0f); + rgbaData[4*j+1] = (unsigned char) (g * 255.0f); + rgbaData[4*j+2] = (unsigned char) (b * 255.0f); + } + } +} + +} // namespace WebCore + +#endif // ENABLE(3D_CANVAS) diff --git a/WebCore/platform/graphics/GraphicsContext3D.h b/WebCore/platform/graphics/GraphicsContext3D.h index b7be8fc..0a41dc6 100644 --- a/WebCore/platform/graphics/GraphicsContext3D.h +++ b/WebCore/platform/graphics/GraphicsContext3D.h @@ -419,6 +419,43 @@ namespace WebCore { // like GL_FLOAT, GL_INT, etc. int sizeInBytes(int type); + //---------------------------------------------------------------------- + // Helpers for texture uploading. + // + + // Extracts the contents of the given Image into the passed + // Vector, obeying the flipY and premultiplyAlpha flags. + // Returns the applicable OpenGL format and internalFormat for + // the subsequent glTexImage2D or glTexSubImage2D call. + // Returns true upon success. + bool extractImageData(Image* image, + bool flipY, + bool premultiplyAlpha, + Vector<uint8_t>& imageData, + unsigned int* format, + unsigned int* internalFormat); + + // Processes the given image data in preparation for uploading + // via texImage2D or texSubImage2D. The input data must be in + // 4-component format with the alpha channel last (i.e., RGBA + // or BGRA), tightly packed, with no space between rows. + + enum AlphaOp { + kAlphaDoNothing = 0, + kAlphaDoPremultiply = 1, + kAlphaDoUnmultiply = 2 + }; + + void processImageData(uint8_t* imageData, + unsigned width, + unsigned height, + bool flipVertically, + AlphaOp alphaOp); + + //---------------------------------------------------------------------- + // Entry points for WebGL. + // + void activeTexture(unsigned long texture); void attachShader(WebGLProgram* program, WebGLShader* shader); void bindAttribLocation(WebGLProgram*, unsigned long index, const String& name); @@ -624,6 +661,34 @@ namespace WebCore { private: GraphicsContext3D(Attributes attrs); + // Helpers for texture uploading. + void premultiplyAlpha(unsigned char* rgbaData, int numPixels); + void unmultiplyAlpha(uint8_t* imageData, int numPixels); + + // Each platform must provide an implementation of this method. + // + // Gets the data for the given Image into outputVector, + // without doing any processing of the data (vertical flip or + // otherwise). + // + // premultiplyAlpha indicates whether the user will eventually + // want the alpha channel multiplied into the color channels. + // + // The out parameter hasAlphaChannel indicates whether the + // image actually had an alpha channel. + // + // The out parameter neededAlphaOp should be passed to a + // subsequent call of processImageData. + // + // The out parameter format should be passed to subsequent + // invocations of texImage2D and texSubImage2D. + bool getImageData(Image* image, + Vector<uint8_t>& outputVector, + bool premultiplyAlpha, + bool* hasAlphaChannel, + AlphaOp* neededAlphaOp, + unsigned int* format); + int m_currentWidth, m_currentHeight; #if PLATFORM(MAC) diff --git a/WebCore/platform/graphics/GraphicsLayer.h b/WebCore/platform/graphics/GraphicsLayer.h index 844301e..a097620 100644 --- a/WebCore/platform/graphics/GraphicsLayer.h +++ b/WebCore/platform/graphics/GraphicsLayer.h @@ -74,7 +74,7 @@ class FloatPoint3D; class GraphicsContext; class Image; class TextStream; -class TimingFunction; +struct TimingFunction; // Base class for animation values (also used for transitions). Here to // represent values for properties being animated via the GraphicsLayer, diff --git a/WebCore/platform/graphics/Icon.h b/WebCore/platform/graphics/Icon.h index d7d694a..e9f2dc7 100644 --- a/WebCore/platform/graphics/Icon.h +++ b/WebCore/platform/graphics/Icon.h @@ -51,6 +51,8 @@ class String; class Icon : public RefCounted<Icon> { public: + // Deprecated. This function will be removed. + // FIXME: Remove it when all implementations are moved to ChromeClient::iconForFiles(). static PassRefPtr<Icon> createIconForFiles(const Vector<String>& filenames); ~Icon(); diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp index 2b09885..8a9a264 100644 --- a/WebCore/platform/graphics/MediaPlayer.cpp +++ b/WebCore/platform/graphics/MediaPlayer.cpp @@ -69,6 +69,9 @@ public: virtual void pause() { } virtual PlatformMedia platformMedia() const { return NoPlatformMedia; } +#if USE(ACCELERATED_COMPOSITING) + virtual PlatformLayer* platformLayer() const { return 0; } +#endif virtual IntSize naturalSize() const { return IntSize(0, 0); } @@ -364,6 +367,13 @@ PlatformMedia MediaPlayer::platformMedia() const return m_private->platformMedia(); } +#if USE(ACCELERATED_COMPOSITING) +PlatformLayer* MediaPlayer::platformLayer() const +{ + return m_private->platformLayer(); +} +#endif + MediaPlayer::NetworkState MediaPlayer::networkState() { return m_private->networkState(); diff --git a/WebCore/platform/graphics/MediaPlayer.h b/WebCore/platform/graphics/MediaPlayer.h index 40ed8ae..1ca4576 100644 --- a/WebCore/platform/graphics/MediaPlayer.h +++ b/WebCore/platform/graphics/MediaPlayer.h @@ -39,6 +39,10 @@ #include <wtf/Noncopyable.h> #include <wtf/PassOwnPtr.h> +#if USE(ACCELERATED_COMPOSITING) +#include "GraphicsLayer.h" +#endif + #ifdef __OBJC__ @class QTMovie; #else @@ -67,10 +71,6 @@ class MediaPlayerPrivateInterface; class String; class TimeRanges; -#if USE(ACCELERATED_COMPOSITING) -class GraphicsLayer; -#endif - class MediaPlayerClient { public: virtual ~MediaPlayerClient() { } @@ -112,8 +112,9 @@ public: // whether the rendering system can accelerate the display of this MediaPlayer. virtual bool mediaPlayerRenderingCanBeAccelerated(MediaPlayer*) { return false; } - // return the GraphicsLayer that will host the presentation for this MediaPlayer. - virtual GraphicsLayer* mediaPlayerGraphicsLayer(MediaPlayer*) { return 0; } + // called when the media player's rendering mode changed, which indicates a change in the + // availability of the platformLayer(). + virtual void mediaPlayerRenderingModeChanged(MediaPlayer*) { } #endif }; @@ -135,6 +136,9 @@ public: bool supportsFullscreen() const; bool supportsSave() const; PlatformMedia platformMedia() const; +#if USE(ACCELERATED_COMPOSITING) + PlatformLayer* platformLayer() const; +#endif IntSize naturalSize(); bool hasVideo() const; diff --git a/WebCore/platform/graphics/MediaPlayerPrivate.h b/WebCore/platform/graphics/MediaPlayerPrivate.h index 3b7c4d4..3bb8475 100644 --- a/WebCore/platform/graphics/MediaPlayerPrivate.h +++ b/WebCore/platform/graphics/MediaPlayerPrivate.h @@ -45,6 +45,9 @@ public: virtual void prepareToPlay() { } virtual PlatformMedia platformMedia() const { return NoPlatformMedia; } +#if USE(ACCELERATED_COMPOSITING) + virtual PlatformLayer* platformLayer() const { return 0; } +#endif virtual void play() = 0; virtual void pause() = 0; diff --git a/WebCore/platform/graphics/cg/GradientCG.cpp b/WebCore/platform/graphics/cg/GradientCG.cpp index e9b5de7..9c91700 100644 --- a/WebCore/platform/graphics/cg/GradientCG.cpp +++ b/WebCore/platform/graphics/cg/GradientCG.cpp @@ -36,7 +36,7 @@ namespace WebCore { void Gradient::platformDestroy() { -#ifdef BUILDING_ON_TIGER +#if USE_CG_SHADING CGShadingRelease(m_gradient); #else CGGradientRelease(m_gradient); @@ -44,7 +44,7 @@ void Gradient::platformDestroy() m_gradient = 0; } -#ifdef BUILDING_ON_TIGER +#if USE_CG_SHADING static void gradientCallback(void* info, const CGFloat* in, CGFloat* out) { float r, g, b, a; @@ -114,7 +114,7 @@ void Gradient::fill(GraphicsContext* context, const FloatRect& rect) void Gradient::paint(GraphicsContext* context) { -#ifdef BUILDING_ON_TIGER +#if USE_CG_SHADING CGContextDrawShading(context->platformContext(), platformGradient()); #else CGGradientDrawingOptions extendOptions = kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation; diff --git a/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp new file mode 100644 index 0000000..c6a8f83 --- /dev/null +++ b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(3D_CANVAS) + +#include "GraphicsContext3D.h" + +#include "Image.h" + +#include <CoreGraphics/CGBitmapContext.h> +#include <CoreGraphics/CGContext.h> +#include <CoreGraphics/CGImage.h> + +namespace WebCore { + +bool GraphicsContext3D::getImageData(Image* image, + Vector<uint8_t>& outputVector, + bool premultiplyAlpha, + bool* hasAlphaChannel, + AlphaOp* neededAlphaOp, + unsigned int* format) +{ + if (!image) + return false; + CGImageRef cgImage = image->nativeImageForCurrentFrame(); + if (!cgImage) + return false; + int width = CGImageGetWidth(cgImage); + int height = CGImageGetHeight(cgImage); + int rowBytes = width * 4; + CGImageAlphaInfo info = CGImageGetAlphaInfo(cgImage); + *hasAlphaChannel = (info != kCGImageAlphaNone + && info != kCGImageAlphaNoneSkipLast + && info != kCGImageAlphaNoneSkipFirst); + if (!premultiplyAlpha && *hasAlphaChannel) + // FIXME: must fetch the image data before the premultiplication step + *neededAlphaOp = kAlphaDoUnmultiply; + *format = RGBA; + outputVector.resize(height * rowBytes); + // Try to reuse the color space from the image to preserve its colors. + // Some images use a color space (such as indexed) unsupported by the bitmap context. + CGColorSpaceRef colorSpace = CGImageGetColorSpace(cgImage); + bool releaseColorSpace = false; + CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace); + switch (colorSpaceModel) { + case kCGColorSpaceModelMonochrome: + case kCGColorSpaceModelRGB: + case kCGColorSpaceModelCMYK: + case kCGColorSpaceModelLab: + case kCGColorSpaceModelDeviceN: + break; + default: + colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGBLinear); + releaseColorSpace = true; + break; + } + CGContextRef tmpContext = CGBitmapContextCreate(outputVector.data(), + width, height, 8, rowBytes, + colorSpace, + kCGImageAlphaPremultipliedLast); + if (releaseColorSpace) + CGColorSpaceRelease(colorSpace); + if (!tmpContext) + return false; + CGContextSetBlendMode(tmpContext, kCGBlendModeCopy); + CGContextDrawImage(tmpContext, + CGRectMake(0, 0, static_cast<CGFloat>(width), static_cast<CGFloat>(height)), + cgImage); + CGContextRelease(tmpContext); + return true; +} + + +} // namespace WebCore + +#endif // ENABLE(3D_CANVAS) diff --git a/WebCore/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp b/WebCore/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp index e2c47c1..e71f66a 100644 --- a/WebCore/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp +++ b/WebCore/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp @@ -134,7 +134,8 @@ static bool fillBMPGlyphs(unsigned offset, // Copy the output to the GlyphPage bool haveGlyphs = false; int invalidGlyph = 0xFFFF; - if (!isVistaOrNewer() && !(tm.tmPitchAndFamily & TMPF_TRUETYPE)) + const DWORD cffTableTag = 0x20464643; // 4-byte identifier for OpenType CFF table ('CFF '). + if (!isVistaOrNewer() && !(tm.tmPitchAndFamily & TMPF_TRUETYPE) && (GetFontData(dc, cffTableTag, 0, 0, 0) == GDI_ERROR)) invalidGlyph = 0x1F; Glyph spaceGlyph = 0; // Glyph for a space. Lazily filled. diff --git a/WebCore/platform/graphics/gtk/IconGtk.cpp b/WebCore/platform/graphics/gtk/IconGtk.cpp index 3563a59..71b897e 100644 --- a/WebCore/platform/graphics/gtk/IconGtk.cpp +++ b/WebCore/platform/graphics/gtk/IconGtk.cpp @@ -87,6 +87,7 @@ static String lookupIconName(String MIMEType) return GTK_STOCK_FILE; } +// FIXME: Move the code to ChromeClient::iconForFiles(). PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) { if (filenames.isEmpty()) diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp index 1866c36..e1c9fd2 100644 --- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp +++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp @@ -3,6 +3,7 @@ * Copyright (C) 2007 Collabora Ltd. All rights reserved. * Copyright (C) 2007 Alp Toker <alp@atoker.com> * Copyright (C) 2009 Gustavo Noronha Silva <gns@gnome.org> + * Copyright (C) 2009, 2010 Igalia S.L * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -52,20 +53,44 @@ #include <gst/video/video.h> #include <limits> #include <math.h> -#include <webkit/webkitwebview.h> #include <wtf/gtk/GOwnPtr.h> +// GstPlayFlags flags from playbin2. It is the policy of GStreamer to +// not publicly expose element-specific enums. That's why this +// GstPlayFlags enum has been copied here. +typedef enum { + GST_PLAY_FLAG_VIDEO = 0x00000001, + GST_PLAY_FLAG_AUDIO = 0x00000002, + GST_PLAY_FLAG_TEXT = 0x00000004, + GST_PLAY_FLAG_VIS = 0x00000008, + GST_PLAY_FLAG_SOFT_VOLUME = 0x00000010, + GST_PLAY_FLAG_NATIVE_AUDIO = 0x00000020, + GST_PLAY_FLAG_NATIVE_VIDEO = 0x00000040, + GST_PLAY_FLAG_DOWNLOAD = 0x00000080, + GST_PLAY_FLAG_BUFFERING = 0x000000100 +} GstPlayFlags; + using namespace std; namespace WebCore { +static int greatestCommonDivisor(int a, int b) +{ + while (b) { + int temp = a; + a = b; + b = temp % b; + } + + return ABS(a); +} + gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpointer data) { GOwnPtr<GError> err; GOwnPtr<gchar> debug; MediaPlayer::NetworkState error; MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data); - gint percent = 0; bool issueError = true; bool attemptNextLocation = false; @@ -115,8 +140,7 @@ gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpo mp->updateStates(); break; case GST_MESSAGE_BUFFERING: - gst_message_parse_buffering(message, &percent); - LOG_VERBOSE(Media, "Buffering %d", percent); + mp->processBufferingStats(message); break; case GST_MESSAGE_DURATION: LOG_VERBOSE(Media, "Duration changed"); @@ -174,6 +198,12 @@ gboolean notifyMuteIdleCallback(gpointer data) return FALSE; } +gboolean bufferingTimeoutCallback(gpointer data) +{ + MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data); + return mp->queryBufferingStats(); +} + static float playbackPosition(GstElement* playbin) { @@ -278,14 +308,24 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player) , m_playbackRate(1) , m_errorOccured(false) , m_volumeIdleId(0) - , m_mediaDuration(0.0) + , m_mediaDuration(0) , m_muteIdleId(0) + , m_startedBuffering(false) + , m_fillTimeoutId(0) + , m_maxTimeLoaded(0) + , m_fillStatus(0) { - doGstInit(); + if (doGstInit()) + createGSTPlayBin(); } MediaPlayerPrivate::~MediaPlayerPrivate() { + if (m_fillTimeoutId) { + g_source_remove(m_fillTimeoutId); + m_fillTimeoutId = 0; + } + if (m_volumeIdleId) { g_source_remove(m_volumeIdleId); m_volumeIdleId = 0; @@ -338,7 +378,7 @@ void MediaPlayerPrivate::load(const String& url) m_player->readyStateChanged(); } - createGSTPlayBin(url); + g_object_set(m_playBin, "uri", url.utf8().data(), NULL); pause(); } @@ -422,9 +462,6 @@ void MediaPlayerPrivate::seek(float time) if (!m_playBin) return; - if (m_isStreaming) - return; - if (m_errorOccured) return; @@ -473,30 +510,60 @@ IntSize MediaPlayerPrivate::naturalSize() const if (!hasVideo()) return IntSize(); + GstPad* pad = gst_element_get_static_pad(m_videoSink, "sink"); + if (!pad) + return IntSize(); + + int width = 0, height = 0; + GstCaps* caps = GST_PAD_CAPS(pad); + int pixelAspectRatioNumerator, pixelAspectRatioDenominator; + int displayWidth, displayHeight, displayAspectRatioGCD; + int originalWidth = 0, originalHeight = 0; + // TODO: handle possible clean aperture data. See // https://bugzilla.gnome.org/show_bug.cgi?id=596571 // TODO: handle possible transformation matrix. See // https://bugzilla.gnome.org/show_bug.cgi?id=596326 - int width = 0, height = 0; - if (GstPad* pad = gst_element_get_static_pad(m_videoSink, "sink")) { - GstCaps* caps = GST_PAD_CAPS(pad); - gfloat pixelAspectRatio; - gint pixelAspectRatioNumerator, pixelAspectRatioDenominator; - - if (!GST_IS_CAPS(caps) || !gst_caps_is_fixed(caps) - || !gst_video_format_parse_caps(caps, 0, &width, &height) - || !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator, - &pixelAspectRatioDenominator)) { - gst_object_unref(GST_OBJECT(pad)); - return IntSize(); - } - pixelAspectRatio = (gfloat) pixelAspectRatioNumerator / (gfloat) pixelAspectRatioDenominator; - width *= pixelAspectRatio; - height /= pixelAspectRatio; + // Get the video PAR and original size. + if (!GST_IS_CAPS(caps) || !gst_caps_is_fixed(caps) + || !gst_video_format_parse_caps(caps, 0, &originalWidth, &originalHeight) + || !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator, + &pixelAspectRatioDenominator)) { gst_object_unref(GST_OBJECT(pad)); + return IntSize(); } + gst_object_unref(GST_OBJECT(pad)); + + LOG_VERBOSE(Media, "Original video size: %dx%d", originalWidth, originalHeight); + LOG_VERBOSE(Media, "Pixel aspect ratio: %d/%d", pixelAspectRatioNumerator, pixelAspectRatioDenominator); + + // Calculate DAR based on PAR and video size. + displayWidth = originalWidth * pixelAspectRatioNumerator; + displayHeight = originalHeight * pixelAspectRatioDenominator; + + // Divide display width and height by their GCD to avoid possible overflows. + displayAspectRatioGCD = greatestCommonDivisor(displayWidth, displayHeight); + displayWidth /= displayAspectRatioGCD; + displayHeight /= displayAspectRatioGCD; + + // Apply DAR to original video size. This is the same behavior as in xvimagesink's setcaps function. + if (!(originalHeight % displayHeight)) { + LOG_VERBOSE(Media, "Keeping video original height"); + width = gst_util_uint64_scale_int(originalHeight, displayWidth, displayHeight); + height = originalHeight; + } else if (!(originalWidth % displayWidth)) { + LOG_VERBOSE(Media, "Keeping video original width"); + height = gst_util_uint64_scale_int(originalWidth, displayHeight, displayWidth); + width = originalWidth; + } else { + LOG_VERBOSE(Media, "Approximating while keeping original video height"); + width = gst_util_uint64_scale_int(originalHeight, displayWidth, displayHeight); + height = originalHeight; + } + + LOG_VERBOSE(Media, "Natural size: %dx%d", width, height); return IntSize(width, height); } @@ -610,16 +677,79 @@ PassRefPtr<TimeRanges> MediaPlayerPrivate::buffered() const return timeRanges.release(); } +void MediaPlayerPrivate::processBufferingStats(GstMessage* message) +{ + GstBufferingMode mode; + + gst_message_parse_buffering_stats(message, &mode, 0, 0, 0); + if (mode != GST_BUFFERING_DOWNLOAD) + return; + + if (!m_startedBuffering) { + m_startedBuffering = true; + + if (m_fillTimeoutId > 0) + g_source_remove(m_fillTimeoutId); + + m_fillTimeoutId = g_timeout_add(200, (GSourceFunc) bufferingTimeoutCallback, this); + } +} + +bool MediaPlayerPrivate::queryBufferingStats() +{ + GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT); + + if (!gst_element_query(m_playBin, query)) { + gst_query_unref(query); + return TRUE; + } + + gint64 start, stop; + + gst_query_parse_buffering_range(query, 0, &start, &stop, 0); + gst_query_unref(query); + + if (stop != -1) + m_fillStatus = 100.0 * stop / GST_FORMAT_PERCENT_MAX; + else + m_fillStatus = 100.0; + + LOG_VERBOSE(Media, "Download buffer filled up to %f%%", m_fillStatus); + + if (!m_mediaDuration) + durationChanged(); + + // Update maxTimeLoaded only if the media duration is + // available. Otherwise we can't compute it. + if (m_mediaDuration) { + m_maxTimeLoaded = static_cast<float>((m_fillStatus * m_mediaDuration) / 100.0); + LOG_VERBOSE(Media, "Updated maxTimeLoaded: %f", m_maxTimeLoaded); + } + + if (m_fillStatus != 100.0) { + updateStates(); + return TRUE; + } + + // Media is now fully loaded. It will play even if network + // connection is cut. Buffering is done, remove the fill source + // from the main loop. + m_fillTimeoutId = 0; + m_startedBuffering = false; + updateStates(); + return FALSE; +} + float MediaPlayerPrivate::maxTimeSeekable() const { if (m_errorOccured) return 0.0; - // TODO LOG_VERBOSE(Media, "maxTimeSeekable"); - if (m_isStreaming) - return numeric_limits<float>::infinity(); // infinite duration means live stream + if (isinf(duration())) + return 0.0; + return maxTimeLoaded(); } @@ -628,29 +758,28 @@ float MediaPlayerPrivate::maxTimeLoaded() const if (m_errorOccured) return 0.0; - // TODO - LOG_VERBOSE(Media, "maxTimeLoaded"); - notImplemented(); - return duration(); + float loaded = m_maxTimeLoaded; + if (!loaded && !m_fillTimeoutId) + loaded = duration(); + LOG_VERBOSE(Media, "maxTimeLoaded: %f", loaded); + return loaded; } unsigned MediaPlayerPrivate::bytesLoaded() const { - notImplemented(); - LOG_VERBOSE(Media, "bytesLoaded"); - /*if (!m_playBin) + if (!m_playBin) return 0; - float dur = duration(); - float maxTime = maxTimeLoaded(); - if (!dur) - return 0;*/ - return 1; // totalBytes() * maxTime / dur; + if (!m_mediaDuration) + return 0; + + unsigned loaded = totalBytes() * maxTimeLoaded() / m_mediaDuration; + LOG_VERBOSE(Media, "bytesLoaded: %d", loaded); + return loaded; } unsigned MediaPlayerPrivate::totalBytes() const { - LOG_VERBOSE(Media, "totalBytes"); if (!m_source) return 0; @@ -660,6 +789,7 @@ unsigned MediaPlayerPrivate::totalBytes() const GstFormat fmt = GST_FORMAT_BYTES; gint64 length = 0; gst_element_query_duration(m_source, &fmt, &length); + LOG_VERBOSE(Media, "totalBytes %" G_GINT64_FORMAT, length); return length; } @@ -710,6 +840,7 @@ void MediaPlayerPrivate::updateStates() if (state == GST_STATE_PLAYING) { m_readyState = MediaPlayer::HaveEnoughData; m_paused = false; + m_startedPlaying = true; if (!m_mediaDuration) { float newDuration = duration(); if (!isinf(newDuration)) @@ -718,6 +849,28 @@ void MediaPlayerPrivate::updateStates() } else m_paused = true; + // Is on-disk buffering in progress? + if (m_fillTimeoutId) { + m_networkState = MediaPlayer::Loading; + // Buffering has just started, we should now have enough + // data to restart playback if it was internally paused by + // GStreamer. + if (m_paused && !m_startedPlaying) + gst_element_set_state(m_playBin, GST_STATE_PLAYING); + } + + if (maxTimeLoaded() == duration()) { + m_networkState = MediaPlayer::Loaded; + if (state == GST_STATE_READY) + m_readyState = MediaPlayer::HaveNothing; + else if (state == GST_STATE_PAUSED) + m_readyState = MediaPlayer::HaveEnoughData; + } else + if (state == GST_STATE_READY) + m_readyState = MediaPlayer::HaveNothing; + else if (m_paused) + m_readyState = currentTime() < maxTimeLoaded() ? MediaPlayer::HaveFutureData : MediaPlayer::HaveCurrentData; + if (m_changingRate) { m_player->rateChanged(); m_changingRate = false; @@ -728,14 +881,24 @@ void MediaPlayerPrivate::updateStates() m_seeking = false; } - m_networkState = MediaPlayer::Loaded; break; case GST_STATE_CHANGE_ASYNC: LOG_VERBOSE(Media, "Async: State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending)); // Change in progress - return; + + if (!m_isStreaming) + return; + + // Resume playback if a seek was performed in a live pipeline. + if (m_seeking) { + shouldUpdateAfterSeek = true; + m_seeking = false; + if (m_paused) + gst_element_set_state(m_playBin, GST_STATE_PLAYING); + } + break; case GST_STATE_CHANGE_FAILURE: LOG_VERBOSE(Media, "Failure: State: %s, pending: %s", gst_element_state_get_name(state), @@ -749,8 +912,25 @@ void MediaPlayerPrivate::updateStates() if (state == GST_STATE_READY) m_readyState = MediaPlayer::HaveNothing; - else if (state == GST_STATE_PAUSED) - m_readyState = MediaPlayer::HaveCurrentData; + else if (state == GST_STATE_PAUSED) { + m_readyState = MediaPlayer::HaveEnoughData; + m_paused = true; + // Live pipelines go in PAUSED without prerolling. + m_isStreaming = true; + } else if (state == GST_STATE_PLAYING) { + m_startedPlaying = true; + m_paused = false; + } + + if (m_paused && !m_startedPlaying) + gst_element_set_state(m_playBin, GST_STATE_PLAYING); + + if (m_seeking) { + shouldUpdateAfterSeek = true; + m_seeking = false; + if (m_paused) + gst_element_set_state(m_playBin, GST_STATE_PLAYING); + } m_networkState = MediaPlayer::Loading; break; @@ -898,8 +1078,11 @@ void MediaPlayerPrivate::didEnd() // not always 0. So to not confuse the HTMLMediaElement we // synchronize position and duration values. float now = currentTime(); - if (now > 0) + if (now > 0) { m_mediaDuration = now; + m_player->durationChanged(); + } + gst_element_set_state(m_playBin, GST_STATE_PAUSED); timeChanged(); @@ -1150,7 +1333,19 @@ bool MediaPlayerPrivate::supportsFullscreen() const return true; } -void MediaPlayerPrivate::createGSTPlayBin(String url) +void MediaPlayerPrivate::setAutobuffer(bool autoBuffer) +{ + ASSERT(m_playBin); + + GstPlayFlags flags; + g_object_get(m_playBin, "flags", &flags, NULL); + if (autoBuffer) + g_object_set(m_playBin, "flags", flags | GST_PLAY_FLAG_DOWNLOAD, NULL); + else + g_object_set(m_playBin, "flags", flags & ~GST_PLAY_FLAG_DOWNLOAD, NULL); +} + +void MediaPlayerPrivate::createGSTPlayBin() { ASSERT(!m_playBin); m_playBin = gst_element_factory_make("playbin2", "play"); @@ -1160,8 +1355,6 @@ void MediaPlayerPrivate::createGSTPlayBin(String url) g_signal_connect(bus, "message", G_CALLBACK(mediaPlayerPrivateMessageCallback), this); gst_object_unref(bus); - g_object_set(m_playBin, "uri", url.utf8().data(), NULL); - g_signal_connect(m_playBin, "notify::volume", G_CALLBACK(mediaPlayerPrivateVolumeChangedCallback), this); g_signal_connect(m_playBin, "notify::source", G_CALLBACK(mediaPlayerPrivateSourceChangedCallback), this); g_signal_connect(m_playBin, "notify::mute", G_CALLBACK(mediaPlayerPrivateMuteChangedCallback), this); @@ -1180,7 +1373,7 @@ void MediaPlayerPrivate::createGSTPlayBin(String url) } else { m_fpsSink = 0; g_object_set(m_playBin, "video-sink", m_videoSink, NULL); - LOG(Media, "Can't display FPS statistics, you need gst-plugins-bad >= 0.10.18"); + LOG_VERBOSE(Media, "Can't display FPS statistics, you need gst-plugins-bad >= 0.10.18"); } } else g_object_set(m_playBin, "video-sink", m_videoSink, NULL); diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h index 34257ca..e19b686 100644 --- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h +++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h @@ -2,6 +2,7 @@ * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. * Copyright (C) 2007 Collabora Ltd. All rights reserved. * Copyright (C) 2007 Alp Toker <alp@atoker.com> + * Copyright (C) 2009, 2010 Igalia S.L * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -86,6 +87,9 @@ class MediaPlayerPrivate : public MediaPlayerPrivateInterface { void muteChanged(); void muteChangedCallback(); + void setAutobuffer(bool); + bool queryBufferingStats(); + MediaPlayer::NetworkState networkState() const; MediaPlayer::ReadyState readyState() const; @@ -128,9 +132,11 @@ class MediaPlayerPrivate : public MediaPlayerPrivateInterface { float maxTimeLoaded() const; void startEndPointTimerIfNeeded(); - void createGSTPlayBin(String url); + void createGSTPlayBin(); bool changePipelineState(GstState state); + void processBufferingStats(GstMessage* message); + private: MediaPlayer* m_player; GstElement* m_playBin; @@ -157,6 +163,10 @@ class MediaPlayerPrivate : public MediaPlayerPrivateInterface { guint m_volumeIdleId; gfloat m_mediaDuration; guint m_muteIdleId; + bool m_startedBuffering; + guint m_fillTimeoutId; + float m_maxTimeLoaded; + gdouble m_fillStatus; }; } diff --git a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp index 390c0ec..74a7852 100644 --- a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp +++ b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk> + * Copyright (C) 2009, 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -79,6 +79,10 @@ struct _WebKitWebSrcPrivate { gchar* iradioGenre; gchar* iradioUrl; gchar* iradioTitle; + + // TRUE if appsrc's version is >= 0.10.27, see + // https://bugzilla.gnome.org/show_bug.cgi?id=609423 + gboolean haveAppSrc27; }; enum { @@ -109,7 +113,7 @@ static void webKitWebSrcNeedDataCb(GstAppSrc* appsrc, guint length, gpointer use static void webKitWebSrcEnoughDataCb(GstAppSrc* appsrc, gpointer userData); static gboolean webKitWebSrcSeekDataCb(GstAppSrc* appsrc, guint64 offset, gpointer userData); -static void webKitWebSrcStop(WebKitWebSrc* src, bool resetRequestedOffset); +static void webKitWebSrcStop(WebKitWebSrc* src, bool seeking); static GstAppSrcCallbacks appsrcCallbacks = { webKitWebSrcNeedDataCb, @@ -222,6 +226,9 @@ static void webkit_web_src_init(WebKitWebSrc* src, return; } + GstElementFactory* factory = GST_ELEMENT_FACTORY(GST_ELEMENT_GET_CLASS(priv->appsrc)->elementfactory); + priv->haveAppSrc27 = gst_plugin_feature_check_version(GST_PLUGIN_FEATURE(factory), 0, 10, 27); + gst_bin_add(GST_BIN(src), GST_ELEMENT(priv->appsrc)); targetpad = gst_element_get_static_pad(GST_ELEMENT(priv->appsrc), "src"); @@ -238,7 +245,20 @@ static void webkit_web_src_init(WebKitWebSrc* src, // GStreamer to handle. gst_app_src_set_max_bytes(priv->appsrc, 512 * 1024); - webKitWebSrcStop(src, true); + // Emit the need-data signal if the queue contains less + // than 20% of data. Without this the need-data signal + // is emitted when the queue is empty, we then dispatch + // the soup message unpausing to the main loop and from + // there unpause the soup message. This already takes + // quite some time and libsoup even needs some more time + // to actually provide data again. If we do all this + // already if the queue is 20% empty, it's much more + // likely that libsoup already provides new data before + // the queue is really empty. + if (priv->haveAppSrc27) + g_object_set(priv->appsrc, "min-percent", 20, NULL); + + webKitWebSrcStop(src, false); } static void webKitWebSrcFinalize(GObject* object) @@ -296,7 +316,7 @@ static void webKitWebSrcGetProperty(GObject* object, guint propID, GValue* value } -static void webKitWebSrcStop(WebKitWebSrc* src, bool resetRequestedOffset) +static void webKitWebSrcStop(WebKitWebSrc* src, bool seeking) { WebKitWebSrcPrivate* priv = src->priv; @@ -335,15 +355,19 @@ static void webKitWebSrcStop(WebKitWebSrc* src, bool resetRequestedOffset) g_free(priv->iradioTitle); priv->iradioTitle = 0; - if (priv->appsrc) + if (priv->appsrc) { gst_app_src_set_caps(priv->appsrc, 0); + if (!seeking) + gst_app_src_set_size(priv->appsrc, -1); + } priv->offset = 0; - priv->size = 0; priv->seekable = FALSE; - if (resetRequestedOffset) + if (!seeking) { + priv->size = 0; priv->requestedOffset = 0; + } GST_DEBUG_OBJECT(src, "Stopped request"); } @@ -434,7 +458,7 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat break; case GST_STATE_CHANGE_PAUSED_TO_READY: GST_DEBUG_OBJECT(src, "PAUSED->READY"); - webKitWebSrcStop(src, true); + webKitWebSrcStop(src, false); break; default: break; @@ -558,7 +582,7 @@ static void webKitWebSrcEnoughDataCb(GstAppSrc* appsrc, gpointer userData) static gboolean webKitWebSrcSeekMainCb(WebKitWebSrc* src) { - webKitWebSrcStop(src, false); + webKitWebSrcStop(src, true); webKitWebSrcStart(src); return FALSE; @@ -617,7 +641,8 @@ void StreamingClient::didReceiveResponse(ResourceHandle*, const ResourceResponse // If we seeked we need 206 == PARTIAL_CONTENT if (priv->requestedOffset && response.httpStatusCode() != 206) { GST_ELEMENT_ERROR(m_src, RESOURCE, READ, (0), (0)); - webKitWebSrcStop(m_src, true); + gst_app_src_end_of_stream(priv->appsrc); + webKitWebSrcStop(m_src, false); return; } @@ -625,6 +650,12 @@ void StreamingClient::didReceiveResponse(ResourceHandle*, const ResourceResponse if (length > 0) { length += priv->requestedOffset; gst_app_src_set_size(priv->appsrc, length); + if (!priv->haveAppSrc27) { + gst_segment_set_duration(&GST_BASE_SRC(priv->appsrc)->segment, GST_FORMAT_BYTES, length); + gst_element_post_message(GST_ELEMENT(priv->appsrc), + gst_message_new_duration(GST_OBJECT(priv->appsrc), + GST_FORMAT_BYTES, length)); + } } priv->size = length >= 0 ? length : 0; diff --git a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h index 045e7d7..ae19640 100644 --- a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h +++ b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk> + * Copyright (C) 2009,2010 Sebastian Dröge <sebastian.droege@collabora.co.uk> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp index 99ad130..096cdbd 100644 --- a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp +++ b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp @@ -1126,31 +1126,6 @@ long GraphicsContext3D::getVertexAttribOffset(unsigned long index, unsigned long return reinterpret_cast<long>(pointer); } -// Returned pointer must be freed by fastFree() -static bool imageToTexture(Image* image, GLubyte*& buffer, size_t& width, size_t& height) -{ - if (!image) - return false; - - CGImageRef textureImage = image->getCGImageRef(); - if (!textureImage) - return false; - - width = CGImageGetWidth(textureImage); - height = CGImageGetHeight(textureImage); - - buffer = (GLubyte*) fastMalloc(width * height * 4); - if (!buffer) - return false; - - CGContextRef textureContext = CGBitmapContextCreate(buffer, width, height, 8, width * 4, - CGImageGetColorSpace(textureImage), kCGImageAlphaPremultipliedLast); - CGContextSetBlendMode(textureContext, kCGBlendModeCopy); - CGContextDrawImage(textureContext, CGRectMake(0, 0, (CGFloat)width, (CGFloat)height), textureImage); - CGContextRelease(textureContext); - return true; -} - int GraphicsContext3D::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels) { // FIXME: Need to do bounds checking on the buffer here. @@ -1160,20 +1135,12 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned level, unsigned inte int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image, bool flipY, bool premultiplyAlpha) { - // FIXME: need to support flipY and premultiplyAlpha - UNUSED_PARAM(flipY); - UNUSED_PARAM(premultiplyAlpha); - ASSERT(image); - ensureContext(m_contextObj); - GLubyte* buffer; - size_t width; - size_t height; - if (!imageToTexture(image, buffer, width, height)) + Vector<uint8_t> imageData; + unsigned int format, internalFormat; + if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat)) return -1; - - ::glTexImage2D(target, level, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer); - fastFree(buffer); + ::glTexImage2D(target, level, internalFormat, image->width(), image->height(), 0, format, GL_UNSIGNED_BYTE, imageData.data()); return 0; } @@ -1188,20 +1155,12 @@ int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned x int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoff, unsigned yoff, Image* image, bool flipY, bool premultiplyAlpha) { // FIXME: we will need to deal with PixelStore params when dealing with image buffers that differ from the subimage size - // FIXME: need to support flipY and premultiplyAlpha - UNUSED_PARAM(flipY); - UNUSED_PARAM(premultiplyAlpha); - ASSERT(image); - ensureContext(m_contextObj); - GLubyte* buffer; - size_t width; - size_t height; - if (!imageToTexture(image, buffer, width, height)) + Vector<uint8_t> imageData; + unsigned int format, internalFormat; + if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat)) return -1; - - ::glTexSubImage2D(target, level, xoff, yoff, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); - fastFree(buffer); + ::glTexSubImage2D(target, level, xoff, yoff, image->width(), image->height(), format, GL_UNSIGNED_BYTE, imageData.data()); return 0; } diff --git a/WebCore/platform/graphics/mac/IconMac.mm b/WebCore/platform/graphics/mac/IconMac.mm index aee7234..bc8c312 100644 --- a/WebCore/platform/graphics/mac/IconMac.mm +++ b/WebCore/platform/graphics/mac/IconMac.mm @@ -39,6 +39,7 @@ Icon::~Icon() { } +// FIXME: Move the code to ChromeClient::iconForFiles(). PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) { if (filenames.isEmpty()) diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h index e9f64be..355aa68 100644 --- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h +++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h @@ -78,6 +78,9 @@ private: static bool isAvailable(); PlatformMedia platformMedia() const; +#if USE(ACCELERATED_COMPOSITING) + PlatformLayer* platformLayer() const; +#endif IntSize naturalSize() const; bool hasVideo() const; diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm index dd87bb5..2b90f7a 100644 --- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm +++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm @@ -445,12 +445,7 @@ void MediaPlayerPrivate::createQTMovieLayer() #ifndef NDEBUG [(CALayer *)m_qtVideoLayer.get() setName:@"Video layer"]; #endif - - // Hang the video layer from the render layer, if we have one yet. If not, we'll do this - // later via acceleratedRenderingStateChanged(). - GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player); - if (videoGraphicsLayer) - videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer.get()); + // The layer will get hooked up via RenderLayerBacking::updateGraphicsLayerConfiguration(). } #endif } @@ -522,6 +517,11 @@ void MediaPlayerPrivate::setUpVideoRendering() createQTMovieLayer(); break; } + +#if USE(ACCELERATED_COMPOSITING) + if (currentMode == MediaRenderingMovieLayer || preferredMode == MediaRenderingMovieLayer) + m_player->mediaPlayerClient()->mediaPlayerRenderingModeChanged(m_player); +#endif } void MediaPlayerPrivate::tearDownVideoRendering() @@ -576,6 +576,13 @@ PlatformMedia MediaPlayerPrivate::platformMedia() const return plaftformMedia; } +#if USE(ACCELERATED_COMPOSITING) +PlatformLayer* MediaPlayerPrivate::platformLayer() const +{ + return m_qtVideoLayer.get(); +} +#endif + void MediaPlayerPrivate::play() { if (!metaDataAvailable()) @@ -1406,12 +1413,6 @@ void MediaPlayerPrivate::acceleratedRenderingStateChanged() { // Set up or change the rendering path if necessary. setUpVideoRendering(); - - if (currentRenderingMode() == MediaRenderingMovieLayer) { - GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player); - if (videoGraphicsLayer) - videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer.get()); - } } #endif diff --git a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm index ef7c58f..09947d8 100644 --- a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm +++ b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm @@ -273,37 +273,54 @@ void SimpleFontData::platformInit() } else m_xHeight = [m_platformData.font() xHeight]; } + +static CFDataRef copyFontTableForTag(FontPlatformData platformData, FourCharCode tableName) +{ +#ifdef BUILDING_ON_TIGER + ATSFontRef atsFont = FMGetATSFontRefFromFont(platformData.m_atsuFontID); + + ByteCount tableSize; + if (ATSFontGetTable(atsFont, tableName, 0, 0, NULL, &tableSize) != noErr) + return 0; + + CFMutableDataRef data = CFDataCreateMutable(kCFAllocatorDefault, tableSize); + if (!data) + return 0; + + CFDataIncreaseLength(data, tableSize); + if (ATSFontGetTable(atsFont, tableName, 0, tableSize, CFDataGetMutableBytePtr(data), &tableSize) != noErr) { + CFRelease(data); + return 0; + } + + return data; +#else + return CGFontCopyTableForTag(platformData.cgFont(), tableName); +#endif +} void SimpleFontData::platformCharWidthInit() { - m_avgCharWidth = 0.f; - - // Calculate avgCharWidth according to http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6OS2.html - // We can try grabbing it out of the OS/2 table or via ATSFontGetHorizontalMetrics, but - // ATSFontGetHorizontalMetrics never seems to return a non-zero value and the OS/2 table - // contains zero for a large number of fonts. - GlyphPage* glyphPageZero = GlyphPageTreeNode::getRootChild(this, 0)->page(); - if (glyphPageZero) { - static int weights[] = { 64, 14, 27, 35, 100, 20, 14, 42, 63, 3, 6, 35, 20, 56, 56, 17, 4, 49, 56, 71, 31, 10, 18, 3, 18, 2, 166 }; - int numGlyphs = 27; - ASSERT(numGlyphs == sizeof(weights) / sizeof(int)); - // Compute the weighted sum of the space character and the lowercase letters in the Latin alphabet. - float sum = 0.f; - int totalWeight = 0; - for (int i = 0; i < numGlyphs; i++) { - Glyph glyph = glyphPageZero->glyphDataForCharacter((i < 26 ? i + 'a' : ' ')).glyph; - if (glyph) { - totalWeight += weights[i]; - sum += widthForGlyph(glyph) * weights[i]; - } - } - if (sum > 0.f && totalWeight > 0) - m_avgCharWidth = sum / totalWeight; + m_avgCharWidth = 0; + m_maxCharWidth = 0; + + RetainPtr<CFDataRef> os2Table(AdoptCF, copyFontTableForTag(m_platformData, 'OS/2')); + if (os2Table && CFDataGetLength(os2Table.get()) >= 4) { + const UInt8* os2 = CFDataGetBytePtr(os2Table.get()); + SInt16 os2AvgCharWidth = os2[2] * 256 + os2[3]; + m_avgCharWidth = scaleEmToUnits(os2AvgCharWidth, m_unitsPerEm) * m_platformData.m_size; } - m_maxCharWidth = 0.f; - if (m_platformData.font()) - m_maxCharWidth = [m_platformData.font() maximumAdvancement].width; + RetainPtr<CFDataRef> headTable(AdoptCF, copyFontTableForTag(m_platformData, 'head')); + if (headTable && CFDataGetLength(headTable.get()) >= 42) { + const UInt8* head = CFDataGetBytePtr(headTable.get()); + ushort uxMin = head[36] * 256 + head[37]; + ushort uxMax = head[40] * 256 + head[41]; + SInt16 xMin = static_cast<SInt16>(uxMin); + SInt16 xMax = static_cast<SInt16>(uxMax); + float diff = static_cast<float>(xMax - xMin); + m_maxCharWidth = scaleEmToUnits(diff, m_unitsPerEm) * m_platformData.m_size; + } // Fallback to a cross-platform estimate, which will populate these values if they are non-positive. initCharWidths(); diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index 105d866..8bcda2e 100644 --- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -219,6 +219,7 @@ public: QStack<TransparencyLayer*> layers; QPainter* redirect; + // reuse this brush for solid color (to prevent expensive QBrush construction) QBrush solidColor; InterpolationQuality imageInterpolationQuality; @@ -760,11 +761,30 @@ void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&, int, b FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& frect) { - QRectF rect(frect); - rect = m_data->p()->deviceMatrix().mapRect(rect); + // It is not enough just to round to pixels in device space. The rotation part of the + // affine transform matrix to device space can mess with this conversion if we have a + // rotating image like the hands of the world clock widget. We just need the scale, so + // we get the affine transform matrix and extract the scale. + QPainter* painter = platformContext(); + QTransform deviceTransform = painter->deviceTransform(); + if (deviceTransform.isIdentity()) + return frect; - QRect result = rect.toRect(); //round it - return FloatRect(QRectF(result)); + qreal deviceScaleX = sqrtf(deviceTransform.m11() * deviceTransform.m11() + deviceTransform.m12() * deviceTransform.m12()); + qreal deviceScaleY = sqrtf(deviceTransform.m21() * deviceTransform.m21() + deviceTransform.m22() * deviceTransform.m22()); + + QPoint deviceOrigin(frect.x() * deviceScaleX, frect.y() * deviceScaleY); + QPoint deviceLowerRight(frect.right() * deviceScaleX, frect.bottom() * deviceScaleY); + + // Don't let the height or width round to 0 unless either was originally 0 + if (deviceOrigin.y() == deviceLowerRight.y() && frect.height()) + deviceLowerRight.setY(deviceLowerRight.y() + 1); + if (deviceOrigin.x() == deviceLowerRight.x() && frect.width()) + deviceLowerRight.setX(deviceLowerRight.x() + 1); + + FloatPoint roundedOrigin = FloatPoint(deviceOrigin.x() / deviceScaleX, deviceOrigin.y() / deviceScaleY); + FloatPoint roundedLowerRight = FloatPoint(deviceLowerRight.x() / deviceScaleX, deviceLowerRight.y() / deviceScaleY); + return FloatRect(roundedOrigin, roundedLowerRight - roundedOrigin); } void GraphicsContext::setPlatformShadow(const IntSize& size, int, const Color&, ColorSpace) @@ -1112,7 +1132,8 @@ void GraphicsContext::setPlatformStrokeColor(const Color& color, ColorSpace colo return; QPainter* p = m_data->p(); QPen newPen(p->pen()); - newPen.setColor(color); + m_data->solidColor.setColor(color); + newPen.setBrush(m_data->solidColor); p->setPen(newPen); } diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp index 11f7384..0fd0f1a 100644 --- a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp +++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp @@ -136,7 +136,9 @@ public: virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*); // we manage transforms ourselves because transform-origin acts differently in webkit and in Qt - void setBaseTransform(const QTransform&); + void setBaseTransform(const TransformationMatrix&); + QTransform computeTransform(const TransformationMatrix& baseTransform) const; + void updateTransform(); // let the compositor-API tell us which properties were changed void notifyChange(ChangeMask); @@ -145,7 +147,7 @@ public: // this is called indirectly from ChromeClientQt::setNeedsOneShotDrawingSynchronization // (meaning the sync would happen together with the next draw) // or ChromeClientQt::scheduleCompositingLayerSync (meaning the sync will happen ASAP) - void flushChanges(bool recursive = true); + void flushChanges(bool recursive = true, bool forceTransformUpdate = false); // optimization: when we have an animation running on an element with no contents, that has child-elements with contents, // ALL of them have to have ItemCoordinateCache and not DeviceCoordinateCache @@ -166,7 +168,7 @@ signals: public: GraphicsLayerQt* m_layer; - QTransform m_baseTransform; + TransformationMatrix m_baseTransform; bool m_transformAnimationRunning; bool m_opacityAnimationRunning; QWeakPointer<MaskEffectQt> m_maskEffect; @@ -237,7 +239,10 @@ GraphicsLayerQtImpl::GraphicsLayerQtImpl(GraphicsLayerQt* newLayer) { // we use graphics-view for compositing, not for interactivity setAcceptedMouseButtons(Qt::NoButton); - setEnabled(false); + // we need to have the item enabled, or else wheel events are not + // passed to the parent class implementation of wheelEvent, where + // they are ignored and passed to the item below. + setEnabled(true); // we'll set the cache when we know what's going on setCacheMode(NoCache); @@ -280,18 +285,54 @@ void GraphicsLayerQtImpl::adjustCachingRecursively(bool animationIsRunning) } } -void GraphicsLayerQtImpl::setBaseTransform(const QTransform& transform) +void GraphicsLayerQtImpl::updateTransform() +{ + setBaseTransform(isTransformAnimationRunning() ? m_baseTransform : m_layer->transform()); +} + +void GraphicsLayerQtImpl::setBaseTransform(const TransformationMatrix& baseTransform) +{ + m_baseTransform = baseTransform; + setTransform(computeTransform(baseTransform)); +} + +QTransform GraphicsLayerQtImpl::computeTransform(const TransformationMatrix& baseTransform) const { if (!m_layer) - return; + return baseTransform; + + TransformationMatrix computedTransform; + + // The origin for childrenTransform is always the center of the ancestor which contains the childrenTransform. + // this has to do with how WebCore implements -webkit-perspective and -webkit-perspective-origin, which are the CSS + // attribute that call setChildrenTransform + QPointF offset = -pos() - boundingRect().bottomRight() / 2; + const GraphicsLayerQtImpl* ancestor = this; + while ((ancestor = qobject_cast<GraphicsLayerQtImpl*>(ancestor->parentObject()))) { + if (!ancestor->m_state.childrenTransform.isIdentity()) { + offset += ancestor->boundingRect().bottomRight() / 2; + computedTransform + .translate(offset.x(), offset.y()) + .multLeft(ancestor->m_state.childrenTransform) + .translate(-offset.x(), -offset.y()); + break; + } + offset -= ancestor->pos(); + } + + computedTransform.multLeft(baseTransform); + // webkit has relative-to-size originPoint, graphics-view has a pixel originPoint, here we convert // we have to manage this ourselves because QGraphicsView's transformOrigin is incompatible - const qreal x = m_layer->anchorPoint().x() * m_layer->size().width(); - const qreal y = m_layer->anchorPoint().y() * m_layer->size().height(); - setTransform(QTransform::fromTranslate(x, y)); - setTransform(transform, true); - translate(-x, -y); - m_baseTransform = transform; + const qreal originX = m_state.anchorPoint.x() * m_size.width(); + const qreal originY = m_state.anchorPoint.y() * m_size.height(); + computedTransform = TransformationMatrix() + .translate(originX, originY) + .multiply(computedTransform) + .translate(-originX, -originY); + + // now we project to 2D + return QTransform(computedTransform); } bool GraphicsLayerQtImpl::isTransformAnimationRunning() const @@ -357,7 +398,7 @@ void GraphicsLayerQtImpl::notifyChange(ChangeMask changeMask) m_layer->client()->notifySyncRequired(m_layer); } -void GraphicsLayerQtImpl::flushChanges(bool recursive) +void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform) { // this is the bulk of the work. understanding what the compositor is trying to achieve, // what graphics-view can do, and trying to find a sane common-grounds @@ -425,12 +466,15 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive) } } - if (m_changeMask & (TransformChange | AnchorPointChange | SizeChange)) { - // since we convert a percentage-based origin-point to a pixel-based one, - // the anchor-point, transform and size from WebCore all affect the one - // that we give Qt - if (m_state.transform != m_layer->transform() || m_state.anchorPoint != m_layer->anchorPoint() || m_state.size != m_layer->size()) - setBaseTransform(m_layer->transform()); + // FIXME: this is a hack, due to a probable QGraphicsScene bug when rapidly modifying the perspective + // but without this line we get graphic artifacts + if ((m_changeMask & ChildrenTransformChange) && m_state.childrenTransform != m_layer->childrenTransform()) + scene()->update(); + + if (m_changeMask & (ChildrenTransformChange | Preserves3DChange | TransformChange | AnchorPointChange | SizeChange)) { + // due to the differences between the way WebCore handles transforms and the way Qt handles transforms, + // all these elements affect the transforms of all the descendants. + forceUpdateTransform = true; } if (m_changeMask & (ContentChange | DrawsContentChange | MaskLayerChange)) { @@ -439,8 +483,6 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive) update(); setFlag(ItemHasNoContents, false); - // we only use ItemUsesExtendedStyleOption for HTML content - pixmap can be handled better with regular clipping - setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, false); break; case ColorContentType: @@ -524,6 +566,7 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive) m_state.drawsContent = m_layer->drawsContent(); m_state.contentsOpaque = m_layer->contentsOpaque(); m_state.backfaceVisibility = m_layer->backfaceVisibility(); + m_state.childrenTransform = m_layer->childrenTransform(); m_currentContent.pixmap = m_pendingContent.pixmap; m_currentContent.contentType = m_pendingContent.contentType; m_currentContent.backgroundColor = m_pendingContent.backgroundColor; @@ -534,6 +577,9 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive) afterLayerChanges: + if (forceUpdateTransform) + updateTransform(); + if (!recursive) return; @@ -544,7 +590,7 @@ afterLayerChanges: for (QList<QGraphicsItem*>::const_iterator it = children.begin(); it != children.end(); ++it) { if (QGraphicsItem* item = *it) if (GraphicsLayerQtImpl* layer = qobject_cast<GraphicsLayerQtImpl*>(item->toGraphicsObject())) - layer->flushChanges(true); + layer->flushChanges(true, forceUpdateTransform); } } @@ -1013,7 +1059,7 @@ public: // this came up during the compositing/animation LayoutTests // when the animation dies, the transform has to go back to default if (m_layer) - m_layer.data()->setBaseTransform(m_layer.data()->m_layer->transform()); + m_layer.data()->updateTransform(); } // the idea is that we let WebCore manage the transform-operations diff --git a/WebCore/platform/graphics/qt/IconQt.cpp b/WebCore/platform/graphics/qt/IconQt.cpp index a9870fc..eb09eda 100644 --- a/WebCore/platform/graphics/qt/IconQt.cpp +++ b/WebCore/platform/graphics/qt/IconQt.cpp @@ -40,6 +40,7 @@ Icon::~Icon() { } +// FIXME: Move the code to ChromeClient::iconForFiles(). PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) { if (filenames.isEmpty()) diff --git a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp index 234f78b..18e7f08 100644 --- a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp +++ b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp @@ -102,7 +102,7 @@ size_t ImageDecoderQt::frameCount() // Fixup for Qt decoders... imageCount() is wrong // and jumpToNextImage does not work either... so // we will have to parse everything... - if (imageCount == 0) + if (!imageCount) forceLoadEverything(); else m_frameBufferCache.resize(imageCount); @@ -132,13 +132,13 @@ RGBA32Buffer* ImageDecoderQt::frameBufferAtIndex(size_t index) // In case the ImageDecoderQt got recreated we don't know // yet how many images we are going to have and need to // find that out now. - int count = m_frameBufferCache.size(); - if (!m_failed && count == 0) { + size_t count = m_frameBufferCache.size(); + if (!m_failed && !count) { internalDecodeSize(); count = frameCount(); } - if (index >= static_cast<size_t>(count)) + if (index >= count) return 0; RGBA32Buffer& frame = m_frameBufferCache[index]; @@ -215,7 +215,7 @@ void ImageDecoderQt::forceLoadEverything() do { m_frameBufferCache.resize(++imageCount); internalHandleCurrentImage(imageCount - 1); - } while(!m_failed); + } while (!m_failed); // If we failed decoding the first image we actually // have no images and need to keep m_failed set to diff --git a/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp new file mode 100644 index 0000000..cd86e6d --- /dev/null +++ b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(3D_CANVAS) + +#include "GraphicsContext3D.h" + +#include "Image.h" +#include "NativeImageSkia.h" + +namespace WebCore { + +bool GraphicsContext3D::getImageData(Image* image, + Vector<uint8_t>& outputVector, + bool premultiplyAlpha, + bool* hasAlphaChannel, + AlphaOp* neededAlphaOp, + unsigned int* format) +{ + if (!image) + return false; + NativeImageSkia* skiaImage = image->nativeImageForCurrentFrame(); + if (!skiaImage) + return false; + SkBitmap::Config skiaConfig = skiaImage->config(); + // FIXME: must support more image configurations. + if (skiaConfig != SkBitmap::kARGB_8888_Config) + return false; + SkBitmap& skiaImageRef = *skiaImage; + SkAutoLockPixels lock(skiaImageRef); + int width = skiaImage->width(); + int height = skiaImage->height(); + int rowBytes = skiaImage->rowBytes(); + ASSERT(rowBytes == width * 4); + uint8_t* pixels = reinterpret_cast<uint8_t*>(skiaImage->getPixels()); + outputVector.resize(rowBytes * height); + memcpy(outputVector.data(), pixels, rowBytes * height); + *hasAlphaChannel = true; + if (!premultiplyAlpha) + // FIXME: must fetch the image data before the premultiplication step + *neededAlphaOp = kAlphaDoUnmultiply; + // FIXME: remove this dependency on desktop OpenGL + *format = 0x80E1; // GL_BGRA + return true; +} + +} // namespace WebCore + +#endif // ENABLE(3D_CANVAS) diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp index 92a1870..e0f6f5d 100644 --- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp +++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp @@ -344,15 +344,6 @@ void PlatformContextSkia::setupPaintForFilling(SkPaint* paint) const paint->setShader(m_state->m_fillShader); } -static SkScalar scalarBound(SkScalar v, SkScalar min, SkScalar max) -{ - if (v < min) - return min; - if (v > max) - return max; - return v; -} - float PlatformContextSkia::setupPaintForStroking(SkPaint* paint, SkRect* rect, int length) const { setupPaintCommon(paint); @@ -361,13 +352,10 @@ float PlatformContextSkia::setupPaintForStroking(SkPaint* paint, SkRect* rect, i paint->setColor(m_state->applyAlpha(m_state->m_strokeColor)); paint->setShader(m_state->m_strokeShader); paint->setStyle(SkPaint::kStroke_Style); - // The limits here (512 and 256) were made up but are hopefully large - // enough to be reasonable. They are, empirically, small enough not to - // cause overflows in Skia. - paint->setStrokeWidth(scalarBound(SkFloatToScalar(width), 0, 512)); + paint->setStrokeWidth(SkFloatToScalar(width)); paint->setStrokeCap(m_state->m_lineCap); paint->setStrokeJoin(m_state->m_lineJoin); - paint->setStrokeMiter(scalarBound(SkFloatToScalar(m_state->m_miterLimit), 0, 256)); + paint->setStrokeMiter(SkFloatToScalar(m_state->m_miterLimit)); if (m_state->m_dash) paint->setPathEffect(m_state->m_dash); diff --git a/WebCore/platform/graphics/win/IconWin.cpp b/WebCore/platform/graphics/win/IconWin.cpp index 56b46de..cc9343a 100644 --- a/WebCore/platform/graphics/win/IconWin.cpp +++ b/WebCore/platform/graphics/win/IconWin.cpp @@ -47,6 +47,7 @@ Icon::~Icon() DestroyIcon(m_hIcon); } +// FIXME: Move the code to ChromeClient::iconForFiles(). PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) { if (filenames.isEmpty()) diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp index b2fe069..1df73a7 100644 --- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp +++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp @@ -108,6 +108,13 @@ PlatformMedia MediaPlayerPrivate::platformMedia() const return p; } +#if USE(ACCELERATED_COMPOSITING) +PlatformLayer* MediaPlayerPrivate::platformLayer() const +{ + return m_qtVideoLayer->platformLayer(); +} +#endif + class TaskTimer : TimerBase { public: static void initialize(); @@ -745,6 +752,11 @@ void MediaPlayerPrivate::setUpVideoRendering() if (preferredMode == MediaRenderingMovieLayer) createLayerForMovie(); + +#if USE(ACCELERATED_COMPOSITING) + if (currentMode == MediaRenderingMovieLayer || preferredMode == MediaRenderingMovieLayer) + m_player->mediaPlayerClient()->mediaPlayerRenderingModeChanged(m_player); +#endif } void MediaPlayerPrivate::tearDownVideoRendering() @@ -810,11 +822,6 @@ void MediaPlayerPrivate::createLayerForMovie() if (!m_qtMovie || m_qtVideoLayer) return; - // Do nothing if the parent layer hasn't been set up yet. - GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player); - if (!videoGraphicsLayer) - return; - // Create a GraphicsLayer that won't be inserted directly into the render tree, but will used // as a wrapper for a WKCACFLayer which gets inserted as the content layer of the video // renderer's GraphicsLayer. @@ -829,9 +836,7 @@ void MediaPlayerPrivate::createLayerForMovie() #ifndef NDEBUG m_qtVideoLayer->setName("Video layer"); #endif - - // Hang the video layer from the render layer. - videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer->platformLayer()); + // The layer will get hooked up via RenderLayerBacking::updateGraphicsLayerConfiguration(). #endif } @@ -858,7 +863,7 @@ void MediaPlayerPrivate::acceleratedRenderingStateChanged() void MediaPlayerPrivate::notifySyncRequired(const GraphicsLayer*) { - GraphicsLayerCACF* videoGraphicsLayer = static_cast<GraphicsLayerCACF*>(m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player)); + GraphicsLayerCACF* videoGraphicsLayer = static_cast<GraphicsLayerCACF*>(m_qtVideoLayer.get()); if (videoGraphicsLayer) videoGraphicsLayer->notifySyncRequired(); } diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h index d58f44f..029a520 100644 --- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h +++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h @@ -76,6 +76,9 @@ private: virtual bool supportsFullscreen() const; virtual PlatformMedia platformMedia() const; +#if USE(ACCELERATED_COMPOSITING) + PlatformLayer* platformLayer() const; +#endif IntSize naturalSize() const; bool hasVideo() const; diff --git a/WebCore/platform/gtk/PasteboardGtk.cpp b/WebCore/platform/gtk/PasteboardGtk.cpp index 0b4d356..5c7d9a7 100644 --- a/WebCore/platform/gtk/PasteboardGtk.cpp +++ b/WebCore/platform/gtk/PasteboardGtk.cpp @@ -134,7 +134,8 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String&) ASSERT(node && node->renderer() && node->renderer()->isImage()); RenderImage* renderer = toRenderImage(node->renderer()); CachedImage* cachedImage = renderer->cachedImage(); - ASSERT(cachedImage); + if (!cachedImage || cachedImage->errorOccurred()) + return; Image* image = cachedImage->image(); ASSERT(image); diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp index 727788a..e19e2fa 100644 --- a/WebCore/platform/gtk/RenderThemeGtk.cpp +++ b/WebCore/platform/gtk/RenderThemeGtk.cpp @@ -27,9 +27,11 @@ #include "AffineTransform.h" #include "CString.h" #include "GOwnPtr.h" +#include "Gradient.h" #include "GraphicsContext.h" #include "HTMLMediaElement.h" #include "HTMLNames.h" +#include "MediaControlElements.h" #include "NotImplemented.h" #include "RenderBox.h" #include "RenderObject.h" @@ -686,9 +688,46 @@ bool RenderThemeGtk::paintMediaSeekForwardButton(RenderObject* o, const RenderOb bool RenderThemeGtk::paintMediaSliderTrack(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) { - paintInfo.context->fillRect(FloatRect(r), m_panelColor, DeviceColorSpace); - paintInfo.context->fillRect(FloatRect(IntRect(r.x(), r.y() + (r.height() - m_mediaSliderHeight) / 2, - r.width(), m_mediaSliderHeight)), m_sliderColor, DeviceColorSpace); + GraphicsContext* context = paintInfo.context; + + context->fillRect(FloatRect(r), m_panelColor, DeviceColorSpace); + context->fillRect(FloatRect(IntRect(r.x(), r.y() + (r.height() - m_mediaSliderHeight) / 2, + r.width(), m_mediaSliderHeight)), m_sliderColor, DeviceColorSpace); + + RenderStyle* style = o->style(); + HTMLMediaElement* mediaElement = toParentMediaElement(o); + + if (!mediaElement) + return false; + + // Draw the buffered ranges. This code is highly inspired from + // Chrome. + // FIXME: Draw multiple ranges if there are multiple buffered + // ranges. The current implementation of the player is always + // buffering a single range anyway. + IntRect bufferedRect = r; + bufferedRect.inflate(-style->borderLeftWidth()); + bufferedRect.setWidth((bufferedRect.width() * mediaElement->percentLoaded())); + + // Don't bother drawing an empty area. + if (bufferedRect.isEmpty()) + return false; + + IntPoint sliderTopLeft = bufferedRect.location(); + IntPoint sliderTopRight = sliderTopLeft; + sliderTopRight.move(0, bufferedRect.height()); + + RefPtr<Gradient> gradient = Gradient::create(sliderTopLeft, sliderTopRight); + Color startColor = m_panelColor; + gradient->addColorStop(0.0, startColor); + gradient->addColorStop(1.0, Color(startColor.red() / 2, startColor.green() / 2, startColor.blue() / 2, startColor.alpha())); + + context->save(); + context->setStrokeStyle(NoStroke); + context->setFillGradient(gradient); + context->fillRect(bufferedRect); + context->restore(); + return false; } diff --git a/WebCore/platform/gtk/WidgetGtk.cpp b/WebCore/platform/gtk/WidgetGtk.cpp index 53c10f1..834c21a 100644 --- a/WebCore/platform/gtk/WidgetGtk.cpp +++ b/WebCore/platform/gtk/WidgetGtk.cpp @@ -82,16 +82,18 @@ void Widget::setCursor(const Cursor& cursor) void Widget::show() { - if (!platformWidget()) - return; - gtk_widget_show(platformWidget()); + setSelfVisible(true); + + if (isParentVisible() && platformWidget()) + gtk_widget_show(platformWidget()); } void Widget::hide() { - if (!platformWidget()) - return; - gtk_widget_hide(platformWidget()); + setSelfVisible(false); + + if (isParentVisible() && platformWidget()) + gtk_widget_hide(platformWidget()); } void Widget::paint(GraphicsContext* context, const IntRect& rect) diff --git a/WebCore/platform/haiku/FileSystemHaiku.cpp b/WebCore/platform/haiku/FileSystemHaiku.cpp index 7400cd1..3d9161a 100644 --- a/WebCore/platform/haiku/FileSystemHaiku.cpp +++ b/WebCore/platform/haiku/FileSystemHaiku.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> + * Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de> * * All rights reserved. * @@ -29,9 +30,14 @@ #include "FileSystem.h" #include "CString.h" +#include "NotImplemented.h" #include "PlatformString.h" -#include "NotImplemented.h" +#include <Directory.h> +#include <Entry.h> +#include <File.h> +#include <FindDirectory.h> +#include <Path.h> namespace WebCore { @@ -43,8 +49,11 @@ CString fileSystemRepresentation(const String& string) String homeDirectoryPath() { - notImplemented(); - return String(); + BPath path; + if (find_directory(B_USER_DIRECTORY, &path) != B_OK) + return String(); + + return String(path.Path()); } CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle) @@ -74,7 +83,10 @@ bool unloadModule(PlatformModule) Vector<String> listDirectory(const String& path, const String& filter) { Vector<String> entries; - notImplemented(); + BDirectory directory(path.utf8().data()); + entry_ref ref; + while (directory.GetNextRef(&ref) == B_OK) + entries.append(ref.name); return entries; } diff --git a/WebCore/platform/image-decoders/ImageDecoder.cpp b/WebCore/platform/image-decoders/ImageDecoder.cpp index ed13048..86bcb45 100644 --- a/WebCore/platform/image-decoders/ImageDecoder.cpp +++ b/WebCore/platform/image-decoders/ImageDecoder.cpp @@ -58,30 +58,24 @@ static unsigned copyFromSharedBuffer(char* buffer, unsigned bufferLength, const // TODO: Find a better fix. ImageDecoder* ImageDecoder::create(const SharedBuffer& data) { - // We need at least 4 bytes to figure out what kind of image we're dealing with. + // We need at least 4 bytes to figure out what kind of image we're dealing + // with. static const unsigned maxMarkerLength = 4; char contents[maxMarkerLength]; unsigned length = copyFromSharedBuffer(contents, maxMarkerLength, data, 0); if (length < maxMarkerLength) return 0; - const unsigned char* uContents = reinterpret_cast<const unsigned char*>(contents); - // GIFs begin with GIF8(7 or 9). if (strncmp(contents, "GIF8", 4) == 0) return new GIFImageDecoder(); // Test for PNG. - if (uContents[0]==0x89 && - uContents[1]==0x50 && - uContents[2]==0x4E && - uContents[3]==0x47) + if (!memcmp(contents, "\x89\x50\x4E\x47", 4)) return new PNGImageDecoder(); // JPEG - if (uContents[0]==0xFF && - uContents[1]==0xD8 && - uContents[2]==0xFF) + if (!memcmp(contents, "\xFF\xD8\xFF", 3)) return new JPEGImageDecoder(); // BMP @@ -90,8 +84,7 @@ ImageDecoder* ImageDecoder::create(const SharedBuffer& data) // ICOs always begin with a 2-byte 0 followed by a 2-byte 1. // CURs begin with 2-byte 0 followed by 2-byte 2. - if (!memcmp(contents, "\000\000\001\000", 4) || - !memcmp(contents, "\000\000\002\000", 4)) + if (!memcmp(contents, "\x00\x00\x01\x00", 4) || !memcmp(contents, "\x00\x00\x02\x00", 4)) return new ICOImageDecoder(); // Give up. We don't know what the heck this is. @@ -109,14 +102,27 @@ RGBA32Buffer::RGBA32Buffer() { } +RGBA32Buffer& RGBA32Buffer::operator=(const RGBA32Buffer& other) +{ + if (this == &other) + return *this; + + copyBitmapData(other); + setRect(other.rect()); + setStatus(other.status()); + setDuration(other.duration()); + setDisposalMethod(other.disposalMethod()); + return *this; +} + void RGBA32Buffer::clear() { m_bytes.clear(); m_status = FrameEmpty; - // NOTE: Do not reset other members here; clearFrameBufferCache() - // calls this to free the bitmap data, but other functions like - // initFrameBuffer() and frameComplete() may still need to read - // other metadata out of this frame later. + // NOTE: Do not reset other members here; clearFrameBufferCache() calls this + // to free the bitmap data, but other functions like initFrameBuffer() and + // frameComplete() may still need to read other metadata out of this frame + // later. } void RGBA32Buffer::zeroFill() @@ -137,8 +143,8 @@ void RGBA32Buffer::copyBitmapData(const RGBA32Buffer& other) bool RGBA32Buffer::setSize(int newWidth, int newHeight) { - // NOTE: This has no way to check for allocation failure if the - // requested size was too big... + // NOTE: This has no way to check for allocation failure if the requested + // size was too big... m_bytes.resize(newWidth * newHeight); m_size = IntSize(newWidth, newHeight); @@ -163,19 +169,6 @@ void RGBA32Buffer::setStatus(FrameStatus status) m_status = status; } -RGBA32Buffer& RGBA32Buffer::operator=(const RGBA32Buffer& other) -{ - if (this == &other) - return *this; - - copyBitmapData(other); - setRect(other.rect()); - setStatus(other.status()); - setDuration(other.duration()); - setDisposalMethod(other.disposalMethod()); - return *this; -} - int RGBA32Buffer::width() const { return m_size.width(); @@ -200,13 +193,11 @@ inline void fillScaledValues(Vector<int>& scaledValues, double scaleRate, int le { double inflateRate = 1. / scaleRate; scaledValues.reserveCapacity(static_cast<int>(length * scaleRate + 0.5)); - for (int scaledIndex = 0;;) { + for (int scaledIndex = 0; ; ++scaledIndex) { int index = static_cast<int>(scaledIndex * inflateRate + 0.5); - if (index < length) { - scaledValues.append(index); - ++scaledIndex; - } else + if (index >= length) break; + scaledValues.append(index); } } diff --git a/WebCore/platform/image-decoders/ImageDecoder.h b/WebCore/platform/image-decoders/ImageDecoder.h index 8d27072..002395b 100644 --- a/WebCore/platform/image-decoders/ImageDecoder.h +++ b/WebCore/platform/image-decoders/ImageDecoder.h @@ -46,18 +46,21 @@ namespace WebCore { - // The RGBA32Buffer object represents the decoded image data in RGBA32 format. This buffer is what all - // decoders write a single frame into. Frames are then instantiated for drawing by being handed this buffer. + // The RGBA32Buffer object represents the decoded image data in RGBA32 + // format. This buffer is what all decoders write a single frame into. + // Frames are then instantiated for drawing by being handed this buffer. class RGBA32Buffer { public: enum FrameStatus { FrameEmpty, FramePartial, FrameComplete }; enum FrameDisposalMethod { - // If you change the numeric values of these, make sure you audit all - // users, as some users may cast raw values to/from these constants. - DisposeNotSpecified, // Leave frame in framebuffer - DisposeKeep, // Leave frame in framebuffer - DisposeOverwriteBgcolor, // Clear frame to transparent - DisposeOverwritePrevious, // Clear frame to previous framebuffer contents + // If you change the numeric values of these, make sure you audit + // all users, as some users may cast raw values to/from these + // constants. + DisposeNotSpecified, // Leave frame in framebuffer + DisposeKeep, // Leave frame in framebuffer + DisposeOverwriteBgcolor, // Clear frame to transparent + DisposeOverwritePrevious, // Clear frame to previous framebuffer + // contents }; #if PLATFORM(SKIA) || PLATFORM(QT) typedef uint32_t PixelData; @@ -67,15 +70,11 @@ namespace WebCore { RGBA32Buffer(); - // For backends which refcount their data, this constructor doesn't need - // to create a new copy of the image data, only increase the ref count. - // - // This exists because ImageDecoder keeps a Vector<RGBA32Buffer>, and - // Vector requires this constructor. - RGBA32Buffer(const RGBA32Buffer& other) - { - operator=(other); - } + RGBA32Buffer(const RGBA32Buffer& other) { operator=(other); } + + // For backends which refcount their data, this operator doesn't need to + // create a new copy of the image data, only increase the ref count. + RGBA32Buffer& operator=(const RGBA32Buffer& other); // Deletes the pixel data entirely; used by ImageDecoder to save memory // when we no longer need to display a frame and only need its metadata. @@ -142,8 +141,6 @@ namespace WebCore { #endif private: - RGBA32Buffer& operator=(const RGBA32Buffer& other); - int width() const; int height() const; @@ -188,26 +185,33 @@ namespace WebCore { Vector<PixelData> m_bytes; IntSize m_size; // The size of the buffer. This should be the // same as ImageDecoder::m_size. - bool m_hasAlpha; // Whether or not any of the pixels in the buffer have transparency. + bool m_hasAlpha; // Whether or not any of the pixels in the buffer + // have transparency. #endif - IntRect m_rect; // The rect of the original specified frame within the overall buffer. - // This will always just be the entire buffer except for GIF frames - // whose original rect was smaller than the overall image size. - FrameStatus m_status; // Whether or not this frame is completely finished decoding. + IntRect m_rect; // The rect of the original specified frame within + // the overall buffer. This will always just be + // the entire buffer except for GIF frames whose + // original rect was smaller than the overall + // image size. + FrameStatus m_status; // Whether or not this frame is completely + // finished decoding. unsigned m_duration; // The animation delay. FrameDisposalMethod m_disposalMethod; - // What to do with this frame's data when initializing the next frame. + // What to do with this frame's data when + // initializing the next frame. }; - // The ImageDecoder class represents a base class for specific image format decoders - // (e.g., GIF, JPG, PNG, ICO) to derive from. All decoders decode into RGBA32 format - // and the base class manages the RGBA32 frame cache. + // The ImageDecoder class represents a base class for specific image format + // decoders (e.g., GIF, JPG, PNG, ICO) to derive from. All decoders decode + // into RGBA32 format and the base class manages the RGBA32 frame cache. + // + // ENABLE(IMAGE_DECODER_DOWN_SAMPLING) allows image decoders to write + // directly to scaled output buffers by down sampling. Call + // setMaxNumPixels() to specify the biggest size that decoded images can + // have. Image decoders will deflate those images that are bigger than + // m_maxNumPixels. (Not supported by all image decoders yet) class ImageDecoder : public Noncopyable { public: - // ENABLE(IMAGE_DECODER_DOWN_SAMPLING) allows image decoders to write directly to - // scaled output buffers by down sampling. Call setMaxNumPixels() to specify the - // biggest size that decoded images can have. Image decoders will deflate those - // images that are bigger than m_maxNumPixels. (Not supported by all image decoders yet) ImageDecoder() : m_scaled(false) , m_failed(false) @@ -224,21 +228,22 @@ namespace WebCore { // needing to write a dedicated setData() implementation. static ImageDecoder* create(const SharedBuffer& data); - // The the filename extension usually associated with an undecoded image of this type. + // The the filename extension usually associated with an undecoded image + // of this type. virtual String filenameExtension() const = 0; - // All specific decoder plugins must do something with the data they are given. bool isAllDataReceived() const { return m_isAllDataReceived; } + virtual void setData(SharedBuffer* data, bool allDataReceived) { m_data = data; m_isAllDataReceived = allDataReceived; } - // Whether or not the size information has been decoded yet. This default - // implementation just returns true if the size has been set and we have not - // seen a failure. Decoders may want to override this to lazily decode - // enough of the image to get the size. + // Whether or not the size information has been decoded yet. This + // default implementation just returns true if the size has been set and + // we have not seen a failure. Decoders may want to override this to + // lazily decode enough of the image to get the size. virtual bool isSizeAvailable() { return !m_failed && m_sizeAvailable; @@ -266,10 +271,10 @@ namespace WebCore { return size(); } - // Called by the image decoders to set their decoded size, this also check - // the size for validity. It will return true if the size was set, or false - // if there is an error. On error, the m_failed flag will be set and the - // caller should immediately stop decoding. + // Called by the image decoders to set their decoded size, this also + // checks the size for validity. It will return true if the size was + // set, or false if there is an error. On error, the m_failed flag will + // be set and the caller should immediately stop decoding. virtual bool setSize(unsigned width, unsigned height) { if (isOverSize(width, height)) { @@ -281,29 +286,30 @@ namespace WebCore { return true; } - // The total number of frames for the image. Classes that support multiple frames - // will scan the image data for the answer if they need to (without necessarily - // decoding all of the individual frames). + // The total number of frames for the image. Classes that support + // multiple frames will scan the image data for the answer if they need + // to (without necessarily decoding all of the individual frames). virtual size_t frameCount() { return 1; } // The number of repetitions to perform for an animation loop. virtual int repetitionCount() const { return cAnimationNone; } - // Called to obtain the RGBA32Buffer full of decoded data for rendering. The - // decoder plugin will decode as much of the frame as it can before handing - // back the buffer. + // Called to obtain the RGBA32Buffer full of decoded data for rendering. + // The decoder plugin will decode as much of the frame as it can before + // handing back the buffer. virtual RGBA32Buffer* frameBufferAtIndex(size_t) = 0; - // Whether or not the underlying image format even supports alpha transparency. + // Whether or not the underlying image format even supports alpha + // transparency. virtual bool supportsAlpha() const { return true; } bool failed() const { return m_failed; } void setFailed() { m_failed = true; } // Wipe out frames in the frame buffer cache before |clearBeforeFrame|, - // assuming this can be done without breaking decoding. Different decoders - // place different restrictions on what frames are safe to destroy, so this - // is left to them to implement. + // assuming this can be done without breaking decoding. Different + // decoders place different restrictions on what frames are safe to + // destroy, so this is left to them to implement. // For convenience's sake, we provide a default (empty) implementation, // since in practice only GIFs will ever use this. virtual void clearFrameBufferCache(size_t clearBeforeFrame) { } diff --git a/WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp b/WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp index de0690f..fb9f9f2 100644 --- a/WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp +++ b/WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp @@ -41,9 +41,7 @@ namespace WebCore { static const size_t sizeOfFileHeader = 14; BMPImageDecoder::BMPImageDecoder() - : ImageDecoder() - , m_allDataReceived(false) - , m_decodedOffset(0) + : m_decodedOffset(0) { } @@ -53,7 +51,6 @@ void BMPImageDecoder::setData(SharedBuffer* data, bool allDataReceived) return; ImageDecoder::setData(data, allDataReceived); - m_allDataReceived = allDataReceived; if (m_reader) m_reader->setData(data); } @@ -61,7 +58,7 @@ void BMPImageDecoder::setData(SharedBuffer* data, bool allDataReceived) bool BMPImageDecoder::isSizeAvailable() { if (!ImageDecoder::isSizeAvailable() && !failed()) - decodeWithCheckForDataEnded(true); + decode(true); return ImageDecoder::isSizeAvailable(); } @@ -76,31 +73,29 @@ RGBA32Buffer* BMPImageDecoder::frameBufferAtIndex(size_t index) RGBA32Buffer* buffer = &m_frameBufferCache.first(); if (buffer->status() != RGBA32Buffer::FrameComplete && !failed()) - decodeWithCheckForDataEnded(false); + decode(false); return buffer; } -void BMPImageDecoder::decodeWithCheckForDataEnded(bool onlySize) +void BMPImageDecoder::decode(bool onlySize) { if (failed()) return; // If we couldn't decode the image but we've received all the data, decoding // has failed. - if (!decode(onlySize) && m_allDataReceived) + if (!decodeHelper(onlySize) && isAllDataReceived()) setFailed(); } -bool BMPImageDecoder::decode(bool onlySize) +bool BMPImageDecoder::decodeHelper(bool onlySize) { size_t imgDataOffset = 0; - if ((m_decodedOffset < sizeOfFileHeader) - && !processFileHeader(&imgDataOffset)) + if ((m_decodedOffset < sizeOfFileHeader) && !processFileHeader(&imgDataOffset)) return false; if (!m_reader) { - m_reader.set(new BMPImageReader(this, m_decodedOffset, imgDataOffset, - false)); + m_reader.set(new BMPImageReader(this, m_decodedOffset, imgDataOffset, false)); m_reader->setData(m_data.get()); } @@ -118,8 +113,7 @@ bool BMPImageDecoder::processFileHeader(size_t* imgDataOffset) ASSERT(!m_decodedOffset); if (m_data->size() < sizeOfFileHeader) return false; - const uint16_t fileType = - (m_data->data()[0] << 8) | static_cast<uint8_t>(m_data->data()[1]); + const uint16_t fileType = (m_data->data()[0] << 8) | static_cast<uint8_t>(m_data->data()[1]); *imgDataOffset = readUint32(10); m_decodedOffset = sizeOfFileHeader; diff --git a/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h b/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h index c793585..15be0a2 100644 --- a/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h +++ b/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h @@ -50,29 +50,23 @@ namespace WebCore { private: inline uint32_t readUint32(int offset) const { - return BMPImageReader::readUint32(m_data.get(), - m_decodedOffset + offset); + return BMPImageReader::readUint32(m_data.get(), m_decodedOffset + offset); } // Decodes the image. If |onlySize| is true, stops decoding after // calculating the image size. If decoding fails but there is no more // data coming, sets the "decode failure" flag. - void decodeWithCheckForDataEnded(bool onlySize); + void decode(bool onlySize); // Decodes the image. If |onlySize| is true, stops decoding after // calculating the image size. Returns whether decoding succeeded. - // NOTE: Used internally by decodeWithCheckForDataEnded(). Other people - // should not call this. - bool decode(bool onlySize); + bool decodeHelper(bool onlySize); // Processes the file header at the beginning of the data. Sets // |*imgDataOffset| based on the header contents. Returns true if the // file header could be decoded. bool processFileHeader(size_t* imgDataOffset); - // True if we've seen all the data. - bool m_allDataReceived; - // An index into |m_data| representing how much we've already decoded. // Note that this only tracks data _this_ class decodes; once the // BMPImageReader takes over this will not be updated further. diff --git a/WebCore/platform/image-decoders/bmp/BMPImageReader.cpp b/WebCore/platform/image-decoders/bmp/BMPImageReader.cpp index 1936d81..2f3bffa 100644 --- a/WebCore/platform/image-decoders/bmp/BMPImageReader.cpp +++ b/WebCore/platform/image-decoders/bmp/BMPImageReader.cpp @@ -33,10 +33,7 @@ namespace WebCore { -BMPImageReader::BMPImageReader(ImageDecoder* parent, - size_t decodedAndHeaderOffset, - size_t imgDataOffset, - bool usesAndMask) +BMPImageReader::BMPImageReader(ImageDecoder* parent, size_t decodedAndHeaderOffset, size_t imgDataOffset, bool usesAndMask) : m_parent(parent) , m_buffer(0) , m_decodedOffset(decodedAndHeaderOffset) @@ -63,8 +60,7 @@ bool BMPImageReader::decodeBMP(bool onlySize) return false; // Read and process info header. - if ((m_decodedOffset < (m_headerOffset + m_infoHeader.biSize)) - && !processInfoHeader()) + if ((m_decodedOffset < (m_headerOffset + m_infoHeader.biSize)) && !processInfoHeader()) return false; // processInfoHeader() set the size, so if that's all we needed, we're done. @@ -82,8 +78,7 @@ bool BMPImageReader::decodeBMP(bool onlySize) // Initialize the framebuffer if needed. ASSERT(m_buffer); // Parent should set this before asking us to decode! if (m_buffer->status() == RGBA32Buffer::FrameEmpty) { - if (!m_buffer->setSize(m_parent->size().width(), - m_parent->size().height())) + if (!m_buffer->setSize(m_parent->size().width(), m_parent->size().height())) return setFailed(); // Unable to allocate. m_buffer->setStatus(RGBA32Buffer::FramePartial); // setSize() calls eraseARGB(), which resets the alpha flag, so we force @@ -100,9 +95,7 @@ bool BMPImageReader::decodeBMP(bool onlySize) // Decode the data. if ((m_andMaskState != Decoding) && !pastEndOfImage(0)) { - if ((m_infoHeader.biCompression == RLE4) - || (m_infoHeader.biCompression == RLE8) - || (m_infoHeader.biCompression == RLE24)) { + if ((m_infoHeader.biCompression == RLE4) || (m_infoHeader.biCompression == RLE8) || (m_infoHeader.biCompression == RLE24)) { if (!processRLEData()) return false; } else if (!processNonRLEData(false, 0)) @@ -133,8 +126,7 @@ bool BMPImageReader::readInfoHeaderSize() { // Get size of info header. ASSERT(m_decodedOffset == m_headerOffset); - if ((m_decodedOffset > m_data->size()) - || ((m_data->size() - m_decodedOffset) < 4)) + if ((m_decodedOffset > m_data->size()) || ((m_data->size() - m_decodedOffset) < 4)) return false; m_infoHeader.biSize = readUint32(0); // Don't increment m_decodedOffset here, it just makes the code in @@ -143,9 +135,7 @@ bool BMPImageReader::readInfoHeaderSize() // Don't allow the header to overflow (which would be harmless here, but // problematic or at least confusing in other places), or to overrun the // image data. - if (((m_headerOffset + m_infoHeader.biSize) < m_headerOffset) - || (m_imgDataOffset - && (m_imgDataOffset < (m_headerOffset + m_infoHeader.biSize)))) + if (((m_headerOffset + m_infoHeader.biSize) < m_headerOffset) || (m_imgDataOffset && (m_imgDataOffset < (m_headerOffset + m_infoHeader.biSize)))) return setFailed(); // See if this is a header size we understand: @@ -156,9 +146,7 @@ bool BMPImageReader::readInfoHeaderSize() else if ((m_infoHeader.biSize == 40) || isWindowsV4Plus()) ; // OS/2 2.x: any multiple of 4 between 16 and 64, inclusive, or 42 or 46 - else if ((m_infoHeader.biSize >= 16) && (m_infoHeader.biSize <= 64) - && (((m_infoHeader.biSize & 3) == 0) || (m_infoHeader.biSize == 42) - || (m_infoHeader.biSize == 46))) + else if ((m_infoHeader.biSize >= 16) && (m_infoHeader.biSize <= 64) && (!(m_infoHeader.biSize & 3) || (m_infoHeader.biSize == 42) || (m_infoHeader.biSize == 46))) m_isOS22x = true; else return setFailed(); @@ -170,9 +158,7 @@ bool BMPImageReader::processInfoHeader() { // Read info header. ASSERT(m_decodedOffset == m_headerOffset); - if ((m_decodedOffset > m_data->size()) - || ((m_data->size() - m_decodedOffset) < m_infoHeader.biSize) - || !readInfoHeader()) + if ((m_decodedOffset > m_data->size()) || ((m_data->size() - m_decodedOffset) < m_infoHeader.biSize) || !readInfoHeader()) return false; m_decodedOffset += m_infoHeader.biSize; @@ -188,11 +174,9 @@ bool BMPImageReader::processInfoHeader() // colors", so set it to the maximum number of colors for this bit depth. // Also do this for bitmaps that put too large a value here. if (m_infoHeader.biBitCount < 16) { - const uint32_t maxColors = - static_cast<uint32_t>(1) << m_infoHeader.biBitCount; - if ((m_infoHeader.biClrUsed == 0) - || (m_infoHeader.biClrUsed > maxColors)) - m_infoHeader.biClrUsed = maxColors; + const uint32_t maxColors = static_cast<uint32_t>(1) << m_infoHeader.biBitCount; + if (!m_infoHeader.biClrUsed || (m_infoHeader.biClrUsed > maxColors)) + m_infoHeader.biClrUsed = maxColors; } // For any bitmaps that set their BitCount to the wrong value, reset the @@ -206,7 +190,7 @@ bool BMPImageReader::processInfoHeader() // Tell caller what still needs to be processed. if (m_infoHeader.biBitCount >= 16) m_needToProcessBitmasks = true; - else if (m_infoHeader.biBitCount > 0) + else if (m_infoHeader.biBitCount) m_needToProcessColorTable = true; return true; @@ -246,8 +230,7 @@ bool BMPImageReader::readInfoHeader() } else if (biCompression > 5) return setFailed(); // Some type we don't understand. else - m_infoHeader.biCompression = - static_cast<CompressionType>(biCompression); + m_infoHeader.biCompression = static_cast<CompressionType>(biCompression); } // Read colors used, if present. @@ -288,7 +271,7 @@ bool BMPImageReader::isInfoHeaderValid() const { // Non-positive widths/heights are invalid. (We've already flipped the // sign of the height for top-down bitmaps.) - if ((m_infoHeader.biWidth <= 0) || (m_infoHeader.biHeight == 0)) + if ((m_infoHeader.biWidth <= 0) || !m_infoHeader.biHeight) return false; // Only Windows V3+ has top-down bitmaps. @@ -296,16 +279,10 @@ bool BMPImageReader::isInfoHeaderValid() const return false; // Only bit depths of 1, 4, 8, or 24 are universally supported. - if ((m_infoHeader.biBitCount != 1) && (m_infoHeader.biBitCount != 4) - && (m_infoHeader.biBitCount != 8) - && (m_infoHeader.biBitCount != 24)) { + if ((m_infoHeader.biBitCount != 1) && (m_infoHeader.biBitCount != 4) && (m_infoHeader.biBitCount != 8) && (m_infoHeader.biBitCount != 24)) { // Windows V3+ additionally supports bit depths of 0 (for embedded // JPEG/PNG images), 16, and 32. - if (m_isOS21x || m_isOS22x) - return false; - if ((m_infoHeader.biBitCount != 0) - && (m_infoHeader.biBitCount != 16) - && (m_infoHeader.biBitCount != 32)) + if (m_isOS21x || m_isOS22x || (m_infoHeader.biBitCount && (m_infoHeader.biBitCount != 16) && (m_infoHeader.biBitCount != 32))) return false; } @@ -314,7 +291,7 @@ bool BMPImageReader::isInfoHeaderValid() const // some compression types. switch (m_infoHeader.biCompression) { case RGB: - if (m_infoHeader.biBitCount == 0) + if (!m_infoHeader.biBitCount) return false; break; @@ -323,46 +300,38 @@ bool BMPImageReader::isInfoHeaderValid() const // Compression = RLE4" (which means "4 bit, but with a 2-color table"), // so also allow the paletted RLE compression types to have too low a // bit count; we'll correct this later. - if (m_infoHeader.biBitCount == 0 || m_infoHeader.biBitCount > 8) + if (!m_infoHeader.biBitCount || (m_infoHeader.biBitCount > 8)) return false; break; case RLE4: // See comments in RLE8. - if (m_infoHeader.biBitCount == 0 || m_infoHeader.biBitCount > 4) + if (!m_infoHeader.biBitCount || (m_infoHeader.biBitCount > 4)) return false; break; case BITFIELDS: // Only valid for Windows V3+. - if (m_isOS21x || m_isOS22x) - return false; - if ((m_infoHeader.biBitCount != 16) && (m_infoHeader.biBitCount != 32)) + if (m_isOS21x || m_isOS22x || ((m_infoHeader.biBitCount != 16) && (m_infoHeader.biBitCount != 32))) return false; break; case JPEG: case PNG: // Only valid for Windows V3+. - if (m_isOS21x || m_isOS22x) - return false; - if (m_infoHeader.biBitCount != 0) + if (m_isOS21x || m_isOS22x || m_infoHeader.biBitCount) return false; break; case HUFFMAN1D: // Only valid for OS/2 2.x. - if (!m_isOS22x) - return false; - if (m_infoHeader.biBitCount != 1) + if (!m_isOS22x || (m_infoHeader.biBitCount != 1)) return false; break; case RLE24: // Only valid for OS/2 2.x. - if (!m_isOS22x) - return false; - if (m_infoHeader.biBitCount != 24) + if (!m_isOS22x || (m_infoHeader.biBitCount != 24)) return false; break; @@ -374,8 +343,7 @@ bool BMPImageReader::isInfoHeaderValid() const } // Top-down bitmaps cannot be compressed; they must be RGB or BITFIELDS. - if (m_isTopDown && (m_infoHeader.biCompression != RGB) - && (m_infoHeader.biCompression != BITFIELDS)) + if (m_isTopDown && (m_infoHeader.biCompression != RGB) && (m_infoHeader.biCompression != BITFIELDS)) return false; // Reject the following valid bitmap types that we don't currently bother @@ -385,13 +353,11 @@ bool BMPImageReader::isInfoHeaderValid() const // * Bitmaps larger than 2^16 pixels in either dimension (Windows // probably doesn't draw these well anyway, and the decoded data would // take a lot of memory). - if ((m_infoHeader.biWidth >= (1 << 16)) - || (m_infoHeader.biHeight >= (1 << 16))) + if ((m_infoHeader.biWidth >= (1 << 16)) || (m_infoHeader.biHeight >= (1 << 16))) return false; // * Windows V3+ JPEG-in-BMP and PNG-in-BMP bitmaps (supposedly not found // in the wild, only used to send data to printers?). - if ((m_infoHeader.biCompression == JPEG) - || (m_infoHeader.biCompression == PNG)) + if ((m_infoHeader.biCompression == JPEG) || (m_infoHeader.biCompression == PNG)) return false; // * OS/2 2.x Huffman-encoded monochrome bitmaps (see // http://www.fileformat.info/mirror/egff/ch09_05.htm , re: "G31D" @@ -413,11 +379,8 @@ bool BMPImageReader::processBitmasks() // 16 bits: MSB <- xRRRRRGG GGGBBBBB -> LSB // 24/32 bits: MSB <- [AAAAAAAA] RRRRRRRR GGGGGGGG BBBBBBBB -> LSB const int numBits = (m_infoHeader.biBitCount == 16) ? 5 : 8; - for (int i = 0; i <= 2; ++i) { - m_bitMasks[i] = - ((static_cast<uint32_t>(1) << (numBits * (3 - i))) - 1) ^ - ((static_cast<uint32_t>(1) << (numBits * (2 - i))) - 1); - } + for (int i = 0; i <= 2; ++i) + m_bitMasks[i] = ((static_cast<uint32_t>(1) << (numBits * (3 - i))) - 1) ^ ((static_cast<uint32_t>(1) << (numBits * (2 - i))) - 1); // For Windows V4+ 32-bit RGB, don't overwrite the alpha mask from the // header (see note in readInfoHeader()). @@ -431,10 +394,7 @@ bool BMPImageReader::processBitmasks() // Fail if we don't have enough file space for the bitmasks. static const size_t SIZEOF_BITMASKS = 12; - if (((m_headerOffset + m_infoHeader.biSize + SIZEOF_BITMASKS) < - (m_headerOffset + m_infoHeader.biSize)) - || (m_imgDataOffset && (m_imgDataOffset < - (m_headerOffset + m_infoHeader.biSize + SIZEOF_BITMASKS)))) + if (((m_headerOffset + m_infoHeader.biSize + SIZEOF_BITMASKS) < (m_headerOffset + m_infoHeader.biSize)) || (m_imgDataOffset && (m_imgDataOffset < (m_headerOffset + m_infoHeader.biSize + SIZEOF_BITMASKS)))) return setFailed(); // Read bitmasks. @@ -461,8 +421,7 @@ bool BMPImageReader::processBitmasks() // specify a bogus alpha channel in bits that don't exist in the pixel // data (for example, bits 25-31 in a 24-bit RGB format). if (m_infoHeader.biBitCount < 32) - m_bitMasks[i] &= - ((static_cast<uint32_t>(1) << m_infoHeader.biBitCount) - 1); + m_bitMasks[i] &= ((static_cast<uint32_t>(1) << m_infoHeader.biBitCount) - 1); // For empty masks (common on the alpha channel, especially after the // trimming above), quickly clear the shifts and continue, to avoid an @@ -507,15 +466,11 @@ bool BMPImageReader::processColorTable() m_tableSizeInBytes = m_infoHeader.biClrUsed * (m_isOS21x ? 3 : 4); // Fail if we don't have enough file space for the color table. - if (((m_headerOffset + m_infoHeader.biSize + m_tableSizeInBytes) < - (m_headerOffset + m_infoHeader.biSize)) - || (m_imgDataOffset && (m_imgDataOffset < - (m_headerOffset + m_infoHeader.biSize + m_tableSizeInBytes)))) + if (((m_headerOffset + m_infoHeader.biSize + m_tableSizeInBytes) < (m_headerOffset + m_infoHeader.biSize)) || (m_imgDataOffset && (m_imgDataOffset < (m_headerOffset + m_infoHeader.biSize + m_tableSizeInBytes)))) return setFailed(); // Read color table. - if ((m_decodedOffset > m_data->size()) - || ((m_data->size() - m_decodedOffset) < m_tableSizeInBytes)) + if ((m_decodedOffset > m_data->size()) || ((m_data->size() - m_decodedOffset) < m_tableSizeInBytes)) return false; m_colorTable.resize(m_infoHeader.biClrUsed); for (size_t i = 0; i < m_infoHeader.biClrUsed; ++i) { @@ -573,7 +528,7 @@ bool BMPImageReader::processRLEData() // the image. const uint8_t count = m_data->data()[m_decodedOffset]; const uint8_t code = m_data->data()[m_decodedOffset + 1]; - if (((count != 0) || (code != 1)) && pastEndOfImage(0)) + if ((count || (code != 1)) && pastEndOfImage(0)) return setFailed(); // Decode. @@ -590,10 +545,7 @@ bool BMPImageReader::processRLEData() case 1: // Magic token: EOF // Skip any remaining pixels in the image. - if ((m_coord.x() < m_parent->size().width()) - || (m_isTopDown - ? (m_coord.y() < (m_parent->size().height() - 1)) - : (m_coord.y() > 0))) + if ((m_coord.x() < m_parent->size().width()) || (m_isTopDown ? (m_coord.y() < (m_parent->size().height() - 1)) : (m_coord.y() > 0))) m_buffer->setHasAlpha(true); return true; @@ -607,10 +559,9 @@ bool BMPImageReader::processRLEData() // past the end of the image. const uint8_t dx = m_data->data()[m_decodedOffset + 2]; const uint8_t dy = m_data->data()[m_decodedOffset + 3]; - if ((dx != 0) || (dy != 0)) + if (dx || dy) m_buffer->setHasAlpha(true); - if (((m_coord.x() + dx) > m_parent->size().width()) || - pastEndOfImage(dy)) + if (((m_coord.x() + dx) > m_parent->size().width()) || pastEndOfImage(dy)) return setFailed(); // Skip intervening pixels. @@ -637,8 +588,7 @@ bool BMPImageReader::processRLEData() // The following color data is repeated for |count| total pixels. // Strangely, some BMPs seem to specify excessively large counts // here; ignore pixels past the end of the row. - const int endX = - std::min(m_coord.x() + count, m_parent->size().width()); + const int endX = std::min(m_coord.x() + count, m_parent->size().width()); if (m_infoHeader.biCompression == RLE24) { // Bail if there isn't enough data. @@ -646,8 +596,7 @@ bool BMPImageReader::processRLEData() return false; // One BGR triple that we copy |count| times. - fillRGBA(endX, m_data->data()[m_decodedOffset + 3], - m_data->data()[m_decodedOffset + 2], code, 0xff); + fillRGBA(endX, m_data->data()[m_decodedOffset + 3], m_data->data()[m_decodedOffset + 2], code, 0xff); m_decodedOffset += 4; } else { // RLE8 has one color index that gets repeated; RLE4 has two @@ -658,8 +607,7 @@ bool BMPImageReader::processRLEData() colorIndexes[0] = (colorIndexes[0] >> 4) & 0xf; colorIndexes[1] &= 0xf; } - if ((colorIndexes[0] >= m_infoHeader.biClrUsed) - || (colorIndexes[1] >= m_infoHeader.biClrUsed)) + if ((colorIndexes[0] >= m_infoHeader.biClrUsed) || (colorIndexes[1] >= m_infoHeader.biClrUsed)) return setFailed(); for (int which = 0; m_coord.x() < endX; ) { setI(colorIndexes[which]); @@ -689,9 +637,7 @@ bool BMPImageReader::processNonRLEData(bool inRLE, int numPixels) // requires. const size_t pixelsPerByte = 8 / m_infoHeader.biBitCount; const size_t bytesPerPixel = m_infoHeader.biBitCount / 8; - const size_t unpaddedNumBytes = (m_infoHeader.biBitCount < 16) - ? ((numPixels + pixelsPerByte - 1) / pixelsPerByte) - : (numPixels * bytesPerPixel); + const size_t unpaddedNumBytes = (m_infoHeader.biBitCount < 16) ? ((numPixels + pixelsPerByte - 1) / pixelsPerByte) : (numPixels * bytesPerPixel); // RLE runs are zero-padded at the end to a multiple of 16 bits. Non-RLE // data is in rows and is zero-padded to a multiple of 32 bits. const size_t alignBits = inRLE ? 1 : 3; @@ -711,10 +657,8 @@ bool BMPImageReader::processNonRLEData(bool inRLE, int numPixels) const uint8_t mask = (1 << m_infoHeader.biBitCount) - 1; for (size_t byte = 0; byte < unpaddedNumBytes; ++byte) { uint8_t pixelData = m_data->data()[m_decodedOffset + byte]; - for (size_t pixel = 0; - (pixel < pixelsPerByte) && (m_coord.x() < endX); ++pixel) { - const size_t colorIndex = - (pixelData >> (8 - m_infoHeader.biBitCount)) & mask; + for (size_t pixel = 0; (pixel < pixelsPerByte) && (m_coord.x() < endX); ++pixel) { + const size_t colorIndex = (pixelData >> (8 - m_infoHeader.biBitCount)) & mask; if (m_andMaskState == Decoding) { // There's no way to accurately represent an AND + XOR // operation as an RGBA image, so where the AND values @@ -749,7 +693,7 @@ bool BMPImageReader::processNonRLEData(bool inRLE, int numPixels) // images where all alpha values are 255; opaque images are // faster to draw. int alpha = getAlpha(pixel); - if (!m_seenNonZeroAlphaPixel && (alpha == 0)) { + if (!m_seenNonZeroAlphaPixel && !alpha) { m_seenZeroAlphaPixel = true; alpha = 255; } else { diff --git a/WebCore/platform/image-decoders/bmp/BMPImageReader.h b/WebCore/platform/image-decoders/bmp/BMPImageReader.h index 3536e3b..a30a721 100644 --- a/WebCore/platform/image-decoders/bmp/BMPImageReader.h +++ b/WebCore/platform/image-decoders/bmp/BMPImageReader.h @@ -57,8 +57,7 @@ namespace WebCore { uint32_t result; memcpy(&result, &data->data()[offset], 4); #if CPU(BIG_ENDIAN) - result = ((result & 0xff) << 24) | ((result & 0xff00) << 8) | - ((result & 0xff0000) >> 8) | ((result & 0xff000000) >> 24); + result = ((result & 0xff) << 24) | ((result & 0xff00) << 8) | ((result & 0xff0000) >> 8) | ((result & 0xff000000) >> 24); #endif return result; } @@ -67,10 +66,7 @@ namespace WebCore { // |startOffset| points to the start of the BMP within the file. // |buffer| points at an empty RGBA32Buffer that we'll initialize and // fill with decoded data. - BMPImageReader(ImageDecoder* parent, - size_t decodedAndHeaderOffset, - size_t imgDataOffset, - bool usesAndMask); + BMPImageReader(ImageDecoder* parent, size_t decodedAndHeaderOffset, size_t imgDataOffset, bool usesAndMask); void setBuffer(RGBA32Buffer* buffer) { m_buffer = buffer; } void setData(SharedBuffer* data) { m_data = data; } @@ -179,9 +175,7 @@ namespace WebCore { // image", so downwards for m_isTopDown images and upwards otherwise. inline bool pastEndOfImage(int numRows) { - return m_isTopDown - ? ((m_coord.y() + numRows) >= m_parent->size().height()) - : ((m_coord.y() - numRows) < 0); + return m_isTopDown ? ((m_coord.y() + numRows) >= m_parent->size().height()) : ((m_coord.y() - numRows) < 0); } // Returns the pixel data for the current X coordinate in a uint32_t. @@ -203,8 +197,7 @@ namespace WebCore { uint32_t pixel; memcpy(&pixel, &m_data->data()[m_decodedOffset + offset], 3); #if CPU(BIG_ENDIAN) - pixel = ((pixel & 0xff00) << 8) | ((pixel & 0xff0000) >> 8) | - ((pixel & 0xff000000) >> 24); + pixel = ((pixel & 0xff00) << 8) | ((pixel & 0xff0000) >> 8) | ((pixel & 0xff000000) >> 24); #endif return pixel; } @@ -222,17 +215,13 @@ namespace WebCore { // in the given pixel data. inline unsigned getComponent(uint32_t pixel, int component) const { - return ((pixel & m_bitMasks[component]) >> - m_bitShiftsRight[component]) << m_bitShiftsLeft[component]; + return ((pixel & m_bitMasks[component]) >> m_bitShiftsRight[component]) << m_bitShiftsLeft[component]; } inline unsigned getAlpha(uint32_t pixel) const { // For images without alpha, return alpha of 0xff. - if (m_bitMasks[3] == 0) - return 0xff; - - return getComponent(pixel, 3); + return m_bitMasks[3] ? getComponent(pixel, 3) : 0xff; } // Sets the current pixel to the color given by |colorIndex|. This also @@ -240,9 +229,7 @@ namespace WebCore { // right by one. inline void setI(size_t colorIndex) { - setRGBA(m_colorTable[colorIndex].rgbRed, - m_colorTable[colorIndex].rgbGreen, - m_colorTable[colorIndex].rgbBlue, 0xff); + setRGBA(m_colorTable[colorIndex].rgbRed, m_colorTable[colorIndex].rgbGreen, m_colorTable[colorIndex].rgbBlue, 0xff); } // Like setI(), but with the individual component values specified. @@ -251,8 +238,7 @@ namespace WebCore { unsigned blue, unsigned alpha) { - m_buffer->setRGBA(m_coord.x(), m_coord.y(), red, green, blue, - alpha); + m_buffer->setRGBA(m_coord.x(), m_coord.y(), red, green, blue, alpha); m_coord.move(1, 0); } diff --git a/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp b/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp index 1124bd2..807d57c 100644 --- a/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp +++ b/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp @@ -30,7 +30,7 @@ namespace WebCore { GIFImageDecoder::GIFImageDecoder() - : m_frameCountValid(true) + : m_alreadyScannedThisDataForFrameCount(true) , m_repetitionCount(cAnimationLoopOnce) , m_readOffset(0) { @@ -40,56 +40,45 @@ GIFImageDecoder::~GIFImageDecoder() { } -// Take the data and store it. void GIFImageDecoder::setData(SharedBuffer* data, bool allDataReceived) { if (m_failed) return; - // Cache our new data. ImageDecoder::setData(data, allDataReceived); - // Our frame count is now unknown. - m_frameCountValid = false; + // We need to rescan the frame count, as the new data may have changed it. + m_alreadyScannedThisDataForFrameCount = false; - // Create the GIF reader. if (!m_reader && !m_failed) m_reader.set(new GIFImageReader(this)); } -// Whether or not the size information has been decoded yet. bool GIFImageDecoder::isSizeAvailable() { if (!ImageDecoder::isSizeAvailable() && !failed() && m_reader) - decode(GIFSizeQuery, 0); + decode(0, GIFSizeQuery); return ImageDecoder::isSizeAvailable(); } -// The total number of frames for the image. Will scan the image data for the answer -// (without necessarily decoding all of the individual frames). size_t GIFImageDecoder::frameCount() { - // If the decoder had an earlier error, we will just return what we had decoded - // so far. - if (!m_frameCountValid) { - // FIXME: Scanning all the data has O(n^2) behavior if the data were to come in really - // slowly. Might be interesting to try to clone our existing read session to preserve - // state, but for now we just crawl all the data. Note that this is no worse than what - // ImageIO does on Mac right now (it also crawls all the data again). + if (!m_alreadyScannedThisDataForFrameCount) { + // FIXME: Scanning all the data has O(n^2) behavior if the data were to + // come in really slowly. Might be interesting to try to clone our + // existing read session to preserve state, but for now we just crawl + // all the data. Note that this is no worse than what ImageIO does on + // Mac right now (it also crawls all the data again). GIFImageReader reader(0); - // This function may fail, but we want to keep any partial data it may - // have decoded, so don't mark it is invalid. If there is an overflow - // or some serious error, m_failed will have gotten set for us. reader.read((const unsigned char*)m_data->data(), m_data->size(), GIFFrameCountQuery, static_cast<unsigned>(-1)); - m_frameCountValid = true; + m_alreadyScannedThisDataForFrameCount = true; m_frameBufferCache.resize(reader.images_count); } return m_frameBufferCache.size(); } -// The number of repetitions to perform for an animation loop. int GIFImageDecoder::repetitionCount() const { // This value can arrive at any point in the image data stream. Most GIFs @@ -120,7 +109,7 @@ RGBA32Buffer* GIFImageDecoder::frameBufferAtIndex(size_t index) RGBA32Buffer& frame = m_frameBufferCache[index]; if (frame.status() != RGBA32Buffer::FrameComplete && m_reader) - decode(GIFFullQuery, index + 1); // Decode this frame. + decode(index + 1, GIFFullQuery); // Decode this frame. return &frame; } @@ -174,23 +163,11 @@ void GIFImageDecoder::clearFrameBufferCache(size_t clearBeforeFrame) } } -// Feed data to the GIF reader. -void GIFImageDecoder::decode(GIFQuery query, unsigned haltAtFrame) -{ - if (m_failed) - return; - - m_failed = !m_reader->read((const unsigned char*)m_data->data() + m_readOffset, m_data->size() - m_readOffset, query, haltAtFrame); - - if (m_failed) - m_reader.clear(); -} - -// Callbacks from the GIF reader. bool GIFImageDecoder::sizeNowAvailable(unsigned width, unsigned height) { if (!setSize(width, height)) return false; + prepareScaleDataIfNecessary(); return true; } @@ -200,94 +177,7 @@ void GIFImageDecoder::decodingHalted(unsigned bytesLeft) m_readOffset = m_data->size() - bytesLeft; } -bool GIFImageDecoder::initFrameBuffer(unsigned frameIndex) -{ - // Initialize the frame rect in our buffer. - const GIFFrameReader* frameReader = m_reader->frame_reader; - IntRect frameRect(frameReader->x_offset, frameReader->y_offset, frameReader->width, frameReader->height); - - // Make sure the frameRect doesn't extend past the bottom-right of the buffer. - if (frameRect.right() > size().width()) - frameRect.setWidth(size().width() - frameReader->x_offset); - if (frameRect.bottom() > size().height()) - frameRect.setHeight(size().height() - frameReader->y_offset); - - RGBA32Buffer* const buffer = &m_frameBufferCache[frameIndex]; - int left = upperBoundScaledX(frameRect.x()); - int right = lowerBoundScaledX(frameRect.right(), left); - int top = upperBoundScaledY(frameRect.y()); - int bottom = lowerBoundScaledY(frameRect.bottom(), top); - buffer->setRect(IntRect(left, top, right - left, bottom - top)); - - if (frameIndex == 0) { - // This is the first frame, so we're not relying on any previous data. - if (!buffer->setSize(scaledSize().width(), scaledSize().height())) { - m_failed = true; - return false; - } - } else { - // The starting state for this frame depends on the previous frame's - // disposal method. - // - // Frames that use the DisposeOverwritePrevious method are effectively - // no-ops in terms of changing the starting state of a frame compared to - // the starting state of the previous frame, so skip over them. (If the - // first frame specifies this method, it will get treated like - // DisposeOverwriteBgcolor below and reset to a completely empty image.) - const RGBA32Buffer* prevBuffer = &m_frameBufferCache[--frameIndex]; - RGBA32Buffer::FrameDisposalMethod prevMethod = - prevBuffer->disposalMethod(); - while ((frameIndex > 0) - && (prevMethod == RGBA32Buffer::DisposeOverwritePrevious)) { - prevBuffer = &m_frameBufferCache[--frameIndex]; - prevMethod = prevBuffer->disposalMethod(); - } - ASSERT(prevBuffer->status() == RGBA32Buffer::FrameComplete); - - if ((prevMethod == RGBA32Buffer::DisposeNotSpecified) || - (prevMethod == RGBA32Buffer::DisposeKeep)) { - // Preserve the last frame as the starting state for this frame. - buffer->copyBitmapData(*prevBuffer); - } else { - // We want to clear the previous frame to transparent, without - // affecting pixels in the image outside of the frame. - const IntRect& prevRect = prevBuffer->rect(); - const IntSize& bufferSize = scaledSize(); - if ((frameIndex == 0) - || prevRect.contains(IntRect(IntPoint(), bufferSize))) { - // Clearing the first frame, or a frame the size of the whole - // image, results in a completely empty image. - if (!buffer->setSize(bufferSize.width(), bufferSize.height())) { - m_failed = true; - return false; - } - } else { - // Copy the whole previous buffer, then clear just its frame. - buffer->copyBitmapData(*prevBuffer); - for (int y = prevRect.y(); y < prevRect.bottom(); ++y) { - for (int x = prevRect.x(); x < prevRect.right(); ++x) - buffer->setRGBA(x, y, 0, 0, 0, 0); - } - if ((prevRect.width() > 0) && (prevRect.height() > 0)) - buffer->setHasAlpha(true); - } - } - } - - // Update our status to be partially complete. - buffer->setStatus(RGBA32Buffer::FramePartial); - - // Reset the alpha pixel tracker for this frame. - m_currentBufferSawAlpha = false; - return true; -} - -bool GIFImageDecoder::haveDecodedRow(unsigned frameIndex, - unsigned char* rowBuffer, - unsigned char* rowEnd, - unsigned rowNumber, - unsigned repeatCount, - bool writeTransparentPixels) +bool GIFImageDecoder::haveDecodedRow(unsigned frameIndex, unsigned char* rowBuffer, unsigned char* rowEnd, unsigned rowNumber, unsigned repeatCount, bool writeTransparentPixels) { const GIFFrameReader* frameReader = m_reader->frame_reader; // The pixel data and coordinates supplied to us are relative to the frame's @@ -365,7 +255,7 @@ void GIFImageDecoder::frameComplete(unsigned frameIndex, unsigned frameDuration, // resulting buffer was non-transparent, and we can setHasAlpha(false). if (buffer.rect().contains(IntRect(IntPoint(), scaledSize()))) buffer.setHasAlpha(false); - else if (frameIndex > 0) { + else if (frameIndex) { // Tricky case. This frame does not have alpha only if everywhere // outside its rect doesn't have alpha. To know whether this is // true, we check the start state of the frame -- if it doesn't have @@ -375,8 +265,7 @@ void GIFImageDecoder::frameComplete(unsigned frameIndex, unsigned frameDuration, // don't affect the start state of this frame) the same way we do in // initFrameBuffer(). const RGBA32Buffer* prevBuffer = &m_frameBufferCache[--frameIndex]; - while ((frameIndex > 0) - && (prevBuffer->disposalMethod() == RGBA32Buffer::DisposeOverwritePrevious)) + while (frameIndex && (prevBuffer->disposalMethod() == RGBA32Buffer::DisposeOverwritePrevious)) prevBuffer = &m_frameBufferCache[--frameIndex]; // Now, if we're at a DisposeNotSpecified or DisposeKeep frame, then @@ -387,8 +276,7 @@ void GIFImageDecoder::frameComplete(unsigned frameIndex, unsigned frameDuration, // The only remaining case is a DisposeOverwriteBgcolor frame. If // it had no alpha, and its rect is contained in the current frame's // rect, we know the current frame has no alpha. - if ((prevBuffer->disposalMethod() == RGBA32Buffer::DisposeOverwriteBgcolor) - && !prevBuffer->hasAlpha() && buffer.rect().contains(prevBuffer->rect())) + if ((prevBuffer->disposalMethod() == RGBA32Buffer::DisposeOverwriteBgcolor) && !prevBuffer->hasAlpha() && buffer.rect().contains(prevBuffer->rect())) buffer.setHasAlpha(false); } } @@ -401,4 +289,93 @@ void GIFImageDecoder::gifComplete() m_reader.clear(); } +void GIFImageDecoder::decode(unsigned haltAtFrame, GIFQuery query) +{ + if (m_failed) + return; + + m_failed = !m_reader->read((const unsigned char*)m_data->data() + m_readOffset, m_data->size() - m_readOffset, query, haltAtFrame); + + if (m_failed) + m_reader.clear(); +} + +bool GIFImageDecoder::initFrameBuffer(unsigned frameIndex) +{ + // Initialize the frame rect in our buffer. + const GIFFrameReader* frameReader = m_reader->frame_reader; + IntRect frameRect(frameReader->x_offset, frameReader->y_offset, frameReader->width, frameReader->height); + + // Make sure the frameRect doesn't extend outside the buffer. + if (frameRect.right() > size().width()) + frameRect.setWidth(size().width() - frameReader->x_offset); + if (frameRect.bottom() > size().height()) + frameRect.setHeight(size().height() - frameReader->y_offset); + + RGBA32Buffer* const buffer = &m_frameBufferCache[frameIndex]; + int left = upperBoundScaledX(frameRect.x()); + int right = lowerBoundScaledX(frameRect.right(), left); + int top = upperBoundScaledY(frameRect.y()); + int bottom = lowerBoundScaledY(frameRect.bottom(), top); + buffer->setRect(IntRect(left, top, right - left, bottom - top)); + + if (!frameIndex) { + // This is the first frame, so we're not relying on any previous data. + if (!buffer->setSize(scaledSize().width(), scaledSize().height())) { + m_failed = true; + return false; + } + } else { + // The starting state for this frame depends on the previous frame's + // disposal method. + // + // Frames that use the DisposeOverwritePrevious method are effectively + // no-ops in terms of changing the starting state of a frame compared to + // the starting state of the previous frame, so skip over them. (If the + // first frame specifies this method, it will get treated like + // DisposeOverwriteBgcolor below and reset to a completely empty image.) + const RGBA32Buffer* prevBuffer = &m_frameBufferCache[--frameIndex]; + RGBA32Buffer::FrameDisposalMethod prevMethod = prevBuffer->disposalMethod(); + while (frameIndex && (prevMethod == RGBA32Buffer::DisposeOverwritePrevious)) { + prevBuffer = &m_frameBufferCache[--frameIndex]; + prevMethod = prevBuffer->disposalMethod(); + } + ASSERT(prevBuffer->status() == RGBA32Buffer::FrameComplete); + + if ((prevMethod == RGBA32Buffer::DisposeNotSpecified) || (prevMethod == RGBA32Buffer::DisposeKeep)) { + // Preserve the last frame as the starting state for this frame. + buffer->copyBitmapData(*prevBuffer); + } else { + // We want to clear the previous frame to transparent, without + // affecting pixels in the image outside of the frame. + const IntRect& prevRect = prevBuffer->rect(); + const IntSize& bufferSize = scaledSize(); + if (!frameIndex || prevRect.contains(IntRect(IntPoint(), scaledSize()))) { + // Clearing the first frame, or a frame the size of the whole + // image, results in a completely empty image. + if (!buffer->setSize(bufferSize.width(), bufferSize.height())) { + m_failed = true; + return false; + } + } else { + // Copy the whole previous buffer, then clear just its frame. + buffer->copyBitmapData(*prevBuffer); + for (int y = prevRect.y(); y < prevRect.bottom(); ++y) { + for (int x = prevRect.x(); x < prevRect.right(); ++x) + buffer->setRGBA(x, y, 0, 0, 0, 0); + } + if ((prevRect.width() > 0) && (prevRect.height() > 0)) + buffer->setHasAlpha(true); + } + } + } + + // Update our status to be partially complete. + buffer->setStatus(RGBA32Buffer::FramePartial); + + // Reset the alpha pixel tracker for this frame. + m_currentBufferSawAlpha = false; + return true; +} + } // namespace WebCore diff --git a/WebCore/platform/image-decoders/gif/GIFImageDecoder.h b/WebCore/platform/image-decoders/gif/GIFImageDecoder.h index 011ca96..0aa5387 100644 --- a/WebCore/platform/image-decoders/gif/GIFImageDecoder.h +++ b/WebCore/platform/image-decoders/gif/GIFImageDecoder.h @@ -37,48 +37,38 @@ namespace WebCore { class GIFImageDecoder : public ImageDecoder { public: GIFImageDecoder(); - ~GIFImageDecoder(); + virtual ~GIFImageDecoder(); - virtual String filenameExtension() const { return "gif"; } + enum GIFQuery { GIFFullQuery, GIFSizeQuery, GIFFrameCountQuery }; - // Take the data and store it. + // ImageDecoder + virtual String filenameExtension() const { return "gif"; } virtual void setData(SharedBuffer* data, bool allDataReceived); - - // Whether or not the size information has been decoded yet. virtual bool isSizeAvailable(); - - // The total number of frames for the image. Will scan the image data for the answer - // (without necessarily decoding all of the individual frames). virtual size_t frameCount(); - - // The number of repetitions to perform for an animation loop. virtual int repetitionCount() const; - virtual RGBA32Buffer* frameBufferAtIndex(size_t index); - virtual void clearFrameBufferCache(size_t clearBeforeFrame); - virtual unsigned frameDurationAtIndex(size_t index) { return 0; } - - enum GIFQuery { GIFFullQuery, GIFSizeQuery, GIFFrameCountQuery }; - - void decode(GIFQuery, unsigned haltAtFrame); - // Callbacks from the GIF reader. bool sizeNowAvailable(unsigned width, unsigned height); void decodingHalted(unsigned bytesLeft); - bool haveDecodedRow(unsigned frameIndex, unsigned char* rowBuffer, unsigned char* rowEnd, unsigned rowNumber, - unsigned repeatCount, bool writeTransparentPixels); + bool haveDecodedRow(unsigned frameIndex, unsigned char* rowBuffer, unsigned char* rowEnd, unsigned rowNumber, unsigned repeatCount, bool writeTransparentPixels); void frameComplete(unsigned frameIndex, unsigned frameDuration, RGBA32Buffer::FrameDisposalMethod disposalMethod); void gifComplete(); private: - // Called to initialize the frame buffer with the given index, based on the - // previous frame's disposal method. Returns true on success. On failure, - // this will mark the image as failed. + // If the query is GIFFullQuery, decodes the image up to (but not + // including) |haltAtFrame|. Otherwise, decodes as much as is needed to + // answer the query, ignoring bitmap data. + void decode(unsigned haltAtFrame, GIFQuery); + + // Called to initialize the frame buffer with the given index, based on + // the previous frame's disposal method. Returns true on success. On + // failure, this will mark the image as failed. bool initFrameBuffer(unsigned frameIndex); - bool m_frameCountValid; + bool m_alreadyScannedThisDataForFrameCount; bool m_currentBufferSawAlpha; mutable int m_repetitionCount; OwnPtr<GIFImageReader> m_reader; diff --git a/WebCore/platform/image-decoders/gif/GIFImageReader.cpp b/WebCore/platform/image-decoders/gif/GIFImageReader.cpp index ffb1310..755a48d 100644 --- a/WebCore/platform/image-decoders/gif/GIFImageReader.cpp +++ b/WebCore/platform/image-decoders/gif/GIFImageReader.cpp @@ -290,7 +290,7 @@ bool GIFImageReader::do_lzw(const unsigned char *q) /* Check for explicit end-of-stream code */ if (code == (clear_code + 1)) { /* end-of-stream should only appear after all image data */ - return rows_remaining == 0; + return !rows_remaining; } if (oldcode == -1) { @@ -494,11 +494,11 @@ bool GIFImageReader::read(const unsigned char *buf, unsigned len, /* All GIF files begin with "GIF87a" or "GIF89a" */ case gif_type: { - if (!strncmp((char*)q, "GIF89a", 6)) { + if (!strncmp((char*)q, "GIF89a", 6)) version = 89; - } else if (!strncmp((char*)q, "GIF87a", 6)) { + else if (!strncmp((char*)q, "GIF87a", 6)) version = 87; - } else { + else { state = gif_error; break; } @@ -712,9 +712,10 @@ bool GIFImageReader::read(const unsigned char *buf, unsigned len, // and doesn't do anything, as our streaming/buffering takes care of it all... // See: http://semmix.pl/color/exgraf/eeg24.htm GETN(1, gif_netscape_extension_block); - } else - state = gif_error; // 0,3-7 are yet to be defined netscape - // extension codes + } else { + // 0,3-7 are yet to be defined netscape extension codes + state = gif_error; + } break; } @@ -893,8 +894,7 @@ bool GIFImageReader::read(const unsigned char *buf, unsigned len, // CALLBACK: The frame is now complete. if (clientptr && frame_reader) - clientptr->frameComplete(images_decoded - 1, frame_reader->delay_time, - frame_reader->disposal_method); + clientptr->frameComplete(images_decoded - 1, frame_reader->delay_time, frame_reader->disposal_method); /* Clear state from this image */ if (frame_reader) { @@ -919,7 +919,6 @@ bool GIFImageReader::read(const unsigned char *buf, unsigned len, // Handle general errors case gif_error: - // nsGIFDecoder2::EndGIF(gs->clientptr, gs->loop_count); return false; // We shouldn't ever get here. diff --git a/WebCore/platform/image-decoders/gif/GIFImageReader.h b/WebCore/platform/image-decoders/gif/GIFImageReader.h index 14c2fb4..5982827 100644 --- a/WebCore/platform/image-decoders/gif/GIFImageReader.h +++ b/WebCore/platform/image-decoders/gif/GIFImageReader.h @@ -194,10 +194,6 @@ struct GIFImageReader { } ~GIFImageReader() { - close(); - } - - void close() { delete []global_colormap; global_colormap = 0; delete frame_reader; diff --git a/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp b/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp index a0ec4f7..1a202bc 100644 --- a/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp +++ b/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp @@ -45,9 +45,11 @@ static const size_t sizeOfDirectory = 6; static const size_t sizeOfDirEntry = 16; ICOImageDecoder::ICOImageDecoder() - : ImageDecoder() - , m_allDataReceived(false) - , m_decodedOffset(0) + : m_decodedOffset(0) +{ +} + +ICOImageDecoder::~ICOImageDecoder() { } @@ -57,10 +59,8 @@ void ICOImageDecoder::setData(SharedBuffer* data, bool allDataReceived) return; ImageDecoder::setData(data, allDataReceived); - m_allDataReceived = allDataReceived; - for (BMPReaders::iterator i(m_bmpReaders.begin()); - i != m_bmpReaders.end(); ++i) { + for (BMPReaders::iterator i(m_bmpReaders.begin()); i != m_bmpReaders.end(); ++i) { if (*i) (*i)->setData(data); } @@ -71,7 +71,7 @@ void ICOImageDecoder::setData(SharedBuffer* data, bool allDataReceived) bool ICOImageDecoder::isSizeAvailable() { if (!ImageDecoder::isSizeAvailable()) - decodeWithCheckForDataEnded(0, true); + decode(0, true); return ImageDecoder::isSizeAvailable(); } @@ -83,8 +83,7 @@ IntSize ICOImageDecoder::size() const IntSize ICOImageDecoder::frameSizeAtIndex(size_t index) const { - return (index && (index < m_dirEntries.size())) ? - m_dirEntries[index].m_size : size(); + return (index && (index < m_dirEntries.size())) ? m_dirEntries[index].m_size : size(); } bool ICOImageDecoder::setSize(unsigned width, unsigned height) @@ -101,7 +100,7 @@ bool ICOImageDecoder::setSize(unsigned width, unsigned height) size_t ICOImageDecoder::frameCount() { - decodeWithCheckForDataEnded(0, true); + decode(0, true); if (m_frameBufferCache.isEmpty()) m_frameBufferCache.resize(m_dirEntries.size()); // CAUTION: We must not resize m_frameBufferCache again after this, as @@ -116,40 +115,19 @@ RGBA32Buffer* ICOImageDecoder::frameBufferAtIndex(size_t index) if (index >= frameCount()) return 0; - // Determine the image type, and if this is a BMP, decode. - decodeWithCheckForDataEnded(index, false); - - // PNGs decode into their own framebuffers, so only use our internal cache - // for non-PNGs (BMP or unknown). - if (!m_pngDecoders[index]) - return &m_frameBufferCache[index]; - - // Fail if the size the PNGImageDecoder calculated does not match the size - // in the directory. - if (m_pngDecoders[index]->isSizeAvailable()) { - const IntSize pngSize(m_pngDecoders[index]->size()); - const IconDirectoryEntry& dirEntry = m_dirEntries[index]; - if (pngSize != dirEntry.m_size) { - setFailed(); - m_pngDecoders[index]->setFailed(); - } - } - - return m_pngDecoders[index]->frameBufferAtIndex(0); + RGBA32Buffer* buffer = &m_frameBufferCache[index]; + if (buffer->status() != RGBA32Buffer::FrameComplete) + decode(index, false); + return buffer; } // static -bool ICOImageDecoder::compareEntries(const IconDirectoryEntry& a, - const IconDirectoryEntry& b) +bool ICOImageDecoder::compareEntries(const IconDirectoryEntry& a, const IconDirectoryEntry& b) { - // Larger icons are better. + // Larger icons are better. After that, higher bit-depth icons are better. const int aEntryArea = a.m_size.width() * a.m_size.height(); const int bEntryArea = b.m_size.width() * b.m_size.height(); - if (aEntryArea != bEntryArea) - return (aEntryArea > bEntryArea); - - // Higher bit-depth icons are better. - return (a.m_bitCount > b.m_bitCount); + return (aEntryArea == bEntryArea) ? (a.m_bitCount > b.m_bitCount) : (aEntryArea > bEntryArea); } void ICOImageDecoder::setDataForPNGDecoderAtIndex(size_t index) @@ -161,21 +139,18 @@ void ICOImageDecoder::setDataForPNGDecoderAtIndex(size_t index) // Copy out PNG data to a separate vector and send to the PNG decoder. // FIXME: Save this copy by making the PNG decoder able to take an // optional offset. - RefPtr<SharedBuffer> pngData( - SharedBuffer::create(&m_data->data()[dirEntry.m_imageOffset], - m_data->size() - dirEntry.m_imageOffset)); - m_pngDecoders[index]->setData(pngData.get(), m_allDataReceived); + RefPtr<SharedBuffer> pngData(SharedBuffer::create(&m_data->data()[dirEntry.m_imageOffset], m_data->size() - dirEntry.m_imageOffset)); + m_pngDecoders[index]->setData(pngData.get(), isAllDataReceived()); } -void ICOImageDecoder::decodeWithCheckForDataEnded(size_t index, bool onlySize) +void ICOImageDecoder::decode(size_t index, bool onlySize) { if (failed()) return; // If we couldn't decode the image but we've received all the data, decoding // has failed. - if ((!decodeDirectory() || (!onlySize && !decodeAtIndex(index))) - && m_allDataReceived) + if ((!decodeDirectory() || (!onlySize && !decodeAtIndex(index))) && isAllDataReceived()) setFailed(); } @@ -186,45 +161,47 @@ bool ICOImageDecoder::decodeDirectory() return false; // Read and process directory entries. - return (m_decodedOffset >= - (sizeOfDirectory + (m_dirEntries.size() * sizeOfDirEntry))) - || processDirectoryEntries(); + return (m_decodedOffset >= (sizeOfDirectory + (m_dirEntries.size() * sizeOfDirEntry))) || processDirectoryEntries(); } bool ICOImageDecoder::decodeAtIndex(size_t index) { ASSERT(index < m_dirEntries.size()); const IconDirectoryEntry& dirEntry = m_dirEntries[index]; - if (!m_bmpReaders[index] && !m_pngDecoders[index]) { - // Image type unknown. - const ImageType imageType = imageTypeAtIndex(index); - if (imageType == BMP) { + const ImageType imageType = imageTypeAtIndex(index); + if (imageType == Unknown) + return false; // Not enough data to determine image type yet. + + if (imageType == BMP) { + if (!m_bmpReaders[index]) { // We need to have already sized m_frameBufferCache before this, and // we must not resize it again later (see caution in frameCount()). ASSERT(m_frameBufferCache.size() == m_dirEntries.size()); - m_bmpReaders[index].set( - new BMPImageReader(this, dirEntry.m_imageOffset, 0, true)); + m_bmpReaders[index].set(new BMPImageReader(this, dirEntry.m_imageOffset, 0, true)); m_bmpReaders[index]->setData(m_data.get()); m_bmpReaders[index]->setBuffer(&m_frameBufferCache[index]); - } else if (imageType == PNG) { - m_pngDecoders[index].set(new PNGImageDecoder()); - setDataForPNGDecoderAtIndex(index); - } else { - // Not enough data to determine image type yet. - return false; } - } - - if (m_bmpReaders[index]) { m_frameSize = dirEntry.m_size; bool result = m_bmpReaders[index]->decodeBMP(false); m_frameSize = IntSize(); return result; } - // For PNGs, we're now done; further decoding will happen when calling - // frameBufferAtIndex() on the PNG decoder. - return true; + if (!m_pngDecoders[index]) { + m_pngDecoders[index].set(new PNGImageDecoder()); + setDataForPNGDecoderAtIndex(index); + } + // Fail if the size the PNGImageDecoder calculated does not match the size + // in the directory. + if (m_pngDecoders[index]->isSizeAvailable() && (m_pngDecoders[index]->size() != dirEntry.m_size)) { + setFailed(); + return false; + } + m_frameBufferCache[index] = *m_pngDecoders[index]->frameBufferAtIndex(0); + if (!m_pngDecoders[index]->failed()) + return true; + setFailed(); + return false; } bool ICOImageDecoder::processDirectory() @@ -259,18 +236,14 @@ bool ICOImageDecoder::processDirectoryEntries() { // Read directory entries. ASSERT(m_decodedOffset == sizeOfDirectory); - if ((m_decodedOffset > m_data->size()) - || ((m_data->size() - m_decodedOffset) < - (m_dirEntries.size() * sizeOfDirEntry))) + if ((m_decodedOffset > m_data->size()) || ((m_data->size() - m_decodedOffset) < (m_dirEntries.size() * sizeOfDirEntry))) return false; - for (IconDirectoryEntries::iterator i(m_dirEntries.begin()); - i != m_dirEntries.end(); ++i) + for (IconDirectoryEntries::iterator i(m_dirEntries.begin()); i != m_dirEntries.end(); ++i) *i = readDirectoryEntry(); // Updates m_decodedOffset. // Make sure the specified image offsets are past the end of the directory // entries. - for (IconDirectoryEntries::iterator i(m_dirEntries.begin()); - i != m_dirEntries.end(); ++i) { + for (IconDirectoryEntries::iterator i(m_dirEntries.begin()); i != m_dirEntries.end(); ++i) { if (i->m_imageOffset < m_decodedOffset) { setFailed(); return false; @@ -309,8 +282,7 @@ ICOImageDecoder::IconDirectoryEntry ICOImageDecoder::readDirectoryEntry() // this isn't quite what the bitmap info header says later, as we only use // this value to determine which icon entry is best. if (!entry.m_bitCount) { - int colorCount = - static_cast<uint8_t>(m_data->data()[m_decodedOffset + 2]); + int colorCount = static_cast<uint8_t>(m_data->data()[m_decodedOffset + 2]); if (!colorCount) colorCount = 256; // Vague in the spec, needed by real-world icons. for (--colorCount; colorCount; colorCount >>= 1) diff --git a/WebCore/platform/image-decoders/ico/ICOImageDecoder.h b/WebCore/platform/image-decoders/ico/ICOImageDecoder.h index 6117e06..c1f29c9 100644 --- a/WebCore/platform/image-decoders/ico/ICOImageDecoder.h +++ b/WebCore/platform/image-decoders/ico/ICOImageDecoder.h @@ -41,6 +41,7 @@ namespace WebCore { class ICOImageDecoder : public ImageDecoder { public: ICOImageDecoder(); + virtual ~ICOImageDecoder(); // ImageDecoder virtual String filenameExtension() const { return "ico"; } @@ -67,19 +68,16 @@ namespace WebCore { // Returns true if |a| is a preferable icon entry to |b|. // Larger sizes, or greater bitdepths at the same size, are preferable. - static bool compareEntries(const IconDirectoryEntry& a, - const IconDirectoryEntry& b); + static bool compareEntries(const IconDirectoryEntry& a, const IconDirectoryEntry& b); inline uint16_t readUint16(int offset) const { - return BMPImageReader::readUint16(m_data.get(), - m_decodedOffset + offset); + return BMPImageReader::readUint16(m_data.get(), m_decodedOffset + offset); } inline uint32_t readUint32(int offset) const { - return BMPImageReader::readUint32(m_data.get(), - m_decodedOffset + offset); + return BMPImageReader::readUint32(m_data.get(), m_decodedOffset + offset); } // If the desired PNGImageDecoder exists, gives it the appropriate data. @@ -88,12 +86,7 @@ namespace WebCore { // Decodes the entry at |index|. If |onlySize| is true, stops decoding // after calculating the image size. If decoding fails but there is no // more data coming, sets the "decode failure" flag. - // - // NOTE: If the desired entry is a PNG, this doesn't actually trigger - // decoding, it merely ensures the decoder is created and ready to - // decode. The caller will then call a function on the PNGImageDecoder - // that actually triggers decoding. - void decodeWithCheckForDataEnded(size_t index, bool onlySize); + void decode(size_t index, bool onlySize); // Decodes the directory and directory entries at the beginning of the // data, and initializes members. Returns true if all decoding @@ -120,9 +113,6 @@ namespace WebCore { // if the type could be determined. ImageType imageTypeAtIndex(size_t); - // True if we've seen all the data. - bool m_allDataReceived; - // An index into |m_data| representing how much we've already decoded. // Note that this only tracks data _this_ class decodes; once the // BMPImageReader takes over this will not be updated further. diff --git a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp index aaa9047..9ed20b6 100644 --- a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp +++ b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp @@ -59,18 +59,17 @@ extern "C" { namespace WebCore { struct decoder_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields for IJG library*/ - jmp_buf setjmp_buffer; /* For handling catastropic errors */ + struct jpeg_error_mgr pub; // "public" fields for IJG library + jmp_buf setjmp_buffer; // For handling catastropic errors }; enum jstate { - JPEG_HEADER, /* Reading JFIF headers */ + JPEG_HEADER, // Reading JFIF headers JPEG_START_DECOMPRESS, - JPEG_DECOMPRESS_PROGRESSIVE, /* Output progressive pixels */ - JPEG_DECOMPRESS_SEQUENTIAL, /* Output sequential pixels */ + JPEG_DECOMPRESS_PROGRESSIVE, // Output progressive pixels + JPEG_DECOMPRESS_SEQUENTIAL, // Output sequential pixels JPEG_DONE, - JPEG_SINK_NON_JPEG_TRAILER, /* Some image files have a */ - /* non-JPEG trailer */ + JPEG_SINK_NON_JPEG_TRAILER, // Some image files have a non-JPEG trailer JPEG_ERROR }; @@ -80,14 +79,12 @@ void skip_input_data(j_decompress_ptr jd, long num_bytes); void term_source(j_decompress_ptr jd); void error_exit(j_common_ptr cinfo); -/* - * Implementation of a JPEG src object that understands our state machine - */ +// Implementation of a JPEG src object that understands our state machine struct decoder_source_mgr { - /* public fields; must be first in this struct! */ - struct jpeg_source_mgr pub; + // public fields; must be first in this struct! + struct jpeg_source_mgr pub; - JPEGImageReader *decoder; + JPEGImageReader* decoder; }; class JPEGImageReader @@ -102,11 +99,11 @@ public: { memset(&m_info, 0, sizeof(jpeg_decompress_struct)); - /* We set up the normal JPEG error routines, then override error_exit. */ + // We set up the normal JPEG error routines, then override error_exit. m_info.err = jpeg_std_error(&m_err.pub); m_err.pub.error_exit = error_exit; - /* Allocate and initialize JPEG decompression object */ + // Allocate and initialize JPEG decompression object. jpeg_create_decompress(&m_info); decoder_source_mgr* src = 0; @@ -120,7 +117,7 @@ public: m_info.src = (jpeg_source_mgr*)src; - /* Set up callback functions. */ + // Set up callback functions. src->pub.init_source = init_source; src->pub.fill_input_buffer = fill_input_buffer; src->pub.skip_input_data = skip_input_data; @@ -148,22 +145,20 @@ public: long bytesToSkip = std::min(num_bytes, (long)src->pub.bytes_in_buffer); src->pub.bytes_in_buffer -= (size_t)bytesToSkip; src->pub.next_input_byte += bytesToSkip; - - if (num_bytes > bytesToSkip) - m_bytesToSkip = (size_t)(num_bytes - bytesToSkip); - else - m_bytesToSkip = 0; + + m_bytesToSkip = std::max(num_bytes - bytesToSkip, static_cast<long>(0)); } - bool decode(const Vector<char>& data, bool sizeOnly) { - m_decodingSizeOnly = sizeOnly; - + bool decode(const Vector<char>& data, bool onlySize) + { + m_decodingSizeOnly = onlySize; + unsigned newByteCount = data.size() - m_bufferLength; unsigned readOffset = m_bufferLength - m_info.src->bytes_in_buffer; m_info.src->bytes_in_buffer += newByteCount; m_info.src->next_input_byte = (JOCTET*)(data.data()) + readOffset; - + // If we still have bytes to skip, try to skip those now. if (m_bytesToSkip) skipBytes(m_bytesToSkip); @@ -178,172 +173,150 @@ public: } switch (m_state) { - case JPEG_HEADER: - { - /* Read file parameters with jpeg_read_header() */ - if (jpeg_read_header(&m_info, true) == JPEG_SUSPENDED) - return true; /* I/O suspension */ - - /* let libjpeg take care of gray->RGB and YCbCr->RGB conversions */ - switch (m_info.jpeg_color_space) { - case JCS_GRAYSCALE: - case JCS_RGB: - case JCS_YCbCr: - m_info.out_color_space = JCS_RGB; - break; - case JCS_CMYK: - case JCS_YCCK: - // jpeglib cannot convert these to rgb, but it can - // convert ycck to cmyk - m_info.out_color_space = JCS_CMYK; - break; - default: - m_state = JPEG_ERROR; - return false; - } - - /* - * Don't allocate a giant and superfluous memory buffer - * when the image is a sequential JPEG. - */ - m_info.buffered_image = jpeg_has_multiple_scans(&m_info); - - /* Used to set up image size so arrays can be allocated */ - jpeg_calc_output_dimensions(&m_info); - - /* - * Make a one-row-high sample array that will go away - * when done with image. Always make it big enough to - * hold an RGB row. Since this uses the IJG memory - * manager, it must be allocated before the call to - * jpeg_start_compress(). - */ - int row_stride = m_info.output_width * 4; // RGBA buffer + case JPEG_HEADER: + // Read file parameters with jpeg_read_header(). + if (jpeg_read_header(&m_info, true) == JPEG_SUSPENDED) + return true; // I/O suspension. + + // Let libjpeg take care of gray->RGB and YCbCr->RGB conversions. + switch (m_info.jpeg_color_space) { + case JCS_GRAYSCALE: + case JCS_RGB: + case JCS_YCbCr: + m_info.out_color_space = JCS_RGB; + break; + case JCS_CMYK: + case JCS_YCCK: + // jpeglib cannot convert these to rgb, but it can convert ycck + // to cmyk. + m_info.out_color_space = JCS_CMYK; + break; + default: + m_state = JPEG_ERROR; + return false; + } + // Don't allocate a giant and superfluous memory buffer when the + // image is a sequential JPEG. + m_info.buffered_image = jpeg_has_multiple_scans(&m_info); - m_samples = (*m_info.mem->alloc_sarray)((j_common_ptr) &m_info, - JPOOL_IMAGE, - row_stride, 1); + // Used to set up image size so arrays can be allocated. + jpeg_calc_output_dimensions(&m_info); - m_state = JPEG_START_DECOMPRESS; + // Make a one-row-high sample array that will go away when done with + // image. Always make it big enough to hold an RGB row. Since this + // uses the IJG memory manager, it must be allocated before the call + // to jpeg_start_compress(). + m_samples = (*m_info.mem->alloc_sarray)((j_common_ptr) &m_info, JPOOL_IMAGE, m_info.output_width * 4, 1); - // We can fill in the size now that the header is available. - if (!m_decoder->setSize(m_info.image_width, m_info.image_height)) { - m_state = JPEG_ERROR; - return false; - } + m_state = JPEG_START_DECOMPRESS; - if (m_decodingSizeOnly) { - // We can stop here. - // Reduce our buffer length and available data. - m_bufferLength -= m_info.src->bytes_in_buffer; - m_info.src->bytes_in_buffer = 0; - return true; - } + // We can fill in the size now that the header is available. + if (!m_decoder->setSize(m_info.image_width, m_info.image_height)) { + m_state = JPEG_ERROR; + return false; } - case JPEG_START_DECOMPRESS: - { - /* Set parameters for decompression */ - /* FIXME -- Should reset dct_method and dither mode - * for final pass of progressive JPEG - */ - m_info.dct_method = JDCT_ISLOW; - m_info.dither_mode = JDITHER_FS; - m_info.do_fancy_upsampling = true; - m_info.enable_2pass_quant = false; - m_info.do_block_smoothing = true; - - /* Start decompressor */ - if (!jpeg_start_decompress(&m_info)) - return true; /* I/O suspension */ - - /* If this is a progressive JPEG ... */ - m_state = (m_info.buffered_image) ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; + if (m_decodingSizeOnly) { + // We can stop here. Reduce our buffer length and available + // data. + m_bufferLength -= m_info.src->bytes_in_buffer; + m_info.src->bytes_in_buffer = 0; + return true; } - - case JPEG_DECOMPRESS_SEQUENTIAL: - { - if (m_state == JPEG_DECOMPRESS_SEQUENTIAL) { - - if (!m_decoder->outputScanlines()) - return true; /* I/O suspension */ - - /* If we've completed image output ... */ - ASSERT(m_info.output_scanline == m_info.output_height); - m_state = JPEG_DONE; - } + // FALL THROUGH + + case JPEG_START_DECOMPRESS: + // Set parameters for decompression. + // FIXME -- Should reset dct_method and dither mode for final pass + // of progressive JPEG. + m_info.dct_method = JDCT_ISLOW; + m_info.dither_mode = JDITHER_FS; + m_info.do_fancy_upsampling = true; + m_info.enable_2pass_quant = false; + m_info.do_block_smoothing = true; + + // Start decompressor. + if (!jpeg_start_decompress(&m_info)) + return true; // I/O suspension. + + // If this is a progressive JPEG ... + m_state = (m_info.buffered_image) ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; + // FALL THROUGH + + case JPEG_DECOMPRESS_SEQUENTIAL: + if (m_state == JPEG_DECOMPRESS_SEQUENTIAL) { + + if (!m_decoder->outputScanlines()) + return true; // I/O suspension. + + // If we've completed image output... + ASSERT(m_info.output_scanline == m_info.output_height); + m_state = JPEG_DONE; } + // FALL THROUGH + + case JPEG_DECOMPRESS_PROGRESSIVE: + if (m_state == JPEG_DECOMPRESS_PROGRESSIVE) { + int status; + do { + status = jpeg_consume_input(&m_info); + } while ((status != JPEG_SUSPENDED) && (status != JPEG_REACHED_EOI)); + + for (;;) { + if (!m_info.output_scanline) { + int scan = m_info.input_scan_number; + + // If we haven't displayed anything yet + // (output_scan_number == 0) and we have enough data for + // a complete scan, force output of the last full scan. + if (!m_info.output_scan_number && (scan > 1) && (status != JPEG_REACHED_EOI)) + --scan; + + if (!jpeg_start_output(&m_info, scan)) + return true; // I/O suspension. + } + + if (m_info.output_scanline == 0xffffff) + m_info.output_scanline = 0; - case JPEG_DECOMPRESS_PROGRESSIVE: - { - if (m_state == JPEG_DECOMPRESS_PROGRESSIVE) { - int status; - do { - status = jpeg_consume_input(&m_info); - } while ((status != JPEG_SUSPENDED) && - (status != JPEG_REACHED_EOI)); - - for (;;) { - if (m_info.output_scanline == 0) { - int scan = m_info.input_scan_number; - - /* if we haven't displayed anything yet (output_scan_number==0) - and we have enough data for a complete scan, force output - of the last full scan */ - if ((m_info.output_scan_number == 0) && - (scan > 1) && - (status != JPEG_REACHED_EOI)) - scan--; - - if (!jpeg_start_output(&m_info, scan)) - return true; /* I/O suspension */ - } - - if (m_info.output_scanline == 0xffffff) - m_info.output_scanline = 0; - - if (!m_decoder->outputScanlines()) { - if (m_info.output_scanline == 0) - /* didn't manage to read any lines - flag so we don't call - jpeg_start_output() multiple times for the same scan */ - m_info.output_scanline = 0xffffff; - return true; /* I/O suspension */ - } - - if (m_info.output_scanline == m_info.output_height) { - if (!jpeg_finish_output(&m_info)) - return true; /* I/O suspension */ - - if (jpeg_input_complete(&m_info) && - (m_info.input_scan_number == m_info.output_scan_number)) - break; - - m_info.output_scanline = 0; - } + if (!m_decoder->outputScanlines()) { + if (!m_info.output_scanline) + // Didn't manage to read any lines - flag so we + // don't call jpeg_start_output() multiple times for + // the same scan. + m_info.output_scanline = 0xffffff; + return true; // I/O suspension. } - m_state = JPEG_DONE; - } - } + if (m_info.output_scanline == m_info.output_height) { + if (!jpeg_finish_output(&m_info)) + return true; // I/O suspension. - case JPEG_DONE: - { - /* Finish decompression */ - if (!jpeg_finish_decompress(&m_info)) - return true; /* I/O suspension */ + if (jpeg_input_complete(&m_info) && (m_info.input_scan_number == m_info.output_scan_number)) + break; - m_state = JPEG_SINK_NON_JPEG_TRAILER; + m_info.output_scanline = 0; + } + } - /* we're done */ - break; + m_state = JPEG_DONE; } - - case JPEG_SINK_NON_JPEG_TRAILER: - break; + // FALL THROUGH - case JPEG_ERROR: - break; + case JPEG_DONE: + // Finish decompression. + if (!jpeg_finish_decompress(&m_info)) + return true; // I/O suspension. + + m_state = JPEG_SINK_NON_JPEG_TRAILER; + break; + + case JPEG_SINK_NON_JPEG_TRAILER: + break; + + case JPEG_ERROR: + break; } return true; @@ -367,10 +340,10 @@ private: JSAMPARRAY m_samples; }; -/* Override the standard error method in the IJG JPEG decoder code. */ +// Override the standard error method in the IJG JPEG decoder code. void error_exit(j_common_ptr cinfo) { - /* Return control to the setjmp point. */ + // Return control to the setjmp point. decoder_error_mgr *err = (decoder_error_mgr *) cinfo->err; longjmp(err->setjmp_buffer, -1); } @@ -388,12 +361,12 @@ void skip_input_data(j_decompress_ptr jd, long num_bytes) boolean fill_input_buffer(j_decompress_ptr jd) { // Our decode step always sets things up properly, so if this method is ever - // called, then we have hit the end of the buffer. A return value of FALSE indicates - // that we have no data to supply yet. + // called, then we have hit the end of the buffer. A return value of false + // indicates that we have no data to supply yet. return false; } -void term_source (j_decompress_ptr jd) +void term_source(j_decompress_ptr jd) { decoder_source_mgr *src = (decoder_source_mgr *)jd->src; src->decoder->decoder()->jpegComplete(); @@ -407,21 +380,17 @@ JPEGImageDecoder::~JPEGImageDecoder() { } -// Take the data and store it. void JPEGImageDecoder::setData(SharedBuffer* data, bool allDataReceived) { if (m_failed) return; - // Cache our new data. ImageDecoder::setData(data, allDataReceived); - // Create the JPEG reader. if (!m_reader && !m_failed) m_reader.set(new JPEGImageReader(this)); } -// Whether or not the size information has been decoded yet. bool JPEGImageDecoder::isSizeAvailable() { if (!ImageDecoder::isSizeAvailable() && !failed() && m_reader) @@ -434,6 +403,7 @@ bool JPEGImageDecoder::setSize(unsigned width, unsigned height) { if (!ImageDecoder::setSize(width, height)) return false; + prepareScaleDataIfNecessary(); return true; } @@ -448,23 +418,10 @@ RGBA32Buffer* JPEGImageDecoder::frameBufferAtIndex(size_t index) RGBA32Buffer& frame = m_frameBufferCache[0]; if (frame.status() != RGBA32Buffer::FrameComplete && m_reader) - // Decode this frame. - decode(); + decode(false); return &frame; } -// Feed data to the JPEG reader. -void JPEGImageDecoder::decode(bool sizeOnly) -{ - if (m_failed) - return; - - m_failed = !m_reader->decode(m_data->buffer(), sizeOnly); - - if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete)) - m_reader.clear(); -} - bool JPEGImageDecoder::outputScanlines() { if (m_frameBufferCache.isEmpty()) @@ -531,9 +488,20 @@ void JPEGImageDecoder::jpegComplete() if (m_frameBufferCache.isEmpty()) return; - // Hand back an appropriately sized buffer, even if the image ended up being empty. - RGBA32Buffer& buffer = m_frameBufferCache[0]; - buffer.setStatus(RGBA32Buffer::FrameComplete); + // Hand back an appropriately sized buffer, even if the image ended up being + // empty. + m_frameBufferCache[0].setStatus(RGBA32Buffer::FrameComplete); +} + +void JPEGImageDecoder::decode(bool onlySize) +{ + if (m_failed) + return; + + m_failed = !m_reader->decode(m_data->buffer(), onlySize); + + if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete)) + m_reader.clear(); } } diff --git a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h index d8bfd70..2a95dbe 100644 --- a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h +++ b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h @@ -38,28 +38,24 @@ namespace WebCore { class JPEGImageDecoder : public ImageDecoder { public: JPEGImageDecoder(); - ~JPEGImageDecoder(); + virtual ~JPEGImageDecoder(); + // ImageDecoder virtual String filenameExtension() const { return "jpg"; } - - // Take the data and store it. virtual void setData(SharedBuffer* data, bool allDataReceived); - - // Whether or not the size information has been decoded yet. virtual bool isSizeAvailable(); - virtual bool setSize(unsigned width, unsigned height); - virtual RGBA32Buffer* frameBufferAtIndex(size_t index); - virtual bool supportsAlpha() const { return false; } - void decode(bool sizeOnly = false); - bool outputScanlines(); void jpegComplete(); private: + // Decodes the image. If |onlySize| is true, stops decoding after + // calculating the image size. + void decode(bool onlySize); + OwnPtr<JPEGImageReader> m_reader; }; diff --git a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp index 35c8af0..36f818f 100644 --- a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp +++ b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp @@ -52,21 +52,41 @@ const double cInverseGamma = 0.45455; const unsigned long cMaxPNGSize = 1000000UL; // Called if the decoding of the image fails. -static void PNGAPI decodingFailed(png_structp png_ptr, png_const_charp error_msg); +static void PNGAPI decodingFailed(png_structp png, png_const_charp) +{ + static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->decodingFailed(); + longjmp(png->jmpbuf, 1); +} -// Callbacks given to the read struct. The first is for warnings (we want to treat a particular warning -// as an error, which is why we have to register this callback. -static void PNGAPI decodingWarning(png_structp png_ptr, png_const_charp warning_msg); +// Callbacks given to the read struct. The first is for warnings (we want to +// treat a particular warning as an error, which is why we have to register this +// callback). +static void PNGAPI decodingWarning(png_structp png, png_const_charp warningMsg) +{ + // Mozilla did this, so we will too. + // Convert a tRNS warning to be an error (see + // http://bugzilla.mozilla.org/show_bug.cgi?id=251381 ) + if (!strncmp(warningMsg, "Missing PLTE before tRNS", 24)) + png_error(png, warningMsg); +} // Called when we have obtained the header information (including the size). -static void PNGAPI headerAvailable(png_structp png_ptr, png_infop info_ptr); +static void PNGAPI headerAvailable(png_structp png, png_infop) +{ + static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->headerAvailable(); +} // Called when a row is ready. -static void PNGAPI rowAvailable(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass); +static void PNGAPI rowAvailable(png_structp png, png_bytep rowBuffer, png_uint_32 rowIndex, int interlacePass) +{ + static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->rowAvailable(rowBuffer, rowIndex, interlacePass); +} // Called when we have completely finished decoding the image. -static void PNGAPI pngComplete(png_structp png_ptr, png_infop info_ptr); +static void PNGAPI pngComplete(png_structp png, png_infop) +{ + static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->pngComplete(); +} class PNGImageReader { @@ -75,7 +95,7 @@ public: : m_readOffset(0) , m_decodingSizeOnly(false) , m_interlaceBuffer(0) - , m_hasAlpha(0) + , m_hasAlpha(false) , m_hasFinishedDecoding(false) , m_currentBufferSize(0) { @@ -89,10 +109,12 @@ public: close(); } - void close() { + void close() + { if (m_png && m_info) - png_destroy_read_struct(&m_png, &m_info, 0); // Will zero the pointers. - delete []m_interlaceBuffer; + // This will zero the pointers. + png_destroy_read_struct(&m_png, &m_info, 0); + delete[] m_interlaceBuffer; m_interlaceBuffer = 0; m_readOffset = 0; m_hasFinishedDecoding = false; @@ -106,7 +128,7 @@ public: { m_decodingSizeOnly = sizeOnly; - // We need to do the setjmp here. Otherwise bad things will happen + // We need to do the setjmp here. Otherwise bad things will happen. if (setjmp(m_png->jmpbuf)) { close(); return; @@ -134,9 +156,7 @@ public: void setReadOffset(unsigned offset) { m_readOffset = offset; } void setHasAlpha(bool b) { m_hasAlpha = b; } - void createInterlaceBuffer(int size) { - m_interlaceBuffer = new png_byte[size]; - } + void createInterlaceBuffer(int size) { m_interlaceBuffer = new png_byte[size]; } private: unsigned m_readOffset; @@ -157,21 +177,16 @@ PNGImageDecoder::~PNGImageDecoder() { } -// Take the data and store it. void PNGImageDecoder::setData(SharedBuffer* data, bool allDataReceived) { if (m_failed) return; - // Cache our new data. ImageDecoder::setData(data, allDataReceived); - // Create the PNG reader. if (!m_reader && !m_failed) m_reader.set(new PNGImageReader(this)); } - -// Whether or not the size information has been decoded yet. bool PNGImageDecoder::isSizeAvailable() { if (!ImageDecoder::isSizeAvailable() && !failed() && m_reader) @@ -191,41 +206,10 @@ RGBA32Buffer* PNGImageDecoder::frameBufferAtIndex(size_t index) RGBA32Buffer& frame = m_frameBufferCache[0]; if (frame.status() != RGBA32Buffer::FrameComplete && m_reader) // Decode this frame. - decode(); + decode(false); return &frame; } -// Feed data to the PNG reader. -void PNGImageDecoder::decode(bool sizeOnly) -{ - if (m_failed) - return; - - m_reader->decode(*m_data, sizeOnly); - - if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete)) - m_reader.clear(); -} - -void decodingFailed(png_structp png, png_const_charp errorMsg) -{ - static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->decodingFailed(); - longjmp(png->jmpbuf, 1); -} - -void decodingWarning(png_structp png, png_const_charp warningMsg) -{ - // Mozilla did this, so we will too. - // Convert a tRNS warning to be an error (documented in bugzilla.mozilla.org bug #251381) - if (!strncmp(warningMsg, "Missing PLTE before tRNS", 24)) - png_error(png, warningMsg); -} - -void headerAvailable(png_structp png, png_infop info) -{ - static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->headerAvailable(); -} - void PNGImageDecoder::decodingFailed() { m_failed = true; @@ -256,14 +240,12 @@ void PNGImageDecoder::headerAvailable() } int bitDepth, colorType, interlaceType, compressionType, filterType, channels; - png_get_IHDR(png, info, &width, &height, &bitDepth, &colorType, - &interlaceType, &compressionType, &filterType); + png_get_IHDR(png, info, &width, &height, &bitDepth, &colorType, &interlaceType, &compressionType, &filterType); // The options we set here match what Mozilla does. // Expand to ensure we use 24-bit for RGB and 32-bit for RGBA. - if (colorType == PNG_COLOR_TYPE_PALETTE || - (colorType == PNG_COLOR_TYPE_GRAY && bitDepth < 8)) + if (colorType == PNG_COLOR_TYPE_PALETTE || (colorType == PNG_COLOR_TYPE_GRAY && bitDepth < 8)) png_set_expand(png); png_bytep trns = 0; @@ -276,8 +258,7 @@ void PNGImageDecoder::headerAvailable() if (bitDepth == 16) png_set_strip_16(png); - if (colorType == PNG_COLOR_TYPE_GRAY || - colorType == PNG_COLOR_TYPE_GRAY_ALPHA) + if (colorType == PNG_COLOR_TYPE_GRAY || colorType == PNG_COLOR_TYPE_GRAY_ALPHA) png_set_gray_to_rgb(png); // Deal with gamma and keep it under our control. @@ -288,15 +269,14 @@ void PNGImageDecoder::headerAvailable() png_set_gAMA(png, info, gamma); } png_set_gamma(png, cDefaultGamma, gamma); - } - else + } else png_set_gamma(png, cDefaultGamma, cInverseGamma); // Tell libpng to send us rows for interlaced pngs. if (interlaceType == PNG_INTERLACE_ADAM7) png_set_interlace_handling(png); - // Update our info now + // Update our info now. png_read_update_info(png, info); channels = png_get_channels(png, info); ASSERT(channels == 3 || channels == 4); @@ -310,12 +290,6 @@ void PNGImageDecoder::headerAvailable() } } -void rowAvailable(png_structp png, png_bytep rowBuffer, - png_uint_32 rowIndex, int interlacePass) -{ - static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->rowAvailable(rowBuffer, rowIndex, interlacePass); -} - void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, int interlacePass) { if (m_frameBufferCache.isEmpty()) @@ -339,36 +313,36 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height()); } - if (rowBuffer == 0) + if (!rowBuffer) return; - /* libpng comments (pasted in here to explain what follows) - * - * this function is called for every row in the image. If the - * image is interlacing, and you turned on the interlace handler, - * this function will be called for every row in every pass. - * Some of these rows will not be changed from the previous pass. - * When the row is not changed, the new_row variable will be NULL. - * The rows and passes are called in order, so you don't really - * need the row_num and pass, but I'm supplying them because it - * may make your life easier. - * - * For the non-NULL rows of interlaced images, you must call - * png_progressive_combine_row() passing in the row and the - * old row. You can call this function for NULL rows (it will - * just return) and for non-interlaced images (it just does the - * memcpy for you) if it will make the code easier. Thus, you - * can just do this for all cases: - * - * png_progressive_combine_row(png_ptr, old_row, new_row); - * - * where old_row is what was displayed for previous rows. Note - * that the first pass (pass == 0 really) will completely cover - * the old row, so the rows do not have to be initialized. After - * the first pass (and only for interlaced images), you will have - * to pass the current row, and the function will combine the - * old row and the new row. - */ + // libpng comments (pasted in here to explain what follows) + /* + * this function is called for every row in the image. If the + * image is interlacing, and you turned on the interlace handler, + * this function will be called for every row in every pass. + * Some of these rows will not be changed from the previous pass. + * When the row is not changed, the new_row variable will be NULL. + * The rows and passes are called in order, so you don't really + * need the row_num and pass, but I'm supplying them because it + * may make your life easier. + * + * For the non-NULL rows of interlaced images, you must call + * png_progressive_combine_row() passing in the row and the + * old row. You can call this function for NULL rows (it will + * just return) and for non-interlaced images (it just does the + * memcpy for you) if it will make the code easier. Thus, you + * can just do this for all cases: + * + * png_progressive_combine_row(png_ptr, old_row, new_row); + * + * where old_row is what was displayed for previous rows. Note + * that the first pass (pass == 0 really) will completely cover + * the old row, so the rows do not have to be initialized. After + * the first pass (and only for interlaced images), you will have + * to pass the current row, and the function will combine the + * old row and the new row. + */ png_structp png = m_reader->pngPtr(); bool hasAlpha = m_reader->hasAlpha(); @@ -378,8 +352,7 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, if (interlaceBuffer) { row = interlaceBuffer + (rowIndex * colorChannels * size().width()); png_progressive_combine_row(png, row, rowBuffer); - } - else + } else row = rowBuffer; // Copy the data into our buffer. @@ -388,7 +361,7 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, if (destY < 0) return; bool sawAlpha = buffer.hasAlpha(); - for (int x = 0; x < width; x++) { + for (int x = 0; x < width; ++x) { png_bytep pixel = row + (m_scaled ? m_scaledColumns[x] : x) * colorChannels; unsigned alpha = hasAlpha ? pixel[3] : 255; buffer.setRGBA(x, destY, pixel[0], pixel[1], pixel[2], alpha); @@ -399,21 +372,23 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, } } -void pngComplete(png_structp png, png_infop info) -{ - static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->pngComplete(); -} - void PNGImageDecoder::pngComplete() { m_reader->setComplete(); - if (m_frameBufferCache.isEmpty()) + if (!m_frameBufferCache.isEmpty()) + m_frameBufferCache.first().setStatus(RGBA32Buffer::FrameComplete); +} + +void PNGImageDecoder::decode(bool onlySize) +{ + if (m_failed) return; - // Hand back an appropriately sized buffer, even if the image ended up being empty. - RGBA32Buffer& buffer = m_frameBufferCache[0]; - buffer.setStatus(RGBA32Buffer::FrameComplete); + m_reader->decode(*m_data, onlySize); + + if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete)) + m_reader.clear(); } } // namespace WebCore diff --git a/WebCore/platform/image-decoders/png/PNGImageDecoder.h b/WebCore/platform/image-decoders/png/PNGImageDecoder.h index 07a0b3a..ba0e19a 100644 --- a/WebCore/platform/image-decoders/png/PNGImageDecoder.h +++ b/WebCore/platform/image-decoders/png/PNGImageDecoder.h @@ -37,20 +37,14 @@ namespace WebCore { class PNGImageDecoder : public ImageDecoder { public: PNGImageDecoder(); - ~PNGImageDecoder(); + virtual ~PNGImageDecoder(); + // ImageDecoder virtual String filenameExtension() const { return "png"; } - - // Take the data and store it. virtual void setData(SharedBuffer* data, bool allDataReceived); - - // Whether or not the size information has been decoded yet. virtual bool isSizeAvailable(); - virtual RGBA32Buffer* frameBufferAtIndex(size_t index); - void decode(bool sizeOnly = false); - // Callbacks from libpng void decodingFailed(); void headerAvailable(); @@ -58,6 +52,10 @@ namespace WebCore { void pngComplete(); private: + // Decodes the image. If |onlySize| is true, stops decoding after + // calculating the image size. + void decode(bool onlySize); + OwnPtr<PNGImageReader> m_reader; }; diff --git a/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp b/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp index d3218cd..b2e5e17 100644 --- a/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp +++ b/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp @@ -42,12 +42,17 @@ RGBA32Buffer::RGBA32Buffer() { } -// The image must not have format 8888 pre multiplied... -void RGBA32Buffer::setDecodedImage(const QImage& image) +RGBA32Buffer& RGBA32Buffer::operator=(const RGBA32Buffer& other) { - m_image = image; - m_size = image.size(); - m_hasAlpha = image.hasAlphaChannel(); + if (this == &other) + return *this; + + copyBitmapData(other); + setRect(other.rect()); + setStatus(other.status()); + setDuration(other.duration()); + setDisposalMethod(other.disposalMethod()); + return *this; } void RGBA32Buffer::clear() @@ -115,17 +120,12 @@ void RGBA32Buffer::setStatus(FrameStatus status) m_status = status; } -RGBA32Buffer& RGBA32Buffer::operator=(const RGBA32Buffer& other) +// The image must not have format 8888 pre multiplied... +void RGBA32Buffer::setDecodedImage(const QImage& image) { - if (this == &other) - return *this; - - copyBitmapData(other); - setRect(other.rect()); - setStatus(other.status()); - setDuration(other.duration()); - setDisposalMethod(other.disposalMethod()); - return *this; + m_image = image; + m_size = image.size(); + m_hasAlpha = image.hasAlphaChannel(); } int RGBA32Buffer::width() const diff --git a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp index 543eca8..928524a 100644 --- a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp +++ b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp @@ -39,6 +39,22 @@ RGBA32Buffer::RGBA32Buffer() { } +RGBA32Buffer& RGBA32Buffer::operator=(const RGBA32Buffer& other) +{ + if (this == &other) + return *this; + + m_bitmap = other.m_bitmap; + // Keep the pixels locked since we will be writing directly into the + // bitmap throughout this object's lifetime. + m_bitmap.lockPixels(); + setRect(other.rect()); + setStatus(other.status()); + setDuration(other.duration()); + setDisposalMethod(other.disposalMethod()); + return *this; +} + void RGBA32Buffer::clear() { m_bitmap.reset(); @@ -105,22 +121,6 @@ void RGBA32Buffer::setStatus(FrameStatus status) m_bitmap.setDataComplete(); // Tell the bitmap it's done. } -RGBA32Buffer& RGBA32Buffer::operator=(const RGBA32Buffer& other) -{ - if (this == &other) - return *this; - - m_bitmap = other.m_bitmap; - // Keep the pixels locked since we will be writing directly into the - // bitmap throughout this object's lifetime. - m_bitmap.lockPixels(); - setRect(other.rect()); - setStatus(other.status()); - setDuration(other.duration()); - setDisposalMethod(other.disposalMethod()); - return *this; -} - int RGBA32Buffer::width() const { return m_bitmap.width(); diff --git a/WebCore/platform/mac/PasteboardMac.mm b/WebCore/platform/mac/PasteboardMac.mm index 690637a..086b272 100644 --- a/WebCore/platform/mac/PasteboardMac.mm +++ b/WebCore/platform/mac/PasteboardMac.mm @@ -300,9 +300,7 @@ void Pasteboard::writeImage(Node* node, const KURL& url, const String& title) ASSERT(node->renderer() && node->renderer()->isImage()); RenderImage* renderer = toRenderImage(node->renderer()); CachedImage* cachedImage = renderer->cachedImage(); - ASSERT(cachedImage); - - if (cachedImage->errorOccurred()) + if (!cachedImage || cachedImage->errorOccurred()) return; NSArray* types = writableTypesForImage(); diff --git a/WebCore/platform/network/brew/DNSBrew.cpp b/WebCore/platform/network/brew/DNSBrew.cpp new file mode 100644 index 0000000..ed1767a --- /dev/null +++ b/WebCore/platform/network/brew/DNSBrew.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2010 Company 100, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "DNS.h" + +#include "NotImplemented.h" + +namespace WebCore { + +void prefetchDNS(const String& hostname) +{ + // DNS prefetching is not implemented because the maximum number of UDP + // sockets is quite small in most BREW devices. + notImplemented(); +} + +} diff --git a/WebCore/platform/network/chromium/CookieJarChromium.cpp b/WebCore/platform/network/chromium/CookieJarChromium.cpp index 41cf331..e17816a 100644 --- a/WebCore/platform/network/chromium/CookieJarChromium.cpp +++ b/WebCore/platform/network/chromium/CookieJarChromium.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Google Inc. All rights reserved. + * Copyright (c) 2010, Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -39,46 +39,32 @@ namespace WebCore { void setCookies(Document* document, const KURL& url, const String& value) { - ChromiumBridge::setCookies(url, document->firstPartyForCookies(), value); + ChromiumBridge::setCookies(document, url, value); } String cookies(const Document* document, const KURL& url) { - return ChromiumBridge::cookies(url, document->firstPartyForCookies()); + return ChromiumBridge::cookies(document, url); } String cookieRequestHeaderFieldValue(const Document* document, const KURL& url) { - // FIXME: move in ChromiumBridge? - Vector<Cookie> cookies; - getRawCookies(document, url, cookies); - String cookieLine; - // FIXME: Set $Version=v; - for (size_t i = 0; i < cookies.size(); i++) { - Cookie cookie = cookies[i]; - if (i > 0) - cookieLine += "; "; - if (!cookie.name.isEmpty()) - cookieLine += cookie.name + "="; - cookieLine += cookie.value; - // FIXME: set $Path, $Domain, ... - } - return cookieLine; + return ChromiumBridge::cookieRequestHeaderFieldValue(document, url); } bool cookiesEnabled(const Document* document) { - return ChromiumBridge::cookiesEnabled(document->cookieURL(), document->firstPartyForCookies()); + return ChromiumBridge::cookiesEnabled(document); } bool getRawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies) { - return ChromiumBridge::rawCookies(url, document->firstPartyForCookies(), &rawCookies); + return ChromiumBridge::rawCookies(document, url, rawCookies); } -void deleteCookie(const Document*, const KURL& url, const String& cookieName) +void deleteCookie(const Document* document, const KURL& url, const String& cookieName) { - return ChromiumBridge::deleteCookie(url, cookieName); + return ChromiumBridge::deleteCookie(document, url, cookieName); } } // namespace WebCore diff --git a/WebCore/platform/network/chromium/ResourceRequest.cpp b/WebCore/platform/network/chromium/ResourceRequest.cpp index 5b27c1b..016bd34 100644 --- a/WebCore/platform/network/chromium/ResourceRequest.cpp +++ b/WebCore/platform/network/chromium/ResourceRequest.cpp @@ -31,7 +31,10 @@ namespace WebCore { // This is used by the loader to control the number of issued parallel load requests. unsigned initializeMaximumHTTPConnectionCountPerHost() { - return 6; + // The chromium network stack already handles limiting the number of + // parallel requests per host, so there's no need to do it here. Therefore, + // this is set to a high value that should never be hit in practice. + return 10000; } } // namespace WebCore diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp index ee8e7aa..4c59d34 100644 --- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp +++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp @@ -380,6 +380,7 @@ static gboolean parseDataUrl(gpointer callback_data) String charset = extractCharsetFromMediaType(mediaType); ResourceResponse response; + response.setURL(handle->request().url()); response.setMimeType(mimeType); if (isBase64) { @@ -387,7 +388,10 @@ static gboolean parseDataUrl(gpointer callback_data) response.setTextEncodingName(charset); client->didReceiveResponse(handle, response); - if (d->m_cancelled) + // The load may be cancelled, and the client may be destroyed + // by any of the client reporting calls, so we check, and bail + // out in either of those cases. + if (!handle->client() || d->m_cancelled) return false; // Use the GLib Base64, since WebCore's decoder isn't @@ -404,16 +408,16 @@ static gboolean parseDataUrl(gpointer callback_data) response.setTextEncodingName("UTF-16"); client->didReceiveResponse(handle, response); - if (d->m_cancelled) + if (!handle->client() || d->m_cancelled) return false; if (data.length() > 0) client->didReceiveData(handle, reinterpret_cast<const char*>(data.characters()), data.length() * sizeof(UChar), 0); - - if (d->m_cancelled) - return false; } + if (!handle->client() || d->m_cancelled) + return false; + client->didFinishLoading(handle); return false; @@ -565,6 +569,11 @@ static bool startHttp(ResourceHandle* handle) // balanced by a deref() in finishedCallback, which should always run handle->ref(); + // Make sure we have an Accept header for subresources; some sites + // want this to serve some of their subresources + if (!soup_message_headers_get_one(d->m_msg->request_headers, "Accept")) + soup_message_headers_append(d->m_msg->request_headers, "Accept", "*/*"); + // Balanced in ResourceHandleInternal's destructor; we need to // keep our own ref, because after queueing the message, the // session owns the initial reference. diff --git a/WebCore/platform/qt/PasteboardQt.cpp b/WebCore/platform/qt/PasteboardQt.cpp index 44c9eec..70ec546 100644 --- a/WebCore/platform/qt/PasteboardQt.cpp +++ b/WebCore/platform/qt/PasteboardQt.cpp @@ -151,7 +151,8 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String&) #ifndef QT_NO_CLIPBOARD CachedImage* cachedImage = toRenderImage(node->renderer())->cachedImage(); - ASSERT(cachedImage); + if (!cachedImage || cachedImage->errorOccurred()) + return; Image* image = cachedImage->image(); ASSERT(image); diff --git a/WebCore/platform/text/AtomicString.cpp b/WebCore/platform/text/AtomicString.cpp index 64c03cb..19821c0 100644 --- a/WebCore/platform/text/AtomicString.cpp +++ b/WebCore/platform/text/AtomicString.cpp @@ -248,7 +248,7 @@ PassRefPtr<StringImpl> AtomicString::add(const JSC::Identifier& identifier) return 0; UString::Rep* string = identifier.ustring().rep(); - unsigned length = string->size(); + unsigned length = string->length(); if (!length) return StringImpl::empty(); @@ -265,7 +265,7 @@ PassRefPtr<StringImpl> AtomicString::add(const JSC::UString& ustring) return 0; UString::Rep* string = ustring.rep(); - unsigned length = string->size(); + unsigned length = string->length(); if (!length) return StringImpl::empty(); @@ -282,7 +282,7 @@ AtomicStringImpl* AtomicString::find(const JSC::Identifier& identifier) return 0; UString::Rep* string = identifier.ustring().rep(); - unsigned length = string->size(); + unsigned length = string->length(); if (!length) return static_cast<AtomicStringImpl*>(StringImpl::empty()); diff --git a/WebCore/platform/text/StringImpl.cpp b/WebCore/platform/text/StringImpl.cpp index db6152d..3704c4e 100644 --- a/WebCore/platform/text/StringImpl.cpp +++ b/WebCore/platform/text/StringImpl.cpp @@ -52,36 +52,12 @@ static inline UChar* newUCharVector(unsigned n) return static_cast<UChar*>(fastMalloc(sizeof(UChar) * n)); } -static inline void deleteUCharVector(const UChar* p) -{ - fastFree(const_cast<UChar*>(p)); -} - -// Some of the factory methods create buffers using fastMalloc. -// We must ensure that all allocations of StringImpl are allocated using -// fastMalloc so that we don't have mis-matched frees. We accomplish -// this by overriding the new and delete operators. -void* StringImpl::operator new(size_t size, void* address) -{ - if (address) - return address; // Allocating using an internal buffer - return fastMalloc(size); -} - -void* StringImpl::operator new(size_t size) -{ - return fastMalloc(size); -} - -void StringImpl::operator delete(void* address) -{ - fastFree(address); -} - // This constructor is used only to create the empty string. StringImpl::StringImpl() : m_data(0) + , m_sharedBuffer(0) , m_length(0) + , m_refCountAndFlags(s_refCountIncrement | BufferInternal) , m_hash(0) { // Ensure that the hash is computed so that AtomicStringHash can call existingHash() @@ -90,35 +66,55 @@ StringImpl::StringImpl() hash(); } +inline StringImpl::StringImpl(unsigned length) + : m_data(reinterpret_cast<const UChar*>(this + 1)) + , m_sharedBuffer(0) + , m_length(length) + , m_refCountAndFlags(s_refCountIncrement | BufferInternal) + , m_hash(0) +{ + ASSERT(m_data); + ASSERT(m_length); +} + inline StringImpl::StringImpl(const UChar* characters, unsigned length) : m_data(characters) + , m_sharedBuffer(0) , m_length(length) + , m_refCountAndFlags(s_refCountIncrement | BufferOwned) , m_hash(0) { - ASSERT(characters); - ASSERT(length); - ASSERT(!bufferIsInternal()); + ASSERT(m_data); + ASSERT(m_length); } -inline StringImpl::StringImpl(unsigned length) - : m_data(reinterpret_cast<const UChar*>(this + 1)) +inline StringImpl::StringImpl(const UChar* characters, unsigned length, PassRefPtr<SharedUChar> sharedBuffer) + : m_data(characters) + , m_sharedBuffer(sharedBuffer.releaseRef()) , m_length(length) + , m_refCountAndFlags(s_refCountIncrement | BufferShared) , m_hash(0) { - ASSERT(length); - ASSERT(bufferIsInternal()); + ASSERT(m_data); + ASSERT(m_length); } StringImpl::~StringImpl() { if (inTable()) AtomicString::remove(this); - if (!bufferIsInternal()) { - SharedUChar* sharedBuffer = m_sharedBufferAndFlags.get(); - if (sharedBuffer) - sharedBuffer->deref(); - else - deleteUCharVector(m_data); + + BufferOwnership ownership = bufferOwnership(); + if (ownership != BufferInternal) { + if (ownership == BufferOwned) { + ASSERT(!m_sharedBuffer); + ASSERT(m_data); + fastFree(const_cast<UChar*>(m_data)); + } else { + ASSERT(ownership == BufferShared); + ASSERT(m_sharedBuffer); + m_sharedBuffer->deref(); + } } } @@ -976,13 +972,8 @@ PassRefPtr<StringImpl> StringImpl::create(const char* string) #if USE(JSC) PassRefPtr<StringImpl> StringImpl::create(const JSC::UString& str) { - SharedUChar* sharedBuffer = const_cast<JSC::UString*>(&str)->rep()->sharedBuffer(); - if (sharedBuffer) { - PassRefPtr<StringImpl> impl = adoptRef(new StringImpl(str.data(), str.size())); - sharedBuffer->ref(); - impl->m_sharedBufferAndFlags.set(sharedBuffer); - return impl; - } + if (SharedUChar* sharedBuffer = const_cast<JSC::UString*>(&str)->rep()->sharedBuffer()) + return adoptRef(new StringImpl(str.data(), str.size(), sharedBuffer)); return StringImpl::create(str.data(), str.size()); } @@ -1007,7 +998,7 @@ PassRefPtr<StringImpl> StringImpl::createWithTerminatingNullCharacter(const Stri data[length] = 0; terminatedString->m_length--; terminatedString->m_hash = string.m_hash; - terminatedString->m_sharedBufferAndFlags.setFlag(HasTerminatingNullCharacter); + terminatedString->m_refCountAndFlags |= s_refCountFlagHasTerminatingNullCharacter; return terminatedString.release(); } @@ -1021,12 +1012,8 @@ PassRefPtr<StringImpl> StringImpl::threadsafeCopy() const PassRefPtr<StringImpl> StringImpl::crossThreadString() { - SharedUChar* shared = sharedBuffer(); - if (shared) { - RefPtr<StringImpl> impl = adoptRef(new StringImpl(m_data, m_length)); - impl->m_sharedBufferAndFlags.set(shared->crossThreadCopy().releaseRef()); - return impl.release(); - } + if (SharedUChar* sharedBuffer = this->sharedBuffer()) + return adoptRef(new StringImpl(m_data, m_length, sharedBuffer->crossThreadCopy())); // If no shared buffer is available, create a copy. return threadsafeCopy(); @@ -1034,13 +1021,23 @@ PassRefPtr<StringImpl> StringImpl::crossThreadString() StringImpl::SharedUChar* StringImpl::sharedBuffer() { - if (m_length < minLengthToShare || bufferIsInternal()) + if (m_length < minLengthToShare) return 0; - if (!m_sharedBufferAndFlags.get()) - m_sharedBufferAndFlags.set(SharedUChar::create(new OwnFastMallocPtr<UChar>(const_cast<UChar*>(m_data))).releaseRef()); - return m_sharedBufferAndFlags.get(); -} + BufferOwnership ownership = bufferOwnership(); + if (ownership == BufferInternal) + return 0; + + if (ownership == BufferOwned) { + ASSERT(!m_sharedBuffer); + m_sharedBuffer = SharedUChar::create(new OwnFastMallocPtr<UChar>(const_cast<UChar*>(m_data))).releaseRef(); + m_refCountAndFlags = (m_refCountAndFlags & ~s_refCountMaskBufferOwnership) | BufferShared; + } + + ASSERT(bufferOwnership() == BufferShared); + ASSERT(m_sharedBuffer); + return m_sharedBuffer; +} } // namespace WebCore diff --git a/WebCore/platform/text/StringImpl.h b/WebCore/platform/text/StringImpl.h index 21f936d..65848bb 100644 --- a/WebCore/platform/text/StringImpl.h +++ b/WebCore/platform/text/StringImpl.h @@ -26,8 +26,8 @@ #include <limits.h> #include <wtf/ASCIICType.h> #include <wtf/CrossThreadRefCounted.h> +#include <wtf/Noncopyable.h> #include <wtf/OwnFastMallocPtr.h> -#include <wtf/PtrAndFlags.h> #include <wtf/RefCounted.h> #include <wtf/StringHashFunctions.h> #include <wtf/Vector.h> @@ -58,25 +58,33 @@ enum TextCaseSensitivity { TextCaseSensitive, TextCaseInsensitive }; typedef bool (*CharacterMatchFunctionPtr)(UChar); -class StringImpl : public RefCounted<StringImpl> { +class StringImpl : public Noncopyable { friend struct CStringTranslator; friend struct HashAndCharactersTranslator; friend struct UCharBufferTranslator; private: friend class ThreadGlobalData; - StringImpl(); - - // This constructor adopts the UChar* without copying the buffer. - StringImpl(const UChar*, unsigned length); - // This constructor assumes that 'this' was allocated with a UChar buffer of size 'length' at the end. + enum BufferOwnership { + BufferInternal, + BufferOwned, + BufferShared, + }; + + typedef CrossThreadRefCounted<OwnFastMallocPtr<UChar> > SharedUChar; + + // Used to create the empty string (""), automatically hashes. + StringImpl(); + // Create a StringImpl with internal storage (BufferInternal) StringImpl(unsigned length); + // Create a StringImpl adopting ownership of the provided buffer (BufferOwned) + StringImpl(const UChar*, unsigned length); + // Create a StringImpl using a shared buffer (BufferShared) + StringImpl(const UChar*, unsigned length, PassRefPtr<SharedUChar>); // For use only by AtomicString's XXXTranslator helpers. void setHash(unsigned hash) { ASSERT(!m_hash); m_hash = hash; } - typedef CrossThreadRefCounted<OwnFastMallocPtr<UChar> > SharedUChar; - public: ~StringImpl(); @@ -99,16 +107,20 @@ public: const UChar* characters() { return m_data; } unsigned length() { return m_length; } - bool hasTerminatingNullCharacter() const { return m_sharedBufferAndFlags.isFlagSet(HasTerminatingNullCharacter); } + bool hasTerminatingNullCharacter() const { return m_refCountAndFlags & s_refCountFlagHasTerminatingNullCharacter; } - bool inTable() const { return m_sharedBufferAndFlags.isFlagSet(InTable); } - void setInTable() { return m_sharedBufferAndFlags.setFlag(InTable); } + bool inTable() const { return m_refCountAndFlags & s_refCountFlagInTable; } + void setInTable() { m_refCountAndFlags |= s_refCountFlagInTable; } unsigned hash() { if (m_hash == 0) m_hash = computeHash(m_data, m_length); return m_hash; } unsigned existingHash() const { ASSERT(m_hash); return m_hash; } inline static unsigned computeHash(const UChar* data, unsigned length) { return WTF::stringHash(data, length); } inline static unsigned computeHash(const char* data) { return WTF::stringHash(data); } - + + StringImpl* ref() { m_refCountAndFlags += s_refCountIncrement; return this; } + ALWAYS_INLINE void deref() { m_refCountAndFlags -= s_refCountIncrement; if (!(m_refCountAndFlags & s_refCountMask)) delete this; } + ALWAYS_INLINE bool hasOneRef() const { return (m_refCountAndFlags & s_refCountMask) == s_refCountIncrement; } + // Returns a StringImpl suitable for use on another thread. PassRefPtr<StringImpl> crossThreadString(); // Makes a deep copy. Helpful only if you need to use a String on another thread @@ -178,31 +190,27 @@ public: operator NSString*(); #endif - void operator delete(void*); - private: - // Allocation from a custom buffer is only allowed internally to avoid - // mismatched allocators. Callers should use create(). - void* operator new(size_t size); - void* operator new(size_t size, void* address); + using Noncopyable::operator new; + void* operator new(size_t, void* inPlace) { ASSERT(inPlace); return inPlace; } static PassRefPtr<StringImpl> createStrippingNullCharactersSlowCase(const UChar*, unsigned length); // The StringImpl struct and its data may be allocated within a single heap block. // In this case, the m_data pointer is an "internal buffer", and does not need to be deallocated. - bool bufferIsInternal() { return m_data == reinterpret_cast<const UChar*>(this + 1); } + BufferOwnership bufferOwnership() const { return static_cast<BufferOwnership>(m_refCountAndFlags & s_refCountMaskBufferOwnership); } - enum StringImplFlags { - HasTerminatingNullCharacter, - InTable, - }; + static const unsigned s_refCountMask = 0xFFFFFFF0; + static const unsigned s_refCountIncrement = 0x10; + static const unsigned s_refCountFlagHasTerminatingNullCharacter = 0x8; + static const unsigned s_refCountFlagInTable = 0x4; + static const unsigned s_refCountMaskBufferOwnership = 0x3; const UChar* m_data; + SharedUChar* m_sharedBuffer; unsigned m_length; + unsigned m_refCountAndFlags; mutable unsigned m_hash; - PtrAndFlags<SharedUChar, StringImplFlags> m_sharedBufferAndFlags; - // There is a fictitious variable-length UChar array at the end, which is used - // as the internal buffer by the createUninitialized and create methods. }; bool equal(StringImpl*, StringImpl*); diff --git a/WebCore/platform/win/PasteboardWin.cpp b/WebCore/platform/win/PasteboardWin.cpp index d09769a..ffafd02 100644 --- a/WebCore/platform/win/PasteboardWin.cpp +++ b/WebCore/platform/win/PasteboardWin.cpp @@ -205,7 +205,8 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String&) ASSERT(node && node->renderer() && node->renderer()->isImage()); RenderImage* renderer = toRenderImage(node->renderer()); CachedImage* cachedImage = renderer->cachedImage(); - ASSERT(cachedImage); + if (!cachedImage || cachedImage->errorOccurred()) + return; Image* image = cachedImage->image(); ASSERT(image); diff --git a/WebCore/plugins/PluginDatabase.cpp b/WebCore/plugins/PluginDatabase.cpp index 96e8aba..703ac87 100644 --- a/WebCore/plugins/PluginDatabase.cpp +++ b/WebCore/plugins/PluginDatabase.cpp @@ -262,8 +262,9 @@ PluginPackage* PluginDatabase::findPlugin(const KURL& url, String& mimeType) if (extensionPos != -1) { String extension = filename.substring(extensionPos + 1); - mimeType = MIMETypeForExtension(extension); - plugin = pluginForMIMEType(mimeType); + String mimeTypeForExtension = MIMETypeForExtension(extension); + if (plugin = pluginForMIMEType(mimeTypeForExtension)) + mimeType = mimeTypeForExtension; } } } diff --git a/WebCore/plugins/PluginPackage.cpp b/WebCore/plugins/PluginPackage.cpp index 9c12663..5949546 100644 --- a/WebCore/plugins/PluginPackage.cpp +++ b/WebCore/plugins/PluginPackage.cpp @@ -259,7 +259,7 @@ void PluginPackage::initializeBrowserFuncs() { memset(&m_browserFuncs, 0, sizeof(m_browserFuncs)); m_browserFuncs.size = sizeof(m_browserFuncs); - m_browserFuncs.version = NP_VERSION_MINOR; + m_browserFuncs.version = NPVersion(); m_browserFuncs.geturl = NPN_GetURL; m_browserFuncs.posturl = NPN_PostURL; diff --git a/WebCore/plugins/PluginPackage.h b/WebCore/plugins/PluginPackage.h index a3937f1..aa2d272 100644 --- a/WebCore/plugins/PluginPackage.h +++ b/WebCore/plugins/PluginPackage.h @@ -55,6 +55,7 @@ namespace WebCore { const String& path() const { return m_path; } const String& fileName() const { return m_fileName; } const String& parentDirectory() const { return m_parentDirectory; } + uint16 NPVersion() const; time_t lastModified() const { return m_lastModified; } const MIMEToDescriptionsMap& mimeToDescriptions() const { return m_mimeToDescriptions; } diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp index aadf0d2..ba8d231 100644 --- a/WebCore/plugins/PluginView.cpp +++ b/WebCore/plugins/PluginView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,38 +32,39 @@ #include "Document.h" #include "DocumentLoader.h" #include "Element.h" +#include "FocusController.h" +#include "Frame.h" #include "FrameLoader.h" +#include "FrameLoaderClient.h" #include "FrameTree.h" -#include "Frame.h" #include "FrameView.h" #include "GraphicsContext.h" -#include "Image.h" #include "HTMLNames.h" #include "HTMLPlugInElement.h" +#include "Image.h" #include "KeyboardEvent.h" #include "MIMETypeRegistry.h" #include "MouseEvent.h" #include "NotImplemented.h" #include "Page.h" -#include "FocusController.h" #include "PlatformMouseEvent.h" -#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API) -#include "PluginMessageThrottlerWin.h" -#endif -#include "PluginPackage.h" -#include "ScriptController.h" -#include "ScriptValue.h" -#include "SecurityOrigin.h" #include "PluginDatabase.h" #include "PluginDebug.h" #include "PluginMainThreadScheduler.h" #include "PluginPackage.h" #include "RenderBox.h" #include "RenderObject.h" -#include "npruntime_impl.h" +#include "ScriptController.h" +#include "ScriptValue.h" +#include "SecurityOrigin.h" #include "Settings.h" +#include "npruntime_impl.h" #include <wtf/ASCIICType.h> +#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API) +#include "PluginMessageThrottlerWin.h" +#endif + #if defined(ANDROID_PLUGINS) #include "TouchEvent.h" #endif @@ -71,8 +72,8 @@ // ANDROID // TODO: Upstream to webkit.org #if USE(JSC) -#include "JSDOMWindow.h" #include "JSDOMBinding.h" +#include "JSDOMWindow.h" #include "c_instance.h" #include "runtime_root.h" #include <runtime/JSLock.h> @@ -221,8 +222,8 @@ bool PluginView::startOrAddToUnstartedList() // We only delay starting the plug-in if we're going to kick off the load // ourselves. Otherwise, the loader will try to deliver data before we've // started the plug-in. - if (!m_loadManually && !m_parentFrame->page()->canStartPlugins()) { - m_parentFrame->page()->addUnstartedPlugin(this); + if (!m_loadManually && !m_parentFrame->page()->canStartMedia()) { + m_parentFrame->page()->addMediaCanStartListener(this); m_isWaitingToStart = true; return true; } @@ -291,6 +292,13 @@ bool PluginView::start() return true; } +void PluginView::mediaCanStart() +{ + ASSERT(!m_isStarted); + if (!start()) + parentFrame()->loader()->client()->dispatchDidFailToStartPlugin(this); +} + PluginView::~PluginView() { LOG(Plugins, "PluginView::~PluginView()"); @@ -329,7 +337,7 @@ void PluginView::removeFromUnstartedListIfNecessary() if (!m_parentFrame->page()) return; - m_parentFrame->page()->removeUnstartedPlugin(this); + m_parentFrame->page()->removeMediaCanStartListener(this); } void PluginView::stop() diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h index f14eb3d..3f0b49d 100644 --- a/WebCore/plugins/PluginView.h +++ b/WebCore/plugins/PluginView.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora Ltd. All rights reserved. * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> * @@ -26,15 +26,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PluginView_H -#define PluginView_H +#ifndef PluginView_h +#define PluginView_h #include "CString.h" #include "FrameLoadRequest.h" #include "HaltablePlugin.h" #include "IntRect.h" -#include "KURL.h" -#include "PlatformString.h" +#include "MediaCanStartListener.h" #include "PluginStream.h" #include "ResourceRequest.h" #include "Timer.h" @@ -128,7 +127,7 @@ namespace WebCore { virtual void didFail(const ResourceError&) = 0; }; - class PluginView : public Widget, private PluginStreamClient, public PluginManualLoader, private HaltablePlugin { + class PluginView : public Widget, private PluginStreamClient, public PluginManualLoader, private HaltablePlugin, private MediaCanStartListener { public: static PassRefPtr<PluginView> create(Frame* parentFrame, const IntSize&, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually); virtual ~PluginView(); @@ -264,6 +263,8 @@ namespace WebCore { void invalidateWindowlessPluginRect(const IntRect&); + virtual void mediaCanStart(); + #if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API) void paintWindowedPluginIntoContext(GraphicsContext*, const IntRect&); static HDC WINAPI hookedBeginPaint(HWND, PAINTSTRUCT*); diff --git a/WebCore/plugins/android/PluginPackageAndroid.cpp b/WebCore/plugins/android/PluginPackageAndroid.cpp index ff672f4..5c3a25a 100644 --- a/WebCore/plugins/android/PluginPackageAndroid.cpp +++ b/WebCore/plugins/android/PluginPackageAndroid.cpp @@ -407,6 +407,11 @@ bool PluginPackage::equal(const PluginPackage& a, const PluginPackage& b) return true; } +uint16 PluginPackage::NPVersion() const +{ + return NP_VERSION_MINOR; +} + } // namespace WebCore #endif diff --git a/WebCore/plugins/gtk/PluginPackageGtk.cpp b/WebCore/plugins/gtk/PluginPackageGtk.cpp index bcbd519..271a4a8 100644 --- a/WebCore/plugins/gtk/PluginPackageGtk.cpp +++ b/WebCore/plugins/gtk/PluginPackageGtk.cpp @@ -29,9 +29,11 @@ #include "config.h" #include "PluginPackage.h" +#include <gio/gio.h> #include <stdio.h> #include "CString.h" +#include "GOwnPtr.h" #include "MIMETypeRegistry.h" #include "NotImplemented.h" #include "npruntime_impl.h" @@ -105,7 +107,16 @@ bool PluginPackage::load() return true; } - m_module = g_module_open((m_path.utf8()).data(), G_MODULE_BIND_LOCAL); + GOwnPtr<gchar> finalPath(g_strdup(m_path.utf8().data())); + while (g_file_test(finalPath.get(), G_FILE_TEST_IS_SYMLINK)) { + GOwnPtr<GFile> file(g_file_new_for_path(finalPath.get())); + GOwnPtr<gchar> linkPath(g_file_read_link(finalPath.get(), 0)); + + GOwnPtr<GFile> resolvedFile(g_file_resolve_relative_path(file.get(), linkPath.get())); + finalPath.set(g_file_get_path(resolvedFile.get())); + } + + m_module = g_module_open(finalPath.get(), G_MODULE_BIND_LOCAL); if (!m_module) { LOG(Plugins,"Module Load Failed :%s, Error:%s\n", (m_path.utf8()).data(), g_module_error()); @@ -146,4 +157,8 @@ abort: return false; } +uint16 PluginPackage::NPVersion() const +{ + return NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL; +} } diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp index 6d992fb..222584c 100644 --- a/WebCore/plugins/gtk/PluginViewGtk.cpp +++ b/WebCore/plugins/gtk/PluginViewGtk.cpp @@ -158,29 +158,19 @@ void PluginView::updatePluginWidget() void PluginView::setFocus() { - if (platformPluginWidget()) - gtk_widget_grab_focus(platformPluginWidget()); - + ASSERT(platformPluginWidget() == platformWidget()); Widget::setFocus(); } void PluginView::show() { - setSelfVisible(true); - - if (isParentVisible() && platformPluginWidget()) - gtk_widget_show(platformPluginWidget()); - + ASSERT(platformPluginWidget() == platformWidget()); Widget::show(); } void PluginView::hide() { - setSelfVisible(false); - - if (isParentVisible() && platformPluginWidget()) - gtk_widget_hide(platformPluginWidget()); - + ASSERT(platformPluginWidget() == platformWidget()); Widget::hide(); } diff --git a/WebCore/plugins/mac/PluginPackageMac.cpp b/WebCore/plugins/mac/PluginPackageMac.cpp index 4aef3a0..be69242 100644 --- a/WebCore/plugins/mac/PluginPackageMac.cpp +++ b/WebCore/plugins/mac/PluginPackageMac.cpp @@ -302,6 +302,10 @@ abort: return false; } +uint16 PluginPackage::NPVersion() const +{ + return NP_VERSION_MINOR; +} } // namespace WebCore #else diff --git a/WebCore/plugins/qt/PluginPackageQt.cpp b/WebCore/plugins/qt/PluginPackageQt.cpp index 8119924..74deaf6 100644 --- a/WebCore/plugins/qt/PluginPackageQt.cpp +++ b/WebCore/plugins/qt/PluginPackageQt.cpp @@ -143,4 +143,8 @@ abort: return false; } +uint16 PluginPackage::NPVersion() const +{ + return NP_VERSION_MINOR; +} } diff --git a/WebCore/plugins/symbian/PluginPackageSymbian.cpp b/WebCore/plugins/symbian/PluginPackageSymbian.cpp index d5c7533..44f8152 100644 --- a/WebCore/plugins/symbian/PluginPackageSymbian.cpp +++ b/WebCore/plugins/symbian/PluginPackageSymbian.cpp @@ -173,5 +173,10 @@ void PluginPackage::unload() delete m_pluginLoader; m_pluginLoader = 0; } + +uint16 PluginPackage::NPVersion() const +{ + return NP_VERSION_MINOR; +} } diff --git a/WebCore/plugins/win/PluginPackageWin.cpp b/WebCore/plugins/win/PluginPackageWin.cpp index 233b10c..203fb60 100644 --- a/WebCore/plugins/win/PluginPackageWin.cpp +++ b/WebCore/plugins/win/PluginPackageWin.cpp @@ -335,4 +335,8 @@ bool PluginPackage::equal(const PluginPackage& a, const PluginPackage& b) return true; } +uint16 PluginPackage::NPVersion() const +{ + return NP_VERSION_MINOR; +} } diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp index b7e6de2..9f17b0c 100644 --- a/WebCore/rendering/InlineTextBox.cpp +++ b/WebCore/rendering/InlineTextBox.cpp @@ -808,7 +808,7 @@ void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int tx, int ty, co // Always compute and store the rect associated with this marker. The computed rect is in absolute coordinates. IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, IntPoint(m_x, y), h, sPos, ePos)); - markerRect = root()->block()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox(); + markerRect = renderer()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox(); renderer()->document()->setRenderedRectForMarker(renderer()->node(), marker, markerRect); // Optionally highlight the text @@ -837,7 +837,7 @@ void InlineTextBox::computeRectForReplacementMarker(int /*tx*/, int /*ty*/, cons // Compute and store the rect associated with this marker. IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, startPoint, h, sPos, ePos)); - markerRect = root()->block()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox(); + markerRect = renderer()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox(); renderer()->document()->setRenderedRectForMarker(renderer()->node(), marker, markerRect); } diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp index eabb054..62e177d 100644 --- a/WebCore/rendering/RenderBlock.cpp +++ b/WebCore/rendering/RenderBlock.cpp @@ -1687,6 +1687,16 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty) return; } + // Check for page-break-inside: avoid, and it it's set, break and bail. + if (isPrinting && !childrenInline() && child->style()->pageBreakInside() == PBAVOID + && inRootBlockContext() + && ty + child->y() > paintInfo.rect.y() + && ty + child->y() < paintInfo.rect.bottom() + && ty + child->y() + child->height() > paintInfo.rect.bottom()) { + view()->setBestTruncatedAt(ty + child->y(), this, true); + return; + } + if (!child->hasSelfPaintingLayer() && !child->isFloating()) child->paint(info, tx, ty); @@ -1984,6 +1994,7 @@ void RenderBlock::paintSelection(PaintInfo& paintInfo, int tx, int ty) if (!hasLayer()) { FloatRect localBounds(gapRectsBounds); gapRectsBounds = localToContainerQuad(localBounds, layer->renderer()).enclosingBoundingBox(); + gapRectsBounds.move(layer->scrolledContentOffset()); } layer->addBlockSelectionGapsBounds(gapRectsBounds); } @@ -3897,6 +3908,31 @@ void RenderBlock::adjustRectForColumns(IntRect& r) const r = result; } +void RenderBlock::adjustForColumns(IntSize& offset, const IntPoint& point) const +{ + if (!hasColumns()) + return; + + // FIXME: This is incorrect for right-to-left columns. + + Vector<IntRect>& columnRects = *this->columnRects(); + + int gapWidth = columnGap(); + int xOffset = 0; + int yOffset = 0; + size_t columnCount = columnRects.size(); + for (size_t i = 0; i < columnCount; ++i) { + IntRect columnRect = columnRects[i]; + if (point.y() < columnRect.bottom() + yOffset) { + offset.expand(xOffset, -yOffset); + return; + } + + xOffset += columnRect.width() + gapWidth; + yOffset += columnRect.height(); + } +} + void RenderBlock::calcPrefWidths() { ASSERT(prefWidthsDirty()); diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h index d1d105a..c1f8dde 100644 --- a/WebCore/rendering/RenderBlock.h +++ b/WebCore/rendering/RenderBlock.h @@ -128,6 +128,7 @@ public: void clearTruncation(); void adjustRectForColumns(IntRect&) const; + virtual void adjustForColumns(IntSize&, const IntPoint&) const; void addContinuationWithOutline(RenderInline*); diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp index 92c3d99..66a88e2 100644 --- a/WebCore/rendering/RenderBox.cpp +++ b/WebCore/rendering/RenderBox.cpp @@ -980,7 +980,7 @@ void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool } else fixed |= isFixedPos; - IntSize containerOffset = offsetFromContainer(o); + IntSize containerOffset = offsetFromContainer(o, roundedIntPoint(transformState.mappedPoint())); bool preserve3D = useTransforms && (o->style()->preserves3D() || style()->preserves3D()); if (useTransforms && shouldUseTransformFromContainer(o)) { @@ -1021,7 +1021,7 @@ void RenderBox::mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, Transfor o->mapAbsoluteToLocalPoint(fixed, useTransforms, transformState); - IntSize containerOffset = offsetFromContainer(o); + IntSize containerOffset = offsetFromContainer(o, IntPoint()); bool preserve3D = useTransforms && (o->style()->preserves3D() || style()->preserves3D()); if (useTransforms && shouldUseTransformFromContainer(o)) { @@ -1032,7 +1032,7 @@ void RenderBox::mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, Transfor transformState.move(-containerOffset.width(), -containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform); } -IntSize RenderBox::offsetFromContainer(RenderObject* o) const +IntSize RenderBox::offsetFromContainer(RenderObject* o, const IntPoint& point) const { ASSERT(o == container()); @@ -1041,14 +1041,9 @@ IntSize RenderBox::offsetFromContainer(RenderObject* o) const offset += relativePositionOffset(); if (!isInline() || isReplaced()) { - RenderBlock* cb; - if (o->isBlockFlow() && style()->position() != AbsolutePosition && style()->position() != FixedPosition - && (cb = toRenderBlock(o))->hasColumns()) { - IntRect rect(x(), y(), 1, 1); - cb->adjustRectForColumns(rect); - offset.expand(rect.x(), rect.y()); - } else - offset.expand(x(), y()); + if (style()->position() != AbsolutePosition && style()->position() != FixedPosition) + o->adjustForColumns(offset, IntPoint(point.x() + x(), point.y() + y())); + offset.expand(x(), y()); } if (o->hasOverflowClip()) diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h index 401a46d..2ee368d 100644 --- a/WebCore/rendering/RenderBox.h +++ b/WebCore/rendering/RenderBox.h @@ -173,7 +173,7 @@ public: int overrideHeight() const; virtual void setOverrideSize(int); - virtual IntSize offsetFromContainer(RenderObject*) const; + virtual IntSize offsetFromContainer(RenderObject*, const IntPoint&) const; int calcBorderBoxWidth(int width) const; int calcBorderBoxHeight(int height) const; diff --git a/WebCore/rendering/RenderFileUploadControl.cpp b/WebCore/rendering/RenderFileUploadControl.cpp index 59cbacf..a31442a 100644 --- a/WebCore/rendering/RenderFileUploadControl.cpp +++ b/WebCore/rendering/RenderFileUploadControl.cpp @@ -114,15 +114,27 @@ String RenderFileUploadControl::acceptTypes() return static_cast<HTMLInputElement*>(node())->accept(); } +void RenderFileUploadControl::iconForFiles(const Vector<String>& filenames) +{ + if (Chrome* chromePointer = chrome()) + chromePointer->iconForFiles(filenames, m_fileChooser); +} + void RenderFileUploadControl::click() { + if (Chrome* chromePointer = chrome()) + chromePointer->runOpenPanel(node()->document()->frame(), m_fileChooser); +} + +Chrome* RenderFileUploadControl::chrome() const +{ Frame* frame = node()->document()->frame(); if (!frame) - return; + return 0; Page* page = frame->page(); if (!page) - return; - page->chrome()->runOpenPanel(frame, m_fileChooser); + return 0; + return page->chrome(); } void RenderFileUploadControl::updateFromElement() diff --git a/WebCore/rendering/RenderFileUploadControl.h b/WebCore/rendering/RenderFileUploadControl.h index dcdce4d..454041a 100644 --- a/WebCore/rendering/RenderFileUploadControl.h +++ b/WebCore/rendering/RenderFileUploadControl.h @@ -26,6 +26,7 @@ namespace WebCore { +class Chrome; class HTMLInputElement; // Each RenderFileUploadControl contains a RenderButton (for opening the file chooser), and @@ -41,16 +42,11 @@ public: void click(); - void valueChanged(); - void receiveDroppedFiles(const Vector<String>&); String buttonValue(); String fileTextValue() const; - bool allowsMultipleFiles(); - String acceptTypes(); - private: virtual const char* renderName() const { return "RenderFileUploadControl"; } @@ -60,6 +56,14 @@ private: virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); + // FileChooserClient methods. + void valueChanged(); + void repaint() { RenderBlock::repaint(); } + bool allowsMultipleFiles(); + String acceptTypes(); + void iconForFiles(const Vector<String>&); + + Chrome* chrome() const; int maxFilenameWidth() const; PassRefPtr<RenderStyle> createButtonStyle(const RenderStyle* parentStyle) const; diff --git a/WebCore/rendering/RenderForeignObject.cpp b/WebCore/rendering/RenderForeignObject.cpp index 5bb4439..aa28ff0 100644 --- a/WebCore/rendering/RenderForeignObject.cpp +++ b/WebCore/rendering/RenderForeignObject.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2006 Apple Computer, Inc. * Copyright (C) 2009 Google, Inc. + * Copyright (C) Research In Motion Limited 2010. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -27,9 +28,9 @@ #include "GraphicsContext.h" #include "RenderView.h" #include "SVGForeignObjectElement.h" -#include "SVGLength.h" #include "SVGRenderSupport.h" -#include "SVGTransformList.h" +#include "SVGSVGElement.h" +#include "TransformState.h" namespace WebCore { @@ -38,22 +39,18 @@ RenderForeignObject::RenderForeignObject(SVGForeignObjectElement* node) { } -FloatPoint RenderForeignObject::translationForAttributes() const -{ - SVGForeignObjectElement* foreign = static_cast<SVGForeignObjectElement*>(node()); - return FloatPoint(foreign->x().value(foreign), foreign->y().value(foreign)); -} - void RenderForeignObject::paint(PaintInfo& paintInfo, int, int) { if (paintInfo.context->paintingDisabled()) return; - // Copy the paint info so that modifications to the damage rect do not affect callers - PaintInfo childPaintInfo = paintInfo; + PaintInfo childPaintInfo(paintInfo); childPaintInfo.context->save(); - applyTransformToPaintInfo(childPaintInfo, localToParentTransform()); - childPaintInfo.context->clip(clipRect(0, 0)); + + applyTransformToPaintInfo(childPaintInfo, localTransform()); + + if (SVGRenderBase::isOverflowHidden(this)) + childPaintInfo.context->clip(m_viewport); float opacity = style()->opacity(); if (opacity < 1.0f) @@ -67,32 +64,33 @@ void RenderForeignObject::paint(PaintInfo& paintInfo, int, int) childPaintInfo.context->restore(); } -FloatRect RenderForeignObject::objectBoundingBox() const +IntRect RenderForeignObject::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) { - return borderBoxRect(); + return SVGRenderBase::clippedOverflowRectForRepaint(this, repaintContainer); } -FloatRect RenderForeignObject::repaintRectInLocalCoordinates() const +void RenderForeignObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) { - // HACK: to maintain historical LayoutTest results for now. - // RenderForeignObject is a RenderBlock (not a RenderSVGModelObject) so this - // should not affect repaint correctness. But it should really be: - // return borderBoxRect(); - return FloatRect(); + SVGRenderBase::computeRectForRepaint(this, repaintContainer, repaintRect, fixed); } -void RenderForeignObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& rect, bool fixed) +const AffineTransform& RenderForeignObject::localToParentTransform() const { - rect = localToParentTransform().mapRect(rect); - style()->svgStyle()->inflateForShadow(rect); - RenderBlock::computeRectForRepaint(repaintContainer, rect, fixed); + m_localToParentTransform = localTransform(); + m_localToParentTransform.translate(m_viewport.x(), m_viewport.y()); + return m_localToParentTransform; } -const AffineTransform& RenderForeignObject::localToParentTransform() const +void RenderForeignObject::calcWidth() { - FloatPoint attributeTranslation(translationForAttributes()); - m_localToParentTransform = localTransform().translateRight(attributeTranslation.x(), attributeTranslation.y()); - return m_localToParentTransform; + // FIXME: Investigate in size rounding issues + setWidth(static_cast<int>(roundf(m_viewport.width()))); +} + +void RenderForeignObject::calcHeight() +{ + // FIXME: Investigate in size rounding issues + setHeight(static_cast<int>(roundf(m_viewport.height()))); } void RenderForeignObject::layout() @@ -101,18 +99,36 @@ void RenderForeignObject::layout() ASSERT(!view()->layoutStateEnabled()); // RenderSVGRoot disables layoutState for the SVG rendering tree. LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); - m_localTransform = static_cast<SVGForeignObjectElement*>(node())->animatedLocalTransform(); + SVGForeignObjectElement* foreign = static_cast<SVGForeignObjectElement*>(node()); + m_localTransform = foreign->animatedLocalTransform(); + + // Cache viewport boundaries + FloatPoint viewportLocation(foreign->x().value(foreign), foreign->y().value(foreign)); + m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width().value(foreign), foreign->height().value(foreign))); + + // Set box origin to the foreignObject x/y translation, so positioned objects in XHTML content get correct + // positions. A regular RenderBoxModelObject would pull this information from RenderStyle - in SVG those + // properties are ignored for non <svg> elements, so we mimic what happens when specifying them through CSS. + + // FIXME: Investigate in location rounding issues - only affects RenderForeignObject & RenderSVGText + setLocation(roundedIntPoint(viewportLocation)); RenderBlock::layout(); - repainter.repaintAfterLayout(); + repainter.repaintAfterLayout(); setNeedsLayout(false); } bool RenderForeignObject::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) { - FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent); - return RenderBlock::nodeAtPoint(request, result, static_cast<int>(localPoint.x()), static_cast<int>(localPoint.y()), 0, 0, hitTestAction); + FloatPoint localPoint = localTransform().inverse().mapPoint(pointInParent); + + // Early exit if local point is not contained in clipped viewport area + if (SVGRenderBase::isOverflowHidden(this) && !m_viewport.contains(localPoint)) + return false; + + IntPoint roundedLocalPoint = roundedIntPoint(localPoint); + return RenderBlock::nodeAtPoint(request, result, roundedLocalPoint.x(), roundedLocalPoint.y(), 0, 0, hitTestAction); } bool RenderForeignObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction) @@ -121,11 +137,14 @@ bool RenderForeignObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int return false; } -void RenderForeignObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const +void RenderForeignObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState) const { + // When crawling up the hierachy starting from foreignObject child content, useTransforms may not be set to true. + if (!useTransforms) + useTransforms = true; SVGRenderBase::mapLocalToContainer(this, repaintContainer, fixed, useTransforms, transformState); } -} // namespace WebCore +} -#endif // ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT) +#endif diff --git a/WebCore/rendering/RenderForeignObject.h b/WebCore/rendering/RenderForeignObject.h index f32069c..bb6b555 100644 --- a/WebCore/rendering/RenderForeignObject.h +++ b/WebCore/rendering/RenderForeignObject.h @@ -21,8 +21,8 @@ #ifndef RenderForeignObject_h #define RenderForeignObject_h -#if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT) +#if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT) #include "AffineTransform.h" #include "FloatPoint.h" #include "RenderSVGBlock.h" @@ -39,15 +39,15 @@ public: virtual void paint(PaintInfo&, int parentX, int parentY); - virtual const AffineTransform& localToParentTransform() const; - + virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer); virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false); + virtual bool requiresLayer() const { return false; } virtual void layout(); - virtual FloatRect objectBoundingBox() const; - virtual FloatRect strokeBoundingBox() const { return borderBoxRect(); } - virtual FloatRect repaintRectInLocalCoordinates() const; + virtual FloatRect objectBoundingBox() const { return m_viewport; } + virtual FloatRect strokeBoundingBox() const { return m_viewport; } + virtual FloatRect repaintRectInLocalCoordinates() const { return m_viewport; } virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction); virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); @@ -56,15 +56,18 @@ public: virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const; private: - FloatPoint translationForAttributes() const; + virtual void calcWidth(); + virtual void calcHeight(); + virtual const AffineTransform& localToParentTransform() const; virtual AffineTransform localTransform() const { return m_localTransform; } + FloatRect m_viewport; AffineTransform m_localTransform; mutable AffineTransform m_localToParentTransform; }; -} // namespace WebCore +} -#endif // ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT) -#endif // RenderForeignObject_h +#endif +#endif diff --git a/WebCore/rendering/RenderInline.cpp b/WebCore/rendering/RenderInline.cpp index 9571751..d254835 100644 --- a/WebCore/rendering/RenderInline.cpp +++ b/WebCore/rendering/RenderInline.cpp @@ -710,7 +710,7 @@ void RenderInline::computeRectForRepaint(RenderBoxModelObject* repaintContainer, o->computeRectForRepaint(repaintContainer, rect, fixed); } -IntSize RenderInline::offsetFromContainer(RenderObject* container) const +IntSize RenderInline::offsetFromContainer(RenderObject* container, const IntPoint& point) const { ASSERT(container == this->container()); @@ -718,13 +718,7 @@ IntSize RenderInline::offsetFromContainer(RenderObject* container) const if (isRelPositioned()) offset += relativePositionOffset(); - if (!isInline() || isReplaced()) { - RenderBlock* cb; - if (container->isBlockFlow() && (cb = toRenderBlock(container))->hasColumns()) { - IntRect rect(0, 0, 1, 1); - cb->adjustRectForColumns(rect); - } - } + container->adjustForColumns(offset, point); if (container->hasOverflowClip()) offset -= toRenderBox(container)->layer()->scrolledContentOffset(); @@ -753,7 +747,7 @@ void RenderInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, b if (!o) return; - IntSize containerOffset = offsetFromContainer(o); + IntSize containerOffset = offsetFromContainer(o, roundedIntPoint(transformState.mappedPoint())); bool preserve3D = useTransforms && (o->style()->preserves3D() || style()->preserves3D()); if (useTransforms && shouldUseTransformFromContainer(o)) { @@ -785,7 +779,7 @@ void RenderInline::mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, Trans o->mapAbsoluteToLocalPoint(fixed, useTransforms, transformState); - IntSize containerOffset = offsetFromContainer(o); + IntSize containerOffset = offsetFromContainer(o, IntPoint()); bool preserve3D = useTransforms && (o->style()->preserves3D() || style()->preserves3D()); if (useTransforms && shouldUseTransformFromContainer(o)) { diff --git a/WebCore/rendering/RenderInline.h b/WebCore/rendering/RenderInline.h index d35aa85..7fcb516 100644 --- a/WebCore/rendering/RenderInline.h +++ b/WebCore/rendering/RenderInline.h @@ -44,7 +44,7 @@ public: virtual void absoluteRects(Vector<IntRect>&, int tx, int ty); virtual void absoluteQuads(Vector<FloatQuad>&); - virtual IntSize offsetFromContainer(RenderObject*) const; + virtual IntSize offsetFromContainer(RenderObject*, const IntPoint&) const; IntRect linesBoundingBox() const; IntRect linesVisibleOverflowBoundingBox() const; diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp index 6dbb413..03a1e75 100644 --- a/WebCore/rendering/RenderLayer.cpp +++ b/WebCore/rendering/RenderLayer.cpp @@ -1227,7 +1227,9 @@ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repai #if USE(ACCELERATED_COMPOSITING) if (compositor()->inCompositingMode()) { - if (RenderLayer* compositingAncestor = ancestorCompositingLayer()) { + // Our stacking context is guaranteed to contain all of our descendants that may need + // repositioning, so update compositing layers from there. + if (RenderLayer* compositingAncestor = stackingContext()->enclosingCompositingLayer()) { bool isUpdateRoot = true; compositingAncestor->backing()->updateAfterLayout(RenderLayerBacking::AllDescendants, isUpdateRoot); } diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp index 3f60557..f637e3c 100644 --- a/WebCore/rendering/RenderLayerBacking.cpp +++ b/WebCore/rendering/RenderLayerBacking.cpp @@ -38,6 +38,7 @@ #include "GraphicsLayer.h" #include "HTMLCanvasElement.h" #include "HTMLElement.h" +#include "HTMLMediaElement.h" #include "HTMLNames.h" #include "InspectorTimelineAgent.h" #include "KeyframeList.h" @@ -215,9 +216,14 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration() PluginWidget* pluginWidget = static_cast<PluginWidget*>(toRenderEmbeddedObject(renderer())->widget()); m_graphicsLayer->setContentsToMedia(pluginWidget->platformLayer()); } - +#if ENABLE(VIDEO) + else if (renderer()->isVideo()) { + HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(renderer()->node()); + m_graphicsLayer->setContentsToMedia(mediaElement->platformLayer()); + } +#endif #if ENABLE(3D_CANVAS) - if (is3DCanvas(renderer())) { + else if (is3DCanvas(renderer())) { HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer()->node()); WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(canvas->renderingContext()); if (context->graphicsContext3D()->platformGraphicsContext3D()) diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp index 1d1e7c2..e70de96 100644 --- a/WebCore/rendering/RenderObject.cpp +++ b/WebCore/rendering/RenderObject.cpp @@ -69,6 +69,7 @@ #endif #if ENABLE(SVG) +#include "RenderSVGResource.h" #include "SVGRenderSupport.h" #endif @@ -1765,6 +1766,11 @@ void RenderObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, b if (!o) return; + IntSize columnOffset; + o->adjustForColumns(columnOffset, roundedIntPoint(transformState.mappedPoint())); + if (!columnOffset.isZero()) + transformState.move(columnOffset); + if (o->hasOverflowClip()) transformState.move(-toRenderBox(o)->layer()->scrolledContentOffset()); @@ -1821,18 +1827,23 @@ void RenderObject::getTransformFromContainer(const RenderObject* containerObject FloatQuad RenderObject::localToContainerQuad(const FloatQuad& localQuad, RenderBoxModelObject* repaintContainer, bool fixed) const { - TransformState transformState(TransformState::ApplyTransformDirection, FloatPoint(), &localQuad); + // Track the point at the center of the quad's bounding box. As mapLocalToContainer() calls offsetFromContainer(), + // it will use that point as the reference point to decide which column's transform to apply in multiple-column blocks. + TransformState transformState(TransformState::ApplyTransformDirection, localQuad.boundingBox().center(), &localQuad); mapLocalToContainer(repaintContainer, fixed, true, transformState); transformState.flatten(); return transformState.lastPlanarQuad(); } -IntSize RenderObject::offsetFromContainer(RenderObject* o) const +IntSize RenderObject::offsetFromContainer(RenderObject* o, const IntPoint& point) const { ASSERT(o == container()); IntSize offset; + + o->adjustForColumns(offset, point); + if (o->hasOverflowClip()) offset -= toRenderBox(o)->layer()->scrolledContentOffset(); @@ -1842,6 +1853,7 @@ IntSize RenderObject::offsetFromContainer(RenderObject* o) const IntSize RenderObject::offsetFromAncestorContainer(RenderObject* container) const { IntSize offset; + IntPoint referencePoint; const RenderObject* currContainer = this; do { RenderObject* nextContainer = currContainer->container(); @@ -1849,7 +1861,9 @@ IntSize RenderObject::offsetFromAncestorContainer(RenderObject* container) const if (!nextContainer) break; ASSERT(!currContainer->hasTransform()); - offset += currContainer->offsetFromContainer(nextContainer); + IntSize currentOffset = currContainer->offsetFromContainer(nextContainer, referencePoint); + offset += currentOffset; + referencePoint.move(currentOffset); currContainer = nextContainer; } while (currContainer != container); @@ -2520,6 +2534,12 @@ const SVGRenderBase* RenderObject::toSVGRenderBase() const return 0; } +RenderSVGResource* RenderObject::toRenderSVGResource() +{ + ASSERT_NOT_REACHED(); + return 0; +} + FloatRect RenderObject::objectBoundingBox() const { ASSERT_NOT_REACHED(); diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h index 6764818..791d4d0 100644 --- a/WebCore/rendering/RenderObject.h +++ b/WebCore/rendering/RenderObject.h @@ -54,6 +54,7 @@ class RenderTheme; class TransformState; class VisiblePosition; #if ENABLE(SVG) +class RenderSVGResource; class SVGRenderBase; #endif @@ -332,8 +333,10 @@ public: virtual bool isSVGText() const { return false; } virtual bool isSVGImage() const { return false; } virtual bool isSVGForeignObject() const { return false; } + virtual bool isSVGResource() const { return false; } virtual const SVGRenderBase* toSVGRenderBase() const; + virtual RenderSVGResource* toRenderSVGResource(); // Per SVG 1.1 objectBoundingBox ignores clipping, masking, filter effects, opacity and stroke-width. // This is used for all computation of objectBoundingBox relative units and by SVGLocateable::getBBox(). @@ -562,8 +565,9 @@ public: // Convert a local quad into the coordinate system of container, taking transforms into account. FloatQuad localToContainerQuad(const FloatQuad&, RenderBoxModelObject* repaintContainer, bool fixed = false) const; - // Return the offset from the container() renderer (excluding transforms) - virtual IntSize offsetFromContainer(RenderObject*) const; + // Return the offset from the container() renderer (excluding transforms). In multi-column layout, + // different offsets apply at different points, so return the offset that applies to the given point. + virtual IntSize offsetFromContainer(RenderObject*, const IntPoint&) const; // Return the offset from an object up the container() chain. Asserts that none of the intermediate objects have transforms. IntSize offsetFromAncestorContainer(RenderObject*) const; @@ -642,6 +646,10 @@ public: // that rect in the coordinate space of repaintContainer. virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false); + // If multiple-column layout results in applying an offset to the given point, add the same + // offset to the given size. + virtual void adjustForColumns(IntSize&, const IntPoint&) const { } + virtual unsigned int length() const { return 1; } bool isFloatingOrPositioned() const { return (isFloating() || isPositioned()); } diff --git a/WebCore/rendering/RenderPath.cpp b/WebCore/rendering/RenderPath.cpp index 7dbde42..bcedd38 100644 --- a/WebCore/rendering/RenderPath.cpp +++ b/WebCore/rendering/RenderPath.cpp @@ -34,9 +34,7 @@ #include "StrokeStyleApplier.h" #include "SVGPaintServer.h" #include "SVGRenderSupport.h" -#include "SVGResourceFilter.h" #include "SVGResourceMarker.h" -#include "SVGResourceMasker.h" #include "SVGStyledTransformableElement.h" #include "SVGTransformList.h" #include "SVGURIReference.h" diff --git a/WebCore/rendering/RenderRuby.cpp b/WebCore/rendering/RenderRuby.cpp index f13e2b4..4ab9d73 100644 --- a/WebCore/rendering/RenderRuby.cpp +++ b/WebCore/rendering/RenderRuby.cpp @@ -194,4 +194,4 @@ void RenderRubyAsBlock::removeChild(RenderObject* child) } // namespace WebCore -#endif +#endif // ENABLE(RUBY) diff --git a/WebCore/rendering/RenderRubyBase.cpp b/WebCore/rendering/RenderRubyBase.cpp index 65f9bc0..9b2dc9e 100644 --- a/WebCore/rendering/RenderRubyBase.cpp +++ b/WebCore/rendering/RenderRubyBase.cpp @@ -187,4 +187,4 @@ void RenderRubyBase::mergeBlockChildren(RenderRubyBase* toBase, RenderObject* fr } // namespace WebCore -#endif +#endif // ENABLE(RUBY) diff --git a/WebCore/rendering/RenderRubyRun.cpp b/WebCore/rendering/RenderRubyRun.cpp index 61be455..d91c625 100644 --- a/WebCore/rendering/RenderRubyRun.cpp +++ b/WebCore/rendering/RenderRubyRun.cpp @@ -225,4 +225,4 @@ RenderRubyRun* RenderRubyRun::staticCreateRubyRun(const RenderObject* parentRuby } // namespace WebCore -#endif +#endif // ENABLE(RUBY) diff --git a/WebCore/rendering/RenderRubyText.cpp b/WebCore/rendering/RenderRubyText.cpp index 1cf2b9e..12e8fea 100644 --- a/WebCore/rendering/RenderRubyText.cpp +++ b/WebCore/rendering/RenderRubyText.cpp @@ -51,4 +51,4 @@ bool RenderRubyText::isChildAllowed(RenderObject* child, RenderStyle*) const } // namespace WebCore -#endif +#endif // ENABLE(RUBY) diff --git a/WebCore/rendering/RenderSVGBlock.cpp b/WebCore/rendering/RenderSVGBlock.cpp index f065c44..99725d6 100644 --- a/WebCore/rendering/RenderSVGBlock.cpp +++ b/WebCore/rendering/RenderSVGBlock.cpp @@ -1,8 +1,7 @@ /* - * This file is part of the WebKit project. - * * Copyright (C) 2006 Apple Computer, Inc. - * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> + * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> + * Copyright (C) Research In Motion Limited 2010. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -40,9 +39,7 @@ void RenderSVGBlock::setStyle(PassRefPtr<RenderStyle> style) RefPtr<RenderStyle> useStyle = style; // SVG text layout code expects us to be a block-level style element. - if (useStyle->display() == NONE) - setChildrenInline(false); - else if (useStyle->isDisplayInlineType()) { + if (useStyle->isDisplayInlineType()) { RefPtr<RenderStyle> newStyle = RenderStyle::create(); newStyle->inheritFrom(useStyle.get()); newStyle->setDisplay(BLOCK); @@ -50,14 +47,27 @@ void RenderSVGBlock::setStyle(PassRefPtr<RenderStyle> style) } RenderBlock::setStyle(useStyle.release()); - setReplaced(false); +} + +void RenderSVGBlock::updateBoxModelInfoFromStyle() +{ + RenderBlock::updateBoxModelInfoFromStyle(); - //FIXME: Once overflow rules are supported by SVG we should - //probably map the CSS overflow rules rather than just ignoring - //them + // RenderSVGlock, used by Render(SVGText|ForeignObject), is not allowed to call setHasOverflowClip(true). + // RenderBlock assumes a layer to be present when the overflow clip functionality is requested. Both + // Render(SVGText|ForeignObject) return 'false' on 'requiresLayer'. Fine for RenderSVGText. + // + // If we want to support overflow rules for <foreignObject> we can choose between two solutions: + // a) make RenderForeignObject require layers and SVG layer aware + // b) reactor overflow logic out of RenderLayer (as suggested by dhyatt), which is a large task + // + // Until this is resolved, disable overflow support. Opera/FF don't support it as well at the moment (Feb 2010). + // + // Note: This does NOT affect overflow handling on outer/inner <svg> elements - this is handled + // manually by RenderSVGRoot - which owns the documents enclosing root layer and thus works fine. setHasOverflowClip(false); } } -#endif // ENABLE(SVG) +#endif diff --git a/WebCore/rendering/RenderSVGBlock.h b/WebCore/rendering/RenderSVGBlock.h index 0b0d107..19cac62 100644 --- a/WebCore/rendering/RenderSVGBlock.h +++ b/WebCore/rendering/RenderSVGBlock.h @@ -1,6 +1,4 @@ /* - * This file is part of the WebKit project. - * * Copyright (C) 2006 Apple Computer, Inc. * * This library is free software; you can redistribute it and/or @@ -22,8 +20,8 @@ #ifndef RenderSVGBlock_h #define RenderSVGBlock_h -#if ENABLE(SVG) +#if ENABLE(SVG) #include "RenderBlock.h" #include "SVGRenderSupport.h" @@ -39,8 +37,9 @@ public: private: virtual void setStyle(PassRefPtr<RenderStyle>); + virtual void updateBoxModelInfoFromStyle(); }; } -#endif // ENABLE(SVG) -#endif // !RenderSVGBlock_h +#endif +#endif diff --git a/WebCore/rendering/RenderSVGImage.cpp b/WebCore/rendering/RenderSVGImage.cpp index 96eeaf9..6fb9501 100644 --- a/WebCore/rendering/RenderSVGImage.cpp +++ b/WebCore/rendering/RenderSVGImage.cpp @@ -37,9 +37,6 @@ #include "SVGLength.h" #include "SVGPreserveAspectRatio.h" #include "SVGRenderSupport.h" -#include "SVGResourceClipper.h" -#include "SVGResourceFilter.h" -#include "SVGResourceMasker.h" namespace WebCore { @@ -103,6 +100,12 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, int, int) paintInfo.context->restore(); } +void RenderSVGImage::destroy() +{ + SVGRenderBase::deregisterFromResources(this); + RenderImage::destroy(); +} + bool RenderSVGImage::nodeAtFloatPoint(const HitTestRequest&, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) { // We only draw in the forground phase, so we only hit-test then. diff --git a/WebCore/rendering/RenderSVGImage.h b/WebCore/rendering/RenderSVGImage.h index 8ed9146..f48b9dd 100644 --- a/WebCore/rendering/RenderSVGImage.h +++ b/WebCore/rendering/RenderSVGImage.h @@ -32,48 +32,50 @@ namespace WebCore { - class SVGImageElement; +class SVGImageElement; - class RenderSVGImage : public RenderImage, protected SVGRenderBase { - public: - RenderSVGImage(SVGImageElement*); +class RenderSVGImage : public RenderImage, protected SVGRenderBase { +public: + RenderSVGImage(SVGImageElement*); - private: - virtual const SVGRenderBase* toSVGRenderBase() const { return this; } - virtual const char* renderName() const { return "RenderSVGImage"; } - virtual bool isSVGImage() const { return true; } +private: + virtual const SVGRenderBase* toSVGRenderBase() const { return this; } + virtual const char* renderName() const { return "RenderSVGImage"; } + virtual bool isSVGImage() const { return true; } - virtual const AffineTransform& localToParentTransform() const { return m_localTransform; } + virtual const AffineTransform& localToParentTransform() const { return m_localTransform; } - virtual FloatRect objectBoundingBox() const; - virtual FloatRect strokeBoundingBox() const { return m_localBounds; } - virtual FloatRect repaintRectInLocalCoordinates() const; + virtual FloatRect objectBoundingBox() const; + virtual FloatRect strokeBoundingBox() const { return m_localBounds; } + virtual FloatRect repaintRectInLocalCoordinates() const; - virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer); - virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false); + virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer); + virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false); - virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const; + virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const; - virtual void absoluteRects(Vector<IntRect>&, int tx, int ty); - virtual void absoluteQuads(Vector<FloatQuad>&); - virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty); + virtual void absoluteRects(Vector<IntRect>&, int tx, int ty); + virtual void absoluteQuads(Vector<FloatQuad>&); + virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty); - virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); - - virtual void layout(); - virtual void paint(PaintInfo&, int parentX, int parentY); + virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); + + virtual void layout(); + virtual void paint(PaintInfo&, int parentX, int parentY); - virtual bool requiresLayer() const { return false; } + virtual void destroy(); - virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction); - virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); + virtual bool requiresLayer() const { return false; } - virtual AffineTransform localTransform() const { return m_localTransform; } + virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction); + virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); - AffineTransform m_localTransform; - FloatRect m_localBounds; - mutable FloatRect m_cachedLocalRepaintRect; - }; + virtual AffineTransform localTransform() const { return m_localTransform; } + + AffineTransform m_localTransform; + FloatRect m_localBounds; + mutable FloatRect m_cachedLocalRepaintRect; +}; } // namespace WebCore diff --git a/WebCore/rendering/RenderSVGInlineText.h b/WebCore/rendering/RenderSVGInlineText.h index e9c5d6e..b475067 100644 --- a/WebCore/rendering/RenderSVGInlineText.h +++ b/WebCore/rendering/RenderSVGInlineText.h @@ -39,6 +39,10 @@ private: virtual void styleDidChange(StyleDifference, const RenderStyle*); + // FIXME: We need objectBoundingBox for DRT results and filters at the moment. + // This should be fixed to give back the objectBoundingBox of the text root. + virtual FloatRect objectBoundingBox() const { return FloatRect(); } + virtual void absoluteRects(Vector<IntRect>& rects, int tx, int ty); virtual void absoluteQuads(Vector<FloatQuad>&); diff --git a/WebCore/rendering/RenderSVGModelObject.cpp b/WebCore/rendering/RenderSVGModelObject.cpp index 3fab5a6..c163dc6 100644 --- a/WebCore/rendering/RenderSVGModelObject.cpp +++ b/WebCore/rendering/RenderSVGModelObject.cpp @@ -38,10 +38,6 @@ #include "RenderView.h" #include "SVGStyledElement.h" -#if ENABLE(FILTERS) -#include "SVGResourceFilter.h" -#endif - namespace WebCore { RenderSVGModelObject::RenderSVGModelObject(SVGStyledElement* node) @@ -86,6 +82,12 @@ void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads) quads.append(absoluteClippedOverflowRect()); } +void RenderSVGModelObject::destroy() +{ + deregisterFromResources(this); + RenderObject::destroy(); +} + bool RenderSVGModelObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction) { ASSERT_NOT_REACHED(); diff --git a/WebCore/rendering/RenderSVGModelObject.h b/WebCore/rendering/RenderSVGModelObject.h index 4c50734..c04c590 100644 --- a/WebCore/rendering/RenderSVGModelObject.h +++ b/WebCore/rendering/RenderSVGModelObject.h @@ -60,6 +60,8 @@ public: virtual void absoluteRects(Vector<IntRect>& rects, int tx, int ty); virtual void absoluteQuads(Vector<FloatQuad>&); + virtual void destroy(); + virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const; private: diff --git a/WebCore/rendering/RenderSVGResource.h b/WebCore/rendering/RenderSVGResource.h new file mode 100644 index 0000000..38c6c09 --- /dev/null +++ b/WebCore/rendering/RenderSVGResource.h @@ -0,0 +1,84 @@ +/* + * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef RenderSVGResource_h +#define RenderSVGResource_h + +#if ENABLE(SVG) +#include "FloatRect.h" +#include "RenderSVGHiddenContainer.h" + +namespace WebCore { + +enum RenderSVGResourceType { + MaskerResourceType +}; + +class RenderSVGResource : public RenderSVGHiddenContainer { +public: + RenderSVGResource(SVGStyledElement* node) : RenderSVGHiddenContainer(node) { } + + template<class Renderer> + Renderer* cast() + { + if (Renderer::s_resourceType == resourceType()) + return static_cast<Renderer*>(this); + + return 0; + } + + virtual RenderSVGResource* toRenderSVGResource() { return this; } + virtual bool isSVGResource() const { return true; } + virtual bool drawsContents() { return false; } + + virtual void invalidateClients() = 0; + virtual void invalidateClient(RenderObject*) = 0; + + virtual bool applyResource(RenderObject*, GraphicsContext*) = 0; + virtual FloatRect resourceBoundingBox(const FloatRect&) const = 0; + + virtual RenderSVGResourceType resourceType() const = 0; +}; + +template<typename Renderer> +Renderer* getRenderSVGResourceById(Document* document, const AtomicString& id) +{ + if (id.isEmpty()) + return 0; + + Element* element = document->getElementById(id); + if (!element || !element->isSVGElement()) + return 0; + + RenderObject* renderer = element->renderer(); + if (!renderer) + return 0; + + RenderSVGResource* renderResource = renderer->toRenderSVGResource(); + if (!renderResource) + return 0; + + return renderResource->cast<Renderer>(); +} + +} + +#endif +#endif diff --git a/WebCore/rendering/RenderSVGResourceMasker.cpp b/WebCore/rendering/RenderSVGResourceMasker.cpp new file mode 100644 index 0000000..2923c6e --- /dev/null +++ b/WebCore/rendering/RenderSVGResourceMasker.cpp @@ -0,0 +1,196 @@ +/* + * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#include "config.h" +#include "RenderSVGResourceMasker.h" + +#include "AffineTransform.h" +#include "CanvasPixelArray.h" +#include "Element.h" +#include "FloatPoint.h" +#include "FloatRect.h" +#include "GraphicsContext.h" +#include "Image.h" +#include "ImageBuffer.h" +#include "ImageData.h" +#include "IntRect.h" +#include "SVGElement.h" +#include "SVGMaskElement.h" +#include "SVGStyledElement.h" +#include "SVGUnitTypes.h" +#include <wtf/Vector.h> + +namespace WebCore { + +RenderSVGResourceType RenderSVGResourceMasker::s_resourceType = MaskerResourceType; + +RenderSVGResourceMasker::RenderSVGResourceMasker(SVGStyledElement* node) + : RenderSVGResource(node) +{ +} + +RenderSVGResourceMasker::~RenderSVGResourceMasker() +{ + deleteAllValues(m_masker); + m_masker.clear(); +} + +void RenderSVGResourceMasker::invalidateClients() +{ + HashMap<RenderObject*, MaskerData*>::const_iterator end = m_masker.end(); + for (HashMap<RenderObject*, MaskerData*>::const_iterator it = m_masker.begin(); it != end; ++it) + it->first->setNeedsLayout(true); + deleteAllValues(m_masker); + m_masker.clear(); +} + +void RenderSVGResourceMasker::invalidateClient(RenderObject* object) +{ + ASSERT(object); + + // FIXME: The HashMap should always contain the object on calling invalidateClient. A race condition + // during the parsing can causes a call of invalidateClient right before the call of applyResource. + // We return earlier for the moment. This bug should be fixed in: + // https://bugs.webkit.org/show_bug.cgi?id=35181 + if (!m_masker.contains(object)) + return; + + delete m_masker.take(object); +} + +bool RenderSVGResourceMasker::applyResource(RenderObject* object, GraphicsContext* context) +{ + ASSERT(object); + ASSERT(context); + + if (!m_masker.contains(object)) + m_masker.set(object, new MaskerData); + + MaskerData* maskerData = m_masker.get(object); + if (!maskerData->maskImage && !maskerData->emptyMask) { + SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node()); + if (!maskElement) + return false; + + createMaskImage(maskerData, maskElement, object); + } + + if (!maskerData->maskImage) + return false; + + context->clipToImageBuffer(maskerData->maskRect, maskerData->maskImage.get()); + return true; +} + +FloatRect RenderSVGResourceMasker::resourceBoundingBox(const FloatRect& objectBoundingBox) const +{ + if (SVGMaskElement* element = static_cast<SVGMaskElement*>(node())) + return element->maskBoundingBox(objectBoundingBox); + + return FloatRect(); +} + +void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGMaskElement* maskElement, RenderObject* object) +{ + FloatRect objectBoundingBox = object->objectBoundingBox(); + + // Mask rect clipped with clippingBoundingBox and filterBoundingBox as long as they are present. + maskerData->maskRect = object->repaintRectInLocalCoordinates(); + if (maskerData->maskRect.isEmpty()) { + maskerData->emptyMask = true; + return; + } + + // Calculate the smallest rect for the mask ImageBuffer. + FloatRect repaintRect; + Vector<RenderObject*> rendererList; + for (Node* node = maskElement->firstChild(); node; node = node->nextSibling()) { + RenderObject* renderer = node->renderer(); + if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled() || !renderer) + continue; + + rendererList.append(renderer); + repaintRect.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates())); + } + + AffineTransform contextTransform; + // We need to scale repaintRect for objectBoundingBox to get the drawing area. + if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { + contextTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height()); + FloatPoint contextAdjustment = repaintRect.location(); + repaintRect = contextTransform.mapRect(repaintRect); + repaintRect.move(objectBoundingBox.x(), objectBoundingBox.y()); + contextTransform.translate(-contextAdjustment.x(), -contextAdjustment.y()); + } + repaintRect.intersect(maskerData->maskRect); + maskerData->maskRect = repaintRect; + IntRect maskImageRect = enclosingIntRect(maskerData->maskRect); + + maskImageRect.setLocation(IntPoint()); + + // Don't create ImageBuffers with image size of 0 + if (!maskImageRect.width() || !maskImageRect.height()) { + maskerData->emptyMask = true; + return; + } + + // FIXME: This changes color space to linearRGB, the default color space + // for masking operations in SVG. We need a switch for the other color-space + // attribute values sRGB, inherit and auto. + maskerData->maskImage = ImageBuffer::create(maskImageRect.size(), LinearRGB); + if (!maskerData->maskImage) + return; + + GraphicsContext* maskImageContext = maskerData->maskImage->context(); + ASSERT(maskImageContext); + + maskImageContext->save(); + + if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) + maskImageContext->translate(-maskerData->maskRect.x(), -maskerData->maskRect.y()); + maskImageContext->concatCTM(contextTransform); + + // draw the content into the ImageBuffer + Vector<RenderObject*>::iterator end = rendererList.end(); + for (Vector<RenderObject*>::iterator it = rendererList.begin(); it != end; it++) + renderSubtreeToImage(maskerData->maskImage.get(), *it); + + maskImageContext->restore(); + + // create the luminance mask + RefPtr<ImageData> imageData(maskerData->maskImage->getUnmultipliedImageData(maskImageRect)); + CanvasPixelArray* srcPixelArray(imageData->data()); + + for (unsigned pixelOffset = 0; pixelOffset < srcPixelArray->length(); pixelOffset += 4) { + unsigned char a = srcPixelArray->get(pixelOffset + 3); + if (!a) + continue; + unsigned char r = srcPixelArray->get(pixelOffset); + unsigned char g = srcPixelArray->get(pixelOffset + 1); + unsigned char b = srcPixelArray->get(pixelOffset + 2); + + double luma = (r * 0.2125 + g * 0.7154 + b * 0.0721) * ((double)a / 255.0); + srcPixelArray->set(pixelOffset + 3, luma); + } + + maskerData->maskImage->putUnmultipliedImageData(imageData.get(), maskImageRect, IntPoint()); +} + +} diff --git a/WebCore/rendering/RenderSVGResourceMasker.h b/WebCore/rendering/RenderSVGResourceMasker.h new file mode 100644 index 0000000..6c73c84 --- /dev/null +++ b/WebCore/rendering/RenderSVGResourceMasker.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef RenderSVGResourceMasker_h +#define RenderSVGResourceMasker_h + +#if ENABLE(SVG) +#include "FloatRect.h" +#include "GraphicsContext.h" +#include "ImageBuffer.h" +#include "IntSize.h" +#include "RenderSVGResource.h" +#include "SVGMaskElement.h" +#include "SVGUnitTypes.h" + +#include <wtf/HashMap.h> +#include <wtf/OwnPtr.h> + +namespace WebCore { + +struct MaskerData { + MaskerData(FloatRect rect = FloatRect(), bool emptyObject = false) + : maskRect(rect) + , emptyMask(emptyObject) + { + } + + OwnPtr<ImageBuffer> maskImage; + FloatRect maskRect; + bool emptyMask; +}; + +class RenderSVGResourceMasker : public RenderSVGResource { + +public: + RenderSVGResourceMasker(SVGStyledElement*); + virtual ~RenderSVGResourceMasker(); + + virtual const char* renderName() const { return "RenderSVGResourceMasker"; } + + virtual void invalidateClients(); + virtual void invalidateClient(RenderObject*); + + virtual bool applyResource(RenderObject*, GraphicsContext*); + virtual FloatRect resourceBoundingBox(const FloatRect&) const; + + SVGUnitTypes::SVGUnitType maskUnits() const { return toUnitType(static_cast<SVGMaskElement*>(node())->maskUnits()); } + SVGUnitTypes::SVGUnitType maskContentUnits() const { return toUnitType(static_cast<SVGMaskElement*>(node())->maskContentUnits()); } + + virtual RenderSVGResourceType resourceType() const { return s_resourceType; } + static RenderSVGResourceType s_resourceType; + +private: + void createMaskImage(MaskerData*, const SVGMaskElement*, RenderObject*); + + HashMap<RenderObject*, MaskerData*> m_masker; +}; + +} + +#endif +#endif diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp index 74172fc..51bf3e7 100644 --- a/WebCore/rendering/RenderSVGRoot.cpp +++ b/WebCore/rendering/RenderSVGRoot.cpp @@ -77,6 +77,28 @@ void RenderSVGRoot::calcPrefWidths() setPrefWidthsDirty(false); } +int RenderSVGRoot::calcReplacedWidth(bool includeMaxWidth) const +{ + int replacedWidth = RenderBox::calcReplacedWidth(includeMaxWidth); + if (!style()->width().isPercent()) + return replacedWidth; + + // FIXME: Investigate in size rounding issues + SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); + return static_cast<int>(roundf(replacedWidth * svg->currentScale())); +} + +int RenderSVGRoot::calcReplacedHeight() const +{ + int replacedHeight = RenderBox::calcReplacedHeight(); + if (!style()->height().isPercent()) + return replacedHeight; + + // FIXME: Investigate in size rounding issues + SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); + return static_cast<int>(roundf(replacedHeight * svg->currentScale())); +} + void RenderSVGRoot::layout() { ASSERT(needsLayout()); @@ -84,22 +106,19 @@ void RenderSVGRoot::layout() // Arbitrary affine transforms are incompatible with LayoutState. view()->disableLayoutState(); - LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && selfNeedsLayout()); + bool needsLayout = selfNeedsLayout(); + LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout); - int oldWidth = width(); + IntSize oldSize(width(), height()); calcWidth(); - - int oldHeight = height(); calcHeight(); - SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); - setWidth(static_cast<int>(width() * svg->currentScale())); - setHeight(static_cast<int>(height() * svg->currentScale())); calcViewport(); // RenderSVGRoot needs to take special care to propagate window size changes to the children, // if the outermost <svg> is using relative x/y/width/height values. Hence the additonal parameters. - layoutChildren(this, selfNeedsLayout() || (svg->hasRelativeValues() && (width() != oldWidth || height() != oldHeight))); + SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); + layoutChildren(this, needsLayout || (svg->hasRelativeValues() && oldSize != size())); repainter.repaintAfterLayout(); view()->enableLayoutState(); @@ -123,7 +142,7 @@ void RenderSVGRoot::paint(PaintInfo& paintInfo, int parentX, int parentY) return; IntPoint parentOriginInContainer(parentX, parentY); - IntPoint borderBoxOriginInContainer = parentOriginInContainer + IntSize(x(), y()); + IntPoint borderBoxOriginInContainer = parentOriginInContainer + parentOriginToBorderBox(); if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection)) paintBoxDecorations(paintInfo, borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y()); @@ -166,6 +185,12 @@ void RenderSVGRoot::paint(PaintInfo& paintInfo, int parentX, int parentY) paintOutline(paintInfo.context, borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y(), width(), height(), style()); } +void RenderSVGRoot::destroy() +{ + deregisterFromResources(this); + RenderBox::destroy(); +} + void RenderSVGRoot::calcViewport() { SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); @@ -177,15 +202,16 @@ void RenderSVGRoot::calcViewport() // In the normal case of <svg> being stand-alone or in a CSSBoxModel object we use // RenderBox::width()/height() (which pulls data from RenderStyle) m_viewportSize = FloatSize(width(), height()); - } else { - // In the SVGImage case grab the SVGLength values off of SVGSVGElement and use - // the special relativeWidthValue accessors which respect the specified containerSize - SVGLength width = svg->width(); - SVGLength height = svg->height(); - float viewportWidth = (width.unitType() == LengthTypePercentage) ? svg->relativeWidthValue() : width.value(svg); - float viewportHeight = (height.unitType() == LengthTypePercentage) ? svg->relativeHeightValue() : height.value(svg); - m_viewportSize = FloatSize(viewportWidth, viewportHeight); + return; } + + // In the SVGImage case grab the SVGLength values off of SVGSVGElement and use + // the special relativeWidthValue accessors which respect the specified containerSize + // FIXME: Check how SVGImage + zooming is supposed to be handled? + SVGLength width = svg->width(); + SVGLength height = svg->height(); + m_viewportSize = FloatSize(width.unitType() == LengthTypePercentage ? svg->relativeWidthValue() : width.value(svg), + height.unitType() == LengthTypePercentage ? svg->relativeHeightValue() : height.value(svg)); } // RenderBox methods will expect coordinates w/o any transforms in coordinates @@ -195,9 +221,9 @@ AffineTransform RenderSVGRoot::localToBorderBoxTransform() const IntSize borderAndPadding = borderOriginToContentBox(); SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); float scale = svg->currentScale(); - AffineTransform ctm(scale, 0, 0, scale, borderAndPadding.width(), borderAndPadding.height()); - ctm.translate(svg->currentTranslate().x(), svg->currentTranslate().y()); - return svg->viewBoxToViewTransform(width(), height()) * ctm; + FloatPoint translate = svg->currentTranslate(); + AffineTransform ctm(scale, 0, 0, scale, borderAndPadding.width() + translate.x(), borderAndPadding.height() + translate.y()); + return svg->viewBoxToViewTransform(width() / scale, height() / scale) * ctm; } IntSize RenderSVGRoot::parentOriginToBorderBox() const diff --git a/WebCore/rendering/RenderSVGRoot.h b/WebCore/rendering/RenderSVGRoot.h index 8ad5e40..53c1298 100644 --- a/WebCore/rendering/RenderSVGRoot.h +++ b/WebCore/rendering/RenderSVGRoot.h @@ -50,10 +50,13 @@ private: virtual int lineHeight(bool b, bool isRootLineBox = false) const; virtual int baselinePosition(bool b, bool isRootLineBox = false) const; virtual void calcPrefWidths(); - + virtual int calcReplacedWidth(bool includeMaxWidth = true) const; + virtual int calcReplacedHeight() const; virtual void layout(); virtual void paint(PaintInfo&, int parentX, int parentY); + virtual void destroy(); + virtual const AffineTransform& localToParentTransform() const; bool fillContains(const FloatPoint&) const; diff --git a/WebCore/rendering/RenderSVGText.cpp b/WebCore/rendering/RenderSVGText.cpp index e332c85..b8b9553 100644 --- a/WebCore/rendering/RenderSVGText.cpp +++ b/WebCore/rendering/RenderSVGText.cpp @@ -108,6 +108,12 @@ bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResul return false; } +void RenderSVGText::destroy() +{ + deregisterFromResources(this); + RenderSVGBlock::destroy(); +} + bool RenderSVGText::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction) { ASSERT_NOT_REACHED(); diff --git a/WebCore/rendering/RenderSVGText.h b/WebCore/rendering/RenderSVGText.h index 9ae96a0..ab4b09b 100644 --- a/WebCore/rendering/RenderSVGText.h +++ b/WebCore/rendering/RenderSVGText.h @@ -53,6 +53,8 @@ private: virtual bool requiresLayer() const { return false; } virtual void layout(); + virtual void destroy(); + virtual void absoluteRects(Vector<IntRect>&, int tx, int ty); virtual void absoluteQuads(Vector<FloatQuad>&); diff --git a/WebCore/rendering/RenderSlider.cpp b/WebCore/rendering/RenderSlider.cpp index 7398a2f..344f4ab 100644 --- a/WebCore/rendering/RenderSlider.cpp +++ b/WebCore/rendering/RenderSlider.cpp @@ -107,7 +107,7 @@ double SliderRange::clampValue(double value) double SliderRange::valueFromElement(HTMLInputElement* element, bool* wasClamped) { double oldValue; - bool parseSuccess = HTMLInputElement::formStringToDouble(element->value(), &oldValue); + bool parseSuccess = HTMLInputElement::parseToDoubleForNumberType(element->value(), &oldValue); if (!parseSuccess) oldValue = (minimum + maximum) / 2; double newValue = clampValue(oldValue); @@ -383,7 +383,7 @@ void RenderSlider::updateFromElement() bool clamped; double value = range.valueFromElement(element, &clamped); if (clamped) - element->setValueFromRenderer(HTMLInputElement::formStringFromDouble(value)); + element->setValueFromRenderer(HTMLInputElement::serializeForNumberType(value)); // Layout will take care of the thumb's size and position. if (!m_thumb) { @@ -439,7 +439,7 @@ void RenderSlider::setValueForPosition(int position) if (style()->appearance() == SliderVerticalPart || style()->appearance() == MediaVolumeSliderPart) fraction = 1 - fraction; double value = range.clampValue(range.valueFromProportion(fraction)); - element->setValueFromRenderer(HTMLInputElement::formStringFromDouble(value)); + element->setValueFromRenderer(HTMLInputElement::serializeForNumberType(value)); // Also update the position if appropriate. if (position != currentPosition()) { diff --git a/WebCore/rendering/RenderTableCell.cpp b/WebCore/rendering/RenderTableCell.cpp index d97ae6e..de71796 100644 --- a/WebCore/rendering/RenderTableCell.cpp +++ b/WebCore/rendering/RenderTableCell.cpp @@ -168,11 +168,11 @@ void RenderTableCell::setOverrideSize(int size) RenderBlock::setOverrideSize(size); } -IntSize RenderTableCell::offsetFromContainer(RenderObject* o) const +IntSize RenderTableCell::offsetFromContainer(RenderObject* o, const IntPoint& point) const { ASSERT(o == container()); - IntSize offset = RenderBlock::offsetFromContainer(o); + IntSize offset = RenderBlock::offsetFromContainer(o, point); if (parent()) offset.expand(-parentBox()->x(), -parentBox()->y()); diff --git a/WebCore/rendering/RenderTableCell.h b/WebCore/rendering/RenderTableCell.h index 0f8580d..a5a1edd 100644 --- a/WebCore/rendering/RenderTableCell.h +++ b/WebCore/rendering/RenderTableCell.h @@ -126,7 +126,7 @@ private: virtual void paintBoxDecorations(PaintInfo&, int tx, int ty); virtual void paintMask(PaintInfo&, int tx, int ty); - virtual IntSize offsetFromContainer(RenderObject*) const; + virtual IntSize offsetFromContainer(RenderObject*, const IntPoint&) const; virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer); virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false); diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp index 2e696a9..4653273 100644 --- a/WebCore/rendering/RenderText.cpp +++ b/WebCore/rendering/RenderText.cpp @@ -230,27 +230,32 @@ void RenderText::absoluteRectsForRange(Vector<IntRect>& rects, unsigned start, u start = min(start, static_cast<unsigned>(INT_MAX)); end = min(end, static_cast<unsigned>(INT_MAX)); - FloatPoint absPos = localToAbsolute(FloatPoint()); - for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { // Note: box->end() returns the index of the last character, not the index past it if (start <= box->start() && box->end() < end) { - IntRect r = IntRect(absPos.x() + box->x(), absPos.y() + box->y(), box->width(), box->height()); + IntRect r = IntRect(box->x(), box->y(), box->width(), box->height()); if (useSelectionHeight) { - IntRect selectionRect = box->selectionRect(absPos.x(), absPos.y(), start, end); + IntRect selectionRect = box->selectionRect(0, 0, start, end); r.setHeight(selectionRect.height()); r.setY(selectionRect.y()); } + FloatPoint origin = localToAbsolute(r.location()); + r.setX(origin.x()); + r.setY(origin.y()); rects.append(r); } else { unsigned realEnd = min(box->end() + 1, end); - IntRect r = box->selectionRect(absPos.x(), absPos.y(), start, realEnd); + IntRect r = box->selectionRect(0, 0, start, realEnd); if (!r.isEmpty()) { if (!useSelectionHeight) { // change the height and y position because selectionRect uses selection-specific values r.setHeight(box->height()); - r.setY(absPos.y() + box->y()); + r.setY(box->y()); } + FloatPoint origin = localToAbsolute(r.location()); + localToAbsolute(origin); + r.setX(origin.x()); + r.setY(origin.y()); rects.append(r); } } diff --git a/WebCore/rendering/RenderTextControl.cpp b/WebCore/rendering/RenderTextControl.cpp index c0ba070..d18940b 100644 --- a/WebCore/rendering/RenderTextControl.cpp +++ b/WebCore/rendering/RenderTextControl.cpp @@ -459,6 +459,78 @@ IntRect RenderTextControl::controlClipRect(int tx, int ty) const return clipRect; } +static const char* fontFamiliesWithInvalidCharWidth[] = { + "American Typewriter", + "Arial Hebrew", + "Chalkboard", + "Cochin", + "Corsiva Hebrew", + "Courier", + "Euphemia UCAS", + "Geneva", + "Gill Sans", + "Hei", + "Helvetica", + "Hoefler Text", + "InaiMathi", + "Kai", + "Lucida Grande", + "Marker Felt", + "Monaco", + "Mshtakan", + "New Peninim MT", + "Osaka", + "Raanana", + "STHeiti", + "Symbol", + "Times", + "Apple Braille", + "Apple LiGothic", + "Apple LiSung", + "Apple Symbols", + "AppleGothic", + "AppleMyungjo", + "#GungSeo", + "#HeadLineA", + "#PCMyungjo", + "#PilGi", +}; + +// For font families where any of the fonts don't have a valid entry in the OS/2 table +// for avgCharWidth, fallback to the legacy webkit behavior of getting the avgCharWidth +// from the width of a '0'. This only seems to apply to a fixed number of Mac fonts, +// but, in order to get similar rendering across platforms, we do this check for +// all platforms. +bool RenderTextControl::hasValidAvgCharWidth(AtomicString family) +{ + static HashSet<AtomicString>* fontFamiliesWithInvalidCharWidthMap = 0; + + if (!fontFamiliesWithInvalidCharWidthMap) { + fontFamiliesWithInvalidCharWidthMap = new HashSet<AtomicString>; + + for (unsigned i = 0; i < sizeof(fontFamiliesWithInvalidCharWidth) / sizeof(fontFamiliesWithInvalidCharWidth[0]); i++) + fontFamiliesWithInvalidCharWidthMap->add(AtomicString(fontFamiliesWithInvalidCharWidth[i])); + } + + return !fontFamiliesWithInvalidCharWidthMap->contains(family); +} + +float RenderTextControl::getAvgCharWidth(AtomicString family) +{ + if (hasValidAvgCharWidth(family)) + return roundf(style()->font().primaryFont()->avgCharWidth()); + + const UChar ch = '0'; + return style()->font().floatWidth(TextRun(&ch, 1, false, 0, 0, false, false, false)); +} + +float RenderTextControl::scaleEmToUnits(int x) const +{ + // This matches the unitsPerEm value for MS Shell Dlg and Courier New from the "head" font table. + float unitsPerEm = 2048.0f; + return roundf(style()->font().size() * x / unitsPerEm); +} + void RenderTextControl::calcPrefWidths() { ASSERT(prefWidthsDirty()); @@ -470,8 +542,8 @@ void RenderTextControl::calcPrefWidths() m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value()); else { // Use average character width. Matches IE. - float charWidth = style()->font().primaryFont()->avgCharWidth(); - m_maxPrefWidth = preferredContentWidth(charWidth) + m_innerText->renderBox()->paddingLeft() + m_innerText->renderBox()->paddingRight(); + AtomicString family = style()->font().family().family(); + m_maxPrefWidth = preferredContentWidth(getAvgCharWidth(family)) + m_innerText->renderBox()->paddingLeft() + m_innerText->renderBox()->paddingRight(); } if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) { diff --git a/WebCore/rendering/RenderTextControl.h b/WebCore/rendering/RenderTextControl.h index d1f3749..2fc8edc 100644 --- a/WebCore/rendering/RenderTextControl.h +++ b/WebCore/rendering/RenderTextControl.h @@ -74,6 +74,10 @@ protected: int textBlockWidth() const; int textBlockHeight() const; + float scaleEmToUnits(int x) const; + + static bool hasValidAvgCharWidth(AtomicString family); + virtual float getAvgCharWidth(AtomicString family); virtual int preferredContentWidth(float charWidth) const = 0; virtual void adjustControlHeightBasedOnLineHeight(int lineHeight) = 0; virtual void cacheSelection(int start, int end) = 0; diff --git a/WebCore/rendering/RenderTextControlMultiLine.cpp b/WebCore/rendering/RenderTextControlMultiLine.cpp index 0b4c7a7..9fbde3a 100644 --- a/WebCore/rendering/RenderTextControlMultiLine.cpp +++ b/WebCore/rendering/RenderTextControlMultiLine.cpp @@ -80,6 +80,17 @@ void RenderTextControlMultiLine::forwardEvent(Event* event) RenderTextControl::forwardEvent(event); } +float RenderTextControlMultiLine::getAvgCharWidth(AtomicString family) +{ + // Since Lucida Grande is the default font, we want this to match the width + // of Courier New, the default font for textareas in IE, Firefox and Safari Win. + // 1229 is the avgCharWidth value in the OS/2 table for Courier New. + if (family == AtomicString("Lucida Grande")) + return scaleEmToUnits(1229); + + return RenderTextControl::getAvgCharWidth(family); +} + int RenderTextControlMultiLine::preferredContentWidth(float charWidth) const { int factor = static_cast<HTMLTextAreaElement*>(node())->cols(); diff --git a/WebCore/rendering/RenderTextControlMultiLine.h b/WebCore/rendering/RenderTextControlMultiLine.h index 3371a8f..fbca308 100644 --- a/WebCore/rendering/RenderTextControlMultiLine.h +++ b/WebCore/rendering/RenderTextControlMultiLine.h @@ -40,6 +40,7 @@ private: virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); + virtual float getAvgCharWidth(AtomicString family); virtual int preferredContentWidth(float charWidth) const; virtual void adjustControlHeightBasedOnLineHeight(int lineHeight); virtual int baselinePosition(bool firstLine, bool isRootLineBox) const; diff --git a/WebCore/rendering/RenderTextControlSingleLine.cpp b/WebCore/rendering/RenderTextControlSingleLine.cpp index b68f004..4edd203 100644 --- a/WebCore/rendering/RenderTextControlSingleLine.cpp +++ b/WebCore/rendering/RenderTextControlSingleLine.cpp @@ -385,7 +385,19 @@ int RenderTextControlSingleLine::textBlockWidth() const return width; } + +float RenderTextControlSingleLine::getAvgCharWidth(AtomicString family) +{ + // Since Lucida Grande is the default font, we want this to match the width + // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and + // IE for some encodings (in IE, the default font is encoding specific). + // 901 is the avgCharWidth value in the OS/2 table for MS Shell Dlg. + if (family == AtomicString("Lucida Grande")) + return scaleEmToUnits(901); + return RenderTextControl::getAvgCharWidth(family); +} + int RenderTextControlSingleLine::preferredContentWidth(float charWidth) const { int factor = inputElement()->size(); @@ -394,8 +406,20 @@ int RenderTextControlSingleLine::preferredContentWidth(float charWidth) const int result = static_cast<int>(ceilf(charWidth * factor)); + float maxCharWidth = 0.f; + AtomicString family = style()->font().family().family(); + // Since Lucida Grande is the default font, we want this to match the width + // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and + // IE for some encodings (in IE, the default font is encoding specific). + // 4027 is the (xMax - xMin) value in the "head" font table for MS Shell Dlg. + if (family == AtomicString("Lucida Grande")) + maxCharWidth = scaleEmToUnits(4027); + else if (hasValidAvgCharWidth(family)) + maxCharWidth = roundf(style()->font().primaryFont()->maxCharWidth()); + // For text inputs, IE adds some extra width. - result += style()->font().primaryFont()->maxCharWidth() - charWidth; + if (maxCharWidth > 0.f) + result += maxCharWidth - charWidth; if (RenderBox* resultsRenderer = m_resultsButton ? m_resultsButton->renderBox() : 0) result += resultsRenderer->borderLeft() + resultsRenderer->borderRight() + diff --git a/WebCore/rendering/RenderTextControlSingleLine.h b/WebCore/rendering/RenderTextControlSingleLine.h index e30ff0d..aa1f1e3 100644 --- a/WebCore/rendering/RenderTextControlSingleLine.h +++ b/WebCore/rendering/RenderTextControlSingleLine.h @@ -75,6 +75,7 @@ private: virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1.0f, Node** stopNode = 0); int textBlockWidth() const; + virtual float getAvgCharWidth(AtomicString family); virtual int preferredContentWidth(float charWidth) const; virtual void adjustControlHeightBasedOnLineHeight(int lineHeight); diff --git a/WebCore/rendering/RenderThemeChromiumMac.mm b/WebCore/rendering/RenderThemeChromiumMac.mm index e274b05..03aab1c 100644 --- a/WebCore/rendering/RenderThemeChromiumMac.mm +++ b/WebCore/rendering/RenderThemeChromiumMac.mm @@ -572,7 +572,7 @@ FloatRect RenderThemeChromiumMac::convertToPaintingRect(const RenderObject* inpu const RenderObject* renderer = partRenderer; while (renderer && renderer != inputRenderer) { RenderObject* containingRenderer = renderer->container(); - offsetFromInputRenderer -= renderer->offsetFromContainer(containingRenderer); + offsetFromInputRenderer -= renderer->offsetFromContainer(containingRenderer, IntPoint()); renderer = containingRenderer; } // If the input renderer was not a container, something went wrong diff --git a/WebCore/rendering/RenderThemeMac.mm b/WebCore/rendering/RenderThemeMac.mm index ddb538b..b6ce93d 100644 --- a/WebCore/rendering/RenderThemeMac.mm +++ b/WebCore/rendering/RenderThemeMac.mm @@ -520,7 +520,7 @@ FloatRect RenderThemeMac::convertToPaintingRect(const RenderObject* inputRendere const RenderObject* renderer = partRenderer; while (renderer && renderer != inputRenderer) { RenderObject* containingRenderer = renderer->container(); - offsetFromInputRenderer -= renderer->offsetFromContainer(containingRenderer); + offsetFromInputRenderer -= renderer->offsetFromContainer(containingRenderer, IntPoint()); renderer = containingRenderer; } // If the input renderer was not a container, something went wrong diff --git a/WebCore/rendering/RenderTreeAsText.cpp b/WebCore/rendering/RenderTreeAsText.cpp index ca4d9d1..164a656 100644 --- a/WebCore/rendering/RenderTreeAsText.cpp +++ b/WebCore/rendering/RenderTreeAsText.cpp @@ -395,6 +395,10 @@ void write(TextStream& ts, const RenderObject& o, int indent) write(ts, *toRenderPath(&o), indent); return; } + if (o.isSVGResource()) { + writeSVGResource(ts, o, indent); + return; + } if (o.isSVGContainer()) { writeSVGContainer(ts, o, indent); return; diff --git a/WebCore/rendering/RenderVideo.cpp b/WebCore/rendering/RenderVideo.cpp index 813f2ef..13d6f60 100644 --- a/WebCore/rendering/RenderVideo.cpp +++ b/WebCore/rendering/RenderVideo.cpp @@ -275,14 +275,6 @@ void RenderVideo::acceleratedRenderingStateChanged() if (p) p->acceleratedRenderingStateChanged(); } - -GraphicsLayer* RenderVideo::videoGraphicsLayer() const -{ - if (hasLayer() && layer()->isComposited()) - return layer()->backing()->graphicsLayer(); - - return 0; -} #endif // USE(ACCELERATED_COMPOSITING) } // namespace WebCore diff --git a/WebCore/rendering/RenderVideo.h b/WebCore/rendering/RenderVideo.h index 3ca5328..16c846d 100644 --- a/WebCore/rendering/RenderVideo.h +++ b/WebCore/rendering/RenderVideo.h @@ -34,9 +34,6 @@ namespace WebCore { class HTMLMediaElement; class HTMLVideoElement; -#if USE(ACCELERATED_COMPOSITING) -class GraphicsLayer; -#endif class RenderVideo : public RenderMedia { public: @@ -49,7 +46,6 @@ public: #if USE(ACCELERATED_COMPOSITING) bool supportsAcceleratedRendering() const; void acceleratedRenderingStateChanged(); - GraphicsLayer* videoGraphicsLayer() const; #endif private: diff --git a/WebCore/rendering/SVGCharacterLayoutInfo.h b/WebCore/rendering/SVGCharacterLayoutInfo.h index f80c79c..f0d1fa4 100644 --- a/WebCore/rendering/SVGCharacterLayoutInfo.h +++ b/WebCore/rendering/SVGCharacterLayoutInfo.h @@ -297,13 +297,6 @@ struct SVGTextChunkWalkerBase { // Followings methods are only used for painting text chunks virtual void start(InlineBox*) = 0; virtual void end(InlineBox*) = 0; - - virtual bool setupBackground(InlineBox*) = 0; - virtual bool setupFill(InlineBox*) = 0; - virtual bool setupFillSelection(InlineBox*) = 0; - virtual bool setupStroke(InlineBox*) = 0; - virtual bool setupStrokeSelection(InlineBox*) = 0; - virtual bool setupForeground(InlineBox*) = 0; }; template<typename CallbackClass> @@ -319,31 +312,14 @@ public: typedef void (CallbackClass::*SVGTextChunkStartCallback)(InlineBox* box); typedef void (CallbackClass::*SVGTextChunkEndCallback)(InlineBox* box); - typedef bool (CallbackClass::*SVGTextChunkSetupBackgroundCallback)(InlineBox* box); - typedef bool (CallbackClass::*SVGTextChunkSetupFillCallback)(InlineBox* box); - typedef bool (CallbackClass::*SVGTextChunkSetupStrokeCallback)(InlineBox* box); - typedef bool (CallbackClass::*SVGTextChunkSetupForegroundCallback)(InlineBox* box); - - SVGTextChunkWalker(CallbackClass* object, + SVGTextChunkWalker(CallbackClass* object, SVGTextChunkWalkerCallback walker, SVGTextChunkStartCallback start = 0, - SVGTextChunkEndCallback end = 0, - SVGTextChunkSetupBackgroundCallback background = 0, - SVGTextChunkSetupFillCallback fill = 0, - SVGTextChunkSetupFillCallback fillSelection = 0, - SVGTextChunkSetupStrokeCallback stroke = 0, - SVGTextChunkSetupStrokeCallback strokeSelection = 0, - SVGTextChunkSetupForegroundCallback foreground = 0) + SVGTextChunkEndCallback end = 0) : m_object(object) , m_walkerCallback(walker) , m_startCallback(start) , m_endCallback(end) - , m_setupBackgroundCallback(background) - , m_setupFillCallback(fill) - , m_setupFillSelectionCallback(fillSelection) - , m_setupStrokeCallback(stroke) - , m_setupStrokeSelectionCallback(strokeSelection) - , m_setupForegroundCallback(foreground) { ASSERT(object); ASSERT(walker); @@ -372,71 +348,11 @@ public: ASSERT_NOT_REACHED(); } - virtual bool setupBackground(InlineBox* box) - { - if (m_setupBackgroundCallback) - return (*m_object.*m_setupBackgroundCallback)(box); - - ASSERT_NOT_REACHED(); - return false; - } - - virtual bool setupFill(InlineBox* box) - { - if (m_setupFillCallback) - return (*m_object.*m_setupFillCallback)(box); - - ASSERT_NOT_REACHED(); - return false; - } - - virtual bool setupFillSelection(InlineBox* box) - { - if (m_setupFillSelectionCallback) - return (*m_object.*m_setupFillSelectionCallback)(box); - - ASSERT_NOT_REACHED(); - return false; - } - - virtual bool setupStroke(InlineBox* box) - { - if (m_setupStrokeCallback) - return (*m_object.*m_setupStrokeCallback)(box); - - ASSERT_NOT_REACHED(); - return false; - } - - virtual bool setupStrokeSelection(InlineBox* box) - { - if (m_setupStrokeSelectionCallback) - return (*m_object.*m_setupStrokeSelectionCallback)(box); - - ASSERT_NOT_REACHED(); - return false; - } - - virtual bool setupForeground(InlineBox* box) - { - if (m_setupForegroundCallback) - return (*m_object.*m_setupForegroundCallback)(box); - - ASSERT_NOT_REACHED(); - return false; - } - private: CallbackClass* m_object; SVGTextChunkWalkerCallback m_walkerCallback; SVGTextChunkStartCallback m_startCallback; SVGTextChunkEndCallback m_endCallback; - SVGTextChunkSetupBackgroundCallback m_setupBackgroundCallback; - SVGTextChunkSetupFillCallback m_setupFillCallback; - SVGTextChunkSetupFillCallback m_setupFillSelectionCallback; - SVGTextChunkSetupStrokeCallback m_setupStrokeCallback; - SVGTextChunkSetupStrokeCallback m_setupStrokeSelectionCallback; - SVGTextChunkSetupForegroundCallback m_setupForegroundCallback; }; struct SVGTextChunkLayoutInfo { diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp index 079a36e..dc1b3c1 100644 --- a/WebCore/rendering/SVGRenderSupport.cpp +++ b/WebCore/rendering/SVGRenderSupport.cpp @@ -28,13 +28,15 @@ #include "SVGRenderSupport.h" #include "AffineTransform.h" +#include "Document.h" #include "ImageBuffer.h" #include "RenderObject.h" #include "RenderSVGContainer.h" +#include "RenderSVGResource.h" +#include "RenderSVGResourceMasker.h" #include "RenderView.h" #include "SVGResourceClipper.h" #include "SVGResourceFilter.h" -#include "SVGResourceMasker.h" #include "SVGStyledElement.h" #include "SVGURIReference.h" #include "TransformState.h" @@ -127,17 +129,14 @@ bool SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject filter = newFilter; #endif - SVGResourceClipper* clipper = getClipperById(document, clipperId, object); - SVGResourceMasker* masker = getMaskerById(document, maskerId, object); - - if (masker) { - masker->addClient(styledElement); - if (!masker->applyMask(paintInfo.context, object)) + // apply Masker + if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(document, maskerId)) { + if (!masker->applyResource(object, paintInfo.context)) return false; } else if (!maskerId.isEmpty()) svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement); - if (clipper) { + if (SVGResourceClipper* clipper = getClipperById(document, clipperId, object)) { clipper->addClient(styledElement); clipper->applyClip(paintInfo.context, object->objectBoundingBox()); } else if (!clipperId.isEmpty()) @@ -297,13 +296,19 @@ FloatRect SVGRenderBase::clipperBoundingBoxForRenderer(const RenderObject* objec FloatRect SVGRenderBase::maskerBoundingBoxForRenderer(const RenderObject* object) const { - SVGResourceMasker* masker = getMaskerById(object->document(), object->style()->svgStyle()->maskElement(), object); - if (masker) - return masker->maskerBoundingBox(object->objectBoundingBox()); + if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(object->document(), object->style()->svgStyle()->maskElement())) + return masker->resourceBoundingBox(object->objectBoundingBox()); return FloatRect(); } +void SVGRenderBase::deregisterFromResources(RenderObject* object) +{ + // We only have a renderer for masker at the moment. + if (RenderSVGResourceMasker* resource = getRenderSVGResourceById<RenderSVGResourceMasker>(object->document(), object->style()->svgStyle()->maskElement())) + resource->invalidateClient(object); +} + void applyTransformToPaintInfo(RenderObject::PaintInfo& paintInfo, const AffineTransform& localToAncestorTransform) { if (localToAncestorTransform.isIdentity()) diff --git a/WebCore/rendering/SVGRenderSupport.h b/WebCore/rendering/SVGRenderSupport.h index cf75365..427ff1f 100644 --- a/WebCore/rendering/SVGRenderSupport.h +++ b/WebCore/rendering/SVGRenderSupport.h @@ -26,61 +26,65 @@ #if ENABLE(SVG) #include "RenderObject.h" +#include "SVGElement.h" +#include "SVGStyledElement.h" namespace WebCore { - class SVGResourceFilter; - class ImageBuffer; +class SVGResourceFilter; +class ImageBuffer; - // SVGRendererBase is an abstract base class which all SVG renderers inherit - // from in order to share SVG renderer code. - // FIXME: This code can all move into RenderSVGModelObject once - // all SVG renderers inherit from RenderSVGModelObject. - class SVGRenderBase { - public: - virtual ~SVGRenderBase(); +// SVGRendererBase is an abstract base class which all SVG renderers inherit +// from in order to share SVG renderer code. +// FIXME: This code can all move into RenderSVGModelObject once +// all SVG renderers inherit from RenderSVGModelObject. +class SVGRenderBase { +public: + virtual ~SVGRenderBase(); - virtual const SVGRenderBase* toSVGRenderBase() const { return this; } + virtual const SVGRenderBase* toSVGRenderBase() const { return this; } - // FIXME: These are only public for SVGRootInlineBox. - // It's unclear if these should be exposed or not. SVGRootInlineBox may - // pass the wrong RenderObject* and boundingBox to these functions. - static bool prepareToRenderSVGContent(RenderObject*, RenderObject::PaintInfo&, const FloatRect& boundingBox, SVGResourceFilter*&, SVGResourceFilter* rootFilter = 0); - static void finishRenderSVGContent(RenderObject*, RenderObject::PaintInfo&, SVGResourceFilter*&, GraphicsContext* savedContext); + // FIXME: These are only public for SVGRootInlineBox. + // It's unclear if these should be exposed or not. SVGRootInlineBox may + // pass the wrong RenderObject* and boundingBox to these functions. + static bool prepareToRenderSVGContent(RenderObject*, RenderObject::PaintInfo&, const FloatRect& boundingBox, SVGResourceFilter*&, SVGResourceFilter* rootFilter = 0); + static void finishRenderSVGContent(RenderObject*, RenderObject::PaintInfo&, SVGResourceFilter*&, GraphicsContext* savedContext); - // Layout all children of the passed render object - static void layoutChildren(RenderObject*, bool selfNeedsLayout); + // Layout all children of the passed render object + static void layoutChildren(RenderObject*, bool selfNeedsLayout); - // Helper function determining wheter overflow is hidden - static bool isOverflowHidden(const RenderObject*); + // Helper function determining wheter overflow is hidden + static bool isOverflowHidden(const RenderObject*); - virtual FloatRect strokeBoundingBox() const { return FloatRect(); } - virtual FloatRect markerBoundingBox() const { return FloatRect(); } + virtual FloatRect strokeBoundingBox() const { return FloatRect(); } + virtual FloatRect markerBoundingBox() const { return FloatRect(); } - // returns the bounding box of filter, clipper, marker and masker (or the empty rect if no filter) in local coordinates - FloatRect filterBoundingBoxForRenderer(const RenderObject*) const; - FloatRect clipperBoundingBoxForRenderer(const RenderObject*) const; - FloatRect maskerBoundingBoxForRenderer(const RenderObject*) const; + // returns the bounding box of filter, clipper, marker and masker (or the empty rect if no filter) in local coordinates + FloatRect filterBoundingBoxForRenderer(const RenderObject*) const; + FloatRect clipperBoundingBoxForRenderer(const RenderObject*) const; + FloatRect maskerBoundingBoxForRenderer(const RenderObject*) const; - protected: - static IntRect clippedOverflowRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer); - static void computeRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer, IntRect&, bool fixed); +protected: + static IntRect clippedOverflowRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer); + static void computeRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer, IntRect&, bool fixed); - static void mapLocalToContainer(const RenderObject*, RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&); + static void mapLocalToContainer(const RenderObject*, RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&); - // Used to share the "walk all the children" logic between objectBoundingBox - // and repaintRectInLocalCoordinates in RenderSVGRoot and RenderSVGContainer - static FloatRect computeContainerBoundingBox(const RenderObject* container, bool includeAllPaintedContent); - }; + // Used to share the "walk all the children" logic between objectBoundingBox + // and repaintRectInLocalCoordinates in RenderSVGRoot and RenderSVGContainer + static FloatRect computeContainerBoundingBox(const RenderObject* container, bool includeAllPaintedContent); - // FIXME: This should move to RenderObject or PaintInfo - // Used for transforming the GraphicsContext and damage rect before passing PaintInfo to child renderers. - void applyTransformToPaintInfo(RenderObject::PaintInfo&, const AffineTransform& localToChildTransform); + static void deregisterFromResources(RenderObject*); +}; - // This offers a way to render parts of a WebKit rendering tree into a ImageBuffer. - void renderSubtreeToImage(ImageBuffer*, RenderObject*); +// FIXME: This should move to RenderObject or PaintInfo +// Used for transforming the GraphicsContext and damage rect before passing PaintInfo to child renderers. +void applyTransformToPaintInfo(RenderObject::PaintInfo&, const AffineTransform& localToChildTransform); - void clampImageBufferSizeToViewport(FrameView*, IntSize& imageBufferSize); +// This offers a way to render parts of a WebKit rendering tree into a ImageBuffer. +void renderSubtreeToImage(ImageBuffer*, RenderObject*); + +void clampImageBufferSizeToViewport(FrameView*, IntSize& imageBufferSize); } // namespace WebCore #endif // ENABLE(SVG) diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp index aff718f..f892144 100644 --- a/WebCore/rendering/SVGRenderTreeAsText.cpp +++ b/WebCore/rendering/SVGRenderTreeAsText.cpp @@ -38,6 +38,7 @@ #include "RenderPath.h" #include "RenderSVGContainer.h" #include "RenderSVGInlineText.h" +#include "RenderSVGResourceMasker.h" #include "RenderSVGRoot.h" #include "RenderSVGText.h" #include "RenderTreeAsText.h" @@ -195,6 +196,23 @@ TextStream& operator<<(TextStream& ts, const AffineTransform& transform) return ts; } +static TextStream& operator<<(TextStream& ts, const SVGUnitTypes::SVGUnitType& unitType) +{ + switch (unitType) { + case SVGUnitTypes::SVG_UNIT_TYPE_UNKNOWN: + ts << "unknown"; + break; + case SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE: + ts << "userSpaceOnUse"; + break; + case SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: + ts << "objectBoundingBox"; + break; + } + + return ts; +} + TextStream& operator<<(TextStream& ts, const Color& c) { return ts << c.name(); @@ -464,11 +482,33 @@ static void writeChildren(TextStream& ts, const RenderObject& object, int indent write(ts, *child, indent + 1); } +void writeSVGResource(TextStream& ts, const RenderObject& object, int indent) +{ + writeStandardPrefix(ts, object, indent); + + Element* element = static_cast<Element*>(object.node()); + const AtomicString& id = element->getIDAttribute(); + writeNameAndQuotedValue(ts, "id", id); + + RenderSVGResource* resource = const_cast<RenderObject&>(object).toRenderSVGResource(); + if (resource->resourceType() == MaskerResourceType) { + RenderSVGResourceMasker* masker = static_cast<RenderSVGResourceMasker*>(resource); + ASSERT(masker); + writeNameValuePair(ts, "maskUnits", masker->maskUnits()); + writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits()); + } + + // FIXME: Handle other RenderSVGResource* classes here, after converting them from SVGResource*. + ts << "\n"; + writeChildren(ts, object, indent); +} + void writeSVGContainer(TextStream& ts, const RenderObject& container, int indent) { writeStandardPrefix(ts, container, indent); writePositionAndStyle(ts, container); ts << "\n"; + writeResources(ts, container, indent); writeChildren(ts, container, indent); } @@ -484,6 +524,7 @@ void writeSVGText(TextStream& ts, const RenderBlock& text, int indent) writeStandardPrefix(ts, text, indent); writeRenderSVGTextBox(ts, text); ts << "\n"; + writeResources(ts, text, indent); writeChildren(ts, text, indent); } @@ -493,20 +534,41 @@ void writeSVGInlineText(TextStream& ts, const RenderText& text, int indent) // Why not just linesBoundingBox()? ts << " " << FloatRect(text.firstRunOrigin(), text.linesBoundingBox().size()) << "\n"; + writeResources(ts, text, indent); writeSVGInlineTextBoxes(ts, text, indent); } +void writeSVGImage(TextStream& ts, const RenderImage& image, int indent) +{ + writeStandardPrefix(ts, image, indent); + writePositionAndStyle(ts, image); + ts << "\n"; + writeResources(ts, image, indent); +} + void write(TextStream& ts, const RenderPath& path, int indent) { writeStandardPrefix(ts, path, indent); ts << path << "\n"; + writeResources(ts, path, indent); } -void writeSVGImage(TextStream& ts, const RenderImage& image, int indent) +void writeResources(TextStream& ts, const RenderObject& object, int indent) { - writeStandardPrefix(ts, image, indent); - writePositionAndStyle(ts, image); - ts << "\n"; + const RenderStyle* style = object.style(); + const SVGRenderStyle* svgStyle = style->svgStyle(); + + if (!svgStyle->maskElement().isEmpty()) { + if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(object.document(), svgStyle->maskElement())) { + writeIndent(ts, indent); + ts << " "; + writeNameAndQuotedValue(ts, "masker", svgStyle->maskElement()); + ts << " "; + writeStandardPrefix(ts, *masker, 0); + ts << " " << masker->resourceBoundingBox(object.objectBoundingBox()) << "\n"; + } + } + // FIXME: Handle other RenderSVGResource* classes here, after converting them from SVGResource*. } void writeRenderResources(TextStream& ts, Node* parent) diff --git a/WebCore/rendering/SVGRenderTreeAsText.h b/WebCore/rendering/SVGRenderTreeAsText.h index 13fc475..905652b 100644 --- a/WebCore/rendering/SVGRenderTreeAsText.h +++ b/WebCore/rendering/SVGRenderTreeAsText.h @@ -46,14 +46,17 @@ namespace WebCore { class RenderSVGRoot; class RenderText; class AffineTransform; + class SVGUnitTypes; // functions used by the main RenderTreeAsText code void write(TextStream&, const RenderPath&, int indent); void write(TextStream&, const RenderSVGRoot&, int indent); +void writeSVGResource(TextStream&, const RenderObject&, int indent); void writeSVGContainer(TextStream&, const RenderObject&, int indent); void writeSVGImage(TextStream&, const RenderImage&, int indent); void writeSVGInlineText(TextStream&, const RenderText&, int indent); void writeSVGText(TextStream&, const RenderBlock&, int indent); +void writeResources(TextStream&, const RenderObject&, int indent); void writeRenderResources(TextStream&, Node* parent); diff --git a/WebCore/rendering/SVGRootInlineBox.cpp b/WebCore/rendering/SVGRootInlineBox.cpp index d0dd4a8..03b9db4 100644 --- a/WebCore/rendering/SVGRootInlineBox.cpp +++ b/WebCore/rendering/SVGRootInlineBox.cpp @@ -363,10 +363,10 @@ struct SVGRootInlineBoxPaintWalker { ASSERT(!m_chunkStarted); } - bool mayHaveSelection(InlineBox* box) const + bool mayHaveSelection(SVGInlineTextBox* box) const { int selectionStart = 0, selectionEnd = 0; - box->renderer()->selectionStartEnd(selectionStart, selectionEnd); + box->selectionStartEnd(selectionStart, selectionEnd); return selectionStart < selectionEnd; } @@ -436,13 +436,13 @@ struct SVGRootInlineBoxPaintWalker { m_paintInfo.rect = m_savedInfo.rect; } - bool chunkSetupBackgroundCallback(InlineBox* /*box*/) + bool setupBackground(SVGInlineTextBox* /*box*/) { m_textPaintInfo.subphase = SVGTextPaintSubphaseBackground; return true; } - bool chunkSetupFillCallback(InlineBox* box) + bool setupFill(SVGInlineTextBox* box) { InlineFlowBox* flowBox = box->parent(); @@ -464,7 +464,7 @@ struct SVGRootInlineBoxPaintWalker { return false; } - bool chunkSetupFillSelectionCallback(InlineBox* box) + bool setupFillSelection(SVGInlineTextBox* box) { InlineFlowBox* flowBox = box->parent(); @@ -492,7 +492,7 @@ struct SVGRootInlineBoxPaintWalker { return false; } - bool chunkSetupStrokeCallback(InlineBox* box) + bool setupStroke(SVGInlineTextBox* box) { InlineFlowBox* flowBox = box->parent(); @@ -516,7 +516,7 @@ struct SVGRootInlineBoxPaintWalker { return false; } - bool chunkSetupStrokeSelectionCallback(InlineBox* box) + bool setupStrokeSelection(SVGInlineTextBox* box) { InlineFlowBox* flowBox = box->parent(); @@ -545,7 +545,7 @@ struct SVGRootInlineBoxPaintWalker { return false; } - bool chunkSetupForegroundCallback(InlineBox* /*box*/) + bool setupForeground(SVGInlineTextBox* /*box*/) { teardownFillPaintServer(); teardownStrokePaintServer(); @@ -576,6 +576,28 @@ struct SVGRootInlineBoxPaintWalker { void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm, const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end) { + if (setupBackground(textBox)) + paintChunk(textBox, startOffset, chunkCtm, start, end); + + if (setupFill(textBox)) + paintChunk(textBox, startOffset, chunkCtm, start, end); + + if (setupFillSelection(textBox)) + paintChunk(textBox, startOffset, chunkCtm, start, end); + + if (setupStroke(textBox)) + paintChunk(textBox, startOffset, chunkCtm, start, end); + + if (setupStrokeSelection(textBox)) + paintChunk(textBox, startOffset, chunkCtm, start, end); + + if (setupForeground(textBox)) + paintChunk(textBox, startOffset, chunkCtm, start, end); + } + + void paintChunk(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm, + const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end) + { RenderText* text = textBox->textRenderer(); ASSERT(text); @@ -679,13 +701,7 @@ void SVGRootInlineBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty) SVGTextChunkWalker<SVGRootInlineBoxPaintWalker> walker(&walkerCallback, &SVGRootInlineBoxPaintWalker::chunkPortionCallback, &SVGRootInlineBoxPaintWalker::chunkStartCallback, - &SVGRootInlineBoxPaintWalker::chunkEndCallback, - &SVGRootInlineBoxPaintWalker::chunkSetupBackgroundCallback, - &SVGRootInlineBoxPaintWalker::chunkSetupFillCallback, - &SVGRootInlineBoxPaintWalker::chunkSetupFillSelectionCallback, - &SVGRootInlineBoxPaintWalker::chunkSetupStrokeCallback, - &SVGRootInlineBoxPaintWalker::chunkSetupStrokeSelectionCallback, - &SVGRootInlineBoxPaintWalker::chunkSetupForegroundCallback); + &SVGRootInlineBoxPaintWalker::chunkEndCallback); walkTextChunks(&walker); } @@ -1777,28 +1793,7 @@ void SVGRootInlineBox::walkTextChunks(SVGTextChunkWalkerBase* walker, const SVGI ASSERT(itCharEnd <= curChunk.end); // Process this chunk portion - if (textBox) - (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); - else { - if (walker->setupBackground(range.box)) - (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); - - if (walker->setupFill(range.box)) - (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); - - if (walker->setupFillSelection(range.box)) - (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); - - if (walker->setupStroke(range.box)) - (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); - - if (walker->setupStrokeSelection(range.box)) - (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); - - if (walker->setupForeground(range.box)) - (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); - - } + (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd); chunkOffset += length; diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp index 0952557..712344f 100644 --- a/WebCore/rendering/style/RenderStyle.cpp +++ b/WebCore/rendering/style/RenderStyle.cpp @@ -192,6 +192,11 @@ static inline int pseudoBit(PseudoId pseudo) return 1 << (pseudo - 1); } +bool RenderStyle::hasAnyPublicPseudoStyles() const +{ + return PUBLIC_PSEUDOID_MASK & noninherited_flags._pseudoBits; +} + bool RenderStyle::hasPseudoStyle(PseudoId pseudo) const { ASSERT(pseudo > NOPSEUDO); diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h index 696a2b7..c7db254 100644 --- a/WebCore/rendering/style/RenderStyle.h +++ b/WebCore/rendering/style/RenderStyle.h @@ -350,6 +350,7 @@ public: bool isStyleAvailable() const; + bool hasAnyPublicPseudoStyles() const; bool hasPseudoStyle(PseudoId pseudo) const; void setHasPseudoStyle(PseudoId pseudo); diff --git a/WebCore/rendering/style/RenderStyleConstants.h b/WebCore/rendering/style/RenderStyleConstants.h index 01862f6..4abbc1c 100644 --- a/WebCore/rendering/style/RenderStyleConstants.h +++ b/WebCore/rendering/style/RenderStyleConstants.h @@ -66,6 +66,7 @@ enum StyleDifferenceContextSensitiveProperty { // Static pseudo styles. Dynamic ones are produced on the fly. enum PseudoId { + // The order must be NOP ID, public IDs, and then internal IDs. NOPSEUDO, FIRST_LINE, FIRST_LETTER, BEFORE, AFTER, SELECTION, FIRST_LINE_INHERITED, SCROLLBAR, FILE_UPLOAD_BUTTON, INPUT_PLACEHOLDER, SLIDER_THUMB, SEARCH_CANCEL_BUTTON, SEARCH_DECORATION, SEARCH_RESULTS_DECORATION, SEARCH_RESULTS_BUTTON, MEDIA_CONTROLS_PANEL, MEDIA_CONTROLS_PLAY_BUTTON, MEDIA_CONTROLS_MUTE_BUTTON, MEDIA_CONTROLS_TIMELINE, MEDIA_CONTROLS_TIMELINE_CONTAINER, @@ -75,7 +76,9 @@ enum PseudoId { MEDIA_CONTROLS_STATUS_DISPLAY, SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER, INPUT_LIST_BUTTON, INNER_SPIN_BUTTON, OUTER_SPIN_BUTTON, - FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON + FIRST_PUBLIC_PSEUDOID = FIRST_LINE, + FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON, + PUBLIC_PSEUDOID_MASK = ((1 << FIRST_INTERNAL_PSEUDOID) - 1) & ~((1 << FIRST_PUBLIC_PSEUDOID) - 1) }; // These have been defined in the order of their precedence for border-collapsing. Do diff --git a/WebCore/storage/DatabaseAuthorizer.cpp b/WebCore/storage/DatabaseAuthorizer.cpp index d87d4d9..6b6b147 100644 --- a/WebCore/storage/DatabaseAuthorizer.cpp +++ b/WebCore/storage/DatabaseAuthorizer.cpp @@ -263,21 +263,29 @@ int DatabaseAuthorizer::dropTempView(const String&) return (m_readOnly && m_securityEnabled ? SQLAuthDeny : SQLAuthAllow); } -int DatabaseAuthorizer::createVTable(const String&, const String&) +int DatabaseAuthorizer::createVTable(const String& tableName, const String& moduleName) { if (m_readOnly && m_securityEnabled) return SQLAuthDeny; + // fts2 is used in Chromium + if (moduleName != "fts2") + return SQLAuthDeny; + m_lastActionChangedDatabase = true; - return m_securityEnabled ? SQLAuthDeny : SQLAuthAllow; + return denyBasedOnTableName(tableName); } -int DatabaseAuthorizer::dropVTable(const String&, const String&) +int DatabaseAuthorizer::dropVTable(const String& tableName, const String& moduleName) { if (m_readOnly && m_securityEnabled) return SQLAuthDeny; - return m_securityEnabled ? SQLAuthDeny : SQLAuthAllow; + // fts2 is used in Chromium + if (moduleName != "fts2") + return SQLAuthDeny; + + return denyBasedOnTableName(tableName); } int DatabaseAuthorizer::allowDelete(const String& tableName) diff --git a/WebCore/storage/OriginUsageRecord.cpp b/WebCore/storage/OriginUsageRecord.cpp index 684df53..8128a1b 100644 --- a/WebCore/storage/OriginUsageRecord.cpp +++ b/WebCore/storage/OriginUsageRecord.cpp @@ -42,8 +42,8 @@ OriginUsageRecord::OriginUsageRecord() void OriginUsageRecord::addDatabase(const String& identifier, const String& fullPath) { ASSERT(!m_databaseMap.contains(identifier)); - ASSERT_ARG(identifier, identifier.impl()->refCount() == 1); - ASSERT_ARG(fullPath, fullPath.impl()->refCount() == 1); + ASSERT_ARG(identifier, identifier.impl()->hasOneRef()); + ASSERT_ARG(fullPath, fullPath.impl()->hasOneRef()); m_databaseMap.set(identifier, DatabaseEntry(fullPath)); m_unknownSet.add(identifier); @@ -63,7 +63,7 @@ void OriginUsageRecord::removeDatabase(const String& identifier) void OriginUsageRecord::markDatabase(const String& identifier) { ASSERT(m_databaseMap.contains(identifier)); - ASSERT_ARG(identifier, identifier.impl()->refCount() == 1); + ASSERT_ARG(identifier, identifier.impl()->hasOneRef()); m_unknownSet.add(identifier); m_cachedDiskUsageIsValid = false; diff --git a/WebCore/svg/SVGForeignObjectElement.cpp b/WebCore/svg/SVGForeignObjectElement.cpp index e9118ef..d28e2a4 100644 --- a/WebCore/svg/SVGForeignObjectElement.cpp +++ b/WebCore/svg/SVGForeignObjectElement.cpp @@ -72,82 +72,21 @@ void SVGForeignObjectElement::parseMappedAttribute(MappedAttribute* attr) } } -// TODO: Move this function in some SVG*Element base class, as SVGSVGElement / SVGImageElement will need the same logic! - -// This function mimics addCSSProperty and StyledElement::attributeChanged. -// In HTML code, you'd always call addCSSProperty from your derived parseMappedAttribute() -// function - though in SVG code we need to move this logic into svgAttributeChanged, in -// order to support SVG DOM changes (which don't use the parseMappedAttribute/attributeChanged). -// If we'd ignore SVG DOM, we could use _exactly_ the same logic as HTML. -static inline void addCSSPropertyAndNotifyAttributeMap(StyledElement* element, const QualifiedName& name, int cssProperty, const String& value) -{ - ASSERT(element); - - if (!element) - return; - - NamedMappedAttrMap* attrs = element->mappedAttributes(); - ASSERT(attrs); - - if (!attrs) - return; - - Attribute* attr = attrs->getAttributeItem(name); - if (!attr || !attr->isMappedAttribute()) - return; - - MappedAttribute* mappedAttr = static_cast<MappedAttribute*>(attr); - - // This logic is only meant to be used for entries that have to be parsed and are mapped to eNone. Assert that. - MappedAttributeEntry entry; - bool needToParse = element->mapToEntry(mappedAttr->name(), entry); - - ASSERT(needToParse); - ASSERT(entry == eNone); - - if (!needToParse || entry != eNone) - return; - - if (mappedAttr->decl()) { - mappedAttr->setDecl(0); - attrs->declRemoved(); - } - - element->setNeedsStyleRecalc(); - element->addCSSProperty(mappedAttr, cssProperty, value); - - if (CSSMappedAttributeDeclaration* decl = mappedAttr->decl()) { - // Add the decl to the table in the appropriate spot. - element->setMappedAttributeDecl(entry, mappedAttr, decl); - - decl->setMappedState(entry, mappedAttr->name(), mappedAttr->value()); - decl->setParent(0); - decl->setNode(0); - - attrs->declAdded(); - } -} - void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName) { SVGStyledTransformableElement::svgAttributeChanged(attrName); - if (attrName == SVGNames::widthAttr) { - addCSSPropertyAndNotifyAttributeMap(this, attrName, CSSPropertyWidth, width().valueAsString()); - return; - } else if (attrName == SVGNames::heightAttr) { - addCSSPropertyAndNotifyAttributeMap(this, attrName, CSSPropertyHeight, height().valueAsString()); - return; - } - if (!renderer()) return; - if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || - SVGTests::isKnownAttribute(attrName) || - SVGLangSpace::isKnownAttribute(attrName) || - SVGExternalResourcesRequired::isKnownAttribute(attrName) || - SVGStyledTransformableElement::isKnownAttribute(attrName)) + if (attrName == SVGNames::xAttr + || attrName == SVGNames::yAttr + || attrName == SVGNames::widthAttr + || attrName == SVGNames::heightAttr + || SVGTests::isKnownAttribute(attrName) + || SVGLangSpace::isKnownAttribute(attrName) + || SVGExternalResourcesRequired::isKnownAttribute(attrName) + || SVGStyledTransformableElement::isKnownAttribute(attrName)) renderer()->setNeedsLayout(true); } @@ -190,6 +129,6 @@ bool SVGForeignObjectElement::childShouldCreateRenderer(Node* child) const return StyledElement::childShouldCreateRenderer(child); } -} // namespace WebCore +} -#endif // ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT) +#endif diff --git a/WebCore/svg/SVGLength.cpp b/WebCore/svg/SVGLength.cpp index 2884507..e342acf 100644 --- a/WebCore/svg/SVGLength.cpp +++ b/WebCore/svg/SVGLength.cpp @@ -280,15 +280,16 @@ float SVGLength::PercentageOfViewport(float value, const SVGElement* context, SV float width = 0.0f, height = 0.0f; SVGElement* viewportElement = context->viewportElement(); + // PercentageOfViewport() is used to resolve all relative-positioned values within a SVG document (fragment) Document* doc = context->document(); if (doc->documentElement() == context) { - // We have to ask the canvas for the full "canvas size"... - RenderView* view = toRenderView(doc->renderer()); - if (view && view->frameView()) { - width = view->frameView()->visibleWidth(); // TODO: recheck! - height = view->frameView()->visibleHeight(); // TODO: recheck! + // Resolve value against outermost <svg> element + if (RenderView* view = toRenderView(doc->renderer())) { + width = view->viewWidth(); + height = view->viewHeight(); } } else if (viewportElement && viewportElement->isSVG()) { + // Resolve value against nearest viewport element (common case: inner <svg> elements) const SVGSVGElement* svg = static_cast<const SVGSVGElement*>(viewportElement); if (svg->hasAttribute(SVGNames::viewBoxAttr)) { width = svg->viewBox().width(); @@ -298,6 +299,7 @@ float SVGLength::PercentageOfViewport(float value, const SVGElement* context, SV height = svg->height().value(svg); } } else if (context->parent() && !context->parent()->isSVGElement()) { + // Resolve value against enclosing non-SVG RenderBox if (RenderObject* renderer = context->renderer()) { if (renderer->isBox()) { RenderBox* box = toRenderBox(renderer); @@ -319,6 +321,4 @@ float SVGLength::PercentageOfViewport(float value, const SVGElement* context, SV } -#endif // ENABLE(SVG) - -// vim:ts=4:noet +#endif diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp index 86d1062..67b0a98 100644 --- a/WebCore/svg/SVGMaskElement.cpp +++ b/WebCore/svg/SVGMaskElement.cpp @@ -3,6 +3,7 @@ 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 2005 Alexander Kellett <lypanov@kde.org> 2009 Dirk Schulze <krit@webkit.org> + Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -25,23 +26,13 @@ #if ENABLE(SVG) #include "SVGMaskElement.h" -#include "CanvasPixelArray.h" #include "CSSStyleSelector.h" -#include "GraphicsContext.h" -#include "Image.h" -#include "ImageBuffer.h" -#include "ImageData.h" #include "MappedAttribute.h" -#include "RenderObject.h" -#include "RenderSVGContainer.h" +#include "RenderSVGResourceMasker.h" #include "SVGLength.h" #include "SVGNames.h" #include "SVGRenderSupport.h" #include "SVGUnitTypes.h" -#include <math.h> -#include <wtf/MathExtras.h> -#include <wtf/OwnPtr.h> -#include <wtf/Vector.h> using namespace std; @@ -167,122 +158,9 @@ FloatRect SVGMaskElement::maskBoundingBox(const FloatRect& objectBoundingBox) co return maskBBox; } -PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const RenderObject* object, FloatRect& maskDestRect, bool& emptyMask) const -{ - FloatRect objectBoundingBox = object->objectBoundingBox(); - - // Mask rect clipped with clippingBoundingBox and filterBoundingBox as long as they are present. - maskDestRect = object->repaintRectInLocalCoordinates(); - if (maskDestRect.isEmpty()) { - emptyMask = true; - return 0; - } - - // Calculate the smallest rect for the mask ImageBuffer. - FloatRect repaintRect; - Vector<RenderObject*> rendererList; - for (Node* node = firstChild(); node; node = node->nextSibling()) { - if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled() || !node->renderer()) - continue; - - rendererList.append(node->renderer()); - repaintRect.unite(node->renderer()->localToParentTransform().mapRect(node->renderer()->repaintRectInLocalCoordinates())); - } - - AffineTransform contextTransform; - // We need to scale repaintRect for objectBoundingBox to get the drawing area. - if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { - contextTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height()); - FloatPoint contextAdjustment = repaintRect.location(); - repaintRect = contextTransform.mapRect(repaintRect); - repaintRect.move(objectBoundingBox.x(), objectBoundingBox.y()); - contextTransform.translate(-contextAdjustment.x(), -contextAdjustment.y()); - } - repaintRect.intersect(maskDestRect); - maskDestRect = repaintRect; - IntRect maskImageRect = enclosingIntRect(maskDestRect); - - maskImageRect.setLocation(IntPoint()); - - // Don't create ImageBuffers with image size of 0 - if (!maskImageRect.width() || !maskImageRect.height()) { - emptyMask = true; - return 0; - } - - // FIXME: This changes color space to linearRGB, the default color space - // for masking operations in SVG. We need a switch for the other color-space - // attribute values sRGB, inherit and auto. - OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(maskImageRect.size(), LinearRGB); - if (!maskImage) - return 0; - - GraphicsContext* maskImageContext = maskImage->context(); - ASSERT(maskImageContext); - - maskImageContext->save(); - - if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) - maskImageContext->translate(-maskDestRect.x(), -maskDestRect.y()); - maskImageContext->concatCTM(contextTransform); - - // draw the content into the ImageBuffer - Vector<RenderObject*>::iterator end = rendererList.end(); - for (Vector<RenderObject*>::iterator it = rendererList.begin(); it != end; it++) - renderSubtreeToImage(maskImage.get(), *it); - - - maskImageContext->restore(); - - // create the luminance mask - RefPtr<ImageData> imageData(maskImage->getUnmultipliedImageData(maskImageRect)); - CanvasPixelArray* srcPixelArray(imageData->data()); - - for (unsigned pixelOffset = 0; pixelOffset < srcPixelArray->length(); pixelOffset += 4) { - unsigned char a = srcPixelArray->get(pixelOffset + 3); - if (!a) - continue; - unsigned char r = srcPixelArray->get(pixelOffset); - unsigned char g = srcPixelArray->get(pixelOffset + 1); - unsigned char b = srcPixelArray->get(pixelOffset + 2); - - double luma = (r * 0.2125 + g * 0.7154 + b * 0.0721) * ((double)a / 255.0); - srcPixelArray->set(pixelOffset + 3, luma); - } - - maskImage->putUnmultipliedImageData(imageData.get(), maskImageRect, IntPoint()); - - return maskImage.release(); -} - RenderObject* SVGMaskElement::createRenderer(RenderArena* arena, RenderStyle*) { - RenderSVGContainer* maskContainer = new (arena) RenderSVGContainer(this); - maskContainer->setDrawsContents(false); - return maskContainer; -} - -SVGResource* SVGMaskElement::canvasResource(const RenderObject* object) -{ - ASSERT(object); - - if (m_masker.contains(object)) - return m_masker.get(object).get(); - - RefPtr<SVGResourceMasker> masker = SVGResourceMasker::create(this); - SVGResourceMasker* maskerPtr = masker.get(); - m_masker.set(object, masker.release()); - - return maskerPtr; -} - -void SVGMaskElement::invalidateCanvasResources() -{ - // Don't call through to the base class since the base class will just - // invalidate one item in the HashMap. - HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::const_iterator end = m_masker.end(); - for (HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::const_iterator it = m_masker.begin(); it != end; ++it) - it->second->invalidate(); + return new (arena) RenderSVGResourceMasker(this); } } diff --git a/WebCore/svg/SVGMaskElement.h b/WebCore/svg/SVGMaskElement.h index 005fa4f..7730e37 100644 --- a/WebCore/svg/SVGMaskElement.h +++ b/WebCore/svg/SVGMaskElement.h @@ -22,19 +22,15 @@ #if ENABLE(SVG) #include "RenderObject.h" -#include "SVGResourceMasker.h" #include "SVGExternalResourcesRequired.h" #include "SVGLangSpace.h" #include "SVGStyledLocatableElement.h" #include "SVGTests.h" #include "SVGURIReference.h" -#include <wtf/HashMap.h> -#include <wtf/PassOwnPtr.h> namespace WebCore { class SVGLength; - class SVGResourceMasker; class SVGMaskElement : public SVGStyledLocatableElement, public SVGURIReference, @@ -53,9 +49,6 @@ namespace WebCore { virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); - virtual SVGResource* canvasResource(const RenderObject*); - - PassOwnPtr<ImageBuffer> drawMaskerContent(const RenderObject*, FloatRect& maskRect, bool& emptyMask) const; private: DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::maskUnitsAttr, int, MaskUnits, maskUnits) @@ -70,13 +63,9 @@ namespace WebCore { // SVGExternalResourcesRequired DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) - - virtual void invalidateCanvasResources(); - - HashMap<const RenderObject*, RefPtr<SVGResourceMasker> > m_masker; }; -} // namespace WebCore +} -#endif // ENABLE(SVG) +#endif #endif diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp index cfe1615..ff24c4f 100644 --- a/WebCore/svg/SVGSVGElement.cpp +++ b/WebCore/svg/SVGSVGElement.cpp @@ -187,16 +187,19 @@ SVGViewSpec* SVGSVGElement::currentView() const float SVGSVGElement::currentScale() const { - if (document() && parentNode() == document()) - return document()->frame() ? document()->frame()->zoomFactor() : 1; + // Only the page zoom factor is relevant for SVG + if (Frame* frame = document()->frame()) + return frame->pageZoomFactor(); return m_scale; } void SVGSVGElement::setCurrentScale(float scale) { - if (document() && parentNode() == document()) { - if (document()->frame()) - document()->frame()->setZoomFactor(scale, true); + if (Frame* frame = document()->frame()) { + // Calling setCurrentScale() on the outermost <svg> element in a standalone SVG document + // is allowed to change the page zoom factor, influencing the document size, scrollbars etc. + if (parentNode() == document()) + frame->setZoomFactor(scale, false); return; } diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp index be1ba9c..ff94c7d 100644 --- a/WebCore/svg/SVGStyledElement.cpp +++ b/WebCore/svg/SVGStyledElement.cpp @@ -32,6 +32,8 @@ #include "MappedAttribute.h" #include "PlatformString.h" #include "RenderObject.h" +#include "RenderSVGResource.h" +#include "RenderSVGResourceMasker.h" #include "SVGElement.h" #include "SVGElementInstance.h" #include "SVGElementRareData.h" @@ -39,7 +41,6 @@ #include "SVGRenderStyle.h" #include "SVGResourceClipper.h" #include "SVGResourceFilter.h" -#include "SVGResourceMasker.h" #include "SVGSVGElement.h" #include <wtf/Assertions.h> @@ -234,9 +235,8 @@ void SVGStyledElement::invalidateResources() filter->invalidate(); #endif - SVGResourceMasker* masker = getMaskerById(document, svgStyle->maskElement(), object); - if (masker) - masker->invalidate(); + if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(document, svgStyle->maskElement())) + masker->invalidateClient(object); SVGResourceClipper* clipper = getClipperById(document, svgStyle->clipPath(), object); if (clipper) @@ -260,7 +260,15 @@ void SVGStyledElement::invalidateResourcesInAncestorChain() const void SVGStyledElement::invalidateCanvasResources() { - if (SVGResource* resource = canvasResource(renderer())) + RenderObject* object = renderer(); + if (!object) + return; + + if (object->isSVGResource()) + object->toRenderSVGResource()->invalidateClients(); + + // The following lines will be removed soon, once all resources are handled by renderers. + if (SVGResource* resource = canvasResource(object)) resource->invalidate(); } diff --git a/WebCore/svg/SVGStyledElement.h b/WebCore/svg/SVGStyledElement.h index aec3e75..9645db4 100644 --- a/WebCore/svg/SVGStyledElement.h +++ b/WebCore/svg/SVGStyledElement.h @@ -71,7 +71,7 @@ namespace WebCore { protected: static int cssPropertyIdForSVGAttributeName(const QualifiedName&); - virtual void invalidateCanvasResources(); + void invalidateCanvasResources(); private: DECLARE_ANIMATED_PROPERTY(SVGStyledElement, HTMLNames::classAttr, String, ClassName, className) diff --git a/WebCore/svg/SVGUnitTypes.h b/WebCore/svg/SVGUnitTypes.h index b639f29..86d49b4 100644 --- a/WebCore/svg/SVGUnitTypes.h +++ b/WebCore/svg/SVGUnitTypes.h @@ -38,9 +38,9 @@ private: SVGUnitTypes() { } }; -} // namespace WebCore +static inline SVGUnitTypes::SVGUnitType toUnitType(int type) { return static_cast<SVGUnitTypes::SVGUnitType>(type); } -#endif // ENABLE(SVG) -#endif // SVGUnitTypes_h +} -// vim:ts=4:noet +#endif +#endif diff --git a/WebCore/svg/graphics/SVGImage.cpp b/WebCore/svg/graphics/SVGImage.cpp index 348df4f..febfce8 100644 --- a/WebCore/svg/graphics/SVGImage.cpp +++ b/WebCore/svg/graphics/SVGImage.cpp @@ -215,7 +215,7 @@ NativeImagePtr SVGImage::nativeImageForCurrentFrame() m_frameCache = ImageBuffer::create(size()); if (!m_frameCache) // failed to allocate image return 0; - renderSubtreeToImage(m_frameCache.get(), m_page->mainFrame()->contentRenderer()); + draw(m_frameCache->context(), rect(), rect(), DeviceColorSpace, CompositeSourceOver); } return m_frameCache->image()->nativeImageForCurrentFrame(); } diff --git a/WebCore/svg/graphics/SVGResource.h b/WebCore/svg/graphics/SVGResource.h index 8f303b5..b231b89 100644 --- a/WebCore/svg/graphics/SVGResource.h +++ b/WebCore/svg/graphics/SVGResource.h @@ -45,10 +45,9 @@ namespace WebCore { enum SVGResourceType { // Painting mode ClipperResourceType = 0, - MarkerResourceType, ImageResourceType, FilterResourceType, - MaskerResourceType, + MarkerResourceType, PaintServerResourceType, // For resource tracking we need to know how many types of resource there are @@ -78,7 +77,6 @@ namespace WebCore { bool isFilter() const { return resourceType() == FilterResourceType; } bool isClipper() const { return resourceType() == ClipperResourceType; } bool isMarker() const { return resourceType() == MarkerResourceType; } - bool isMasker() const { return resourceType() == MaskerResourceType; } virtual TextStream& externalRepresentation(TextStream&) const; diff --git a/WebCore/svg/graphics/SVGResourceMasker.cpp b/WebCore/svg/graphics/SVGResourceMasker.cpp deleted file mode 100644 index 18bc71a..0000000 --- a/WebCore/svg/graphics/SVGResourceMasker.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> - * 2009 Dirk Schulze <krit@webkit.org> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(SVG) -#include "SVGResourceMasker.h" - -#include "CanvasPixelArray.h" -#include "Image.h" -#include "ImageBuffer.h" -#include "ImageData.h" -#include "GraphicsContext.h" -#include "RenderObject.h" -#include "SVGMaskElement.h" -#include "SVGRenderSupport.h" -#include "SVGRenderStyle.h" -#include "TextStream.h" - -using namespace std; - -namespace WebCore { - -SVGResourceMasker::SVGResourceMasker(const SVGMaskElement* ownerElement) - : SVGResource() - , m_ownerElement(ownerElement) - , m_emptyMask(false) -{ -} - -SVGResourceMasker::~SVGResourceMasker() -{ -} - -void SVGResourceMasker::invalidate() -{ - SVGResource::invalidate(); - m_mask.clear(); - m_emptyMask = false; -} - -FloatRect SVGResourceMasker::maskerBoundingBox(const FloatRect& objectBoundingBox) const -{ - return m_ownerElement->maskBoundingBox(objectBoundingBox); -} - -bool SVGResourceMasker::applyMask(GraphicsContext* context, const RenderObject* object) -{ - if (!m_mask && !m_emptyMask) - m_mask = m_ownerElement->drawMaskerContent(object, m_maskRect, m_emptyMask); - - if (!m_mask) - return false; - - context->clipToImageBuffer(m_maskRect, m_mask.get()); - return true; -} - -TextStream& SVGResourceMasker::externalRepresentation(TextStream& ts) const -{ - ts << "[type=MASKER]"; - return ts; -} - -SVGResourceMasker* getMaskerById(Document* document, const AtomicString& id, const RenderObject* object) -{ - SVGResource* resource = getResourceById(document, id, object); - if (resource && resource->isMasker()) - return static_cast<SVGResourceMasker*>(resource); - - return 0; -} - -} // namespace WebCore - -#endif diff --git a/WebCore/svg/graphics/SVGResourceMasker.h b/WebCore/svg/graphics/SVGResourceMasker.h deleted file mode 100644 index 27364c2..0000000 --- a/WebCore/svg/graphics/SVGResourceMasker.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef SVGResourceMasker_h -#define SVGResourceMasker_h - -#if ENABLE(SVG) - -#include "GraphicsContext.h" -#include "RenderObject.h" -#include "SVGMaskElement.h" -#include "SVGResource.h" - -#include <memory> - -#include <wtf/OwnPtr.h> -#include <wtf/PassRefPtr.h> - -namespace WebCore { - - class FloatRect; - class ImageBuffer; - class SVGMaskElement; - - class SVGResourceMasker : public SVGResource { - public: - static PassRefPtr<SVGResourceMasker> create(const SVGMaskElement* ownerElement) { return adoptRef(new SVGResourceMasker(ownerElement)); } - virtual ~SVGResourceMasker(); - - virtual void invalidate(); - - virtual SVGResourceType resourceType() const { return MaskerResourceType; } - virtual TextStream& externalRepresentation(TextStream&) const; - - FloatRect maskerBoundingBox(const FloatRect&) const; - bool applyMask(GraphicsContext*, const RenderObject*); - - private: - SVGResourceMasker(const SVGMaskElement*); - - const SVGMaskElement* m_ownerElement; - - OwnPtr<ImageBuffer> m_mask; - FloatRect m_maskRect; - bool m_emptyMask; - }; - - SVGResourceMasker* getMaskerById(Document*, const AtomicString&, const RenderObject* object); - -} // namespace WebCore - -#endif - -#endif // SVGResourceMasker_h diff --git a/WebCore/websockets/WebSocket.cpp b/WebCore/websockets/WebSocket.cpp index 5a64b71..cd5528b 100644 --- a/WebCore/websockets/WebSocket.cpp +++ b/WebCore/websockets/WebSocket.cpp @@ -164,7 +164,7 @@ bool WebSocket::send(const String& message, ExceptionCode& ec) } // No exception is raised if the connection was once established but has subsequently been closed. if (m_state == CLOSED) { - m_bufferedAmountAfterClose += message.utf8().length() + 2; // 2 for framing + m_bufferedAmountAfterClose += message.utf8().length() + 2; // 2 for frameing return false; } // FIXME: check message is valid utf8. diff --git a/WebCore/websockets/WebSocketChannel.cpp b/WebCore/websockets/WebSocketChannel.cpp index 2ab133c..7b87bf3 100644 --- a/WebCore/websockets/WebSocketChannel.cpp +++ b/WebCore/websockets/WebSocketChannel.cpp @@ -164,6 +164,8 @@ void WebSocketChannel::didReceiveData(SocketStreamHandle* handle, const char* da // FIXME: handle set-cookie2. LOG(Network, "WebSocketChannel %p connected", this); m_client->didConnect(); + if (!m_client) + return; break; default: LOG(Network, "WebSocketChannel %p connection failed", this); @@ -209,6 +211,8 @@ void WebSocketChannel::didReceiveData(SocketStreamHandle* handle, const char* da if (p < end && *p == '\xff') { if (frameByte == 0x00) m_client->didReceiveMessage(String::fromUTF8(msgStart, p - msgStart)); + if (!m_client) + return; ++p; nextFrame = p; } diff --git a/WebCore/workers/WorkerThread.cpp b/WebCore/workers/WorkerThread.cpp index fbeb95b..4e3ffa1 100644 --- a/WebCore/workers/WorkerThread.cpp +++ b/WebCore/workers/WorkerThread.cpp @@ -189,6 +189,10 @@ public: workerContext->stopDatabases(&cleanupSync); workerContext->stopActiveDOMObjects(); + + // Event listeners would keep DOMWrapperWorld objects alive for too long. Also, they have references to JS objects, + // which become dangling once Heap is destroyed. + workerContext->removeAllEventListeners(); workerContext->clearScript(); // We wait for the database thread to clean up all its stuff so that we diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp index c258d79..6d912fd 100644 --- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp @@ -492,6 +492,11 @@ void ChromeClientAndroid::runOpenPanel(Frame* frame, core->openFileChooser(chooser); } +void ChromeClientAndroid::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +{ + notImplemented(); +} + bool ChromeClientAndroid::setCursor(PlatformCursorHandle) { notImplemented(); diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h index 68cac24..0e4d5c9 100644 --- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h +++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h @@ -151,6 +151,7 @@ namespace android { virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); virtual bool setCursor(PlatformCursorHandle); + virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); // Notification that the given form element has changed. This function // will be called frequently, so handling should be very fast. @@ -160,6 +161,7 @@ namespace android { // Android-specific void setWebFrame(android::WebFrame* webframe); + android::WebFrame* webFrame() { return m_webFrame; } void wakeUpMainThreadWithNewQuota(long newQuota); #if USE(ACCELERATED_COMPOSITING) diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index 9112afe..a0b8475 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -32,6 +32,8 @@ #include "CString.h" #include "CachedFrame.h" #include "CachedFramePlatformDataAndroid.h" +#include "Chrome.h" +#include "ChromeClientAndroid.h" #include "DOMImplementation.h" #include "Document.h" #include "DocumentLoader.h" @@ -1215,6 +1217,21 @@ WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createJavaAppletWidget(const I return 0; } +void FrameLoaderClientAndroid::didTransferChildFrameToNewDocument() +{ + ASSERT(m_frame); + // m_webFrame points to the WebFrame for the page that our frame previosuly + // belonged to. If the frame now belongs to a new page, we need to update + // m_webFrame to point to the WebFrame for the new page. + Page* newPage = m_frame->page(); + if (newPage != m_webFrame->page()) { + ChromeClientAndroid* chromeClient = static_cast<ChromeClientAndroid*>(newPage->chrome()->client()); + Release(m_webFrame); + m_webFrame = chromeClient->webFrame(); + Retain(m_webFrame); + } +} + // This function is used by the <OBJECT> element to determine the type of // the contents and work out if it can render it. ObjectContentType FrameLoaderClientAndroid::objectContentType(const KURL& url, diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h index 3b754b8..fe58124 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h @@ -176,11 +176,9 @@ namespace android { virtual bool canCachePage() const; virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&); - virtual WTF::PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, - const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual WTF::PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, - const WTF::Vector<String>&, const WTF::Vector<String>&, - const String&, bool loadManually); + virtual WTF::PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); + virtual WTF::PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool loadManually); virtual void redirectDataToPlugin(Widget* pluginWidget); virtual WTF::PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues); diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index 9cd3644..245cd9e 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,277 @@ +2010-02-19 James Hawkins <jhawkins@chromium.org> + + Reviewed by Eric Seidel. + + [Chromium] Use the m_suggestionsPopupClient pointer to refer to the + popup client, as the Autocomplete popup might not be the current + popup. + + https://bugs.webkit.org/show_bug.cgi?id=35172 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::autocompleteHandleKeyEvent): + (WebKit::WebViewImpl::refreshSuggestionsPopup): + +2010-02-19 James Hawkins <jhawkins@chromium.org> + + Reviewed by Eric Seidel. + + [Chromium] Rename EditorClientImpl::onAutofillSuggestionAccepted to + onAutocompleteSuggestionAccepted to better match the purpose of the + function. + + https://bugs.webkit.org/show_bug.cgi?id=35171 + + * src/EditorClientImpl.cpp: + (WebKit::EditorClientImpl::onAutocompleteSuggestionAccepted): + * src/EditorClientImpl.h: + * src/SuggestionsPopupMenuClient.cpp: + (WebKit::SuggestionsPopupMenuClient::valueChanged): + +2010-02-18 Peter Kasting <pkasting@google.com> + + Reviewed by Darin Fisher. + + Add an isImageBlocked bool to the WebContextMenuData struct. + https://bugs.webkit.org/show_bug.cgi?id=35136 + + This lets us properly enable/disable the "Copy Image" context menu entry + (and, in the future, maybe add a "Load Image" function). + + * public/WebContextMenuData.h: + * src/ContextMenuClientImpl.cpp: + (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): + +2010-02-19 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Fixes GeolocationServiceBridgeImpl::stopUpdating (it can be called multiple times). + + * src/GeolocationServiceBridgeChromium.cpp: + (WebKit::GeolocationServiceBridgeImpl::stopUpdating): + +2010-02-19 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed. Chromium build fix: reverting r54997 and r54998. + + * DEPS: + +2010-02-19 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed. Chromium tests fix: update devtools code to match new + web inspector object proxy format. + + * src/js/DebuggerAgent.js: + (devtools.DebuggerAgent.prototype.formatCallFrame_): + (devtools.DebuggerAgent.formatObjectProxy_): + +2010-02-12 Kent Tamura <tkent@chromium.org> + + Unreviewed. Fix Chromium build. + + * DEPS: Bump Google URL revision to 123. + +2010-02-18 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Don't truncate long lines when evaluating expressions on a breakpoint. + + https://bugs.webkit.org/show_bug.cgi?id=35102 + + * src/js/DebuggerAgent.js: + +2010-02-18 Jay Campan <jcampan@google.com> + + Reviewed by Adam Barth. + + Exposing the title in WebDocument. + + https://bugs.webkit.org/show_bug.cgi?id=35058 + + * public/WebDocument.h: + * src/WebDocument.cpp: + (WebKit::WebDocument::title): + +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::detachedFromParent3): + (WebKit::FrameLoaderClientImpl::didTransferChildFrameToNewDocument): + Since Chromium's WebFrameClient is destroyed once a window is closed, + if Frame moves between Pages, the client of corresponding WebFrame + should be replaced as well. + + * src/FrameLoaderClientImpl.h: + * src/WebFrameImpl.h: + (WebKit::WebFrameImpl::setClient): + +2010-02-17 Evan Martin <evan@chromium.org> + + Reviewed by Eric Seidel. + + [chromium] expose cache-bypass flag in reload() API + https://bugs.webkit.org/show_bug.cgi?id=34969 + + This flag is used to force a reload to ignore caches. + (Aka "shift-reload".) + + * public/WebFrame.h: + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::reload): + * src/WebFrameImpl.h: + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::iconForFiles): + * src/ChromeClientImpl.h: + +2010-02-17 Kenneth Russell <kbr@google.com> + + Reviewed by Oliver Hunt. + + Refactor texImage2D and texSubImage2D taking Image to use common code + https://bugs.webkit.org/show_bug.cgi?id=34458 + + Merged the Safari and Chromium code which extracts the data from + Image objects into common entry points on GraphicsContext3D. This + immediately fixes the following three problems: + - Chromium not implementing texSubImage2D taking Image. + - Safari not obeying the flipY parameter to texImage2D or + texSubImage2D taking Image. + - Safari not obeying the premultipyAlpha parameter to texImage2D + or texSubImage2D taking Image. + Added new test verifying the behavior of texImage2D and + texSubImage2D and the flipY parameter. The premultiplyAlpha + parameter can not be tested yet as the implementation is not yet + spec compliant. This will be fixed in a follow-on bug. + + Ran all WebGL demos in demo repository on Safari and Chromium; + textures are now the right way up in both browsers, and + transparent textures in Particles demo now look correct in Safari. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3D::texImage2D): + (WebCore::GraphicsContext3D::texSubImage2D): + +2010-02-17 Alok Priyadarshi <alokp@chromium.org> + + Reviewed by Ariya Hidayat. + + Bug 34900: Implement accelerated compositing for chromium. + https://bugs.webkit.org/show_bug.cgi?id=34900 + + * features.gypi: Added WTF_USE_ACCELERATED_COMPOSITING flag. + +2010-02-17 Jian Li <jianli@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Remove the obsolete chromium interface for handling DownloadURL. + https://bugs.webkit.org/show_bug.cgi?id=34982 + + * public/WebDragData.h: + * src/WebDragData.cpp: + +2010-02-16 James Hawkins <jhawkins@chromium.org> + + Reviewed by Eric Seidel. + + [Chromium] Remove calls to releaseRef when passing PassRefPtrs to base + classes. releaseRef releases the original pointer without decreasing + the reference count, and the base class constructor increases the + reference count, leading to a leak. + + https://bugs.webkit.org/show_bug.cgi?id=35000 + + * src/WebDocument.cpp: + (WebKit::WebDocument::WebDocument): + * src/WebElement.cpp: + (WebKit::WebElement::WebElement): + * src/WebFormElement.cpp: + (WebKit::WebFormElement::WebFormElement): + * src/WebInputElement.cpp: + (WebKit::WebInputElement::WebInputElement): + +2010-02-15 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Fix StorageNamespaceProxy::copy() for test shell + https://bugs.webkit.org/show_bug.cgi?id=34949 + + Chromium passes back NULL when you call WebStorageNamespace::proxy() + but TestShell returns a valid object. Both need to work via + the WebStorageNamespace. + + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespaceProxy::copy): + +2010-02-14 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Add support for the showDebugBorders setting to Chromium. + + https://bugs.webkit.org/show_bug.cgi?id=34906 + + * public/WebSettings.h: Add declaration for setShowDebugBorders + * src/WebSettingsImpl.cpp: + (WebKit::WebSettingsImpl::setShowDebugBorders): Add method implementation + * src/WebSettingsImpl.h: Added declaration for setShowDebugBorders + +2010-02-11 Darin Fisher <darin@chromium.org> + + Reviewed by Jeremy Orlow. + + Introduce WebCookieJar, and provide for a frame specific cookie jar. + + https://bugs.webkit.org/show_bug.cgi?id=34878 + + * WebKit.gyp: + * public/WebCookieJar.h: Added. + * public/WebFrameClient.h: + (WebKit::WebFrameClient::cookieJar): + * public/WebKitClient.h: + (WebKit::WebKitClient::cookieJar): + (WebKit::WebKitClient::setCookies): + (WebKit::WebKitClient::cookies): + (WebKit::WebKitClient::rawCookies): + (WebKit::WebKitClient::deleteCookie): + (WebKit::WebKitClient::cookiesEnabled): + * src/ChromiumBridge.cpp: + (WebCore::getCookieJar): + (WebCore::ChromiumBridge::setCookies): + (WebCore::ChromiumBridge::cookies): + (WebCore::ChromiumBridge::rawCookies): + (WebCore::ChromiumBridge::deleteCookie): + (WebCore::ChromiumBridge::cookiesEnabled): + +2010-02-12 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by David Levin. + + Chromium: provide theme overrides for Chromium devtools on Mac. + + https://bugs.webkit.org/show_bug.cgi?id=34856 + + * src/js/devTools.css: + 2010-02-12 Jeremy Orlow <jorlow@chromium.org> Reviewed by Darin Fisher. diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp index 4b0ad2b..0c76dd3 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -68,6 +68,7 @@ 'WEBKIT_IMPLEMENTATION', ], 'sources': [ + 'public/GeolocationServiceBridgeChromium.h', 'public/gtk/WebInputEventFactory.h', 'public/linux/WebFontRendering.h', 'public/linux/WebRenderTheme.h', @@ -92,6 +93,7 @@ 'public/WebConsoleMessage.h', 'public/WebContextMenuData.h', 'public/WebCookie.h', + 'public/WebCookieJar.h', 'public/WebCrossOriginPreflightResultCache.h', 'public/WebCString.h', 'public/WebCursorInfo.h', @@ -231,6 +233,7 @@ 'src/EventListenerWrapper.h', 'src/FrameLoaderClientImpl.cpp', 'src/FrameLoaderClientImpl.h', + 'src/GeolocationServiceBridgeChromium.cpp', 'src/gtk/WebFontInfo.cpp', 'src/gtk/WebFontInfo.h', 'src/gtk/WebInputEventFactory.cpp', diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi index 6091b8f..0fc6516 100644 --- a/WebKit/chromium/features.gypi +++ b/WebKit/chromium/features.gypi @@ -68,6 +68,7 @@ 'ENABLE_VIDEO=1', 'ENABLE_WEB_SOCKETS=1', 'ENABLE_WORKERS=1', + 'WTF_USE_ACCELERATED_COMPOSITING=0', ], }, 'feature_defines%': '<(feature_defines)', diff --git a/WebKit/chromium/public/GeolocationServiceBridgeChromium.h b/WebKit/chromium/public/GeolocationServiceBridgeChromium.h new file mode 100644 index 0000000..adca956 --- /dev/null +++ b/WebKit/chromium/public/GeolocationServiceBridgeChromium.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2010, Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef GeolocationServiceBridgeChromium_h +#define GeolocationServiceBridgeChromium_h + +namespace WebCore { +class GeolocationServiceBridge; +class GeolocationServiceChromium; +} + +namespace WebKit { + +class WebString; +class WebURL; + +// Provides a WebKit API called by the embedder. +class WebGeolocationServiceBridge { +public: + virtual void setIsAllowed(bool allowed) = 0; + virtual void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) = 0; + virtual void setLastError(int errorCode, const WebString& message) = 0; +}; + +// Provides an embedder API called by WebKit. +class WebGeolocationServiceInterface { +public: + virtual void requestPermissionForFrame(int bridgeId, const WebURL& url) = 0; + virtual void startUpdating(int bridgeId, bool hasHighAccuracy) = 0; + virtual void stopUpdating(int bridgeId) = 0; + virtual void suspend(int bridgeId) = 0; + virtual void resume(int bridgeId) = 0; + + // Attaches the GeolocationBridge to the embedder and returns its id, which + // should be used on subsequent calls for the methods above. + virtual int attachBridge(WebKit::WebGeolocationServiceBridge* geolocationServiceBridge) = 0; + + // Dettaches the GeolocationService from the embedder. + virtual void dettachBridge(int bridgeId) = 0; +}; + +WebCore::GeolocationServiceBridge* createGeolocationServiceBridgeImpl(WebCore::GeolocationServiceChromium*); + +} // namespace WebKit + +#endif // GeolocationServiceBridgeChromium_h diff --git a/WebKit/chromium/public/WebContextMenuData.h b/WebKit/chromium/public/WebContextMenuData.h index 5d67046..384240d 100644 --- a/WebKit/chromium/public/WebContextMenuData.h +++ b/WebKit/chromium/public/WebContextMenuData.h @@ -63,6 +63,9 @@ struct WebContextMenuData { // The absolute URL of the image/video/audio that is in context. WebURL srcURL; + // Whether the image in context has been blocked. + bool isImageBlocked; + // The absolute URL of the page in context. WebURL pageURL; diff --git a/WebKit/chromium/public/WebCookieJar.h b/WebKit/chromium/public/WebCookieJar.h new file mode 100644 index 0000000..df70341 --- /dev/null +++ b/WebKit/chromium/public/WebCookieJar.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebCookieJar_h +#define WebCookieJar_h + +namespace WebKit { +class WebString; +class WebURL; +struct WebCookie; +template <typename T> class WebVector; + +class WebCookieJar { +public: + virtual void setCookie(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookie) { } + virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } + virtual WebString cookieRequestHeaderFieldValue(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } + virtual void rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>&) { } + virtual void deleteCookie(const WebURL&, const WebString& cookieName) { } + virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; } + +protected: + ~WebCookieJar() { } +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebDocument.h b/WebKit/chromium/public/WebDocument.h index e158c41..8964d3a 100644 --- a/WebKit/chromium/public/WebDocument.h +++ b/WebKit/chromium/public/WebDocument.h @@ -65,6 +65,7 @@ public: WEBKIT_API WebElement documentElement() const; WEBKIT_API WebElement body() const; WEBKIT_API WebElement head(); + WEBKIT_API WebString title() const; WEBKIT_API WebNodeCollection all(); WEBKIT_API WebURL completeURL(const WebString&) const; WEBKIT_API WebElement getElementById(const WebString& id) const; diff --git a/WebKit/chromium/public/WebDragData.h b/WebKit/chromium/public/WebDragData.h index 0b861c8..2979519 100644 --- a/WebKit/chromium/public/WebDragData.h +++ b/WebKit/chromium/public/WebDragData.h @@ -72,8 +72,6 @@ public: WEBKIT_API WebString urlTitle() const; WEBKIT_API void setURLTitle(const WebString&); - WEBKIT_API WebURL downloadURL() const; - WEBKIT_API void setDownloadURL(const WebURL&); WEBKIT_API WebString downloadMetadata() const; WEBKIT_API void setDownloadMetadata(const WebString&); diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h index a56e6cb..f193b9e 100644 --- a/WebKit/chromium/public/WebFrame.h +++ b/WebKit/chromium/public/WebFrame.h @@ -241,7 +241,9 @@ public: // Navigation ---------------------------------------------------------- // Reload the current document. - virtual void reload() = 0; + // True |ignoreCache| explicitly bypasses caches. + // False |ignoreCache| revalidates any existing cache entries. + virtual void reload(bool ignoreCache = false) = 0; // Load the given URL. virtual void loadRequest(const WebURLRequest&) = 0; diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h index 4078151..ae2541a 100644 --- a/WebKit/chromium/public/WebFrameClient.h +++ b/WebKit/chromium/public/WebFrameClient.h @@ -38,6 +38,7 @@ namespace WebKit { +class WebCookieJar; class WebDataSource; class WebFormElement; class WebFrame; @@ -74,6 +75,12 @@ public: // May return null. virtual WebMediaPlayer* createMediaPlayer(WebFrame*, WebMediaPlayerClient*) { return 0; } + + // Services ------------------------------------------------------------ + + // A frame specific cookie jar. May return null. + virtual WebCookieJar* cookieJar() { return 0; } + // General notifications ----------------------------------------------- diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index fbaa218..c5a04b2 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -49,6 +49,7 @@ namespace WebKit { class WebApplicationCacheHost; class WebApplicationCacheHostClient; class WebClipboard; +class WebCookieJar; class WebMessagePortChannel; class WebMimeRegistry; class WebPluginListBuilder; @@ -75,6 +76,9 @@ public: // May return null on some platforms. virtual WebThemeEngine* themeEngine() { return 0; } + // May return null. + virtual WebCookieJar* cookieJar() { return 0; } + // Application Cache -------------------------------------------- @@ -177,12 +181,12 @@ public: // Network ------------------------------------------------------------- - virtual void setCookies( - const WebURL& url, const WebURL& firstPartyForCookies, const WebString& cookies) { } - virtual WebString cookies(const WebURL& url, const WebURL& firstPartyForCookies) { return WebString(); } - virtual bool rawCookies(const WebURL& url, const WebURL& firstPartyForCookies, WebVector<WebCookie>*) { return false; } - virtual void deleteCookie(const WebURL& url, const WebString& cookieName) { } - virtual bool cookiesEnabled(const WebURL& url, const WebURL& firstPartyForCookies) { return true; } + // These cookie methods are DEPRECATED in favor of cookieJar accessor. + virtual void setCookies(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookies) { } + virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } + virtual bool rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>*) { return false; } + virtual void deleteCookie(const WebURL&, const WebString& cookieName) { } + virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; } // A suggestion to prefetch IP information for the given hostname. virtual void prefetchHostName(const WebString&) { } diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h index d75ccde..d3a91d3 100644 --- a/WebKit/chromium/public/WebSettings.h +++ b/WebKit/chromium/public/WebSettings.h @@ -78,10 +78,12 @@ public: virtual void setShouldPaintCustomScrollbars(bool) = 0; virtual void setDatabasesEnabled(bool) = 0; virtual void setAllowUniversalAccessFromFileURLs(bool) = 0; + virtual void setAllowFileAccessFromFileURLs(bool) = 0; virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0; virtual void setOfflineWebApplicationCacheEnabled(bool) = 0; virtual void setExperimentalWebGLEnabled(bool) = 0; virtual void setGeolocationEnabled(bool) = 0; + virtual void setShowDebugBorders(bool) = 0; protected: ~WebSettings() { } diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h index 4d272bb..a2de115 100644 --- a/WebKit/chromium/public/WebViewClient.h +++ b/WebKit/chromium/public/WebViewClient.h @@ -46,6 +46,7 @@ class WebAccessibilityObject; class WebDragData; class WebFileChooserCompletion; class WebFrame; +class WebGeolocationServiceInterface; class WebNode; class WebNotificationPresenter; class WebRange; @@ -277,6 +278,11 @@ public: virtual void removeAutofillSuggestions(const WebString& name, const WebString& value) { } + // Geolocation --------------------------------------------------------- + + // Access the embedder API for geolocation services. + virtual WebKit::WebGeolocationServiceInterface* getGeolocationService() { return 0; } + protected: ~WebViewClient() { } }; diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp index ce2f00c..6e5bfc2 100644 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/WebKit/chromium/src/ChromeClientImpl.cpp @@ -43,6 +43,10 @@ #include "FloatRect.h" #include "FrameLoadRequest.h" #include "FrameView.h" +#include "Geolocation.h" +#include "GeolocationService.h" +#include "GeolocationServiceBridgeChromium.h" +#include "GeolocationServiceChromium.h" #include "HitTestResult.h" #include "IntRect.h" #include "Node.h" @@ -576,6 +580,11 @@ void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileCh chooserCompletion->didChooseFile(WebVector<WebString>()); } +void ChromeClientImpl::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +{ + notImplemented(); +} + void ChromeClientImpl::popupOpened(PopupContainer* popupContainer, const IntRect& bounds, bool activatable, @@ -674,4 +683,10 @@ NotificationPresenter* ChromeClientImpl::notificationPresenter() const } #endif +void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) +{ + GeolocationServiceChromium* geolocationService = reinterpret_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService()); + m_webView->client()->getGeolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url()); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h index 9e8c2e3..3a4035b 100644 --- a/WebKit/chromium/src/ChromeClientImpl.h +++ b/WebKit/chromium/src/ChromeClientImpl.h @@ -121,9 +121,9 @@ public: #if ENABLE(NOTIFICATIONS) virtual WebCore::NotificationPresenter* notificationPresenter() const; #endif - virtual void requestGeolocationPermissionForFrame( - WebCore::Frame*, WebCore::Geolocation*) { } + virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); + virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; } virtual void formStateDidChange(const WebCore::Node*); virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; } diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index 0fd0825..e04226e 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -37,6 +37,7 @@ #include "ChromeClientImpl.h" #include "WebClipboard.h" #include "WebCookie.h" +#include "WebCookieJar.h" #include "WebCursorInfo.h" #include "WebData.h" #include "WebFrameClient.h" @@ -73,6 +74,7 @@ #include "BitmapImage.h" #include "Cookie.h" #include "FrameView.h" +#include "GeolocationServiceBridgeChromium.h" #include "GraphicsContext.h" #include "KURL.h" #include "NotImplemented.h" @@ -112,6 +114,17 @@ static WebWidgetClient* toWebWidgetClient(Widget* widget) return chromeClientImpl->webView()->client(); } +static WebCookieJar* getCookieJar(const Document* document) +{ + WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame()); + if (!frameImpl || !frameImpl->client()) + return 0; + WebCookieJar* cookieJar = frameImpl->client()->cookieJar(); + if (!cookieJar) + cookieJar = webKitClient()->cookieJar(); + return cookieJar; +} + // Clipboard ------------------------------------------------------------------ bool ChromiumBridge::clipboardIsFormatAvailable( @@ -173,25 +186,51 @@ void ChromiumBridge::clipboardWriteImage(NativeImagePtr image, // Cookies -------------------------------------------------------------------- -void ChromiumBridge::setCookies(const KURL& url, - const KURL& firstPartyForCookies, - const String& cookie) +void ChromiumBridge::setCookies(const Document* document, const KURL& url, + const String& value) { - webKitClient()->setCookies(url, firstPartyForCookies, cookie); + WebCookieJar* cookieJar = getCookieJar(document); + if (cookieJar) + cookieJar->setCookie(url, document->firstPartyForCookies(), value); + else + webKitClient()->setCookies(url, document->firstPartyForCookies(), value); // DEPRECATED +} + +String ChromiumBridge::cookies(const Document* document, const KURL& url) +{ + String result; + WebCookieJar* cookieJar = getCookieJar(document); + if (cookieJar) + result = cookieJar->cookies(url, document->firstPartyForCookies()); + else + result = webKitClient()->cookies(url, document->firstPartyForCookies()); // DEPRECATED + return result; } -String ChromiumBridge::cookies(const KURL& url, - const KURL& firstPartyForCookies) +String ChromiumBridge::cookieRequestHeaderFieldValue(const Document* document, + const KURL& url) { - return webKitClient()->cookies(url, firstPartyForCookies); + String result; + WebCookieJar* cookieJar = getCookieJar(document); + if (cookieJar) + result = cookieJar->cookieRequestHeaderFieldValue(url, document->firstPartyForCookies()); + else { + // FIXME: This does not return http-only cookies + result = webKitClient()->cookies(url, document->firstPartyForCookies()); // DEPRECATED + } + return result; } -bool ChromiumBridge::rawCookies(const KURL& url, const KURL& firstPartyForCookies, Vector<Cookie>* rawCookies) +bool ChromiumBridge::rawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies) { - rawCookies->clear(); + rawCookies.clear(); WebVector<WebCookie> webCookies; - if (!webKitClient()->rawCookies(url, firstPartyForCookies, &webCookies)) - return false; + + WebCookieJar* cookieJar = getCookieJar(document); + if (cookieJar) + cookieJar->rawCookies(url, document->firstPartyForCookies(), webCookies); + else + webKitClient()->rawCookies(url, document->firstPartyForCookies(), &webCookies); // DEPRECATED for (unsigned i = 0; i < webCookies.size(); ++i) { const WebCookie& webCookie = webCookies[i]; @@ -203,20 +242,29 @@ bool ChromiumBridge::rawCookies(const KURL& url, const KURL& firstPartyForCookie webCookie.httpOnly, webCookie.secure, webCookie.session); - rawCookies->append(cookie); + rawCookies.append(cookie); } return true; } -void ChromiumBridge::deleteCookie(const KURL& url, const String& cookieName) +void ChromiumBridge::deleteCookie(const Document* document, const KURL& url, const String& cookieName) { - webKitClient()->deleteCookie(url, cookieName); + WebCookieJar* cookieJar = getCookieJar(document); + if (cookieJar) + cookieJar->deleteCookie(url, cookieName); + else + webKitClient()->deleteCookie(url, cookieName); // DEPRECATED } -bool ChromiumBridge::cookiesEnabled(const KURL& url, - const KURL& firstPartyForCookies) +bool ChromiumBridge::cookiesEnabled(const Document* document) { - return webKitClient()->cookiesEnabled(url, firstPartyForCookies); + bool result; + WebCookieJar* cookieJar = getCookieJar(document); + if (cookieJar) + result = cookieJar->cookiesEnabled(document->cookieURL(), document->firstPartyForCookies()); + else + result = webKitClient()->cookiesEnabled(document->cookieURL(), document->firstPartyForCookies()); // DEPRECATED + return result; } // DNS ------------------------------------------------------------------------ @@ -310,6 +358,13 @@ String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_ } #endif +// Geolocation ---------------------------------------------------------------- + +GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium) +{ + return createGeolocationServiceBridgeImpl(geolocationServiceChromium); +} + // HTML5 DB ------------------------------------------------------------------- #if ENABLE(DATABASE) diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp index 8472082..06a29ff 100644 --- a/WebKit/chromium/src/ContextMenuClientImpl.cpp +++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp @@ -182,6 +182,10 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( if (mediaElement->hasAudio()) data.mediaFlags |= WebContextMenuData::MediaHasAudio; } + + data.isImageBlocked = + (data.mediaType == WebContextMenuData::MediaTypeImage) && !r.image(); + // If it's not a link, an image, a media element, or an image/media link, // show a selection menu or a more generic page menu. data.frameEncoding = selectedFrame->loader()->encoding(); diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp index d5bddc5..cfd8ec4 100644 --- a/WebKit/chromium/src/EditorClientImpl.cpp +++ b/WebKit/chromium/src/EditorClientImpl.cpp @@ -784,7 +784,7 @@ void EditorClientImpl::cancelPendingAutofill() m_autofillTimer.stop(); } -void EditorClientImpl::onAutofillSuggestionAccepted(HTMLInputElement* textField) +void EditorClientImpl::onAutocompleteSuggestionAccepted(HTMLInputElement* textField) { WebFrameImpl* webframe = WebFrameImpl::fromFrame(textField->document()->frame()); if (!webframe) diff --git a/WebKit/chromium/src/EditorClientImpl.h b/WebKit/chromium/src/EditorClientImpl.h index fd08b4d..006b609 100644 --- a/WebKit/chromium/src/EditorClientImpl.h +++ b/WebKit/chromium/src/EditorClientImpl.h @@ -118,10 +118,10 @@ public: virtual bool showFormAutofillForNode(WebCore::Node*); // Notification that the text changed due to acceptance of a suggestion - // provided by an autofill popup. Having a separate callback in this case - // is a simple way to break the cycle that would otherwise occur if + // provided by an Autocomplete popup. Having a separate callback in this + // case is a simple way to break the cycle that would otherwise occur if // textDidChangeInTextField was called. - virtual void onAutofillSuggestionAccepted(WebCore::HTMLInputElement*); + virtual void onAutocompleteSuggestionAccepted(WebCore::HTMLInputElement*); private: void modifySelection(WebCore::Frame*, WebCore::KeyboardEvent*); diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp index b984308..8fb267d 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -235,7 +235,7 @@ void FrameLoaderClientImpl::detachedFromParent3() // Stop communicating with the WebFrameClient at this point since we are no // longer associated with the Page. - m_webFrame->dropClient(); + m_webFrame->setClient(0); } // This function is responsible for associating the |identifier| with a given @@ -1332,6 +1332,19 @@ PassRefPtr<Frame> FrameLoaderClientImpl::createFrame( return m_webFrame->createChildFrame(frameRequest, ownerElement); } +void FrameLoaderClientImpl::didTransferChildFrameToNewDocument() +{ + ASSERT(m_webFrame->frame()->ownerElement()); + + WebFrameImpl* newParent = static_cast<WebFrameImpl*>(m_webFrame->parent()); + if (!newParent || !newParent->client()) + return; + + // Replace the client since the old client may be destroyed when the + // previous page is closed. + m_webFrame->setClient(newParent->client()); +} + PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin( const IntSize& size, // FIXME: how do we use this? HTMLPlugInElement* element, diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h index 901600c..8a39393 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.h +++ b/WebKit/chromium/src/FrameLoaderClientImpl.h @@ -174,6 +174,7 @@ public: WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<WebCore::Widget> createPlugin( const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, diff --git a/WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp b/WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp new file mode 100644 index 0000000..abbb9c6 --- /dev/null +++ b/WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#include "GeolocationServiceBridgeChromium.h" + +#include "Chrome.h" +#include "ChromeClientImpl.h" +#include "Frame.h" +#include "Geolocation.h" +#include "GeolocationServiceChromium.h" +#include "Geoposition.h" +#include "Page.h" +#include "PositionError.h" +#include "PositionOptions.h" +#include "WebFrame.h" +#include "WebFrameImpl.h" +#include "WebViewClient.h" +#include "WebViewImpl.h" + +#if ENABLE(GEOLOCATION) + +using WebCore::Coordinates; +using WebCore::Frame; +using WebCore::Geolocation; +using WebCore::GeolocationServiceBridge; +using WebCore::GeolocationServiceChromium; +using WebCore::GeolocationServiceClient; +using WebCore::Geoposition; +using WebCore::PositionError; +using WebCore::PositionOptions; +using WebCore::String; + +namespace WebKit { + +class GeolocationServiceBridgeImpl : public GeolocationServiceBridge, public WebGeolocationServiceBridge { +public: + explicit GeolocationServiceBridgeImpl(GeolocationServiceChromium*); + virtual ~GeolocationServiceBridgeImpl(); + + // GeolocationServiceBridge + virtual bool startUpdating(PositionOptions*); + virtual void stopUpdating(); + virtual void suspend(); + virtual void resume(); + virtual int getBridgeId() const; + + // WebGeolocationServiceBridge + virtual void setIsAllowed(bool allowed); + virtual void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp); + virtual void setLastError(int errorCode, const WebString& message); + +private: + WebViewClient* getWebViewClient(); + + // GeolocationServiceChromium owns us, we only have a pointer back to it. + GeolocationServiceChromium* m_GeolocationServiceChromium; + int m_bridgeId; +}; + +GeolocationServiceBridge* createGeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium) +{ + return new GeolocationServiceBridgeImpl(geolocationServiceChromium); +} + +GeolocationServiceBridgeImpl::GeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium) + : m_GeolocationServiceChromium(geolocationServiceChromium) +{ + // We need to attach ourselves here: Geolocation calls requestPermissionForFrame() + // directly, and we need to be attached so that the embedder can call + // our setIsAllowed(). + m_bridgeId = getWebViewClient()->getGeolocationService()->attachBridge(this); + ASSERT(m_bridgeId); +} + +GeolocationServiceBridgeImpl::~GeolocationServiceBridgeImpl() +{ + WebKit::WebViewClient* webViewClient = getWebViewClient(); + // Geolocation has an OwnPtr to us, and it's destroyed after the frame has + // been potentially disconnected. In this case, it calls stopUpdating() + // has been called and we have already dettached ourselves. + if (!webViewClient) { + ASSERT(!m_bridgeId); + } else if (m_bridgeId) + webViewClient->getGeolocationService()->dettachBridge(m_bridgeId); +} + +bool GeolocationServiceBridgeImpl::startUpdating(PositionOptions* positionOptions) +{ + if (!m_bridgeId) + m_bridgeId = getWebViewClient()->getGeolocationService()->attachBridge(this); + getWebViewClient()->getGeolocationService()->startUpdating(m_bridgeId, positionOptions->enableHighAccuracy()); + //// FIXME: this will trigger a permission request regardless. + //// Is it correct? confirm with andreip. + // positionChanged(); + return true; +} + +void GeolocationServiceBridgeImpl::stopUpdating() +{ + if (m_bridgeId) { + WebGeolocationServiceInterface* geolocationService = getWebViewClient()->getGeolocationService(); + geolocationService->stopUpdating(m_bridgeId); + geolocationService->dettachBridge(m_bridgeId); + m_bridgeId = 0; + } +} + +void GeolocationServiceBridgeImpl::suspend() +{ + getWebViewClient()->getGeolocationService()->suspend(m_bridgeId); +} + +void GeolocationServiceBridgeImpl::resume() +{ + getWebViewClient()->getGeolocationService()->resume(m_bridgeId); +} + +int GeolocationServiceBridgeImpl::getBridgeId() const +{ + return m_bridgeId; +} + +void GeolocationServiceBridgeImpl::setIsAllowed(bool allowed) +{ + m_GeolocationServiceChromium->setIsAllowed(allowed); +} + +void GeolocationServiceBridgeImpl::setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) +{ + m_GeolocationServiceChromium->setLastPosition(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed, timestamp); +} + +void GeolocationServiceBridgeImpl::setLastError(int errorCode, const WebString& message) +{ + m_GeolocationServiceChromium->setLastError(errorCode, message); +} + +WebViewClient* GeolocationServiceBridgeImpl::getWebViewClient() +{ + Frame* frame = m_GeolocationServiceChromium->frame(); + if (!frame || !frame->page()) + return 0; + WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(frame->page()->chrome()->client()); + WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client(); + return webViewClient; +} + +} // namespace WebKit + +#endif // ENABLE(GEOLOCATION) diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp index 83574da..807a794 100644 --- a/WebKit/chromium/src/GraphicsContext3D.cpp +++ b/WebKit/chromium/src/GraphicsContext3D.cpp @@ -65,17 +65,12 @@ #if PLATFORM(CG) #include "GraphicsContext.h" #include <CoreGraphics/CGContext.h> -#include <CoreGraphics/CGBitmapContext.h> #include <CoreGraphics/CGImage.h> #include <OpenGL/OpenGL.h> #else #define FLIP_FRAMEBUFFER_VERTICALLY #endif -#if PLATFORM(SKIA) -#include "NativeImageSkia.h" -#endif - #if OS(DARWIN) #define USE_TEXTURE_RECTANGLE_FOR_FRAMEBUFFER #endif @@ -1878,178 +1873,17 @@ int GraphicsContext3D::texImage2D(unsigned target, return 0; } -// Remove premultiplied alpha from color channels. -// FIXME: this is lossy. Must retrieve original values from HTMLImageElement. -static void unmultiplyAlpha(unsigned char* rgbaData, int numPixels) -{ - for (int j = 0; j < numPixels; j++) { - float b = rgbaData[4*j+0] / 255.0f; - float g = rgbaData[4*j+1] / 255.0f; - float r = rgbaData[4*j+2] / 255.0f; - float a = rgbaData[4*j+3] / 255.0f; - if (a > 0.0f) { - b /= a; - g /= a; - r /= a; - b = (b > 1.0f) ? 1.0f : b; - g = (g > 1.0f) ? 1.0f : g; - r = (r > 1.0f) ? 1.0f : r; - rgbaData[4*j+0] = (unsigned char) (b * 255.0f); - rgbaData[4*j+1] = (unsigned char) (g * 255.0f); - rgbaData[4*j+2] = (unsigned char) (r * 255.0f); - } - } -} - -// FIXME: this must be changed to refer to the original image data -// rather than unmultiplying the alpha channel. -static int texImage2DHelper(unsigned target, unsigned level, - int width, int height, - int rowBytes, - bool flipY, - bool premultiplyAlpha, - GLenum format, - bool skipAlpha, - unsigned char* pixels) -{ - ASSERT(format == GL_RGBA || format == GL_BGRA); - GLint internalFormat = GL_RGBA8; - if (skipAlpha) { - internalFormat = GL_RGB8; - // Ignore the alpha channel - premultiplyAlpha = true; - } - if (flipY) { - // Need to flip images vertically. To avoid making a copy of - // the entire image, we perform a ton of glTexSubImage2D - // calls. FIXME: should rethink this strategy for efficiency. - glTexImage2D(target, level, internalFormat, - width, - height, - 0, - format, - GL_UNSIGNED_BYTE, - 0); - unsigned char* row = 0; - bool allocatedRow = false; - if (!premultiplyAlpha) { - row = new unsigned char[rowBytes]; - allocatedRow = true; - } - for (int i = 0; i < height; i++) { - if (premultiplyAlpha) - row = pixels + (rowBytes * i); - else { - memcpy(row, pixels + (rowBytes * i), rowBytes); - unmultiplyAlpha(row, width); - } - glTexSubImage2D(target, level, 0, height - i - 1, - width, 1, - format, - GL_UNSIGNED_BYTE, - row); - } - if (allocatedRow) - delete[] row; - } else { - // The pixels of cube maps' faces are defined with a top-down - // scanline ordering, unlike GL_TEXTURE_2D, so when uploading - // these, the above vertical flip is the wrong thing to do. - if (premultiplyAlpha) - glTexImage2D(target, level, internalFormat, - width, - height, - 0, - format, - GL_UNSIGNED_BYTE, - pixels); - else { - glTexImage2D(target, level, internalFormat, - width, - height, - 0, - format, - GL_UNSIGNED_BYTE, - 0); - unsigned char* row = new unsigned char[rowBytes]; - for (int i = 0; i < height; i++) { - memcpy(row, pixels + (rowBytes * i), rowBytes); - unmultiplyAlpha(row, width); - glTexSubImage2D(target, level, 0, i, - width, 1, - format, - GL_UNSIGNED_BYTE, - row); - } - delete[] row; - } - } - return 0; -} - int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image, bool flipY, bool premultiplyAlpha) { - ASSERT(image); - - int res = -1; -#if PLATFORM(SKIA) - NativeImageSkia* skiaImage = image->nativeImageForCurrentFrame(); - if (!skiaImage) { - ASSERT_NOT_REACHED(); + Vector<uint8_t> imageData; + unsigned int format, internalFormat; + if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat)) return -1; - } - SkBitmap::Config skiaConfig = skiaImage->config(); - // FIXME: must support more image configurations. - if (skiaConfig != SkBitmap::kARGB_8888_Config) { - ASSERT_NOT_REACHED(); - return -1; - } - SkBitmap& skiaImageRef = *skiaImage; - SkAutoLockPixels lock(skiaImageRef); - int width = skiaImage->width(); - int height = skiaImage->height(); - unsigned char* pixels = - reinterpret_cast<unsigned char*>(skiaImage->getPixels()); - int rowBytes = skiaImage->rowBytes(); - res = texImage2DHelper(target, level, - width, height, - rowBytes, - flipY, premultiplyAlpha, - GL_BGRA, - false, - pixels); -#elif PLATFORM(CG) - CGImageRef cgImage = image->nativeImageForCurrentFrame(); - if (!cgImage) { - ASSERT_NOT_REACHED(); - return -1; - } - int width = CGImageGetWidth(cgImage); - int height = CGImageGetHeight(cgImage); - int rowBytes = width * 4; - CGImageAlphaInfo info = CGImageGetAlphaInfo(cgImage); - bool skipAlpha = (info == kCGImageAlphaNone - || info == kCGImageAlphaNoneSkipLast - || info == kCGImageAlphaNoneSkipFirst); - unsigned char* imageData = new unsigned char[height * rowBytes]; - CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); - CGContextRef tmpContext = CGBitmapContextCreate(imageData, width, height, 8, rowBytes, - colorSpace, - kCGImageAlphaPremultipliedLast); - CGColorSpaceRelease(colorSpace); - CGContextSetBlendMode(tmpContext, kCGBlendModeCopy); - CGContextDrawImage(tmpContext, - CGRectMake(0, 0, static_cast<CGFloat>(width), static_cast<CGFloat>(height)), - cgImage); - CGContextRelease(tmpContext); - res = texImage2DHelper(target, level, width, height, rowBytes, - flipY, premultiplyAlpha, GL_RGBA, skipAlpha, imageData); - delete[] imageData; -#else -#error Must port to your platform -#endif - return res; + glTexImage2D(target, level, internalFormat, + image->width(), image->height(), 0, + format, GL_UNSIGNED_BYTE, imageData.data()); + return 0; } GL_SAME_METHOD_3(TexParameterf, texParameterf, unsigned, unsigned, float); @@ -2078,9 +1912,14 @@ int GraphicsContext3D::texSubImage2D(unsigned target, bool flipY, bool premultiplyAlpha) { - // FIXME: implement. - notImplemented(); - return -1; + Vector<uint8_t> imageData; + unsigned int format, internalFormat; + if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat)) + return -1; + glTexSubImage2D(target, level, xoffset, yoffset, + image->width(), image->height(), + format, GL_UNSIGNED_BYTE, imageData.data()); + return 0; } GL_SAME_METHOD_2(Uniform1f, uniform1f, long, float) diff --git a/WebKit/chromium/src/StorageNamespaceProxy.cpp b/WebKit/chromium/src/StorageNamespaceProxy.cpp index 1be1967..3c87554 100644 --- a/WebKit/chromium/src/StorageNamespaceProxy.cpp +++ b/WebKit/chromium/src/StorageNamespaceProxy.cpp @@ -67,13 +67,14 @@ StorageNamespaceProxy::~StorageNamespaceProxy() PassRefPtr<StorageNamespace> StorageNamespaceProxy::copy() { ASSERT(m_storageType == SessionStorage); - // The WebViewClient knows what its session storage namespace id is but we - // do not. Returning 0 here causes it to be fetched (via the WebViewClient) - // on its next use. Note that it is WebViewClient::createView's - // responsibility to clone the session storage namespace id and that the - // only time copy() is called is directly after the createView call...which - // is why all of this is safe. - return 0; + WebKit::WebStorageNamespace* newNamespace = m_storageNamespace->copy(); + // Some embedders hook into WebViewClient::createView to make the copy of + // session storage and then return the object lazily. Other embedders + // choose to make the copy now and return a pointer immediately. So handle + // both cases. + if (!newNamespace) + return 0; + return adoptRef(new StorageNamespaceProxy(newNamespace, m_storageType)); } PassRefPtr<StorageArea> StorageNamespaceProxy::storageArea(PassRefPtr<SecurityOrigin> origin) diff --git a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp b/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp index b4a77a3..aaf9036 100644 --- a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp +++ b/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp @@ -65,7 +65,7 @@ void SuggestionsPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvent EditorClientImpl* editor = static_cast<EditorClientImpl*>(webView->page()->editorClient()); ASSERT(editor); - editor->onAutofillSuggestionAccepted( + editor->onAutocompleteSuggestionAccepted( static_cast<HTMLInputElement*>(m_textField.get())); } diff --git a/WebKit/chromium/src/WebDocument.cpp b/WebKit/chromium/src/WebDocument.cpp index 84f3004..2a91e22 100644 --- a/WebKit/chromium/src/WebDocument.cpp +++ b/WebKit/chromium/src/WebDocument.cpp @@ -53,7 +53,7 @@ using namespace WebCore; namespace WebKit { WebDocument::WebDocument(const PassRefPtr<Document>& elem) - : WebNode(elem.releaseRef()) + : WebNode(elem) { } @@ -98,6 +98,11 @@ WebElement WebDocument::head() return WebElement(unwrap<Document>()->head()); } +WebString WebDocument::title() const +{ + return WebString(constUnwrap<Document>()->title()); +} + WebNodeCollection WebDocument::all() { return WebNodeCollection(unwrap<Document>()->all()); diff --git a/WebKit/chromium/src/WebDragData.cpp b/WebKit/chromium/src/WebDragData.cpp index b18ab1b..2f476a7 100644 --- a/WebKit/chromium/src/WebDragData.cpp +++ b/WebKit/chromium/src/WebDragData.cpp @@ -88,18 +88,6 @@ void WebDragData::setURLTitle(const WebString& urlTitle) m_private->urlTitle = urlTitle; } -WebURL WebDragData::downloadURL() const -{ - ASSERT(!isNull()); - return m_private->downloadURL; -} - -void WebDragData::setDownloadURL(const WebURL& downloadURL) -{ - ensureMutable(); - m_private->downloadURL = downloadURL; -} - WebString WebDragData::downloadMetadata() const { ASSERT(!isNull()); diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp index d0a0862..6501771 100644 --- a/WebKit/chromium/src/WebElement.cpp +++ b/WebKit/chromium/src/WebElement.cpp @@ -39,7 +39,7 @@ using namespace WebCore; namespace WebKit { WebElement::WebElement(const WTF::PassRefPtr<WebCore::Element>& elem) - : WebNode(elem.releaseRef()) + : WebNode(elem) { } diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp index 5471608..0024892 100644 --- a/WebKit/chromium/src/WebFormElement.cpp +++ b/WebKit/chromium/src/WebFormElement.cpp @@ -47,7 +47,7 @@ class WebFormPrivate : public HTMLFormElement { }; WebFormElement::WebFormElement(const WTF::PassRefPtr<HTMLFormElement>& e) - : WebElement(e.releaseRef()) + : WebElement(e) { } diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp index 2f911f1..665f6a3 100644 --- a/WebKit/chromium/src/WebFrameImpl.cpp +++ b/WebKit/chromium/src/WebFrameImpl.cpp @@ -713,12 +713,13 @@ bool WebFrameImpl::insertStyleText( return success; } -void WebFrameImpl::reload() +void WebFrameImpl::reload(bool ignoreCache) { m_frame->loader()->history()->saveDocumentAndScrollState(); stopLoading(); // Make sure existing activity stops. - m_frame->loader()->reload(); + + m_frame->loader()->reload(ignoreCache); } void WebFrameImpl::loadRequest(const WebURLRequest& request) diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h index ccba6d4..f23106c 100644 --- a/WebKit/chromium/src/WebFrameImpl.h +++ b/WebKit/chromium/src/WebFrameImpl.h @@ -103,7 +103,7 @@ public: virtual v8::Local<v8::Context> mainWorldScriptContext() const; #endif virtual bool insertStyleText(const WebString& css, const WebString& id); - virtual void reload(); + virtual void reload(bool ignoreCache); virtual void loadRequest(const WebURLRequest&); virtual void loadHistoryItem(const WebHistoryItem&); virtual void loadData( @@ -221,7 +221,7 @@ public: WebPasswordAutocompleteListener* getPasswordListener(WebCore::HTMLInputElement*); WebFrameClient* client() const { return m_client; } - void dropClient() { m_client = 0; } + void setClient(WebFrameClient* client) { m_client = client; } static void selectWordAroundPosition(WebCore::Frame*, WebCore::VisiblePosition); diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp index 9fd317f..4ee1b93 100644 --- a/WebKit/chromium/src/WebInputElement.cpp +++ b/WebKit/chromium/src/WebInputElement.cpp @@ -41,7 +41,7 @@ using namespace WebCore; namespace WebKit { WebInputElement::WebInputElement(const WTF::PassRefPtr<HTMLInputElement>& elem) - : WebElement(elem.releaseRef()) + : WebElement(elem) { } diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp index 5cfbd4f..a680321 100644 --- a/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/WebKit/chromium/src/WebSettingsImpl.cpp @@ -236,6 +236,11 @@ void WebSettingsImpl::setAllowUniversalAccessFromFileURLs(bool allow) m_settings->setAllowUniversalAccessFromFileURLs(allow); } +void WebSettingsImpl::setAllowFileAccessFromFileURLs(bool allow) +{ + m_settings->setAllowFileAccessFromFileURLs(allow); +} + void WebSettingsImpl::setTextDirectionSubmenuInclusionBehaviorNeverIncluded() { // FIXME: If you ever need more behaviors than this, then we should probably @@ -254,6 +259,11 @@ void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled) m_settings->setWebGLEnabled(enabled); } +void WebSettingsImpl::setShowDebugBorders(bool show) +{ + m_settings->setShowDebugBorders(show); +} + void WebSettingsImpl::setGeolocationEnabled(bool enabled) { m_settings->setGeolocationEnabled(enabled); diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h index 3b69fe6..64ccab5 100644 --- a/WebKit/chromium/src/WebSettingsImpl.h +++ b/WebKit/chromium/src/WebSettingsImpl.h @@ -80,10 +80,12 @@ public: virtual void setShouldPaintCustomScrollbars(bool); virtual void setDatabasesEnabled(bool); virtual void setAllowUniversalAccessFromFileURLs(bool); + virtual void setAllowFileAccessFromFileURLs(bool); virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); virtual void setOfflineWebApplicationCacheEnabled(bool); virtual void setExperimentalWebGLEnabled(bool); virtual void setGeolocationEnabled(bool); + virtual void setShowDebugBorders(bool); private: WebCore::Settings* m_settings; diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index ce03523..97665d4 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -540,11 +540,11 @@ bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event) int selectedIndex = m_suggestionsPopup->selectedIndex(); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element); WebString name = inputElement->name(); - WebString value = m_autocompletePopupClient->itemText(selectedIndex); + WebString value = m_suggestionsPopupClient->itemText(selectedIndex); m_client->removeAutofillSuggestions(name, value); // Update the entries in the currently showing popup to reflect the // deletion. - m_autocompletePopupClient->removeSuggestionAtIndex(selectedIndex); + m_suggestionsPopupClient->removeSuggestionAtIndex(selectedIndex); refreshSuggestionsPopup(); return false; } @@ -1871,7 +1871,7 @@ void WebViewImpl::refreshSuggestionsPopup() ASSERT(m_suggestionsPopupShowing); // Hide the popup if it has become empty. - if (!m_autocompletePopupClient->listSize()) { + if (!m_suggestionsPopupClient->listSize()) { hideSuggestionsPopup(); return; } diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js index 301620a..bb655c7 100644 --- a/WebKit/chromium/src/js/DebuggerAgent.js +++ b/WebKit/chromium/src/js/DebuggerAgent.js @@ -1053,7 +1053,7 @@ devtools.DebuggerAgent.prototype.formatCallFrame_ = function(stackFrame) for (var i = 0; i < stackFrame.scopes.length; i++) { var scope = stackFrame.scopes[i]; scope.frameNumber = stackFrame.index; - var scopeObjectProxy = new WebInspector.ObjectProxy(0, scope, [], 0, "", true); + var scopeObjectProxy = new WebInspector.ObjectProxy(0, scope, [], "", true); scopeObjectProxy.isScope = true; switch(scope.type) { case ScopeType.Global: @@ -1149,7 +1149,7 @@ devtools.DebuggerAgent.formatObjectProxy_ = function(v) } else description = "<unresolved ref: " + v.ref + ", type: " + v.type + ">"; - var proxy = new WebInspector.ObjectProxy(0, v, [], 0, description, hasChildren); + var proxy = new WebInspector.ObjectProxy(0, v, [], description, hasChildren); proxy.type = v.type; proxy.isV8Ref = true; return proxy; @@ -1364,7 +1364,8 @@ devtools.CallFrame.prototype.evaluate_ = function(expression, callback) "frame": this.id, "global": false, "disable_break": false, - "compactFormat": true + "compactFormat": true, + "maxStringLength": -1 }, function(response) { var result = {}; diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css index 1fa935f..bb33f72 100755 --- a/WebKit/chromium/src/js/devTools.css +++ b/WebKit/chromium/src/js/devTools.css @@ -13,8 +13,8 @@ body.attached #toolbar { padding-left: 0; } - /* Chrome theme overrides */ + body.platform-windows #toolbar { background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(242, 247, 253)), to(rgb(223, 234, 248))); } @@ -23,6 +23,21 @@ body.platform-windows.inactive #toolbar { background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(248, 248, 248)), to(rgb(237, 237, 237))); } +body.detached.platform-mac-leopard #toolbar { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(175, 175, 175)), to(rgb(151, 151, 151))) !important; +} + +body.detached.platform-mac-leopard.inactive #toolbar { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(221, 221, 221)), to(rgb(207, 207, 207))) !important; +} + +body.detached.platform-mac-snowleopard #toolbar { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(189, 189, 189)), to(rgb(151, 151, 151))) !important; +} + +body.detached.platform-mac-snowleopard.inactive #toolbar { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(215, 215, 215)), to(rgb(207, 207, 207))) !important; +} /* Heap Profiler Styles */ diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index 7a44884..43d2d20 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,176 @@ +2010-02-18 Diego Escalante Urrelo <descalante@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] WebKitDownload documentation is incomplete + https://bugs.webkit.org/show_bug.cgi?id=35018 + + Concretely the error signal was undocumented. Also two relevant enums + were not included. + + * docs/webkitgtk-sections.txt: + * docs/webkitgtk.types: + * webkit/webkitdownload.cpp: + (webkit_download_class_init): + +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::didTransferChildFrameToNewDocument): + Added empty implementation of a new virtual method. + + * WebCoreSupport/FrameLoaderClientGtk.h: + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::iconForFiles): + * WebCoreSupport/ChromeClientGtk.h: + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Rename 'enable-java' setting to 'enable-java-applet', since it + only controls whether <applet> is supported or not instead of + whether all Java content is supported or not. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + (webkit_web_settings_set_property): + (webkit_web_settings_get_property): + (webkit_web_settings_copy): + * webkit/webkitwebview.cpp: + (DNDContentsRequest::webkit_web_view_update_settings): + (DNDContentsRequest::webkit_web_view_settings_notify): + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + [Linux] Webkit incompatible with Java plugins + https://bugs.webkit.org/show_bug.cgi?id=24912 + + Implement FrameLoaderClient::createJavaAppletWidget. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::createJavaAppletWidget): + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + [Linux] Webkit incompatible with Java plugins + https://bugs.webkit.org/show_bug.cgi?id=24912 + + Add a WebKitWebSetting to enable/disable the Java plugin support. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + (webkit_web_settings_set_property): + (webkit_web_settings_get_property): + (webkit_web_settings_copy): + * webkit/webkitwebview.cpp: + (webkit_web_view_update_settings): + (webkit_web_view_settings_notify): + +2010-02-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Test that data URIs that cause downloads to be started do not crash. + + * tests/testdownload.c: + (mime_type_policy_decision_requested_cb): + (idle_quit_loop_cb): + (test_webkit_download_data): + (main): + +2010-02-17 Philippe Normand <pnormand@igalia.com> + + Reviewed by Xan Lopez. + + Missing property warning after r54873 + https://bugs.webkit.org/show_bug.cgi?id=35023 + + Add a new WebKitWebSettings setting, 'enable-file-access-from-file-uris', set to + FALSE by default, that when enabled will assign each file:// URI + their own security domain. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + (webkit_web_settings_set_property): + (webkit_web_settings_get_property): + (webkit_web_settings_copy): + +2010-02-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Check if the handle has a SoupMessage before trying to use + it. This will be the case in non-HTTP(S) URLs. + + * webkit/webkitdownload.cpp: + (webkit_download_new_with_handle): + (webkit_download_start): + +2010-02-16 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Add a new WebKitWebSettings setting, 'auto-resize-window', set to + FALSE by default, that when enabled will apply any resizes or + moves done by a page through various DOM methods (moveTo, + resizeTo, moveBy, resizeBy). + + * WebCoreSupport/ChromeClientGtk.cpp: + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + (webkit_web_settings_set_property): + (webkit_web_settings_get_property): + (webkit_web_settings_copy): + +2010-02-15 Emilio Pozuelo Monfort <pochu27@gmail.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Fails to build on GNU/Hurd because of PATH_MAX usage + https://bugs.webkit.org/show_bug.cgi?id=34920 + + Use dynamic allocation instead of fixed PATH_MAX size buffers to + fix the build on GNU/Hurd, where PATH_MAX is undefined. + + * tests/testmimehandling.c: + (main): + * tests/testwebview.c: + (main): + +2010-02-14 Diego Escalante Urrelo <descalante@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [gtk] WebKitDownload's currentSize property is guint, should be guint64 + https://bugs.webkit.org/show_bug.cgi?id=34829 + + Actually use a guint64 for current-size property in WebKitDownload, we + were using a guint which is likely the cause for wrong sizes for files + over 4 Gb. + + * webkit/webkitdownload.cpp: + 2010-02-09 Gustavo Noronha Silva <gns@gnome.org> Reviewed by Xan Lopez. diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index 8ea8991..74f5e07 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -88,6 +88,23 @@ void ChromeClient::setWindowRect(const FloatRect& rect) "width", intrect.width(), "height", intrect.height(), NULL); + + gboolean autoResizeWindow; + WebKitWebSettings* settings = webkit_web_view_get_settings(m_webView); + g_object_get(settings, "auto-resize-window", &autoResizeWindow, NULL); + + if (!autoResizeWindow) + return; + + GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); +#if GTK_CHECK_VERSION(2, 18, 0) + if (gtk_widget_is_toplevel(window)) { +#else + if (GTK_WIDGET_TOPLEVEL(window)) { +#endif + gtk_window_move(GTK_WINDOW(window), intrect.x(), intrect.y()); + gtk_window_resize(GTK_WINDOW(window), intrect.width(), intrect.height()); + } } FloatRect ChromeClient::pageRect() @@ -546,6 +563,12 @@ void ChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser) gtk_widget_destroy(dialog); } +void ChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +{ + // FIXME: Move the code in Icon::createIconForFiles() here. + notImplemented(); +} + bool ChromeClient::setCursor(PlatformCursorHandle) { notImplemented(); diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h index beb7a08..7e407d3 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h @@ -107,6 +107,7 @@ namespace WebKit { virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); #endif virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); + virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); virtual void formStateDidChange(const WebCore::Node*) { } diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 1ccc8a1..f900f05 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -491,6 +491,10 @@ PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String& return childFrame.release(); } +void FrameLoaderClient::didTransferChildFrameToNewDocument() +{ +} + void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) { ASSERT(!m_pluginView); @@ -498,11 +502,9 @@ void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) m_hasSentResponseToPlugin = false; } -PassRefPtr<Widget> FrameLoaderClient::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, - const Vector<String>& paramNames, const Vector<String>& paramValues) +PassRefPtr<Widget> FrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) { - notImplemented(); - return 0; + return FrameLoaderClient::createPlugin(pluginSize, element, baseURL, paramNames, paramValues, "application/x-java-applet", false); } ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const String& mimeType) diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index b364873..d5db6d0 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -113,6 +113,7 @@ namespace WebKit { virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WebCore::String>&, const WTF::Vector<WebCore::String>&, const WebCore::String&, bool); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues); diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt index 9574280..2379c8b 100644 --- a/WebKit/gtk/docs/webkitgtk-sections.txt +++ b/WebKit/gtk/docs/webkitgtk-sections.txt @@ -126,6 +126,8 @@ WebKitWebFrameClass <SECTION> <FILE>webkitdownload</FILE> +WebKitDownloadError +WebKitDownloadStatus <TITLE>WebKitDownload</TITLE> WebKitDownload webkit_download_cancel @@ -157,9 +159,7 @@ WEBKIT_TYPE_DOWNLOAD_STATUS webkit_download_get_type WebKitDownload WebKitDownloadClass -WebKitDownloadError WebKitDownloadPrivate -WebKitDownloadStatus </SECTION> <SECTION> diff --git a/WebKit/gtk/docs/webkitgtk.types b/WebKit/gtk/docs/webkitgtk.types index b8ed5be..23f3382 100644 --- a/WebKit/gtk/docs/webkitgtk.types +++ b/WebKit/gtk/docs/webkitgtk.types @@ -1,12 +1,13 @@ #include <webkit/webkit.h> +webkit_download_get_type +webkit_navigation_response_get_type webkit_network_request_get_type webkit_web_back_forward_list_get_type webkit_web_history_item_get_type webkit_web_inspector_get_type webkit_web_settings_get_type webkit_web_view_get_type -webkit_navigation_response_get_type webkit_web_view_target_info_get_type webkit_web_window_features_get_type diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog index d7eee3a..aabad74 100644 --- a/WebKit/gtk/po/ChangeLog +++ b/WebKit/gtk/po/ChangeLog @@ -1,3 +1,37 @@ +2010-02-18 A S Alam <amanpreet.alam@gmail.com> + + Punjabi translation. + + * pa.po: Added. + +2010-02-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Refreshed all localization-related files, so that they are + up-to-date with the code. + + * de.po: Updated. + * en_GB.po: Updated. + * es.po: Updated. + * it.po: Updated. + * lt.po: Updated. + * nl.po: Updated. + * pt_BR.po: Updated. + * ru.po: Updated. + * sr.po: Updated. + * sr@latin.po: Updated. + * sv.po: Updated. + * vi.po: Updated. + * webkit.pot: Updated. + * zh_CN.po: Updated. + +2010-02-16 Gil Osher <gilosher@gmail.com> + + Reviewed by Gustavo Noronha. + + Localization of WebKitGTK+ in Hebrew. + + * he.po: Added. + 2009-10-19 Daniel Macks <dmacks@netspace.org> Reviewed by Adam Barth. diff --git a/WebKit/gtk/po/de.po b/WebKit/gtk/po/de.po index f3785af..1106587 100644 --- a/WebKit/gtk/po/de.po +++ b/WebKit/gtk/po/de.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-04-07 00:27+0100\n" "Last-Translator: Christian Dywan <christian@twotoasts.de>\n" "Language-Team: German\n" @@ -14,12 +14,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Datei hochladen" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Eingabe_methoden" @@ -64,67 +64,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ-_Trenner mit Breite null" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Unicode-Steuerzeichen einfügen" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Netzwerkanfrage" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "Die Netzwerkanfrage der URI welche heruntergeladen werden soll" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Netzwerkanfrage" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "Die Netzwerkanfrage der URI welche heruntergeladen werden soll" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "Ziel-URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "Die Ziel-URI an welcher die Datei gespeichert werden soll" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Vorgeschlagener Dateiname" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "Der beim Speichern als Standard vorgeschlagene Dateiname" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Fortschritt" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Bestimmt den aktuellen Fortschritt des Herunterladens" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Bestimmt den aktuellen Status des Herunterladens" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Aktuelle Größe" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "Die Länge der bereits heruntergeladenen Daten" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Gesamtgröße" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "Die Gesamtgröße der Datei" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "" @@ -141,556 +151,925 @@ msgstr "" msgid "Password:" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +msgid "_Remember password" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Name" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Der Name des Rahmens" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Titel" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Der Titel des Dokuments in dem Rahmen" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "Die aktuelle URI der im Rahmen dargestellten Inhalte" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Bestimmt den aktuellen Fortschritt des Herunterladens" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Bestimmt den aktuellen Fortschritt des Herunterladens" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 #, fuzzy msgid "The title of the history item" msgstr "Die Gesamtgröße der Datei" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 #, fuzzy msgid "The alternate title of the history item" msgstr "Der Titel des Dokuments in dem Rahmen" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Der Name des Rahmens" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Rechtschreibung beim _Eintippen überprüfen" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +msgid "Enable Caret Browsing" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +msgid "Enable XSS Auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +msgid "Enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +msgid "Whether the page cache should be used" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 #, fuzzy msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Die aktuelle URI der im Rahmen dargestellten Inhalte" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 #, fuzzy msgid "Editable" msgstr "Titel" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Absenden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Zurücksetzen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "Durchsuchbarer _Index" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Datei wählen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Kein)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Verweis in neuem _Reiter öffnen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "Verweisziel herunter_laden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Verweisziel _kopieren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "_Bild in neuem Fenster öffnen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Bil_d speichern unter" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Bild k_opieren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "_Rahmen in neuem Fenster öffnen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "_Neu laden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Keine Vorschläge verfügbar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "Rechtschreibung _ignorieren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "Rechtschreibung _hinzufügen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "Im Netz _suchen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "In _Wörterbuch nachschlagen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "Verweis ö_ffnen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Grammatik _ignorieren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Rechtschreibung und _Grammatik" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "Rechtschreibung und Grammatik _anzeigen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "Rechtschreibung und Grammatik _verbergen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "Dokument jetzt ü_berprüfen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Rechtschreibung beim _Eintippen überprüfen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Grammatik beim _Eintippen überprüfen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Schriftart" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Umrandung" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Element _untersuchen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Keine vergangen Suchen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Vergangene Suchen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Limpar buscas recentes" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "begriff" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "bedeutung" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "drucken" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "markieren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "aktivieren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "auswählen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "abwählen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "überspringen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " dateien" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Unbekannt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Status" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "bedeutung" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/en_GB.po b/WebKit/gtk/po/en_GB.po index 6b6ecc0..77bf543 100644 --- a/WebKit/gtk/po/en_GB.po +++ b/WebKit/gtk/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit HEAD\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-07-14 02:01+0100\n" "Last-Translator: Bruce Cowan <bcowan@fastmail.co.uk>\n" "Language-Team: British English <en@li.org>\n" @@ -15,12 +15,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Upload File" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Input _Methods" @@ -65,67 +65,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ Zero width _non-joiner" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Insert Unicode Control Character" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Network Request" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "The network request for the URI that should be downloaded" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Network Request" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "The network request for the URI that should be downloaded" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "Destination URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "The destination URI where to save the file" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Suggested Filename" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "The filename suggested as default when saving" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Progress" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Determines the current progress of the download" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Determines the current status of the download" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Current Size" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "The length of the data already downloaded" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Total Size" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "The total size of the file" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "User cancelled the download" @@ -142,552 +152,928 @@ msgstr "Username:" msgid "Password:" msgstr "Password:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Remember password" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Name" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "The name of the frame" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Title" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "The document title of the frame" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "The current URI of the contents displayed by the frame" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Determines the current progress of the download" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Determines the current progress of the download" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "The title of the history item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Alternate Title" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "The alternate title of the history item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "The URI of the history item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "Original URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "The original URI of the history item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Last visited Time" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "The time at which the history item was last visited" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Web View" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "The Web View that renders the Web Inspector itself" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "Inspected URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "The URI that is currently being inspected" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Enable JavaScript profiling" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Profile the executed JavaScript." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Enable JavaScript profiling" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Reason" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "The reason why this navigation is occurring" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "The URI that was requested as the target for the navigation" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Button" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "The button used to click" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Modifier state" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "A bitmask representing the state of the modifier keys" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "The name of the frame" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "The URI that was requested as the target for the navigation" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Default Encoding" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "The default encoding used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Cursive Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "The default Cursive font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Default Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "The default font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Fantasy Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "The default Fantasy font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Monospace Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "The default font family used to display monospace text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Sans Serif Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "The default Sans Serif font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Serif Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "The default Serif font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Default Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "The default font size used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Default Monospace Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "The default font size used to display monospace text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Minimum Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "The minimum font size used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Minimum Logical Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "The minimum logical font size used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Enforce 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Enforce a resolution of 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Auto Load Images" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Load images automatically." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Auto Shrink Images" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Automatically shrink standalone images to fit." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Print Backgrounds" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Whether background images should be printed." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Enable Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Enable embedded scripting languages." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Enable Plugins" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Enable embedded plugin objects." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Resizable Text Areas" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Whether text areas are resizable." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "User Stylesheet URI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "The URI of a stylesheet that is applied to every page." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Zoom Stepping Value" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "The value by which the zoom level is changed when zooming in or out." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Enable Developer Extras" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Enables special extensions that help developers" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Enable Private Browsing" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Enables private browsing mode" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Check Spelling While _Typing" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Enable Private Browsing" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Enable Scripts" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Enable Scripts" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Whether background images should be printed." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Returns the @web_view's document title" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Returns the current URI of the contents displayed by the @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Copy target list" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "The list of targets this web view supports for clipboard copying" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Paste target list" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "The list of targets this web view supports for clipboard pasting" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Settings" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "An associated WebKitWebSettings instance" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Web Inspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "The associated WebKitWebInspector instance" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Editable" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Whether content can be modified by the user" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Transparent" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Whether content has a transparent background" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Zoom level" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "The level of zoom of the content" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Full content zoom" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Whether the full content is scaled when zooming" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Encoding" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "The default encoding of the web view" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Custom Encoding" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "The custom encoding of the web view" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Submit" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Reset" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "_Searchable Index" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Choose File" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(None)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Open Link in New _Window" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Download Linked File" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Copy Link Loc_ation" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Open _Image in New Window" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Sa_ve Image As" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Cop_y Image" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "Open _Frame in New Window" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "_Reload" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "No Guesses Found" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Ignore Spelling" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Learn Spelling" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Search the Web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "_Look Up in Dictionary" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Open Link" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Ignore _Grammar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Spelling and _Grammar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Show Spelling and Grammar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "_Hide Spelling and Grammar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "_Check Document Now" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Check Spelling While _Typing" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Check _Grammar With Spelling" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Font" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Outline" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Inspect _Element" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "No recent searches" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Recent searches" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Clear recent searches" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "term" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definition" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "press" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "select" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "activate" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "untick" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "tick" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "jump" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " files" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Unknown" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Status" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "definition" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/es.po b/WebKit/gtk/po/es.po index eda63bc..758dd58 100644 --- a/WebKit/gtk/po/es.po +++ b/WebKit/gtk/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit.webkit.HEAD.es.po\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-06-11 15:36+0200\n" "Last-Translator: Jorge González <jorgegonz@svn.gnome.org>\n" "Language-Team: Español <gnome-es-list@gnome.org>\n" @@ -17,12 +17,12 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Subir archivo" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "_Métodos de entrada" @@ -67,67 +67,75 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "_No ensamblador de ancho cero [ZWNJ]" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Insertar un carácter de control Unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +msgid "Network Response" +msgstr "" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +msgid "The network response for the URI that should be downloaded" +msgstr "" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Progreso" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Estado" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Determina el estado actual de la descarga" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Tamaño actual" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Tamaño total" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "" @@ -144,553 +152,919 @@ msgstr "Nombre de usuario:" msgid "Password:" msgstr "Contraseña:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Recordar contraseña" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Nombre" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Título" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Determina el estado actual de la descarga" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Título alternativo" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Vista web" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Razón" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Botón" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +msgid "Target frame" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Codificación predeterminada" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Tamaño de predeterminado de tipografía" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Tamaño mínimo de tipografía" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Activar complementos" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "URI de la hoja de estilo del usuario" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +msgid "Enables spell checking while typing" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +msgid "Enable Caret Browsing" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +msgid "Enable XSS Auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +msgid "Enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +msgid "Whether the page cache should be used" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Copiar la lista de destinos" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Pegar la lista de destinos" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Ajustes" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Inspector web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Editable" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Transparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Nivel de ampliación" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "El nivel de ampliación del contenido" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Codificación" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "La codificación predeterminada de la vista web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Enviar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Restablecer" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "Índice buscable" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Elegir archivo" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Ninguno)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Abrir enlace en una _ventana nueva" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Descargar el archivo enlazado" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "_Copiar dirección del enlace" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Abrir _imagen en una ventana nueva" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "_Guardar imagen como" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Copia_r imagen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "Abrir _marco en una ventana nueva" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "Re_cargar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Ignorar ortografía" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Aprender ortografía" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Buscar en la web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Abrir enlace" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Ignorar gra_mática" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Ortografía y gra_mática" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Mostrar ortografía y gramática" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Tipografía" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Inspeccionar _elemento" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "No hay búsquedas recientes" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Búsquedas recientes" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Cancelar búsquedas recientes" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "término" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definición" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "seleccionar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "activar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "deseleccionar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "seleccionar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "saltar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr "archivos" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Desconocido" +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Estado" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "definición" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/he.po b/WebKit/gtk/po/he.po new file mode 100644 index 0000000..90b5d88 --- /dev/null +++ b/WebKit/gtk/po/he.po @@ -0,0 +1,1080 @@ +# Hebrew translation for webkit. +# Copyright (C) 2010 webkit's COPYRIGHT HOLDER +# This file is distributed under the same license as the webkit package. +# Gil Osher <gilosher@gmail.com>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: webkit HEAD\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"PO-Revision-Date: 2010-02-16 18:03+0200\n" +"Last-Translator: Gil Osher <gilosher@gmail.com>\n" +"Language-Team: Hebrew <he@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 +msgid "Upload File" +msgstr "טען קובץ" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 +msgid "Input _Methods" +msgstr "שיטות _קלט" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "סימן LRM מ_שמאל לימין" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "סימן RLM מ_ימין לשמאל" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE _שיבוץ משמאל לימין" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE ש_יבוץ מימין לשמאל" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO _עקיפה משמאל לימין" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO ע_קיפה מימין לשמאל" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF ה_חזרת כיווניות" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS _רווח ברוחב אפס" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ _מחבר ברוחב אפס" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ מ_בטל חיבור ברוחב אפס" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 +msgid "_Insert Unicode Control Character" +msgstr "ה_כנס תו בקרה של יוניקוד" + +#: WebKit/gtk/webkit/webkitdownload.cpp:262 +msgid "Network Request" +msgstr "בקשת רשת" + +#: WebKit/gtk/webkit/webkitdownload.cpp:263 +msgid "The network request for the URI that should be downloaded" +msgstr "בקשת הרשת עבור הכתובת שיש להוריד" + +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "בקשת רשת" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "בקשת הרשת עבור הכתובת שיש להוריד" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 +msgid "Destination URI" +msgstr "כתובת יעד" + +#: WebKit/gtk/webkit/webkitdownload.cpp:293 +msgid "The destination URI where to save the file" +msgstr "כתובת היעד אליה שומרים את הקובץ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:307 +msgid "Suggested Filename" +msgstr "שם קובץ מומלץ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:308 +msgid "The filename suggested as default when saving" +msgstr "שם הקובץ המומלץ כברירת מחדל כאשר שומרים" + +#: WebKit/gtk/webkit/webkitdownload.cpp:325 +msgid "Progress" +msgstr "התקדמות" + +#: WebKit/gtk/webkit/webkitdownload.cpp:326 +msgid "Determines the current progress of the download" +msgstr "מציין את ההתקדמות הנוכחית של ההורדה" + +#: WebKit/gtk/webkit/webkitdownload.cpp:339 +msgid "Status" +msgstr "מצב" + +#: WebKit/gtk/webkit/webkitdownload.cpp:340 +msgid "Determines the current status of the download" +msgstr "מציין את המצב הנוכחי של ההורדה" + +#: WebKit/gtk/webkit/webkitdownload.cpp:355 +msgid "Current Size" +msgstr "גודל נוכחי" + +#: WebKit/gtk/webkit/webkitdownload.cpp:356 +msgid "The length of the data already downloaded" +msgstr "אורך המידע שכבר הורד" + +#: WebKit/gtk/webkit/webkitdownload.cpp:370 +msgid "Total Size" +msgstr "גודל כללי" + +#: WebKit/gtk/webkit/webkitdownload.cpp:371 +msgid "The total size of the file" +msgstr "הגודל הכללי של הקובץ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:522 +msgid "User cancelled the download" +msgstr "משתמש ביטל את ההורדה" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "שם משתמש וסיסמה נדרשים על-ידי האתר %s" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +msgid "Username:" +msgstr "שם משתמש:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +msgid "Password:" +msgstr "סיסמה:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" +msgstr "זכור את הסיסמה" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 +msgid "Name" +msgstr "שם" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 +msgid "The name of the frame" +msgstr "שם המסגרת" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +msgid "Title" +msgstr "כותרת" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 +msgid "The document title of the frame" +msgstr "כותרת המסמך של המסגרת" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +msgid "URI" +msgstr "כתובת" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 +msgid "The current URI of the contents displayed by the frame" +msgstr "הכתובת הנוכחית של התוכן המוצג במסגרת" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "מציין את ההתקדמות הנוכחית של ההורדה" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "מציין את ההתקדמות הנוכחית של ההורדה" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 +msgid "The title of the history item" +msgstr "כותרת פריט ההסטוריה" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 +msgid "Alternate Title" +msgstr "כותרת חלופית" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 +msgid "The alternate title of the history item" +msgstr "כותרת חלופית לפריט ההסטוריה" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 +msgid "The URI of the history item" +msgstr "כתובת פריט ההסטוריה" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 +msgid "Original URI" +msgstr "כתובת מקורית" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 +msgid "The original URI of the history item" +msgstr "הכתובת המקורית של פריט ההסטוריה" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 +msgid "Last visited Time" +msgstr "זמן ביקור אחרון" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 +msgid "The time at which the history item was last visited" +msgstr "הזמן בו בוקר לאחרונה פריט ההסטוריה" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 +msgid "Web View" +msgstr "תצוגת Web" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 +msgid "The Web View that renders the Web Inspector itself" +msgstr "תצוגת ה Web שמחולל בוחן ה Web בעצמו" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 +msgid "Inspected URI" +msgstr "כתובת נבחנת" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 +msgid "The URI that is currently being inspected" +msgstr "הכתובת שנבנחנת כרגע" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 +msgid "Enable JavaScript profiling" +msgstr "אפשר אפיון JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 +msgid "Profile the executed JavaScript." +msgstr "מאפיין את ה JavaScript המורץ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "אפשר אפיון JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 +msgid "Reason" +msgstr "סיבה" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 +msgid "The reason why this navigation is occurring" +msgstr "הסיבה מדוע ניווט זה מתרחש" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 +msgid "The URI that was requested as the target for the navigation" +msgstr "הכתובת שנדרשה כמטרת הניווט" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 +msgid "Button" +msgstr "כפתור" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 +msgid "The button used to click" +msgstr "הכפתור ששימש ללחיצה" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 +msgid "Modifier state" +msgstr "מצב מקשי הבקרה" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 +msgid "A bitmask representing the state of the modifier keys" +msgstr "מסכת סיביות המייצגת את המצב של מקשי הבקרה" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "שם המסגרת" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "הכתובת שנדרשה כמטרת הניווט" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +msgid "Default Encoding" +msgstr "קידוד ברירת מחדל" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +msgid "The default encoding used to display text." +msgstr "קידוד ברירת המחדל להצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +msgid "Cursive Font Family" +msgstr "משפחת הגופנים מסוג Cursive" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +msgid "The default Cursive font family used to display text." +msgstr "משפחת הגופנים מסוג Cursive ברירת מחדל המשמשים להצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +msgid "Default Font Family" +msgstr "משפחת גופנים ברירת מחדל" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +msgid "The default font family used to display text." +msgstr "משפחת הגופנים לשימוש בהצגת טקסט כברירת מחדל." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +msgid "Fantasy Font Family" +msgstr "משפחת הגופנים מסוג Fantasy" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +msgid "The default Fantasy font family used to display text." +msgstr "משפחת הגופנים מסוג Fantasy ברירת מחדל המשמשים להצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +msgid "Monospace Font Family" +msgstr "משפחת הגופנים מסוג Monospace" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +msgid "The default font family used to display monospace text." +msgstr "משפחת הגופנים מסוג Monospace ברירת מחדל המשמשים להצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +msgid "Sans Serif Font Family" +msgstr "משפחת הגופנים מסוג Sans Serif" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +msgid "The default Sans Serif font family used to display text." +msgstr "משפחת הגופנים מסוג Sans Serif ברירת מחדל המשמשים להצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +msgid "Serif Font Family" +msgstr "משפחת הגופנים מסוג Serif" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +msgid "The default Serif font family used to display text." +msgstr "משפחת הגופנים מסוג Serif ברירת מחדל המשמשים להצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +msgid "Default Font Size" +msgstr "גודל גופן ברירת מחדל" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +msgid "The default font size used to display text." +msgstr "גודל הגופן לשימוש בהצגת טקסט כברירת מחדל." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +msgid "Default Monospace Font Size" +msgstr "גודל גופן Monospace ברירת מחדל" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +msgid "The default font size used to display monospace text." +msgstr "גודל גופן ברירת מחדל לשימוש בהצגת טקסט בגופן Monospace." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +msgid "Minimum Font Size" +msgstr "גודל גופן מינימאלי" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +msgid "The minimum font size used to display text." +msgstr "גודל הגופן המינימאלי לשימוש בהצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +msgid "Minimum Logical Font Size" +msgstr "גודל גופן לוגי מינימאלי" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +msgid "The minimum logical font size used to display text." +msgstr "גודל הגופן הלוגי המינימאלי לשימוש בהצגת טקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +msgid "Enforce 96 DPI" +msgstr "הכרח 96 נקודות לאינץ'" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +msgid "Enforce a resolution of 96 DPI" +msgstr "הכרח רזולוציה של 96 נקודות לאינץ'" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +msgid "Auto Load Images" +msgstr "טען תמונות אוטומטית" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +msgid "Load images automatically." +msgstr "טוען תמונות אוטומטית." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +msgid "Auto Shrink Images" +msgstr "כווץ תמונות אוטומטית" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +msgid "Automatically shrink standalone images to fit." +msgstr "אוטומטית מכווץ תמונות בודדות על-מנת שיתאימו." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +msgid "Print Backgrounds" +msgstr "הדפס רקעים" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +msgid "Whether background images should be printed." +msgstr "האם תמונות הרקע צריכות להיות מודפסות." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +msgid "Enable Scripts" +msgstr "אפשר תסריטים" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +msgid "Enable embedded scripting languages." +msgstr "אפשר שפות תסריטים מוטבעות" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +msgid "Enable Plugins" +msgstr "אפשר תוספים" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +msgid "Enable embedded plugin objects." +msgstr "אפשר אובייקטי תוסף מוטבעים." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +msgid "Resizable Text Areas" +msgstr "אזורי טקסט שניתן לשנות את גודלם" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +msgid "Whether text areas are resizable." +msgstr "האם לאפשר את שינוי הגודל של אזורי הטקסט." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +msgid "User Stylesheet URI" +msgstr "כתבות גיליון הסגנון של המשתמש" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "כתובת גיליון הסגנון שמוחל על כל עמוד." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +msgid "Zoom Stepping Value" +msgstr "ערך צעדי הקירוב" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "הערך בו רמת הקירוב משתנה כאשר מתקרבים או מתרחקים." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +msgid "Enable Developer Extras" +msgstr "אפשר תוספות למפתחים" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +msgid "Enables special extensions that help developers" +msgstr "מאפשר תוספות מיוחדות שיעזרו למפתחים" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +msgid "Enable Private Browsing" +msgstr "אפשר גלישה פרטית" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +msgid "Enables private browsing mode" +msgstr "מאפשר את מצב הגלישה הפרטית" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "בדוק איות בזמן ה_קלדב" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "אפשר גלישה פרטית" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "אפשר תסריטים" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "אפשר תסריטים" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "האם תמונות הרקע צריכות להיות מודפסות." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +msgid "Returns the @web_view's document title" +msgstr "מחזיר את כותרת המסמך של @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "מחזיר את הכתובת הנוכחית של התוכן המוצג על-ידי @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +msgid "Copy target list" +msgstr "העתק רשימת יעדים" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +msgid "The list of targets this web view supports for clipboard copying" +msgstr "רשימת היעדים בהם תצוגת ה-Web תומכת להעתקה ללוח" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +msgid "Paste target list" +msgstr "הדבק רשימת יעדים" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "רשימת היעדים בהם תצוגת ה-Web תומכת להדבקה מהלוח" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +msgid "Settings" +msgstr "הגדרות" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +msgid "An associated WebKitWebSettings instance" +msgstr "מופע WebKitWebSettings משויך" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +msgid "Web Inspector" +msgstr "בוחן Web" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +msgid "The associated WebKitWebInspector instance" +msgstr "מופע ה-WebKitWebInspector המשויך" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +msgid "Editable" +msgstr "ניתן לעריכה" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +msgid "Whether content can be modified by the user" +msgstr "האם התוכן יכול להשתנות על-ידי המשתמש" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +msgid "Transparent" +msgstr "שקוף" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +msgid "Whether content has a transparent background" +msgstr "האם לתוכן יש רקע שקוף" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +msgid "Zoom level" +msgstr "רמת קירוב" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +msgid "The level of zoom of the content" +msgstr "רמת הקירוב של התוכן" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +msgid "Full content zoom" +msgstr "קירוב תוכן מלא" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +msgid "Whether the full content is scaled when zooming" +msgstr "האם התוכן המלא מתרחב כאשר מתקרבים" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +msgid "Encoding" +msgstr "קידוד" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +msgid "The default encoding of the web view" +msgstr "הקידוד ברירת המחדל של תצוגת ה-Web" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +msgid "Custom Encoding" +msgstr "קידוד מותאם אישית" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +msgid "The custom encoding of the web view" +msgstr "הקידוד המותאם אישית של תצוגת ה-Web" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 +msgid "Submit" +msgstr "שלח" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 +msgid "Reset" +msgstr "נקה" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "_Searchable Index" +msgstr "אינקדס ניתן ל_חיפוש" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 +msgid "Choose File" +msgstr "בחר קובץ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 +msgid "(None)" +msgstr "(ללא)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 +msgid "Open Link in New _Window" +msgstr "פתח קישור בח_לון חדש" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 +msgid "_Download Linked File" +msgstr "_הורד קובץ קשור" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 +msgid "Copy Link Loc_ation" +msgstr "העתק את _מיקום הקישור" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 +msgid "Open _Image in New Window" +msgstr "פתח _תמונה בחלון חדש" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 +msgid "Sa_ve Image As" +msgstr "_שמור תמונה בשם" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 +msgid "Cop_y Image" +msgstr "ה_עתק תמונה" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 +msgid "Open _Frame in New Window" +msgstr "פתח מ_סגרת בחלון חדש" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 +msgid "_Reload" +msgstr "_טען מחדש" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 +msgid "No Guesses Found" +msgstr "לא נמצאו ניחושים" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 +msgid "_Ignore Spelling" +msgstr "ה_תעלם מאיות" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 +msgid "_Learn Spelling" +msgstr "_למד איות" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 +msgid "_Search the Web" +msgstr "_חפש ב-Web" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 +msgid "_Look Up in Dictionary" +msgstr "חפ_ש במילון" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 +msgid "_Open Link" +msgstr "_פתח קישור" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 +msgid "Ignore _Grammar" +msgstr "התעלם מ_דקדוק" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 +msgid "Spelling and _Grammar" +msgstr "איות ו_דקדוק" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Show Spelling and Grammar" +msgstr "ה_צג איות ודקדוק" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Hide Spelling and Grammar" +msgstr "ה_סתר איות ודקדוק" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 +msgid "_Check Document Now" +msgstr "_בדוק מסמך כעת" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 +msgid "Check Spelling While _Typing" +msgstr "בדוק איות בזמן ה_קלדב" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 +msgid "Check _Grammar With Spelling" +msgstr "בדוק _דקדוק בזמן הקלדה" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 +msgid "_Font" +msgstr "_גופן" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 +msgid "_Outline" +msgstr "ה_דגשה" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 +msgid "Inspect _Element" +msgstr "בחן _אלמנט" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 +msgid "No recent searches" +msgstr "אין חיפושים אחרונים" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 +msgid "Recent searches" +msgstr "חיפושים אחרונים" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 +msgid "_Clear recent searches" +msgstr "_נקה חיפושים אחרונים" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 +msgid "term" +msgstr "מושג" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 +msgid "definition" +msgstr "הגדרה" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 +msgid "press" +msgstr "לחץ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 +msgid "select" +msgstr "בחר" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 +msgid "activate" +msgstr "הפעל" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 +msgid "uncheck" +msgstr "בטל סימון" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 +msgid "check" +msgstr "סמן" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 +msgid "jump" +msgstr "קפוץ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 +msgid " files" +msgstr " קבצים" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +msgid "Unknown" +msgstr "לא ידוע" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "מצב" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "הגדרה" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/it.po b/WebKit/gtk/po/it.po index e02dce7..3329537 100644 --- a/WebKit/gtk/po/it.po +++ b/WebKit/gtk/po/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WebKitGtk\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-05-11 14:10+0200\n" "Last-Translator: Luca Ferretti <elle.uca@libero.it>\n" "Language-Team: Italian <tp@lists.linux.it>\n" @@ -15,12 +15,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Carica file" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "_Metodi di input" @@ -76,67 +76,77 @@ msgstr "ZWNJ spazio _non di unione a larghezza nulla" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Inserisci carattere di controllo unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Richiesta di rete" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "La richiesta di rete per l'URI che dovrebbe essere scaricato" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Richiesta di rete" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "La richiesta di rete per l'URI che dovrebbe essere scaricato" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "URI di destinazione" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "L'URI di destinazione in cui salvare il file" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Nome file suggerito" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "Il nome di file suggerito come predefinito quando si salva" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Avanzamento" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Determina l'avanzamento corrente dello scaricamento" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Stato" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Determina lo stato corrente dello scaricamento" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Dimensione corrente" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "La lunghezza dei dati già scaricati" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Dimensione totale" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "La dimensione totale del file" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "L'utente ha annullato lo scaricamento" @@ -154,133 +164,172 @@ msgid "Password:" msgstr "Password:" # checkbox -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Ricordare la password" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Nome" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Il nome della cornice" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Titolo" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Il titolo del documento nella cornice" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "L'URI corrente del contenuto mostrato dalla cornice" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Determina l'avanzamento corrente dello scaricamento" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Determina l'avanzamento corrente dello scaricamento" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "Il titolo dell'elemento di cronologia" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Titolo alternativo" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "Il titolo alternativo dell'elemento di cronologia" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "L'URI dell'elemento di cronologia" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "URI originale" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "L'URI originale dell'elemento di cronologia" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Data ultima visita" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "" "La data in cui l'elemento di cronologia è stato visitato l'ultima volta" # lasciato non tradotto perchè termine interno di WebKitGtk # cfr http://webkitgtk.org/reference/webkitgtk-WebKitWebInspector.html#WebKitWebInspector--web-view -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Web View" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "La Web View che esegue il rendering dell'Ispettore web stesso" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "URI ispezionato" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "L'URI che attualmente è ispezionato" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Abilitare profiling JavaScript" # FIXME # oppure Esegue il profiling? -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Traccia un profilo del codice JavaScript eseguito." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Abilitare profiling JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Motivo" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "Il motivo per cui questa navigazione si sta verificando" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "L'URI che è stata richiesta come destinazione della navigazione" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Pulsante" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "Il pulsante usato per fare clic" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Stato modificatori" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Una maschera di bit che rappresenta lo stato dei tasti modificatori" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Il nome della cornice" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "L'URI che è stata richiesta come destinazione della navigazione" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Codifica predefinita" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "La codifica predefinita usata per mostrare il testo." @@ -289,90 +338,90 @@ msgstr "La codifica predefinita usata per mostrare il testo." # * nella "breve" si lascia la forma inglese (es. sans serif) nella lunga # si mette la forma italiana (es. senza grazie) # Ciò per mantenere corte le "brevi" e per permettere che entrambe le diciture siano presenti -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Famiglia carattere corsivo" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "" "La famiglia del tipo di carattere \"corsivo\" predefinito usata per mostrare " "il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Famiglia carattere predefinita" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "" "La famiglia del tipo di carattere predefinito usata per mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Famiglia carattere fantasia" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "" "La famiglia del tipo di carattere \"fantasia\" predefinito usata per " "mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Famiglia carattere monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "" "La famiglia del tipo di carattere predefinito usata per mostrare il testo a " "spaziatura fissa." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Famiglia carattere sans serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "" "La famiglia del tipo di carattere \"senza grazie\" predefinito usata per " "mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Famiglia carattere serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "" "La famiglia del tipo di carattere \"con grazie\" predefinito usata per " "mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Dimensione predefinita carattere" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "" "La dimensione predefinita per il tipo di carattere usato per mostrare il " "testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Dimensione predefinita carattere monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "" "La dimensione predefinita per il tipo di carattere usato per mostrare il " "testo a larghezza fissa." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Dimensione minima carattere" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "" "La dimensione minima per il tipo di carattere usato per mostrare il testo." @@ -389,311 +438,462 @@ msgstr "" # size alone. This will assure that your content will never display at sizes less than 12 points, # but the functional font size boundary of the web view will remain at 9 points to prevent any # chance of displaying unnecessarily small text. -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Dimensione minima naturale carattere" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "" "La dimensione minima naturale per il tipo di carattere usato per mostrare il " "testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Forza 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Forza la risoluzione a 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Caricamento automatico immagini" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Carica le immagini in modo automatico." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Restringimento automatico immagini" # assolutamente libertario -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Restringe automaticamente le immagini singole alla dimensione adatta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Stampa sfondi" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Indica se le immagini di sfondo devono essere stampate." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Abilita script" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Abilita i linguaggi di scripting incorporati." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Abilita plugin" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Abilita gli oggetti plugin incorporati." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Aree testo ridimensionabili" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Indica se le aree di testo sono ridimensionabili." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "URI foglio stile utente" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "L'URI di un foglio di stile che è applicato a ogni pagina." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Valore passo ingrandimento" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" "Il valore di variazione del livello di ingrandimento quando si aumenta o " "riduce l'ingrandimento." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Abilita extra per sviluppatori" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Abilita estensioni speciali che sono d'aiuto per gli sviluppatori" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Abilita navigazione privata" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Abilita la modalità di navigazione privata" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Controlla ortografia durante _digitazione" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Abilita navigazione privata" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Abilita script" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Abilita script" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Indica se le immagini di sfondo devono essere stampate." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Restituisce il titolo del documento di @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Restituisce l'URI attuale del contenuto mostrato dalla @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Copia elenco destinazioni" # ma ha senso?? -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" "L'elenco di destinazioni che questa vista web supporta per copiare negli " "appunti" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Incolla elenco destinazioni" # ma ha senso?? -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" "L'elenco di destinazioni che questa vista web supporta per incollare dagli " "appunti" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Impostazioni" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Un'istanza WebKitWebSettings associata" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Ispettore web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "L'istanza WebKitWebInspector associata" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Modificabile" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Indica se il contenuto può essere modificato dall'utente" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Trasparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Indica se il contenuto ha uno sfondo trasparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Livello ingrandimento" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Il livello di ingrandimento del contenuto" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Ingrandimento intero contenuto" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Indica se all'ingrandimento viene scalato l'intero contenuto" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Codifica" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "La codifica predefinita della vista web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Codifica personalizzata" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "La codifica personalizzata della vista web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Invia" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Azzera" # FIXME # https://bugs.webkit.org/show_bug.cgi?id=25375 # Aperto bug chiedeno lumi... -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "Indice _cercabile" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Scelta file" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Nessuno)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Apri collegamento in nuova _finestra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Scarica file collegato" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Copia _posizione collegamento" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Apri _immagine in nuova finestra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Sal_va immagine come" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Copia i_mmagine" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "Apri c_ornice in nuova finestra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "A_ggiorna" # omesso Found -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Nessun suggerimento" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Ignora ortografia" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "A_pprendi ortografia" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Cerca nel web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "Consu_lta dizionario" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Apri collegamento" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Ignora _grammatica" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Ortografia e _grammatica" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Mostra ortografia e grammatica" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "_Nascondi ortografia e grammatica" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "_Controlla documento ora" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Controlla ortografia durante _digitazione" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Controlla _grammatica con ortografia" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Tipo di carattere" @@ -702,72 +902,259 @@ msgstr "_Tipo di carattere" # Le traduzioni di questi ultimi tre effetti per i font è presa # dalle GTK_STOCK (_Grassetto, _Corsivo, _Sottolineato) # Usato Co_ntorno come in OpenOffice.org -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "Co_ntorno" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Ispeziona _elemento" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Nessuna ricerca recente" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Ricerche recenti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "Pu_lisci ricerche recenti" # String AXDefinitionListTermText() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "termine" # String AXDefinitionListDefinitionText() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definizione" # String AXButtonActionVerb() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "premi" # String AXRadioButtonActionVerb() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "seleziona" # String AXTextFieldActionVerb() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "attiva" # String AXCheckedCheckBoxActionVerb() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "togli spunta" # String AXUncheckedCheckBoxActionVerb() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "metti spunta" # String AXLinkActionVerb() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "salta" # String multipleFileUploadText(unsigned numberOfFiles) -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " file" # String unknownFileSizeText() -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Sconosciuta" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Stato" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +# String AXDefinitionListDefinitionText() +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "definizione" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/lt.po b/WebKit/gtk/po/lt.po index a212b29..4c30200 100644 --- a/WebKit/gtk/po/lt.po +++ b/WebKit/gtk/po/lt.po @@ -5,23 +5,24 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-10-09 18:42+0200\n" "Last-Translator: Rimas Kudelis <rq@akl.lt>\n" "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n" -"Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Language: lt\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%" +"100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Virtaal 0.4.0\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Failo išsiuntimas" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Įvesties _metodai" @@ -66,71 +67,85 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "Nulinio pločio _skėlimo ženklas (ZWNJ)" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "Įterpti unikodo valdymo ženklą" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 #, fuzzy msgid "Network Request" msgstr "Tinklo užklausa" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 #, fuzzy msgid "The network request for the URI that should be downloaded" -msgstr "Tinklo užklausa parsiųstino failo universaliajam ištekliaus identifikatoriui (URI)" +msgstr "" +"Tinklo užklausa parsiųstino failo universaliajam ištekliaus identifikatoriui " +"(URI)" + +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Tinklo užklausa" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "" +"Tinklo užklausa parsiųstino failo universaliajam ištekliaus identifikatoriui " +"(URI)" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "Paskirties URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "Paskirties failo universalusis ištekliaus identifikatorius (URI)" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Siūlomas failo vardas" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "Numatytasis siūlomas įrašomo failo vardas" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Progresas" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 #, fuzzy msgid "Determines the current progress of the download" msgstr "Nurodo atsiuntimo progresą" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Būsena" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 #, fuzzy msgid "Determines the current status of the download" msgstr "Nurodo atsiuntimo būseną" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Esamasis dydis" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "Jau parsiųstų duomenų kiekis" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Visas dydis" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "Visas failo dydis" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Naudotojas atsisakė siuntimo" @@ -147,556 +162,940 @@ msgstr "Naudotojo vardas:" msgid "Password:" msgstr "Slaptažodis:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Įsiminti slaptažodį" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Pavadinimas" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Kadro pavadinimas" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Antraštė" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Kadre atverto tinklalapio pavadinimas" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" -msgstr "Kadre atverto tinklalapio universalusis ištekliaus identifikatorius (URI)" +msgstr "" +"Kadre atverto tinklalapio universalusis ištekliaus identifikatorius (URI)" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Nurodo atsiuntimo progresą" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Nurodo atsiuntimo progresą" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "Žurnalo įrašo pavadinimas" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Alternatyvus pavadinimas" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "Alternatyvus žurnalo įrašo pavadinimas" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "Žurnalo įrašo universalusis ištekliaus identifikatorius (URI)" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "Pirminis URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "Pirminis žurnalo įrašo universalusis ištekliaus identifikatorius (URI)" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Paskutinis apsilankymas" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "Paskutinio apsilankymo data ir laikas" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Žiniatinklio rodinys" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "Žiniatinklio rodinys, rodantis žiniatinklio analizatorių" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "Analizuojamas URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" -msgstr "Šiuo metu analizuojamo failo universalusi ištekliaus identifikatorius (URI)" +msgstr "" +"Šiuo metu analizuojamo failo universalusi ištekliaus identifikatorius (URI)" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Įjungti „JavaScript“ profiliavimą" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Profiliuoti vykdomą „JavaScript“ kodą." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Įjungti „JavaScript“ profiliavimą" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Priežastis" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 #, fuzzy msgid "The reason why this navigation is occurring" msgstr "Tinklalapio atvėrimo priežastis" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" -msgstr "Mėginamo atverti tinklalapio universalusis ištekliaus identifikatorius (URI)" +msgstr "" +"Mėginamo atverti tinklalapio universalusis ištekliaus identifikatorius (URI)" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Mygtukas" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "Mygtukas, kurį galima paspausti" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Modifikatorių būsena" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Bitų kaukė, atspindinti modifikavimo klavišų būseną" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Kadro pavadinimas" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "" +"Mėginamo atverti tinklalapio universalusis ištekliaus identifikatorius (URI)" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Numatytoji koduotė" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "Numatytoji teksto koduotė." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Rankraštinių šriftų šeima" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "Numatytoji tekstui atvaizduoti naudojama rankraštinių šriftų šeima." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Numatytoji šriftų šeima" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "Numatytoji tekstui atvaizduoti naudojama šriftų šeima." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Dekoratyvių šriftų šeima" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "Numatytoji tekstui atvaizduoti naudojama dekoratyvių šriftų šeima." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Lygiapločių šriftų šeima" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "Numatytoji tekstui atvaizduoti naudojama lygiapločių šriftų šeima" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Šriftų be užraitų šeima" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "Numatytoji tekstui atvaizduoti naudojama šriftų be užraitų šeima." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Šriftų su užraitais šeima" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "Numatytoji tekstui atvaizduoti naudojama šriftų su užraitais šeima." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Numatytasis šrifto dydis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "Numatytasis tekstui atvaizduoti naudojamo šrifto dydis." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Numatytasis lygiapločio šrifto dydis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "Numatytasis tekstui atvaizduoti naudojamo lygiapločio šrifto dydis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Minimalus šrifto dydis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "Mažiausias leistinas tekstui atvaizduoti naudojamo šrifto dydis." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 #, fuzzy msgid "Minimum Logical Font Size" msgstr "Minimalus loginis šrifto dydis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 #, fuzzy msgid "The minimum logical font size used to display text." -msgstr "Mažiausias leistinas loginis tekstui atvaizduoti naudojamo šrifto dydis." +msgstr "" +"Mažiausias leistinas loginis tekstui atvaizduoti naudojamo šrifto dydis." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Naudoti 96 tašk./colyje" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Priverstinai naudoti 96 tašk./colyje skiriamąją gebą" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Įkelti paveikslus" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Automatiškai įkelti paveikslus." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Mažinti paveikslus" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Automatiškai mažinti pavienius paveikslus, kad sutilptų į langą." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Spausdinti foną" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Ar spausdinti fono piešinius." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Įjungti scenarijus" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Įjungti įtaisytuosius scenarijus." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Įjungti papildinius" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Įjungti įtaisytuosius papildinius." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Keičiamo dydžio teksto laukai" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Ar leisti keisti teksto laukų dydį." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "Naudotojo stiliaus aprašo URI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." -msgstr "Visiems tinklalapiams taikytino naudotojo stiliaus aprašo failo universalusis ištekliaus identifikatorius (URI)." +msgstr "" +"Visiems tinklalapiams taikytino naudotojo stiliaus aprašo failo " +"universalusis ištekliaus identifikatorius (URI)." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Mastelio keitimo žingsnis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Žingsnis, kuriuo keičiamas mastelis, jį didinant ar mažinant." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Įjungti programuotojų įrankius" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Įjungti specialius tinklalapių programuotojams skirtus įrankius" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Įjungti privatųjį naršymą" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Įjungti privačiojo naršymo veikseną" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Tikrinti _rašybą rašant tekstą" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Įjungti privatųjį naršymą" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Įjungti scenarijus" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Įjungti scenarijus" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Ar spausdinti fono piešinius." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Grąžina @web_view objekte atverto tinklalapio pavadinimą" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" -msgstr "Grąžina @web_view objekte atverto tinklalapio universalųjį ištekliaus identifikatorių (URI)" +msgstr "" +"Grąžina @web_view objekte atverto tinklalapio universalųjį ištekliaus " +"identifikatorių (URI)" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Nuostatos" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Susietasis „WebKitWebSettings“ tipo objektas" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Žiniatinklio analizatorius" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "Susietasis „WebKitWebInspector“ tipo objektas" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Keičiamas" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Ar turinys gali būti keičiamas naudotojo" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Permatomas" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Ar turinio fonas permatomas" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Mastelis" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Turinio rodymo mastelio dydis" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Taikyti mastelį visam turiniui" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Ar mastelis keičiamas visam tinklalapio turiniui" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Koduotė" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "Numatytoji žiniatinklio rodinio koduotė" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Pasirinktinė koduotė" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "Pasirinktinė žiniatinklio rodinio koduotė" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Pateikti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Atkurti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Parinkite failą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Joks)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Atverti saistomą objektą naujame _lange" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "At_siųsti saistomą objektą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Kopijuoti saito _adresą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Atverti _paveikslą naujame lange" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Į_rašyti paveikslą kaip" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "_Kopijuoti paveikslą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "_Atverti kadrą naujame lange" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "At_siųsti iš naujo" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Pasiūlymų nėra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Nepaisyti rašybos" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "Įsi_minti rašybą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Ieškoti žiniatinklyje" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "Ieškoti _žodyne" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Atverti saistomą objektą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Nepaisyti _gramatikos" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Rašyba ir _gramatika" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Rodyti rašybą ir gramatiką" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "_Nerodyti rašybos ir gramatikos" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "Pa_tikrinti dokumentą dabar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Tikrinti _rašybą rašant tekstą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Tikrinti _gramatiką kartu su rašyba" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "Šri_ftas" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Kontūras" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Analizuoti _elementą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Paskiausių paieškų nėra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Paskiausios paieškos" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Valyti paskiausias paieškas" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "terminas" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "apibrėžtis" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "spustelėti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "pasirinkti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "aktyvinti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "nuimti žymėjimą" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "pažymėti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "šokti" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " failai" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Nežinoma" +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Būsena" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "apibrėžtis" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/nl.po b/WebKit/gtk/po/nl.po index f5dc752..a465b23 100644 --- a/WebKit/gtk/po/nl.po +++ b/WebKit/gtk/po/nl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.10\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-07-05 18:58+0100\n" "Last-Translator: Reinout van Schouwen <reinouts@gnome.org>\n" "Language-Team: Dutch <vertaling@vrijschrift.org>\n" @@ -14,12 +14,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Bestand uploaden" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Invoer_methoden" @@ -64,67 +64,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ Niet-k_oppelaar zonder breedte" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Unicode controleteken invoegen " -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Netwerkaanvraag" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "De netwerkaanvraag voor de te downloaden URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Netwerkaanvraag" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "De netwerkaanvraag voor de te downloaden URI" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "Bestemmings-URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "De bestemmings-URI waar dit bestand opgeslagen moet worden" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Gesuggereerde bestandsnaam" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "De standaard gesuggereerde bestandsnaam bij het opslaan" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Voortgang" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Bepaalt de huidige voortgang van de download" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Bepaalt de huidige status van de download" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Huidige grootte" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "De hoeveelheid reeds gedownloade data" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Totale grootte" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "De totale grootte van het bestand" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Downloaden door gebruiker gestopt" @@ -141,557 +151,936 @@ msgstr "Gebruikersnaam:" msgid "Password:" msgstr "Wachtwoord:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Wachtwoord onthouden" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Naam" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Naam van het frame" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Titel" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "De titel van het huidige frame" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "De huidige URI van de in het frame weergegeven inhoud" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Bepaalt de huidige voortgang van de download" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Bepaalt de huidige voortgang van de download" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "De titel van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Alternatieve titel" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "De alternatieve titel van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "De URI van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "Originele URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "De originele URI van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Laatst bezocht op:" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "De tijd waarop het geschiedenis-item het laatst is bezocht" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Webweergave" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "De webweergave die die Webinspector zelf weergeeft" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "Geïnspecteerde URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "De URI die momenteel geïnspecteerd wordt" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "JavaScript-profilering inschakelen" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "De uitgevoerde JavaScript profileren." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "JavaScript-profilering inschakelen" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Reden" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "De reden waarom deze navigatie optreedt" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "De URI die werd aangevraagd als bestemming voor de navigatie" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Knop" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "De knop voor het klikken" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Staat van de optietoets" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Een bitmask dat de staat van de optietoets representeert" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Naam van het frame" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "De URI die werd aangevraagd als bestemming voor de navigatie" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Standaardcodering" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "De standaardcodering om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Cursive-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "De standaard Cursive-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Standaard lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "De standaard lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Fantasy-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "De standaard Fantasy-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Monospace-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "De standaard lettertypefamilie om vaste-breedte-tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Sans Serif-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "De standaard Sans Serif-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Serif-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "De standaard Serif-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Standaard korpsgrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "De standaard korpsgrootte om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Standaard Monospace-lettergrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "De standaard lettergrootte om vaste-breedte-tekst weer te geven." # Korpsgrootte/lettergrootte? -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Minimum korpsgrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "De minimum lettergrootte om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Minimum logische korpsgrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "De minimum logische korpsgrootte om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "96 DPI afdwingen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Een resolutie van 96 DPI afdwingen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Afbeeldingen automatisch laden" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Automatisch afbeeldingen laden." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Afbeeldingen automatisch verkleinen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Automatisch losstaande afbeeldingen passend maken." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Achtergronden afdrukken" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Of achtergrondafbeeldingen afgedrukt moeten worden." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Scripts inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Ingebedde scripttalen inschakelen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Plugins inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Ingebedde plugin-objecten inschakelen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Tekstgebieden van grootte veranderbaar" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Of de grootte van tekstgebieden gewijzigd kan worden." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "URI van gebruikersstijlblad" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "De URI van een stijlblad dat wordt toegepast op elke pagina." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Stapgrootte voor in- en uitzoomen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." -msgstr "De hoeveelheid waarmee het zoomniveau verandert bij het in- en uitzoomen." +msgstr "" +"De hoeveelheid waarmee het zoomniveau verandert bij het in- en uitzoomen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Extraatjes voor ontwikkelaars" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Schakelt speciale uitbreidingen in die ontwikkelaars helpen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Privé-browsen inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Schakelt de stand voor privé-browsen in" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "_Spelling controleren tijdens het typen" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Privé-browsen inschakelen" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Scripts inschakelen" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Scripts inschakelen" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Of achtergrondafbeeldingen afgedrukt moeten worden." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Geeft de documenttitel van de @web_view terug" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Geeft de huidige URI terug van de inhoud die de @web_view weergeeft" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Kopieerdoellijst" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -"De lijst met targets die deze webweergave ondersteunt voor het kopiëren van het klembord" +"De lijst met targets die deze webweergave ondersteunt voor het kopiëren van " +"het klembord" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Plakdoellijst" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -"De lijst met targets die deze webview ondersteunt voor het plakken van het klembord" +"De lijst met targets die deze webview ondersteunt voor het plakken van het " +"klembord" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Instellingen" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Een geassocieerde instantie van WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Web-inspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "De geassocieerde instantie van WebKitWebInspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Bewerkbaar" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Of de tekst gewijzigd kan worden door de gebruiker" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Transparant" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Of de inhoud een transparante achtergrond heeft" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Zoomniveau" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Zoomfactor van de inhoud" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Zoomen op volledige inhoud" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Of de volledige inhoud op schaal wordt gebracht bij het zoomen" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Codering" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "Standaard codering van de webweergave" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Aangepaste codering" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "De aangepaste codering van de webweergave" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Indienen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Herinitialiseren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "Door_zoekbare index" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Kies een bestand" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Geen)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Verwijzing openen in _nieuw venster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "Bestand _downloaden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Verwijzings_adres kopiëren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Af_beelding openen in nieuw venster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Afbeelding opslaan _als…" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Afbeelding _kopiëren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "_Deelvenster openen in nieuw venster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "Ve_rversen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Geen suggesties gevonden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "Spelling _negeren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Spelling leren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "Het web door_zoeken" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "O_pzoeken in woordenboek" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "Koppeling _openen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "_Grammatica negeren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Spelling en _grammatica" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "Spelling en grammatica _tonen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "Spelling en grammatica ver_bergen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "Het document nu _controleren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "_Spelling controleren tijdens het typen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "_Grammatica controleren naast spelling" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Lettertype" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Omtrek" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "_Element inspecteren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Geen recente zoekopdrachten" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Recente zoekopdrachten" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "Recente zoekopdrachten _wissen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "term" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definitie" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "druk" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "selecteren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "activeren" # check / uncheck is aankruisen / deselecteren? -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "deselecteren" # check / uncheck is aankruisen / deselecteren? -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "aankruisen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "springen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " bestanden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Onbekend" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Status" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "definitie" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/pa.po b/WebKit/gtk/po/pa.po new file mode 100644 index 0000000..19ac98d --- /dev/null +++ b/WebKit/gtk/po/pa.po @@ -0,0 +1,695 @@ +# This file is put in the public domain. +# +# A S Alam <aalam@users.sf.net>, 2010. +msgid "" +msgstr "" +"Project-Id-Version: webkit 1.1.4\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"PO-Revision-Date: 2010-02-18 18:25+0530\n" +"Last-Translator: A S Alam <aalam@users.sf.net>\n" +"Language-Team: Punjabi/Panjabi <kde-i18n-doc@kde.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +msgid "Upload File" +msgstr "ਫਾਇਲ ਅੱਪਲੋਡ" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +msgid "Input _Methods" +msgstr "ਇੰਪੁੱਟ ਢੰਗ(_M)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "LRM ਖੱਬੇ ਤੋਂ ਸੱਜੇ ਨਿਸ਼ਾਨ(_L)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "RLM ਸੱਜੇ ਤੋਂ ਖੱਬੇ ਨਿਸ਼ਾਨ(_R)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE ਖੱਬੇ ਤੋਂ ਸੱਜੇ ਇੰਬੈੱਡ(_e)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE ਸੱਜੇ ਤੋਂ ਖੱਬੇ ਇੰਬੈੱਡ(_m)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO ਖੱਬੇ ਤੋਂ ਸੱਜੇ ਉੱਤੇ ਲਿਖੋ(_o)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO ਸੱਜੇ ਤੋਂ ਖੱਬੇ ਉੱਤੇ ਲਿਖੋ(_v)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF ਪੋਪ ਦਿਸ਼ਾ ਫਾਰਮੈਟ(_P)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS ਸਿਫਰ ਚੌੜਾਈ ਥਾਂ(_Z)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ ਸਿਫ਼ਰ ਚੌੜਾਈ ਜੁਆਇੰਨਰ(_j)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ ਸਿਫ਼ਰ ਚੌੜਾਈ ਨਾ-ਜੁਆਇੰਨਰ(_n)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +msgid "_Insert Unicode Control Character" +msgstr "ਯੂਨੀਕੋਡ ਕੰਟਰੋਲ ਕਰੈਕਟਰ ਪਾਉ(_I)" + +#: WebKit/gtk/webkit/webkitdownload.cpp:250 +msgid "Network Request" +msgstr "ਨੈੱਟਵਰਕ ਮੰਗ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:251 +msgid "The network request for the URI that should be downloaded" +msgstr "URL ਲਈ ਨੈੱਟਵਰਕ ਮੰਗ, ਜਿਸ ਨੂੰ ਡਾਊਨਲੋਡ ਕੀਤਾ ਜਾਣਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:265 +msgid "Destination URI" +msgstr "ਟਿਕਾਣਾ URI" + +#: WebKit/gtk/webkit/webkitdownload.cpp:266 +msgid "The destination URI where to save the file" +msgstr "ਟਿਕਾਣਾ URI, ਜਿੱਥੇ ਫਾਇਲ ਸੰਭਾਲਣੀ ਹੈ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:280 +msgid "Suggested Filename" +msgstr "ਸੁਝਾਇਆ ਫਾਇਲ-ਨਾਂ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:281 +msgid "The filename suggested as default when saving" +msgstr "ਜਦੋਂ ਸੰਭਾਲਿਆ ਜਾਂਦਾ ਹੋਵੇ ਤਾਂ ਡਿਫਾਲਟ ਸੁਝਾਇਆ ਫਾਇਲ-ਨਾਂ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:294 +msgid "Progress" +msgstr "ਤਰੱਕੀ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:295 +msgid "Determines the current progress of the download" +msgstr "ਡਾਊਨਲੋਡ ਦੀ ਮੌਜੂਦ ਤਰੱਕੀ ਜਾਣੋ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:308 +msgid "Status" +msgstr "ਹਾਲਤ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:309 +msgid "Determines the current status of the download" +msgstr "ਮੌਜੂਦਾ ਡਾਊਨਲੋਡ ਦੀ ਹਾਲਤ ਜਾਣੋ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:324 +msgid "Current Size" +msgstr "ਮੌਜੂਦਾ ਸਾਈਜ਼" + +#: WebKit/gtk/webkit/webkitdownload.cpp:325 +msgid "The length of the data already downloaded" +msgstr "ਪਹਿਲਾਂ ਹੀ ਡਾਊਨਲੋਡ ਕੀਤੇ ਗਏ ਡਾਟੇ ਦੀ ਲੰਬਾਈ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:339 +msgid "Total Size" +msgstr "ਕੁੱਲ ਸਾਈਜ਼" + +#: WebKit/gtk/webkit/webkitdownload.cpp:340 +msgid "The total size of the file" +msgstr "ਫਾਇਲ ਦਾ ਕੁੱਲ ਸਾਈਜ਼" + +#: WebKit/gtk/webkit/webkitdownload.cpp:469 +msgid "User cancelled the download" +msgstr "ਯੂਜ਼ਰ ਨੇ ਡਾਊਨਲੋਡ ਰੱਦ ਕੀਤਾ" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "ਸਾਈਟ %s ਨੇ ਯੂਜ਼ਰ ਨਾਂ ਅਤੇ ਪਾਸਵਰਡ ਦੀ ਮੰਗ ਕੀਤੀ ਹੈ" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +msgid "Username:" +msgstr "ਯੂਜ਼ਰ ਨਾਂ:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +msgid "Password:" +msgstr "ਪਾਸਵਰਡ:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 +msgid "Remember password" +msgstr "ਪਾਸਵਰਡ ਯਾਦ ਰੱਖੋ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +msgid "Name" +msgstr "ਨਾਂ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +msgid "The name of the frame" +msgstr "ਫਰੇਮ ਦਾ ਨਾਂ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 +#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +msgid "Title" +msgstr "ਟਾਈਟਲ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +msgid "The document title of the frame" +msgstr "ਫਰੇਮ ਦਾ ਡੌਕੂਮੈਂਟ ਟਾਈਟਲ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:225 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 +#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +msgid "URI" +msgstr "URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +msgid "The current URI of the contents displayed by the frame" +msgstr "ਫਰੇਮ ਵਲੋਂ ਵੇਖਾਈ ਜਾ ਰਹੀ ਸਮੱਗਰੀ ਦਾ ਮੌਜੂਦਾ URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +msgid "The title of the history item" +msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ ਟਾਈਟਲ" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +msgid "Alternate Title" +msgstr "ਬਦਲਵਾਂ ਟਾਈਟਲ" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +msgid "The alternate title of the history item" +msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ ਬਦਲਵਾਂ ਟਾਈਟਲ" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +msgid "The URI of the history item" +msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +msgid "Original URI" +msgstr "ਅਸਲ URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +msgid "The original URI of the history item" +msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ ਅਸਲੀ URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +msgid "Last visited Time" +msgstr "ਆਖਰੀ ਵਾਰ ਖੋਲ੍ਹਣ ਸਮਾਂ" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +msgid "The time at which the history item was last visited" +msgstr "ਸਮਾਂ, ਜਿਸ ਦੌਰਾਨ ਅਤੀਤ ਆਈਟਮ ਨੂੰ ਖੋਲ੍ਹਿਆ ਗਿਆ ਸੀ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +msgid "Web View" +msgstr "ਵੈੱਬ ਝਲਕ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +msgid "The Web View that renders the Web Inspector itself" +msgstr "ਵੈੱਬ ਝਲਕ, ਜੋ ਕਿ ਵੈੱਬ ਇੰਸਪੈਕਟਰ ਖੁਦ ਰੈਂਡਰ ਕਰਦਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +msgid "Inspected URI" +msgstr "ਜਾਂਚਿਆ URI" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +msgid "The URI that is currently being inspected" +msgstr "URI ਜੋ ਇਸ ਸਮੇਂ ਜਾਂਚਿਆ ਜਾ ਰਿਹਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +msgid "Enable JavaScript profiling" +msgstr "ਜਾਵਾਸਕ੍ਰਿਪਟ ਪਰੋਫਾਇਲਿੰਗ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +msgid "Profile the executed JavaScript." +msgstr "ਜਾਵਾਸਕ੍ਰਿਪਟ ਚਲਾਉਣ ਲਈ ਪਰੋਫਾਇਲ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +msgid "Reason" +msgstr "ਕਾਰਨ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +msgid "The reason why this navigation is occurring" +msgstr "ਕਾਰਨ ਕਿ ਕਿਉਂ ਇਹ ਨੇਵੀਗੇਸ਼ਨ ਹੋਈ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +msgid "The URI that was requested as the target for the navigation" +msgstr "URI, ਜੋ ਕਿ ਨੇਵੀਗੇਸ਼ਨ ਲਈ ਟਾਰਗੇਟ ਵਜੋਂ ਚਾਹੀਦਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +msgid "Button" +msgstr "ਬਟਨ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +msgid "The button used to click" +msgstr "ਕਲਿੱਕ ਕਰਨ ਵਰਤਣ ਵਾਸਤੇ ਬਟਨ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +msgid "Modifier state" +msgstr "ਮਾਡੀਫਾਇਰ ਹਾਲਤ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +msgid "A bitmask representing the state of the modifier keys" +msgstr "ਬਿਟਮਾਸਕ ਮਾਡੀਫਾਈਰ ਸਵਿੱਚਾਂ ਦੀ ਹਾਲਤ ਵੇਖਾਉਦਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +msgid "Default Encoding" +msgstr "ਡਿਫਾਲਟ ਇੰਕੋਡਿੰਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +msgid "The default encoding used to display text." +msgstr "ਵੇਖਾਏ ਜਾ ਰਹੇ ਟੈਕਸਟ ਲਈ ਡਿਫਾਲਟ ਇੰਕੋਡਿੰਗ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +msgid "Cursive Font Family" +msgstr "ਕਰਸਵ ਫੋਂਟ ਵਰਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +msgid "The default Cursive font family used to display text." +msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਕਰਸਵ ਫੋਂਟ ਵਰਗ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +msgid "Default Font Family" +msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਵਰਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +msgid "The default font family used to display text." +msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਫੋਂਟ ਵਰਗ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +msgid "Fantasy Font Family" +msgstr "ਫੈਂਸੀ ਫੋਂਟ ਵਰਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +msgid "The default Fantasy font family used to display text." +msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਫੈਂਸੀ ਫੋਂਟ ਵਰਗ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +msgid "Monospace Font Family" +msgstr "ਮੋਨੋਸਪੇਸ ਫੋਂਟ ਵਰਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +msgid "The default font family used to display monospace text." +msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਵਰਗ, ਜੋ ਮੋਨੋਸਪੇਸ ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣਾ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +msgid "Sans Serif Font Family" +msgstr "ਸੈਨਜ਼ ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +msgid "The default Sans Serif font family used to display text." +msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਸੈਨਜ਼ ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +msgid "Serif Font Family" +msgstr "ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +msgid "The default Serif font family used to display text." +msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +msgid "Default Font Size" +msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਸਾਈਜ਼" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +msgid "The default font size used to display text." +msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਫੋਂਟ ਸਾਈਜ਼।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +msgid "Default Monospace Font Size" +msgstr "ਡਿਫਾਲਟ ਮੋਨੋਸਮਪੇਸ ਫੋਂਟ ਸਾਈਜ਼" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +msgid "The default font size used to display monospace text." +msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਸਾਈਜ਼, ਜੋ ਮੋਨੋਸਪੇਸ ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣਾ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +msgid "Minimum Font Size" +msgstr "ਘੱਟੋ-ਘੱਟ ਫੋਂਟ ਸਾਈਜ਼" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +msgid "The minimum font size used to display text." +msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਸਤੇ ਘੱਟੋ-ਘੱਟ ਫੋਟ ਸਾਈਜ਼।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +msgid "Minimum Logical Font Size" +msgstr "ਘੱਟੋ-ਘੱਟ ਲਾਜ਼ੀਕਲ ਫੋਂਟ ਸਾਈਜ਼" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +msgid "The minimum logical font size used to display text." +msgstr "ਡਿਸਪਲੇਅ ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਘੱਟੋ-ਘੱਟ ਲਾਜ਼ੀਕਲ ਫੋਂਟ ਸਾਈਜ਼ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +msgid "Enforce 96 DPI" +msgstr "96 DPI ਲਈ ਮਜ਼ਬੂਰ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +msgid "Enforce a resolution of 96 DPI" +msgstr "੯੬ DPI ਦੇ ਰੈਜ਼ੋਲੂਸ਼ਨ ਲਈ ਮਜ਼ਬੂਰ ਕਰੋ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +msgid "Auto Load Images" +msgstr "ਚਿੱਤਰ ਆਟੋ ਲੋਡ ਕਰੋ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +msgid "Load images automatically." +msgstr "ਚਿੱਤਰ ਆਟੋਮੈਟਿਕ ਲੋਡ ਕਰੋ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +msgid "Auto Shrink Images" +msgstr "ਚਿੱਤਰ ਆਟੋ ਸੁੰਘੜੋ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +msgid "Automatically shrink standalone images to fit." +msgstr "ਇੱਕਲੇ ਚਿੱਤਰਾਂ ਨੂੰ ਫਿੱਟ ਕਰਨ ਲਈ ਆਟੋਮੈਟਿਕ ਸੁੰਘੜੋ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +msgid "Print Backgrounds" +msgstr "ਬੈਕਗਰਾਊਂਡ ਪਰਿੰਟ ਕਰੋ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +msgid "Whether background images should be printed." +msgstr "ਕੀ ਬੈਕਗਰਾਊਂਡ ਚਿੱਤਰਾਂ ਨੂੰ ਛਾਪਣਾ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +msgid "Enable Scripts" +msgstr "ਸਕ੍ਰਿਪਟਾਂ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +msgid "Enable embedded scripting languages." +msgstr "ਇੰਬੈੱਡ ਸਕ੍ਰਿਪਟ ਭਾਸ਼ਾਵਾਂ ਚਾਲੂ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +msgid "Enable Plugins" +msgstr "ਪਲੱਗਇਨ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +msgid "Enable embedded plugin objects." +msgstr "ਇੰਬੈੱਡ ਪਲੱਗਇਨ ਆਬਜੈਕਟ ਚਾਲੂ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +msgid "Resizable Text Areas" +msgstr "ਮੁੜ-ਆਕਾਰ ਯੋਗ ਟੈਕਸਟ ਖੇਤਰ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +msgid "Whether text areas are resizable." +msgstr "ਕੀ ਟੈਕਸਟ ਖੇਤਰ ਮੁੜ-ਆਕਾਰ ਯੋਗ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +msgid "User Stylesheet URI" +msgstr "ਯੂਜ਼ਰ ਸਟਾਇਲਸ਼ੀਟ URI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "ਸਟਾਈਲਸ਼ੀਟ ਦਾ URI, ਜੋ ਕਿ ਹਰੇਕ ਪੇਜ਼ ਉੱਤੇ ਲਾਗੂ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +msgid "Zoom Stepping Value" +msgstr "ਜ਼ੂਮ ਸਟਿੱਪਿੰਗ ਮੁੱਲ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "ਜਦੋਂ ਜ਼ੂਮ ਇਨ ਜਾਂ ਆਉਟ ਕੀਤਾ ਜਾਵੇ ਤਾਂ ਜ਼ੂਮ ਲੈਵਲ ਬਦਲਣ ਦਾ ਮੁੱਲ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +msgid "Enable Developer Extras" +msgstr "ਡਿਵੈਲਪਰ ਐਕਸਟਰਾ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +msgid "Enables special extensions that help developers" +msgstr "ਖਾਸ ਇਕਸਟੈਨਸ਼ਨ ਚਾਲੂ ਕਰਦਾ ਹੈ, ਜੋ ਡਿਵੈਲਪਰਾਂ ਲਈ ਸਹਾਇਕ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +msgid "Enable Private Browsing" +msgstr "ਪ੍ਰਾਈਵੇਟ ਬਰਾਊਜ਼ਿੰਗ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +msgid "Enables private browsing mode" +msgstr "ਪ੍ਰਾਈਵੇਟ ਬਰਾਊਜ਼ਡ ਮੋਡ ਚਾਲੂ ਕਰੋ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +msgid "Returns the @web_view's document title" +msgstr "@web_view ਦਾ ਡੌਕੂਮੈਂਟ ਟਾਈਟਲ ਦਿੰਦਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "@web_view ਵਲੋਂ ਵੇਖਾਈ ਜਾ ਰਹੀ ਸਮੱਗਰੀ ਦਾ ਮੌਜੂਦਾ URI ਦਿੰਦਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +msgid "Copy target list" +msgstr "ਟਾਰਗੇਟ ਲਿਸਟ ਕਾਪੀ ਕਰੋ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +msgid "The list of targets this web view supports for clipboard copying" +msgstr "ਕਲਿੱਪਬੋਰਡ ਕਾਪੀ ਕਰਨ ਲਈ ਇਸ ਵੈੱਬ ਝਲਕ ਸਹਿਯੋਗ ਵਾਸਤੇ ਟਾਰਗੇਟ ਦੀ ਲਿਸਟ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +msgid "Paste target list" +msgstr "ਟਾਰਗੇਟ ਲਿਸਟ ਚੇਪੋ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "ਕਲਿੱਪਬੋਰਡ ਪੇਸਟਿੰਗ ਲਈ ਇਸ ਵੈੱਬ ਝਲਕ ਸਹਿਯੋਗ ਵਾਸਤੇ ਟਾਰਗੇਟ ਦੀ ਲਿਸਟ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +msgid "Settings" +msgstr "ਸੈਟਿੰਗ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +msgid "An associated WebKitWebSettings instance" +msgstr "ਸਬੰਧਤ WebKitWebSettings ਮੌਕਾ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +msgid "Web Inspector" +msgstr "ਵੈੱਬ ਇੰਸਪੈਕਟਰ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +msgid "The associated WebKitWebInspector instance" +msgstr "ਸਬੰਧਤ WebKitWebInspector ਮੌਕਾ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +msgid "Editable" +msgstr "ਸੋਧਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +msgid "Whether content can be modified by the user" +msgstr "ਕੀ ਸਮੱਗਰੀ ਨੂੰ ਯੂਜ਼ਰ ਵਲੋਂ ਸੋਧਿਆ ਜਾ ਸਕਦਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +msgid "Transparent" +msgstr "ਟਰਾਂਸਪਰੇਟ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +msgid "Whether content has a transparent background" +msgstr "ਕੀ ਸਮੱਗਰੀ ਦੀ ਪਾਰਦਰਸ਼ੀ ਬੈਕਗਰਾਊਂਡ ਹੋਵੇ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +msgid "Zoom level" +msgstr "ਜ਼ੂਮ ਲੈਵਲ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +msgid "The level of zoom of the content" +msgstr "ਸਮੱਗਰੀ ਦਾ ਜ਼ੂਮ ਲੈਵਲ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +msgid "Full content zoom" +msgstr "ਪੂਰੀ ਸਮੱਗਰੀ ਜ਼ੂਮ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +msgid "Whether the full content is scaled when zooming" +msgstr "ਜਦੋਂ ਜ਼ੂਮ ਕਰਨਾ ਹੋਵੇ ਤਾਂ ਕੀ ਪੂਰੀ ਸਮਗੱਰੀ ਕਰਨੀ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +msgid "Encoding" +msgstr "ਇੰਕੋਡਿੰਗ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +msgid "The default encoding of the web view" +msgstr "ਵੈਬ ਝਲਕ ਲਈ ਡਿਫਾਲਟ ਇੰਕੋਡਿੰਗ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +msgid "Custom Encoding" +msgstr "ਪਸੰਦੀਦਾ ਇੰਕੋਡਿੰਗ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +msgid "The custom encoding of the web view" +msgstr "ਵੈੱਬ ਝਲਕ ਲਈ ਕਸਟਮ ਇੰਕੋਡਿੰਗ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +msgid "Submit" +msgstr "ਭੇਜੋ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +msgid "Reset" +msgstr "ਮੁੜ-ਸੈੱਟ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +msgid "_Searchable Index" +msgstr "ਖੋਜਯੋਗ ਇੰਡੈਕਸ(_S)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +msgid "Choose File" +msgstr "ਫਾਇਲ ਚੁਣੋ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +msgid "(None)" +msgstr "(ਕੋਈ ਨਹੀਂ)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +msgid "Open Link in New _Window" +msgstr "ਲਿੰਕ ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਖੋਲ੍ਹੋ(_W)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +msgid "_Download Linked File" +msgstr "ਲਿੰਕ ਕੀਤੀ ਫਾਇਲ ਡਾਊਨਲੋਡ ਕਰੋ(_D)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +msgid "Copy Link Loc_ation" +msgstr "ਲਿੰਕ ਟਿਕਾਣਾ ਕਾਪੀ ਕਰੋ(_a)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +msgid "Open _Image in New Window" +msgstr "ਚਿੱਤਰ ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਖੋਲ੍ਹੋ(_I)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +msgid "Sa_ve Image As" +msgstr "ਚਿੱਤਰ ਇੰਝ ਸੰਭਾਲੋ(_v)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +msgid "Cop_y Image" +msgstr "ਚਿੱਤਰ ਕਾਪੀ ਕਰੋ(_y)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +msgid "Open _Frame in New Window" +msgstr "ਫਰੇਮ ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਖੋਲ੍ਹੋ(_F)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +msgid "_Reload" +msgstr "ਮੁੜ-ਲੋਡ ਕਰੋ(_R)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +msgid "No Guesses Found" +msgstr "ਕੋਈ ਸੁਝਾਅ ਨਹੀਂ ਲੱਭਿਆ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +msgid "_Ignore Spelling" +msgstr "ਸਪੈਲਿੰਗ ਅਣਡਿੱਠੇ(_I)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +msgid "_Learn Spelling" +msgstr "ਸਪੈਲਿੰਗ ਸਿੱਖੋ(_L)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +msgid "_Search the Web" +msgstr "ਵੈੱਬ ਉੱਤੇ ਖੋਜ(_S)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +msgid "_Look Up in Dictionary" +msgstr "ਡਿਕਸ਼ਨਰੀ ਵਿੱਚ ਖੋਜੋ(_L)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +msgid "_Open Link" +msgstr "ਲਿੰਕ ਖੋਲ੍ਹੋ(_O)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +msgid "Ignore _Grammar" +msgstr "ਗਰਾਮਰਡ ਅਣਡਿੱਠੀ(_G)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +msgid "Spelling and _Grammar" +msgstr "ਸਪੈਲਿੰਗ ਅਤੇ ਗਰਾਮਰ(_G)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +msgid "_Show Spelling and Grammar" +msgstr "ਸਪੈਲਿੰਗ ਅਤੇ ਗਰਾਮਰ ਵੇਖੋ(_S)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +msgid "_Hide Spelling and Grammar" +msgstr "ਸਪੈਲਿੰਗ ਅਤੇ ਗਰਾਮਰ ਓਹਲੇ(_H)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +msgid "_Check Document Now" +msgstr "ਡੌਕੂਮੈਂਟ ਹੁਣੇ ਚੈੱਕ ਕਰੋ(_C)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +msgid "Check Spelling While _Typing" +msgstr "ਲਿਖਣ ਦੇ ਦੌਰਾਨ ਹੀ ਸਪੈਲਿੰਗ ਚੈੱਕ ਕਰੋ(_T)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +msgid "Check _Grammar With Spelling" +msgstr "ਗਰਾਮਰ ਨਾਲ ਸਪੈਲਿੰਗ ਚੈੱਕ ਕਰੋ(_G)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +msgid "_Font" +msgstr "ਫੋਂਟ(_F)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +msgid "_Outline" +msgstr "ਆਉਟਲਾਈਨ(_O)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +msgid "Inspect _Element" +msgstr "ਐਲੀਮੈਂਟ ਜਾਂਚੋ(_E)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +msgid "No recent searches" +msgstr "ਕੋਈ ਤਾਜ਼ਾ ਖੋਜ ਨਹੀਂ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +msgid "Recent searches" +msgstr "ਤਾਜ਼ਾ ਖੋਜ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +msgid "_Clear recent searches" +msgstr "ਤਾਜ਼ਾ ਖੋਜਾਂ ਸਾਫ਼ ਕਰੋ(_C)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +msgid "term" +msgstr "ਸ਼ਬਦ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +msgid "definition" +msgstr "ਪ੍ਰੀਭਾਸ਼ਾ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +msgid "press" +msgstr "ਦੱਬੋ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +msgid "select" +msgstr "ਚੁਣੋ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +msgid "activate" +msgstr "ਐਕਟੀਵੇਟ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +msgid "uncheck" +msgstr "ਅਣ-ਚੋਣ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +msgid "check" +msgstr "ਚੋਣ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +msgid "jump" +msgstr "ਜੰਪ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +msgid " files" +msgstr " ਫਾਇਲਾਂ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +msgid "Unknown" +msgstr "ਅਣਜਾਣ" + + diff --git a/WebKit/gtk/po/pt_BR.po b/WebKit/gtk/po/pt_BR.po index b471707..403a53b 100644 --- a/WebKit/gtk/po/pt_BR.po +++ b/WebKit/gtk/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-23 15:57-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-04-15 21:39-0300\n" "Last-Translator: Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>\n" "Language-Team: Brazilian Portuguese\n" @@ -14,12 +14,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:454 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Enviar Arquivo" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "_Métodos de entrada" @@ -64,67 +64,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ _Não-união de largura zero" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Inserir caractere de controle Unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:254 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Requisição de Rede" -#: WebKit/gtk/webkit/webkitdownload.cpp:255 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "A requisição de rede para a URI que deve ser baixada" -#: WebKit/gtk/webkit/webkitdownload.cpp:269 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Requisição de Rede" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "A requisição de rede para a URI que deve ser baixada" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "URI de Destino" -#: WebKit/gtk/webkit/webkitdownload.cpp:270 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "A URI de destino, onde deve ser salvo o arquivo" -#: WebKit/gtk/webkit/webkitdownload.cpp:284 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Nome de Arquivo Sugerido" -#: WebKit/gtk/webkit/webkitdownload.cpp:285 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "O nome de arquivo que deve ser usado como padrão ao salvar" -#: WebKit/gtk/webkit/webkitdownload.cpp:298 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Progresso" -#: WebKit/gtk/webkit/webkitdownload.cpp:299 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Determina o progresso atual do download" -#: WebKit/gtk/webkit/webkitdownload.cpp:312 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Estado" -#: WebKit/gtk/webkit/webkitdownload.cpp:313 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Determina o estado atual do download" -#: WebKit/gtk/webkit/webkitdownload.cpp:328 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Tamanho Atual" -#: WebKit/gtk/webkit/webkitdownload.cpp:329 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "A quantidade de dados já baixados" -#: WebKit/gtk/webkit/webkitdownload.cpp:343 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Tamanho total" -#: WebKit/gtk/webkit/webkitdownload.cpp:344 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "O tamanho total do arquivo" -#: WebKit/gtk/webkit/webkitdownload.cpp:473 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Usuário cancelou o download" @@ -141,559 +151,935 @@ msgstr "Usuário:" msgid "Password:" msgstr "Senha:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Lembrar senha" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Nome" -#: WebKit/gtk/webkit/webkitwebframe.cpp:213 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "O nome do quadro" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1745 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Título" -#: WebKit/gtk/webkit/webkitwebframe.cpp:220 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "O título do documento do quadro" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1759 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:227 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "A URI atual do conteúdo que está sendo exibido pelo quadro" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Determina o progresso atual do download" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Determina o progresso atual do download" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "O título do item do histórico" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Título Alternativo" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "O título alternativo do item do histórico" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "A URI do item do histórico" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "URI Original" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "A URI original do item do histórico" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Hora da Última Visita" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "Quando o item do histórico foi visitado pela última vez" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Visão Web" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "A visão web que exibe o inspetor web" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "URI Inspecionada" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "A URI que está sendo atualmente inspecionada" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Habilitar análise de desempenho de JavaScript" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Analisar desempenho de JavaScript em execução." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Habilitar análise de desempenho de JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Razão" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "A razão pela qual essa navegação ocorre" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "A URI que foi requisitada como alvo para a navegação" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Botão" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "O botão usado no clique" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Estado do modificador" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Uma máscara de bits representando o estado das teclas modificadoras" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "O nome do quadro" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "A URI que foi requisitada como alvo para a navegação" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Codificação Padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "A codificação padrão usada para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Família de Fontes Cursivas" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "A família de fontes cursivas padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Família de Fontes Padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "A família de fontes padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Família de Fontes Fantasia" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "A família de fontes fantasia padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Família de Fontes Mono-espaçadas" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "A família de fontes mono-espaçadas padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Família de Fontes Sem Serifa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "A família de fontes sem serifa padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Família de Fontes Com Serifa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "A família de fontes com serifa padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Tamanho de Fonte Padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "O tamanho de fonte padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Tamanho de fonte mono-espaçada padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "O tamanho de fonte padrão para exibir texto com fonte mono-espaçada." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Tamanho Mínimo de Fonte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "O tamanho mínimo de fontes usadas para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Tamanho de Fonte Mínimo Lógico" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "O tamanho lógico mínimo de fontes usadas para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Forçar 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Força uma resolução de 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Auto-carregamento de Imagens" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Carregar imagens automaticamente." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Auto-Diminuição de Imagens" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Automaticamente diminuir imagens sozinhas para caber na tela." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Imprimir Fundos" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Se as imagens de fundo devem ser impressas." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Habilitar Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Habilitar linguagens de script embutidas." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Habilitar Plugins" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Habilitar objetos de plugins embutidos." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Áreas de Texto Redimensionáveis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Se as áreas de texto devem ser redimensionáveis." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "URI da Folha de Estilo do Usuário" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "A URI de uma folha de estilo que é aplicada a todas as páginas." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Valor de Passo do Zoom" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "O valor da variação do zoom ao aproximar ou distanciar." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Habilitar Extas de Desenvolvimento" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Habilita extensões especiais que auxiliam desenvolvedores" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Habilitar Navegação Privativa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Habilita o modo de navegação privativa" -#: WebKit/gtk/webkit/webkitwebview.cpp:1746 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Verifiação _Ortográfica ao Digitar" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Habilitar Navegação Privativa" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Habilitar Scripts" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Habilitar Scripts" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Se as imagens de fundo devem ser impressas." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Retorna o título da visão web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1760 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Retorna a URI do conteúdo atualmente exibido pela visão web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1773 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Lista de alvos de cópia" -#: WebKit/gtk/webkit/webkitwebview.cpp:1774 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" "A lista de alvos que essa visão web suporta para cópia para área de " "transferência" -#: WebKit/gtk/webkit/webkitwebview.cpp:1787 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Lista de alvos de cola" -#: WebKit/gtk/webkit/webkitwebview.cpp:1788 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" "A lista de alvos que essa visão web suporta para cola da área de " "transferência" -#: WebKit/gtk/webkit/webkitwebview.cpp:1794 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Configurações" -#: WebKit/gtk/webkit/webkitwebview.cpp:1795 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Uma instância de WebKitWebSettings associada" -#: WebKit/gtk/webkit/webkitwebview.cpp:1808 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Inspetor Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1809 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "A instância de WebKitWebInspector que está associada a essa visão" -#: WebKit/gtk/webkit/webkitwebview.cpp:1829 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Editável" -#: WebKit/gtk/webkit/webkitwebview.cpp:1830 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Se o conteúdo pode ser modificado pelo usuário" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Transparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Se o conteúdo tem um fundo transparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Nível de Zoom" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "O nível de zoom do conteúdo" -#: WebKit/gtk/webkit/webkitwebview.cpp:1866 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Zoom Completo do Conteúdo" -#: WebKit/gtk/webkit/webkitwebview.cpp:1867 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Se todo o conteúdo é redimensionado no zoom" -#: WebKit/gtk/webkit/webkitwebview.cpp:1880 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Codificação" -#: WebKit/gtk/webkit/webkitwebview.cpp:1881 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "A codificação padrão da visão web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1894 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Codificação Customizada" -#: WebKit/gtk/webkit/webkitwebview.cpp:1895 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "A codificação customizada da visão web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Enviar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Limpar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "Índice de bu_sca" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Escolher arquivo" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Nenhum)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Abrir Link em Nova _Janela" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Baixar Arquivo" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Copiar _Endereço do Link" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Abrir _Imagem em Nova Janela" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Sal_var Imagem Como" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Co_piar Imagem" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "Abrir _Quadro em Nova Janela" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "_Recarregar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Nenhuma Sugestão Encontrada" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Ignorar Palavra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Aprender Palavra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Procurar na Web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "Procurar no _Dicionário" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Abrir Link" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Ignorar _Gramática" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Ortografia e Gramática" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "E_xibir Ortografia e Gramática" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "E_sconder Ortografia e Gramática" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "_Verificar Documento Agora" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Verifiação _Ortográfica ao Digitar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Verificação _Gramatical ao Digitar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Fonte" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Outline" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Inspecionar _Elemento" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Não há buscas recentes" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Buscas recentes" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Limpar buscas recentes" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "termo" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definição" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "pressionar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "selecionar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "ativar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "desmarcar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "marcar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "pular" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr "arquivos" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Desconhecido" +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Estado" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "definição" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" + #~ msgid "Select _All" #~ msgstr "Selecionar _Tudo" diff --git a/WebKit/gtk/po/ru.po b/WebKit/gtk/po/ru.po index ad176d7..b8038cc 100644 --- a/WebKit/gtk/po/ru.po +++ b/WebKit/gtk/po/ru.po @@ -2,24 +2,25 @@ msgid "" msgstr "" "Project-Id-Version: webkit git\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-05-11 16:48+0900\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: \n" "Last-Translator: Anton Shestakov <engored@ya.ru>\n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Poedit-Language: Russian\n" "X-Poedit-Country: RUSSIAN FEDERATION\n" "X-Poedit-SourceCharset: utf-8\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:455 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Отправка файла" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:142 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "_Методы ввода" @@ -64,67 +65,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ Нулевой ра_зъединитель" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:137 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "Вст_авить управляющий символ Юникод" -#: WebKit/gtk/webkit/webkitdownload.cpp:245 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Сетевой запрос" -#: WebKit/gtk/webkit/webkitdownload.cpp:246 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "Сетевой запрос для заданного URI, который должен быть выполнен" -#: WebKit/gtk/webkit/webkitdownload.cpp:260 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Сетевой запрос" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "Сетевой запрос для заданного URI, который должен быть выполнен" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "URI назначения" -#: WebKit/gtk/webkit/webkitdownload.cpp:261 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "Конечный URI для сохранения файла" -#: WebKit/gtk/webkit/webkitdownload.cpp:275 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Предлагаемое имя файла" -#: WebKit/gtk/webkit/webkitdownload.cpp:276 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "Имя файла, которое предлагается при загрузке по умолчанию" -#: WebKit/gtk/webkit/webkitdownload.cpp:289 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Прогресс" -#: WebKit/gtk/webkit/webkitdownload.cpp:290 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Текущий прогресс загрузки" -#: WebKit/gtk/webkit/webkitdownload.cpp:303 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Состояние" -#: WebKit/gtk/webkit/webkitdownload.cpp:304 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Текущее состояния загрузки" -#: WebKit/gtk/webkit/webkitdownload.cpp:319 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Текущий размер" -#: WebKit/gtk/webkit/webkitdownload.cpp:320 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "Объём уже загруженных данных" -#: WebKit/gtk/webkit/webkitdownload.cpp:334 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Общий размер" -#: WebKit/gtk/webkit/webkitdownload.cpp:335 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "Общий размер файла" -#: WebKit/gtk/webkit/webkitdownload.cpp:464 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Передача прервана пользователем" @@ -141,577 +152,928 @@ msgstr "Имя пользователя:" msgid "Password:" msgstr "Пароль:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Запомнить пароль" -#: WebKit/gtk/webkit/webkitwebframe.cpp:224 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Имя" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Имя фрейма" -#: WebKit/gtk/webkit/webkitwebframe.cpp:231 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:152 -#: WebKit/gtk/webkit/webkitwebview.cpp:1771 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Заголовок" -#: WebKit/gtk/webkit/webkitwebframe.cpp:232 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Заголовок документа фрейма" -#: WebKit/gtk/webkit/webkitwebframe.cpp:238 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:184 -#: WebKit/gtk/webkit/webkitwebview.cpp:1785 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:239 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "Текущий URI содержимого фрейма" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:153 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Текущий прогресс загрузки" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Текущий прогресс загрузки" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "Заголовок элемента истории" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:168 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Альтернативный заголовок" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:169 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "Альтернативный заголовок элемента истории" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:185 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "URI элемента истории" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:200 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:165 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "Изначальный URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:201 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "Изначальный URI элемента истории" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:216 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Время последнего посещения" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:217 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "Время последнего посещения элемента истории" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:258 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:259 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:272 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "Исследуемый URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:273 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "URI, который исследуется в данный момент" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:289 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Включить профилирование JavaScript" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:290 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Профилировать выполняемый код JavaScript." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:150 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Включить профилирование JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Причина" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:151 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "Причина, по которой происходит данный переход" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:166 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "URI, который был указан в запросе на переход" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:178 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Кнопка" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:179 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "Кнопка для нажатия" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Состояние модификаторов" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:195 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Битовая маска, представляющая состояния клавиш-модификаторов" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:134 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Имя фрейма" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "URI, который был указан в запросе на переход" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Кодировка по умолчанию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:135 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "Кодировка текста по умолчанию." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:143 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Семейство курсивного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:144 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "Семейство курсивного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:152 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Семейство шрифта по умолчанию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:153 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "Семейство шрифта по умолчанию для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:161 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Семейство декоративного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:162 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "Семейство декоративного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:170 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Семейство моноширинного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:171 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "Семейство моноширинного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:179 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Семейство шрифта без засечек" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:180 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "Семейство шрифта без засечек для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:188 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Семейство шрифта с засечками" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:189 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "Семейство шрифта с засечками для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:197 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Размер шрифта по умолчанию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:198 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "Размер шрифта по умолчанию для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:206 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Размер моноширинного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:207 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "Размер моноширинного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:215 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Минимальный размер шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:216 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "Минимальный размер шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:224 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Минимальный логический размер шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:225 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "Минимальный логический размер шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:244 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Всегда использовать 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:245 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Принудительно использовать разрешение 96 точек на дюйм" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:253 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Загружать изображения автоматически" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:254 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Загружать изображения автоматически." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:262 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Масштабировать изображения автоматически" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:263 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Автоматически уменьшать отдельные изображения по размеру экрана." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:271 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Печатать фоновые изображения" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:272 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Должны ли быть выведены на печать фоновые изображения." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:280 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Выполнять сценарии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:281 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Выполнять встроенные сценарии на страницах." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:289 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Использовать модули" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:290 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Разрешить встроенные объекты модулей на страницах." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:298 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Изменяемый размер текстовых полей" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:299 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Текстовые поля могут изменять размер." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "URI пользовательской таблицы стилей" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:307 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "URI таблицы стилей, которая будет применена для всех страниц." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:322 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Приращение масштаба" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Значение, на которое будет изменяться значение масштаба." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:341 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Включить средства разработчика" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:342 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Включить особые расширения, которые могут быть полезны разработчикам" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Включить конфиденциальный режим" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:363 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Включает конфиденциальный режим просмотра" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:378 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 msgid "Enable Spell Checking" msgstr "Проверять орфографию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 msgid "Enables spell checking while typing" msgstr "Выполнять проверку орфографии при вводе текста" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 msgid "Languages to use for spell checking" msgstr "Языки для проверки орфографии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:403 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 msgid "Comma separated list of languages to use for spell checking" -msgstr "Список языков через запятую, которые будут использоваться для проверки орфографии" +msgstr "" +"Список языков через запятую, которые будут использоваться для проверки " +"орфографии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:417 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 msgid "Enable Caret Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:418 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1772 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Выполнять сценарии" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Выполнять сценарии" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#, fuzzy +msgid "Enable page cache" +msgstr "Проверять орфографию" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Должны ли быть выведены на печать фоновые изображения." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1786 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1813 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1814 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Настройки" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Связанный экземпляр WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:1834 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Веб-инспектор" -#: WebKit/gtk/webkit/webkitwebview.cpp:1835 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "Связанный экземпляр WebKitWebInspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:1855 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Изменяемое" -#: WebKit/gtk/webkit/webkitwebview.cpp:1856 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Может ли содержимое быть изменено пользователем" -#: WebKit/gtk/webkit/webkitwebview.cpp:1862 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Прозрачное" -#: WebKit/gtk/webkit/webkitwebview.cpp:1863 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Имеется ли у содержимого прозрачный фон" -#: WebKit/gtk/webkit/webkitwebview.cpp:1876 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Масштаб" -#: WebKit/gtk/webkit/webkitwebview.cpp:1877 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Масштаб содержимого страницы" -#: WebKit/gtk/webkit/webkitwebview.cpp:1892 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1893 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1906 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Кодировка" -#: WebKit/gtk/webkit/webkitwebview.cpp:1907 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1920 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Особая кодировка" -#: WebKit/gtk/webkit/webkitwebview.cpp:1921 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:54 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:59 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Отправить" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:64 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Сброс" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:69 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:74 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Выбрать файл" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:79 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Нет)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:84 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Открыть ссылку в новом _окне" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:89 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Загрузить связанный файл" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:94 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "_Копировать ссылку" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:99 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Открыть _изображение в новом окне" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:104 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Со_хранить изображение как..." -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Коп_ировать изображение" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:114 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "Открыть _фрейм в новом окне" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:165 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "_Обновить" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:182 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Нет вариантов" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:187 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Пропустить слово" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:192 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Добавить слово" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:197 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Найти в сети" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:202 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "Найти в _словаре" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:207 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "О_ткрыть ссылку" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:212 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "_Игнорировать грамматику" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:217 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "_Орфография и грамматика" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:222 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Показать орфографию и грамматику" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:222 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "_Скрыть орфографию и грамматику" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:227 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "Проверить _документ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:232 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Проверять _орфографию в процессе ввода" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:237 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Проверять _также грамматику" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:242 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Шрифт" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:265 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:270 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Исследовать _элемент" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:275 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Нет недавних поисковых запросов" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:280 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Недавние поисковые запросы" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:285 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Удалить недавние поисковые запросы" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:290 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:295 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:300 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:305 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:310 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:315 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:320 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:325 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:331 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:336 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Неизвестно" +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Состояние" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +msgid "indefinite time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/sr.po b/WebKit/gtk/po/sr.po index e7274d5..9cd8267 100644 --- a/WebKit/gtk/po/sr.po +++ b/WebKit/gtk/po/sr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.10\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-06-19 02:35+100\n" "Last-Translator: Милош Поповић <gpopac@gmail.com>\n" "Language-Team: Serbian <gnom@prevod.org>\n" @@ -19,12 +19,12 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Пошаљи датотеку" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Начин _уноса" @@ -71,67 +71,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "Н_епрецртана нула" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Уметни уникод контролни знак" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Захтев на мрежи" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "Захтевана адресе датотеке коју желите да преузмете" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Захтев на мрежи" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "Захтевана адресе датотеке коју желите да преузмете" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "Циљна адреса" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "Циљна адреса где желите да сачувате датотеку" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Предложено име датотеке" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "Подразумевано име датотеке приликом чувања" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Преузето" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Показује тренутни напредак преузимања" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Стање" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Показује тренутно стање преузимања" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Величина" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "Приказује величину преузете датотеке" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Укупна величина" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "Приказује укупну величину преузете датотеке" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Прекинута преузимања" @@ -148,558 +158,934 @@ msgstr "Корисничко име:" msgid "Password:" msgstr "Лозинка:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Упамти лозинку" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Име" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Име оквира" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Наслов" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Наслов документа унутар оквира" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "Адреса" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "Адреса садржаја који је приказан унутар оквира" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Показује тренутни напредак преузимања" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Показује тренутни напредак преузимања" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "Наслов за ставке у историјату" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 #, fuzzy msgid "Alternate Title" msgstr "Променљив наслов" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 #, fuzzy msgid "The alternate title of the history item" msgstr "Променљив наслов ставке у историјату" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "Адреса ставке у историјату" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "Оригинална адреса" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "Оригинална адреса ставке у историјату" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Последња посета" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "Време када је ставка из историјата последњи пут посећена" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Веб приказ" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "Веб приказ кога исцртава „Веб инспектор“" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 #, fuzzy msgid "Inspected URI" msgstr "Инспекција адресе" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 #, fuzzy msgid "The URI that is currently being inspected" msgstr "Адреса коју тренутно обрађује инспектор" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Омогући учење Јава скрипте" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Прави профил покренуте Јава скрипте." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Омогући учење Јава скрипте" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Разлог" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "Разлог због кога је приказана навигација" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "Циљна адреса коју захтева навигација" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Дугме" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "Дугме које се притиска" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Стање измењивача" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Ознака која одређује да ли је укључен тастер за измену функције" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Име оквира" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "Циљна адреса коју захтева навигација" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Подразумевано кодирање" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "Подразумевано кодирање за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Скуп искошених фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "Подразумевани скуп искошених фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Подразумевани скуп фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "Подразумевани скуп фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Скуп фантази фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "Подразумевани скуп фантази фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Скуп равномерних фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "Подразумевани скуп равномерно широких фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Скуп безсерифних фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "Подразумевани скуп безсерифних фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Скуп серифних фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "Подразумевани скуп серифних фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Подразумевана величина фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "Подразумевана величина фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Подразумевана величина разномерног фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "Подразумевана величина равномерно широких фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Најмања величина фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "Најмања величина фонта за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Најмања логичка величина фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "Најмања логичка величина фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Приморај 96 ТПИ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Приморава резолуцију од 96 ТПИ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Сам учитај слике" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Аутоматски учитава слике." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Сам смањи слике" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Аутоматску умањује слике тако да се уклопиле у страну." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Исцртај позадину" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Одређује да ли да се приказују позадинске слике." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Омогући скрипте" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Укључује језике за скрипте уметнуте унутар страница." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Омогући додатке" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Укључује објекте уметнуте унутар страница." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Текст променљиве величине" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Одређује да ли да област са текстом буде променљиве величине." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "Адреса датотеке са стилом" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "" "Путања до датотеке са сопственим стилом који се примењује на сваку страницу." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Корак увећања" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Вредност за коју се мења приказ приликом повећања или смањења." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Укључи додатке за развој" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Укључује додатке који помажу приликом развоја овог програма" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Приватни режим" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Укључује режим разгледања уз чување ваше приватности" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Провери писање _док куцам" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Приватни режим" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Омогући скрипте" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Омогући скрипте" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Одређује да ли да се приказују позадинске слике." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Исписује наслов документа из @веб_прегледа" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Исписује тренутну адресу садржаја приказаног у @веб_прегледу" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Умножи списак циљева" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "Циљева за копирање међу списак исечака које подржава веб преглед" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Убаци списак циљева" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "Списак циљева за убацивање из оставе које подржава веб преглед" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Подешавања" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Повезано са WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Веб инспектор" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "Повезано са WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Измењиво" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Омогућава кориснику да уређује приказани садржај" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Провидност" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Омогућава провидну позадину за садржај" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Увећање" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Ниво увећања приказаног садржаја" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Увећавај све" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Одређује да ли да се увећава целокупан садржај" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Кодирање" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "Подразумевано кодирање веб странице" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Произвољно кодирање" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "Произвољно кодирање веб странице" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Пошаљи" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Поништи" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "_Претражив индекс" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Изаберите датотеку" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(ништа)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Отвори везу у _новом прозору" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Преузми циљну датотеку" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Умножи _адресу везе" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "_Отвори слику у новом прозору" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "_Сачувај слику као" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "_Умножи слику" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "О_твори оквир у новом прозору" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "_Освежи" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Нема поклапања" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Занемари ову реч" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Упамти ову реч" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Потражи на мрежи" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "_Потражи у директоријуму" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Отвори везу" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Занемари _правопис" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Провера пи_сања и правописа" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Прикажи проверу писања и правописа" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "С_акриј проверу писања и правописа" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "Про_вери документ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Провери писање _док куцам" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "П_ровери правопис и писање" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Фонт" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Оквир" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 #, fuzzy msgid "Inspect _Element" msgstr "Инспекција _елемента" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Нема скорашњих претрага" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Скорашње претраге" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Очисти скорашње претраге" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "термин" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "дефиниција" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "притисни" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "изабери" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "покрени" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "искључи" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "укључи" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "иди" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " датотеке" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Непознато" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Стање" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "дефиниција" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/sr@latin.po b/WebKit/gtk/po/sr@latin.po index 4cdb0bb..c52ab3f 100644 --- a/WebKit/gtk/po/sr@latin.po +++ b/WebKit/gtk/po/sr@latin.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.10\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-06-19 02:35+100\n" "Last-Translator: Miloš Popović <gpopac@gmail.com>\n" "Language-Team: Serbian <gnom@prevod.org>\n" @@ -19,12 +19,12 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Pošalji datoteku" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Način _unosa" @@ -71,67 +71,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "N_eprecrtana nula" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Umetni unikod kontrolni znak" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Zahtev na mreži" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "Zahtevana adrese datoteke koju želite da preuzmete" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Zahtev na mreži" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "Zahtevana adrese datoteke koju želite da preuzmete" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "Ciljna adresa" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "Ciljna adresa gde želite da sačuvate datoteku" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Predloženo ime datoteke" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "Podrazumevano ime datoteke prilikom čuvanja" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Preuzeto" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Pokazuje trenutni napredak preuzimanja" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Stanje" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Pokazuje trenutno stanje preuzimanja" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Veličina" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "Prikazuje veličinu preuzete datoteke" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Ukupna veličina" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "Prikazuje ukupnu veličinu preuzete datoteke" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Prekinuta preuzimanja" @@ -148,558 +158,935 @@ msgstr "Korisničko ime:" msgid "Password:" msgstr "Lozinka:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Upamti lozinku" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Ime" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Ime okvira" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Naslov" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Naslov dokumenta unutar okvira" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "Adresa" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "Adresa sadržaja koji je prikazan unutar okvira" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Pokazuje trenutni napredak preuzimanja" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Pokazuje trenutni napredak preuzimanja" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "Naslov za stavke u istorijatu" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 #, fuzzy msgid "Alternate Title" msgstr "Promenljiv naslov" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 #, fuzzy msgid "The alternate title of the history item" msgstr "Promenljiv naslov stavke u istorijatu" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "Adresa stavke u istorijatu" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "Originalna adresa" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "Originalna adresa stavke u istorijatu" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Poslednja poseta" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "Vreme kada je stavka iz istorijata poslednji put posećena" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Veb prikaz" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "Veb prikaz koga iscrtava „Veb inspektor“" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 #, fuzzy msgid "Inspected URI" msgstr "Inspekcija adrese" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 #, fuzzy msgid "The URI that is currently being inspected" msgstr "Adresa koju trenutno obrađuje inspektor" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Omogući učenje Java skripte" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Pravi profil pokrenute Java skripte." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Omogući učenje Java skripte" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Razlog" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "Razlog zbog koga je prikazana navigacija" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "Ciljna adresa koju zahteva navigacija" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Dugme" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "Dugme koje se pritiska" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Stanje izmenjivača" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Oznaka koja određuje da li je uključen taster za izmenu funkcije" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Ime okvira" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "Ciljna adresa koju zahteva navigacija" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Podrazumevano kodiranje" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "Podrazumevano kodiranje za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Skup iskošenih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "Podrazumevani skup iskošenih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Podrazumevani skup fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "Podrazumevani skup fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Skup fantazi fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "Podrazumevani skup fantazi fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Skup ravnomernih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "Podrazumevani skup ravnomerno širokih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Skup bezserifnih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "Podrazumevani skup bezserifnih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Skup serifnih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "Podrazumevani skup serifnih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Podrazumevana veličina fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "Podrazumevana veličina fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Podrazumevana veličina raznomernog fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "Podrazumevana veličina ravnomerno širokih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Najmanja veličina fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "Najmanja veličina fonta za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Najmanja logička veličina fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "Najmanja logička veličina fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Primoraj 96 TPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Primorava rezoluciju od 96 TPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Sam učitaj slike" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Automatski učitava slike." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Sam smanji slike" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Automatsku umanjuje slike tako da se uklopile u stranu." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Iscrtaj pozadinu" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Određuje da li da se prikazuju pozadinske slike." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Omogući skripte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Uključuje jezike za skripte umetnute unutar stranica." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Omogući dodatke" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Uključuje objekte umetnute unutar stranica." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Tekst promenljive veličine" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Određuje da li da oblast sa tekstom bude promenljive veličine." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "Adresa datoteke sa stilom" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "" -"Putanja do datoteke sa sopstvenim stilom koji se primenjuje na svaku stranicu." +"Putanja do datoteke sa sopstvenim stilom koji se primenjuje na svaku " +"stranicu." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Korak uvećanja" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Vrednost za koju se menja prikaz prilikom povećanja ili smanjenja." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Uključi dodatke za razvoj" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Uključuje dodatke koji pomažu prilikom razvoja ovog programa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Privatni režim" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Uključuje režim razgledanja uz čuvanje vaše privatnosti" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Proveri pisanje _dok kucam" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Privatni režim" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Omogući skripte" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Omogući skripte" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Određuje da li da se prikazuju pozadinske slike." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Ispisuje naslov dokumenta iz @veb_pregleda" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Ispisuje trenutnu adresu sadržaja prikazanog u @veb_pregledu" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Umnoži spisak ciljeva" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "Ciljeva za kopiranje među spisak isečaka koje podržava veb pregled" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Ubaci spisak ciljeva" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "Spisak ciljeva za ubacivanje iz ostave koje podržava veb pregled" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Podešavanja" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Povezano sa WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Veb inspektor" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "Povezano sa WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Izmenjivo" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Omogućava korisniku da uređuje prikazani sadržaj" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Providnost" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Omogućava providnu pozadinu za sadržaj" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Uvećanje" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Nivo uvećanja prikazanog sadržaja" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Uvećavaj sve" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Određuje da li da se uvećava celokupan sadržaj" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Kodiranje" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "Podrazumevano kodiranje veb stranice" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Proizvoljno kodiranje" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "Proizvoljno kodiranje veb stranice" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Pošalji" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Poništi" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "_Pretraživ indeks" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Izaberite datoteku" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(ništa)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Otvori vezu u _novom prozoru" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Preuzmi ciljnu datoteku" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Umnoži _adresu veze" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "_Otvori sliku u novom prozoru" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "_Sačuvaj sliku kao" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "_Umnoži sliku" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "O_tvori okvir u novom prozoru" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "_Osveži" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Nema poklapanja" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Zanemari ovu reč" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Upamti ovu reč" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Potraži na mreži" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "_Potraži u direktorijumu" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Otvori vezu" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Zanemari _pravopis" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Provera pi_sanja i pravopisa" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Prikaži proveru pisanja i pravopisa" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "S_akrij proveru pisanja i pravopisa" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "Pro_veri dokument" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Proveri pisanje _dok kucam" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "P_roveri pravopis i pisanje" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Font" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Okvir" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 #, fuzzy msgid "Inspect _Element" msgstr "Inspekcija _elementa" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Nema skorašnjih pretraga" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Skorašnje pretrage" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Očisti skorašnje pretrage" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "termin" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definicija" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "pritisni" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "izaberi" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "pokreni" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "isključi" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "uključi" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "idi" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " datoteke" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Nepoznato" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Stanje" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "definicija" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/sv.po b/WebKit/gtk/po/sv.po index 0454658..c9e202b 100644 --- a/WebKit/gtk/po/sv.po +++ b/WebKit/gtk/po/sv.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: webkitgtk+\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-04-30 12:26+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -14,12 +14,12 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Skicka upp fil" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Inmatnings_metoder" @@ -64,67 +64,76 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Nätverksbegäran" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Nätverksbegäran" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +msgid "The network response for the URI that should be downloaded" +msgstr "" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Föreslaget filnamn" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Förlopp" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Fastställer aktuellt förlopp för hämtningen" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Fastställer aktuell status för hämtningen" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Aktuell storlek" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Total storlek" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "Totala storleken för filen" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Användaren avbröt hämtningen" @@ -141,553 +150,932 @@ msgstr "Användarnamn:" msgid "Password:" msgstr "Lösenord:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Kom ihåg lösenordet" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Namn" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Namnet på ramen" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Titel" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Dokumenttiteln för ramen" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Fastställer aktuellt förlopp för hämtningen" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Fastställer aktuellt förlopp för hämtningen" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Alternativ titel" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Senast besökt" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Aktivera privat surfning" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Anledning" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Knapp" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Namnet på ramen" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Standardteckenkodning" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "Standardkodningen som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Typsnittsfamiljen Cursive" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "Standardfamiljen för Cursive-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Standardfamilj för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "Standardfamiljen för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Typsnittsfamiljen Fantasy" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "Standardfamiljen för Fantasy-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Typsnittsfamiljen Monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." -msgstr "Standardfamiljen för typsnitt som används för att visa text med fast breddsteg." +msgstr "" +"Standardfamiljen för typsnitt som används för att visa text med fast " +"breddsteg." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Typsnittsfamiljen Sans Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." -msgstr "Standardfamiljen för Sans Serif-typsnitt som används för att visa text." +msgstr "" +"Standardfamiljen för Sans Serif-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Typsnittsfamiljen Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "Standardfamiljen för Serif-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Standardstorlek för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "Standardstorleken för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Standardstorlek för Monospace-typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." -msgstr "Standardstorleken för typsnitt som används för att visa text med fast breddsteg." +msgstr "" +"Standardstorleken för typsnitt som används för att visa text med fast " +"breddsteg." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Minimumstorlek för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "Minimumstorlek för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Logisk minimumstorlek för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "Logisk minimumstorlek för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Tvinga 96 punkter/tum" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Tvinga en upplösning på 96 punkter/tum" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Läs automatiskt in bilder" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Läs in bilder automatiskt." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "Skriv ut bakgrunder" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Huruvida bakgrundsbilder ska skrivas ut." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "Aktivera skript" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "Aktivera inbäddade skriptspråk." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Aktivera insticksmoduler" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Aktivera inbäddade insticksobjekt." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Aktivera privat surfning" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Aktiverar läget för privat surfning" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Kontrollera stavning vid _inmatning" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Aktivera privat surfning" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "Aktivera skript" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "Aktivera skript" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Huruvida bakgrundsbilder ska skrivas ut." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Kopiera mållista" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Inställningar" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Redigeringsbar" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Genomskinlig" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Huruvida innehållet har en genomskinlig bakgrund" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Zoomnivå" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Zoomnivån för innehållet" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Teckenkodning" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Anpassad teckenkodning" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Skicka" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Återställ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "_Sökbart index" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Välj fil" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Ingen)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Öppna länk i nytt _fönster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Hämta länkad fil" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Kopiera länkens ad_ress" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Öppna _bild i nytt fönster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Spa_ra bild som" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Kop_iera bild" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "Öppna _ram i nytt fönster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "_Uppdatera" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Inga gissningar hittades" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Ignorera stavfel" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Lär stavning" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Sök på webben" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "Sl_å upp i ordbok" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Öppna länk" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Ignorera _grammatikfel" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Stavning och _grammatik" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Visa stavning och grammatik" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "_Dölj stavning och grammatik" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "_Kontrollera dokumentet nu" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Kontrollera stavning vid _inmatning" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Kontrollera _grammatik med stavning" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Typsnitt" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Kontur" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Inga tidigare sökningar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Tidigare sökningar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Töm tidigare sökningar" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "term" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definition" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "tryck" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "välj" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "aktivera" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "avmarkera" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "markera" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "hoppa" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " filer" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Okänt" +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Status" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "definition" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/vi.po b/WebKit/gtk/po/vi.po index 27baa21..3a684ae 100644 --- a/WebKit/gtk/po/vi.po +++ b/WebKit/gtk/po/vi.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-06-26 08:31+1000\n" "Last-Translator: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" @@ -14,12 +14,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "Tải tập tin lên" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Kiểu _nhập" @@ -64,67 +64,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ _Phi kết nối không kích thước" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Chèn kí tự Unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "Yêu cầu mạng" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "Yêu cầu mạng cho URI cần tải về" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "Yêu cầu mạng" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "Yêu cầu mạng cho URI cần tải về" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "URI đích" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "URI đích nơi lưu tập tin" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "Tên tập tin đề nghị" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "Tên tập tin đề nghị mặc định khi lưu" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "Tiến trình" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "Xác định tiến độ tải về hiện thời" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Tình trạng" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "Xác định tình trạng tải về hiện thời" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "Kích thước hiện thời" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "Lượng dữ liệu đã tải về" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "Kích thước tổng cộng" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "Kích thước của toàn bộ tập tin" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "Người dùng đã huỷ tải về" @@ -141,552 +151,925 @@ msgstr "Tên người dùng:" msgid "Password:" msgstr "Mật khẩu:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "Nhớ mật khẩu" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "Tên" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "Tên khung" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "Tựa đề" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "Tựa đề tài liệu của khung" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "URI hiện thời của nội dung khung đang hiển thị" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Xác định tiến độ tải về hiện thời" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Xác định tiến độ tải về hiện thời" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "Tựa đề mục lược sử" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Tựa đề thay thế" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "Tựa đề thay thế cho mục lược sử" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "URI cho mục lược sử" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "URI gốc" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "URI gốc của mục lược sử" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Lần xem cuối" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "Thời điểm xem mục lược sử lần cuối" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Khung xem Web" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "Khung xem Web dùng để hiển thị bản thân Thanh tra Web" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "URI được điều tra" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "URI đang được điều tra" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "Bật kiểm định JavaScript" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "Kiểm định JavaScript được thực thi." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "Bật kiểm định JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Nguyên nhân" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Nút" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "Nút được dùng để nhấn" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Trạng thái phím bổ trợ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Bitmask đại diện trạng thái phím bổ trợ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "Tên khung" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "Bảng mã mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "Bảng mã mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "Họ phông Cursive" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "Họ phông Cursive mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "Họ phông mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "Họ phông mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "Họ phông Fantasy" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "Họ phông Fantasy mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "Họ phông Monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "Họ phông Monospace mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Họ phông Sans Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "Họ phông Sans Serif mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Họ phông Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "Họ phông Serif mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "Cỡ phông mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "Cỡ phông mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "Cỡ phông Monospace mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "Cỡ phông Monospace mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "Cỡ phông tối thiểu" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "Cỡ phông tối thiểu để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "Cỡ phông logic tối thiểu" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "Cỡ phông logic tối thiểu dùng để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "Ép 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "Ép độ phân giảii 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "Tự động nạp ảnh" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "Nạp ảnh tự động." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "Tự động co ảnh." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "Tự động co ảnh độc lập cho khít." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "In ảnh nền" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "Có in ảnh nền hay không." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "Bật phần mở rộng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "Bật phần mở rộng," -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "Ô văn bản có thể thay đổi kích thước." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "Ô văn bản có thể thay đổi kích thước hay không." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "URI stylesheet người dùng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "URI của stylesheet áp dụng cho mọi trang." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "Giá trị bước thu/phóng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Giá trị thay đổi mức thu phóng mỗi lần." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "Bật Developer Extras" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "Bật các phần mở rộng đặc biệt, hữu dụng cho người phát triển" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "Bật duyệt riêng tư" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "Bật chế độ duyệt riêng tư" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "Kiểm tra khi đang _gõ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "Bật duyệt riêng tư" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +msgid "Enable XSS Auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +msgid "Enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "Có in ảnh nền hay không." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "Trả về tiêu đề tài liệu của @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Trả về URI hiện thời của tài liệu được @web_view hiển thị" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "Danh sách đích chép" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "Danh sách đích mà khung xem web này hỗ trợ khi chép vào clipboard." -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "Danh sách đích dán" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "Danh sách đích mà khung xem web này hỗ trợ khi dán clipboard." -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "Thiết lập" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "Một thể hiện WebKitWebSettings liên kết" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Thanh tra Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "Một thể hiện WebKitWebInspector liên kết" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "Có thể thay đổi" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "Nội dung có thể bị người dùng thay đổi hay không" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "Trong suốt" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "Nội dung có ảnh nền trong suốt không." -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "Mức phóng" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "Mức phóng to/thu nhỏ nội dung" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "Phóng nội dung đầy đủ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "Toàn bộ nội dung có bị co lại không." -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "Bảng mã" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "Bảng mã mặc định cho khung xem Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "Bảng mã tự chọn" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "Bảng mã tự chọn cho khung xem Web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Gửi" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Phục hồi" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "Chỉ mục _tìm được" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Chọn tập tin" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Không)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "_Mở liên kết trong cửa sổ mới" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "_Tải tập tin được liên kết" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Chép vị trí _liên kết" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Mở ả_nh trong cửa sổ mới" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Lưu ảnh _là" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Chép ả_nh" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "Mở _khung trong cửa sổ mới" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "Nạp _lại" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Không đoán ra" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "_Bỏ qua lỗi chính tả" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Học lỗi chính tả" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "_Tìm trên Web" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "_Tra từ điển" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "_Mở liên kết" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "Bỏ qua _ngữ pháp" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Chính tả và _Ngữ pháp" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "_Hiện lỗi chính tả và ngữ pháp" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "Ẩ_n Chính tả và Ngữ pháp" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "_Kiểm tra tài liệu ngay" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "Kiểm tra khi đang _gõ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "Kiểm tra lỗi _ngữ pháp kèm chính tả" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Phông" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Nét ngoài" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "Thanh tra _yếu tố" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Không có tìm kiếm gần đây" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Tìm kiếm gần đây" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "_Xoá tìm kiếm gần đây" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "thuật ngữ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "định nghĩa" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "nhấn" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "chọn" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "kích hoạt" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "bỏ chọn" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "chọn" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "nhảy" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " tập tin" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "Không biết" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "Tình trạng" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "định nghĩa" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/webkit.pot b/WebKit/gtk/po/webkit.pot index 90cb868..5adf34f 100644 --- a/WebKit/gtk/po/webkit.pot +++ b/WebKit/gtk/po/webkit.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: webkit 1.1.4\n" +"Project-Id-Version: webkit 1.1.22\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:01-0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -15,12 +15,12 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "" @@ -65,67 +65,75 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +msgid "Network Response" +msgstr "" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +msgid "The network response for the URI that should be downloaded" +msgstr "" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "" @@ -142,552 +150,915 @@ msgstr "" msgid "Password:" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +msgid "_Remember password" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +msgid "Target frame" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +msgid "Enables spell checking while typing" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +msgid "Enable Caret Browsing" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +msgid "Enable XSS Auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +msgid "Enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +msgid "Whether the page cache should be used" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +msgid "status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +msgid "indefinite time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/po/zh_CN.po b/WebKit/gtk/po/zh_CN.po index 5046880..19e4f44 100644 --- a/WebKit/gtk/po/zh_CN.po +++ b/WebKit/gtk/po/zh_CN.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-16 15:00-0200\n" "PO-Revision-Date: 2009-07-14 18:11+0800\n" "Last-Translator: Aron Xu <aronmalache@163.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" @@ -16,12 +16,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "上传文件" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "输入方式(_M)" @@ -66,67 +66,77 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "插入 Unicode 控制字符(_I)" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:262 msgid "Network Request" msgstr "网络请求" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:263 msgid "The network request for the URI that should be downloaded" msgstr "网络请求该 URI 应当被下载" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#, fuzzy +msgid "Network Response" +msgstr "网络请求" + +#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "网络请求该 URI 应当被下载" + +#: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" msgstr "目的 URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:293 msgid "The destination URI where to save the file" msgstr "保存文件的目的 URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:307 msgid "Suggested Filename" msgstr "建议文件名" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:308 msgid "The filename suggested as default when saving" msgstr "保存时默认建议使用的文件名" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:325 msgid "Progress" msgstr "进度" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:326 msgid "Determines the current progress of the download" msgstr "显示当前下载进度" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "状态" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:340 msgid "Determines the current status of the download" msgstr "显示当前下载状态" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" msgstr "当前尺寸" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:356 msgid "The length of the data already downloaded" msgstr "当前已下载的数据大小" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:370 msgid "Total Size" msgstr "总尺寸" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:371 msgid "The total size of the file" msgstr "文件总尺寸" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:522 msgid "User cancelled the download" msgstr "用户取消了下载" @@ -143,552 +153,928 @@ msgstr "用户名:" msgid "Password:" msgstr "密码:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#, fuzzy +msgid "_Remember password" msgstr "记住密码" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "名称" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "框架名称" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2315 msgid "Title" msgstr "标题" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "标题名称" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2329 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "框架中当前显示内容的 URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "显示当前下载进度" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "显示当前下载进度" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "历史条目的标题" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "可选标题" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "历史条目的可选标题" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "历史条目的 URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "原始 URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "历史条目的原始 URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "最近访问时间" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "最近访问历史条目的时间" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "Web View" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "Web View 渲染 Web Inspector 本身" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "已检查的 URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "当前已经被检查的 URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "启用 JavaScript 摘要" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "记录已执行的 JavaScript 的摘要信息。" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "启用 JavaScript 摘要" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "原因" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "导航产生的原因" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "此 URI 是被作为导航目标而请求的" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "按钮" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "用以点击的按钮" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "修饰键信息" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "一个代表当前修饰键状态的位掩码" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "框架名称" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "此 URI 是被作为导航目标而请求的" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" msgstr "默认编码" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 msgid "The default encoding used to display text." msgstr "用以显示文本的默认编码。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 msgid "Cursive Font Family" msgstr "草书字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 msgid "The default Cursive font family used to display text." msgstr "用以显示文本的默认草书字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 msgid "Default Font Family" msgstr "默认字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 msgid "The default font family used to display text." msgstr "用以显示文本的默认字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 msgid "Fantasy Font Family" msgstr "幻想字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 msgid "The default Fantasy font family used to display text." msgstr "用以显示文本的默认幻想字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 msgid "Monospace Font Family" msgstr "等宽字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 msgid "The default font family used to display monospace text." msgstr "用以显示文本的默认等宽字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 msgid "Sans Serif Font Family" msgstr "Sans Serif 字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 msgid "The default Sans Serif font family used to display text." msgstr "用以显示文本的默认 Sans Serif 字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 msgid "Serif Font Family" msgstr "Serif 字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 msgid "The default Serif font family used to display text." msgstr "用以显示文本的默认 Serif 字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 msgid "Default Font Size" msgstr "默认字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 msgid "The default font size used to display text." msgstr "用以显示文本的默认字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 msgid "Default Monospace Font Size" msgstr "默认等宽字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 msgid "The default font size used to display monospace text." msgstr "用以显示等宽文本的默认字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 msgid "Minimum Font Size" msgstr "最小字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 msgid "The minimum font size used to display text." msgstr "用以显示文本的最小字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 msgid "Minimum Logical Font Size" msgstr "最小逻辑字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 msgid "The minimum logical font size used to display text." msgstr "用以显示文本的最小逻辑字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" msgstr "强制为 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 msgid "Enforce a resolution of 96 DPI" msgstr "强制 96 DPI 分辨率" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 msgid "Auto Load Images" msgstr "自动载入图像" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 msgid "Load images automatically." msgstr "自动载入图像。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 msgid "Auto Shrink Images" msgstr "自动缩小图像" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 msgid "Automatically shrink standalone images to fit." msgstr "自动缩小单个图像以适应需求。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 msgid "Print Backgrounds" msgstr "打印背景" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 msgid "Whether background images should be printed." msgstr "是否打印背景。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 msgid "Enable Scripts" msgstr "启用脚本" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 msgid "Enable embedded scripting languages." msgstr "启用嵌入式脚步语言" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 msgid "Enable Plugins" msgstr "启用插件" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 msgid "Enable embedded plugin objects." msgstr "启用嵌入式插件对象。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 msgid "Resizable Text Areas" msgstr "大小可变文本域" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 msgid "Whether text areas are resizable." msgstr "文本域大小是否是否可变。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 msgid "User Stylesheet URI" msgstr "用户样式表 URI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 msgid "The URI of a stylesheet that is applied to every page." msgstr "应用于每个页面的样式表的 URI。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 msgid "Zoom Stepping Value" msgstr "缩放步值" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "在放大或缩小中每次缩放的步值。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 msgid "Enable Developer Extras" msgstr "启用开发者附加" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 msgid "Enables special extensions that help developers" msgstr "启用帮助开发者的特殊扩展" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 msgid "Enable Private Browsing" msgstr "启用隐私浏览" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 msgid "Enables private browsing mode" msgstr "启用隐私浏览模式" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "输入时检查拼写(_T)" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "启用隐私浏览" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "启用脚本" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#, fuzzy +msgid "Enable DOM paste" +msgstr "启用脚本" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "是否打印背景。" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" msgstr "返回 @web_view 的文档标题" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2330 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "返回当前由 @web_view 显示的内容的 URI" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" msgstr "复制目标列表" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "目标 Web View 列表支持剪贴簿复制" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" msgstr "粘贴目标列表" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "目标 Web View 列表支持剪贴簿粘贴" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" msgstr "设置" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2365 msgid "An associated WebKitWebSettings instance" msgstr "一个关联的 WebKitWebSettings 样例" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2378 msgid "Web Inspector" msgstr "Web Inspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2379 msgid "The associated WebKitWebInspector instance" msgstr "一个关联的 WebKitWebInspector 样例" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2399 msgid "Editable" msgstr "可编辑" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2400 msgid "Whether content can be modified by the user" msgstr "用户是否可编辑内容" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2406 msgid "Transparent" msgstr "透明" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2407 msgid "Whether content has a transparent background" msgstr "内容是否包含透明背景" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2420 msgid "Zoom level" msgstr "缩放级别" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2421 msgid "The level of zoom of the content" msgstr "内容缩放级别" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2436 msgid "Full content zoom" msgstr "完整内容缩放" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2437 msgid "Whether the full content is scaled when zooming" msgstr "是否将所有内容完整缩放" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2450 msgid "Encoding" msgstr "编码" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2451 msgid "The default encoding of the web view" msgstr "Web View 的默认编码" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2464 msgid "Custom Encoding" msgstr "自定义编码" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2465 msgid "The custom encoding of the web view" msgstr "Web View的自定义编码" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "提交" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "重置" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" msgstr "可搜索索引(_S)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "选择文件" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(无)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "在新窗口打开链接(_W)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "下载目标文件(_D)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "复制链接地址(_A)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "在新窗口打开图像(_I)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "保存图像(_V)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "复制图像(_Y)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "在新窗口打开框架(_F)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "重载(_R)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "没有找到拼写建议" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "忽略拼写(_I)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "记录特例(_L)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "搜索互联网(_S)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "查询词典(_L)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "打开链接(_O)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "忽略语法(_G)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "拼写和语法(_G)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "显示拼写和语法(_S)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "隐藏拼写和语法(_H)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "立即检查文档(_C)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "输入时检查拼写(_T)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "检查拼写时检查语法(_G)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "字体(_F)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "概要(_O)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "检查元素(_E)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "无最近搜索" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "最近搜索" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "清除最近搜索记录(_C)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "术语" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "定义" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "按" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "选择" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "激活" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "反选" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "勾选" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "跳转" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr "文件" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "未知" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "状态" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "定义" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" diff --git a/WebKit/gtk/tests/testdownload.c b/WebKit/gtk/tests/testdownload.c index 05c3a8d..c7985d5 100644 --- a/WebKit/gtk/tests/testdownload.c +++ b/WebKit/gtk/tests/testdownload.c @@ -177,6 +177,52 @@ test_webkit_download_asynch(void) test_webkit_download_perform(TRUE); } +static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebKitWebFrame* frame, + WebKitNetworkRequest* request, const char* mime_type, + WebKitWebPolicyDecision* decision, gpointer data) +{ + webkit_web_policy_decision_download(decision); + return TRUE; +} + +static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) +{ + if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED || + webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED) + g_main_loop_quit(loop); +} + +static void +test_webkit_download_data(void) +{ + gboolean beenThere = FALSE; + WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + + g_signal_connect(webView, "download-requested", + G_CALLBACK(download_requested_cb), + &beenThere); + + g_signal_connect(webView, "notify::load-status", + G_CALLBACK(idle_quit_loop_cb), + NULL); + + g_signal_connect(webView, "mime-type-policy-decision-requested", + G_CALLBACK(mime_type_policy_decision_requested_cb), + NULL); + + loop = g_main_loop_new(NULL, TRUE); + + /* We're testing for a crash, so just not crashing is a pass */ + webkit_web_view_load_uri(webView, "data:application/octect-stream,"); + g_main_loop_run(loop); + + g_assert_cmpint(beenThere, ==, TRUE); + + g_main_loop_unref(loop); + g_object_unref(webView); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -186,6 +232,7 @@ int main(int argc, char** argv) g_test_add_func("/webkit/download/create", test_webkit_download_create); g_test_add_func("/webkit/download/synch", test_webkit_download_synch); g_test_add_func("/webkit/download/asynch", test_webkit_download_asynch); + g_test_add_func("/webkit/download/data", test_webkit_download_data); return g_test_run (); } diff --git a/WebKit/gtk/tests/testmimehandling.c b/WebKit/gtk/tests/testmimehandling.c index bfe3148..e6e8d45 100644 --- a/WebKit/gtk/tests/testmimehandling.c +++ b/WebKit/gtk/tests/testmimehandling.c @@ -183,11 +183,12 @@ int main(int argc, char** argv) /* Hopefully make test independent of the path it's called from. */ while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) { - char path_name[PATH_MAX]; + gchar *path_name; g_chdir(".."); - g_assert(!g_str_equal(getcwd(path_name, PATH_MAX), "/")); + g_assert(!g_str_equal((path_name = g_get_current_dir()), "/")); + g_free(path_name); } g_chdir("WebKit/gtk/tests/resources/"); diff --git a/WebKit/gtk/tests/testwebview.c b/WebKit/gtk/tests/testwebview.c index c028a36..34b6867 100644 --- a/WebKit/gtk/tests/testwebview.c +++ b/WebKit/gtk/tests/testwebview.c @@ -234,11 +234,12 @@ int main(int argc, char** argv) /* Hopefully make test independent of the path it's called from. */ while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) { - char path_name[PATH_MAX]; + gchar *path_name; g_chdir(".."); - g_assert(!g_str_equal(getcwd(path_name, PATH_MAX), "/")); + g_assert(!g_str_equal((path_name = g_get_current_dir()), "/")); + g_free(path_name); } g_chdir("WebKit/gtk/tests/resources/"); diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp index 1912a12..8f3214e 100644 --- a/WebKit/gtk/webkit/webkitdownload.cpp +++ b/WebKit/gtk/webkit/webkitdownload.cpp @@ -70,7 +70,7 @@ class DownloadClient : public Noncopyable, public ResourceHandleClient { struct _WebKitDownloadPrivate { gchar* destinationURI; gchar* suggestedFilename; - guint currentSize; + guint64 currentSize; GTimer* timer; WebKitDownloadStatus status; GFileOutputStream* outputStream; @@ -228,10 +228,14 @@ static void webkit_download_class_init(WebKitDownloadClass* downloadClass) /** * WebKitDownload::error: * @download: the object on which the signal is emitted - * @current_bytes: the current count of bytes downloaded - * @total_bytes: the total bytes count in the downloaded file, aka file size. + * @error_code: the corresponding error code + * @error_detail: detailed error code for the error, see + * #WebKitDownloadError + * @reason: a string describing the error * - * Indicates an error in the download. + * Emitted when @download is interrupted either by user action or by + * network errors, @error_detail will take any value of + * #WebKitDownloadError. * * Since: 1.1.2 */ @@ -409,7 +413,8 @@ WebKitDownload* webkit_download_new_with_handle(WebKitNetworkRequest* request, W g_return_val_if_fail(request, NULL); ResourceHandleInternal* d = handle->getInternal(); - soup_session_pause_message(webkit_get_default_session(), d->m_msg); + if (d->m_msg) + soup_session_pause_message(webkit_get_default_session(), d->m_msg); WebKitDownload* download = WEBKIT_DOWNLOAD(g_object_new(WEBKIT_TYPE_DOWNLOAD, "network-request", request, NULL)); WebKitDownloadPrivate* priv = download->priv; @@ -480,7 +485,8 @@ void webkit_download_start(WebKitDownload* download) priv->resourceHandle->setClient(priv->downloadClient); ResourceHandleInternal* d = priv->resourceHandle->getInternal(); - soup_session_unpause_message(webkit_get_default_session(), d->m_msg); + if (d->m_msg) + soup_session_unpause_message(webkit_get_default_session(), d->m_msg); } priv->timer = g_timer_new(); @@ -755,7 +761,7 @@ guint64 webkit_download_get_total_size(WebKitDownload* download) if (!message) return 0; - return MAX(priv->currentSize, soup_message_headers_get_content_length(message->response_headers)); + return MAX(priv->currentSize, static_cast<guint64>(soup_message_headers_get_content_length(message->response_headers))); } /** diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp index 1e2f8cc..4ff4a8e 100644 --- a/WebKit/gtk/webkit/webkitwebsettings.cpp +++ b/WebKit/gtk/webkit/webkitwebsettings.cpp @@ -98,11 +98,14 @@ struct _WebKitWebSettingsPrivate { gboolean enable_offline_web_application_cache; WebKitEditingBehavior editing_behavior; gboolean enable_universal_access_from_file_uris; + gboolean enable_file_access_from_file_uris; gboolean enable_dom_paste; gboolean tab_key_cycles_through_elements; gboolean enable_default_context_menu; gboolean enable_site_specific_quirks; gboolean enable_page_cache; + gboolean auto_resize_window; + gboolean enable_java_applet; }; #define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate)) @@ -143,11 +146,14 @@ enum { PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE, PROP_EDITING_BEHAVIOR, PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS, + PROP_ENABLE_FILE_ACCESS_FROM_FILE_URIS, PROP_ENABLE_DOM_PASTE, PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS, PROP_ENABLE_DEFAULT_CONTEXT_MENU, PROP_ENABLE_SITE_SPECIFIC_QUIRKS, - PROP_ENABLE_PAGE_CACHE + PROP_ENABLE_PAGE_CACHE, + PROP_AUTO_RESIZE_WINDOW, + PROP_ENABLE_JAVA_APPLET }; // Create a default user agent string @@ -759,6 +765,60 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass) FALSE, flags)); + /** + * WebKitWebSettings:auto-resize-window: + * + * Web pages can request to modify the size and position of the + * window containing the #WebKitWebView through various DOM methods + * (resizeTo, moveTo, resizeBy, moveBy). By default WebKit will not + * honor this requests, but you can set this property to %TRUE if + * you'd like it to do so. If you wish to handle this manually, you + * can connect to the notify signal for the + * #WebKitWebWindowFeatures of your #WebKitWebView. + * + * Since: 1.1.22 + */ + g_object_class_install_property(gobject_class, + PROP_AUTO_RESIZE_WINDOW, + g_param_spec_boolean("auto-resize-window", + _("Auto Resize Window"), + _("Automatically resize the toplevel window when a page requests it"), + FALSE, + flags)); + + /** + * WebKitWebSettings:enable-file-access-from-file-uris: + * + * Boolean property to control file access for file:// URIs. If this + * option is enabled every file:// will have its own security unique domain. + * + * Since: 1.1.22 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_FILE_ACCESS_FROM_FILE_URIS, + g_param_spec_boolean("enable-file-access-from-file-uris", + "Enable file access from file URIs", + "Controls file access for file:// URIs.", + FALSE, + flags)); + + /** + * WebKitWebSettings:enable-java-applet: + * + * Enable or disable support for the Java <applet> tag. Keep in + * mind that Java content can be still shown in the page through + * <object> or <embed>, which are the preferred tags for this task. + * + * Since: 1.1.22 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_JAVA_APPLET, + g_param_spec_boolean("enable-java-applet", + _("Enable Java Applet"), + _("Whether Java Applet support through <applet> should be enabled"), + TRUE, + flags)); + g_type_class_add_private(klass, sizeof(WebKitWebSettingsPrivate)); } @@ -952,6 +1012,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con case PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS: priv->enable_universal_access_from_file_uris = g_value_get_boolean(value); break; + case PROP_ENABLE_FILE_ACCESS_FROM_FILE_URIS: + priv->enable_file_access_from_file_uris = g_value_get_boolean(value); + break; case PROP_ENABLE_DOM_PASTE: priv->enable_dom_paste = g_value_get_boolean(value); break; @@ -967,6 +1030,12 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con case PROP_ENABLE_PAGE_CACHE: priv->enable_page_cache = g_value_get_boolean(value); break; + case PROP_AUTO_RESIZE_WINDOW: + priv->auto_resize_window = g_value_get_boolean(value); + break; + case PROP_ENABLE_JAVA_APPLET: + priv->enable_java_applet = g_value_get_boolean(value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -1069,15 +1138,18 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa case PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY: g_value_set_boolean(value, priv->javascript_can_open_windows_automatically); break; - case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE: + case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE: g_value_set_boolean(value, priv->enable_offline_web_application_cache); break; case PROP_EDITING_BEHAVIOR: g_value_set_enum(value, priv->editing_behavior); break; - case PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS: + case PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS: g_value_set_boolean(value, priv->enable_universal_access_from_file_uris); break; + case PROP_ENABLE_FILE_ACCESS_FROM_FILE_URIS: + g_value_set_boolean(value, priv->enable_file_access_from_file_uris); + break; case PROP_ENABLE_DOM_PASTE: g_value_set_boolean(value, priv->enable_dom_paste); break; @@ -1093,6 +1165,12 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa case PROP_ENABLE_PAGE_CACHE: g_value_set_boolean(value, priv->enable_page_cache); break; + case PROP_AUTO_RESIZE_WINDOW: + g_value_set_boolean(value, priv->auto_resize_window); + break; + case PROP_ENABLE_JAVA_APPLET: + g_value_set_boolean(value, priv->enable_java_applet); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -1157,11 +1235,14 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings) "enable-offline-web-application-cache", priv->enable_offline_web_application_cache, "editing-behavior", priv->editing_behavior, "enable-universal-access-from-file-uris", priv->enable_universal_access_from_file_uris, + "enable-file-access-from-file-uris", priv->enable_file_access_from_file_uris, "enable-dom-paste", priv->enable_dom_paste, "tab-key-cycles-through-elements", priv->tab_key_cycles_through_elements, "enable-default-context-menu", priv->enable_default_context_menu, "enable-site-specific-quirks", priv->enable_site_specific_quirks, "enable-page-cache", priv->enable_page_cache, + "auto-resize-window", priv->auto_resize_window, + "enable-java-applet", priv->enable_java_applet, NULL)); return copy; diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index 8c5b802..d6a8b83 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -2550,8 +2550,9 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas, enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage, enableXSSAuditor, javascriptCanOpenWindows, enableOfflineWebAppCache, - enableUniversalAccessFromFileURI, enableDOMPaste, tabKeyCyclesThroughElements, - enableSiteSpecificQuirks, usePageCache; + enableUniversalAccessFromFileURI, enableFileAccessFromFileURI, + enableDOMPaste, tabKeyCyclesThroughElements, + enableSiteSpecificQuirks, usePageCache, enableJavaApplet; WebKitEditingBehavior editingBehavior; @@ -2580,10 +2581,12 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) "enable-offline-web-application-cache", &enableOfflineWebAppCache, "editing-behavior", &editingBehavior, "enable-universal-access-from-file-uris", &enableUniversalAccessFromFileURI, + "enable-file-access-from-file-uris", &enableFileAccessFromFileURI, "enable-dom-paste", &enableDOMPaste, "tab-key-cycles-through-elements", &tabKeyCyclesThroughElements, "enable-site-specific-quirks", &enableSiteSpecificQuirks, "enable-page-cache", &usePageCache, + "enable-java-applet", &enableJavaApplet, NULL); settings->setDefaultTextEncodingName(defaultEncoding); @@ -2610,9 +2613,11 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache); settings->setEditingBehavior(core(editingBehavior)); settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI); + settings->setAllowFileAccessFromFileURLs(enableFileAccessFromFileURI); settings->setDOMPasteAllowed(enableDOMPaste); settings->setNeedsSiteSpecificQuirks(enableSiteSpecificQuirks); settings->setUsesPageCache(usePageCache); + settings->setJavaEnabled(enableJavaApplet); Page* page = core(webView); if (page) @@ -2703,6 +2708,8 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar settings->setEditingBehavior(core(static_cast<WebKitEditingBehavior>(g_value_get_enum(&value)))); else if (name == g_intern_string("enable-universal-access-from-file-uris")) settings->setAllowUniversalAccessFromFileURLs(g_value_get_boolean(&value)); + else if (name == g_intern_string("enable-file-access-from-file-uris")) + settings->setAllowFileAccessFromFileURLs(g_value_get_boolean(&value)); else if (name == g_intern_string("enable-dom-paste")) settings->setDOMPasteAllowed(g_value_get_boolean(&value)); else if (name == g_intern_string("tab-key-cycles-through-elements")) { @@ -2713,6 +2720,8 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar settings->setNeedsSiteSpecificQuirks(g_value_get_boolean(&value)); else if (name == g_intern_string("enable-page-cache")) settings->setUsesPageCache(g_value_get_boolean(&value)); + else if (name == g_intern_string("enable-java-applet")) + settings->setJavaEnabled(g_value_get_boolean(&value)); else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name)) g_warning("Unexpected setting '%s'", name); g_value_unset(&value); diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog index 2aa4ad7..93833fc 100644 --- a/WebKit/haiku/ChangeLog +++ b/WebKit/haiku/ChangeLog @@ -1,3 +1,30 @@ +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * WebCoreSupport/FrameLoaderClientHaiku.cpp: + (WebCore::FrameLoaderClientHaiku::didTransferChildFrameToNewDocument): + Added empty implementation of a new virtual method. + + * WebCoreSupport/FrameLoaderClientHaiku.h: + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientHaiku::iconForFiles): + * WebCoreSupport/ChromeClientHaiku.h: + 2009-12-06 Maxime Simon <simon.maxime@gmail.com> Reviewed by Adam Barth. diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp index 24f0b52..a7f1145 100644 --- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp @@ -346,6 +346,11 @@ void ChromeClientHaiku::runOpenPanel(Frame*, PassRefPtr<FileChooser>) notImplemented(); } +void ChromeClientHaiku::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +{ + notImplemented(); +} + bool ChromeClientHaiku::setCursor(PlatformCursorHandle) { notImplemented(); diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h index ecd66de..3b0841b 100644 --- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h +++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h @@ -134,6 +134,7 @@ namespace WebCore { void requestGeolocationPermissionForFrame(Frame*, Geolocation*); void runOpenPanel(Frame*, PassRefPtr<FileChooser>); + void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); bool setCursor(PlatformCursorHandle); diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp index 3a84c4f..77c7cfc 100644 --- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp @@ -745,6 +745,10 @@ PassRefPtr<Frame> FrameLoaderClientHaiku::createFrame(const KURL& url, const Str return 0; } +void FrameLoaderClientHaiku::didTransferChildFrameToNewDocument() +{ +} + ObjectContentType FrameLoaderClientHaiku::objectContentType(const KURL& url, const String& mimeType) { notImplemented(); diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h index 2ffde8f..dadda19 100644 --- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h +++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h @@ -220,6 +220,7 @@ namespace WebCore { virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement*, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually); diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index b545a40..e1d0cc3 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,297 @@ +2010-02-19 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7535894> Page contents missing from snapshot on Newsweek.com article + + Followup to avoid capturing compositing layers twice in snapshots. Add private + methods to WebView to specify whether drawing the WebView into an image will + include flattened compositing layers (the default behavior) or not. + + * WebView/WebFrame.mm: + (-[WebFrame _drawRect:contentsOnly:]): Consult the WebView flag to see if we + want flattening. + + * WebView/WebViewPrivate.h: New methods. + * WebView/WebView.mm: Ditto. + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + (-[WebView _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:]): + (-[WebView _includesFlattenedCompositingLayersWhenDrawingToBitmap]): + + * WebView/WebViewData.h: New member variable. + +2010-02-19 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=35165 + plugins/set-status.html fails on Windows bot + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::status): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView status:]): + Match Windows port behavior (and also Firefox one, in a way) - pass null status messages as + empty ones to chrome. + +2010-02-18 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7535894> Page contents missing from snapshot on Newsweek.com article + + Add logic to determine when painting via the software rendering path will give an equivalent + result to the accelerated compositing presentation. This tests for the presence of 3D transforms. + + Also have -[WebFrame _drawRect:contentsOnly:] set the PaintBehaviorFlattenCompositingLayers + paint behavior when painting into a bitmap context, so that snapshots contain composited layers. + + * WebView/WebFrame.mm: + (-[WebFrame _drawRect:contentsOnly:]): Set the PaintBehaviorFlattenCompositingLayers flag + when painting into a bitmap context. + * WebView/WebView.mm: + (-[WebView _isSoftwareRenderable]): Returns YES if all frames can be software-rendered. + * WebView/WebViewPrivate.h: New _isSoftwareRenderable method. + +2010-02-18 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=35134 + <rdar://problem/7246280> Crash when a plugin calls NPN_SetStatus(0) + + Test: plugins/set-status.html + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::status): + (WebKit::NetscapePluginInstanceProxy::loadURL): + Added null checks for CFStringCreateWithCString arguments. + +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + Added empty implementation of a new virtual method. + + (WebFrameLoaderClient::didTransferChildFrameToNewDocument): + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::iconForFiles): + +2010-02-17 Timothy Hatcher <timothy@apple.com> + + Add a way for WebView and its dependancies to be selectively included + in WebKitStatistics leak tracking. By default WebView is not included and + you need to subclass WebView and implement +isIncludedInWebKitStatistics + to be included. + + rdar://problem/7567677&7572900 + https://webkit.org/b/35045 + + Reviewed by Adam Roben. + + * WebView/WebDataSource.mm: + (-[WebDataSource _initWithDocumentLoader:]): Increment WebDataSourceCount if the WebFrame is included in statistics. + (-[WebDataSource dealloc]): Only --WebDataSourceCount if _private->includedInWebKitStatistics is YES. + (-[WebDataSource finalize]): Ditto. + * WebView/WebFrame.mm: + (-[WebFrame _isIncludedInWebKitStatistics]): Return _private->includedInWebKitStatistics. + (-[WebFrame _initWithWebFrameView:webView:]): Increment WebFrameCount if the WebView's class is included in statistics. + (-[WebFrame dealloc]): Only --WebFrameCount if _private->includedInWebKitStatistics is YES. + (-[WebFrame finalize]): Ditto. + * WebView/WebFrameInternal.h: + * WebView/WebFrameView.mm: + (-[WebFrameView _setWebFrame:]): Increment WebFrameViewCount if the WebFrame is included in statistics. + (-[WebFrameView initWithFrame:]): Move ++WebFrameViewCount from here since we don't + know what WebFrame we belong to yet. + (-[WebFrameView dealloc]): Only --WebFrameViewCount if _private->includedInWebKitStatistics is YES. + (-[WebFrameView finalize]): Ditto. + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation init]): Move ++WebHTMLRepresentationCount from here since we don't + know what WebFrame we belong to yet. + (-[WebHTMLRepresentation dealloc]): Only --WebHTMLRepresentationCount if _private->includedInWebKitStatistics is YES. + (-[WebHTMLRepresentation finalize]): Ditto. + (-[WebHTMLRepresentation setDataSource:]): Increment WebHTMLRepresentationCount if the WebFrame of the dataSource is + included in statistics. + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + (-[WebView dealloc]): + (+[WebView shouldIncludeInWebKitStatistics]): Return NO, so any WebView wont be included. + Subclasses that care can return YES to be included. + * WebView/WebViewInternal.h: + +2010-02-16 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Generalize delayed plug-in start for background tabs for use for other media + https://bugs.webkit.org/show_bug.cgi?id=34981 + + * WebView/WebHTMLView.mm: + (-[WebHTMLView viewWillMoveToWindow:]): Added comment. + (-[WebHTMLView viewDidMoveToWindow]): Ditto. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + Call setCanStartMedia right away so that if this view is not in a window, it + will not start any media. + (-[WebView viewWillMoveToWindow:]): Call setCanStartMedia(false) when moving + to a window of nil. + (-[WebView viewDidMoveToWindow]): Call setCanStartMedia(true) when moved to + a window that is non-nil. + +2010-02-16 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=34988 + WebHTMLView.mm has two -willRemoveSubview: methods + + * WebView/WebHTMLView.mm: + (-[WebHTMLView willRemoveSubview:]): Consolidate the two copies of this method. + +2010-02-16 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoffrey Garen and Kevin Decker. + + https://bugs.webkit.org/show_bug.cgi?id=34989 + <rdar://problem/7417965> Cursor disappears on scroll bars that are over plugin content + + This fixes event dispatch for both Cocoa and Carbon event models (mouseEntered/mouseExited + in the former case, and adjustCursor in the latter). + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView handleMouseEntered:]): + (-[WebHostedNetscapePluginView handleMouseExited:]): + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView handleMouseEntered:]): + (-[WebBaseNetscapePluginView handleMouseExited:]): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView handleMouseEntered:]): + (-[WebNetscapePluginView handleMouseExited:]): + AppKit cannot reliably dispatch events for overlapping views. We are now asking WebCore to + notify plug-in views of mouse entered/exited as part of DOM event dispatch. + + * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): Besides + mouse moved, dispatch plugin mouse entered/exit events in HTMLPlugInElement default event + handler. Other mouse events are passed down by EventHandler. + +2010-02-15 Alexey Proskuryakov <ap@apple.com> + + More build fixing (for what is actually a 64-bit failure, as 32-bit apparently includes + headers that aren't included in 64-bit). + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::contains): + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get): + Move inline functions to .cpp; also made the class Noncopyable. + +2010-02-15 Alexey Proskuryakov <ap@apple.com> + + Mac release build fix attempt. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::~LocalObjectMap): + Implement destructor in .cpp file, where necessary headers are already included. + +2010-02-12 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/7130641> Browser objects identity is not preserved by Safari + + Out of process part. + + To avoid excessive IPC, plugin process doesn't send each NPObject release/retain call to + Safari. It only sends one when the last one is removed, and it can destroy the proxy + NPObject. + + However, the browser may be sending the same object out to plug-in as a function call + argument at the same time - neither side can know what the other one is up to. The solution + is to make the "destroying object" call return a boolean result, making it possible for + the browser to make plugin host keep the proxy with zero refcount for a little longer. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCForgetBrowserObject): This function (that used to be named ReleaseObject) is only + called when plug-in releases all of its references, so renamed it. Its boolean result + is returned as call success or failure. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap): Made the numeric ID to JSObject map + two-way. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject): This method is tricky + in that it creates objects with refcount of 1, but doesn't increase refcount when returning + found objects. This extra count accounts for the "reference" kept by plugin process. + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::retain): Only retaining for the + duration of calls out to plug-in, which means that refcount is almost always equal to 1. + Note that we can't use "++" here, due to how std::pair works! + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::release): Ditto. + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::clear): Clear all references when + stopping plug-in. + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget): Like release(), but only + functional when recount is 1 (meaning that the object is not being sent out to plug-in at + the moment). + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): Updated for other changes. + (WebKit::NetscapePluginInstanceProxy::cleanup): Ditto. + (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): Ditto. + (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject): Ditto. + (WebKit::NetscapePluginInstanceProxy::forgetBrowserObjectID): Ditto. + (WebKit::NetscapePluginInstanceProxy::evaluate): Ditto. + (WebKit::NetscapePluginInstanceProxy::invoke): Ditto. + (WebKit::NetscapePluginInstanceProxy::invokeDefault): Ditto. + (WebKit::NetscapePluginInstanceProxy::construct): Ditto. + (WebKit::NetscapePluginInstanceProxy::getProperty): Ditto. + (WebKit::NetscapePluginInstanceProxy::setProperty): Ditto. + (WebKit::NetscapePluginInstanceProxy::removeProperty): Ditto. + (WebKit::NetscapePluginInstanceProxy::hasProperty): Ditto. + (WebKit::NetscapePluginInstanceProxy::hasMethod): Ditto. + (WebKit::NetscapePluginInstanceProxy::enumerate): Ditto. + (WebKit::NetscapePluginInstanceProxy::addValueToArray): Ditto. + (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): Ditto. + (WebKit::NetscapePluginInstanceProxy::retainLocalObject): Helper for calling retain when + making calls out to plug-in. No-op for objects that aren't wrapped to be sent (i.e. for + objects wrapping ProxyInstance wrappers for plug-in objects being sent bak). + (WebKit::NetscapePluginInstanceProxy::releaseLocalObject): Ditto. + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invoke): Retain/release arguments during call. + (WebKit::ProxyInstance::setFieldValue): Ditto. + + * Plugins/Hosted/WebKitPluginClient.defs: Renamed PCReleaseObject to PCForgetBrowserObject. + +2010-02-12 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Removed unneeded custom implementation of isDescendantOf. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView shouldClipOutPlugin]): Use the + -[NSView isDescendantOf:] method instead of our own method + named superviewsHaveSuperviews. + 2010-02-12 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. diff --git a/WebKit/mac/Misc/WebKitStatistics.h b/WebKit/mac/Misc/WebKitStatistics.h index 32241b5..040a40b 100644 --- a/WebKit/mac/Misc/WebKitStatistics.h +++ b/WebKit/mac/Misc/WebKitStatistics.h @@ -28,6 +28,9 @@ #import <Foundation/Foundation.h> +// These values are only incremented and decremented if the WebView is subclassed and +// +[WebView shouldIncludeInWebKitStatistics] returns YES. By default WebView returns NO. + @interface WebKitStatistics : NSObject + (int)webViewCount; diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm index c5beb07..836277c 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm @@ -546,7 +546,7 @@ kern_return_t WKPCGetPluginElementNPObject(mach_port_t clientPort, uint32_t plug return KERN_SUCCESS; } -kern_return_t WKPCReleaseObject(mach_port_t clientPort, uint32_t pluginID, uint32_t objectID) +kern_return_t WKPCForgetBrowserObject(mach_port_t clientPort, uint32_t pluginID, uint32_t objectID) { NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort); if (!hostProxy) @@ -556,8 +556,7 @@ kern_return_t WKPCReleaseObject(mach_port_t clientPort, uint32_t pluginID, uint3 if (!instanceProxy) return KERN_FAILURE; - instanceProxy->releaseObject(objectID); - return KERN_SUCCESS; + return instanceProxy->forgetBrowserObjectID(objectID) ? KERN_SUCCESS : KERN_FAILURE; } kern_return_t WKPCEvaluate(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, uint32_t objectID, data_t scriptData, mach_msg_type_number_t scriptLength, boolean_t allowPopups) diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h index 76981a4..29a5a2d 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h @@ -111,8 +111,8 @@ public: // NPRuntime bool getWindowNPObject(uint32_t& objectID); bool getPluginElementNPObject(uint32_t& objectID); - void releaseObject(uint32_t objectID); - + bool forgetBrowserObjectID(uint32_t objectID); // Will fail if the ID is being sent to plug-in right now (i.e., retain/release calls aren't balanced). + bool evaluate(uint32_t objectID, const WebCore::String& script, data_t& resultData, mach_msg_type_number_t& resultLength, bool allowPopups); bool invoke(uint32_t objectID, const JSC::Identifier& methodName, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength); bool invokeDefault(uint32_t objectID, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength); @@ -143,9 +143,13 @@ public: PassRefPtr<JSC::Bindings::Instance> createBindingsInstance(PassRefPtr<JSC::Bindings::RootObject>); RetainPtr<NSData *> marshalValues(JSC::ExecState*, const JSC::ArgList& args); - void marshalValue(JSC::ExecState*, JSC::JSValue value, data_t& resultData, mach_msg_type_number_t& resultLength); + void marshalValue(JSC::ExecState*, JSC::JSValue, data_t& resultData, mach_msg_type_number_t& resultLength); JSC::JSValue demarshalValue(JSC::ExecState*, const char* valueData, mach_msg_type_number_t valueLength); + // No-op if the value does not contain a local object. + void retainLocalObject(JSC::JSValue); + void releaseLocalObject(JSC::JSValue); + void addInstance(ProxyInstance*); void removeInstance(ProxyInstance*); @@ -300,17 +304,34 @@ private: HashMap<uint32_t, Reply*> m_replies; // NPRuntime - uint32_t idForObject(JSC::JSObject*); - + void addValueToArray(NSMutableArray *, JSC::ExecState* exec, JSC::JSValue value); bool demarshalValueFromArray(JSC::ExecState*, NSArray *array, NSUInteger& index, JSC::JSValue& result); void demarshalValues(JSC::ExecState*, data_t valuesData, mach_msg_type_number_t valuesLength, JSC::MarkedArgumentBuffer& result); - uint32_t m_objectIDCounter; - typedef HashMap<uint32_t, JSC::ProtectedPtr<JSC::JSObject> > ObjectMap; - ObjectMap m_objects; - + class LocalObjectMap : Noncopyable { + public: + LocalObjectMap(); + ~LocalObjectMap(); + uint32_t idForObject(JSC::JSObject*); + void retain(JSC::JSObject*); + void release(JSC::JSObject*); + void clear(); + bool forget(uint32_t); + bool contains(uint32_t) const; + JSC::JSObject* get(uint32_t) const; + + private: + HashMap<uint32_t, JSC::ProtectedPtr<JSC::JSObject> > m_idToJSObjectMap; + // The pair consists of object ID and a reference count. One reference belongs to remote plug-in, + // and the proxy will add transient references for arguments that are being sent out. + HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> > m_jsObjectToIDMap; + uint32_t m_objectIDCounter; + }; + + LocalObjectMap m_localObjects; + typedef HashSet<ProxyInstance*> ProxyInstanceSet; ProxyInstanceSet m_instances; diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm index c09e3ea..515f9f7 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm @@ -100,6 +100,98 @@ private: bool m_allowPopups; }; +NetscapePluginInstanceProxy::LocalObjectMap::LocalObjectMap() + : m_objectIDCounter(0) +{ +} + +NetscapePluginInstanceProxy::LocalObjectMap::~LocalObjectMap() +{ +} + +inline bool NetscapePluginInstanceProxy::LocalObjectMap::contains(uint32_t objectID) const +{ + return m_idToJSObjectMap.contains(objectID); +} + +inline JSC::JSObject* NetscapePluginInstanceProxy::LocalObjectMap::get(uint32_t objectID) const +{ + return m_idToJSObjectMap.get(objectID); +} + +uint32_t NetscapePluginInstanceProxy::LocalObjectMap::idForObject(JSObject* object) +{ + // This method creates objects with refcount of 1, but doesn't increase refcount when returning + // found objects. This extra count accounts for the main "reference" kept by plugin process. + + // To avoid excessive IPC, plugin process doesn't send each NPObject release/retain call to + // Safari. It only sends one when the last reference is removed, and it can destroy the proxy + // NPObject. + + // However, the browser may be sending the same object out to plug-in as a function call + // argument at the same time - neither side can know what the other one is doing. So, + // is to make PCForgetBrowserObject call return a boolean result, making it possible for + // the browser to make plugin host keep the proxy with zero refcount for a little longer. + + uint32_t objectID = 0; + + HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator iter = m_jsObjectToIDMap.find(object); + if (iter != m_jsObjectToIDMap.end()) + return iter->second.first; + + do { + objectID = ++m_objectIDCounter; + } while (!m_objectIDCounter || m_objectIDCounter == static_cast<uint32_t>(-1) || m_idToJSObjectMap.contains(objectID)); + + m_idToJSObjectMap.set(objectID, object); + m_jsObjectToIDMap.set(object, make_pair<uint32_t, uint32_t>(objectID, 1)); + + return objectID; +} + +void NetscapePluginInstanceProxy::LocalObjectMap::retain(JSC::JSObject* object) +{ + HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator iter = m_jsObjectToIDMap.find(object); + ASSERT(iter != m_jsObjectToIDMap.end()); + + iter->second.second = iter->second.second + 1; +} + +void NetscapePluginInstanceProxy::LocalObjectMap::release(JSC::JSObject* object) +{ + HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator iter = m_jsObjectToIDMap.find(object); + ASSERT(iter != m_jsObjectToIDMap.end()); + + ASSERT(iter->second.second > 0); + iter->second.second = iter->second.second - 1; + if (!iter->second.second) { + m_idToJSObjectMap.remove(iter->second.first); + m_jsObjectToIDMap.remove(iter); + } +} + +void NetscapePluginInstanceProxy::LocalObjectMap::clear() +{ + m_idToJSObjectMap.clear(); + m_jsObjectToIDMap.clear(); +} + +bool NetscapePluginInstanceProxy::LocalObjectMap::forget(uint32_t objectID) +{ + HashMap<uint32_t, JSC::ProtectedPtr<JSC::JSObject> >::iterator iter = m_idToJSObjectMap.find(objectID); + ASSERT(iter != m_idToJSObjectMap.end()); + + HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator rIter = m_jsObjectToIDMap.find(iter->second.get()); + + // If the object is being sent to plug-in right now, then it's not the time to forget. + if (rIter->second.second != 1) + return false; + + m_jsObjectToIDMap.remove(rIter); + m_idToJSObjectMap.remove(iter); + return true; +} + static uint32_t pluginIDCounter; #ifndef NDEBUG @@ -114,7 +206,6 @@ NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy , m_renderContextID(0) , m_useSoftwareRenderer(false) , m_waitingForReply(false) - , m_objectIDCounter(0) , m_urlCheckCounter(0) , m_pluginFunctionCallDepth(0) , m_shouldStopSoon(false) @@ -185,7 +276,7 @@ void NetscapePluginInstanceProxy::cleanup() // Clear the object map, this will cause any outstanding JS objects that the plug-in had a reference to // to go away when the next garbage collection takes place. - m_objects.clear(); + m_localObjects.clear(); if (Frame* frame = core([m_pluginView webFrame])) frame->script()->cleanupScriptObjectsForPlugin(m_pluginView); @@ -413,11 +504,10 @@ void NetscapePluginInstanceProxy::stopTimers() void NetscapePluginInstanceProxy::status(const char* message) { - RetainPtr<CFStringRef> status(AdoptCF, CFStringCreateWithCString(NULL, message, kCFStringEncodingUTF8)); - + RetainPtr<CFStringRef> status(AdoptCF, CFStringCreateWithCString(0, message ? message : "", kCFStringEncodingUTF8)); if (!status) return; - + WebView *wv = [m_pluginView webView]; [[wv _UIDelegateForwarder] webView:wv setStatusText:(NSString *)status.get()]; } @@ -434,6 +524,8 @@ NPError NetscapePluginInstanceProxy::loadURL(const char* url, const char* target if (flags & PostDataIsFile) { // If we're posting a file, buf is either a file URL or a path to the file. + if (!postData) + return NPERR_INVALID_PARAM; RetainPtr<CFStringRef> bufString(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, postData, kCFStringEncodingWindowsLatin1)); if (!bufString) return NPERR_INVALID_PARAM; @@ -683,20 +775,6 @@ NetscapePluginInstanceProxy::Reply* NetscapePluginInstanceProxy::processRequests return reply; } -uint32_t NetscapePluginInstanceProxy::idForObject(JSObject* object) -{ - uint32_t objectID = 0; - - // Assign an object ID. - do { - objectID = ++m_objectIDCounter; - } while (!m_objectIDCounter || m_objectIDCounter == static_cast<uint32_t>(-1) || m_objects.contains(objectID)); - - m_objects.set(objectID, object); - - return objectID; -} - // NPRuntime support bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID) { @@ -707,7 +785,7 @@ bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID) if (!frame->script()->canExecuteScripts()) objectID = 0; else - objectID = idForObject(frame->script()->windowShell(pluginWorld())->window()); + objectID = m_localObjects.idForObject(frame->script()->windowShell(pluginWorld())->window()); return true; } @@ -719,16 +797,16 @@ bool NetscapePluginInstanceProxy::getPluginElementNPObject(uint32_t& objectID) return false; if (JSObject* object = frame->script()->jsObjectForPluginElement([m_pluginView element])) - objectID = idForObject(object); + objectID = m_localObjects.idForObject(object); else objectID = 0; return true; } -void NetscapePluginInstanceProxy::releaseObject(uint32_t objectID) +bool NetscapePluginInstanceProxy::forgetBrowserObjectID(uint32_t objectID) { - m_objects.remove(objectID); + return m_localObjects.forget(objectID); } bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& script, data_t& resultData, mach_msg_type_number_t& resultLength, bool allowPopups) @@ -736,7 +814,7 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri resultData = 0; resultLength = 0; - if (!m_objects.contains(objectID)) + if (!m_localObjects.contains(objectID)) return false; Frame* frame = core([m_pluginView webFrame]); @@ -778,7 +856,7 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -812,7 +890,7 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -845,7 +923,7 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -879,7 +957,7 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -898,7 +976,7 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, unsigned propertyName, data_t& resultData, mach_msg_type_number_t& resultLength) { - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -920,7 +998,7 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, const Identifie if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -944,7 +1022,7 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, unsigned proper if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -967,7 +1045,7 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, const Identi if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -992,7 +1070,7 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, unsigned pro if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -1017,7 +1095,7 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, const Identifie if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -1037,7 +1115,7 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, unsigned proper if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -1057,7 +1135,7 @@ bool NetscapePluginInstanceProxy::hasMethod(uint32_t objectID, const Identifier& if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -1077,7 +1155,7 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat if (m_inDestroy) return false; - JSObject* object = m_objects.get(objectID); + JSObject* object = m_localObjects.get(objectID); if (!object) return false; @@ -1136,7 +1214,7 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta } } else { [array addObject:[NSNumber numberWithInt:JSObjectValueType]]; - [array addObject:[NSNumber numberWithInt:idForObject(object)]]; + [array addObject:[NSNumber numberWithInt:m_localObjects.idForObject(object)]]; } } else [array addObject:[NSNumber numberWithInt:VoidValueType]]; @@ -1198,7 +1276,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr case JSObjectValueType: { uint32_t objectID = [[array objectAtIndex:index++] intValue]; - result = m_objects.get(objectID); + result = m_localObjects.get(objectID); ASSERT(result); return true; } @@ -1255,6 +1333,30 @@ void NetscapePluginInstanceProxy::demarshalValues(ExecState* exec, data_t values result.append(value); } +void NetscapePluginInstanceProxy::retainLocalObject(JSC::JSValue value) +{ + if (!value.isObject()) + return; + + JSObject* object = asObject(value); + if (object->classInfo() == &RuntimeObjectImp::s_info) + return; + + m_localObjects.retain(object); +} + +void NetscapePluginInstanceProxy::releaseLocalObject(JSC::JSValue value) +{ + if (!value.isObject()) + return; + + JSObject* object = asObject(value); + if (object->classInfo() == &RuntimeObjectImp::s_info) + return; + + m_localObjects.release(object); +} + PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRefPtr<RootObject> rootObject) { uint32_t requestID = nextRequestID(); diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm index 1587ad0..c7a0ebe 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm @@ -137,17 +137,27 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id { if (!m_instanceProxy) return jsUndefined(); - + RetainPtr<NSData*> arguments(m_instanceProxy->marshalValues(exec, args)); uint32_t requestID = m_instanceProxy->nextRequestID(); + for (unsigned i = 0; i < args.size(); i++) + m_instanceProxy->retainLocalObject(args.at(i)); + if (_WKPHNPObjectInvoke(m_instanceProxy->hostProxy()->port(), m_instanceProxy->pluginID(), requestID, m_objectID, - type, identifier, (char*)[arguments.get() bytes], [arguments.get() length]) != KERN_SUCCESS) + type, identifier, (char*)[arguments.get() bytes], [arguments.get() length]) != KERN_SUCCESS) { + for (unsigned i = 0; i < args.size(); i++) + m_instanceProxy->releaseLocalObject(args.at(i)); return jsUndefined(); + } auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); + + for (unsigned i = 0; i < args.size(); i++) + m_instanceProxy->releaseLocalObject(args.at(i)); + if (!reply.get() || !reply->m_returnValue) return jsUndefined(); @@ -381,10 +391,12 @@ void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue v mach_msg_type_number_t valueLength; m_instanceProxy->marshalValue(exec, value, valueData, valueLength); + m_instanceProxy->retainLocalObject(value); kern_return_t kr = _WKPHNPObjectSetProperty(m_instanceProxy->hostProxy()->port(), m_instanceProxy->pluginID(), requestID, m_objectID, serverIdentifier, valueData, valueLength); mig_deallocate(reinterpret_cast<vm_address_t>(valueData), valueLength); + m_instanceProxy->releaseLocalObject(value); if (kr != KERN_SUCCESS) return; diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm index 42f0877..0ad76f0 100644 --- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm +++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm @@ -285,13 +285,13 @@ extern "C" { _proxy->mouseEvent(self, event, NPCocoaEventMouseDragged); } -- (void)mouseEntered:(NSEvent *)event +- (void)handleMouseEntered:(NSEvent *)event { if (_isStarted && _proxy) _proxy->mouseEvent(self, event, NPCocoaEventMouseEntered); } -- (void)mouseExited:(NSEvent *)event +- (void)handleMouseExited:(NSEvent *)event { if (_isStarted && _proxy) _proxy->mouseEvent(self, event, NPCocoaEventMouseExited); diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs index 58a7996..6522bf7 100644 --- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs +++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs @@ -112,7 +112,7 @@ routine PCGetPluginElementNPObject(clientPort :mach_port_t; pluginID :uint32_t; out objectID :uint32_t); -routine PCReleaseObject(clientPort :mach_port_t; +routine PCForgetBrowserObject(clientPort :mach_port_t; pluginID :uint32_t; objectID :uint32_t); diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h index 029a058..18dc004 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h @@ -92,7 +92,10 @@ class WebHaltablePlugin; - (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString; // Subclasses must override these. +// The "handle" prefix is needed to avoid overriding NSView methods. - (void)handleMouseMoved:(NSEvent *)event; +- (void)handleMouseEntered:(NSEvent *)event; +- (void)handleMouseExited:(NSEvent *)event; - (void)setAttributeKeys:(NSArray *)keys andValues:(NSArray *)values; - (void)focusChanged; diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm index e93509a..04a42ea 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm @@ -232,6 +232,16 @@ String WebHaltablePlugin::pluginName() const ASSERT_NOT_REACHED(); } +- (void)handleMouseEntered:(NSEvent *)event +{ + ASSERT_NOT_REACHED(); +} + +- (void)handleMouseExited:(NSEvent *)event +{ + ASSERT_NOT_REACHED(); +} + - (void)focusChanged { ASSERT_NOT_REACHED(); @@ -545,20 +555,10 @@ String WebHaltablePlugin::pluginName() const return _isHalted; } -- (BOOL)superviewsHaveSuperviews -{ - NSView *contentView = [[self window] contentView]; - for (NSView *view = self; view; view = [view superview]) { - if (view == contentView) - return YES; - } - return NO; -} - - (BOOL)shouldClipOutPlugin { NSWindow *window = [self window]; - return !window || [window isMiniaturized] || [NSApp isHidden] || ![self superviewsHaveSuperviews] || [self isHiddenOrHasHiddenAncestor]; + return !window || [window isMiniaturized] || [NSApp isHidden] || ![self isDescendantOf:[[self window] contentView]] || [self isHiddenOrHasHiddenAncestor]; } - (BOOL)hasBeenHalted diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h index 2ee566e..5bc4467 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.h +++ b/WebKit/mac/Plugins/WebNetscapePluginView.h @@ -143,6 +143,9 @@ typedef union PluginPort { - (void)didCallPlugInFunction; - (void)handleMouseMoved:(NSEvent *)event; +- (void)handleMouseEntered:(NSEvent *)event; +- (void)handleMouseExited:(NSEvent *)event; + - (uint32)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context; - (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID; diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm index e96abe8..8fb1503 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm @@ -749,7 +749,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) _eventHandler->mouseUp(theEvent); } -- (void)mouseEntered:(NSEvent *)theEvent +- (void)handleMouseEntered:(NSEvent *)theEvent { if (!_isStarted) return; @@ -757,7 +757,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) _eventHandler->mouseEntered(theEvent); } -- (void)mouseExited:(NSEvent *)theEvent +- (void)handleMouseExited:(NSEvent *)theEvent { if (!_isStarted) return; @@ -769,8 +769,6 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) [[NSCursor arrowCursor] set]; } -// We can't name this method mouseMoved because we don't want to override -// the NSView mouseMoved implementation. - (void)handleMouseMoved:(NSEvent *)theEvent { if (!_isStarted) @@ -1906,12 +1904,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) -(void)status:(const char *)message { - if (!message) { - LOG_ERROR("NPN_Status passed a NULL status message"); - return; - } - - CFStringRef status = CFStringCreateWithCString(NULL, message, kCFStringEncodingUTF8); + CFStringRef status = CFStringCreateWithCString(NULL, message ? message : "", kCFStringEncodingUTF8); if (!status) { LOG_ERROR("NPN_Status: the message was not valid UTF-8"); return; diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h index 8e8b51a..c8da53b 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -120,6 +120,7 @@ public: #endif virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); + virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; } diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index c4e9671..b2240d9 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -631,6 +631,11 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> chooser) END_BLOCK_OBJC_EXCEPTIONS; } +void WebChromeClient::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +{ + // FIXME: Move the code of Icon::createIconForFiles() here. +} + KeyboardUIMode WebChromeClient::keyboardUIMode() { BEGIN_BLOCK_OBJC_EXCEPTIONS; diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index 2774783..988b8a6 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -188,6 +188,7 @@ private: virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement*, const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&, bool); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index eaec807..52a24b4 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -1352,6 +1352,10 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin return 0; } +void WebFrameLoaderClient::didTransferChildFrameToNewDocument() +{ +} + ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType) { BEGIN_BLOCK_OBJC_EXCEPTIONS; @@ -1493,6 +1497,10 @@ public: NSEvent* currentNSEvent = frame->eventHandler()->currentNSEvent(); if (event->type() == eventNames().mousemoveEvent) [(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:currentNSEvent]; + else if (event->type() == eventNames().mouseoverEvent) + [(WebBaseNetscapePluginView *)platformWidget() handleMouseEntered:currentNSEvent]; + else if (event->type() == eventNames().mouseoutEvent) + [(WebBaseNetscapePluginView *)platformWidget() handleMouseExited:currentNSEvent]; } }; diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm index 8a3842e..d9622b3 100644 --- a/WebKit/mac/WebView/WebDataSource.mm +++ b/WebKit/mac/WebView/WebDataSource.mm @@ -70,6 +70,7 @@ using namespace WebCore; id <WebDocumentRepresentation> representation; BOOL representationFinishedLoading; + BOOL includedInWebKitStatistics; } @end @@ -372,10 +373,11 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl _private->loader = loader.releaseRef(); LOG(Loading, "creating datasource for %@", static_cast<NSURL *>(_private->loader->request().url())); - - ++WebDataSourceCount; - - return self; + + if ((_private->includedInWebKitStatistics = [[self webFrame] _isIncludedInWebKitStatistics])) + ++WebDataSourceCount; + + return self; } @end @@ -389,16 +391,18 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl - (void)dealloc { - --WebDataSourceCount; - + if (_private && _private->includedInWebKitStatistics) + --WebDataSourceCount; + [_private release]; - + [super dealloc]; } - (void)finalize { - --WebDataSourceCount; + if (_private && _private->includedInWebKitStatistics) + --WebDataSourceCount; [super finalize]; } diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm index 41d7e01..267d319 100644 --- a/WebKit/mac/WebView/WebFrame.mm +++ b/WebKit/mac/WebView/WebFrame.mm @@ -87,6 +87,7 @@ #import <WebCore/htmlediting.h> #import <WebCore/markup.h> #import <WebCore/visible_units.h> +#import <WebKitSystemInterface.h> #import <runtime/JSLock.h> #import <runtime/JSObject.h> #import <runtime/JSValue.h> @@ -269,6 +270,11 @@ WebView *getWebView(WebFrame *webFrame) return [self _createFrameWithPage:ownerElement->document()->frame()->page() frameName:name frameView:frameView ownerElement:ownerElement]; } +- (BOOL)_isIncludedInWebKitStatistics +{ + return _private && _private->includedInWebKitStatistics; +} + - (void)_attachScriptDebugger { ScriptController* scriptController = _private->coreFrame->script(); @@ -308,6 +314,11 @@ WebView *getWebView(WebFrame *webFrame) _private = [[WebFramePrivate alloc] init]; + // Set includedInWebKitStatistics before calling WebFrameView _setWebFrame, since + // it calls WebFrame _isIncludedInWebKitStatistics. + if ((_private->includedInWebKitStatistics = [[v class] shouldIncludeInWebKitStatistics])) + ++WebFrameCount; + if (fv) { [_private setWebFrameView:fv]; [fv _setWebFrame:self]; @@ -315,8 +326,6 @@ WebView *getWebView(WebFrame *webFrame) _private->shouldCreateRenderers = YES; - ++WebFrameCount; - return self; } @@ -523,14 +532,27 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) - (void)_drawRect:(NSRect)rect contentsOnly:(BOOL)contentsOnly { - PlatformGraphicsContext* platformContext = static_cast<PlatformGraphicsContext*>([[NSGraphicsContext currentContext] graphicsPort]); ASSERT([[NSGraphicsContext currentContext] isFlipped]); - GraphicsContext context(platformContext); + + CGContextRef ctx = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); + GraphicsContext context(ctx); + + FrameView* view = _private->coreFrame->view(); + + bool shouldFlatten = WKCGContextIsBitmapContext(ctx) && [getWebView(self) _includesFlattenedCompositingLayersWhenDrawingToBitmap]; + PaintBehavior oldBehavior = PaintBehaviorNormal; + if (shouldFlatten) { + oldBehavior = view->paintBehavior(); + view->setPaintBehavior(oldBehavior | PaintBehaviorFlattenCompositingLayers); + } if (contentsOnly) _private->coreFrame->view()->paintContents(&context, enclosingIntRect(rect)); else _private->coreFrame->view()->paint(&context, enclosingIntRect(rect)); + + if (shouldFlatten) + view->setPaintBehavior(oldBehavior); } // Used by pagination code called from AppKit when a standalone web page is printed. @@ -1276,14 +1298,19 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) - (void)dealloc { + if (_private && _private->includedInWebKitStatistics) + --WebFrameCount; + [_private release]; - --WebFrameCount; + [super dealloc]; } - (void)finalize { - --WebFrameCount; + if (_private && _private->includedInWebKitStatistics) + --WebFrameCount; + [super finalize]; } diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h index 0dcf19b..4c1ee40 100644 --- a/WebKit/mac/WebView/WebFrameInternal.h +++ b/WebKit/mac/WebView/WebFrameInternal.h @@ -81,6 +81,7 @@ WebView *getWebView(WebFrame *webFrame); WebScriptDebugger* scriptDebugger; id internalLoadDelegate; BOOL shouldCreateRenderers; + BOOL includedInWebKitStatistics; } @end @@ -96,6 +97,8 @@ WebView *getWebView(WebFrame *webFrame); - (void)_clearCoreFrame; +- (BOOL)_isIncludedInWebKitStatistics; + - (void)_updateBackgroundAndUpdatesWhileOffscreen; - (void)_setInternalLoadDelegate:(id)internalLoadDelegate; - (id)_internalLoadDelegate; diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm index b6b1941..422b605 100644 --- a/WebKit/mac/WebView/WebFrameView.mm +++ b/WebKit/mac/WebView/WebFrameView.mm @@ -92,6 +92,7 @@ enum { @public WebFrame *webFrame; WebDynamicScrollBarsView *frameScrollView; + BOOL includedInWebKitStatistics; } @end @@ -187,6 +188,11 @@ enum { // Not retained because the WebView owns the WebFrame, which owns the WebFrameView. _private->webFrame = webFrame; + + if (!_private->includedInWebKitStatistics && [webFrame _isIncludedInWebKitStatistics]) { + _private->includedInWebKitStatistics = YES; + ++WebFrameViewCount; + } } - (WebDynamicScrollBarsView *)_scrollView @@ -286,15 +292,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl @implementation WebFrameView -- initWithCoder:(NSCoder *)decoder -{ - // Older nibs containing WebViews will also contain WebFrameViews. We need to keep track of - // their count also to match the decrement in -dealloc. - ++WebFrameViewCount; - return [super initWithCoder:decoder]; -} - -- initWithFrame:(NSRect)frame +- (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (!self) @@ -350,14 +348,13 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl // This works together with our becomeFirstResponder and setNextKeyView overrides. [super setNextKeyView:scrollView]; - ++WebFrameViewCount; - return self; } - (void)dealloc { - --WebFrameViewCount; + if (_private && _private->includedInWebKitStatistics) + --WebFrameViewCount; [_private release]; _private = nil; @@ -367,7 +364,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl - (void)finalize { - --WebFrameViewCount; + if (_private && _private->includedInWebKitStatistics) + --WebFrameViewCount; [super finalize]; } diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm index 41ce9f9..3aaa914 100644 --- a/WebKit/mac/WebView/WebHTMLRepresentation.mm +++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm @@ -66,6 +66,8 @@ using namespace HTMLNames; WebDataSource *dataSource; BOOL hasSentResponseToPlugin; + BOOL includedInWebKitStatistics; + id <WebPluginManualLoader> manualLoader; NSView *pluginView; } @@ -117,16 +119,15 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second) return nil; _private = [[WebHTMLRepresentationPrivate alloc] init]; - - ++WebHTMLRepresentationCount; - + return self; } - (void)dealloc { - --WebHTMLRepresentationCount; - + if (_private && _private->includedInWebKitStatistics) + --WebHTMLRepresentationCount; + [_private release]; [super dealloc]; @@ -134,7 +135,8 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second) - (void)finalize { - --WebHTMLRepresentationCount; + if (_private && _private->includedInWebKitStatistics) + --WebHTMLRepresentationCount; [super finalize]; } @@ -148,6 +150,11 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second) - (void)setDataSource:(WebDataSource *)dataSource { _private->dataSource = dataSource; + + if (!_private->includedInWebKitStatistics && [[dataSource webFrame] _isIncludedInWebKitStatistics]) { + _private->includedInWebKitStatistics = YES; + ++WebHTMLRepresentationCount; + } } - (BOOL)_isDisplayingWebArchive diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm index 54a177e..aa65920 100644 --- a/WebKit/mac/WebView/WebHTMLView.mm +++ b/WebKit/mac/WebView/WebHTMLView.mm @@ -1239,15 +1239,6 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info) if (_private->enumeratingSubviews) LOG(View, "A view of class %s was added during subview enumeration for layout or printing mode change. This view might paint without first receiving layout.", object_getClassName([subview class])); } - -- (void)willRemoveSubview:(NSView *)subview -{ - // Have to null-check _private, since this can be called via -dealloc when - // cleaning up the the layerHostingView. - if (_private && _private->enumeratingSubviews) - LOG(View, "A view of class %s was removed during subview enumeration for layout or printing mode change. We will still do layout or the printing mode change even though this view is no longer in the view hierarchy.", object_getClassName([subview class])); -} - #endif #ifdef BUILDING_ON_TIGER @@ -2924,7 +2915,9 @@ WEBCORE_COMMAND(yankAndSelect) [self _removeWindowObservers]; [self _removeSuperviewObservers]; [self _cancelUpdateMouseoverTimer]; - + + // FIXME: This accomplishes the same thing as the call to setCanStartMedia(false) in + // WebView. It would be nice to have a single mechanism instead of two. [[self _pluginController] stopAllPlugins]; } @@ -2944,6 +2937,8 @@ WEBCORE_COMMAND(yankAndSelect) [self addSuperviewObservers]; [self addMouseMovedObserver]; + // FIXME: This accomplishes the same thing as the call to setCanStartMedia(true) in + // WebView. It would be nice to have a single mechanism instead of two. [[self _pluginController] startAllPlugins]; _private->lastScrollPosition = NSZeroPoint; @@ -2971,6 +2966,13 @@ WEBCORE_COMMAND(yankAndSelect) - (void)willRemoveSubview:(NSView *)subview { +#ifndef NDEBUG + // Have to null-check _private, since this can be called via -dealloc when + // cleaning up the the layerHostingView. + if (_private && _private->enumeratingSubviews) + LOG(View, "A view of class %s was removed during subview enumeration for layout or printing mode change. We will still do layout or the printing mode change even though this view is no longer in the view hierarchy.", object_getClassName([subview class])); +#endif + if ([WebPluginController isPlugInView:subview]) [[self _pluginController] destroyPlugin:subview]; diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index b8e912e..150a020 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -51,6 +51,7 @@ #define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled" #define WebKitWebSecurityEnabledPreferenceKey @"WebKitWebSecurityEnabled" #define WebKitAllowUniversalAccessFromFileURLsPreferenceKey @"WebKitAllowUniversalAccessFromFileURLs" +#define WebKitAllowFileAccessFromFileURLsPreferenceKey @"WebKitAllowFileAccessFromFileURLs" #define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically" #define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled" #define WebKitDatabasesEnabledPreferenceKey @"WebKitDatabasesEnabledPreferenceKey" diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm index a1176a9..bd3c2a7 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -316,6 +316,7 @@ static WebCacheModel cacheModelForMainBundle(void) [NSNumber numberWithBool:YES], WebKitJavaScriptEnabledPreferenceKey, [NSNumber numberWithBool:YES], WebKitWebSecurityEnabledPreferenceKey, [NSNumber numberWithBool:YES], WebKitAllowUniversalAccessFromFileURLsPreferenceKey, + [NSNumber numberWithBool:YES], WebKitAllowFileAccessFromFileURLsPreferenceKey, [NSNumber numberWithBool:YES], WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey, [NSNumber numberWithBool:YES], WebKitPluginsEnabledPreferenceKey, [NSNumber numberWithBool:YES], WebKitDatabasesEnabledPreferenceKey, @@ -920,6 +921,16 @@ static WebCacheModel cacheModelForMainBundle(void) [self _setBoolValue: flag forKey: WebKitAllowUniversalAccessFromFileURLsPreferenceKey]; } +- (BOOL)allowFileAccessFromFileURLs +{ + return [self _boolValueForKey: WebKitAllowFileAccessFromFileURLsPreferenceKey]; +} + +- (void)setAllowFileAccessFromFileURLs:(BOOL)flag +{ + [self _setBoolValue: flag forKey: WebKitAllowFileAccessFromFileURLsPreferenceKey]; +} + - (NSTimeInterval)_backForwardCacheExpirationInterval { // FIXME: There's probably no good reason to read from the standard user defaults instead of self. diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h index 7c84d8d..b516640 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -101,6 +101,9 @@ extern NSString *WebPreferencesRemovedNotification; - (BOOL)allowUniversalAccessFromFileURLs; - (void)setAllowUniversalAccessFromFileURLs:(BOOL)flag; +- (BOOL)allowFileAccessFromFileURLs; +- (void)setAllowFileAccessFromFileURLs:(BOOL)flag; + - (BOOL)zoomsTextOnly; - (void)setZoomsTextOnly:(BOOL)zoomsTextOnly; diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index 4b449de..44d4b58 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2006 David Smith (catfish.man@gmail.com) * * Redistribution and use in source and binary forms, with or without @@ -600,6 +600,7 @@ static bool shouldEnableLoadDeferring() _private->drawsBackground = YES; _private->backgroundColor = [[NSColor colorWithDeviceWhite:1 alpha:1] retain]; _private->usesDocumentViews = usesDocumentViews; + _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = YES; WebFrameView *frameView = nil; if (_private->usesDocumentViews) { @@ -630,6 +631,7 @@ static bool shouldEnableLoadDeferring() #endif _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient); + _private->page->setCanStartMedia([self window]); _private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]); [WebFrame _createMainFrameWithPage:_private->page frameName:frameName frameView:frameView]; @@ -657,7 +659,8 @@ static bool shouldEnableLoadDeferring() [frameView setNextKeyView:nextKeyView]; [super setNextKeyView:frameView]; - ++WebViewCount; + if ([[self class] shouldIncludeInWebKitStatistics]) + ++WebViewCount; [self _registerDraggedTypes]; @@ -1286,6 +1289,7 @@ static bool fastDocumentTeardownEnabled() settings->setJavaScriptEnabled([preferences isJavaScriptEnabled]); settings->setWebSecurityEnabled([preferences isWebSecurityEnabled]); settings->setAllowUniversalAccessFromFileURLs([preferences allowUniversalAccessFromFileURLs]); + settings->setAllowFileAccessFromFileURLs([preferences allowFileAccessFromFileURLs]); settings->setJavaScriptCanOpenWindowsAutomatically([preferences javaScriptCanOpenWindowsAutomatically]); settings->setMinimumFontSize([preferences minimumFontSize]); settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]); @@ -2141,19 +2145,42 @@ static inline IMP getMethod(id o, SEL s) - (BOOL)_isUsingAcceleratedCompositing { #if USE(ACCELERATED_COMPOSITING) - Frame* coreFrame = [self _mainCoreFrame]; if (_private->usesDocumentViews) { + Frame* coreFrame = [self _mainCoreFrame]; for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { NSView *documentView = [[kit(frame) frameView] documentView]; if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _isUsingAcceleratedCompositing]) return YES; } } - - return NO; -#else +#endif return NO; +} + +- (BOOL)_isSoftwareRenderable +{ +#if USE(ACCELERATED_COMPOSITING) + if (_private->usesDocumentViews) { + Frame* coreFrame = [self _mainCoreFrame]; + for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { + if (FrameView* view = frame->view()) { + if (!view->isSoftwareRenderable()) + return NO; + } + } + } #endif + return YES; +} + +- (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag +{ + _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = flag; +} + +- (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap +{ + return _private->includesFlattenedCompositingLayersWhenDrawingToBitmap; } static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node) @@ -2743,8 +2770,9 @@ static bool needsWebViewInitThreadWorkaround() // this maintains our old behavior for existing applications [self close]; - --WebViewCount; - + if ([[self class] shouldIncludeInWebKitStatistics]) + --WebViewCount; + if ([self _needsFrameLoadDelegateRetainQuirk]) [_private->frameLoadDelegate release]; @@ -2824,8 +2852,10 @@ static bool needsWebViewInitThreadWorkaround() // and over, so do them when we move into a window. [window setAcceptsMouseMovedEvents:YES]; WKSetNSWindowShouldPostEventNotifications(window, YES); - } else + } else { + _private->page->setCanStartMedia(false); _private->page->willMoveOffscreen(); + } if (window != [self window]) { [self removeWindowObservers]; @@ -2842,8 +2872,10 @@ static bool needsWebViewInitThreadWorkaround() if (!_private || _private->closed) return; - if ([self window]) + if ([self window]) { + _private->page->setCanStartMedia(true); _private->page->didMoveOnscreen(); + } [self _updateActiveState]; } @@ -5335,6 +5367,11 @@ static WebFrameView *containingFrameView(NSView *view) @implementation WebView (WebViewInternal) ++ (BOOL)shouldIncludeInWebKitStatistics +{ + return NO; +} + - (BOOL)_becomingFirstResponderFromOutside { return _private->becomingFirstResponderFromOutside; diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h index b0569a2..2b51f3c 100644 --- a/WebKit/mac/WebView/WebViewData.h +++ b/WebKit/mac/WebView/WebViewData.h @@ -137,6 +137,8 @@ extern int pluginDatabaseClientCount; // When this flag is set, we will not make any subviews underneath this WebView. This means no WebFrameViews and no WebHTMLViews. BOOL usesDocumentViews; + + BOOL includesFlattenedCompositingLayersWhenDrawingToBitmap; #if USE(ACCELERATED_COMPOSITING) // When this flag is set, next time a WebHTMLView draws, it needs to temporarily disable screen updates diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h index 6c2ae50..3f38d58 100644 --- a/WebKit/mac/WebView/WebViewInternal.h +++ b/WebKit/mac/WebView/WebViewInternal.h @@ -64,6 +64,8 @@ namespace WebCore { @interface WebView (WebViewInternal) ++ (BOOL)shouldIncludeInWebKitStatistics; + - (WebCore::Frame*)_mainCoreFrame; - (WebFrame *)_selectedOrMainFrame; diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h index 4d1145e..b0a7039 100644 --- a/WebKit/mac/WebView/WebViewPrivate.h +++ b/WebKit/mac/WebView/WebViewPrivate.h @@ -470,6 +470,13 @@ Could be worth adding to the API. - (void)_setPostsAcceleratedCompositingNotifications:(BOOL)flag; - (BOOL)_isUsingAcceleratedCompositing; +// Returns YES if NSView -displayRectIgnoringOpacity:inContext: will produce a faithful representation of the content. +- (BOOL)_isSoftwareRenderable; +// When drawing into a bitmap context, we normally flatten compositing layers (and distort 3D transforms). +// Clients who are able to capture their own copy of the compositing layers need to be able to disable this. +- (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag; +- (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap; + // SPI for PluginHalter + (BOOL)_isNodeHaltedPlugin:(DOMNode *)node; + (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node; diff --git a/WebKit/qt/Api/DerivedSources.pro b/WebKit/qt/Api/DerivedSources.pro index 8702fde..a8f2684 100644 --- a/WebKit/qt/Api/DerivedSources.pro +++ b/WebKit/qt/Api/DerivedSources.pro @@ -31,6 +31,8 @@ WEBKIT_CLASS_HEADERS = $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${ regex = ".*\sclass\sQWEBKIT_EXPORT\s(\w+)\s(.*)" for(HEADER, WEBKIT_API_HEADERS) { + # 1. Append to QtWebKit header that includes all other header files + qtheader_module.depends += $$HEADER # Quotes need to be escaped once more when placed in eval() eval(qtheader_module.commands += echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$basename(HEADER)\\\"$${DOUBLE_ESCAPED_QUOTE} >> $${qtheader_module.target} &&) @@ -39,12 +41,22 @@ for(HEADER, WEBKIT_API_HEADERS) { HEADER_TARGET = $$replace(HEADER_NAME, [^a-zA-Z0-9_], -) HEADER_TARGET = "qtheader-$${HEADER_TARGET}" + # 2. Create forwarding header files for qwebframe.h, etc. + # Normally they contain absolute paths, for package builds we make the path relative so that + # the package sources are relocatable. + + PATH_TO_HEADER = $$HEADER + CONFIG(standalone_package): PATH_TO_HEADER = ../../WebKit/qt/Api/$$basename(HEADER) + eval($${HEADER_TARGET}.target = $${DESTDIR}/$${HEADER_NAME}) eval($${HEADER_TARGET}.depends = $$HEADER) - eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$HEADER\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target)) + eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$PATH_TO_HEADER\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target)) QMAKE_EXTRA_TARGETS += $$HEADER_TARGET + # 3. Extract class names of exported classes from the headers and generate + # the class name header files + src_words = $$cat($$HEADER) # Really make sure we're dealing with words src_words = $$split(src_words, " ") diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp index b323598..9720e0c 100644 --- a/WebKit/qt/Api/qgraphicswebview.cpp +++ b/WebKit/qt/Api/qgraphicswebview.cpp @@ -77,6 +77,7 @@ public: QGraphicsWebViewPrivate(QGraphicsWebView* parent) : q(parent) , page(0) + , resizesToContents(false) #if USE(ACCELERATED_COMPOSITING) , rootGraphicsLayer(0) , shouldSync(false) @@ -117,12 +118,18 @@ public: virtual void markForSync(bool scheduleSync); void updateCompositingScrollPosition(); #endif + + void updateResizesToContentsForPage(); void syncLayers(); void _q_doLoadFinished(bool success); + void _q_contentsSizeChanged(const QSize&); QGraphicsWebView* q; QWebPage* page; + + bool resizesToContents; + #if USE(ACCELERATED_COMPOSITING) QGraphicsItem* rootGraphicsLayer; @@ -304,6 +311,35 @@ QStyle* QGraphicsWebViewPrivate::style() const return q->style(); } +void QGraphicsWebViewPrivate::updateResizesToContentsForPage() +{ + ASSERT(page); + + if (resizesToContents) { + // resizes to contents mode requires preferred contents size to be set + if (!page->preferredContentsSize().isValid()) + page->setPreferredContentsSize(QSize(960, 800)); + +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), + q, SLOT(_q_contentsSizeChanged(const QSize&)), Qt::UniqueConnection); +#else + QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), + q, SLOT(_q_contentsSizeChanged(const QSize&))); +#endif + } else { + QObject::disconnect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), + q, SLOT(_q_contentsSizeChanged(const QSize&))); + } +} + +void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size) +{ + if (!resizesToContents) + return; + q->setGeometry(QRectF(q->geometry().topLeft(), size)); +} + /*! \class QGraphicsWebView \brief The QGraphicsWebView class allows Web content to be added to a GraphicsView. @@ -586,6 +622,9 @@ void QGraphicsWebView::setPage(QWebPage* page) QSize size = geometry().size().toSize(); page->setViewportSize(size); + + if (d->resizesToContents) + d->updateResizesToContentsForPage(); QWebFrame* mainFrame = d->page->mainFrame(); @@ -918,6 +957,34 @@ bool QGraphicsWebView::findText(const QString &subString, QWebPage::FindFlags op return false; } +/*! + \property QGraphicsWebView::resizesToContents + \brief whether the size of the QGraphicsWebView and its viewport changes to match the contents size + \since 4.7 + + If this property is set, the QGraphicsWebView will automatically change its + size to match the size of the main frame contents. As a result the top level frame + will never have scrollbars. + + This property should be used in conjunction with the QWebPage::preferredContentsSize property. + If not explicitly set, the preferredContentsSize is automatically set to a reasonable value. + + \sa QWebPage::setPreferredContentsSize +*/ +void QGraphicsWebView::setResizesToContents(bool enabled) +{ + if (d->resizesToContents == enabled) + return; + d->resizesToContents = enabled; + if (d->page) + d->updateResizesToContentsForPage(); +} + +bool QGraphicsWebView::resizesToContents() const +{ + return d->resizesToContents; +} + /*! \reimp */ void QGraphicsWebView::hoverMoveEvent(QGraphicsSceneHoverEvent* ev) diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h index 3cf51b2..14de9d5 100644 --- a/WebKit/qt/Api/qgraphicswebview.h +++ b/WebKit/qt/Api/qgraphicswebview.h @@ -45,6 +45,7 @@ class QWEBKIT_EXPORT QGraphicsWebView : public QGraphicsWidget { Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) Q_PROPERTY(bool modified READ isModified) + Q_PROPERTY(bool resizesToContents READ resizesToContents WRITE setResizesToContents) public: explicit QGraphicsWebView(QGraphicsItem* parent = 0); @@ -79,6 +80,9 @@ public: bool findText(const QString& subString, QWebPage::FindFlags options = 0); + bool resizesToContents() const; + void setResizesToContents(bool enabled); + virtual void setGeometry(const QRectF& rect); virtual void updateGeometry(); virtual void paint(QPainter*, const QStyleOptionGraphicsItem* options, QWidget* widget = 0); @@ -137,6 +141,7 @@ private: // we don't want to change the moc based on USE() macro, so this function is here // but will be empty if ACCLERATED_COMPOSITING is disabled Q_PRIVATE_SLOT(d, void syncLayers()) + Q_PRIVATE_SLOT(d, void _q_contentsSizeChanged(const QSize&)) QGraphicsWebViewPrivate* const d; friend class QGraphicsWebViewPrivate; diff --git a/WebKit/qt/Api/qwebelement.h b/WebKit/qt/Api/qwebelement.h index 3833070..156d24b 100644 --- a/WebKit/qt/Api/qwebelement.h +++ b/WebKit/qt/Api/qwebelement.h @@ -32,6 +32,12 @@ namespace WebCore { class Node; } +namespace JSC { +namespace Bindings { + class QtWebElementRuntime; +} +} + QT_BEGIN_NAMESPACE class QPainter; QT_END_NAMESPACE @@ -153,6 +159,7 @@ private: friend class QWebHitTestResult; friend class QWebHitTestResultPrivate; friend class QWebPage; + friend class JSC::Bindings::QtWebElementRuntime; QWebElementPrivate* d; WebCore::Element* m_element; @@ -255,4 +262,6 @@ private: QExplicitlySharedDataPointer<QWebElementCollectionPrivate> d; }; +Q_DECLARE_METATYPE(QWebElement) + #endif // QWEBELEMENT_H diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index 4c1f318..15b5c00 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -233,6 +233,15 @@ int QWEBKIT_EXPORT qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QStr return PrintContext::pageNumberForElement(element, FloatSize(width, height)); } +int QWEBKIT_EXPORT qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height) +{ + Frame* frame = QWebFramePrivate::core(qFrame); + if (!frame) + return -1; + + return PrintContext::numberOfPages(frame, FloatSize(width, height)); +} + // Suspend active DOM objects in this frame. void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame) { @@ -249,6 +258,13 @@ void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* qFrame) frame->document()->resumeActiveDOMObjects(); } +void QWEBKIT_EXPORT qt_drt_evaluateScriptInIsolatedWorld(QWebFrame* qFrame, int worldId, const QString& script) +{ + Frame* frame = QWebFramePrivate::core(qFrame); + if (frame) + JSC::JSValue result = frame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue(); +} + QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame, WebCore::HTMLFrameOwnerElement* ownerFrameElement, const WebCore::String& frameName) @@ -282,6 +298,21 @@ void QWebFramePrivate::init(QWebFrame *qframe, QWebFrameData *frameData) frame->init(); } +void QWebFramePrivate::setPage(QWebPage* newPage) +{ + if (page == newPage) + return; + + // The QWebFrame is created as a child of QWebPage or a parent QWebFrame. + // That adds it to QObject's internal children list and ensures it will be + // deleted when parent QWebPage is deleted. Reparent if needed. + if (q->parent() == qobject_cast<QObject*>(page)) + q->setParent(newPage); + + page = newPage; + emit q->pageChanged(); +} + WebCore::Scrollbar* QWebFramePrivate::horizontalScrollBar() const { if (!frame->view()) @@ -1140,6 +1171,17 @@ void QWebFrame::setScrollPosition(const QPoint &pos) } /*! + \since 4.7 + Scrolls the frame to the given \a anchor name. +*/ +void QWebFrame::scrollToAnchor(const QString& anchor) +{ + FrameView *view = d->frame->view(); + if (view) + view->scrollToAnchor(anchor); +} + +/*! \since 4.6 Render the \a layer of the frame using \a painter clipping to \a clip. diff --git a/WebKit/qt/Api/qwebframe.h b/WebKit/qt/Api/qwebframe.h index 25f6c9b..68594fd 100644 --- a/WebKit/qt/Api/qwebframe.h +++ b/WebKit/qt/Api/qwebframe.h @@ -160,6 +160,8 @@ public: QPoint scrollPosition() const; void setScrollPosition(const QPoint &pos); + void scrollToAnchor(const QString& anchor); + enum RenderLayer { ContentsLayer = 0x10, ScrollBarLayer = 0x20, @@ -217,6 +219,8 @@ Q_SIGNALS: void loadStarted(); void loadFinished(bool ok); + void pageChanged(); + private: friend class QWebPage; friend class QWebPagePrivate; diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h index ee978be..7d79474 100644 --- a/WebKit/qt/Api/qwebframe_p.h +++ b/WebKit/qt/Api/qwebframe_p.h @@ -73,6 +73,7 @@ public: , marginHeight(-1) {} void init(QWebFrame* qframe, QWebFrameData* frameData); + void setPage(QWebPage*); inline QWebFrame *parentFrame() { return qobject_cast<QWebFrame*>(q->parent()); } diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index f661918..2a8aced 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -161,6 +161,40 @@ QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page) return page->handle()->page->groupName(); } +#if ENABLE(INSPECTOR) +void QWEBKIT_EXPORT qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script) +{ + if (!page->handle()->page->inspectorController()) + return; + page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script); +} + +void QWEBKIT_EXPORT qt_drt_webinspector_close(QWebPage* page) +{ + if (!page->handle()->page->inspectorController()) + return; + page->handle()->page->inspectorController()->close(); +} + +void QWEBKIT_EXPORT qt_drt_webinspector_show(QWebPage* page) +{ + if (!page->handle()->page->inspectorController()) + return; + page->handle()->page->inspectorController()->show(); +} + +void QWEBKIT_EXPORT qt_drt_setTimelineProfilingEnabled(QWebPage* page, bool enabled) +{ + InspectorController* controller = page->handle()->page->inspectorController(); + if (!controller) + return; + if (enabled) + controller->startTimelineProfiler(); + else + controller->stopTimelineProfiler(); +} +#endif + class QWebPageWidgetClient : public QWebPageClient { public: QWebPageWidgetClient(QWidget* view) diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp index a94a3aa..d60f09c 100644 --- a/WebKit/qt/Api/qwebsettings.cpp +++ b/WebKit/qt/Api/qwebsettings.cpp @@ -215,6 +215,10 @@ void QWebSettingsPrivate::apply() global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); settings->setAllowUniversalAccessFromFileURLs(value); + value = attributes.value(QWebSettings::LocalContentCanAccessFileUrls, + global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls)); + settings->setAllowFileAccessFromFileURLs(value); + value = attributes.value(QWebSettings::XSSAuditorEnabled, global->attributes.value(QWebSettings::XSSAuditorEnabled)); settings->setXSSAuditorEnabled(value); @@ -363,6 +367,7 @@ QWebSettings* QWebSettings::globalSettings() \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use QWebSettings::LocalStorageEnabled instead. \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls. + \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are allowed to access other local urls. \value XSSAuditorEnabled Specifies whether load requests should be monitored for cross-site scripting attempts. */ @@ -394,6 +399,7 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, false); d->attributes.insert(QWebSettings::LocalStorageEnabled, false); d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false); + d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true); d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, false); d->offlineStorageDefaultQuota = 5 * 1024 * 1024; d->defaultTextEncoding = QLatin1String("iso-8859-1"); diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h index 77f2167..b1f5cf2 100644 --- a/WebKit/qt/Api/qwebsettings.h +++ b/WebKit/qt/Api/qwebsettings.h @@ -67,6 +67,7 @@ public: LocalStorageDatabaseEnabled = LocalStorageEnabled, #endif LocalContentCanAccessRemoteUrls, + LocalContentCanAccessFileUrls, DnsPrefetchEnabled, XSSAuditorEnabled, AcceleratedCompositingEnabled diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index e0d1b28..fb832b3 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,203 @@ +2010-02-18 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Minor improvement to hybrid QPixmap + https://bugs.webkit.org/show_bug.cgi?id=34507 + + * tests/hybridPixmap/test.html: use assignToHTMLImageElement on an + existing element instead of toHTMLImageElement which creates a new one + +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * Api/qwebframe_p.h: + (QWebFramePrivate::setPage): Added. + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::didTransferChildFrameToNewDocument): + The QWebFrame caches a QWebPage which should be replaced when Frame is re-parented. + Also, the QWebFrame is a child (in QT terms) of QWebPage - so update that relationship as well. + Emit a signal that QWebFrame moved to a different QWebPage. + + * WebCoreSupport/FrameLoaderClientQt.h: + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::iconForFiles): + * WebCoreSupport/ChromeClientQt.h: + +2010-02-17 Diego Gonzalez <diego.gonzalez@openbossa.org> + + Reviewed by Ariya Hidayat. + + Make possible Qt DRT to get total number of pages to be printed + + LayoutTests: + printing/numberOfPages.html + + [Qt] DRT: Get total number of pages to be printed + https://bugs.webkit.org/show_bug.cgi?id=34955 + + * Api/qwebframe.cpp: + (qt_drt_numberOfPages): + (qt_drt_evaluateScriptInIsolatedWorld): + +2010-02-16 Ariya Hidayat <ariya.hidayat@gmail.com> + + Reviewed by Simon Hausmann. + + [Qt] Allow scrolling to an anchor programmatically. + https://bugs.webkit.org/show_bug.cgi?id=29856 + + * Api/qwebframe.cpp: + (QWebFrame::scrollToAnchor): New API function. + * Api/qwebframe.h: + * tests/qwebframe/tst_qwebframe.cpp: New tests for scrollToAnchor(). + +2010-02-16 Ariya Hidayat <ariya.hidayat@gmail.com> + + Reviewed by Laszlo Gombos. + + Fix building with Qt < 4.6. + https://bugs.webkit.org/show_bug.cgi?id=34885 + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::updateResizesToContentsForPage): + +2010-02-16 Simon Hausmann <simon.hausmann@nokia.com> + + Unreviewed Symbian build fix. + + Updated the def file with two new exports used by QtLauncher. + + * symbian/eabi/QtWebKitu.def: + +2010-02-16 Ismail Donmez <ismail@namtrac.org> + + Reviewed by Pavel Feldman. + + Fix compilation with inspector disabled. + https://bugs.webkit.org/show_bug.cgi?id=32724 + + * Api/qwebpage.cpp: + (qt_drt_webinspector_executeScript): + (qt_drt_webinspector_close): + (qt_drt_webinspector_show): + (qt_drt_setTimelineProfilingEnabled): + +2010-02-16 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausman. + + [Qt] Fix include paths for forwarding headers in standalone builds. + + * Api/DerivedSources.pro: Use relative paths for package builds and added some + documentation. + +2010-02-15 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] QtWebkit bridge: enable passing a QWebElement to a signal/slot/property + Add Q_DECLARE_METATYPE to QWebElement, add relevant tests to + tst_qwebframe + https://bugs.webkit.org/show_bug.cgi?id=34901 + + * Api/qwebelement.h: declare metatype + * tests/qwebframe/tst_qwebframe.cpp: + (MyQObject::webElementProperty): new test for QWebElement + (MyQObject::setWebElementProperty): new test for QWebElement + (MyQObject::myOverloadedSlot): new test for QWebElement + +2010-02-15 Robert Hogan <robert@roberthogan.net>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled(). + + Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT. + + https://bugs.webkit.org/show_bug.cgi?id=33096 + + This allows the following tests to pass: + + inspector/console-format-collections.html + inspector/styles-iframe.html + inspector/syntax-highlight-css.html + inspector/syntax-highlight-javascript.html + inspector/timeline-enum-stability.html + inspector/timeline-layout.html + inspector/timeline-mark-timeline.html + inspector/timeline-paint.html + inspector/timeline-parse-html.html + inspector/timeline-recalculate-styles.html + inspector/timeline-script-tag-1.html + inspector/timeline-script-tag-2.html + inspector/timeline-trivial.html + inspector/cookie-resource-match.html + inspector/elements-img-tooltip.html + inspector/elements-panel-selection-on-refresh.html + inspector/inspected-objects-not-overriden.html + inspector/timeline-event-dispatch.html + inspector/timeline-network-resource.html + inspector/elements-panel-rewrite-href.html + inspector/console-dir.html + inspector/console-dirxml.html + inspector/console-format.html + inspector/console-tests.html + inspector/elements-panel-structure.html + inspector/evaluate-in-frontend.html + inspector/console-clear.html + + * Api/qwebpage.cpp: + (qt_drt_webinspector_executeScript): + (qt_drt_webinspector_close): + (qt_drt_webinspector_show): + (qt_drt_setTimelineProfilingEnabled): + + * WebCoreSupport/InspectorClientQt.cpp: + (InspectorClientQt::createPage) + +2010-02-12 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Kenneth Rohde Christiansen and Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=34885 + Add a QGraphicsWebView mode that makes it automatically resize itself to the size of the content. + + This is useful for cases where the client wants to implement page panning and zooming by manipulating + the graphics item. + + Add a option to QGVLauncher to test this mode. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): + (QGraphicsWebViewPrivate::updateResizesToContentsForPage): + (QGraphicsWebViewPrivate::_q_contentsSizeChanged): + (QGraphicsWebView::setPage): + (QGraphicsWebView::setResizesToContents): + (QGraphicsWebView::resizesToContents): + * Api/qgraphicswebview.h: + * QGVLauncher/main.cpp: + (WebView::WebView): + (MainView::MainView): + (MainView::setMainWidget): + (MainView::resizeEvent): + (main): + 2010-02-12 Diego Gonzalez <diego.gonzalez@openbossa.org> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKit/qt/QGVLauncher/main.cpp b/WebKit/qt/QGVLauncher/main.cpp index 0536af5..448b4b0 100644 --- a/WebKit/qt/QGVLauncher/main.cpp +++ b/WebKit/qt/QGVLauncher/main.cpp @@ -74,6 +74,8 @@ public: { if (QApplication::instance()->arguments().contains("--cacheWebView")) setCacheMode(QGraphicsItem::DeviceCoordinateCache); + if (QApplication::instance()->arguments().contains("--resizesToContents")) + setResizesToContents(true); } void setYRotation(qreal angle) { @@ -129,8 +131,11 @@ public: , m_numTotalPaints(0) , m_numPaintsSinceLastMeasure(0) { - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + // Use the graphics view scrollbars when the webview is set to size to the content. + if (!QApplication::instance()->arguments().contains("--resizesToContents")) { + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + } setFrameShape(QFrame::NoFrame); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); @@ -143,17 +148,19 @@ public: } } - void setMainWidget(QGraphicsWidget* widget) + void setMainWidget(WebView* widget) { - QRectF rect(QRect(QPoint(0, 0), size())); - widget->setGeometry(rect); m_mainWidget = widget; + if (m_mainWidget->resizesToContents()) + return; + QRectF rect(QRect(QPoint(0, 0), size())); + m_mainWidget->setGeometry(rect); } void resizeEvent(QResizeEvent* event) { QGraphicsView::resizeEvent(event); - if (!m_mainWidget) + if (!m_mainWidget || m_mainWidget->resizesToContents()) return; QRectF rect(QPoint(0, 0), event->size()); m_mainWidget->setGeometry(rect); @@ -231,7 +238,7 @@ signals: void flipRequest(); private: - QGraphicsWidget* m_mainWidget; + WebView* m_mainWidget; bool m_measureFps; int m_numTotalPaints; int m_numPaintsSinceLastMeasure; @@ -493,7 +500,7 @@ int main(int argc, char** argv) { QApplication app(argc, argv); if (app.arguments().contains("--help")) { - qDebug() << "Usage: QGVLauncher [--url url] [--compositing] [--updateMode Full|Minimal|Smart|No|BoundingRect] [--cacheWebView]\n"; + qDebug() << "Usage: QGVLauncher [--url url] [--compositing] [--updateMode Full|Minimal|Smart|No|BoundingRect] [--cacheWebView] [--resizesToContents]\n"; return 0; } QString url = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html")); diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index 893a1b7..ecbabe4 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -463,6 +463,12 @@ void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileC } } +void ChromeClientQt::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +{ + // FIXME: Move the code of Icon::createIconForFiles() here. + notImplemented(); +} + bool ChromeClientQt::setCursor(PlatformCursorHandle) { notImplemented(); diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h index 6b3017d..3d5cbe9 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h @@ -138,6 +138,7 @@ namespace WebCore { #endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); + virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); virtual void formStateDidChange(const Node*) { } diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 16a6faa..2eb2761 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -1066,6 +1066,24 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String return frameData.frame.release(); } +void FrameLoaderClientQt::didTransferChildFrameToNewDocument() +{ + ASSERT(m_frame->ownerElement()); + + if (!m_webFrame) + return; + + Frame* parentFrame = m_webFrame->d->frame->tree()->parent(); + ASSERT(parentFrame); + + if (QWebFrame* parent = QWebFramePrivate::kit(parentFrame)) { + m_webFrame->d->setPage(parent->page()); + + if (m_webFrame->parent() != qobject_cast<QObject*>(parent)) + m_webFrame->setParent(parent); + } +} + ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& _mimeType) { // qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<_mimeType; diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h index 32b9caa..adeb31c 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h @@ -194,6 +194,7 @@ namespace WebCore { virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ; + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool); virtual void redirectDataToPlugin(Widget* pluginWidget); diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp index 4927ea8..5f343ff 100644 --- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp @@ -83,16 +83,19 @@ void InspectorClientQt::inspectorDestroyed() Page* InspectorClientQt::createPage() { - QWebView* inspectorView = new QWebView; - InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView); - inspectorView->setPage(inspectorPage); - m_inspectorView.set(inspectorView); + QWebView* inspectorView = m_inspectorView.get(); + if (!inspectorView) { + inspectorView = new QWebView; + InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView); + inspectorView->setPage(inspectorPage); + m_inspectorView.set(inspectorView); + } - inspectorPage->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html")); + inspectorView->page()->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html")); m_inspectedWebPage->d->inspectorFrontend = inspectorView; m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView); - return m_inspectorView->page()->d->page; + return inspectorView->page()->d->page; } String InspectorClientQt::localizedStringsURL() diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def index 78523c6..f53bb0d 100644 --- a/WebKit/qt/symbian/eabi/QtWebKitu.def +++ b/WebKit/qt/symbian/eabi/QtWebKitu.def @@ -696,4 +696,6 @@ EXPORTS _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME _ZN13QWebInspector10closeEventEP11QCloseEvent @ 696 NONAME _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME + _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME + _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME diff --git a/WebKit/qt/tests/hybridPixmap/test.html b/WebKit/qt/tests/hybridPixmap/test.html index ddaf75c..0f2c345 100644 --- a/WebKit/qt/tests/hybridPixmap/test.html +++ b/WebKit/qt/tests/hybridPixmap/test.html @@ -9,11 +9,17 @@ var obj = myWidget.image; var pxm = myWidget.pixmap; - var img = obj.toHTMLImageElement(); + var img = new Image; + obj.assignToHTMLImageElement(img); var img1 = document.getElementById("img1"); var img2 = document.getElementById("img2"); + var img3 = document.getElementById("img3"); + var img4 = document.getElementById("img4"); document.body.appendChild(img); - document.body.appendChild(pxm.toHTMLImageElement()); + obj.assignToHTMLImageElement(img3); + pxm.assignToHTMLImageElement(img4); + myWidget.compare(pxm.width, img4.width); + myWidget.compare(obj.width, img3.width); var signalsFired = 0; myWidget.compare(obj.toString(),"[Qt Native Pixmap "+obj.width+","+obj.height+"]"); myWidget.compare(String(pxm),"[Qt Native Pixmap "+pxm.width+","+pxm.height+"]"); @@ -53,5 +59,7 @@ <body onload="startTest()"> <img id="img1" /> <img id="img2" /> + <img id="img3" /> + <img id="img4" /> </body> </html> diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 0fb0bd6..5ac3769 100644 --- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -66,6 +66,7 @@ class MyQObject : public QObject Q_PROPERTY(int readOnlyProperty READ readOnlyProperty) Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType) + Q_PROPERTY(QWebElement webElementProperty READ webElementProperty WRITE setWebElementProperty) Q_ENUMS(Policy Strategy) Q_FLAGS(Ability) @@ -181,6 +182,14 @@ public: m_shortcut = seq; } + QWebElement webElementProperty() const { + return m_webElement; + } + + void setWebElementProperty(const QWebElement& element) { + m_webElement = element; + } + CustomType propWithCustomType() const { return m_customType; } @@ -433,6 +442,10 @@ public Q_SLOTS: m_qtFunctionInvoked = 35; m_actuals << arg; } + void myOverloadedSlot(const QWebElement &arg) { + m_qtFunctionInvoked = 36; + m_actuals << QVariant::fromValue<QWebElement>(arg); + } void qscript_call(int arg) { m_qtFunctionInvoked = 40; @@ -467,6 +480,7 @@ private: int m_writeOnlyValue; int m_readOnlyValue; QKeySequence m_shortcut; + QWebElement m_webElement; CustomType m_customType; int m_qtFunctionInvoked; QVariantList m_actuals; @@ -570,6 +584,7 @@ private slots: void hasSetFocus(); void render(); void scrollPosition(); + void scrollToAnchor(); void evaluateWillCauseRepaint(); void qObjectWrapperWithSameIdentity(); void scrollRecursively(); @@ -685,6 +700,7 @@ void tst_QWebFrame::cleanup() void tst_QWebFrame::getSetStaticProperty() { + m_page->mainFrame()->setHtml("<html><head><body></body></html>"); QCOMPARE(evalJS("typeof myObject.noSuchProperty"), sUndefined); // initial value (set in MyQObject constructor) @@ -824,6 +840,8 @@ void tst_QWebFrame::getSetStaticProperty() QCOMPARE(evalJS("myObject.stringListProperty[1]"), QLatin1String("two")); QCOMPARE(evalJS("typeof myObject.stringListProperty[2]"), sString); QCOMPARE(evalJS("myObject.stringListProperty[2]"), QLatin1String("true")); + evalJS("myObject.webElementProperty=document.body;"); + QCOMPARE(evalJS("myObject.webElementProperty.tagName"), QLatin1String("BODY")); // try to delete QCOMPARE(evalJS("delete myObject.intProperty"), sFalse); @@ -1886,6 +1904,12 @@ void tst_QWebFrame::overloadedSlots() f.call(QString(), QStringList() << m_engine->newVariant(QVariant("ciao"))); QCOMPARE(m_myObject->qtFunctionInvoked(), 35); */ + + // should pick myOverloadedSlot(QRegExp) + m_myObject->resetQtFunctionInvoked(); + evalJS("myObject.myOverloadedSlot(document.body)"); + QCOMPARE(m_myObject->qtFunctionInvoked(), 36); + // should pick myOverloadedSlot(QObject*) m_myObject->resetQtFunctionInvoked(); evalJS("myObject.myOverloadedSlot(myObject)"); @@ -2741,6 +2765,38 @@ void tst_QWebFrame::scrollPosition() QCOMPARE(y, 29); } +void tst_QWebFrame::scrollToAnchor() +{ + QWebPage page; + page.setViewportSize(QSize(480, 800)); + QWebFrame* frame = page.mainFrame(); + + QString html("<html><body><p style=\"margin-bottom: 1500px;\">Hello.</p>" + "<p><a id=\"foo\">This</a> is an anchor</p>" + "<p style=\"margin-bottom: 1500px;\"><a id=\"bar\">This</a> is another anchor</p>" + "</body></html>"); + frame->setHtml(html); + frame->setScrollPosition(QPoint(0, 0)); + QCOMPARE(frame->scrollPosition().x(), 0); + QCOMPARE(frame->scrollPosition().y(), 0); + + QWebElement fooAnchor = frame->findFirstElement("a[id=foo]"); + + frame->scrollToAnchor("foo"); + QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top()); + + frame->scrollToAnchor("bar"); + frame->scrollToAnchor("foo"); + QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top()); + + frame->scrollToAnchor("top"); + QCOMPARE(frame->scrollPosition().y(), 0); + + frame->scrollToAnchor("bar"); + frame->scrollToAnchor("notexist"); + QVERIFY(frame->scrollPosition().y() != 0); +} + void tst_QWebFrame::evaluateWillCauseRepaint() { QWebView view; diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index feb22a1..8dd19ad 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,109 @@ +2010-02-17 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Dan Bernstein. + + WebKit on Windows needs a mechanism to listen for WM_SETTINGCHANGED messages + https://bugs.webkit.org/show_bug.cgi?id=35076 + + * WebKit.vcproj/WebKit.def: Added WebKitSystemParameterChanged. + * WebKit.vcproj/WebKit_debug.def: Added WebKitSystemParameterChanged. + * WebKitGraphics.cpp: + (WebKitSystemParameterChanged): Call through to wkSystemFontSmoothingChanged for font smoothing changes. + * WebKitGraphics.h: Added WebKitSystemParameterChanged. + +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::didTransferChildFrameToNewDocument): + Added empty implementation of a new virtual method. + + * WebCoreSupport/WebFrameLoaderClient.h: + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::iconForFiles): + * WebCoreSupport/WebChromeClient.h: + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Unreviewed. Touch WebKit.idl to fix the build. + + [Win] Implement test functions for printing + https://bugs.webkit.org/show_bug.cgi?id=34570 + + * Interfaces/WebKit.idl: + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + [Win] Implement test functions for printing + https://bugs.webkit.org/show_bug.cgi?id=34570 + + * Interfaces/IWebFramePrivate.idl: + * WebFrame.cpp: + (WebFrame::pageNumberForElementById): + (WebFrame::numberOfPages): + * WebFrame.h: + +2010-02-16 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Generalize delayed plug-in start for background tabs for use for other media + https://bugs.webkit.org/show_bug.cgi?id=34981 + + * WebView.cpp: + (WebView::setCanStartPlugins): Change to call setCanStartMedia. + In a later patch we can change the of the public function in the IDL file too, + but for now this should be enough. + +2010-02-15 Adam Roben <aroben@apple.com> + + Add IWebFramePrivate::visibleContentRect + + Fixes <http://webkit.org/b/34956> Add API to get a WebFrame's visible + content rect + + Reviewed by Jon Honeycutt. + + * Interfaces/IWebFramePrivate.idl: Added visibleContentRect. + + * Interfaces/WebKit.idl: Touched to force a build. + + * WebFrame.cpp: + (WebFrame::visibleContentRect): + * WebFrame.h: + Added. Calls through to FrameView::visibleContentRect. + +2010-02-12 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + onmouseout fired when moving over tooltip on Windows + https://bugs.webkit.org/show_bug.cgi?id=16794 + <rdar://5762038>. + + Add WS_EX_TRANSPARENT to out tooltip HWND so it isn't subject to hit testing, and when + you mouse over the tooltip, it doesn't send a mouseout to the web content. + + * WebView.cpp: + (WebView::initializeToolTipWindow): Add WS_EX_TRANSPARENT. + 2010-02-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl index ef1c133..4e26cfa 100755 --- a/WebKit/win/Interfaces/IWebFramePrivate.idl +++ b/WebKit/win/Interfaces/IWebFramePrivate.idl @@ -102,4 +102,10 @@ interface IWebFramePrivate : IUnknown HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result); HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); + + HRESULT visibleContentRect([out, retval] RECT*); + + HRESULT pageNumberForElementById([in] BSTR id, [in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber); + + HRESULT numberOfPages([in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber); } diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl index 613a53d..54c1d42 100644 --- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl +++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl @@ -100,4 +100,7 @@ interface IWebPreferencesPrivate : IUnknown HRESULT setCustomDragCursorsEnabled([in] BOOL); HRESULT customDragCursorsEnabled([out, retval] BOOL*); + + HRESULT allowFileAccessFromFileURLs([out, retval] BOOL *allowAccess); + HRESULT setAllowFileAccessFromFileURLs([in] BOOL allowAccess); } diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index 3cd748c..0de6b0b 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -283,7 +283,7 @@ library WebKit coclass WebScriptWorld { [default] interface IWebScriptWorld; } - + [uuid(13C45703-A3B3-8797-276B-75632F6165C3)] coclass WebSerializedJSValue { [default] interface IWebSerializedJSValue; diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index a1bb3a8..45f7662 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -734,6 +734,12 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChoose // FIXME: Show some sort of error if too many files are selected and the buffer is too small. For now, this will fail silently. } +void WebChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +{ + // FIXME: Move the code of Icon::createIconForFiles() here. + notImplemented(); +} + bool WebChromeClient::setCursor(PlatformCursorHandle cursor) { if (!cursor) diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index 5198e7c..0958cf7 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -123,6 +123,7 @@ public: virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&); virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); + virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); virtual bool setCursor(WebCore::PlatformCursorHandle cursor); diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp index b927c72..6ae6c5e 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp @@ -737,6 +737,10 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin return result.release(); } +void WebFrameLoaderClient::didTransferChildFrameToNewDocument() +{ +} + PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer) { Frame* coreFrame = core(m_webFrame); diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h index f1fb5f7..a5f2b1b 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h @@ -112,6 +112,7 @@ public: virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&, bool loadManually); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index b7ad014..8e03794 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -86,6 +86,7 @@ #include <WebCore/PluginInfoStore.h> #include <WebCore/PluginDatabase.h> #include <WebCore/PluginView.h> +#include <WebCore/PrintContext.h> #include <WebCore/ResourceHandle.h> #include <WebCore/ResourceHandleWin.h> #include <WebCore/ResourceRequest.h> @@ -849,6 +850,44 @@ HRESULT STDMETHODCALLTYPE WebFrame::counterValueForElementById( return S_OK; } +HRESULT STDMETHODCALLTYPE WebFrame::pageNumberForElementById( + /* [in] */ BSTR id, + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result) +{ + if (!result) + return E_POINTER; + + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + String coreId = String(id, SysStringLen(id)); + + Element* element = coreFrame->document()->getElementById(coreId); + if (!element) + return E_FAIL; + *result = PrintContext::pageNumberForElement(element, FloatSize(pageWidthInPixels, pageHeightInPixels)); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebFrame::numberOfPages( + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result) +{ + if (!result) + return E_POINTER; + + Frame* coreFrame = core(this); + if (!coreFrame) + return E_FAIL; + + *result = PrintContext::numberOfPages(coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels)); + return S_OK; +} + HRESULT STDMETHODCALLTYPE WebFrame::scrollOffset( /* [retval][out] */ SIZE* offset) { @@ -1192,6 +1231,24 @@ HRESULT WebFrame::pauseSVGAnimation(BSTR elementId, IDOMNode* node, double secon return S_OK; } +HRESULT WebFrame::visibleContentRect(RECT* rect) +{ + if (!rect) + return E_POINTER; + SetRectEmpty(rect); + + Frame* frame = core(this); + if (!frame) + return E_FAIL; + + FrameView* view = frame->view(); + if (!view) + return E_FAIL; + + *rect = view->visibleContentRect(false); + return S_OK; +} + HRESULT WebFrame::numberOfActiveAnimations(UINT* number) { if (!number) diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h index 1a92751..f4973ea 100644 --- a/WebKit/win/WebFrame.h +++ b/WebKit/win/WebFrame.h @@ -162,6 +162,17 @@ public: /* [in] */ BSTR id, /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE pageNumberForElementById( + /* [in] */ BSTR id, + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result); + + virtual HRESULT STDMETHODCALLTYPE numberOfPages( + /* [in] */ float pageWidthInPixels, + /* [in] */ float pageHeightInPixels, + /* [retval][out] */ int* result); + virtual HRESULT STDMETHODCALLTYPE scrollOffset( /* [retval][out] */ SIZE* offset); @@ -252,6 +263,8 @@ public: virtual HRESULT STDMETHODCALLTYPE stringByEvaluatingJavaScriptInScriptWorld(IWebScriptWorld*, JSObjectRef globalObjectRef, BSTR script, BSTR* evaluationResult); virtual JSGlobalContextRef STDMETHODCALLTYPE globalContextForScriptWorld(IWebScriptWorld*); + virtual HRESULT STDMETHODCALLTYPE visibleContentRect(RECT*); + // IWebDocumentText virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding( /* [retval][out] */ BOOL* result); diff --git a/WebKit/win/WebKit.vcproj/WebKit.def b/WebKit/win/WebKit.vcproj/WebKit.def index 8d091ec..9e6e55f 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.def +++ b/WebKit/win/WebKit.vcproj/WebKit.def @@ -20,6 +20,7 @@ EXPORTS WebKitSetShouldUseFontSmoothing WebKitShouldUseFontSmoothing WebKitCreateInstance + WebKitSystemParameterChanged ; These functions are deprecated WebLocalizedString diff --git a/WebKit/win/WebKit.vcproj/WebKit_debug.def b/WebKit/win/WebKit.vcproj/WebKit_debug.def index c15957a..fac9d6f 100644 --- a/WebKit/win/WebKit.vcproj/WebKit_debug.def +++ b/WebKit/win/WebKit.vcproj/WebKit_debug.def @@ -20,6 +20,7 @@ EXPORTS WebKitSetShouldUseFontSmoothing WebKitShouldUseFontSmoothing WebKitCreateInstance + WebKitSystemParameterChanged ; These functions are deprecated WebLocalizedString diff --git a/WebKit/win/WebKitGraphics.cpp b/WebKit/win/WebKitGraphics.cpp index 03fe903..444c43c 100644 --- a/WebKit/win/WebKitGraphics.cpp +++ b/WebKit/win/WebKitGraphics.cpp @@ -175,3 +175,9 @@ bool WebKitShouldUseFontSmoothing() { return WebCoreShouldUseFontSmoothing(); } + +void WebKitSystemParameterChanged(UINT parameter) +{ + if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION) + wkSystemFontSmoothingChanged(); +} diff --git a/WebKit/win/WebKitGraphics.h b/WebKit/win/WebKitGraphics.h index 59c874b..75ab36c 100644 --- a/WebKit/win/WebKitGraphics.h +++ b/WebKit/win/WebKitGraphics.h @@ -74,6 +74,8 @@ unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescr void WebKitSetShouldUseFontSmoothing(bool); bool WebKitShouldUseFontSmoothing(); +void WebKitSystemParameterChanged(UINT parameter); + } #endif // !defined(WebKitGraphics_h) diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h index 9f768f2..d1e0f5e 100644 --- a/WebKit/win/WebPreferenceKeysPrivate.h +++ b/WebKit/win/WebPreferenceKeysPrivate.h @@ -49,6 +49,7 @@ #define WebKitJavaScriptEnabledPreferenceKey "WebKitJavaScriptEnabled" #define WebKitWebSecurityEnabledPreferenceKey "WebKitWebSecurityEnabled" #define WebKitAllowUniversalAccessFromFileURLsPreferenceKey "WebKitAllowUniversalAccessFromFileURLs" +#define WebKitAllowFileAccessFromFileURLsPreferenceKey "WebKitAllowFileAccessFromFileURLs" #define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey "WebKitJavaScriptCanOpenWindowsAutomatically" #define WebKitPluginsEnabledPreferenceKey "WebKitPluginsEnabled" #define WebKitDatabasesEnabledPreferenceKey "WebKitDatabasesEnabled" diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp index 13c2ac4..0e44d9f 100644 --- a/WebKit/win/WebPreferences.cpp +++ b/WebKit/win/WebPreferences.cpp @@ -205,6 +205,7 @@ void WebPreferences::initializeDefaultSettings() CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitWebSecurityEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitAllowUniversalAccessFromFileURLsPreferenceKey), kCFBooleanFalse); + CFDictionaryAddValue(defaults, CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitXSSAuditorEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey), kCFBooleanFalse); CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue); @@ -792,6 +793,20 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setAllowUniversalAccessFromFileURLs( return S_OK; } +HRESULT STDMETHODCALLTYPE WebPreferences::allowFileAccessFromFileURLs( + /* [retval][out] */ BOOL* allowAccess) +{ + *allowAccess = boolValueForKey(CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey)); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebPreferences::setAllowFileAccessFromFileURLs( + /* [in] */ BOOL allowAccess) +{ + setBoolValue(CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), allowAccess); + return S_OK; +} + HRESULT STDMETHODCALLTYPE WebPreferences::isXSSAuditorEnabled( /* [retval][out] */ BOOL* enabled) { diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h index 9209b7d..e4af17a 100644 --- a/WebKit/win/WebPreferences.h +++ b/WebKit/win/WebPreferences.h @@ -362,6 +362,12 @@ public: virtual HRESULT STDMETHODCALLTYPE setAllowUniversalAccessFromFileURLs( /* [in] */ BOOL allowAccess); + virtual HRESULT STDMETHODCALLTYPE allowFileAccessFromFileURLs( + /* [retval][out] */ BOOL* allowAccess); + + virtual HRESULT STDMETHODCALLTYPE setAllowFileAccessFromFileURLs( + /* [in] */ BOOL allowAccess); + virtual HRESULT STDMETHODCALLTYPE isXSSAuditorEnabled( /* [retval][out] */ BOOL* enabled); diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 880c75f..8636d15 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008 Apple, Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,7 +24,6 @@ */ #include "config.h" - #include "WebView.h" #include "CFDictionaryPropertyBag.h" @@ -2596,7 +2595,7 @@ void WebView::initializeToolTipWindow() if (!initCommonControls()) return; - m_toolTipHwnd = CreateWindowEx(0, TOOLTIPS_CLASS, 0, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, + m_toolTipHwnd = CreateWindowEx(WS_EX_TRANSPARENT, TOOLTIPS_CLASS, 0, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, m_viewWindow, 0, 0, 0); if (!m_toolTipHwnd) @@ -4622,6 +4621,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setAllowUniversalAccessFromFileURLs(!!enabled); + hr = prefsPrivate->allowFileAccessFromFileURLs(&enabled); + if (FAILED(hr)) + return hr; + settings->setAllowFileAccessFromFileURLs(!!enabled); + hr = prefsPrivate->isXSSAuditorEnabled(&enabled); if (FAILED(hr)) return hr; @@ -5766,7 +5770,7 @@ HRESULT WebView::setJavaScriptURLsAreAllowed(BOOL areAllowed) HRESULT WebView::setCanStartPlugins(BOOL canStartPlugins) { - m_page->setCanStartPlugins(canStartPlugins); + m_page->setCanStartMedia(canStartPlugins); return S_OK; } diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog index 05efbd2..7d6d9dd 100644 --- a/WebKit/wx/ChangeLog +++ b/WebKit/wx/ChangeLog @@ -1,3 +1,30 @@ +2010-02-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by David Levin, Darin Fisher, Simon Hausmann. + + When a live iframe element is moved between pages, it still depends on the old page. + https://bugs.webkit.org/show_bug.cgi?id=34382 + + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::didTransferChildFrameToNewDocument): + Added empty implementation of a new virtual method. + + * WebKitSupport/FrameLoaderClientWx.h: + +2010-02-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Introduces new Icon loading interface in order to support + asynchronous loading. + https://bugs.webkit.org/show_bug.cgi?id=32054 + + Add an empty implementation of ChromeClient::iconForFiles(). + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::iconForFiles): + * WebKitSupport/ChromeClientWx.h: + 2010-02-04 Kevin Ollivier <kevino@theolliviers.com> Build fix after changes in r54345. diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp index 4d524bc..ac25daf 100644 --- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp +++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp @@ -431,6 +431,11 @@ void ChromeClientWx::runOpenPanel(Frame*, PassRefPtr<FileChooser>) notImplemented(); } +void ChromeClientWx::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +{ + notImplemented(); +} + bool ChromeClientWx::setCursor(PlatformCursorHandle) { notImplemented(); diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.h b/WebKit/wx/WebKitSupport/ChromeClientWx.h index bd4f1ec..71ae48d 100644 --- a/WebKit/wx/WebKitSupport/ChromeClientWx.h +++ b/WebKit/wx/WebKitSupport/ChromeClientWx.h @@ -125,6 +125,7 @@ public: #endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); + virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); virtual void formStateDidChange(const Node*) { } diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp index 5bb4dc1..6afdd88 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp @@ -841,6 +841,10 @@ PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String return childFrame.release(); } +void FrameLoaderClientWx::didTransferChildFrameToNewDocument() +{ +} + ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const String& mimeType) { notImplemented(); diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h index 0c29941..62218ff 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h @@ -201,6 +201,7 @@ namespace WebCore { virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) ; virtual void redirectDataToPlugin(Widget* pluginWidget); virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&); diff --git a/WebKitLibraries/ChangeLog b/WebKitLibraries/ChangeLog index 8eccc7d..0bc9e66 100644 --- a/WebKitLibraries/ChangeLog +++ b/WebKitLibraries/ChangeLog @@ -1,3 +1,23 @@ +2010-02-18 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Dan Bernstein. + + WebKit on Windows needs a mechanism to listen for WM_SETTINGCHANGED messages + https://bugs.webkit.org/show_bug.cgi?id=35076 + + * win/include/WebKitSystemInterface/WebKitSystemInterface.h: + * win/lib/WebKitSystemInterface.lib: Updated to add wkSystemFontSmoothingChanged. + * win/lib/WebKitSystemInterface_debug.lib: Updated to add wkSystemFontSmoothingChanged. + +2010-02-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build fix). + + Disable warnings preventing use of anonymous structs/onions - + don't take all my fun toys away, these are useful & awesome! + + * win/tools/vsprops/common.vsprops: + 2010-02-11 Brian Weinstein <bweinstein@apple.com> Rubber-stamped by Eric Seidel. diff --git a/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h b/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h index 824b44d..4534d6f 100644 --- a/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h +++ b/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h @@ -48,11 +48,14 @@ typedef const struct __CFNumber* CFNumberRef; typedef struct __CFReadStream* CFReadStreamRef; typedef const struct __CFURL* CFURLRef; typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef; +typedef struct tagLOGFONTW LOGFONTW; +typedef LOGFONTW LOGFONT; void wkSetFontSmoothingLevel(int type); int wkGetFontSmoothingLevel(); void wkSetFontSmoothingContrast(CGFloat); CGFloat wkGetFontSmoothingContrast(); +void wkSystemFontSmoothingChanged(); uint32_t wkSetFontSmoothingStyle(CGContextRef cg, bool fontAllowsSmoothing); void wkRestoreFontSmoothingStyle(CGContextRef cg, uint32_t oldStyle); void wkSetCGContextFontRenderingStyle(CGContextRef, bool isSystemFont, bool isPrinterFont, bool usePlatformNativeGlyphs); diff --git a/WebKitLibraries/win/lib/WebKitSystemInterface.lib b/WebKitLibraries/win/lib/WebKitSystemInterface.lib Binary files differindex f1857e7..ddcb692 100644 --- a/WebKitLibraries/win/lib/WebKitSystemInterface.lib +++ b/WebKitLibraries/win/lib/WebKitSystemInterface.lib diff --git a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib Binary files differindex 9722d97..965672f 100644 --- a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib +++ b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib diff --git a/WebKitLibraries/win/tools/vsprops/common.vsprops b/WebKitLibraries/win/tools/vsprops/common.vsprops index 8976ceb..28dfb67 100644 --- a/WebKitLibraries/win/tools/vsprops/common.vsprops +++ b/WebKitLibraries/win/tools/vsprops/common.vsprops @@ -15,7 +15,7 @@ WarningLevel="4" WarnAsError="true" DebugInformationFormat="3" - DisableSpecificWarnings="4018;4068;4099;4100;4127;4138;4180;4189;4244;4251;4275;4291;4305;4344;4355;4389;4503;4505;4510;4512;4610;4706;4800;4951;4952;4996;6011;6031;6211;6246;6255;6387" + DisableSpecificWarnings="4018;4068;4099;4100;4127;4138;4180;4189;4201;4244;4251;4275;4291;4305;4344;4355;4389;4503;4505;4510;4512;4610;4706;4800;4951;4952;4996;6011;6031;6211;6246;6255;6387" /> <Tool Name="VCLibrarianTool" diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json index 69ff238..3477c97 100644 --- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json +++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json @@ -24,6 +24,7 @@ { "name": "gtk-linux-slave-1", "platform": "gtk"}, { "name": "gtk-linux-slave-2", "platform": "gtk"}, { "name": "gtk-linux-slave-3", "platform": "gtk"}, + { "name": "gtk-linux-slave-4", "platform": "gtk"}, { "name": "szeged-linux-1", "platform": "qt"}, @@ -92,7 +93,7 @@ "slavenames": ["apple-windows-4", "apple-windows-3", "test-slave"] }, { - "name": "GTK Linux Release", "type": "BuildAndTest", "builddir": "gtk-linux-release", + "name": "GTK Linux 32-bit Release", "type": "BuildAndTest", "builddir": "gtk-linux-32-release", "platform": "gtk", "configuration": "release", "architectures": ["i386"], "slavenames": ["gtk-linux-slave-1"] }, @@ -107,6 +108,11 @@ "slavenames": ["gtk-linux-slave-3"] }, { + "name": "GTK Linux 64-bit Release", "type": "BuildAndTest", "builddir": "gtk-linux-64-release", + "platform": "gtk", "configuration": "release", "architectures": ["x86_64"], + "slavenames": ["gtk-linux-slave-4"] + }, + { "name": "Qt Linux Release", "type": "BuildAndTest", "builddir": "qt-linux-release", "platform": "qt", "configuration": "release", "architectures": ["i386"], "slavenames": ["szeged-linux-1"] @@ -132,7 +138,7 @@ "builderNames": ["Tiger Intel Release", "Leopard Intel Release (Build)", "Leopard Intel Debug (Build)", "SnowLeopard Intel Release (Build)", "SnowLeopard Intel Leaks", "Windows Release (Build)", "Windows Debug (Build)", - "GTK Linux Release", "GTK Linux 32-bit Debug", "GTK Linux 64-bit Debug", + "GTK Linux 32-bit Release", "GTK Linux 32-bit Debug", "GTK Linux 64-bit Debug", "GTK Linux 64-bit Release", "Qt Linux Release", "Chromium Win Release", "Chromium Mac Release", "Chromium Linux Release"] }, diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg index cd81108..1823277 100644 --- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg +++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg @@ -230,6 +230,42 @@ class RunWebKitTests(shell.Test): return [self.name] +class RunGtkAPITests(shell.Test): + name = "API tests" + description = ["API tests running"] + descriptionDone = ["API tests"] + command = ["perl", "./WebKitTools/Scripts/run-gtk-tests", WithProperties("--%(configuration)s")] + + def commandComplete(self, cmd): + shell.Test.commandComplete(self, cmd) + + logText = cmd.logs['stdio'].getText() + incorrectLines = [] + for line in logText.splitlines(): + if line.startswith('ERROR'): + incorrectLines.append(line) + + self.incorrectLines = incorrectLines + + def evaluateCommand(self, cmd): + if self.incorrectLines: + return FAILURE + + if cmd.rc != 0: + return FAILURE + + return SUCCESS + + def getText(self, cmd, results): + return self.getText2(cmd, results) + + def getText2(self, cmd, results): + if results != SUCCESS and self.incorrectLines: + return ["%d API tests failed" % self.incorrectLines] + + return [self.name] + + class RunWebKitLeakTests(RunWebKitTests): def start(self): self.setCommand(self.command + ["--leaks"]) @@ -312,6 +348,8 @@ class BuildAndTestFactory(Factory): self.addStep(ArchiveTestResults) self.addStep(UploadTestResults) self.addStep(ExtractTestResults) + if platform == "gtk": + self.addStep(RunGtkAPITests) class BuildAndTestLeaksFactory(BuildAndTestFactory): TestClass = RunWebKitLeakTests diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog index ab4b32d..6a4b7b3 100644 --- a/WebKitTools/ChangeLog +++ b/WebKitTools/ChangeLog @@ -1,3 +1,593 @@ +2010-02-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Need a final integration between QtLauncher and QGVLauncher + https://bugs.webkit.org/show_bug.cgi?id=35161 + + Add animated flip support to QtLauncher when running on QGraphicsView mode. + + * QtLauncher/main.cpp: + (LauncherWindow::initializeView): + (LauncherWindow::setupUI): + * QtLauncher/webview.cpp: + (WebViewGraphicsBased::WebViewGraphicsBased): + (WebViewGraphicsBased::animatedFlip): + (WebViewGraphicsBased::animatedYFlip): + * QtLauncher/webview.h: + (WebViewGraphicsBased::setYRotation): + (WebViewGraphicsBased::yRotation): + +2010-02-19 Andras Becsi <abecsi@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Implement textZoomIn() and textZoomOut() in DRT's EventSender, add results + for passing new tests and unskip the passing ones from the Skipped list. + https://bugs.webkit.org/show_bug.cgi?id=35159 + + * DumpRenderTree/qt/EventSenderQt.cpp: + (EventSender::textZoomIn): + (EventSender::textZoomOut): + * DumpRenderTree/qt/EventSenderQt.h: + +2010-02-19 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Eric Seidel. + + [Qt] Clean-up the handling of HTML5 persistent data for LayoutTests + https://bugs.webkit.org/show_bug.cgi?id=35004 + + DumpRenderTreeQt.cpp calls QWebSettings::enablePersistentStorage which sets up + and enables all HTML5 persistent data. All the other calls for setting the + persistent path or enabling the persistent feature are redundant. + + * DumpRenderTree/qt/DumpRenderTreeQt.cpp: + (WebCore::WebPage::WebPage): No need to enable AppCache again. + * DumpRenderTree/qt/main.cpp: + (main): No need to setup and enable HTML5 LocalStorage again. + +2010-02-19 Diego Gonzalez <diego.gonzalez@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Send the context menu event from contextClick() of EventSender + and do not show context menu in DRT. + + LayoutTests: + fast/events/contextmenu-scrolled-page-with-frame.html + + [Qt] DRT: Send context menu event from EventSender + https://bugs.webkit.org/show_bug.cgi?id=35131 + + * DumpRenderTree/qt/DumpRenderTreeQt.cpp: + (WebCore::DumpRenderTree::DumpRenderTree): + * DumpRenderTree/qt/EventSenderQt.cpp: + (EventSender::contextClick): + +2010-02-18 Chris Jerdonek <cjerdonek@webkit.org> + + Reviewed by Shinichiro Hamaji. + + Moved parsing-related code to a separate file. Also increased + the unit test coverage in some affected areas. + + https://bugs.webkit.org/show_bug.cgi?id=34675 + + This revision contains no new functionality. + + * Scripts/check-webkit-style: + - Adjusted to call check_webkit_style_parser(). + + * Scripts/webkitpy/style/checker.py: + - Added check_webkit_style_parser() to pass checker.py + configuration settings to optparser.py. + - Moved _create_usage() and the CommandOptionValues, + DefaultCommandOptionValues, ArgumentPrinter, and + ArgumentParser classes to optparser.py. + + * Scripts/webkitpy/style/checker_unittest.py: + - Moved the ProcessorOptionsTest, ArgumentPrinterTest, and + ArgumentParserTest classes to optparser.py. + - Added the CheckWebKitStyleFunctionTest class to check + the check_webkit_style_configuration() and + check_webkit_style_parser() code paths. + + * Scripts/webkitpy/style/optparser.py: Added. + - From checker.py, added _create_usage() and the + CommandOptionValues, DefaultCommandOptionValues, + ArgumentPrinter, and ArgumentParser classes. + - In the ArgumentParser constructor-- + - Added all_categories as a required parameter. + - Removed the default value from the default_options parameter. + + * Scripts/webkitpy/style/optparser_unittest.py: Added. + - From checker_unittest.py, added the ProcessorOptionsTest, + ArgumentPrinterTest, and ArgumentParserTest classes. + - Added the CreateUsageTest class to test _create_usage(). + + * Scripts/webkitpy/style/unittests.py: + - Added optparser_unittest import. + +2010-02-18 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=35134 + <rdar://problem/7246280> Crash when a plugin calls NPN_SetStatus(0) + + * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: + (testSetStatus): + (pluginInvoke): + Added a setStatus() method. + +2010-02-18 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Particularly constructed WebFrames can try to access a null HistoryItem + <rdar://problem/7638892> and https://bugs.webkit.org/show_bug.cgi?id=35063 + + Add the specific ability to test this API pattern. + + For now only on Mac, perhaps on the main Windows port later, probably not relevant for other ports. + + * DumpRenderTree/LayoutTestController.cpp: + (apiTestNewWindowDataLoadBaseURLCallback): + (LayoutTestController::staticFunctions): + * DumpRenderTree/LayoutTestController.h: + + * DumpRenderTree/mac/LayoutTestControllerMac.mm: + (-[APITestDelegate initWithCompletionCondition:]): + (-[APITestDelegate webView:didFailLoadWithError:forFrame:]): + (-[APITestDelegate webView:didFailProvisionalLoadWithError:forFrame:]): + (-[APITestDelegate webView:didFinishLoadForFrame:]): + (LayoutTestController::apiTestNewWindowDataLoadBaseURL): Create a WebView, do a loadData: in its + mainFrame, and synchronously wait for main load completion. + + * DumpRenderTree/win/LayoutTestControllerWin.cpp: + (LayoutTestController::apiTestNewWindowDataLoadBaseURL): + * DumpRenderTree/wx/LayoutTestControllerWx.cpp: + (LayoutTestController::apiTestNewWindowDataLoadBaseURL): + * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: + (LayoutTestController::apiTestNewWindowDataLoadBaseURL): + +2010-02-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Eric Seidel. + + Teach resolve-ChangeLogs to act as a merge-driver for Git + + https://bugs.webkit.org/show_bug.cgi?id=28721 + + To enable automatic merging of ChangeLog files, use the following command: + + git config merge.changelog.driver "resolve-ChangeLogs --merge-driver %O %A %B" + + The driver always works in "downstream" merge mode, meaning + it will always put the user's changelog entries on top. + + * Scripts/resolve-ChangeLogs: + +2009-12-05 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Eric Seidel. + + Enable running of GTK+ API tests. + + * BuildSlaveSupport/build.webkit.org-config/master.cfg: + * Scripts/run-gtk-tests: Added. + +2010-02-18 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Adam Barth. + + debug-safari doesn't pass --debug option to gdb-safari on MacOSX + https://bugs.webkit.org/show_bug.cgi?id=34411 + + * Scripts/webkitdirs.pm: + +2010-02-18 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + run-chromium-webkit-tests --platform=mac-leopard needs to run build-dumprendertree + https://bugs.webkit.org/show_bug.cgi?id=35053 + + * Scripts/webkitpy/layout_tests/port/base.py: Add script_path() function for finding scripts. + * Scripts/webkitpy/layout_tests/port/chromium.py: Remove unused argument. + * Scripts/webkitpy/layout_tests/port/mac.py: + - Make sure that calling webkit-build-directory works even if Scripts/ is not in the user's path. + - Call build-dumprendertree (and make sure it succeeds) before running the tests. + +2010-02-16 Chris Jerdonek <cjerdonek@webkit.org> + + Reviewed by Shinichiro Hamaji. + + Refactored check-webkit-style's ProcessorOptions class into two + classes. This revision contains no new functionality. + + https://bugs.webkit.org/show_bug.cgi?id=34674 + + Divided the ProcessorOptions class into a CommandOptionValues + class (the result of parsing the command-line options) and + a StyleCheckerConfiguration class (which configures the main + StyleChecker). + + * Scripts/check-webkit-style: + - Updated main() to convert the parsed command option values + to a StyleCheckConfiguration instance prior to constructing + a StyleChecker. + + * Scripts/webkitpy/style/checker.py: + - Added check_webkit_style_configuration() to convert a + CommandOptionValues instance into a StyleCheckerConfiguration + instance. + - Renamed the ProcessorOptions class to CommandOptionValues. + - In the CommandOptionValues class-- + - Replaced the filter_configuration attribute with the + simpler filter_rules attribute. + - Removed the max_reports_per_error attribute. + - Moved the is_reportable() method to the new + StyleCheckerConfiguration class. + - Removed the base_filter_rules attribute from the + DefaultCommandOptionValues class. + - In the ArgumentParser class-- + - Added base_filter_rules to the constructor. + - Changed the parse() method to return a CommandOptionValues + instance instead of a ProcessorOptions instance. + - Created a StyleCheckerConfiguration class. + - Added the data attributes max_reports_per_category, + stderr_write, and verbosity. + - Added is_reportable() (moved from the ProcessorOptions + class) and write_style_error() (moved from the + DefaultStyleErrorHandler class). + - In the StyleChecker class-- + - Replaced the ProcessorOptions options attribute with the + StyleCheckerConfiguration _configuration attribute. + - Removed the _stderr_write attribute. + + * Scripts/webkitpy/style/checker_unittest.py: + - Updated the existing unit test classes as necessary. + - Added a StyleCheckerConfigurationTest class. + + * Scripts/webkitpy/style/error_handlers.py: + - Updated the DefaultStyleErrorHandler class to accept a + StyleCheckerConfiguration instance instead of a ProcessorOptions + instance and an stderr_write method. + + * Scripts/webkitpy/style/error_handlers_unittest.py: + - Updated the unit test classes as necessary. + + * Scripts/webkitpy/style/filter.py: + - Addressed the FIXME in the FilterConfiguration class to change + the user_rules attribute to _user_rules (since it is now + accessed only internally). + + * Scripts/webkitpy/style/filter_unittest.py: + - Updated to reflect the change from user_rules to _user_rules. + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + Share the DRT values maxViewWidth/Height among ports + https://bugs.webkit.org/show_bug.cgi?id=34474 + + * DumpRenderTree/LayoutTestController.cpp: + (pageNumberForElementByIdCallback): + * DumpRenderTree/LayoutTestController.h: + (LayoutTestController::maxViewWidth): + (LayoutTestController::maxViewHeight): + * DumpRenderTree/gtk/DumpRenderTree.cpp: + (runTest): + * DumpRenderTree/mac/DumpRenderTree.mm: + (createWebViewAndOffscreenWindow): + (sizeWebViewForCurrentTest): + * DumpRenderTree/win/DumpRenderTree.cpp: + (dump): + (createWebViewAndOffscreenWindow): + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + [Win] Implement test functions for printing + https://bugs.webkit.org/show_bug.cgi?id=34570 + + * DumpRenderTree/win/LayoutTestControllerWin.cpp: + (LayoutTestController::pageNumberForElementById): + (LayoutTestController::numberOfPages): + +2010-02-17 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by Eric Seidel. + + websocket/tests/cookies/httponly-cookie.pl fails every time under run-chromium-webkit-tests + https://bugs.webkit.org/show_bug.cgi?id=35001 + + * Scripts/webkitpy/layout_tests/port/websocket_server.py: add -x flag to run pywebsocket. + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + check-webkit-style: Misses variables that contain underscores. + https://bugs.webkit.org/show_bug.cgi?id=33724 + + - Check identifiers whose types are unsigned. + - Check bitfields properly. + + * Scripts/webkitpy/style/processors/cpp.py: + * Scripts/webkitpy/style/processors/cpp_unittest.py: + +2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + check-webkit-style should report the number of files checked + https://bugs.webkit.org/show_bug.cgi?id=34971 + + * Scripts/check-webkit-style: + * Scripts/webkitpy/style/checker.py: + * Scripts/webkitpy/style/checker_unittest.py: + +2010-02-17 Diego Gonzalez <diego.gonzalez@openbossa.org> + + Reviewed by Ariya Hidayat. + + Make possible Qt DRT to get total number of pages to be printed + + LayoutTests: + printing/numberOfPages.html + + [Qt] DRT: Get total number of pages to be printed + https://bugs.webkit.org/show_bug.cgi?id=34955 + + * DumpRenderTree/qt/LayoutTestControllerQt.cpp: + (LayoutTestController::numberOfPages): + * DumpRenderTree/qt/LayoutTestControllerQt.h: + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Update to use new property name. + + * DumpRenderTree/gtk/DumpRenderTree.cpp: + (resetDefaultsToConsistentValues): + +2010-02-17 Julien Chaffraix <jchaffraix@webkit.org> + + Reviewed by Ariya Hidayat. + + Remove some warnings seen when building Qt + https://bugs.webkit.org/show_bug.cgi?id=35017 + + Using a machine without the needed tools to build WebKit leads to + several errors and warnings. + + * Scripts/webkitdirs.pm: Refactored the code testing the command's + presence into a commandExists routine. While doing so removed, stderr + output as it usually does not give anything more than our message. Also + added a Qt check for qmake that was missing. + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Rubber-stamped by Gustavo Noronha. + + Disable Java by default in DRT. + + * DumpRenderTree/gtk/DumpRenderTree.cpp: + (resetDefaultsToConsistentValues): + +2010-02-15 Chris Jerdonek <cjerdonek@webkit.org> + + Reviewed by Shinichiro Hamaji. + + Some minor check-webkit-style code clean-ups. This revision + contains no new functionality. + + https://bugs.webkit.org/show_bug.cgi?id=34932 + + * Scripts/check-webkit-style: + - Replaced the call to webkit_argument_defaults() with a + default parameter in the ArgumentParser constructor. + + * Scripts/webkitpy/style/checker.py: + - Removed the WEBKIT prefix from the default global variables. + - Prefixed several of the global variables with an underscore + to reflect that they are used internally. + - Renamed _DEFAULT_FILTER_RULES to _BASE_FILTER_RULES. + - Addressed a FIXME by changing the _PATH_RULES_SPECIFIER + configuration from list-tuple pairs to list-list pairs. + - Renamed style_categories() to _all_categories(). + - Renamed webkit_argument_defaults() to _check_webkit_style_defaults(). + - Renamed the ArgumentDefaults class to DefaultCommandOptionValues. + - In the ArgumentParser class-- + - Renamed the doc_print attribute to stderr_write. + - Other minor updates. + + * Scripts/webkitpy/style/checker_unittest.py: + - Updated the import statements and unit test classes as necessary. + - Added assertions to test _PATH_RULES_SPECIFIER more fully. + + * Scripts/webkitpy/style/error_handlers_unittest.py: + - Updated the unit test classes as necessary. + - Changed StyleErrorHandlerTestBase to store a list of error + messages rather than just the last one. + + * Scripts/webkitpy/style/filter.py: + - Altered FilterConfiguration._path_rules_from_path() + to convert the path_rules list to a tuple. + + * Scripts/webkitpy/style/filter_unittest.py: + - Updated the unit tests to reflect the change from tuples to + lists in the _PATH_RULES_SPECIFIER configuration variable. + +2010-02-16 Mark Rowe <mrowe@apple.com> + + Let's not check garbage in to common build scripts and hose the world now eh guys? + + * Scripts/webkitdirs.pm: + +2010-02-16 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + re-factor Skipped list parsing code into multiple functions and unit test it + https://bugs.webkit.org/show_bug.cgi?id=34986 + + * Scripts/test-webkitpy: Add new unit test. + * Scripts/webkitpy/layout_tests/__init__.py: Copied from WebKitTools/QueueStatusServer/filters/__init__.py. + * Scripts/webkitpy/layout_tests/port/mac.py: Split parsing function into multiple functions for testing. + * Scripts/webkitpy/layout_tests/port/mac_unittest.py: Added. + +2010-02-16 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Enable 'auto-resize-window' in our DRT. + + * DumpRenderTree/gtk/DumpRenderTree.cpp: + (resetDefaultsToConsistentValues): + +2010-02-15 Martin Robinson <mrobinson@webkit.org> + + Reviewed by Darin Adler. + + check-webkit-style should not complain about NULL sentinel in calls to g_strconcat and g_strjoin + https://bugs.webkit.org/show_bug.cgi?id=34834 + + * Scripts/webkitpy/style/processors/cpp.py: + * Scripts/webkitpy/style/processors/cpp_unittest.py: + +2010-02-12 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/7130641> Browser objects identity is not preserved by Safari + + * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: + (pluginInvoke): Added methods for checking object identity (via refcount). + +2010-02-15 Robert Hogan <robert@roberthogan.net> + + Reviewed by Simon Hausmann. + + [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled(). + + Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT. + + https://bugs.webkit.org/show_bug.cgi?id=33096 + + This allows the following tests to pass: + + inspector/console-format-collections.html + inspector/styles-iframe.html + inspector/syntax-highlight-css.html + inspector/syntax-highlight-javascript.html + inspector/timeline-enum-stability.html + inspector/timeline-layout.html + inspector/timeline-mark-timeline.html + inspector/timeline-paint.html + inspector/timeline-parse-html.html + inspector/timeline-recalculate-styles.html + inspector/timeline-script-tag-1.html + inspector/timeline-script-tag-2.html + inspector/timeline-trivial.html + inspector/cookie-resource-match.html + inspector/elements-img-tooltip.html + inspector/elements-panel-selection-on-refresh.html + inspector/inspected-objects-not-overriden.html + inspector/timeline-event-dispatch.html + inspector/timeline-network-resource.html + inspector/elements-panel-rewrite-href.html + inspector/console-dir.html + inspector/console-dirxml.html + inspector/console-format.html + inspector/console-tests.html + inspector/elements-panel-structure.html + inspector/evaluate-in-frontend.html + inspector/console-clear.html + + * DumpRenderTree/qt/DumpRenderTreeQt.cpp: + (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting): + (WebCore::isWebInspectorTest): + (WebCore::DumpRenderTree::open): + * DumpRenderTree/qt/DumpRenderTreeQt.h: + (WebCore::DumpRenderTree::display): + * DumpRenderTree/qt/LayoutTestControllerQt.cpp: + (LayoutTestController::closeWebInspector): + (LayoutTestController::showWebInspector): + (LayoutTestController::evaluateInWebInspector): + (LayoutTestController::setTimelineProfilingEnabled): + (LayoutTestController::display): + * DumpRenderTree/qt/LayoutTestControllerQt.h: + +2010-02-14 Dirk Pranke <dpranke@chromium.org> + + Reviewed by Eric Seidel. + + Update rebaseline-chromium-webkit-tests to work with the new code + structure (port objects instead of path_utils and platform_utils). + + Added a path_to_test_expectations_file() to the Port interface. + + Fixed a bug in the chromium_* platform implementations where the + 'target' option was assumed to be set. + + * Scripts/rebaseline-chromium-webkit-tests: + * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py: + * Scripts/webkitpy/layout_tests/port/base.py: + * Scripts/webkitpy/layout_tests/port/chromium.py: + * Scripts/webkitpy/layout_tests/port/chromium_linux.py: + * Scripts/webkitpy/layout_tests/port/chromium_mac.py: + * Scripts/webkitpy/layout_tests/port/chromium_win.py: + * Scripts/webkitpy/layout_tests/port/test.py: + * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py: + +2010-02-14 Eric Seidel <eric@webkit.org> + + Reviewed by Darin Adler. + + webkit-build-directory misuses terms + https://bugs.webkit.org/show_bug.cgi?id=34822 + + * Scripts/webkit-build-directory: + - Add --top-level and --configuration options and make using one of them required. + * Scripts/webkitpy/layout_tests/port/mac.py: + - Use --top-level instead of --base. + +2010-02-14 Chang Shu <Chang.Shu@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Enable appcache feature. + https://bugs.webkit.org/show_bug.cgi?id=34713 + + Re-land r54543 without the change in DumpRenderTree/qt/main.cpp. + Persistent storage for AppCache is already initialized in + DumpRenderTreeQt.cpp. + + * DumpRenderTree/qt/DumpRenderTreeQt.cpp: + (WebCore::WebPage::WebPage): + +2010-02-12 Chang Shu <Chang.Shu@nokia.com> + + Not Reviewed. + + Change case of my email address as a work-around for the following bug. + https://bugs.webkit.org/show_bug.cgi?id=34717 + + * Scripts/webkitpy/committers.py: + +2010-02-12 Darin Adler <darin@apple.com> + + Ignore compiled Python in more of webkitpy. + + * Scripts/webkitpy/style/processors: Added property svn:ignore. + 2010-02-12 Diego Gonzalez <diego.gonzalez@openbossa.org> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp index c2393c3..f528b31 100644 --- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp +++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp @@ -467,10 +467,8 @@ static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, static bool parsePageParameters(JSContextRef context, int argumentCount, const JSValueRef* arguments, JSValueRef* exception, float& pageWidthInPixels, float& pageHeightInPixels) { - // FIXME: These values should sync with maxViewWidth/Height in - // DumpRenderTree.mm. Factor these values out to somewhere. - pageWidthInPixels = 800; - pageHeightInPixels = 600; + pageWidthInPixels = LayoutTestController::maxViewWidth; + pageHeightInPixels = LayoutTestController::maxViewHeight; switch (argumentCount) { case 2: pageWidthInPixels = static_cast<float>(JSValueToNumber(context, arguments[0], exception)); @@ -940,6 +938,18 @@ static JSValueRef setAllowUniversalAccessFromFileURLsCallback(JSContextRef conte return JSValueMakeUndefined(context); } +static JSValueRef setAllowFileAccessFromFileURLsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + // Has mac & windows implementation + if (argumentCount < 1) + return JSValueMakeUndefined(context); + + LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); + controller->setAllowFileAccessFromFileURLs(JSValueToBoolean(context, arguments[0])); + + return JSValueMakeUndefined(context); +} + static JSValueRef setTabKeyCyclesThroughElementsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { // Has mac & windows implementation @@ -1252,6 +1262,22 @@ static JSValueRef addUserStyleSheetCallback(JSContextRef context, JSObjectRef, J return JSValueMakeUndefined(context); } +static JSValueRef apiTestNewWindowDataLoadBaseURLCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + if (argumentCount != 2) + return JSValueMakeUndefined(context); + + JSRetainPtr<JSStringRef> utf8Data(Adopt, JSValueToStringCopy(context, arguments[0], exception)); + ASSERT(!*exception); + + JSRetainPtr<JSStringRef> baseURL(Adopt, JSValueToStringCopy(context, arguments[1], exception)); + ASSERT(!*exception); + + LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); + controller->apiTestNewWindowDataLoadBaseURL(utf8Data.get(), baseURL.get()); + return JSValueMakeUndefined(context); +} + // Static Values static JSValueRef getGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) @@ -1328,6 +1354,7 @@ JSStaticFunction* LayoutTestController::staticFunctions() { "addDisallowedURL", addDisallowedURLCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "addUserScript", addUserScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "addUserStyleSheet", addUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "apiTestNewWindowDataLoadBaseURL", apiTestNewWindowDataLoadBaseURLCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "clearAllDatabases", clearAllDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, @@ -1380,6 +1407,7 @@ JSStaticFunction* LayoutTestController::staticFunctions() { "repaintSweepHorizontally", repaintSweepHorizontallyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setAcceptsEditing", setAcceptsEditingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setAllowUniversalAccessFromFileURLs", setAllowUniversalAccessFromFileURLsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "setAllowFileAccessFromFileURLs", setAllowFileAccessFromFileURLsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setAlwaysAcceptCookies", setAlwaysAcceptCookiesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setAppCacheMaximumSize", setAppCacheMaximumSizeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setAuthenticationPassword", setAuthenticationPasswordCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, @@ -1492,3 +1520,6 @@ void LayoutTestController::setPOSIXLocale(JSStringRef locale) JSStringGetUTF8CString(locale, localeBuf, sizeof(localeBuf)); setlocale(LC_ALL, localeBuf); } + +const unsigned LayoutTestController::maxViewWidth = 800; +const unsigned LayoutTestController::maxViewHeight = 600; diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h index 5f9df50..3add32a 100644 --- a/WebKitTools/DumpRenderTree/LayoutTestController.h +++ b/WebKitTools/DumpRenderTree/LayoutTestController.h @@ -69,6 +69,7 @@ public: void removeAllVisitedLinks(); void setAcceptsEditing(bool acceptsEditing); void setAllowUniversalAccessFromFileURLs(bool); + void setAllowFileAccessFromFileURLs(bool); void setAppCacheMaximumSize(unsigned long long quota); void setAuthorAndUserStylesEnabled(bool); void setCacheModel(int); @@ -232,6 +233,13 @@ public: void evaluateScriptInIsolatedWorld(unsigned worldId, JSObjectRef globalObject, JSStringRef script); void setPOSIXLocale(JSStringRef locale); + + // The following API test functions should probably be moved to platform-specific + // unit tests outside of DRT once they exist. + void apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL); + + static const unsigned maxViewWidth; + static const unsigned maxViewHeight; private: bool m_dumpAsPDF; diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp index e69da73..8e278f5 100644 --- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp +++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp @@ -176,6 +176,11 @@ enum { ID_TEST_RELOAD_PLUGINS_AND_PAGES, ID_TEST_GET_BROWSER_PROPERTY, ID_TEST_SET_BROWSER_PROPERTY, + ID_REMEMBER, + ID_GET_REMEMBERED_OBJECT, + ID_GET_AND_FORGET_REMEMBERED_OBJECT, + ID_REF_COUNT, + ID_SET_STATUS, NUM_METHOD_IDENTIFIERS }; @@ -205,7 +210,12 @@ static const NPUTF8 *pluginMethodIdentifierNames[NUM_METHOD_IDENTIFIERS] = { "reloadPluginsNoPages", "reloadPluginsAndPages", "testGetBrowserProperty", - "testSetBrowserProperty" + "testSetBrowserProperty", + "remember", + "getRememberedObject", + "getAndForgetRememberedObject", + "refCount", + "setStatus" }; static NPUTF8* createCStringFromNPVariant(const NPVariant* variant) @@ -747,6 +757,22 @@ bool testWindowOpen(NPP npp) return false; } +static bool testSetStatus(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result) +{ + char* message = 0; + if (argCount && NPVARIANT_IS_STRING(args[0])) { + NPString statusString = NPVARIANT_TO_STRING(args[0]); + message = toCString(statusString); + } + + browser->status(obj->npp, message); + + free(message); + return true; +} + +static NPObject* rememberedObject; + static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result) { PluginObject* plugin = reinterpret_cast<PluginObject*>(header); @@ -807,7 +833,29 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a } else if (name == pluginMethodIdentifiers[ID_TEST_SET_BROWSER_PROPERTY]) { browser->setproperty(plugin->npp, NPVARIANT_TO_OBJECT(args[0]), stringVariantToIdentifier(args[1]), &args[2]); return true; - } + } else if (name == pluginMethodIdentifiers[ID_REMEMBER]) { + if (rememberedObject) + browser->releaseobject(rememberedObject); + rememberedObject = NPVARIANT_TO_OBJECT(args[0]); + browser->retainobject(rememberedObject); + VOID_TO_NPVARIANT(*result); + return true; + } else if (name == pluginMethodIdentifiers[ID_GET_REMEMBERED_OBJECT]) { + assert(rememberedObject); + browser->retainobject(rememberedObject); + OBJECT_TO_NPVARIANT(rememberedObject, *result); + return true; + } else if (name == pluginMethodIdentifiers[ID_GET_AND_FORGET_REMEMBERED_OBJECT]) { + assert(rememberedObject); + OBJECT_TO_NPVARIANT(rememberedObject, *result); + rememberedObject = 0; + return true; + } else if (name == pluginMethodIdentifiers[ID_REF_COUNT]) { + uint32_t refCount = NPVARIANT_TO_OBJECT(args[0])->referenceCount; + INT32_TO_NPVARIANT(refCount, *result); + return true; + } else if (name == pluginMethodIdentifiers[ID_SET_STATUS]) + return testSetStatus(plugin, args, argCount, result); return false; } diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp index 39430cf..a2fc79b 100644 --- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp @@ -94,8 +94,6 @@ GSList* webViewList = 0; // current b/f item at the end of the previous test static WebKitWebHistoryItem* prevTestBFItem = NULL; -const unsigned maxViewHeight = 600; -const unsigned maxViewWidth = 800; const unsigned historyItemIndent = 8; static gchar* autocorrectURL(const gchar* url) @@ -335,6 +333,8 @@ static void resetDefaultsToConsistentValues() "minimum-font-size", 1, "enable-caret-browsing", FALSE, "enable-page-cache", FALSE, + "auto-resize-window", TRUE, + "enable-java-applet", FALSE, NULL); webkit_web_frame_clear_main_frame_name(mainFrame); @@ -477,8 +477,8 @@ static void runTest(const string& testPathOrURL) bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg/W3C-SVG-1.1") != string::npos); GtkAllocation size; size.x = size.y = 0; - size.width = isSVGW3CTest ? 480 : maxViewWidth; - size.height = isSVGW3CTest ? 360 : maxViewHeight; + size.width = isSVGW3CTest ? 480 : LayoutTestController::maxViewWidth; + size.height = isSVGW3CTest ? 360 : LayoutTestController::maxViewHeight; gtk_window_resize(GTK_WINDOW(window), size.width, size.height); gtk_widget_size_allocate(container, &size); diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp index 422e2c2..668b852 100644 --- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp +++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp @@ -348,6 +348,15 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool flag) g_object_set(G_OBJECT(settings), "enable-universal-access-from-file-uris", flag, NULL); } +void LayoutTestController::setAllowFileAccessFromFileURLs(bool flag) +{ + WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame); + ASSERT(view); + + WebKitWebSettings* settings = webkit_web_view_get_settings(view); + g_object_set(G_OBJECT(settings), "enable-file-access-from-file-uris", flag, NULL); +} + void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag) { // FIXME: implement @@ -586,3 +595,8 @@ void LayoutTestController::removeAllVisitedLinks() { // FIXME: Implement this. } + +void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL) +{ + +} diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm index 7a4429b..c7ddf21 100644 --- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm +++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm @@ -134,9 +134,6 @@ static RetainPtr<CFStringRef> persistentUserStyleSheetLocation; static WebHistoryItem *prevTestBFItem = nil; // current b/f item at the end of the previous test -const unsigned maxViewHeight = 600; -const unsigned maxViewWidth = 800; - #if __OBJC2__ static void swizzleAllMethods(Class imposter, Class original) { @@ -279,7 +276,7 @@ static void activateFonts() WebView *createWebViewAndOffscreenWindow() { - NSRect rect = NSMakeRect(0, 0, maxViewWidth, maxViewHeight); + NSRect rect = NSMakeRect(0, 0, LayoutTestController::maxViewWidth, LayoutTestController::maxViewHeight); WebView *webView = [[WebView alloc] initWithFrame:rect frameName:nil groupName:@"org.webkit.DumpRenderTree"]; [webView setUIDelegate:uiDelegate]; @@ -396,6 +393,7 @@ static void resetDefaultsToConsistentValues() WebPreferences *preferences = [WebPreferences standardPreferences]; [preferences setAllowUniversalAccessFromFileURLs:YES]; + [preferences setAllowFileAccessFromFileURLs:YES]; [preferences setStandardFontFamily:@"Times"]; [preferences setFixedFontFamily:@"Courier"]; [preferences setSerifFontFamily:@"Times"]; @@ -1020,7 +1018,7 @@ static void sizeWebViewForCurrentTest() if (isSVGW3CTest) [[mainFrame webView] setFrameSize:NSMakeSize(480, 360)]; else - [[mainFrame webView] setFrameSize:NSMakeSize(maxViewWidth, maxViewHeight)]; + [[mainFrame webView] setFrameSize:NSMakeSize(LayoutTestController::maxViewWidth, LayoutTestController::maxViewHeight)]; } static const char *methodNameStringForFailedTest() diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm index b726e72..66ba5f0 100644 --- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm +++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm @@ -334,6 +334,11 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled) [[[mainFrame webView] preferences] setAllowUniversalAccessFromFileURLs:enabled]; } +void LayoutTestController::setAllowFileAccessFromFileURLs(bool enabled) +{ + [[[mainFrame webView] preferences] setAllowFileAccessFromFileURLs:enabled]; +} + void LayoutTestController::setPopupBlockingEnabled(bool popupBlockingEnabled) { [[[mainFrame webView] preferences] setJavaScriptCanOpenWindowsAutomatically:!popupBlockingEnabled]; @@ -617,3 +622,67 @@ void LayoutTestController::evaluateScriptInIsolatedWorld(unsigned worldID, JSObj [mainFrame _stringByEvaluatingJavaScriptFromString:scriptNS withGlobalObject:globalObject inScriptWorld:world]; } + +@interface APITestDelegate : NSObject +{ + bool* m_condition; +} +@end + +@implementation APITestDelegate + +- (id)initWithCompletionCondition:(bool*)condition +{ + [super init]; + ASSERT(condition); + m_condition = condition; + *m_condition = false; + return self; +} + +- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame +{ + printf("API Test load failed\n"); + *m_condition = true; +} + +- (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame +{ + printf("API Test load failed provisional\n"); + *m_condition = true; +} + +- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame +{ + printf("API Test load succeeded\n"); + *m_condition = true; +} + +@end + +void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + RetainPtr<CFStringRef> utf8DataCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, utf8Data)); + RetainPtr<CFStringRef> baseURLCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, baseURL)); + + WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""]; + + bool done = false; + APITestDelegate *delegate = [[APITestDelegate alloc] initWithCompletionCondition:&done]; + [webView setFrameLoadDelegate:delegate]; + + [[webView mainFrame] loadData:[(NSString *)utf8DataCF.get() dataUsingEncoding:NSUTF8StringEncoding] MIMEType:@"text/html" textEncodingName:@"utf-8" baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()]]; + + while (!done) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; + [pool release]; + } + + [webView close]; + [webView release]; + [delegate release]; + [pool release]; +} diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp index c16a786..43f1318 100644 --- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp +++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp @@ -135,7 +135,6 @@ WebPage::WebPage(QObject* parent, DumpRenderTree* drt) globalSettings->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, true); globalSettings->setAttribute(QWebSettings::JavascriptEnabled, true); globalSettings->setAttribute(QWebSettings::PrivateBrowsingEnabled, false); - globalSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, false); connect(this, SIGNAL(geometryChangeRequested(const QRect &)), this, SLOT(setViewGeometry(const QRect & ))); @@ -324,6 +323,7 @@ DumpRenderTree::DumpRenderTree() m_mainView->resize(QSize(maxViewWidth, maxViewHeight)); m_page = new WebPage(m_mainView, this); m_mainView->setPage(m_page); + m_mainView->setContextMenuPolicy(Qt::NoContextMenu); // create our controllers. This has to be done before connectFrame, // as it exports there to the JavaScript DOM window. @@ -412,10 +412,23 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting() setlocale(LC_ALL, ""); } +static bool isWebInspectorTest(const QUrl& url) +{ + if (url.path().contains("inspector/")) + return true; + return false; +} + void DumpRenderTree::open(const QUrl& url) { resetToConsistentStateBeforeTesting(); + if (isWebInspectorTest(m_page->mainFrame()->url())) + layoutTestController()->closeWebInspector(); + + if (isWebInspectorTest(url)) + layoutTestController()->showWebInspector(); + // W3C SVG tests expect to be 480x360 bool isW3CTest = url.toString().contains("svg/W3C-SVG-1.1"); int width = isW3CTest ? 480 : maxViewWidth; diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h index 00d7ae4..8d80f87 100644 --- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h +++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h @@ -158,6 +158,7 @@ public: WebPage(QObject* parent, DumpRenderTree*); virtual ~WebPage(); QWebInspector* webInspector(); + void closeWebInspector(); QWebPage *createWindow(QWebPage::WebWindowType); diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp index 73a9934..1ef2d3f 100644 --- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp +++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp @@ -274,6 +274,8 @@ void EventSender::contextClick() QApplication::sendEvent(m_page, &event); QMouseEvent event2(QEvent::MouseButtonRelease, m_mousePos, Qt::RightButton, Qt::RightButton, Qt::NoModifier); QApplication::sendEvent(m_page, &event2); + QContextMenuEvent event3(QContextMenuEvent::Mouse, m_mousePos); + QApplication::sendEvent(m_page->view(), &event3); } void EventSender::scheduleAsynchronousClick() @@ -397,18 +399,28 @@ void EventSender::sendTouchEvent(QEvent::Type type) void EventSender::zoomPageIn() { - QWebFrame* frame = m_page->mainFrame(); - if (frame) + if (QWebFrame* frame = m_page->mainFrame()) frame->setZoomFactor(frame->zoomFactor() * ZOOM_STEP); } void EventSender::zoomPageOut() { - QWebFrame* frame = m_page->mainFrame(); - if (frame) + if (QWebFrame* frame = m_page->mainFrame()) frame->setZoomFactor(frame->zoomFactor() / ZOOM_STEP); } +void EventSender::textZoomIn() +{ + if (QWebFrame* frame = m_page->mainFrame()) + frame->setTextSizeMultiplier(frame->textSizeMultiplier() * ZOOM_STEP); +} + +void EventSender::textZoomOut() +{ + if (QWebFrame* frame = m_page->mainFrame()) + frame->setTextSizeMultiplier(frame->textSizeMultiplier() / ZOOM_STEP); +} + QWebFrame* EventSender::frameUnderMouse() const { QWebFrame* frame = m_page->mainFrame(); diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h index f6cfc7c..38bca89 100644 --- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h +++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h @@ -68,6 +68,8 @@ public slots: void touchEnd(); void zoomPageIn(); void zoomPageOut(); + void textZoomIn(); + void textZoomOut(); void clearTouchPoints(); void releaseTouchPoint(int index); diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp index 51c1181..a26bc3d 100644 --- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp +++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp @@ -41,6 +41,7 @@ extern void qt_dump_frame_loader(bool b); extern void qt_dump_resource_load_callbacks(bool b); extern void qt_drt_setFrameSetFlatteningEnabled(QWebPage*, bool); extern void qt_drt_setJavaScriptProfilingEnabled(QWebFrame*, bool enabled); +extern void qt_drt_setTimelineProfilingEnabled(QWebPage*, bool enabled); extern bool qt_drt_pauseAnimation(QWebFrame*, const QString& name, double time, const QString& elementId); extern bool qt_drt_pauseTransitionOfProperty(QWebFrame*, const QString& name, double time, const QString& elementId); extern bool qt_drt_pauseSVGAnimation(QWebFrame*, const QString& animationId, double time, const QString& elementId); @@ -51,6 +52,10 @@ extern void qt_drt_whiteListAccessFromOrigin(const QString& sourceOrigin, const extern QString qt_drt_counterValueForElementById(QWebFrame* qFrame, const QString& id); extern int qt_drt_workerThreadCount(); extern int qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QString& id, float width, float height); +extern int qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height); +extern void qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script); +extern void qt_drt_webinspector_show(QWebPage *page); +extern void qt_drt_webinspector_close(QWebPage *page); LayoutTestController::LayoutTestController(WebCore::DumpRenderTree* drt) : QObject() @@ -285,15 +290,22 @@ QString LayoutTestController::decodeHostName(const QString& host) return decoded; } + +void LayoutTestController::closeWebInspector() +{ + qt_drt_webinspector_close(m_drt->webPage()); + m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false); +} + void LayoutTestController::showWebInspector() { m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); - m_drt->webPage()->webInspector()->show(); + qt_drt_webinspector_show(m_drt->webPage()); } -void LayoutTestController::hideWebInspector() +void LayoutTestController::evaluateInWebInspector(long callId, const QString& script) { - m_drt->webPage()->webInspector()->hide(); + qt_drt_webinspector_executeScript(m_drt->webPage(), callId, script); } void LayoutTestController::setFrameSetFlatteningEnabled(bool enabled) @@ -306,12 +318,22 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled) m_drt->webPage()->settings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, enabled); } +void LayoutTestController::setAllowFileAccessFromFileURLs(bool enabled) +{ + m_drt->webPage()->settings()->setAttribute(QWebSettings::LocalContentCanAccessFileUrls, enabled); +} + void LayoutTestController::setJavaScriptProfilingEnabled(bool enable) { m_topLoadingFrame->page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); qt_drt_setJavaScriptProfilingEnabled(m_topLoadingFrame, enable); } +void LayoutTestController::setTimelineProfilingEnabled(bool enable) +{ + qt_drt_setTimelineProfilingEnabled(m_drt->webPage(), enable); +} + void LayoutTestController::setFixedContentsSize(int width, int height) { m_topLoadingFrame->page()->setPreferredContentsSize(QSize(width, height)); @@ -473,3 +495,8 @@ int LayoutTestController::pageNumberForElementById(const QString& id, float widt return qt_drt_pageNumberForElementById(m_drt->webPage()->mainFrame(), id, width, height); } + +int LayoutTestController::numberOfPages(float width, float height) +{ + return qt_drt_numberOfPages(m_drt->webPage()->mainFrame(), width, height); +} diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h index 64cbcc9..d73794e 100644 --- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h +++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h @@ -115,11 +115,14 @@ public slots: QString decodeHostName(const QString& host); void dumpSelectionRect() const {} void showWebInspector(); - void hideWebInspector(); + void closeWebInspector(); + void evaluateInWebInspector(long callId, const QString& script); void setFrameSetFlatteningEnabled(bool enable); void setAllowUniversalAccessFromFileURLs(bool enable); + void setAllowFileAccessFromFileURLs(bool enable); void setJavaScriptProfilingEnabled(bool enable); + void setTimelineProfilingEnabled(bool enable); void setFixedContentsSize(int width, int height); void setPrivateBrowsingEnabled(bool enable); void setPopupBlockingEnabled(bool enable); @@ -150,6 +153,7 @@ public slots: void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme); int workerThreadCount(); int pageNumberForElementById(const QString& id, float width = 0, float height = 0); + int numberOfPages(float width, float height); private slots: void processWork(); diff --git a/WebKitTools/DumpRenderTree/qt/main.cpp b/WebKitTools/DumpRenderTree/qt/main.cpp index efcda57..7d72982 100644 --- a/WebKitTools/DumpRenderTree/qt/main.cpp +++ b/WebKitTools/DumpRenderTree/qt/main.cpp @@ -37,9 +37,7 @@ #include <qdir.h> #include <qdebug.h> #include <qfont.h> -#include <qwebsettings.h> #include <qwebdatabase.h> -#include <qdesktopservices.h> #include <qtimer.h> #include <qwindowsstyle.h> @@ -161,8 +159,6 @@ int main(int argc, char* argv[]) if (args.contains(QLatin1String("--pixel-tests"))) dumper.setDumpPixels(true); - QString dbDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QDir::separator() + "qtwebkitdrt"; - QWebSettings::setOfflineStoragePath(dbDir); QWebDatabase::removeAllDatabases(); if (args.contains(QLatin1String("-"))) { diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp index 261b9e6..ddfca95 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp @@ -107,9 +107,6 @@ LayoutTestController* gLayoutTestController = 0; UINT_PTR waitToDumpWatchdog = 0; -const unsigned maxViewWidth = 800; -const unsigned maxViewHeight = 600; - void setPersistentUserStyleSheetLocation(CFStringRef url) { persistentUserStyleSheetLocation = url; @@ -667,8 +664,8 @@ void dump() width = 480; height = 360; } else { - width = maxViewWidth; - height = maxViewHeight; + width = LayoutTestController::maxViewWidth; + height = LayoutTestController::maxViewHeight; } ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE); @@ -787,6 +784,7 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences) COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); if (prefsPrivate) { prefsPrivate->setAllowUniversalAccessFromFileURLs(TRUE); + prefsPrivate->setAllowFileAccessFromFileURLs(TRUE); prefsPrivate->setAuthorAndUserStylesEnabled(TRUE); prefsPrivate->setDeveloperExtrasEnabled(FALSE); prefsPrivate->setExperimentalNotificationsEnabled(TRUE); @@ -1097,6 +1095,8 @@ WindowToWebViewMap& windowToWebViewMap() IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow) { + unsigned maxViewWidth = LayoutTestController::maxViewWidth; + unsigned maxViewHeight = LayoutTestController::maxViewHeight; HWND hostWindow = CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP, -maxViewWidth, -maxViewHeight, maxViewWidth, maxViewHeight, 0, 0, GetModuleHandle(0), 0); diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp index 34fd2e6..9f84488 100644 --- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp +++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp @@ -406,6 +406,23 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled) prefsPrivate->setAllowUniversalAccessFromFileURLs(enabled); } +void LayoutTestController::setAllowFileAccessFromFileURLs(bool enabled) +{ + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return; + + COMPtr<IWebPreferences> preferences; + if (FAILED(webView->preferences(&preferences))) + return; + + COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); + if (!prefsPrivate) + return; + + prefsPrivate->setAllowFileAccessFromFileURLs(enabled); +} + void LayoutTestController::setPopupBlockingEnabled(bool enabled) { COMPtr<IWebView> webView; @@ -1121,14 +1138,34 @@ JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStri return counterValueJS; } -int LayoutTestController::pageNumberForElementById(JSStringRef, float, float) +int LayoutTestController::pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels) { - // FIXME: implement - return -1; + COMPtr<IWebFramePrivate> framePrivate(Query, frame); + if (!framePrivate) + return 0; + + wstring idWstring = jsStringRefToWString(id); + BSTR idBSTR = SysAllocStringLen((OLECHAR*)idWstring.c_str(), idWstring.length()); + int pageNumber = -1; + if (FAILED(framePrivate->pageNumberForElementById(idBSTR, pageWidthInPixels, pageHeightInPixels, &pageNumber))) + pageNumber = -1; + SysFreeString(idBSTR); + return pageNumber; } -int LayoutTestController::numberOfPages(float, float) +int LayoutTestController::numberOfPages(float pageWidthInPixels, float pageHeightInPixels) { - // FIXME: implement - return -1; + COMPtr<IWebFramePrivate> framePrivate(Query, frame); + if (!framePrivate) + return 0; + + int pageNumber = -1; + if (FAILED(framePrivate->numberOfPages(pageWidthInPixels, pageHeightInPixels, &pageNumber))) + pageNumber = -1; + return pageNumber; +} + +void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL) +{ + } diff --git a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp index 3bc84cd..ce1bda5 100644 --- a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp +++ b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp @@ -180,6 +180,11 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled) // FIXME: implement } +void LayoutTestController::setAllowFileAccessFromFileURLs(bool enabled) +{ + // FIXME: implement +} + void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag) { // FIXME: implement @@ -375,4 +380,9 @@ int LayoutTestController::numberOfPages(float, float) { // FIXME: implement return -1; -}
\ No newline at end of file +} + +void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL) +{ + +} diff --git a/WebKitTools/QtLauncher/main.cpp b/WebKitTools/QtLauncher/main.cpp index c725c2f..1203ce7 100644 --- a/WebKitTools/QtLauncher/main.cpp +++ b/WebKitTools/QtLauncher/main.cpp @@ -133,6 +133,8 @@ private: WebInspector* inspector; QAction* formatMenuAction; + QAction* flipAnimated; + QAction* flipYAnimated; #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QList<QTouchEvent::TouchPoint> touchPoints; @@ -461,6 +463,13 @@ void LauncherWindow::initializeView(bool useGraphicsView) if (gShowFrameRate) view->enableFrameRateMeasurement(); page()->settings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, gUseCompositing); + + if (flipAnimated) + connect(flipAnimated, SIGNAL(triggered()), view, SLOT(animatedFlip())); + + if (flipYAnimated) + connect(flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip())); + m_view = view; } @@ -540,13 +549,26 @@ void LauncherWindow::setupUI() touchMockAction->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_T)); #endif - QAction* toggleAcceleratedCompositing = toolsMenu->addAction("Toggle Accelerated Compositing", this, SLOT(toggleAcceleratedCompositing(bool))); + QMenu* graphicsViewMenu = toolsMenu->addMenu("QGraphicsView"); + QAction* toggleGraphicsView = graphicsViewMenu->addAction("Toggle use of QGraphicsView", this, SLOT(initializeView(bool))); + toggleGraphicsView->setCheckable(true); + toggleGraphicsView->setChecked(false); + + QAction* toggleAcceleratedCompositing = graphicsViewMenu->addAction("Toggle Accelerated Compositing", this, SLOT(toggleAcceleratedCompositing(bool))); toggleAcceleratedCompositing->setCheckable(true); toggleAcceleratedCompositing->setChecked(false); + toggleAcceleratedCompositing->setEnabled(false); + toggleAcceleratedCompositing->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); - QAction* toggleGraphicsView = toolsMenu->addAction("Toggle use of QGraphicsView", this, SLOT(initializeView(bool))); - toggleGraphicsView->setCheckable(true); - toggleGraphicsView->setChecked(false); + graphicsViewMenu->addSeparator(); + + flipAnimated = graphicsViewMenu->addAction("Animated Flip"); + flipAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); + flipAnimated->setEnabled(false); + + flipYAnimated = graphicsViewMenu->addAction("Animated Y-Flip"); + flipYAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); + flipYAnimated->setEnabled(false); } QWebPage* WebPage::createWindow(QWebPage::WebWindowType type) diff --git a/WebKitTools/QtLauncher/webview.cpp b/WebKitTools/QtLauncher/webview.cpp index 443fc3e..311d79b 100644 --- a/WebKitTools/QtLauncher/webview.cpp +++ b/WebKitTools/QtLauncher/webview.cpp @@ -48,6 +48,29 @@ WebViewGraphicsBased::WebViewGraphicsBased(QWidget* parent) setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QStateMachine* machine = new QStateMachine(this); + QState* s0 = new QState(machine); + s0->assignProperty(this, "yRotation", 0); + + QState* s1 = new QState(machine); + s1->assignProperty(this, "yRotation", 90); + + QAbstractTransition* t1 = s0->addTransition(this, SIGNAL(yFlipRequest()), s1); + QPropertyAnimation* yRotationAnim = new QPropertyAnimation(this, "yRotation", this); + yRotationAnim->setDuration(1000); + t1->addAnimation(yRotationAnim); + + QState* s2 = new QState(machine); + s2->assignProperty(this, "yRotation", -90); + s1->addTransition(s1, SIGNAL(propertiesAssigned()), s2); + + QAbstractTransition* t2 = s2->addTransition(s0); + t2->addAnimation(yRotationAnim); + + machine->setInitialState(s0); + machine->start(); +#endif } void WebViewGraphicsBased::resizeEvent(QResizeEvent* event) @@ -83,6 +106,30 @@ void WebViewGraphicsBased::updateFrameRate() m_numPaintsSinceLastMeasure = 0; } +void WebViewGraphicsBased::animatedFlip() +{ +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QSizeF center = m_item->boundingRect().size() / 2; + QPointF centerPoint = QPointF(center.width(), center.height()); + m_item->setTransformOriginPoint(centerPoint); + + QPropertyAnimation* animation = new QPropertyAnimation(m_item, "rotation", this); + animation->setDuration(1000); + + int rotation = int(m_item->rotation()); + + animation->setStartValue(rotation); + animation->setEndValue(rotation + 180 - (rotation % 180)); + + animation->start(QAbstractAnimation::DeleteWhenStopped); +#endif +} + +void WebViewGraphicsBased::animatedYFlip() +{ + emit yFlipRequest(); +} + void WebViewGraphicsBased::paintEvent(QPaintEvent* event) { QGraphicsView::paintEvent(event); diff --git a/WebKitTools/QtLauncher/webview.h b/WebKitTools/QtLauncher/webview.h index 83bd801..297d975 100644 --- a/WebKitTools/QtLauncher/webview.h +++ b/WebKitTools/QtLauncher/webview.h @@ -66,6 +66,7 @@ protected: class WebViewGraphicsBased : public QGraphicsView { Q_OBJECT + Q_PROPERTY(qreal yRotation READ yRotation WRITE setYRotation) public: WebViewGraphicsBased(QWidget* parent); @@ -76,8 +77,29 @@ public: void enableFrameRateMeasurement(); virtual void paintEvent(QPaintEvent* event); + void setYRotation(qreal angle) + { +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QRectF r = m_item->boundingRect(); + m_item->setTransform(QTransform() + .translate(r.width() / 2, r.height() / 2) + .rotate(angle, Qt::YAxis) + .translate(-r.width() / 2, -r.height() / 2)); +#endif + m_yRotation = angle; + } + qreal yRotation() const + { + return m_yRotation; + } + public slots: void updateFrameRate(); + void animatedFlip(); + void animatedYFlip(); + +signals: + void yFlipRequest(); private: GraphicsWebView* m_item; @@ -86,6 +108,7 @@ private: QTime m_startTime; QTime m_lastConsultTime; bool m_measureFps; + qreal m_yRotation; }; #endif diff --git a/WebKitTools/Scripts/check-webkit-style b/WebKitTools/Scripts/check-webkit-style index 501264b..ea2e943 100755 --- a/WebKitTools/Scripts/check-webkit-style +++ b/WebKitTools/Scripts/check-webkit-style @@ -57,13 +57,11 @@ def main(): codecs.getreader('utf8'), codecs.getwriter('utf8'), 'replace') - - defaults = checker.webkit_argument_defaults() - - parser = checker.ArgumentParser(defaults) + parser = checker.check_webkit_style_parser() (files, options) = parser.parse(sys.argv[1:]) - style_checker = checker.StyleChecker(options) + configuration = checker.check_webkit_style_configuration(options) + style_checker = checker.StyleChecker(configuration) if files: for filename in files: @@ -87,8 +85,11 @@ def main(): style_checker.check_patch(patch) error_count = style_checker.error_count - sys.stderr.write('Total errors found: %d\n' % error_count) - sys.exit(error_count > 0) + file_count = style_checker.file_count + sys.stderr.write('Total errors found: %d in %d files\n' + % (error_count, file_count)) + # We fail when style errors are found or there are no checked files. + sys.exit(error_count > 0 or file_count == 0) if __name__ == "__main__": diff --git a/WebKitTools/Scripts/rebaseline-chromium-webkit-tests b/WebKitTools/Scripts/rebaseline-chromium-webkit-tests index aea0edc..302995c 100755 --- a/WebKitTools/Scripts/rebaseline-chromium-webkit-tests +++ b/WebKitTools/Scripts/rebaseline-chromium-webkit-tests @@ -33,6 +33,7 @@ import sys sys.path.append(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "webkitpy", "layout_tests")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))) import rebaseline_chromium_webkit_tests diff --git a/WebKitTools/Scripts/resolve-ChangeLogs b/WebKitTools/Scripts/resolve-ChangeLogs index 1a2d2af..3238350 100755 --- a/WebKitTools/Scripts/resolve-ChangeLogs +++ b/WebKitTools/Scripts/resolve-ChangeLogs @@ -34,6 +34,7 @@ use FindBin; use lib $FindBin::Bin; use File::Basename; +use File::Copy; use File::Path; use File::Spec; use Getopt::Long; @@ -64,28 +65,30 @@ my $GIT = "git"; my $fixMerged; my $gitRebaseContinue = 0; +my $mergeDriver = 0; my $printWarnings = 1; my $showHelp; my $getOptionsResult = GetOptions( - 'c|continue!' => \$gitRebaseContinue, - 'f|fix-merged:s' => \&parseFixMerged, - 'h|help' => \$showHelp, - 'w|warnings!' => \$printWarnings, + 'c|continue!' => \$gitRebaseContinue, + 'f|fix-merged:s' => \&parseFixMerged, + 'm|merge-driver!' => \$mergeDriver, + 'h|help' => \$showHelp, + 'w|warnings!' => \$printWarnings, ); my $relativePath = isInGitFilterBranch() ? '.' : chdirReturningRelativePath(determineVCSRoot()); my @changeLogFiles = removeChangeLogArguments($relativePath); -if (!defined $fixMerged && scalar(@changeLogFiles) == 0) { +if (!defined $fixMerged && !$mergeDriver && scalar(@changeLogFiles) == 0) { @changeLogFiles = findUnmergedChangeLogs(); } -if (scalar(@ARGV) > 0) { +if (!$mergeDriver && scalar(@ARGV) > 0) { print STDERR "ERROR: Files listed on command-line that are not ChangeLogs.\n"; undef $getOptionsResult; -} elsif (!defined $fixMerged && scalar(@changeLogFiles) == 0) { +} elsif (!defined $fixMerged && !$mergeDriver && scalar(@changeLogFiles) == 0) { print STDERR "ERROR: No ChangeLog files listed on command-line or found unmerged.\n"; undef $getOptionsResult; } elsif ($gitRebaseContinue && !$isGit) { @@ -94,6 +97,12 @@ if (scalar(@ARGV) > 0) { } elsif (defined $fixMerged && !$isGit) { print STDERR "ERROR: --fix-merged may only be used with a git repository\n"; undef $getOptionsResult; +} elsif ($mergeDriver && !$isGit) { + print STDERR "ERROR: --merge-driver may only be used with a git repository\n"; + undef $getOptionsResult; +} elsif ($mergeDriver && scalar(@ARGV) < 3) { + print STDERR "ERROR: --merge-driver expects %O %A %B as arguments\n"; + undef $getOptionsResult; } sub usageAndExit() @@ -104,6 +113,7 @@ Usage: @{[ basename($0) ]} [options] [path/to/ChangeLog] [path/to/another/Change entries (default: --no-continue) -f|--fix-merged [revision-range] fix git-merged ChangeLog entries; if a revision-range is specified, run git filter-branch on the range + -m|--merge-driver %O %A %B act as a git merge-driver on files %O %A %B -h|--help show this help message -w|--[no-]warnings show or suppress warnings (default: show warnings) __END__ @@ -118,6 +128,14 @@ if (defined $fixMerged && length($fixMerged) > 0) { my $commitRange = $fixMerged; $commitRange = $commitRange . "..HEAD" if index($commitRange, "..") < 0; fixMergedChangeLogs($commitRange, @changeLogFiles); +} elsif ($mergeDriver) { + my ($base, $theirs, $ours) = @ARGV; + if (mergeChanges($ours, $base, $theirs)) { + unlink($ours); + copy($theirs, $ours) or die $!; + } else { + exit 1; + } } elsif (@changeLogFiles) { for my $file (@changeLogFiles) { if (defined $fixMerged) { diff --git a/WebKitTools/Scripts/run-gtk-tests b/WebKitTools/Scripts/run-gtk-tests new file mode 100644 index 0000000..9a57319 --- /dev/null +++ b/WebKitTools/Scripts/run-gtk-tests @@ -0,0 +1,35 @@ +#!/usr/bin/perl +# +# Copyright (C) 2009 Gustavo Noronha Silva <gns@gnome.org> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +use strict; +use warnings; + +use FindBin; +use lib $FindBin::Bin; +use webkitdirs; + +# This initializes the correct configuration (Release/Debug) +setConfiguration(); + +my $productDir = productDir(); +my @unitTests = glob $productDir . "/Programs/unittests/*"; +if ($#unitTests < 1) { + die "ERROR: tests not found in $productDir.\n"; +} +system "gtester -k @unitTests" diff --git a/WebKitTools/Scripts/test-webkitpy b/WebKitTools/Scripts/test-webkitpy index cfd3434..8617330 100755 --- a/WebKitTools/Scripts/test-webkitpy +++ b/WebKitTools/Scripts/test-webkitpy @@ -44,6 +44,7 @@ from webkitpy.credentials_unittest import * from webkitpy.diff_parser_unittest import * from webkitpy.executive_unittest import * from webkitpy.grammar_unittest import * +from webkitpy.layout_tests.port.mac_unittest import * from webkitpy.multicommandtool_unittest import * from webkitpy.networktransaction_unittest import * from webkitpy.patchcollection_unittest import * diff --git a/WebKitTools/Scripts/webkit-build-directory b/WebKitTools/Scripts/webkit-build-directory index a85c587..bf7d66d 100755 --- a/WebKitTools/Scripts/webkit-build-directory +++ b/WebKitTools/Scripts/webkit-build-directory @@ -34,31 +34,35 @@ use Getopt::Long; use lib $FindBin::Bin; use webkitdirs; -my $showBaseProductDirectory = 0; +my $showConfigurationDirectory = 0; my $showHelp = 0; +my $showTopLevelDirectory = 0; + my $programName = basename($0); my $usage = <<EOF; Usage: $programName [options] - --base Show the root build directory instead of one corresponding to the current target (e.g. Debug, Release) - --debug Show build directory for the Debug target - -h|--help Show this help message - --release Show build directory for the Release target + --configuration Show the build directory for a specific configuration (e.g. Debug, Release. Defaults to the active configuration set by set-webkit-configuration) + -h|--help Show this help message + --top-level Show the top-level build directory + +Either --configuration or --top-level is required. EOF setConfiguration(); # Figure out from the command line if we're --debug or --release or the default. my $getOptionsResult = GetOptions( - 'base' => \$showBaseProductDirectory, + 'configuration' => \$showConfigurationDirectory, + 'top-level' => \$showTopLevelDirectory, 'help|h' => \$showHelp, ); -if (!$getOptionsResult || $showHelp) { +if (!$getOptionsResult || $showHelp || (!$showConfigurationDirectory && !$showTopLevelDirectory)) { print STDERR $usage; exit 1; } -if ($showBaseProductDirectory) { +if ($showTopLevelDirectory) { print baseProductDir() . "\n"; } else { print productDir() . "\n"; diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm index a788b3d..7985790 100644 --- a/WebKitTools/Scripts/webkitdirs.pm +++ b/WebKitTools/Scripts/webkitdirs.pm @@ -614,9 +614,17 @@ sub qtFeatureDefaults() return %qtFeatureDefaults; } +sub commandExists($) +{ + my $command = shift; + my $devnull = File::Spec->devnull(); + return `$command --version 2> $devnull`; +} + sub determineQtFeatureDefaults() { return if %qtFeatureDefaults; + die "ERROR: qmake missing but required to build WebKit.\n" if not commandExists("qmake"); my $originalCwd = getcwd(); chdir File::Spec->catfile(sourceDir(), "WebCore"); my $defaults = `qmake CONFIG+=compute_defaults 2>&1`; @@ -891,10 +899,9 @@ sub checkRequiredSystemConfig my @cmds = qw(flex bison gperf); my @missing = (); foreach my $cmd (@cmds) { - if (not `$cmd --version`) { - push @missing, $cmd; - } + push @missing, $cmd if not commandExists($cmd); } + if (@missing) { my $list = join ", ", @missing; die "ERROR: $list missing but required to build WebKit.\n"; @@ -1162,7 +1169,7 @@ sub qtMakeCommand($) #print "default spec: " . $mkspec . "\n"; #print "compiler found: " . $compiler . "\n"; - if ($compiler eq "cl") { + if ($compiler && $compiler eq "cl") { return "nmake"; } @@ -1454,7 +1461,7 @@ sub runSafari my ($debugger) = @_; if (isAppleMacWebKit()) { - return system "$FindBin::Bin/gdb-safari", @ARGV if $debugger; + return system "$FindBin::Bin/gdb-safari", argumentsForConfiguration() if $debugger; my $productDir = productDir(); print "Starting Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n"; diff --git a/WebKitTools/Scripts/webkitpy/committers.py b/WebKitTools/Scripts/webkitpy/committers.py index 7af0987..6413243 100644 --- a/WebKitTools/Scripts/webkitpy/committers.py +++ b/WebKitTools/Scripts/webkitpy/committers.py @@ -82,7 +82,7 @@ committers_unable_to_review = [ Committer("Brian Weinstein", "bweinstein@apple.com"), Committer("Cameron McCormack", "cam@webkit.org"), Committer("Carol Szabo", "carol.szabo@nokia.com"), - Committer("Chang Shu", "chang.shu@nokia.com"), + Committer("Chang Shu", "Chang.Shu@nokia.com"), Committer("Chris Fleizach", "cfleizach@apple.com"), Committer("Chris Jerdonek", "cjerdonek@webkit.org"), Committer("Chris Marrin", "cmarrin@apple.com"), diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/__init__.py b/WebKitTools/Scripts/webkitpy/layout_tests/__init__.py new file mode 100644 index 0000000..ef65bee --- /dev/null +++ b/WebKitTools/Scripts/webkitpy/layout_tests/__init__.py @@ -0,0 +1 @@ +# Required for Python to search this directory for module files diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py index a3650ed..01add62 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py @@ -35,7 +35,6 @@ import logging import os import re import sys -import time import simplejson @@ -133,10 +132,9 @@ class TestExpectations: def has_modifier(self, test, modifier): return self._expected_failures.has_modifier(test, modifier) - def remove_platform_from_file(self, tests, platform, backup=False): - return self._expected_failures.remove_platform_from_file(tests, - platform, - backup) + def remove_platform_from_expectations(self, tests, platform): + return self._expected_failures.remove_platform_from_expectations( + tests, platform) def strip_comments(line): @@ -373,8 +371,9 @@ class TestExpectationsFile: def contains(self, test): return test in self._test_to_expectations - def remove_platform_from_file(self, tests, platform, backup=False): - """Remove the platform option from test expectations file. + def remove_platform_from_expectations(self, tests, platform): + """Returns a copy of the expectations with the tests matching the + platform remove. If a test is in the test list and has an option that matches the given platform, remove the matching platform and save the updated test back @@ -384,24 +383,13 @@ class TestExpectationsFile: Args: tests: list of tests that need to update.. platform: which platform option to remove. - backup: if true, the original test expectations file is saved as - [self.TEST_LIST].orig.YYYYMMDDHHMMSS Returns: - no + the updated string. """ - # FIXME - remove_platform_from file worked by writing a new - # test_expectations.txt file over the old one. Now that we're just - # parsing strings, we need to change this to return the new - # expectations string. - raise NotImplementedException('remove_platform_from_file') - - new_file = self._path + '.new' - logging.debug('Original file: "%s"', self._path) - logging.debug('New file: "%s"', new_file) f_orig = self._get_iterable_expectations() - f_new = open(new_file, 'w') + f_new = [] tests_removed = 0 tests_updated = 0 @@ -413,7 +401,7 @@ class TestExpectationsFile: if action == NO_CHANGE: # Save the original line back to the file logging.debug('No change to test: %s', line) - f_new.write(line) + f_new.append(line) elif action == REMOVE_TEST: tests_removed += 1 logging.info('Test removed: %s', line) @@ -421,7 +409,7 @@ class TestExpectationsFile: parts = line.split(':') new_options = parts[0].replace(platform.upper() + ' ', '', 1) new_line = ('%s:%s' % (new_options, parts[1])) - f_new.write(new_line) + f_new.append(new_line) tests_updated += 1 logging.info('Test updated: ') logging.info(' old: %s', line) @@ -440,7 +428,7 @@ class TestExpectationsFile: if not p in (platform.upper(), 'WIN-VISTA', 'WIN-7'): new_options += p + ' ' new_line = ('%s:%s' % (new_options, parts[1])) - f_new.write(new_line) + f_new.append(new_line) tests_updated += 1 logging.info('Test updated: ') logging.info(' old: %s', line) @@ -452,23 +440,7 @@ class TestExpectationsFile: logging.info('Total tests removed: %d', tests_removed) logging.info('Total tests updated: %d', tests_updated) - f_orig.close() - f_new.close() - - if backup: - date_suffix = time.strftime('%Y%m%d%H%M%S', - time.localtime(time.time())) - backup_file = ('%s.orig.%s' % (self._path, date_suffix)) - if os.path.exists(backup_file): - os.remove(backup_file) - logging.info('Saving original file to "%s"', backup_file) - os.rename(self._path, backup_file) - else: - os.remove(self._path) - - logging.debug('Saving new file to "%s"', self._path) - os.rename(new_file, self._path) - return True + return "".join(f_new) def parse_expectations_line(self, line, lineno): """Parses a line from test_expectations.txt and returns a tuple diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py index ce06b44..2b25e29 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py @@ -83,18 +83,20 @@ class Port(object): interface so that it can be overriden for testing purposes.""" return actual_text != expected_text - def diff_image(self, actual_filename, expected_filename, diff_filename): + def diff_image(self, actual_filename, expected_filename, + diff_filename=None): """Compare two image files and produce a delta image file. Return 1 if the two files are different, 0 if they are the same. Also produce a delta image of the two images and write that into - |diff_filename|. + |diff_filename| if it is not None. While this is a generic routine, we include it in the Port interface so that it can be overriden for testing purposes.""" executable = self._path_to_image_diff() - cmd = [executable, '--diff', actual_filename, expected_filename, - diff_filename] + cmd = [executable, '--diff', actual_filename, expected_filename] + if diff_filename: + cmd.append(diff_filename) result = 1 try: result = subprocess.call(cmd) @@ -267,6 +269,7 @@ class Port(object): used by run-chromium-webkit-tests.""" raise NotImplementedError('Port.num_cores') + # FIXME: This could be replaced by functions in webkitpy.scm. def path_from_webkit_base(self, *comps): """Returns the full path to path made by joining the top of the WebKit source tree and the list of path components in |*comps|.""" @@ -275,6 +278,17 @@ class Port(object): self._webkit_base_dir = abspath[0:abspath.find('WebKitTools')] return os.path.join(self._webkit_base_dir, *comps) + # FIXME: Callers should eventually move to scm.script_path. + def script_path(self, script_name): + return self.path_from_webkit_base("WebKitTools", "Scripts", script_name) + + def path_to_test_expectations_file(self): + """Update the test expectations to the passed-in string. + + This is used by the rebaselining tool. Raises NotImplementedError + if the port does not use expectations files.""" + raise NotImplementedError('Port.path_to_test_expectations_file') + def remove_directory(self, *path): """Recursively removes a directory, even if it's marked read-only. diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py index 70a8dea..1123376 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py @@ -88,6 +88,10 @@ class ChromiumPort(base.Port): self._chromium_base_dir = abspath[0:abspath.find('third_party')] return os.path.join(self._chromium_base_dir, *comps) + def path_to_test_expectations_file(self): + return self.path_from_chromium_base('webkit', 'tools', 'layout_tests', + 'test_expectations.txt') + def results_directory(self): return self.path_from_chromium_base('webkit', self._options.target, self._options.results_directory) @@ -128,13 +132,12 @@ class ChromiumPort(base.Port): def test_base_platform_names(self): return ('linux', 'mac', 'win') - def test_expectations(self, options=None): + def test_expectations(self): """Returns the test expectations for this port. Basically this string should contain the equivalent of a test_expectations file. See test_expectations.py for more details.""" - expectations_file = self.path_from_chromium_base('webkit', 'tools', - 'layout_tests', 'test_expectations.txt') + expectations_file = self.path_to_test_expectations_file() return file(expectations_file, "r").read() def test_platform_names(self): @@ -154,7 +157,6 @@ class ChromiumPort(base.Port): return self.path_from_chromium_base('webkit', 'data', 'layout_tests', 'platform', platform, 'LayoutTests') - class ChromiumDriver(base.Driver): """Abstract interface for the DumpRenderTree interface.""" diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_linux.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_linux.py index 8fd5343..b817251 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_linux.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_linux.py @@ -43,6 +43,8 @@ class ChromiumLinuxPort(chromium.ChromiumPort): def __init__(self, port_name=None, options=None): if port_name is None: port_name = 'chromium-linux' + if options and not hasattr(options, 'target'): + options.target = 'Release' chromium.ChromiumPort.__init__(self, port_name, options) def baseline_search_path(self): diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_mac.py index 7e7b4ca..bcffcf8 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_mac.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_mac.py @@ -43,6 +43,8 @@ class ChromiumMacPort(chromium.ChromiumPort): def __init__(self, port_name=None, options=None): if port_name is None: port_name = 'chromium-mac' + if options and not hasattr(options, 'target'): + options.target = 'Release' chromium.ChromiumPort.__init__(self, port_name, options) def baseline_search_path(self): diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win.py index 352916c..5eb0ba1 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win.py @@ -44,6 +44,8 @@ class ChromiumWinPort(chromium.ChromiumPort): def __init__(self, port_name=None, options=None): if port_name is None: port_name = 'chromium-win' + self.version() + if options and not hasattr(options, 'target'): + options.target = 'Release' chromium.ChromiumPort.__init__(self, port_name, options) def baseline_search_path(self): diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py index 4b73cec..d355f62 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py @@ -67,8 +67,16 @@ class MacPort(base.Port): return dirs def check_sys_deps(self): - # FIXME: This should run build-dumprendertree. - # This should also validate that all of the tool paths are valid. + if executive.run_command([self.script_path("build-dumprendertree")], return_exit_code=True) != 0: + return False + + driver_path = self._path_to_driver() + if not os.path.exists(driver_path): + logging.error("DumpRenderTree was not found at %s" % driver_path) + return False + + # This should also validate that the ImageDiff path is valid (once this script knows how to use ImageDiff). + # https://bugs.webkit.org/show_bug.cgi?id=34826 return True def num_cores(self): @@ -103,8 +111,67 @@ class MacPort(base.Port): # to return something. return ('mac',) + def _skipped_file_paths(self): + # FIXME: This method will need to be made work for non-mac platforms and moved into base.Port. + skipped_files = [] + if self._name in ('mac-tiger', 'mac-leopard', 'mac-snowleopard'): + skipped_files.append(os.path.join( + self._webkit_baseline_path(self._name), 'Skipped')) + skipped_files.append(os.path.join(self._webkit_baseline_path('mac'), + 'Skipped')) + return skipped_files + + def _tests_for_other_platforms(self): + # The original run-webkit-tests builds up a "whitelist" of tests to run, and passes that to DumpRenderTree. + # run-chromium-webkit-tests assumes we run *all* tests and test_expectations.txt functions as a blacklist. + # FIXME: This list could be dynamic based on platform name and pushed into base.Port. + return [ + "platform/chromium", + "platform/gtk", + "platform/qt", + "platform/win", + ] + + def _tests_for_disabled_features(self): + # FIXME: This should use the feature detection from webkitperl/features.pm to match run-webkit-tests. + # For now we hard-code a list of features known to be disabled on the Mac platform. + disabled_feature_tests = [ + "fast/xhtmlmp", + "http/tests/wml", + "mathml", + "wml", + ] + # FIXME: webarchive tests expect to read-write from -expected.webarchive files instead of .txt files. + # This script doesn't know how to do that yet, so pretend they're just "disabled". + webarchive_tests = [ + "webarchive", + "svg/webarchive", + "http/tests/webarchive", + "svg/custom/image-with-prefix-in-webarchive.svg", + ] + return disabled_feature_tests + webarchive_tests + + def _tests_from_skipped_file(self, skipped_file): + tests_to_skip = [] + for line in skipped_file.readlines(): + line = line.strip() + if line.startswith('#') or not len(line): + continue + tests_to_skip.append(line) + return tests_to_skip + + def _expectations_from_skipped_files(self): + tests_to_skip = [] + for filename in self._skipped_file_paths(): + if not os.path.exists(filename): + logging.warn("Failed to open Skipped file: %s" % filename) + continue + skipped_file = file(filename) + tests_to_skip.extend(self._tests_from_skipped_file(skipped_file)) + skipped_file.close() + return tests_to_skip + def test_expectations(self): - # # The WebKit mac port uses 'Skipped' files at the moment. Each # file contains a list of files or directories to be skipped during # the test run. The total list of tests to skipped is given by the @@ -112,44 +179,11 @@ class MacPort(base.Port): # a version-specific file found in platform/X-version. Duplicate # entries are allowed. This routine reads those files and turns # contents into the format expected by test_expectations. - expectations = [] - skipped_files = [] - if self._name in ('mac-tiger', 'mac-leopard', 'mac-snowleopard'): - skipped_files.append(os.path.join( - self._webkit_baseline_path(self._name), 'Skipped')) - skipped_files.append(os.path.join(self._webkit_baseline_path('mac'), - 'Skipped')) - for filename in skipped_files: - if os.path.exists(filename): - f = file(filename) - for l in f.readlines(): - l = l.strip() - if not l.startswith('#') and len(l): - l = 'BUG_SKIPPED SKIP : ' + l + ' = FAIL' - if l not in expectations: - expectations.append(l) - f.close() - - # TODO - figure out how to check for these dynamically - expectations.append('BUG_SKIPPED SKIP : fast/wcss = FAIL') - expectations.append('BUG_SKIPPED SKIP : fast/xhtmlmp = FAIL') - expectations.append('BUG_SKIPPED SKIP : http/tests/wml = FAIL') - expectations.append('BUG_SKIPPED SKIP : mathml = FAIL') - expectations.append('BUG_SKIPPED SKIP : platform/chromium = FAIL') - expectations.append('BUG_SKIPPED SKIP : platform/gtk = FAIL') - expectations.append('BUG_SKIPPED SKIP : platform/qt = FAIL') - expectations.append('BUG_SKIPPED SKIP : platform/win = FAIL') - expectations.append('BUG_SKIPPED SKIP : wml = FAIL') - - # TODO - figure out how to handle webarchive tests - expectations.append('BUG_SKIPPED SKIP : webarchive = PASS') - expectations.append('BUG_SKIPPED SKIP : svg/webarchive = PASS') - expectations.append('BUG_SKIPPED SKIP : http/tests/webarchive = PASS') - expectations.append('BUG_SKIPPED SKIP : svg/custom/' - 'image-with-prefix-in-webarchive.svg = PASS') - - expectations_str = '\n'.join(expectations) - return expectations_str + tests_to_skip = set(self._expectations_from_skipped_files()) # Use a set to allow duplicates + tests_to_skip.update(self._tests_for_other_platforms()) + tests_to_skip.update(self._tests_for_disabled_features()) + expectations = map(lambda test_path: "BUG_SKIPPED SKIP : %s = FAIL" % test_path, tests_to_skip) + return "\n".join(expectations) def test_platform_name(self): # At the moment we don't use test platform names, but we have @@ -180,7 +214,7 @@ class MacPort(base.Port): def _build_path(self, *comps): if not self._cached_build_root: - self._cached_build_root = executive.run_command(["webkit-build-directory", "--base"]).rstrip() + self._cached_build_root = executive.run_command([self.script_path("webkit-build-directory"), "--top-level"]).rstrip() return os.path.join(self._cached_build_root, self._options.target, *comps) def _kill_process(self, pid): @@ -390,7 +424,6 @@ class MacDriver(base.Driver): return (crash, timeout, actual_image_hash, ''.join(output), ''.join(error)) - pass def stop(self): if self._proc: diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/mac_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/mac_unittest.py new file mode 100644 index 0000000..e47a4a4 --- /dev/null +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/mac_unittest.py @@ -0,0 +1,66 @@ +# Copyright (C) 2010 Google Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import unittest +import mac +import StringIO + +class MacTest(unittest.TestCase): + + def test_skipped_file_paths(self): + port = mac.MacPort() + skipped_paths = port._skipped_file_paths() + # FIXME: _skipped_file_paths should return WebKit-relative paths. + # So to make it unit testable, we strip the WebKit directory from the path. + relative_paths = [path[len(port.path_from_webkit_base()):] for path in skipped_paths] + self.assertEqual(relative_paths, ['LayoutTests/platform/mac-leopard/Skipped', 'LayoutTests/platform/mac/Skipped']) + + example_skipped_file = """ +# <rdar://problem/5647952> fast/events/mouseout-on-window.html needs mac DRT to issue mouse out events +fast/events/mouseout-on-window.html + +# <rdar://problem/5643675> window.scrollTo scrolls a window with no scrollbars +fast/events/attempt-scroll-with-no-scrollbars.html + +# see bug <rdar://problem/5646437> REGRESSION (r28015): svg/batik/text/smallFonts fails +svg/batik/text/smallFonts.svg +""" + example_skipped_tests = [ + "fast/events/mouseout-on-window.html", + "fast/events/attempt-scroll-with-no-scrollbars.html", + "svg/batik/text/smallFonts.svg", + ] + + def test_skipped_file_paths(self): + port = mac.MacPort() + skipped_file = StringIO.StringIO(self.example_skipped_file) + self.assertEqual(port._tests_from_skipped_file(skipped_file), self.example_skipped_tests) + + +if __name__ == '__main__': + unittest.main() diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py index 0bc6e7c..c3e97be 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py @@ -55,7 +55,8 @@ class TestPort(base.Port): def check_sys_deps(self): return True - def diff_image(self, actual_filename, expected_filename, diff_filename): + def diff_image(self, actual_filename, expected_filename, + diff_filename=None): return False def compare_text(self, actual_text, expected_text): diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py index ba8a5e9..54c2f6f 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py @@ -159,6 +159,7 @@ class PyWebSocket(http_server.Lighttpd): '-p', str(self._port), '-d', self._layout_tests, '-s', self._web_socket_tests, + '-x', '/websocket/tests/cookies', '-l', error_log, ] diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py index 83cf99de..4604a1a 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py @@ -54,7 +54,7 @@ import urllib import webbrowser import zipfile -from layout_package import path_utils +import port from layout_package import test_expectations from test_types import image_diff from test_types import text_diff @@ -200,9 +200,10 @@ class Rebaseliner(object): REVISION_REGEX = r'<a href=\"(\d+)/\">' - def __init__(self, platform, options): - self._file_dir = path_utils.path_from_base('webkit', 'tools', + def __init__(self, port, platform, options): + self._file_dir = port.path_from_chromium_base('webkit', 'tools', 'layout_tests') + self._port = port self._platform = platform self._options = options self._rebaselining_tests = [] @@ -212,10 +213,12 @@ class Rebaseliner(object): # -. compile list of tests that need rebaselining. # -. update the tests in test_expectations file after rebaseline # is done. + expectations_str = self._port.test_expectations() self._test_expectations = \ - test_expectations.TestExpectations(None, - self._file_dir, - platform, + test_expectations.TestExpectations(self._port, + None, + expectations_str, + self._platform, False, False) @@ -359,7 +362,6 @@ class Rebaseliner(object): latest_revision = self._get_latest_revision(url_base) if latest_revision is None or latest_revision <= 0: return None - archive_url = ('%s%s/layout-test-results.zip' % (url_base, latest_revision)) logging.info('Archive url: "%s"', archive_url) @@ -399,7 +401,7 @@ class Rebaseliner(object): for name in zip_namelist: logging.debug(' ' + name) - platform = path_utils.platform_name(self._platform) + platform = self._port.name() logging.debug('Platform dir: "%s"', platform) test_no = 1 @@ -412,7 +414,7 @@ class Rebaseliner(object): test_basename = os.path.splitext(test)[0] for suffix in BASELINE_SUFFIXES: archive_test_name = ('layout-test-results/%s-actual%s' % - (test_basename, suffix)) + (test_basename, suffix)) logging.debug(' Archive test file name: "%s"', archive_test_name) if not archive_test_name in zip_namelist: @@ -431,7 +433,7 @@ class Rebaseliner(object): expected_filename = '%s-expected%s' % (test_basename, suffix) expected_fullpath = os.path.join( - path_utils.chromium_baseline_path(platform), + self._port._chromium_baseline_path(platform), expected_filename) expected_fullpath = os.path.normpath(expected_fullpath) logging.debug(' Expected file full path: "%s"', @@ -443,17 +445,17 @@ class Rebaseliner(object): # and lower # levels and remove all duplicated baselines. if self._is_dup_baseline(temp_name, - expected_fullpath, - test, - suffix, - self._platform): + expected_fullpath, + test, + suffix, + self._platform): os.remove(temp_name) self._delete_baseline(expected_fullpath) continue # Create the new baseline directory if it doesn't already # exist. - path_utils.maybe_make_directory( + self._port.maybe_make_directory( os.path.dirname(expected_fullpath)) shutil.move(temp_name, expected_fullpath) @@ -497,9 +499,9 @@ class Rebaseliner(object): True if the baseline is unnecessary. False otherwise. """ - test_filepath = os.path.join(path_utils.layout_tests_dir(), test) - all_baselines = path_utils.expected_baselines(test_filepath, - suffix, platform, True) + test_filepath = os.path.join(self._port.layout_tests_dir(), test) + all_baselines = self._port.expected_baselines(test_filepath, + suffix, True) for (fallback_dir, fallback_file) in all_baselines: if fallback_dir and fallback_file: fallback_fullpath = os.path.normpath( @@ -534,11 +536,11 @@ class Rebaseliner(object): return True if ext1 == '.PNG': - return image_diff.ImageDiff(self._platform, '').diff_files(file1, - file2) + return image_diff.ImageDiff(self._port, self._platform, + '').diff_files(self._port, file1, file2) else: - return text_diff.TestTextDiff(self._platform, '').diff_files(file1, - file2) + return text_diff.TestTextDiff(self._port, self._platform, + '').diff_files(self._port, file1, file2) def _delete_baseline(self, filename): """Remove the file from repository and delete it from disk. @@ -570,8 +572,21 @@ class Rebaseliner(object): """ if self._rebaselined_tests: - self._test_expectations.remove_platform_from_file( - self._rebaselined_tests, self._platform, backup) + new_expectations = ( + self._test_expectations.remove_platform_from_expectations( + self._rebaselined_tests, self._platform)) + path = self._port.path_to_test_expectations_file() + if backup: + date_suffix = time.strftime('%Y%m%d%H%M%S', + time.localtime(time.time())) + backup_file = ('%s.orig.%s' % (path, date_suffix)) + if os.path.exists(backup_file): + os.remove(backup_file) + logging.info('Saving original file to "%s"', backup_file) + os.rename(path, backup_file) + f = open(path, "w") + f.write(new_expectations) + f.close() else: logging.info('No test was rebaselined so nothing to remove.') @@ -777,8 +792,9 @@ class HtmlGenerator(object): '<img style="width: 200" src="%(uri)s" /></a></td>') HTML_TR = '<tr>%s</tr>' - def __init__(self, options, platforms, rebaselining_tests): + def __init__(self, port, options, platforms, rebaselining_tests): self._html_directory = options.html_directory + self._port = port self._platforms = platforms self._rebaselining_tests = rebaselining_tests self._html_file = os.path.join(options.html_directory, @@ -817,7 +833,7 @@ class HtmlGenerator(object): logging.info('Launching html: "%s"', self._html_file) - html_uri = path_utils.filename_to_uri(self._html_file) + html_uri = self._port.filename_to_uri(self._html_file) webbrowser.open(html_uri, 1) logging.info('Html launched.') @@ -855,13 +871,13 @@ class HtmlGenerator(object): links = '' if os.path.exists(old_file): links += html_td_link % { - 'uri': path_utils.filename_to_uri(old_file), + 'uri': self._port.filename_to_uri(old_file), 'name': baseline_filename} else: logging.info(' No old baseline file: "%s"', old_file) links += self.HTML_TD_NOLINK % '' - links += html_td_link % {'uri': path_utils.filename_to_uri(new_file), + links += html_td_link % {'uri': self._port.filename_to_uri(new_file), 'name': baseline_filename} diff_file = get_result_file_fullpath(self._html_directory, @@ -869,7 +885,7 @@ class HtmlGenerator(object): 'diff') logging.info(' Baseline diff file: "%s"', diff_file) if os.path.exists(diff_file): - links += html_td_link % {'uri': path_utils.filename_to_uri( + links += html_td_link % {'uri': self._port.filename_to_uri( diff_file), 'name': 'Diff'} else: logging.info(' No baseline diff file: "%s"', diff_file) @@ -908,8 +924,8 @@ class HtmlGenerator(object): rows.append(self.HTML_TR % row) if rows: - test_path = os.path.join(path_utils.layout_tests_dir(), test) - html = self.HTML_TR_TEST % (path_utils.filename_to_uri(test_path), + test_path = os.path.join(self._port.layout_tests_dir(), test) + html = self.HTML_TR_TEST % (self._port.filename_to_uri(test_path), test) html += self.HTML_TEST_DETAIL % ' '.join(rows) @@ -967,6 +983,7 @@ def main(): ' rebaselining comparison.')) options = option_parser.parse_args()[0] + port_obj = port.get(None, options) # Set up our logging format. log_level = logging.INFO @@ -1002,7 +1019,7 @@ def main(): rebaselining_tests = set() backup = options.backup for platform in rebaseline_platforms: - rebaseliner = Rebaseliner(platform, options) + rebaseliner = Rebaseliner(port_obj, platform, options) logging.info('') log_dashed_string('Rebaseline started', platform) @@ -1017,7 +1034,8 @@ def main(): logging.info('') log_dashed_string('Rebaselining result comparison started', None) - html_generator = HtmlGenerator(options, + html_generator = HtmlGenerator(port_obj, + options, rebaseline_platforms, rebaselining_tests) html_generator.generate_html() diff --git a/WebKitTools/Scripts/webkitpy/style/checker.py b/WebKitTools/Scripts/webkitpy/style/checker.py index fbda8cb..9beda9e 100644 --- a/WebKitTools/Scripts/webkitpy/style/checker.py +++ b/WebKitTools/Scripts/webkitpy/style/checker.py @@ -30,24 +30,24 @@ """Front end of some style-checker modules.""" import codecs -import getopt import os.path import sys from .. style_references import parse_patch from error_handlers import DefaultStyleErrorHandler from error_handlers import PatchStyleErrorHandler -from filter import validate_filter_rules from filter import FilterConfiguration +from optparser import ArgumentParser +from optparser import DefaultCommandOptionValues from processors.common import check_no_carriage_return from processors.common import categories as CommonCategories from processors.cpp import CppProcessor from processors.text import TextProcessor -# These defaults are used by check-webkit-style. -WEBKIT_DEFAULT_VERBOSITY = 1 -WEBKIT_DEFAULT_OUTPUT_FORMAT = 'emacs' +# These are default option values for the command-line option parser. +_DEFAULT_VERBOSITY = 1 +_DEFAULT_OUTPUT_FORMAT = 'emacs' # FIXME: For style categories we will never want to have, remove them. @@ -55,14 +55,16 @@ WEBKIT_DEFAULT_OUTPUT_FORMAT = 'emacs' # modify the implementation and enable them. # # Throughout this module, we use "filter rule" rather than "filter" -# for an individual boolean filter flag like "+foo". This allows us to +# for an individual boolean filter flag like "+foo". This allows us to # reserve "filter" for what one gets by collectively applying all of # the filter rules. # -# The _WEBKIT_FILTER_RULES are prepended to any user-specified filter -# rules. Since by default all errors are on, only include rules that -# begin with a - sign. -WEBKIT_DEFAULT_FILTER_RULES = [ +# The base filter rules are the filter rules that begin the list of +# filter rules used to check style. For example, these rules precede +# any user-specified filter rules. Since by default all categories are +# checked, this list should normally include only rules that begin +# with a "-" sign. +_BASE_FILTER_RULES = [ '-build/endif_comment', '-build/include_what_you_use', # <string> for std::string '-build/storage_class', # const static @@ -86,26 +88,24 @@ WEBKIT_DEFAULT_FILTER_RULES = [ ] -# FIXME: Change the second value of each tuple from a tuple to a list, -# and alter the filter code so it accepts lists instead. (The -# filter code will need to convert incoming values from a list -# to a tuple prior to caching). This will make this -# configuration setting a bit simpler since tuples have an -# unusual syntax case. -# # The path-specific filter rules. # # This list is order sensitive. Only the first path substring match # is used. See the FilterConfiguration documentation in filter.py # for more information on this list. +# +# Each string appearing in this nested list should have at least +# one associated unit test assertion. These assertions are located, +# for example, in the test_path_rules_specifier() unit test method of +# checker_unittest.py. _PATH_RULES_SPECIFIER = [ # Files in these directories are consumers of the WebKit # API and therefore do not follow the same header including # discipline as WebCore. (["WebKitTools/WebKitAPITest/", "WebKit/qt/QGVLauncher/"], - ("-build/include", - "-readability/streams")), + ["-build/include", + "-readability/streams"]), ([# The GTK+ APIs use GTK+ naming style, which includes # lower-cased, underscore-separated values. "WebKit/gtk/webkit/", @@ -116,13 +116,7 @@ _PATH_RULES_SPECIFIER = [ # QtTest module. "WebKit/qt/tests/", "JavaScriptCore/qt/tests"], - ("-readability/naming",)), - # These are test file patterns. - (["_test.cpp", - "_unittest.cpp", - "_regtest.cpp"], - ("-readability/streams", # Many unit tests use cout. - "-runtime/rtti")), + ["-readability/naming"]), ] @@ -131,7 +125,7 @@ _PATH_RULES_SPECIFIER = [ # future merges. # # Include a warning for skipped files that are less obvious. -SKIPPED_FILES_WITH_WARNING = [ +_SKIPPED_FILES_WITH_WARNING = [ # The Qt API and tests do not follow WebKit style. # They follow Qt style. :) "gtk2drawing.c", # WebCore/platform/gtk/gtk2drawing.c @@ -145,439 +139,56 @@ SKIPPED_FILES_WITH_WARNING = [ # Don't include a warning for skipped files that are more common # and more obvious. -SKIPPED_FILES_WITHOUT_WARNING = [ +_SKIPPED_FILES_WITHOUT_WARNING = [ "LayoutTests/" ] # The maximum number of errors to report per file, per category. # If a category is not a key, then it has no maximum. -MAX_REPORTS_PER_CATEGORY = { +_MAX_REPORTS_PER_CATEGORY = { "whitespace/carriage_return": 1 } -def style_categories(): +def _all_categories(): """Return the set of all categories used by check-webkit-style.""" # Take the union across all processors. return CommonCategories.union(CppProcessor.categories) -def webkit_argument_defaults(): - """Return the DefaultArguments instance for use by check-webkit-style.""" - return ArgumentDefaults(WEBKIT_DEFAULT_OUTPUT_FORMAT, - WEBKIT_DEFAULT_VERBOSITY, - WEBKIT_DEFAULT_FILTER_RULES) - - -def _create_usage(defaults): - """Return the usage string to display for command help. - - Args: - defaults: An ArgumentDefaults instance. - - """ - usage = """ -Syntax: %(program_name)s [--verbose=#] [--git-commit=<SingleCommit>] [--output=vs7] - [--filter=-x,+y,...] [file] ... - - The style guidelines this tries to follow are here: - http://webkit.org/coding/coding-style.html - - Every style error is given a confidence score from 1-5, with 5 meaning - we are certain of the problem, and 1 meaning it could be a legitimate - construct. This can miss some errors and does not substitute for - code review. - - To prevent specific lines from being linted, add a '// NOLINT' comment to the - end of the line. - - Linted extensions are .cpp, .c and .h. Other file types are ignored. - - The file parameter is optional and accepts multiple files. Leaving - out the file parameter applies the check to all files considered changed - by your source control management system. - - Flags: - - verbose=# - A number 1-5 that restricts output to errors with a confidence - score at or above this value. In particular, the value 1 displays - all errors. The default is %(default_verbosity)s. - - git-commit=<SingleCommit> - Checks the style of everything from the given commit to the local tree. - - output=vs7 - The output format, which may be one of - emacs : to ease emacs parsing - vs7 : compatible with Visual Studio - Defaults to "%(default_output_format)s". Other formats are unsupported. - - filter=-x,+y,... - A comma-separated list of boolean filter rules used to filter - which categories of style guidelines to check. The script checks - a category if the category passes the filter rules, as follows. - - Any webkit category starts out passing. All filter rules are then - evaluated left to right, with later rules taking precedence. For - example, the rule "+foo" passes any category that starts with "foo", - and "-foo" fails any such category. The filter input "-whitespace, - +whitespace/braces" fails the category "whitespace/tab" and passes - "whitespace/braces". - - Examples: --filter=-whitespace,+whitespace/braces - --filter=-whitespace,-runtime/printf,+runtime/printf_format - --filter=-,+build/include_what_you_use - - Category names appear in error messages in brackets, for example - [whitespace/indent]. To see a list of all categories available to - %(program_name)s, along with which are enabled by default, pass - the empty filter as follows: - --filter= -""" % {'program_name': os.path.basename(sys.argv[0]), - 'default_verbosity': defaults.verbosity, - 'default_output_format': defaults.output_format} - - return usage - - -# FIXME: Eliminate support for "extra_flag_values". -# -# FIXME: Remove everything from ProcessorOptions except for the -# information that can be passed via the command line, and -# rename to something like CheckWebKitStyleOptions. This -# includes, but is not limited to, removing the -# max_reports_per_error attribute and the is_reportable() -# method. See also the FIXME below to create a new class -# called something like CheckerConfiguration. -# -# This class should not have knowledge of the flag key names. -class ProcessorOptions(object): - - """A container to store options passed via the command line. - - Attributes: - extra_flag_values: A string-string dictionary of all flag key-value - pairs that are not otherwise represented by this - class. The default is the empty dictionary. - - filter_configuration: A FilterConfiguration instance. The default - is the "empty" filter configuration, which - means that all errors should be checked. - - git_commit: A string representing the git commit to check. - The default is None. - - max_reports_per_error: The maximum number of errors to report - per file, per category. - - output_format: A string that is the output format. The supported - output formats are "emacs" which emacs can parse - and "vs7" which Microsoft Visual Studio 7 can parse. - - verbosity: An integer between 1-5 inclusive that restricts output - to errors with a confidence score at or above this value. - The default is 1, which reports all errors. - - """ - def __init__(self, - extra_flag_values=None, - filter_configuration = None, - git_commit=None, - max_reports_per_category=None, - output_format="emacs", - verbosity=1): - if extra_flag_values is None: - extra_flag_values = {} - if filter_configuration is None: - filter_configuration = FilterConfiguration() - if max_reports_per_category is None: - max_reports_per_category = {} - - if output_format not in ("emacs", "vs7"): - raise ValueError('Invalid "output_format" parameter: ' - 'value must be "emacs" or "vs7". ' - 'Value given: "%s".' % output_format) - - if (verbosity < 1) or (verbosity > 5): - raise ValueError('Invalid "verbosity" parameter: ' - "value must be an integer between 1-5 inclusive. " - 'Value given: "%s".' % verbosity) - - self.extra_flag_values = extra_flag_values - self.filter_configuration = filter_configuration - self.git_commit = git_commit - self.max_reports_per_category = max_reports_per_category - self.output_format = output_format - self.verbosity = verbosity - - # Useful for unit testing. - def __eq__(self, other): - """Return whether this ProcessorOptions instance is equal to another.""" - if self.extra_flag_values != other.extra_flag_values: - return False - if self.filter_configuration != other.filter_configuration: - return False - if self.git_commit != other.git_commit: - return False - if self.max_reports_per_category != other.max_reports_per_category: - return False - if self.output_format != other.output_format: - return False - if self.verbosity != other.verbosity: - return False - - return True - - # Useful for unit testing. - def __ne__(self, other): - # Python does not automatically deduce this from __eq__(). - return not self.__eq__(other) - - def is_reportable(self, category, confidence_in_error, path): - """Return whether an error is reportable. - - An error is reportable if the confidence in the error - is at least the current verbosity level, and if the current - filter says that the category should be checked for the - given path. - - Args: - category: A string that is a style category. - confidence_in_error: An integer between 1 and 5, inclusive, that - represents the application's confidence in - the error. A higher number signifies greater - confidence. - path: The path of the file being checked - - """ - if confidence_in_error < self.verbosity: - return False - - return self.filter_configuration.should_check(category, path) - - -# This class should not have knowledge of the flag key names. -class ArgumentDefaults(object): - - """A container to store default argument values. - - Attributes: - output_format: A string that is the default output format. - verbosity: An integer that is the default verbosity level. - base_filter_rules: A list of strings that are boolean filter rules - to prepend to any user-specified rules. - - """ - - def __init__(self, default_output_format, default_verbosity, - default_base_filter_rules): - self.output_format = default_output_format - self.verbosity = default_verbosity - self.base_filter_rules = default_base_filter_rules - - -class ArgumentPrinter(object): - - """Supports the printing of check-webkit-style command arguments.""" - - def _flag_pair_to_string(self, flag_key, flag_value): - return '--%(key)s=%(val)s' % {'key': flag_key, 'val': flag_value } - - def to_flag_string(self, options): - """Return a flag string yielding the given ProcessorOptions instance. - - This method orders the flag values alphabetically by the flag key. - - Args: - options: A ProcessorOptions instance. - - """ - flags = options.extra_flag_values.copy() +def _check_webkit_style_defaults(): + """Return the default command-line options for check-webkit-style.""" + return DefaultCommandOptionValues(output_format=_DEFAULT_OUTPUT_FORMAT, + verbosity=_DEFAULT_VERBOSITY) - flags['output'] = options.output_format - flags['verbose'] = options.verbosity - # Only include the filter flag if user-provided rules are present. - user_rules = options.filter_configuration.user_rules - if user_rules: - flags['filter'] = ",".join(user_rules) - if options.git_commit: - flags['git-commit'] = options.git_commit - flag_string = '' - # Alphabetizing lets us unit test this method. - for key in sorted(flags.keys()): - flag_string += self._flag_pair_to_string(key, flags[key]) + ' ' +# This function assists in optparser not having to import from checker. +def check_webkit_style_parser(): + all_categories = _all_categories() + default_options = _check_webkit_style_defaults() + return ArgumentParser(all_categories=all_categories, + base_filter_rules=_BASE_FILTER_RULES, + default_options=default_options) - return flag_string.strip() +def check_webkit_style_configuration(options): + """Return a StyleCheckerConfiguration instance for check-webkit-style. -class ArgumentParser(object): - - """Supports the parsing of check-webkit-style command arguments. - - Attributes: - defaults: An ArgumentDefaults instance. - create_usage: A function that accepts an ArgumentDefaults instance - and returns a string of usage instructions. - This defaults to the function used to generate the - usage string for check-webkit-style. - doc_print: A function that accepts a string parameter and that is - called to display help messages. This defaults to - sys.stderr.write(). + Args: + options: A CommandOptionValues instance. """ + filter_configuration = FilterConfiguration( + base_rules=_BASE_FILTER_RULES, + path_specific=_PATH_RULES_SPECIFIER, + user_rules=options.filter_rules) - def __init__(self, argument_defaults, create_usage=None, doc_print=None): - if create_usage is None: - create_usage = _create_usage - if doc_print is None: - doc_print = sys.stderr.write - - self.defaults = argument_defaults - self.create_usage = create_usage - self.doc_print = doc_print - - def _exit_with_usage(self, error_message=''): - """Exit and print a usage string with an optional error message. - - Args: - error_message: A string that is an error message to print. - - """ - usage = self.create_usage(self.defaults) - self.doc_print(usage) - if error_message: - sys.exit('\nFATAL ERROR: ' + error_message) - else: - sys.exit(1) - - def _exit_with_categories(self): - """Exit and print the style categories and default filter rules.""" - self.doc_print('\nAll categories:\n') - categories = style_categories() - for category in sorted(categories): - self.doc_print(' ' + category + '\n') - - self.doc_print('\nDefault filter rules**:\n') - for filter_rule in sorted(self.defaults.base_filter_rules): - self.doc_print(' ' + filter_rule + '\n') - self.doc_print('\n**The command always evaluates the above rules, ' - 'and before any --filter flag.\n\n') - - sys.exit(0) - - def _parse_filter_flag(self, flag_value): - """Parse the --filter flag, and return a list of filter rules. - - Args: - flag_value: A string of comma-separated filter rules, for - example "-whitespace,+whitespace/indent". - - """ - filters = [] - for uncleaned_filter in flag_value.split(','): - filter = uncleaned_filter.strip() - if not filter: - continue - filters.append(filter) - return filters - - def parse(self, args, extra_flags=None): - """Parse the command line arguments to check-webkit-style. - - Args: - args: A list of command-line arguments as returned by sys.argv[1:]. - extra_flags: A list of flags whose values we want to extract, but - are not supported by the ProcessorOptions class. - An example flag "new_flag=". This defaults to the - empty list. - - Returns: - A tuple of (filenames, options) - - filenames: The list of filenames to check. - options: A ProcessorOptions instance. - - """ - if extra_flags is None: - extra_flags = [] - - output_format = self.defaults.output_format - verbosity = self.defaults.verbosity - base_rules = self.defaults.base_filter_rules - - # The flags already supported by the ProcessorOptions class. - flags = ['help', 'output=', 'verbose=', 'filter=', 'git-commit='] - - for extra_flag in extra_flags: - if extra_flag in flags: - raise ValueError('Flag \'%(extra_flag)s is duplicated ' - 'or already supported.' % - {'extra_flag': extra_flag}) - flags.append(extra_flag) - - try: - (opts, filenames) = getopt.getopt(args, '', flags) - except getopt.GetoptError: - # FIXME: Settle on an error handling approach: come up - # with a consistent guideline as to when and whether - # a ValueError should be raised versus calling - # sys.exit when needing to interrupt execution. - self._exit_with_usage('Invalid arguments.') - - extra_flag_values = {} - git_commit = None - user_rules = [] - - for (opt, val) in opts: - if opt == '--help': - self._exit_with_usage() - elif opt == '--output': - output_format = val - elif opt == '--verbose': - verbosity = val - elif opt == '--git-commit': - git_commit = val - elif opt == '--filter': - if not val: - self._exit_with_categories() - # Prepend the defaults. - user_rules = self._parse_filter_flag(val) - else: - extra_flag_values[opt] = val - - # Check validity of resulting values. - if filenames and (git_commit != None): - self._exit_with_usage('It is not possible to check files and a ' - 'specific commit at the same time.') - - if output_format not in ('emacs', 'vs7'): - raise ValueError('Invalid --output value "%s": The only ' - 'allowed output formats are emacs and vs7.' % - output_format) - - all_categories = style_categories() - validate_filter_rules(user_rules, all_categories) - - verbosity = int(verbosity) - if (verbosity < 1) or (verbosity > 5): - raise ValueError('Invalid --verbose value %s: value must ' - 'be between 1-5.' % verbosity) - - filter_configuration = FilterConfiguration(base_rules=base_rules, - path_specific=_PATH_RULES_SPECIFIER, - user_rules=user_rules) - - options = ProcessorOptions(extra_flag_values=extra_flag_values, - filter_configuration=filter_configuration, - git_commit=git_commit, - max_reports_per_category=MAX_REPORTS_PER_CATEGORY, - output_format=output_format, - verbosity=verbosity) - - return (filenames, options) + return StyleCheckerConfiguration(filter_configuration=filter_configuration, + max_reports_per_category=_MAX_REPORTS_PER_CATEGORY, + output_format=options.output_format, + stderr_write=sys.stderr.write, + verbosity=options.verbosity) # Enum-like idiom @@ -617,14 +228,14 @@ class ProcessorDispatcher(object): def should_skip_with_warning(self, file_path): """Return whether the given file should be skipped with a warning.""" - for skipped_file in SKIPPED_FILES_WITH_WARNING: + for skipped_file in _SKIPPED_FILES_WITH_WARNING: if file_path.find(skipped_file) >= 0: return True return False def should_skip_without_warning(self, file_path): """Return whether the given file should be skipped without a warning.""" - for skipped_file in SKIPPED_FILES_WITHOUT_WARNING: + for skipped_file in _SKIPPED_FILES_WITHOUT_WARNING: if file_path.find(skipped_file) >= 0: return True return False @@ -678,16 +289,95 @@ class ProcessorDispatcher(object): return processor -# FIXME: When creating the new CheckWebKitStyleOptions class as -# described in a FIXME above, add a new class here called -# something like CheckerConfiguration. The class should contain -# attributes for options needed to process a file. This includes -# a subset of the CheckWebKitStyleOptions attributes, a -# FilterConfiguration attribute, an stderr_write attribute, a -# max_reports_per_category attribute, etc. It can also include -# the is_reportable() method. The StyleChecker should accept -# an instance of this class rather than a ProcessorOptions -# instance. +class StyleCheckerConfiguration(object): + + """Stores configuration values for the StyleChecker class. + + Attributes: + max_reports_per_category: The maximum number of errors to report + per category, per file. + + stderr_write: A function that takes a string as a parameter and + serves as stderr.write. + + verbosity: An integer between 1-5 inclusive that restricts output + to errors with a confidence score at or above this value. + + """ + + def __init__(self, + filter_configuration, + max_reports_per_category, + output_format, + stderr_write, + verbosity): + """Create a StyleCheckerConfiguration instance. + + Args: + filter_configuration: A FilterConfiguration instance. The default + is the "empty" filter configuration, which + means that all errors should be checked. + + max_reports_per_category: The maximum number of errors to report + per category, per file. + + output_format: A string that is the output format. The supported + output formats are "emacs" which emacs can parse + and "vs7" which Microsoft Visual Studio 7 can parse. + + stderr_write: A function that takes a string as a parameter and + serves as stderr.write. + + verbosity: An integer between 1-5 inclusive that restricts output + to errors with a confidence score at or above this value. + The default is 1, which reports all errors. + + """ + self._filter_configuration = filter_configuration + self._output_format = output_format + + self.max_reports_per_category = max_reports_per_category + self.stderr_write = stderr_write + self.verbosity = verbosity + + def is_reportable(self, category, confidence_in_error, file_path): + """Return whether an error is reportable. + + An error is reportable if both the confidence in the error is + at least the current verbosity level and the current filter + says the category should be checked for the given path. + + Args: + category: A string that is a style category. + confidence_in_error: An integer between 1 and 5, inclusive, that + represents the application's confidence in + the error. A higher number signifies greater + confidence. + file_path: The path of the file being checked + + """ + if confidence_in_error < self.verbosity: + return False + + return self._filter_configuration.should_check(category, file_path) + + def write_style_error(self, + category, + confidence, + file_path, + line_number, + message): + """Write a style error to the configured stderr.""" + if self._output_format == 'vs7': + format_string = "%s(%s): %s [%s] [%d]\n" + else: + format_string = "%s:%s: %s [%s] [%d]\n" + + self.stderr_write(format_string % (file_path, + line_number, + message, + category, + confidence)) class StyleChecker(object): @@ -698,28 +388,26 @@ class StyleChecker(object): error_count: An integer that is the total number of reported errors for the lifetime of this StyleChecker instance. - options: A ProcessorOptions instance that controls the behavior - of style checking. + file_count: An integer that is the total number of processed + files. Note that the number of skipped files is + included in this value. """ - def __init__(self, options, stderr_write=None): + def __init__(self, configuration): """Create a StyleChecker instance. Args: - options: See options attribute. - stderr_write: A function that takes a string as a parameter - and that is called when a style error occurs. - Defaults to sys.stderr.write. This should be - used only for unit tests. + configuration: A StyleCheckerConfiguration instance that controls + the behavior of style checking. """ - if stderr_write is None: - stderr_write = sys.stderr.write - - self._stderr_write = stderr_write + self._configuration = configuration self.error_count = 0 - self.options = options + self.file_count = 0 + + def _stderr_write(self, message): + self._configuration.stderr_write(message) def _increment_error_count(self): """Increment the total count of reported errors.""" @@ -784,13 +472,16 @@ class StyleChecker(object): """ if handle_style_error is None: - handle_style_error = DefaultStyleErrorHandler(file_path, - self.options, - self._increment_error_count, - self._stderr_write) + handle_style_error = DefaultStyleErrorHandler( + configuration=self._configuration, + file_path=file_path, + increment_error_count= + self._increment_error_count) if process_file is None: process_file = self._process_file + self.file_count += 1 + dispatcher = ProcessorDispatcher() if dispatcher.should_skip_without_warning(file_path): @@ -800,7 +491,7 @@ class StyleChecker(object): "style guide.\n" % file_path) return - verbosity = self.options.verbosity + verbosity = self._configuration.verbosity processor = dispatcher.dispatch_processor(file_path, handle_style_error, verbosity) @@ -820,9 +511,7 @@ class StyleChecker(object): for file_path, diff in patch_files.iteritems(): style_error_handler = PatchStyleErrorHandler(diff, file_path, - self.options, - self._increment_error_count, - self._stderr_write) + self._configuration, + self._increment_error_count) self.check_file(file_path, style_error_handler) - diff --git a/WebKitTools/Scripts/webkitpy/style/checker_unittest.py b/WebKitTools/Scripts/webkitpy/style/checker_unittest.py index e1c9baf..fe12512 100755 --- a/WebKitTools/Scripts/webkitpy/style/checker_unittest.py +++ b/WebKitTools/Scripts/webkitpy/style/checker_unittest.py @@ -37,119 +37,40 @@ import unittest import checker as style +from checker import _BASE_FILTER_RULES +from checker import _MAX_REPORTS_PER_CATEGORY from checker import _PATH_RULES_SPECIFIER as PATH_RULES_SPECIFIER -from checker import style_categories +from checker import _all_categories +from checker import check_webkit_style_configuration +from checker import check_webkit_style_parser from checker import ProcessorDispatcher -from checker import ProcessorOptions from checker import StyleChecker +from checker import StyleCheckerConfiguration from filter import validate_filter_rules from filter import FilterConfiguration +from optparser import ArgumentParser +from optparser import CommandOptionValues from processors.cpp import CppProcessor from processors.text import TextProcessor -class ProcessorOptionsTest(unittest.TestCase): - - """Tests ProcessorOptions class.""" - - def test_init(self): - """Test __init__ constructor.""" - # Check default parameters. - options = ProcessorOptions() - self.assertEquals(options.extra_flag_values, {}) - self.assertEquals(options.filter_configuration, FilterConfiguration()) - self.assertEquals(options.git_commit, None) - self.assertEquals(options.max_reports_per_category, {}) - self.assertEquals(options.output_format, "emacs") - self.assertEquals(options.verbosity, 1) - - # Check argument validation. - self.assertRaises(ValueError, ProcessorOptions, output_format="bad") - ProcessorOptions(output_format="emacs") # No ValueError: works - ProcessorOptions(output_format="vs7") # works - self.assertRaises(ValueError, ProcessorOptions, verbosity=0) - self.assertRaises(ValueError, ProcessorOptions, verbosity=6) - ProcessorOptions(verbosity=1) # works - ProcessorOptions(verbosity=5) # works - - # Check attributes. - filter_configuration = FilterConfiguration(base_rules=["+"]) - options = ProcessorOptions(extra_flag_values={"extra_value" : 2}, - filter_configuration=filter_configuration, - git_commit="commit", - max_reports_per_category={"category": 3}, - output_format="vs7", - verbosity=3) - self.assertEquals(options.extra_flag_values, {"extra_value" : 2}) - self.assertEquals(options.filter_configuration, filter_configuration) - self.assertEquals(options.git_commit, "commit") - self.assertEquals(options.max_reports_per_category, {"category": 3}) - self.assertEquals(options.output_format, "vs7") - self.assertEquals(options.verbosity, 3) - - def test_eq(self): - """Test __eq__ equality function.""" - # == calls __eq__. - self.assertTrue(ProcessorOptions() == ProcessorOptions()) - - # Verify that a difference in any argument causes equality to fail. - filter_configuration = FilterConfiguration(base_rules=["+"]) - options = ProcessorOptions(extra_flag_values={"extra_value" : 1}, - filter_configuration=filter_configuration, - git_commit="commit", - max_reports_per_category={"category": 3}, - output_format="vs7", - verbosity=1) - self.assertFalse(options == ProcessorOptions(extra_flag_values={"extra_value" : 2})) - new_config = FilterConfiguration(base_rules=["-"]) - self.assertFalse(options == - ProcessorOptions(filter_configuration=new_config)) - self.assertFalse(options == ProcessorOptions(git_commit="commit2")) - self.assertFalse(options == ProcessorOptions(max_reports_per_category= - {"category": 2})) - self.assertFalse(options == ProcessorOptions(output_format="emacs")) - self.assertFalse(options == ProcessorOptions(verbosity=2)) - - def test_ne(self): - """Test __ne__ inequality function.""" - # != calls __ne__. - # By default, __ne__ always returns true on different objects. - # Thus, just check the distinguishing case to verify that the - # code defines __ne__. - self.assertFalse(ProcessorOptions() != ProcessorOptions()) - - def test_is_reportable(self): - """Test is_reportable().""" - filter_configuration = FilterConfiguration(base_rules=["-xyz"]) - options = ProcessorOptions(filter_configuration=filter_configuration, - verbosity=3) - - # Test verbosity - self.assertTrue(options.is_reportable("abc", 3, "foo.h")) - self.assertFalse(options.is_reportable("abc", 2, "foo.h")) - - # Test filter - self.assertTrue(options.is_reportable("xy", 3, "foo.h")) - self.assertFalse(options.is_reportable("xyz", 3, "foo.h")) - - class GlobalVariablesTest(unittest.TestCase): """Tests validity of the global variables.""" def _all_categories(self): - return style.style_categories() + return _all_categories() def defaults(self): - return style.webkit_argument_defaults() + return style._check_webkit_style_defaults() - def test_filter_rules(self): + def test_webkit_base_filter_rules(self): + base_filter_rules = _BASE_FILTER_RULES defaults = self.defaults() already_seen = [] - validate_filter_rules(defaults.base_filter_rules, - self._all_categories()) + validate_filter_rules(base_filter_rules, self._all_categories()) # Also do some additional checks. - for rule in defaults.base_filter_rules: + for rule in base_filter_rules: # Check no leading or trailing white space. self.assertEquals(rule, rule.strip()) # All categories are on by default, so defaults should @@ -161,203 +82,77 @@ class GlobalVariablesTest(unittest.TestCase): def test_defaults(self): """Check that default arguments are valid.""" - defaults = self.defaults() + default_options = self.defaults() # FIXME: We should not need to call parse() to determine # whether the default arguments are valid. - parser = style.ArgumentParser(defaults) + parser = ArgumentParser(all_categories=self._all_categories(), + base_filter_rules=[], + default_options=default_options) # No need to test the return value here since we test parse() # on valid arguments elsewhere. parser.parse([]) # arguments valid: no error or SystemExit def test_path_rules_specifier(self): - all_categories = style_categories() + all_categories = self._all_categories() for (sub_paths, path_rules) in PATH_RULES_SPECIFIER: - self.assertTrue(isinstance(path_rules, tuple), - "Checking: " + str(path_rules)) validate_filter_rules(path_rules, self._all_categories()) - # Try using the path specifier (as an "end-to-end" check). config = FilterConfiguration(path_specific=PATH_RULES_SPECIFIER) - self.assertTrue(config.should_check("xxx_any_category", - "xxx_non_matching_path")) - self.assertTrue(config.should_check("xxx_any_category", - "WebKitTools/WebKitAPITest/")) - self.assertFalse(config.should_check("build/include", - "WebKitTools/WebKitAPITest/")) - self.assertFalse(config.should_check("readability/naming", - "WebKit/qt/tests/qwebelement/tst_qwebelement.cpp")) + + def assertCheck(path, category): + """Assert that the given category should be checked.""" + message = ('Should check category "%s" for path "%s".' + % (category, path)) + self.assertTrue(config.should_check(category, path)) + + def assertNoCheck(path, category): + """Assert that the given category should not be checked.""" + message = ('Should not check category "%s" for path "%s".' + % (category, path)) + self.assertFalse(config.should_check(category, path), message) + + assertCheck("random_path.cpp", + "build/include") + assertNoCheck("WebKitTools/WebKitAPITest/main.cpp", + "build/include") + assertNoCheck("WebKit/qt/QGVLauncher/main.cpp", + "build/include") + assertNoCheck("WebKit/qt/QGVLauncher/main.cpp", + "readability/streams") + + assertCheck("random_path.cpp", + "readability/naming") + assertNoCheck("WebKit/gtk/webkit/webkit.h", + "readability/naming") + assertNoCheck("WebCore/css/CSSParser.cpp", + "readability/naming") + assertNoCheck("WebKit/qt/tests/qwebelement/tst_qwebelement.cpp", + "readability/naming") + assertNoCheck( + "JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp", + "readability/naming") def test_max_reports_per_category(self): - """Check that MAX_REPORTS_PER_CATEGORY is valid.""" + """Check that _MAX_REPORTS_PER_CATEGORY is valid.""" all_categories = self._all_categories() - for category in style.MAX_REPORTS_PER_CATEGORY.iterkeys(): + for category in _MAX_REPORTS_PER_CATEGORY.iterkeys(): self.assertTrue(category in all_categories, 'Key "%s" is not a category' % category) -class ArgumentPrinterTest(unittest.TestCase): - - """Tests the ArgumentPrinter class.""" - - _printer = style.ArgumentPrinter() - - def _create_options(self, - output_format='emacs', - verbosity=3, - user_rules=[], - git_commit=None, - extra_flag_values={}): - filter_configuration = FilterConfiguration(user_rules=user_rules) - return style.ProcessorOptions(extra_flag_values=extra_flag_values, - filter_configuration=filter_configuration, - git_commit=git_commit, - output_format=output_format, - verbosity=verbosity) +class CheckWebKitStyleFunctionTest(unittest.TestCase): + + """Tests the functions with names of the form check_webkit_style_*.""" + + def test_check_webkit_style_configuration(self): + # Exercise the code path to make sure the function does not error out. + option_values = CommandOptionValues() + configuration = check_webkit_style_configuration(option_values) - def test_to_flag_string(self): - options = self._create_options('vs7', 5, ['+foo', '-bar'], 'git', - {'a': 0, 'z': 1}) - self.assertEquals('--a=0 --filter=+foo,-bar --git-commit=git ' - '--output=vs7 --verbose=5 --z=1', - self._printer.to_flag_string(options)) - - # This is to check that --filter and --git-commit do not - # show up when not user-specified. - options = self._create_options() - self.assertEquals('--output=emacs --verbose=3', - self._printer.to_flag_string(options)) - - -class ArgumentParserTest(unittest.TestCase): - - """Test the ArgumentParser class.""" - - def _parse(self): - """Return a default parse() function for testing.""" - return self._create_parser().parse - - def _create_defaults(self, default_output_format='vs7', - default_verbosity=3, - default_filter_rules=['-', '+whitespace']): - """Return a default ArgumentDefaults instance for testing.""" - return style.ArgumentDefaults(default_output_format, - default_verbosity, - default_filter_rules) - - def _create_parser(self, defaults=None): - """Return an ArgumentParser instance for testing.""" - def create_usage(_defaults): - """Return a usage string for testing.""" - return "usage" - - def doc_print(message): - # We do not want the usage string or style categories - # to print during unit tests, so print nothing. - return - - if defaults is None: - defaults = self._create_defaults() - - return style.ArgumentParser(defaults, create_usage, doc_print) - - def test_parse_documentation(self): - parse = self._parse() - - # FIXME: Test both the printing of the usage string and the - # filter categories help. - - # Request the usage string. - self.assertRaises(SystemExit, parse, ['--help']) - # Request default filter rules and available style categories. - self.assertRaises(SystemExit, parse, ['--filter=']) - - def test_parse_bad_values(self): - parse = self._parse() - - # Pass an unsupported argument. - self.assertRaises(SystemExit, parse, ['--bad']) - - self.assertRaises(ValueError, parse, ['--verbose=bad']) - self.assertRaises(ValueError, parse, ['--verbose=0']) - self.assertRaises(ValueError, parse, ['--verbose=6']) - parse(['--verbose=1']) # works - parse(['--verbose=5']) # works - - self.assertRaises(ValueError, parse, ['--output=bad']) - parse(['--output=vs7']) # works - - # Pass a filter rule not beginning with + or -. - self.assertRaises(ValueError, parse, ['--filter=build']) - parse(['--filter=+build']) # works - # Pass files and git-commit at the same time. - self.assertRaises(SystemExit, parse, ['--git-commit=', 'file.txt']) - # Pass an extra flag already supported. - self.assertRaises(ValueError, parse, [], ['filter=']) - parse([], ['extra=']) # works - # Pass an extra flag with typo. - self.assertRaises(SystemExit, parse, ['--extratypo='], ['extra=']) - parse(['--extra='], ['extra=']) # works - self.assertRaises(ValueError, parse, [], ['extra=', 'extra=']) - - - def test_parse_default_arguments(self): - parse = self._parse() - - (files, options) = parse([]) - - self.assertEquals(files, []) - - self.assertEquals(options.output_format, 'vs7') - self.assertEquals(options.verbosity, 3) - self.assertEquals(options.filter_configuration, - FilterConfiguration(base_rules=["-", "+whitespace"], - path_specific=PATH_RULES_SPECIFIER)) - self.assertEquals(options.git_commit, None) - - def test_parse_explicit_arguments(self): - parse = self._parse() - - # Pass non-default explicit values. - (files, options) = parse(['--output=emacs']) - self.assertEquals(options.output_format, 'emacs') - (files, options) = parse(['--verbose=4']) - self.assertEquals(options.verbosity, 4) - (files, options) = parse(['--git-commit=commit']) - self.assertEquals(options.git_commit, 'commit') - - # Pass user_rules. - (files, options) = parse(['--filter=+build,-whitespace']) - config = options.filter_configuration - self.assertEquals(options.filter_configuration, - FilterConfiguration(base_rules=["-", "+whitespace"], - path_specific=PATH_RULES_SPECIFIER, - user_rules=["+build", "-whitespace"])) - - # Pass spurious white space in user rules. - (files, options) = parse(['--filter=+build, -whitespace']) - self.assertEquals(options.filter_configuration, - FilterConfiguration(base_rules=["-", "+whitespace"], - path_specific=PATH_RULES_SPECIFIER, - user_rules=["+build", "-whitespace"])) - - # Pass extra flag values. - (files, options) = parse(['--extra'], ['extra']) - self.assertEquals(options.extra_flag_values, {'--extra': ''}) - (files, options) = parse(['--extra='], ['extra=']) - self.assertEquals(options.extra_flag_values, {'--extra': ''}) - (files, options) = parse(['--extra=x'], ['extra=']) - self.assertEquals(options.extra_flag_values, {'--extra': 'x'}) - - def test_parse_files(self): - parse = self._parse() - - (files, options) = parse(['foo.cpp']) - self.assertEquals(files, ['foo.cpp']) - - # Pass multiple files. - (files, options) = parse(['--output=emacs', 'foo.cpp', 'bar.cpp']) - self.assertEquals(files, ['foo.cpp', 'bar.cpp']) + def test_check_webkit_style_parser(self): + # Exercise the code path to make sure the function does not error out. + parser = check_webkit_style_parser() class ProcessorDispatcherSkipTest(unittest.TestCase): @@ -519,30 +314,96 @@ class ProcessorDispatcherDispatchTest(unittest.TestCase): self.assert_processor_none(path) -class StyleCheckerTest(unittest.TestCase): +class StyleCheckerConfigurationTest(unittest.TestCase): - """Test the StyleChecker class. + """Tests the StyleCheckerConfiguration class.""" - Attributes: - error_messages: A string containing all of the warning messages - written to the mock_stderr_write method of - this class. + def setUp(self): + self._error_messages = [] + """The messages written to _mock_stderr_write() of this class.""" - """ + def _mock_stderr_write(self, message): + self._error_messages.append(message) + + def _style_checker_configuration(self, output_format="vs7"): + """Return a StyleCheckerConfiguration instance for testing.""" + base_rules = ["-whitespace", "+whitespace/tab"] + filter_configuration = FilterConfiguration(base_rules=base_rules) + + return StyleCheckerConfiguration( + filter_configuration=filter_configuration, + max_reports_per_category={"whitespace/newline": 1}, + output_format=output_format, + stderr_write=self._mock_stderr_write, + verbosity=3) + + def test_init(self): + """Test the __init__() method.""" + configuration = self._style_checker_configuration() + + # Check that __init__ sets the "public" data attributes correctly. + self.assertEquals(configuration.max_reports_per_category, + {"whitespace/newline": 1}) + self.assertEquals(configuration.stderr_write, self._mock_stderr_write) + self.assertEquals(configuration.verbosity, 3) + + def test_is_reportable(self): + """Test the is_reportable() method.""" + config = self._style_checker_configuration() + + self.assertTrue(config.is_reportable("whitespace/tab", 3, "foo.txt")) + + # Test the confidence check code path by varying the confidence. + self.assertFalse(config.is_reportable("whitespace/tab", 2, "foo.txt")) + + # Test the category check code path by varying the category. + self.assertFalse(config.is_reportable("whitespace/line", 4, "foo.txt")) + + def _call_write_style_error(self, output_format): + config = self._style_checker_configuration(output_format=output_format) + config.write_style_error(category="whitespace/tab", + confidence=5, + file_path="foo.h", + line_number=100, + message="message") + + def test_write_style_error_emacs(self): + """Test the write_style_error() method.""" + self._call_write_style_error("emacs") + self.assertEquals(self._error_messages, + ["foo.h:100: message [whitespace/tab] [5]\n"]) + + def test_write_style_error_vs7(self): + """Test the write_style_error() method.""" + self._call_write_style_error("vs7") + self.assertEquals(self._error_messages, + ["foo.h(100): message [whitespace/tab] [5]\n"]) + + +class StyleCheckerTest(unittest.TestCase): + + """Test the StyleChecker class.""" def _mock_stderr_write(self, message): pass - def _style_checker(self, options): - return StyleChecker(options, self._mock_stderr_write) + def _style_checker(self, configuration): + return StyleChecker(configuration) def test_init(self): """Test __init__ constructor.""" - options = ProcessorOptions() - style_checker = self._style_checker(options) + configuration = StyleCheckerConfiguration( + filter_configuration=FilterConfiguration(), + max_reports_per_category={}, + output_format="vs7", + stderr_write=self._mock_stderr_write, + verbosity=3) + + style_checker = self._style_checker(configuration) + self.assertEquals(style_checker._configuration, configuration) self.assertEquals(style_checker.error_count, 0) - self.assertEquals(style_checker.options, options) + self.assertEquals(style_checker.file_count, 0) class StyleCheckerCheckFileTest(unittest.TestCase): @@ -609,20 +470,21 @@ class StyleCheckerCheckFileTest(unittest.TestCase): # Confirm that the attributes are reset. self.assert_attributes(None, None, None, "") - # Create a test StyleChecker instance. - # - # The verbosity attribute is the only ProcessorOptions - # attribute that needs to be checked in this test. - # This is because it is the only option is directly - # passed to the constructor of a style processor. - options = ProcessorOptions(verbosity=3) + configuration = StyleCheckerConfiguration( + filter_configuration=FilterConfiguration(), + max_reports_per_category={"whitespace/newline": 1}, + output_format="vs7", + stderr_write=self.mock_stderr_write, + verbosity=3) - style_checker = StyleChecker(options, self.mock_stderr_write) + style_checker = StyleChecker(configuration) style_checker.check_file(file_path, self.mock_handle_style_error, self.mock_process_file) + self.assertEquals(1, style_checker.file_count) + def test_check_file_on_skip_without_warning(self): """Test check_file() for a skipped-without-warning file.""" @@ -678,4 +540,3 @@ if __name__ == '__main__': import sys unittest.main() - diff --git a/WebKitTools/Scripts/webkitpy/style/error_handlers.py b/WebKitTools/Scripts/webkitpy/style/error_handlers.py index 1940e03..6bc3f15 100644 --- a/WebKitTools/Scripts/webkitpy/style/error_handlers.py +++ b/WebKitTools/Scripts/webkitpy/style/error_handlers.py @@ -56,30 +56,21 @@ class DefaultStyleErrorHandler(object): """The default style error handler.""" - def __init__(self, file_path, options, increment_error_count, - stderr_write=None): + def __init__(self, file_path, configuration, increment_error_count): """Create a default style error handler. Args: file_path: The path to the file containing the error. This is used for reporting to the user. - options: A ProcessorOptions instance. + configuration: A StyleCheckerConfiguration instance. increment_error_count: A function that takes no arguments and increments the total count of reportable errors. - stderr_write: A function that takes a string as a parameter - and that is called when a style error occurs. - Defaults to sys.stderr.write. This should be - used only for unit tests. """ - if stderr_write is None: - stderr_write = sys.stderr.write - self._file_path = file_path + self._configuration = configuration self._increment_error_count = increment_error_count - self._options = options - self._stderr_write = stderr_write # A string to integer dictionary cache of the number of reportable # errors per category passed to this instance. @@ -99,9 +90,9 @@ class DefaultStyleErrorHandler(object): def _max_reports(self, category): """Return the maximum number of errors to report.""" - if not category in self._options.max_reports_per_category: + if not category in self._configuration.max_reports_per_category: return None - return self._options.max_reports_per_category[category] + return self._configuration.max_reports_per_category[category] def __call__(self, line_number, category, confidence, message): """Handle the occurrence of a style error. @@ -109,9 +100,9 @@ class DefaultStyleErrorHandler(object): See the docstring of this module for more information. """ - if not self._options.is_reportable(category, - confidence, - self._file_path): + if not self._configuration.is_reportable(category=category, + confidence_in_error=confidence, + file_path=self._file_path): return category_total = self._add_reportable_error(category) @@ -122,28 +113,22 @@ class DefaultStyleErrorHandler(object): # Then suppress displaying the error. return - if self._options.output_format == 'vs7': - format_string = "%s(%s): %s [%s] [%d]\n" - else: - format_string = "%s:%s: %s [%s] [%d]\n" + self._configuration.write_style_error(category=category, + confidence=confidence, + file_path=self._file_path, + line_number=line_number, + message=message) if category_total == max_reports: - format_string += ("Suppressing further [%s] reports for this " - "file.\n" % category) - - self._stderr_write(format_string % (self._file_path, - line_number, - message, - category, - confidence)) + self._configuration.stderr_write("Suppressing further [%s] reports " + "for this file.\n" % category) class PatchStyleErrorHandler(object): """The style error function for patch files.""" - def __init__(self, diff, file_path, options, increment_error_count, - stderr_write): + def __init__(self, diff, file_path, configuration, increment_error_count): """Create a patch style error handler for the given path. Args: @@ -153,10 +138,12 @@ class PatchStyleErrorHandler(object): """ self._diff = diff - self._default_error_handler = DefaultStyleErrorHandler(file_path, - options, - increment_error_count, - stderr_write) + + self._default_error_handler = DefaultStyleErrorHandler( + configuration=configuration, + file_path=file_path, + increment_error_count= + increment_error_count) # The line numbers of the modified lines. This is set lazily. self._line_numbers = set() diff --git a/WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py b/WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py index 1d7e998..a39ba2a 100644 --- a/WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py +++ b/WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py @@ -26,124 +26,111 @@ import unittest from .. style_references import parse_patch -from checker import ProcessorOptions +from checker import StyleCheckerConfiguration from error_handlers import DefaultStyleErrorHandler from error_handlers import PatchStyleErrorHandler - +from filter import FilterConfiguration class StyleErrorHandlerTestBase(unittest.TestCase): def setUp(self): - self._error_messages = "" + self._error_messages = [] self._error_count = 0 def _mock_increment_error_count(self): self._error_count += 1 def _mock_stderr_write(self, message): - self._error_messages += message + self._error_messages.append(message) + + def _style_checker_configuration(self): + """Return a StyleCheckerConfiguration instance for testing.""" + base_rules = ["-whitespace", "+whitespace/tab"] + filter_configuration = FilterConfiguration(base_rules=base_rules) + + return StyleCheckerConfiguration( + filter_configuration=filter_configuration, + max_reports_per_category={"whitespace/tab": 2}, + output_format="vs7", + stderr_write=self._mock_stderr_write, + verbosity=3) class DefaultStyleErrorHandlerTest(StyleErrorHandlerTestBase): """Tests DefaultStyleErrorHandler class.""" - _file_path = "foo.h" - _category = "whitespace/tab" + """The category name for the tests in this class.""" - def _error_handler(self, options): - return DefaultStyleErrorHandler(self._file_path, - options, - self._mock_increment_error_count, - self._mock_stderr_write) + _file_path = "foo.h" + """The file path for the tests in this class.""" def _check_initialized(self): """Check that count and error messages are initialized.""" self.assertEquals(0, self._error_count) - self.assertEquals("", self._error_messages) - - def _call(self, handle_error, options, confidence): - """Handle an error with the given error handler.""" - line_number = 100 - message = "message" - - handle_error(line_number, self._category, confidence, message) - - def _call_error_handler(self, options, confidence): - """Handle an error using a new error handler.""" - handle_error = self._error_handler(options) - self._call(handle_error, options, confidence) - - def test_call_non_reportable(self): - """Test __call__() method with a non-reportable error.""" - confidence = 1 - options = ProcessorOptions(verbosity=3) + self.assertEquals(0, len(self._error_messages)) + + def _error_handler(self, configuration): + return DefaultStyleErrorHandler(configuration=configuration, + file_path=self._file_path, + increment_error_count=self._mock_increment_error_count) + + def _call_error_handler(self, handle_error, confidence): + """Call the given error handler with a test error.""" + handle_error(line_number=100, + category=self._category, + confidence=confidence, + message="message") + + def test_non_reportable_error(self): + """Test __call__() with a non-reportable error.""" self._check_initialized() + configuration = self._style_checker_configuration() + confidence = 1 # Confirm the error is not reportable. - self.assertFalse(options.is_reportable(self._category, - confidence, - self._file_path)) - - self._call_error_handler(options, confidence) + self.assertFalse(configuration.is_reportable(self._category, + confidence, + self._file_path)) + error_handler = self._error_handler(configuration) + self._call_error_handler(error_handler, confidence) self.assertEquals(0, self._error_count) - self.assertEquals("", self._error_messages) - - def test_call_reportable_emacs(self): - """Test __call__() method with a reportable error and emacs format.""" - confidence = 5 - options = ProcessorOptions(verbosity=3, output_format="emacs") - self._check_initialized() + self.assertEquals([], self._error_messages) - self._call_error_handler(options, confidence) - - self.assertEquals(1, self._error_count) - self.assertEquals(self._error_messages, - "foo.h:100: message [whitespace/tab] [5]\n") - - def test_call_reportable_vs7(self): - """Test __call__() method with a reportable error and vs7 format.""" - confidence = 5 - options = ProcessorOptions(verbosity=3, output_format="vs7") + # Also serves as a reportable error test. + def test_max_reports_per_category(self): + """Test error report suppression in __call__() method.""" self._check_initialized() + configuration = self._style_checker_configuration() + error_handler = self._error_handler(configuration) - self._call_error_handler(options, confidence) - - self.assertEquals(1, self._error_count) - self.assertEquals(self._error_messages, - "foo.h(100): message [whitespace/tab] [5]\n") - - def test_call_max_reports_per_category(self): - """Test error report suppression in __call__() method.""" confidence = 5 - options = ProcessorOptions(verbosity=3, - max_reports_per_category={self._category: 2}) - error_handler = self._error_handler(options) - - self._check_initialized() # First call: usual reporting. - self._call(error_handler, options, confidence) + self._call_error_handler(error_handler, confidence) self.assertEquals(1, self._error_count) + self.assertEquals(1, len(self._error_messages)) self.assertEquals(self._error_messages, - "foo.h:100: message [whitespace/tab] [5]\n") + ["foo.h(100): message [whitespace/tab] [5]\n"]) # Second call: suppression message reported. - self._error_messages = "" - self._call(error_handler, options, confidence) + self._call_error_handler(error_handler, confidence) + # The "Suppressing further..." message counts as an additional + # message (but not as an addition to the error count). self.assertEquals(2, self._error_count) - self.assertEquals(self._error_messages, - "foo.h:100: message [whitespace/tab] [5]\n" - "Suppressing further [%s] reports for this file.\n" - % self._category) + self.assertEquals(3, len(self._error_messages)) + self.assertEquals(self._error_messages[-2], + "foo.h(100): message [whitespace/tab] [5]\n") + self.assertEquals(self._error_messages[-1], + "Suppressing further [whitespace/tab] reports " + "for this file.\n") # Third call: no report. - self._error_messages = "" - self._call(error_handler, options, confidence) + self._call_error_handler(error_handler, confidence) self.assertEquals(3, self._error_count) - self.assertEquals(self._error_messages, "") + self.assertEquals(3, len(self._error_messages)) class PatchStyleErrorHandlerTest(StyleErrorHandlerTestBase): @@ -166,22 +153,22 @@ index ef65bee..e3db70e 100644 patch_files = parse_patch(self._patch_string) diff = patch_files[self._file_path] - options = ProcessorOptions(verbosity=3) + configuration = self._style_checker_configuration() - handle_error = PatchStyleErrorHandler(diff, - self._file_path, - options, - self._mock_increment_error_count, - self._mock_stderr_write) + handle_error = PatchStyleErrorHandler(diff=diff, + file_path=self._file_path, + configuration=configuration, + increment_error_count= + self._mock_increment_error_count) category = "whitespace/tab" confidence = 5 message = "message" # Confirm error is reportable. - self.assertTrue(options.is_reportable(category, - confidence, - self._file_path)) + self.assertTrue(configuration.is_reportable(category, + confidence, + self._file_path)) # Confirm error count initialized to zero. self.assertEquals(0, self._error_count) diff --git a/WebKitTools/Scripts/webkitpy/style/filter.py b/WebKitTools/Scripts/webkitpy/style/filter.py index 19c2f4d..608a9e6 100644 --- a/WebKitTools/Scripts/webkitpy/style/filter.py +++ b/WebKitTools/Scripts/webkitpy/style/filter.py @@ -139,12 +139,8 @@ class FilterConfiguration(object): are appended. The first substring match takes precedence, i.e. only the first match triggers an append. - The "path_rules" value is the tuple of filter + The "path_rules" value is a list of filter rules that can be appended to the base rules. - The value is a tuple rather than a list so it - can be used as a dictionary key. The dictionary - is for caching purposes in the implementation of - this class. user_rules: A list of filter rules that is always appended to the base rules and any path rules. In other @@ -165,11 +161,7 @@ class FilterConfiguration(object): self._path_specific_lower = None """The backing store for self._get_path_specific_lower().""" - # FIXME: Make user rules internal after the FilterConfiguration - # attribute is removed from ProcessorOptions (since at - # that point ArgumentPrinter will no longer need to - # access FilterConfiguration.user_rules). - self.user_rules = user_rules + self._user_rules = user_rules self._path_rules_to_filter = {} """Cached dictionary of path rules to CategoryFilter instance.""" @@ -188,7 +180,7 @@ class FilterConfiguration(object): return False if self._path_specific != other._path_specific: return False - if self.user_rules != other.user_rules: + if self._user_rules != other._user_rules: return False return True @@ -210,22 +202,34 @@ class FilterConfiguration(object): return self._path_specific_lower def _path_rules_from_path(self, path): - """Determine the path-specific rules to use, and return as a tuple.""" + """Determine the path-specific rules to use, and return as a tuple. + + This method returns a tuple rather than a list so the return + value can be passed to _filter_from_path_rules() without change. + + """ path = path.lower() for (sub_paths, path_rules) in self._get_path_specific_lower(): for sub_path in sub_paths: if path.find(sub_path) > -1: - return path_rules + return tuple(path_rules) return () # Default to the empty tuple. def _filter_from_path_rules(self, path_rules): - """Return the CategoryFilter associated to a path rules tuple.""" + """Return the CategoryFilter associated to the given path rules. + + Args: + path_rules: A tuple of path rules. We require a tuple rather + than a list so the value can be used as a dictionary + key in self._path_rules_to_filter. + + """ # We reuse the same CategoryFilter where possible to take # advantage of the caching they do. if path_rules not in self._path_rules_to_filter: rules = list(self._base_rules) # Make a copy rules.extend(path_rules) - rules.extend(self.user_rules) + rules.extend(self._user_rules) self._path_rules_to_filter[path_rules] = _CategoryFilter(rules) return self._path_rules_to_filter[path_rules] diff --git a/WebKitTools/Scripts/webkitpy/style/filter_unittest.py b/WebKitTools/Scripts/webkitpy/style/filter_unittest.py index 84760a5..7b8a5402 100644 --- a/WebKitTools/Scripts/webkitpy/style/filter_unittest.py +++ b/WebKitTools/Scripts/webkitpy/style/filter_unittest.py @@ -157,14 +157,14 @@ class FilterConfigurationTest(unittest.TestCase): # Test that the attributes are getting set correctly. # We use parameter values that are different from the defaults. base_rules = ["-"] - path_specific = [(["path"], ("+a",))] + path_specific = [(["path"], ["+a"])] user_rules = ["+"] config = self._config(base_rules, path_specific, user_rules) self.assertEquals(base_rules, config._base_rules) self.assertEquals(path_specific, config._path_specific) - self.assertEquals(user_rules, config.user_rules) + self.assertEquals(user_rules, config._user_rules) def test_default_arguments(self): # Test that the attributes are getting set correctly to the defaults. @@ -172,7 +172,7 @@ class FilterConfigurationTest(unittest.TestCase): self.assertEquals([], config._base_rules) self.assertEquals([], config._path_specific) - self.assertEquals([], config.user_rules) + self.assertEquals([], config._user_rules) def test_eq(self): """Test __eq__ method.""" @@ -185,7 +185,7 @@ class FilterConfigurationTest(unittest.TestCase): # These parameter values are different from the defaults. base_rules = ["-"] - path_specific = [(["path"], ("+a",))] + path_specific = [(["path"], ["+a"])] user_rules = ["+"] self.assertFalse(config.__eq__(FilterConfiguration( @@ -219,8 +219,8 @@ class FilterConfigurationTest(unittest.TestCase): def test_path_specific(self): """Test effect of path_rules_specifier on should_check().""" base_rules = ["-"] - path_specific = [(["path1"], ("+b",)), - (["path2"], ("+c",))] + path_specific = [(["path1"], ["+b"]), + (["path2"], ["+c"])] user_rules = [] config = self._config(base_rules, path_specific, user_rules) @@ -233,7 +233,7 @@ class FilterConfigurationTest(unittest.TestCase): def test_path_with_different_case(self): """Test a path that differs only in case.""" base_rules = ["-"] - path_specific = [(["Foo/"], ("+whitespace",))] + path_specific = [(["Foo/"], ["+whitespace"])] user_rules = [] config = self._config(base_rules, path_specific, user_rules) diff --git a/WebKitTools/Scripts/webkitpy/style/optparser.py b/WebKitTools/Scripts/webkitpy/style/optparser.py new file mode 100644 index 0000000..4137c8b --- /dev/null +++ b/WebKitTools/Scripts/webkitpy/style/optparser.py @@ -0,0 +1,424 @@ +# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Supports the parsing of command-line options for check-webkit-style.""" + +import getopt +import os.path +import sys + +from filter import validate_filter_rules +# This module should not import anything from checker.py. + + +def _create_usage(default_options): + """Return the usage string to display for command help. + + Args: + default_options: A DefaultCommandOptionValues instance. + + """ + usage = """ +Syntax: %(program_name)s [--verbose=#] [--git-commit=<SingleCommit>] [--output=vs7] + [--filter=-x,+y,...] [file] ... + + The style guidelines this tries to follow are here: + http://webkit.org/coding/coding-style.html + + Every style error is given a confidence score from 1-5, with 5 meaning + we are certain of the problem, and 1 meaning it could be a legitimate + construct. This can miss some errors and does not substitute for + code review. + + To prevent specific lines from being linted, add a '// NOLINT' comment to the + end of the line. + + Linted extensions are .cpp, .c and .h. Other file types are ignored. + + The file parameter is optional and accepts multiple files. Leaving + out the file parameter applies the check to all files considered changed + by your source control management system. + + Flags: + + verbose=# + A number 1-5 that restricts output to errors with a confidence + score at or above this value. In particular, the value 1 displays + all errors. The default is %(default_verbosity)s. + + git-commit=<SingleCommit> + Checks the style of everything from the given commit to the local tree. + + output=vs7 + The output format, which may be one of + emacs : to ease emacs parsing + vs7 : compatible with Visual Studio + Defaults to "%(default_output_format)s". Other formats are unsupported. + + filter=-x,+y,... + A comma-separated list of boolean filter rules used to filter + which categories of style guidelines to check. The script checks + a category if the category passes the filter rules, as follows. + + Any webkit category starts out passing. All filter rules are then + evaluated left to right, with later rules taking precedence. For + example, the rule "+foo" passes any category that starts with "foo", + and "-foo" fails any such category. The filter input "-whitespace, + +whitespace/braces" fails the category "whitespace/tab" and passes + "whitespace/braces". + + Examples: --filter=-whitespace,+whitespace/braces + --filter=-whitespace,-runtime/printf,+runtime/printf_format + --filter=-,+build/include_what_you_use + + Category names appear in error messages in brackets, for example + [whitespace/indent]. To see a list of all categories available to + %(program_name)s, along with which are enabled by default, pass + the empty filter as follows: + --filter= +""" % {'program_name': os.path.basename(sys.argv[0]), + 'default_verbosity': default_options.verbosity, + 'default_output_format': default_options.output_format} + + return usage + + +# This class should not have knowledge of the flag key names. +class DefaultCommandOptionValues(object): + + """Stores the default check-webkit-style command-line options. + + Attributes: + output_format: A string that is the default output format. + verbosity: An integer that is the default verbosity level. + + """ + + def __init__(self, output_format, verbosity): + self.output_format = output_format + self.verbosity = verbosity + + +# FIXME: Eliminate support for "extra_flag_values". +# +# This class should not have knowledge of the flag key names. +class CommandOptionValues(object): + + """Stores the option values passed by the user via the command line. + + Attributes: + extra_flag_values: A string-string dictionary of all flag key-value + pairs that are not otherwise represented by this + class. The default is the empty dictionary. + + filter_rules: The list of filter rules provided by the user. + These rules are appended to the base rules and + path-specific rules and so take precedence over + the base filter rules, etc. + + git_commit: A string representing the git commit to check. + The default is None. + + output_format: A string that is the output format. The supported + output formats are "emacs" which emacs can parse + and "vs7" which Microsoft Visual Studio 7 can parse. + + verbosity: An integer between 1-5 inclusive that restricts output + to errors with a confidence score at or above this value. + The default is 1, which reports all errors. + + """ + def __init__(self, + extra_flag_values=None, + filter_rules=None, + git_commit=None, + output_format="emacs", + verbosity=1): + if extra_flag_values is None: + extra_flag_values = {} + if filter_rules is None: + filter_rules = [] + + if output_format not in ("emacs", "vs7"): + raise ValueError('Invalid "output_format" parameter: ' + 'value must be "emacs" or "vs7". ' + 'Value given: "%s".' % output_format) + + if (verbosity < 1) or (verbosity > 5): + raise ValueError('Invalid "verbosity" parameter: ' + "value must be an integer between 1-5 inclusive. " + 'Value given: "%s".' % verbosity) + + self.extra_flag_values = extra_flag_values + self.filter_rules = filter_rules + self.git_commit = git_commit + self.output_format = output_format + self.verbosity = verbosity + + # Useful for unit testing. + def __eq__(self, other): + """Return whether this instance is equal to another.""" + if self.extra_flag_values != other.extra_flag_values: + return False + if self.filter_rules != other.filter_rules: + return False + if self.git_commit != other.git_commit: + return False + if self.output_format != other.output_format: + return False + if self.verbosity != other.verbosity: + return False + + return True + + # Useful for unit testing. + def __ne__(self, other): + # Python does not automatically deduce this from __eq__(). + return not self.__eq__(other) + + +class ArgumentPrinter(object): + + """Supports the printing of check-webkit-style command arguments.""" + + def _flag_pair_to_string(self, flag_key, flag_value): + return '--%(key)s=%(val)s' % {'key': flag_key, 'val': flag_value } + + def to_flag_string(self, options): + """Return a flag string of the given CommandOptionValues instance. + + This method orders the flag values alphabetically by the flag key. + + Args: + options: A CommandOptionValues instance. + + """ + flags = options.extra_flag_values.copy() + + flags['output'] = options.output_format + flags['verbose'] = options.verbosity + # Only include the filter flag if user-provided rules are present. + filter_rules = options.filter_rules + if filter_rules: + flags['filter'] = ",".join(filter_rules) + if options.git_commit: + flags['git-commit'] = options.git_commit + + flag_string = '' + # Alphabetizing lets us unit test this method. + for key in sorted(flags.keys()): + flag_string += self._flag_pair_to_string(key, flags[key]) + ' ' + + return flag_string.strip() + + +# FIXME: Replace the use of getopt.getopt() with optparse.OptionParser. +class ArgumentParser(object): + + # FIXME: Move the documentation of the attributes to the __init__ + # docstring after making the attributes internal. + """Supports the parsing of check-webkit-style command arguments. + + Attributes: + create_usage: A function that accepts a DefaultCommandOptionValues + instance and returns a string of usage instructions. + Defaults to the function that generates the usage + string for check-webkit-style. + default_options: A DefaultCommandOptionValues instance that provides + the default values for options not explicitly + provided by the user. + stderr_write: A function that takes a string as a parameter and + serves as stderr.write. Defaults to sys.stderr.write. + This parameter should be specified only for unit tests. + + """ + + def __init__(self, + all_categories, + default_options, + base_filter_rules=None, + create_usage=None, + stderr_write=None): + """Create an ArgumentParser instance. + + Args: + all_categories: The set of all available style categories. + default_options: See the corresponding attribute in the class + docstring. + Keyword Args: + base_filter_rules: The list of filter rules at the beginning of + the list of rules used to check style. This + list has the least precedence when checking + style and precedes any user-provided rules. + The class uses this parameter only for display + purposes to the user. Defaults to the empty list. + create_usage: See the documentation of the corresponding + attribute in the class docstring. + stderr_write: See the documentation of the corresponding + attribute in the class docstring. + + """ + if base_filter_rules is None: + base_filter_rules = [] + if create_usage is None: + create_usage = _create_usage + if stderr_write is None: + stderr_write = sys.stderr.write + + self._all_categories = all_categories + self._base_filter_rules = base_filter_rules + # FIXME: Rename these to reflect that they are internal. + self.create_usage = create_usage + self.default_options = default_options + self.stderr_write = stderr_write + + def _exit_with_usage(self, error_message=''): + """Exit and print a usage string with an optional error message. + + Args: + error_message: A string that is an error message to print. + + """ + usage = self.create_usage(self.default_options) + self.stderr_write(usage) + if error_message: + sys.exit('\nFATAL ERROR: ' + error_message) + else: + sys.exit(1) + + def _exit_with_categories(self): + """Exit and print the style categories and default filter rules.""" + self.stderr_write('\nAll categories:\n') + for category in sorted(self._all_categories): + self.stderr_write(' ' + category + '\n') + + self.stderr_write('\nDefault filter rules**:\n') + for filter_rule in sorted(self._base_filter_rules): + self.stderr_write(' ' + filter_rule + '\n') + self.stderr_write('\n**The command always evaluates the above rules, ' + 'and before any --filter flag.\n\n') + + sys.exit(0) + + def _parse_filter_flag(self, flag_value): + """Parse the --filter flag, and return a list of filter rules. + + Args: + flag_value: A string of comma-separated filter rules, for + example "-whitespace,+whitespace/indent". + + """ + filters = [] + for uncleaned_filter in flag_value.split(','): + filter = uncleaned_filter.strip() + if not filter: + continue + filters.append(filter) + return filters + + def parse(self, args, extra_flags=None): + """Parse the command line arguments to check-webkit-style. + + Args: + args: A list of command-line arguments as returned by sys.argv[1:]. + extra_flags: A list of flags whose values we want to extract, but + are not supported by the CommandOptionValues class. + An example flag "new_flag=". This defaults to the + empty list. + + Returns: + A tuple of (filenames, options) + + filenames: The list of filenames to check. + options: A CommandOptionValues instance. + + """ + if extra_flags is None: + extra_flags = [] + + output_format = self.default_options.output_format + verbosity = self.default_options.verbosity + + # The flags already supported by the CommandOptionValues class. + flags = ['help', 'output=', 'verbose=', 'filter=', 'git-commit='] + + for extra_flag in extra_flags: + if extra_flag in flags: + raise ValueError('Flag \'%(extra_flag)s is duplicated ' + 'or already supported.' % + {'extra_flag': extra_flag}) + flags.append(extra_flag) + + try: + (opts, filenames) = getopt.getopt(args, '', flags) + except getopt.GetoptError: + # FIXME: Settle on an error handling approach: come up + # with a consistent guideline as to when and whether + # a ValueError should be raised versus calling + # sys.exit when needing to interrupt execution. + self._exit_with_usage('Invalid arguments.') + + extra_flag_values = {} + git_commit = None + filter_rules = [] + + for (opt, val) in opts: + if opt == '--help': + self._exit_with_usage() + elif opt == '--output': + output_format = val + elif opt == '--verbose': + verbosity = val + elif opt == '--git-commit': + git_commit = val + elif opt == '--filter': + if not val: + self._exit_with_categories() + filter_rules = self._parse_filter_flag(val) + else: + extra_flag_values[opt] = val + + # Check validity of resulting values. + if filenames and (git_commit != None): + self._exit_with_usage('It is not possible to check files and a ' + 'specific commit at the same time.') + + if output_format not in ('emacs', 'vs7'): + raise ValueError('Invalid --output value "%s": The only ' + 'allowed output formats are emacs and vs7.' % + output_format) + + validate_filter_rules(filter_rules, self._all_categories) + + verbosity = int(verbosity) + if (verbosity < 1) or (verbosity > 5): + raise ValueError('Invalid --verbose value %s: value must ' + 'be between 1-5.' % verbosity) + + options = CommandOptionValues(extra_flag_values=extra_flag_values, + filter_rules=filter_rules, + git_commit=git_commit, + output_format=output_format, + verbosity=verbosity) + + return (filenames, options) + diff --git a/WebKitTools/Scripts/webkitpy/style/optparser_unittest.py b/WebKitTools/Scripts/webkitpy/style/optparser_unittest.py new file mode 100644 index 0000000..f23c5d1 --- /dev/null +++ b/WebKitTools/Scripts/webkitpy/style/optparser_unittest.py @@ -0,0 +1,258 @@ +# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Unit tests for parser.py.""" + +import unittest + +from optparser import _create_usage +from optparser import ArgumentParser +from optparser import ArgumentPrinter +from optparser import CommandOptionValues as ProcessorOptions +from optparser import DefaultCommandOptionValues + + +class CreateUsageTest(unittest.TestCase): + + """Tests the _create_usage() function.""" + + def test_create_usage(self): + default_options = DefaultCommandOptionValues(output_format="vs7", + verbosity=3) + # Exercise the code path to make sure the function does not error out. + _create_usage(default_options) + + +class ArgumentPrinterTest(unittest.TestCase): + + """Tests the ArgumentPrinter class.""" + + _printer = ArgumentPrinter() + + def _create_options(self, + output_format='emacs', + verbosity=3, + filter_rules=[], + git_commit=None, + extra_flag_values={}): + return ProcessorOptions(extra_flag_values=extra_flag_values, + filter_rules=filter_rules, + git_commit=git_commit, + output_format=output_format, + verbosity=verbosity) + + def test_to_flag_string(self): + options = self._create_options('vs7', 5, ['+foo', '-bar'], 'git', + {'a': 0, 'z': 1}) + self.assertEquals('--a=0 --filter=+foo,-bar --git-commit=git ' + '--output=vs7 --verbose=5 --z=1', + self._printer.to_flag_string(options)) + + # This is to check that --filter and --git-commit do not + # show up when not user-specified. + options = self._create_options() + self.assertEquals('--output=emacs --verbose=3', + self._printer.to_flag_string(options)) + + +class ArgumentParserTest(unittest.TestCase): + + """Test the ArgumentParser class.""" + + def _parse(self): + """Return a default parse() function for testing.""" + return self._create_parser().parse + + def _create_defaults(self): + """Return a DefaultCommandOptionValues instance for testing.""" + base_filter_rules = ["-", "+whitespace"] + return DefaultCommandOptionValues(output_format="vs7", + verbosity=3) + + def _create_parser(self): + """Return an ArgumentParser instance for testing.""" + def stderr_write(message): + # We do not want the usage string or style categories + # to print during unit tests, so print nothing. + return + + default_options = self._create_defaults() + + all_categories = ["build" ,"whitespace"] + return ArgumentParser(all_categories=all_categories, + base_filter_rules=[], + default_options=default_options, + stderr_write=stderr_write) + + def test_parse_documentation(self): + parse = self._parse() + + # FIXME: Test both the printing of the usage string and the + # filter categories help. + + # Request the usage string. + self.assertRaises(SystemExit, parse, ['--help']) + # Request default filter rules and available style categories. + self.assertRaises(SystemExit, parse, ['--filter=']) + + def test_parse_bad_values(self): + parse = self._parse() + + # Pass an unsupported argument. + self.assertRaises(SystemExit, parse, ['--bad']) + + self.assertRaises(ValueError, parse, ['--verbose=bad']) + self.assertRaises(ValueError, parse, ['--verbose=0']) + self.assertRaises(ValueError, parse, ['--verbose=6']) + parse(['--verbose=1']) # works + parse(['--verbose=5']) # works + + self.assertRaises(ValueError, parse, ['--output=bad']) + parse(['--output=vs7']) # works + + # Pass a filter rule not beginning with + or -. + self.assertRaises(ValueError, parse, ['--filter=build']) + parse(['--filter=+build']) # works + # Pass files and git-commit at the same time. + self.assertRaises(SystemExit, parse, ['--git-commit=', 'file.txt']) + # Pass an extra flag already supported. + self.assertRaises(ValueError, parse, [], ['filter=']) + parse([], ['extra=']) # works + # Pass an extra flag with typo. + self.assertRaises(SystemExit, parse, ['--extratypo='], ['extra=']) + parse(['--extra='], ['extra=']) # works + self.assertRaises(ValueError, parse, [], ['extra=', 'extra=']) + + + def test_parse_default_arguments(self): + parse = self._parse() + + (files, options) = parse([]) + + self.assertEquals(files, []) + + self.assertEquals(options.output_format, 'vs7') + self.assertEquals(options.verbosity, 3) + self.assertEquals(options.filter_rules, []) + self.assertEquals(options.git_commit, None) + + def test_parse_explicit_arguments(self): + parse = self._parse() + + # Pass non-default explicit values. + (files, options) = parse(['--output=emacs']) + self.assertEquals(options.output_format, 'emacs') + (files, options) = parse(['--verbose=4']) + self.assertEquals(options.verbosity, 4) + (files, options) = parse(['--git-commit=commit']) + self.assertEquals(options.git_commit, 'commit') + + # Pass user_rules. + (files, options) = parse(['--filter=+build,-whitespace']) + self.assertEquals(options.filter_rules, + ["+build", "-whitespace"]) + + # Pass spurious white space in user rules. + (files, options) = parse(['--filter=+build, -whitespace']) + self.assertEquals(options.filter_rules, + ["+build", "-whitespace"]) + + # Pass extra flag values. + (files, options) = parse(['--extra'], ['extra']) + self.assertEquals(options.extra_flag_values, {'--extra': ''}) + (files, options) = parse(['--extra='], ['extra=']) + self.assertEquals(options.extra_flag_values, {'--extra': ''}) + (files, options) = parse(['--extra=x'], ['extra=']) + self.assertEquals(options.extra_flag_values, {'--extra': 'x'}) + + def test_parse_files(self): + parse = self._parse() + + (files, options) = parse(['foo.cpp']) + self.assertEquals(files, ['foo.cpp']) + + # Pass multiple files. + (files, options) = parse(['--output=emacs', 'foo.cpp', 'bar.cpp']) + self.assertEquals(files, ['foo.cpp', 'bar.cpp']) + + +class CommandOptionValuesTest(unittest.TestCase): + + """Tests CommandOptionValues class.""" + + def test_init(self): + """Test __init__ constructor.""" + # Check default parameters. + options = ProcessorOptions() + self.assertEquals(options.extra_flag_values, {}) + self.assertEquals(options.filter_rules, []) + self.assertEquals(options.git_commit, None) + self.assertEquals(options.output_format, "emacs") + self.assertEquals(options.verbosity, 1) + + # Check argument validation. + self.assertRaises(ValueError, ProcessorOptions, output_format="bad") + ProcessorOptions(output_format="emacs") # No ValueError: works + ProcessorOptions(output_format="vs7") # works + self.assertRaises(ValueError, ProcessorOptions, verbosity=0) + self.assertRaises(ValueError, ProcessorOptions, verbosity=6) + ProcessorOptions(verbosity=1) # works + ProcessorOptions(verbosity=5) # works + + # Check attributes. + options = ProcessorOptions(extra_flag_values={"extra_value" : 2}, + filter_rules=["+"], + git_commit="commit", + output_format="vs7", + verbosity=3) + self.assertEquals(options.extra_flag_values, {"extra_value" : 2}) + self.assertEquals(options.filter_rules, ["+"]) + self.assertEquals(options.git_commit, "commit") + self.assertEquals(options.output_format, "vs7") + self.assertEquals(options.verbosity, 3) + + def test_eq(self): + """Test __eq__ equality function.""" + # == calls __eq__. + self.assertTrue(ProcessorOptions() == ProcessorOptions()) + + # Verify that a difference in any argument causes equality to fail. + options = ProcessorOptions(extra_flag_values={"extra_value" : 1}, + filter_rules=["+"], + git_commit="commit", + output_format="vs7", + verbosity=1) + self.assertFalse(options == ProcessorOptions(extra_flag_values= + {"extra_value" : 2})) + self.assertFalse(options == ProcessorOptions(filter_rules=["-"])) + self.assertFalse(options == ProcessorOptions(git_commit="commit2")) + self.assertFalse(options == ProcessorOptions(output_format="emacs")) + self.assertFalse(options == ProcessorOptions(verbosity=2)) + + def test_ne(self): + """Test __ne__ inequality function.""" + # != calls __ne__. + # By default, __ne__ always returns true on different objects. + # Thus, just check the distinguishing case to verify that the + # code defines __ne__. + self.assertFalse(ProcessorOptions() != ProcessorOptions()) + diff --git a/WebKitTools/Scripts/webkitpy/style/processors/cpp.py b/WebKitTools/Scripts/webkitpy/style/processors/cpp.py index 182c967..f83ae6a 100644 --- a/WebKitTools/Scripts/webkitpy/style/processors/cpp.py +++ b/WebKitTools/Scripts/webkitpy/style/processors/cpp.py @@ -1868,6 +1868,10 @@ def check_for_null(file_extension, clean_lines, line_number, error): if search(r'\bg_object_[sg]et\b', line): return + # Don't warn about NULL usage in g_str{join,concat}(). See Bug 34834 + if search(r'\bg_str(join|concat)\b', line): + return + if search(r'\bNULL\b', line): error(line_number, 'readability/null', 5, 'Use 0 instead of NULL.') return @@ -2421,7 +2425,9 @@ def check_identifier_name_in_declaration(filename, line_number, line, error): # Convert "long long", "long double", and "long long int" to # simple types, but don't remove simple "long". line = sub(r'long (long )?(?=long|double|int)', '', line) - line = sub(r'\b(unsigned|signed|inline|using|static|const|volatile|auto|register|extern|typedef|restrict|struct|class|virtual)(?=\W)', '', line) + # Convert unsigned/signed types to simple types, too. + line = sub(r'(unsigned|signed) (?=char|short|int|long)', '', line) + line = sub(r'\b(inline|using|static|const|volatile|auto|register|extern|typedef|restrict|struct|class|virtual)(?=\W)', '', line) # Remove all template parameters by removing matching < and >. # Loop until no templates are removed to remove nested templates. @@ -2449,8 +2455,9 @@ def check_identifier_name_in_declaration(filename, line_number, line, error): # Detect variable and functions. type_regexp = r'\w([\w]|\s*[*&]\s*|::)+' identifier_regexp = r'(?P<identifier>[\w:]+)' + maybe_bitfield_regexp = r'(:\s*\d+\s*)?' character_after_identifier_regexp = r'(?P<character_after_identifier>[[;()=,])(?!=)' - declaration_without_type_regexp = r'\s*' + identifier_regexp + r'\s*' + character_after_identifier_regexp + declaration_without_type_regexp = r'\s*' + identifier_regexp + r'\s*' + maybe_bitfield_regexp + character_after_identifier_regexp declaration_with_type_regexp = r'\s*' + type_regexp + r'\s' + declaration_without_type_regexp is_function_arguments = False number_of_identifiers = 0 @@ -2982,4 +2989,3 @@ class CppProcessor(object): def process_file_data(filename, file_extension, lines, error, verbosity): processor = CppProcessor(filename, file_extension, error, verbosity) processor.process(lines) - diff --git a/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py b/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py index fb5a487..c786b8e 100644 --- a/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py +++ b/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py @@ -3392,13 +3392,26 @@ class WebKitStyleTest(CppStyleTestBase): '', 'foo.m') - # Make sure that the NULL check does not apply to g_object_{set,get} + # Make sure that the NULL check does not apply to g_object_{set,get} and + # g_str{join,concat} self.assert_lint( 'g_object_get(foo, "prop", &bar, NULL);', '') self.assert_lint( 'g_object_set(foo, "prop", bar, NULL);', '') + self.assert_lint( + 'gchar* result = g_strconcat("part1", "part2", "part3", NULL);', + '') + self.assert_lint( + 'gchar* result = g_strconcat("part1", NULL);', + '') + self.assert_lint( + 'gchar* result = g_strjoin(",", "part1", "part2", "part3", NULL);', + '') + self.assert_lint( + 'gchar* result = g_strjoin(",", "part1", NULL);', + '') # 2. C++ and C bool values should be written as true and # false. Objective-C BOOL values should be written as YES and NO. @@ -3503,6 +3516,12 @@ class WebKitStyleTest(CppStyleTestBase): '_length' + name_error_message) self.assert_lint('short length_;', 'length_' + name_error_message) + self.assert_lint('unsigned _length;', + '_length' + name_error_message) + self.assert_lint('unsigned int _length;', + '_length' + name_error_message) + self.assert_lint('unsigned long long _length;', + '_length' + name_error_message) # Pointers, references, functions, templates, and adjectives. self.assert_lint('char* under_score;', @@ -3599,6 +3618,10 @@ class WebKitStyleTest(CppStyleTestBase): # const_iterator is allowed as well. self.assert_lint('typedef VectorType::const_iterator const_iterator;', '') + # Bitfields. + self.assert_lint('unsigned _fillRule : 1;', + '_fillRule' + name_error_message) + def test_comments(self): # A comment at the beginning of a line is ok. diff --git a/WebKitTools/Scripts/webkitpy/style/unittests.py b/WebKitTools/Scripts/webkitpy/style/unittests.py index f8e3f71..62615ab 100644 --- a/WebKitTools/Scripts/webkitpy/style/unittests.py +++ b/WebKitTools/Scripts/webkitpy/style/unittests.py @@ -38,6 +38,7 @@ import unittest from checker_unittest import * from error_handlers_unittest import * from filter_unittest import * +from optparser_unittest import * from processors.common_unittest import * from processors.cpp_unittest import * from processors.text_unittest import * |