[BlackBerry] Screenshot is clipped when content is smaller than the desintation size
https://bugs.webkit.org/show_bug.cgi?id=107735

Patch by Ed Baker <edbaker@rim.com> on 2013-01-30
Reviewed by Rob Buis.

Internal PR #284662
Don't scale the transformed content rect when the content is smaller than the destination
size. Scale the graphics context when it has a scale factor that isn't 1.0.

Internally reviewed by Andrew Lo

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::renderContents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Update WebKitSystemInterface for <rdar://problem/13111288>.

        * libWebKitSystemInterfaceLion.a:
        * libWebKitSystemInterfaceMountainLion.a:

        * WebKitSystemInterface.h: Removed WKEnterPluginSandbox, which has been unused now.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

inspector/editor/text-editor-ctrl-movements.html is timing out after r141245.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix Win build after r141177
https://bugs.webkit.org/show_bug.cgi?id=108325

Patch by Zoltan Arvai <zarvai@inf.u-szeged.hu> on 2013-01-30
Reviewed by Anders Carlsson.

* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::readEventHandler):
(CoreIPC::Connection::sendOutgoingMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsContext3DCG needs to copy image data in paintToCanvas
https://bugs.webkit.org/show_bug.cgi?id=108310

Reviewed by Simon Fraser.

Make the CG implementation of GraphicsContext3D::paintToCanvas copy image data
before drawing if we're drawing into an accelerated context, matching the fix made
in http://trac.webkit.org/changeset/106095 for 2D canvas.

No new tests, depends on acceleration and would be flaky at best.

* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D): Make CG's paintToCanvas take a GraphicsContext instead of a CGContextRef.
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::releaseImageData): Added.
(WebCore::GraphicsContext3D::paintToCanvas): Copy image data if the destination is
an accelerated context. Also, use GraphicsContext API instead of CGContext.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r136324): Flexbox should relayout flex children when width changes
https://bugs.webkit.org/show_bug.cgi?id=108231

Reviewed by Ojan Vafai.

Source/WebCore:

If the width of a block changes, we need to set relayoutChildren = true
to relayout the children. This broke when we optimized the layout calls
in layoutAndPlaceChildren.

Test: css3/flexbox/width-change-and-relayout-children.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): Also reorder the code to match RenderBlock.
The bug fix is to use updateLogicalWidthAndColumnWidth() and its return value to set
relayoutChildren = true.

LayoutTests:

* css3/flexbox/width-change-and-relayout-children-expected.txt: Added.
* css3/flexbox/width-change-and-relayout-children.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[HarfBuzz] Naming fixes after removing old HarfBuzz code
https://bugs.webkit.org/show_bug.cgi?id=108170

Reviewed by Tony Chang.

Since the old harfbuzz code is gone in r141241, it makes sense to get rid
of the now unnecessray NG suffix in a number of places. While at it,
I am also fixing some naming inconsistencies.

Renamed all occurences of HarfBuzzNG* to HarfBuzz*,
renamed lowercase variants of harfbuzz* in variable and function names to camel-case harfBuzz*,
moved files in platform/graphics/harfbuzz/ng/* one level up and removed ng folder.
Updated corresponding entries in Chromium, GTK and EFL build system files.

No new tests, no change in behavior.

* GNUmakefile.list.am:
* PlatformEfl.cmake:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/graphics/FontPlatformData.cpp:
* platform/graphics/FontPlatformData.h:
(WebCore):
(FontPlatformData):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::platformDataAssign):
(WebCore::FontPlatformData::harfBuzzFace):
* platform/graphics/freetype/FontPlatformData.h:
(FontPlatformData):
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::harfBuzzFace):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::harfBuzzFace):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
(WebCore):
(FontPlatformData):
* platform/graphics/harfbuzz/HarfBuzzFace.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp.
(WebCore):
(FaceCacheEntry):
(WebCore::FaceCacheEntry::create):
(WebCore::FaceCacheEntry::~FaceCacheEntry):
(WebCore::FaceCacheEntry::face):
(WebCore::FaceCacheEntry::glyphCache):
(WebCore::FaceCacheEntry::FaceCacheEntry):
(WebCore::harfBuzzFaceCache):
(WebCore::HarfBuzzFace::HarfBuzzFace):
(WebCore::HarfBuzzFace::~HarfBuzzFace):
(WebCore::findScriptForVerticalGlyphSubstitution):
(WebCore::HarfBuzzFace::setScriptForVerticalGlyphSubstitution):
* platform/graphics/harfbuzz/HarfBuzzFace.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h.
(WebCore):
(HarfBuzzFace):
(WebCore::HarfBuzzFace::create):
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp.
(WebCore):
(CairoFtFaceLocker):
(WebCore::CairoFtFaceLocker::CairoFtFaceLocker):
(WebCore::CairoFtFaceLocker::lock):
(WebCore::CairoFtFaceLocker::~CairoFtFaceLocker):
(WebCore::floatToHarfBuzzPosition):
(WebCore::doubleToHarfBuzzPosition):
(WebCore::CairoGetGlyphWidthAndExtents):
(WebCore::harfBuzzGetGlyph):
(WebCore::harfBuzzGetGlyphHorizontalAdvance):
(WebCore::harfBuzzGetGlyphHorizontalOrigin):
(WebCore::harfBuzzGetGlyphExtents):
(WebCore::harfBuzzCairoTextGetFontFuncs):
(WebCore::harfBuzzCairoGetTable):
(WebCore::HarfBuzzFace::createFace):
(WebCore::HarfBuzzFace::createFont):
(WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
* platform/graphics/harfbuzz/HarfBuzzFaceCoreText.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp.
(WebCore):
(WebCore::floatToHarfBuzzPosition):
(WebCore::getGlyph):
(WebCore::getGlyphHorizontalAdvance):
(WebCore::getGlyphHorizontalOrigin):
(WebCore::getGlyphExtents):
(WebCore::harfbuzzCoreTextGetFontFuncs):
(WebCore::releaseTableData):
(WebCore::harfBuzzCoreTextGetTable):
(WebCore::HarfBuzzFace::createFace):
(WebCore::HarfBuzzFace::createFont):
(WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
* platform/graphics/harfbuzz/HarfBuzzFaceSkia.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp.
(WebCore):
(WebCore::HarfBuzzFontData::HarfBuzzFontData):
(HarfBuzzFontData):
(WebCore::SkiaScalarToHarfBuzzPosition):
(WebCore::SkiaGetGlyphWidthAndExtents):
(WebCore::harfBuzzGetGlyph):
(WebCore::harfBuzzGetGlyphHorizontalAdvance):
(WebCore::harfBuzzGetGlyphHorizontalOrigin):
(WebCore::harfBuzzGetGlyphExtents):
(WebCore::harfBuzzSkiaGetFontFuncs):
(WebCore::harfBuzzSkiaGetTable): Also fixed style checker whitespace complaint / indentation.
(WebCore::destroyHarfBuzzFontData):
(WebCore::HarfBuzzFace::createFace):
(WebCore::HarfBuzzFace::createFont):
(WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp.
(WebCore):
(HarfBuzzScopedPtr):
(WebCore::HarfBuzzScopedPtr::HarfBuzzScopedPtr):
(WebCore::HarfBuzzScopedPtr::~HarfBuzzScopedPtr):
(WebCore::HarfBuzzScopedPtr::get):
(WebCore::harfBuzzPositionToFloat):
(WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
(WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult):
(WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions):
(WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
(WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
(WebCore::normalizeCharacters):
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
(WebCore::HarfBuzzShaper::~HarfBuzzShaper):
(WebCore::HarfBuzzShaper::setDrawRange):
(WebCore::HarfBuzzShaper::setFontFeatures):
(WebCore::HarfBuzzShaper::shape):
(WebCore::HarfBuzzShaper::adjustStartPoint):
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
(WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
(WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
(WebCore::HarfBuzzShaper::fillGlyphBuffer):
(WebCore::HarfBuzzShaper::offsetForPosition):
(WebCore::HarfBuzzShaper::selectionRect):
* platform/graphics/harfbuzz/HarfBuzzShaper.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzShaper.h.
(WebCore):
(HarfBuzzShaper):
(WebCore::HarfBuzzShaper::totalWidth):
(HarfBuzzRun):
(WebCore::HarfBuzzShaper::HarfBuzzRun::create):
(WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth):
(WebCore::HarfBuzzShaper::HarfBuzzRun::fontData):
(WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex):
(WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters):
(WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs):
(WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs):
(WebCore::HarfBuzzShaper::HarfBuzzRun::advances):
(WebCore::HarfBuzzShaper::HarfBuzzRun::offsets):
(WebCore::HarfBuzzShaper::HarfBuzzRun::glyphToCharacterIndexes):
(WebCore::HarfBuzzShaper::HarfBuzzRun::width):
(WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
(WebCore::HarfBuzzShaper::HarfBuzzRun::script):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove willAddAuthorShadowRoot and replace with alwaysCreateUserAgentShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=108248

Reviewed by Dimitri Glazkov.

The only reason willAddAuthorShadowRoot exists is so that a handful of
other elements can create the user agent shadow root right before the
author shadow root is created. Instead of providing this generic hook
just expose a virtual method on Element that requests this behavior.

No new tests, just refactoring.

* dom/Element.cpp:
(WebCore::Element::createShadowRoot):
* dom/Element.h:
(Element):
(WebCore::Element::alwaysCreateUserAgentShadowRoot): Added.
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::addShadowRoot): Remove willAddAuthorShadowRoot notification.
* html/HTMLButtonElement.cpp:
* html/HTMLButtonElement.h:
* html/HTMLFormControlElement.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Adding failure expectations for a couple of fullscreen tests, probably
regressed with r141265.
Adding a crash expectation for an HTTP test that regressed with r141136.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening: Add expectations for flaky crashers
https://bugs.webkit.org/show_bug.cgi?id=108359

Unreviewed gardening: add a bunch of flaky results.

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2013-01-30

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Structure::m_outOfLineCapacity is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=108206

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

We can calculate our out of line capacity by using the outOfLineSize and our knowledge about our resize policy.
According to GDB, this knocks Structures down from 136 bytes to 128 bytes (I'm guessing the extra bytes are from
better alignment of object fields), which puts Structures in a smaller size class. Woohoo! Looks neutral on our 
benchmarks.

* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC):
(JSC::Structure::suggestedNewOutOfLineStorageCapacity):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::addPropertyWithoutTransition):
* runtime/Structure.h:
(Structure):
(JSC::Structure::outOfLineCapacity):
(JSC::Structure::totalStorageCapacity):

Source/WTF: 

We're adding a new function that gives us the ability to round a value up to the next power of a certain base.

* wtf/MathExtras.h:
(WTF::roundUpToPowerOf):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[JSC] MutationObservers should not create circular, leaky references
https://bugs.webkit.org/show_bug.cgi?id=93661

Reviewed by Adam Barth.

This patch makes JSMutationCallback an entirely-custom class that
holds a weak reference to the function it wraps. To keep that function
alive, it also adds a PrivateName between the JSMutationObserver
wrapper and the function when the MutationObserver is constructed.

Unlike the generated JSC callbacks, JSMutationCallback doesn't hold a
reference to the JSDOMGlobalObject, instead holding the
DOMWrapperWorld it was created in. As an ActiveDOMCallback, it also
holds a weak pointer to ScriptExecutionContext (via ContextDestructionObserver).

It's not clear to me how to write a test for this. There's an existing
manual test in ManualTests/leak-cycle-observer-wrapper.html which may
be of use but which doesn't seem to currently give meaningful output.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSMutationCallback.cpp: Added.
(WebCore):
(WebCore::JSMutationCallback::JSMutationCallback):
(WebCore::JSMutationCallback::~JSMutationCallback):
(WebCore::JSMutationCallback::handleEvent):
* bindings/js/JSMutationCallback.h: Added.
(WebCore):
(JSMutationCallback): Instead of a JSCallbackData, hold a weak ref to the callback and a RefPtr to the DOMWrapperWorld.
(WebCore::JSMutationCallback::create):
* bindings/js/JSMutationCallbackCustom.cpp: Removed.
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
When constructing the JSMutationObserver, add a reference via PrivateName from the MutationObserver to the callback function.
* dom/MutationCallback.idl: Removed. Neither JSC nor V8 use an IDL file to generate this class any more.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix compile error in WebFrameTest
https://bugs.webkit.org/show_bug.cgi?id=108360

Unreviewed build fix.

Fixes compile error:
../../Source/WebKit/chromium/tests/WebFrameTest.cpp:330:5: error: converting false to pointer type for argument 1 of char testing::internal::IsNullLiteralHelper(testing::internal::Secret*) [-Werror=conversion-null]


* tests/WebFrameTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] move custom policy delegate to TestRunner library
https://bugs.webkit.org/show_bug.cgi?id=108328

Reviewed by Adam Barth.

* DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
* DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
(WebTestProxyBase):
(WebTestRunner::WebTestProxy::decidePolicyForNavigation):
* DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
(WebTestRunner::WebTestRunner::policyDelegateEnabled):
(WebTestRunner::WebTestRunner::policyDelegateIsPermissive):
(WebTestRunner::WebTestRunner::policyDelegateShouldNotifyDone):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
(WebTestRunner::TestRunner::reset):
(WebTestRunner::TestRunner::policyDelegateEnabled):
(WebTestRunner):
(WebTestRunner::TestRunner::policyDelegateIsPermissive):
(WebTestRunner::TestRunner::policyDelegateShouldNotifyDone):
(WebTestRunner::TestRunner::setCustomPolicyDelegate):
(WebTestRunner::TestRunner::waitForPolicyDelegate):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(TestRunner):
* DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
(WebTestRunner::WebTestProxyBase::decidePolicyForNavigation):
(WebTestRunner):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::decidePolicyForNavigation):
(WebViewHost::reset):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html is failing
https://bugs.webkit.org/show_bug.cgi?id=108100

Reviewed by Tony Gentilcore.

Source/WebCore: 

Similarly to the changes to V8 bindings in r140882, wrap the PerformanceEntry
as a PerformanceMark or PerformanceMeasure if possible.

No new tests - the relevant test now passes.

* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJS):

LayoutTests: 

* platform/gtk/TestExpectations: Remove the failure expectation.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not convert to String->AtomicString for NamedNodeMap
https://bugs.webkit.org/show_bug.cgi?id=108289

Reviewed by Kentaro Hara.

NamedNodeMap's API was taking a WTF::String. Internally, attribute
names are AtomicString.

The conversions String->AtomicString was causing an additional ref-deref
for the JS/V8 bindings. And could cause an additional memory allocation for the Objective-C
bindings.

This patch changes the API to use AtomicString, and update the custom bindings accordingly.

* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::canGetItemsForName):
(WebCore::JSNamedNodeMap::nameGetter):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::V8NamedNodeMap::namedPropertyGetter):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::getNamedItem):
(WebCore::NamedNodeMap::getNamedItemNS):
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
* dom/NamedNodeMap.h:
(NamedNodeMap):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(140504): pure CSE no longer matches things, 10% regression on Kraken
https://bugs.webkit.org/show_bug.cgi?id=108366

Reviewed by Geoffrey Garen and Mark Hahnenberg.
        
This was a longstanding bug that was revealed by http://trac.webkit.org/changeset/140504.
Pure CSE requires that the Node::flags() that may affect the behavior of a node match,
when comparing a possibly redundant node to its possible replacement. It was doing this
by comparing Node::arithNodeFlags(), which as the name might appear to suggest, returns
just those flag bits that correspond to actual node behavior and not auxiliary things.
Unfortunately, Node::arithNodeFlags() wasn't actually masking off the irrelevant bits.
This worked prior to r140504 because CSE itself didn't mutate the flags, so there was a
very high probability that matching nodes would also have completely identical flag bits
(even the ones that aren't relevant to arithmetic behavior, like NodeDoesNotExit). But
r140504 moved one of CSE's side-tables (m_relevantToOSR) into a flag bit for quicker
access. These bits would be mutated as the CSE ran over a basic block, in such a way that
there was a very high probability that the possible replacement would already have the
bit set, while the redundant node did not have the bit set. Since Node::arithNodeFlags()
returned all of the bits, this would cause CSEPhase::pureCSE() to reject the match
almost every time.
        
The solution is to make Node::arithNodeFlags() do as its name suggests: only return those
flags that are relevant to arithmetic behavior. This patch introduces a new mask that
represents those bits, and includes NodeBehaviorMask and NodeBackPropMask, which are both
used for queries on Node::arithNodeFlags(), and both affect arithmetic code gen. None of
the other flags are relevant to Node::arithNodeFlags() since they either correspond to
information already conveyed by the opcode (like NodeResultMask, NodeMustGenerate,
NodeHasVarArgs, NodeClobbersWorld, NodeMightClobber) or information that doesn't affect
the result that the node will produce or any of the queries performed on the result of
Node::arithNodeFlags (NodeDoesNotExit and of course NodeRelevantToOSR).
        
This is a 10% speed-up on Kraken, undoing the regression from r140504.

* dfg/DFGNode.h:
(JSC::DFG::Node::arithNodeFlags):
* dfg/DFGNodeFlags.h:
(DFG):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add recordRenderingStats to WebSettings
https://bugs.webkit.org/show_bug.cgi?id=108358

Reviewed by James Robinson.

Source/Platform:

* chromium/public/WebLayerTreeView.h:
(WebKit::WebLayerTreeView::Settings::Settings):
(Settings):

Source/WebKit/chromium:

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setRecordRenderingStats):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
(WebKit::WebSettingsImpl::recordRenderingStats):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Track scale and zoom together when drawing SVG images
https://bugs.webkit.org/show_bug.cgi?id=108108

Reviewed by Tim Horton.

Source/WebCore:

This patch refactors SVGImage::drawSVGToImageBuffer to take a single zoomAndScale parameter
and removes two messy calls to setPageZoomFactor. This patch makes progress towards an
SVG image cache keyed on just container size and scale.

This refactoring is covered by existing tests.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::setContainerSizeForRenderer):
(WebCore::CachedImage::imageSizeForRenderer):

    This complex logic has been refactored out of CachedImage and into SVGImageCache.
    In addition to the code move, we no longer divide by the zoom factor because the
    container size is stored without zoom.

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawSVGToImageBuffer):

    This method signature has changed to take a FloatSize for the container size and
    a combined zoom and scale parameter (zoomAndScale). A FloatSize is needed for the
    container size because we now store the container size unzoomed, and in this process
    we do not want to lose precision.

    The messy setPageZoomFactor calls have also been removed which cleans this function up.

* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::setContainerSizeForRenderer):

    This function now stores the container size unzoomed. The container size was changed
    to a FloatSize so that precision is not lost.

(WebCore::SVGImageCache::imageSizeForRenderer):

    Note that the ImageBuffer size will stay the same. We now store the size as:
        containerSize (without zoom) * zoom * scale
    Previously this was:
        containerSize (with zoom) * scale

(WebCore::SVGImageCache::redraw):
(WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
* svg/graphics/SVGImageCache.h:
(WebCore::SVGImageCache::SizeAndScales::SizeAndScales):
(SizeAndScales):
(SVGImageCache):

LayoutTests:

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

Attempted Mac build fix after http://trac.webkit.org/changeset/141291.

* platform/graphics/harfbuzz/HarfBuzzFaceCoreText.cpp:
(WebCore::harfBuzzCoreTextGetFontFuncs):

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