Delayed structure sweep can leak structures without bound
https://bugs.webkit.org/show_bug.cgi?id=96546

Reviewed by Geoffrey Garen.

This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
those objects with destructors and with immortal structures, and those objects with destructors that don't have 
immortal structures. All of the objects of the third type (destructors without immortal structures) now 
inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores 
the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.

Source/JavaScriptCore: 

* API/JSCallbackConstructor.cpp: Use JSDestructibleObject for JSCallbackConstructor.
(JSC):
(JSC::JSCallbackConstructor::JSCallbackConstructor):
* API/JSCallbackConstructor.h:
(JSCallbackConstructor):
* API/JSCallbackObject.cpp: Inherit from JSDestructibleObject for normal JSCallbackObjects and use a finalizer for 
JSCallbackObject<JSGlobalObject>, since JSGlobalObject also uses a finalizer.
(JSC):
(JSC::::create): We need to move the create function for JSCallbackObject<JSGlobalObject> out of line so we can add 
the finalizer for it. We don't want to add the finalizer is something like finishCreation in case somebody decides 
to subclass this. We use this same technique for many other subclasses of JSGlobalObject.
(JSC::::createStructure):
* API/JSCallbackObject.h:
(JSCallbackObject):
(JSC):
* API/JSClassRef.cpp: Change all the JSCallbackObject<JSNonFinalObject> to use JSDestructibleObject instead.
(OpaqueJSClass::prototype):
* API/JSObjectRef.cpp: Ditto.
(JSObjectMake):
(JSObjectGetPrivate):
(JSObjectSetPrivate):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):
* API/JSValueRef.cpp: Ditto.
(JSValueIsObjectOfClass):
* API/JSWeakObjectMapRefPrivate.cpp: Ditto.
* JSCTypedArrayStubs.h:
(JSC):
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGSpeculativeJIT.h: Use the proper allocator type when doing inline allocation in the DFG.
(JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject):
(JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
* heap/Heap.cpp:
(JSC):
* heap/Heap.h: Add accessors for the various types of allocators now. Also remove the isSafeToSweepStructures function 
since it's always safe to sweep Structures now.
(JSC::Heap::allocatorForObjectWithNormalDestructor): 
(JSC::Heap::allocatorForObjectWithImmortalStructureDestructor):
(Heap):
(JSC::Heap::allocateWithNormalDestructor):
(JSC):
(JSC::Heap::allocateWithImmortalStructureDestructor):
* heap/IncrementalSweeper.cpp: Remove all the logic to detect when it's safe to sweep Structures from the 
IncrementalSweeper since it's always safe to sweep Structures now.
(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::sweepNextBlock):
(JSC::IncrementalSweeper::startSweeping):
(JSC::IncrementalSweeper::willFinishSweeping):
(JSC):
* heap/IncrementalSweeper.h:
(IncrementalSweeper):
* heap/MarkedAllocator.cpp: Remove the logic that was preventing us from sweeping Structures if it wasn't safe. Add 
tracking of the specific destructor type of allocator. 
(JSC::MarkedAllocator::tryAllocateHelper):
(JSC::MarkedAllocator::allocateBlock):
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::destructorType):
(MarkedAllocator):
(JSC::MarkedAllocator::MarkedAllocator):
(JSC::MarkedAllocator::init):
* heap/MarkedBlock.cpp: Add all the destructor type stuff to MarkedBlocks so that we do the right thing when sweeping. 
We also use the stored destructor type to determine the right thing to do in all JSCell::classInfo() calls.
(JSC::MarkedBlock::create):
(JSC::MarkedBlock::MarkedBlock):
(JSC):
(JSC::MarkedBlock::specializedSweep):
(JSC::MarkedBlock::sweep):
(JSC::MarkedBlock::sweepHelper):
* heap/MarkedBlock.h:
(JSC):
(JSC::MarkedBlock::allocator):
(JSC::MarkedBlock::destructorType):
* heap/MarkedSpace.cpp: Add the new destructor allocators to MarkedSpace.
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::resetAllocators):
(JSC::MarkedSpace::canonicalizeCellLivenessData):
(JSC::MarkedSpace::isPagedOut):
(JSC::MarkedSpace::freeBlock):
* heap/MarkedSpace.h:
(MarkedSpace):
(JSC::MarkedSpace::immortalStructureDestructorAllocatorFor):
(JSC::MarkedSpace::normalDestructorAllocatorFor):
(JSC::MarkedSpace::allocateWithImmortalStructureDestructor):
(JSC::MarkedSpace::allocateWithNormalDestructor):
(JSC::MarkedSpace::forEachBlock):
* heap/SlotVisitor.cpp: Add include because the symbol was needed in an inlined function.
* jit/JIT.h: Make sure we use the correct allocator when doing inline allocations in the baseline JIT.
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateBasicJSObject):
(JSC::JIT::emitAllocateJSFinalObject):
(JSC::JIT::emitAllocateJSArray):
* jsc.cpp: 
(GlobalObject::create): Add finalizer here since JSGlobalObject needs to use a finalizer instead of inheriting from 
JSDestructibleObject.
* runtime/Arguments.cpp: Inherit from JSDestructibleObject.
(JSC):
* runtime/Arguments.h:
(Arguments):
(JSC::Arguments::Arguments):
* runtime/ErrorPrototype.cpp: Added an assert to make sure we have a trivial destructor.
(JSC):
* runtime/Executable.h: Indicate that all of the Executable* classes have immortal Structures.
(JSC):
* runtime/InternalFunction.cpp: Inherit from JSDestructibleObject.
(JSC):
(JSC::InternalFunction::InternalFunction):
* runtime/InternalFunction.h:
(InternalFunction):
* runtime/JSCell.h: Added two static bools, needsDestruction and hasImmortalStructure, that classes can override 
to indicate at compile time which part of the heap they should be allocated in.
(JSC::allocateCell): Use the appropriate allocator depending on the destructor type.
* runtime/JSDestructibleObject.h: Added. New class that stores the ClassInfo of any subclass so that it can be 
accessed safely when the object is being destroyed.
(JSC):
(JSDestructibleObject):
(JSC::JSDestructibleObject::classInfo):
(JSC::JSDestructibleObject::JSDestructibleObject):
(JSC::JSCell::classInfo): Checks the current MarkedBlock to see where it should get the ClassInfo from so that it's always safe.
* runtime/JSGlobalObject.cpp: JSGlobalObject now uses a finalizer instead of a destructor so that it can avoid forcing all 
of its relatives in the inheritance hierarchy (e.g. JSScope) to use destructors as well.
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObject.h:
(JSGlobalObject):
(JSC::JSGlobalObject::createRareDataIfNeeded): Since we always create a finalizer now, we don't have to worry about adding one 
for the m_rareData field when it's created.
(JSC::JSGlobalObject::create):
(JSC):
* runtime/JSGlobalThis.h: Inherit from JSDestructibleObject.
(JSGlobalThis):
(JSC::JSGlobalThis::JSGlobalThis):
* runtime/JSPropertyNameIterator.h: Has an immortal Structure.
(JSC):
* runtime/JSScope.cpp:
(JSC):
* runtime/JSString.h: Has an immortal Structure.
(JSC):
* runtime/JSWrapperObject.h: Inherit from JSDestructibleObject.
(JSWrapperObject):
(JSC::JSWrapperObject::JSWrapperObject):
* runtime/MathObject.cpp: Cleaning up some of the inheritance stuff.
(JSC):
* runtime/NameInstance.h: Inherit from JSDestructibleObject.
(NameInstance):
* runtime/RegExp.h: Has immortal Structure.
(JSC):
* runtime/RegExpObject.cpp: Inheritance cleanup.
(JSC):
* runtime/SparseArrayValueMap.h: Has immortal Structure.
(JSC):
* runtime/Structure.h: Has immortal Structure.
(JSC):
* runtime/StructureChain.h: Ditto.
(JSC):
* runtime/SymbolTable.h: Ditto.
(SharedSymbolTable):
(JSC):

Source/WebCore: 

No new tests.

* ForwardingHeaders/runtime/JSDestructableObject.h: Added.
* bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
(JSDOMWrapper):
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true.
(GenerateHeader):
* bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
(ObjcFallbackObjectImp):
* bridge/objc/objc_runtime.mm:
(Bindings):
(JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
* bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
(JSC):
(JSC::RuntimeArray::destroy):
* bridge/runtime_array.h:
(JSC::RuntimeArray::create):
(JSC):
* bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
(Bindings):
(JSC::Bindings::RuntimeObject::RuntimeObject):
* bridge/runtime_object.h:
(RuntimeObject):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening -- added expectations for 3 time-suggestion-picker-appearance tests.

* platform/chromium-linux/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-expected.png: Added.
* platform/chromium-linux/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl-expected.png: Added.
* platform/chromium-linux/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviwed gardening -- adjusted expectations for tiny-layer-rotated.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of warning about non-existant platform name when loading garden-o-matic
https://bugs.webkit.org/show_bug.cgi?id=98282

Reviewed by Adam Barth.

If you loaded without a platform query parameter we'd return "null" as the platform name
instead of null.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speech JavaScript API: Remove resultdeleted event
https://bugs.webkit.org/show_bug.cgi?id=98272

Reviewed by Adam Barth.

Source/WebCore:

Remove the resultdeleted event. This was never used, and was removed
from the spec draft in
http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449

The fast/speech/scripted/basics.html test is updated to reflect this.

* Modules/speech/SpeechRecognition.cpp:
* Modules/speech/SpeechRecognition.h:
(SpeechRecognition):
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionEvent.cpp:
* Modules/speech/SpeechRecognitionEvent.h:
(SpeechRecognitionEvent):
* dom/EventNames.h:
(WebCore):

Source/WebKit/chromium:

Remove didDeleteResult. This was never used, and has been removed from
the spec draft.

* public/WebSpeechRecognizerClient.h:
* src/SpeechRecognitionClientProxy.cpp:
* src/SpeechRecognitionClientProxy.h:
(SpeechRecognitionClientProxy):

LayoutTests:

Update layout test not to check for onresultdeleted event handler.

* fast/speech/scripted/basics-expected.txt:
* fast/speech/scripted/basics.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speech JavaScript API: Add SpeechRecognition.interimResults attribute
https://bugs.webkit.org/show_bug.cgi?id=98279

Reviewed by Adam Barth.

Source/WebCore:

Add the interimResults attribute and pass it to the embedder. It was
added to the spec draft in
http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c

Tested in fast/speech/scripted/basics.html

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::start):
(WebCore::SpeechRecognition::SpeechRecognition):
* Modules/speech/SpeechRecognition.h:
(WebCore::SpeechRecognition::interimResults):
(WebCore::SpeechRecognition::setInterimResults):
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionClient.h:
(SpeechRecognitionClient):
* Modules/speech/SpeechRecognitionController.h:
(WebCore::SpeechRecognitionController::start):

Source/WebKit/chromium:

Plumb interimResults through to Chromium.

* public/WebSpeechRecognitionParams.h:
(WebKit::WebSpeechRecognitionParams::WebSpeechRecognitionParams):
(WebKit::WebSpeechRecognitionParams::interimResults):
(WebSpeechRecognitionParams):
* src/SpeechRecognitionClientProxy.cpp:
(WebKit::SpeechRecognitionClientProxy::start):
* src/SpeechRecognitionClientProxy.h:
(SpeechRecognitionClientProxy):

LayoutTests:

Update test to check for the interimResults attribute.

* fast/speech/scripted/basics-expected.txt:
* fast/speech/scripted/basics.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Adding sys.platform check to skip a failing assert on the Apple Windows platform.
https://bugs.webkit.org/show_bug.cgi?id=98288

* Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
(ChromiumAndroidDriverTest.test_command_from_driver_input):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make partytime work when loading garden-o-matic from trac.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=98283

Reviewed by Adam Barth.

CSP was blocking the reqest for partytime.gif because 'self' wasn't on the img-src directive.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Element::computeInheritedLanguage: evaluate the while() condition after fetching the string
https://bugs.webkit.org/show_bug.cgi?id=98220

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-10-03
Reviewed by Andreas Kling.

* dom/Element.cpp:
(WebCore::Element::computeInheritedLanguage):
The condition is never false on the first execution. Move the condition to the
end of the loop for fun and profit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Exception thrown when running accessibility/container-node-delete-causes-crash.html test
https://bugs.webkit.org/show_bug.cgi?id=98291

Reviewed by Andreas Kling.

The accessibility/container-node-delete-causes-crash.html test will cause a full accessibility tree
to be created by trying to look up an element with a non-existent ID. This caused an exception to be thrown
when trying to access the children of an element that didn't have any children. Fix this by adding
BEGIN_AX_OBJC_EXCEPTIONS/END_AX_OBJC_EXCEPTIONS around the call to get the children.

* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(findAccessibleObjectById):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash when calling document.open during unload
https://bugs.webkit.org/show_bug.cgi?id=98287

Reviewed by Nate Chapin.

Source/WebCore:

Calling document.open results in us nulling out m_documentLoader. This
code doesn't properly handle that case and crashes.

Test: fast/parser/document-open-in-unload.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):

LayoutTests:

Test that we don't crash when calling document.open during the unload event.

* fast/parser/document-open-in-unload-expected.txt: Added.
* fast/parser/document-open-in-unload.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mark platform/chromium/virtual/gpu/fast/canvas/getPutImageDataPairTest.html as slow on Mac Lion Release
https://bugs.webkit.org/show_bug.cgi?id=79679

Unreviewed, expectations change.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Array.splice should be fast when it is used to remove elements other than the very first
https://bugs.webkit.org/show_bug.cgi?id=98236

Reviewed by Michael Saboff.

Applied the same technique that was used to optimize the unshift case of splice in
http://trac.webkit.org/changeset/129676.  This is a >20x speed-up on programs that
use splice for element removal.

* runtime/ArrayPrototype.cpp:
(JSC::shift):
* runtime/JSArray.cpp:
(JSC::JSArray::shiftCount):
* runtime/JSArray.h:
(JSArray):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebKit2] Add the ability to send messages to the WebPageGroupProxy
https://bugs.webkit.org/show_bug.cgi?id=98233

Reviewed by Anders Carlsson.

Add a WebPageGroupProxy.messages.in, implement a stub message receiver
in WebPageGroupProxy, and teach WebProcess how to route messages to the
appropriate WebPageGroupProxy.

* CMakeLists.txt: Tell a build system about added files.
* DerivedSources.make: Ditto.
* DerivedSources.pri: Ditto.
* GNUmakefile.list.am: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Ditto.
* win/WebKit2.vcproj: Ditto.
* Platform/CoreIPC/MessageID.h: Add MessageClassWebPageGroupProxy.
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::didReceiveMessage): Stub out the method
that will receive messages.
(WebKit::WebPageGroupProxy::didReceiveWebPageGroupProxyMessage): Stub
out a method that will exist in WebPageGroupProxyMessageReceiver.cpp
once WebPageGroupProxy.messages.in contains messages.
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in: Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage): Route messages to the
WebPageGroupProxy matching destinationID if the message is of class
MessageClassWebPageGroupProxy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix some style violations in perparation for changing this code.
* resources/magnitude-perf.js:
(Magnitude.run):
(Magnitude._logIterationInfo):
(Magnitude._runIteration):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use the XPC service by default on newer systems
https://bugs.webkit.org/show_bug.cgi?id=98297
<rdar://problem/12424641>

Reviewed by Sam Weinig.

* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::shouldUseXPC):
Return false for older systems.

(WebKit::WebProcessProxy::platformConnect):
Call shouldUseXPC().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Font data is purged while fonts are still using it
https://bugs.webkit.org/show_bug.cgi?id=93640

Reviewed by Eric Seidel.

Source/WebCore: 

Move the handling of custom font pruning from Document to FontFallbackList.
The previous inplementation allowed fonts to be removed before all their
clients were done. This change moves handling of custom font purging to the
FontFallbackList class, which is the shared object that is only removed
when all clients of a font are done with it. This fixes a crash in Angry
Birds due to a seamless iframe and some failing tests in fast/frames/seamless.

The specific element that causes problems is:
<iframe id="ingame_frame0" name="ingame_frame0" frameborder="0" seamless="true"
  src="http://chrome.angrybirds.com/ingame_graphic.html"
  onload="this.style.opacity = 1; parent.adLoaded();" scrolling="no"
  style="opacity: 1; -webkit-transition: opacity 1s ease-in-out 0s;
  position: absolute; border: 0px; width: 312px; height: 320px; z-index:
  300; overflow: hidden; visibility: visible;"></iframe>
The source document uses the same font as the embedding document.

Tests: fast/frames/seamless/seamless-custom-font-pruning-crash.html
       fast/frames/seamless/seamless-nested-crash.html

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): Remove code to register the font with the document.
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::getFontData): Remove code to register the font with the document.
* dom/Document.cpp:
(WebCore::Document::~Document): Remove code that records and purges custom fonts.
(WebCore):
(WebCore::Document::reportMemoryUsage): Remove reference to non-existent objects.
* dom/Document.h:
(WebCore):
(Document): Remove method declarations for custom font handling.
* platform/graphics/FontFallbackList.h:
(FontFallbackList): Moved some code around and made non-copyable.
(WebCore::FontFallbackList::setGlyphPageZero): Moved.
(WebCore::FontFallbackList::setGlyphPages): Moved.
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::pruneFontData): Removed unnecessary null check.
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::~SegmentedFontData): Added code to prune the Glyph pages when this is deleted.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::~SimpleFontData): Added code to prune the Glyph pages when this is deleted.

LayoutTests: 

Tests for font purging. The seamless-custom-font-pruning-crash test
was only failing in Chromium Asan, while the seamless-nested-crash
case was only failing in Asan DumpRenderTree.

* fast/frames/seamless/seamless-custom-font-pruning-crash-expected.txt: Added.
* fast/frames/seamless/seamless-custom-font-pruning-crash.html: Added.
* fast/frames/seamless/seamless-nested-crash-expected.txt: Added.
* fast/frames/seamless/seamless-nested-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Adding references to new classes added to support BlackBerry's
NetworkInfo implementation.

* Source/cmake/OptionsBlackBerry.cmake:

Source/WebKit: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Adding new classes to support NetworkInfo API in the
BlackBerry Port.

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Adding new class NetworkInfoClientBlackBerry to implement
NetworkInfoClient for the BlackBerry port.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
* WebCoreSupport/NetworkInfoClientBlackBerry.cpp: Added.
(WebCore):
(WebCore::NetworkInfoClientBlackBerry::NetworkInfoClientBlackBerry):
(WebCore::NetworkInfoClientBlackBerry::startUpdating):
(WebCore::NetworkInfoClientBlackBerry::stopUpdating):
(WebCore::NetworkInfoClientBlackBerry::bandwidth):
(WebCore::NetworkInfoClientBlackBerry::metered):
(WebCore::NetworkInfoClientBlackBerry::onCurrentNetworkChange):
(WebCore::NetworkInfoClientBlackBerry::onCurrentCellularTypeChange):
* WebCoreSupport/NetworkInfoClientBlackBerry.h: Added.
(WebKit):
(WebCore):
(NetworkInfoClientBlackBerry):
(WebCore::NetworkInfoClientBlackBerry::~NetworkInfoClientBlackBerry):

Tools: [BlackBerry] Implementing the NetworkInfo API for BB port
https://bugs.webkit.org/show_bug.cgi?id=98273

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-03
Reviewed by Rob Buis.

Enabling NetworkInfo API for the BlackBerry port.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Expose settings value to conditionally enable pinch-zoom scaling in the Chromium compositor.  The
flag defaults to disabled, so this change should be a no-op for scaling/scrolling behaviour.
https://bugs.webkit.org/show_bug.cgi?id=93292

Patch by Jeff Timanus <twiz@chromium.org> on 2012-10-03
Reviewed by James Robinson.

Source/Platform:

* chromium/public/WebCompositor.h:
(WebCompositor):
* chromium/public/WebCompositorSupport.h:
(WebKit::WebCompositorSupport::setPageScalePinchZoomEnabled):

Source/WebCore:

Tests:  Existing page-scale layout tests.

* page/Frame.cpp:
(WebCore::Frame::frameScaleFactor):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setApplyPageScaleFactorInCompositor):
(WebCore::Settings::applyPageScaleFactorInCompositor):
(Settings):

Source/WebKit/chromium:

* public/WebSettings.h:
* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::NonCompositedContentHost):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setApplyPageScaleFactorInCompositor):
(WebKit):
(WebKit::WebSettingsImpl::applyPageScaleFactorInCompositor):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setPageScaleFactor):
(WebKit::WebViewImpl::applyScrollAndScale):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Sub-pixel layout] incorrect rendering when painting sub-layers as their own root
https://bugs.webkit.org/show_bug.cgi?id=97484

Reviewed by Eric Seidel.

When in compositing mode, layer painting can be triggered through the backing store. When this
happens, a non-top-level RenderLayer is called to paint as its own root. Normally, we attempt to preserve
the proper sub-pixel accumulation through layers to their children, but since we're not
starting with the top-level layer, we haven't properly accumulated one, and convertToLayerCoords,
another source of correctly getting the sub-pixel offset for a layer, also avoids crawling
past the listed root layer.

When painting a root layer, we're aligned to the surface we're painting to, so we round our
offset to avoid moving objects around.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130322 268f45cc-cd09-0410-ab3c-d52691b4dbfc