[chromium] Test expectations update

Unreviewed build fix. Update test expectations to reflect crashing tests:
http/tests/appcache/fail-on-update.html
http/tests/appcache/fail-on-update-2.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow PaintInfo to carry all PaintBehavior flags
https://bugs.webkit.org/show_bug.cgi?id=106980

Reviewed by Beth Dakin.

In r139908 I missed one instance of the PaintInfo constructor that should take PaintBehaviorNormal
instead of "false".

* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::paintIntoRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ref test images are upside-down in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=105457

Reviewed by Sam "Speedy" Weinig.

The bitmap context created in TestInvocation::dumpPixelsAndCompareWithExpected()
from the window snapshot contained a flipped copy of the image, causing all ref
and pixel images to be upside-down.

* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make it possible for the root background to be painted into its own GraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=107177

Source/WebCore:

Reviewed by Dave Hyatt.

Make it possible to paint the root background into its own GraphicsLayer, and enable
this when the root background has background-images that are all background-attachment: fixed.

This is a step towards optimizing scrolling on pages with fixed root backgrounds.

Tests: platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer.html
       platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html.html
       platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html.html
       platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed.html
       platform/mac/tiled-drawing/fixed-background/fixed-body-background.html
       platform/mac/tiled-drawing/fixed-background/fixed-html-background.html
       platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background.html

* rendering/PaintInfo.h:
(WebCore::PaintInfo::skipRootBackground): Utility function to check the paintBehavior flag.
(WebCore::PaintInfo::paintRootBackgroundOnly): Ditto.
* rendering/PaintPhase.h: New paint behavior flags to indicate that we should skip painting
the root background, and only paint the root background.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint): When we're only painting the root background, avoid painting column
rules, and bail early.
(WebCore::RenderBlock::paintObject): Don't paint children if we're just painting the root background.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange): If this box can paint the root background, tell the compositor
when the fixedness of those backgrounds changes.
(WebCore::RenderBox::paintRootBoxFillLayers): If the paintBehavior flag is set to skip painting the root
background, bail. This will be true for the non-background GraphicsLayers which are painting the root.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents): We can bail early if we're not a root-like renderer and the
flag is set to paint the root background only. This avoids walking the whole layer tree when just painting
into the root background GraphicsLayer.
Migrate layer paint flags into PaintBehavior flags, and use them.
* rendering/RenderLayer.h: Layer painting flags that replicate the paintBehavior flags.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking): Init the m_backgroundLayerPaintsFixedRootBackground bit.
(WebCore::RenderLayerBacking::~RenderLayerBacking): Clear the background layer.
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): No need to handle the transparent background
stuff here. We'll do it later in updateRootLayerConfiguration().
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Actually make a background layer now
if the compositor says we should.
Call updateRootLayerConfiguration() to adjust the background color and opaqueness of the background/primary layers.
(WebCore::RenderLayerBacking::updateInternalHierarchy): Parent the m_backgroundLayer in the containment layer,
not m_graphicsLayer (this is a bug fix).
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::setBackgroundLayerPaintsFixedRootBackground):
(WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
(WebCore::RenderLayerBacking::updateBackgroundColor): This no longer needs to update the tile cache
background color; updateRootLayerConfiguration() does this now.
(WebCore::RenderLayerBacking::updateRootLayerConfiguration): Update the opaqueness and background color
of the background and/or main graphics layers.
(WebCore::RenderLayerBacking::setContentsNeedDisplay): Invalidate the background layer if we have one.
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Invalidate the background layer if we have one.
This will be optimized to only repaint the background if it was the background that changed.
(WebCore::RenderLayerBacking::paintIntoLayer): Take a GraphicsLayer, not a RenderLayer argument.
Adjust the paintFlags if we're being asked to paint the background layer, or if we have one, but are painting the foreground.
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
(WebCore::RenderLayerBacking::reportMemoryUsage):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::backgroundLayer):
(WebCore::RenderLayerBacking::backgroundLayerPaintsFixedRootBackground):
(RenderLayerBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): If we're told that the fixed-ness of
the root background changed and we're using a TileCache, we need to re-evaluate compositing (this could be
optimized to only update the root layer).
(WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer): For the root (RenderView's) layer,
check whether the renderer that will paint the root (taking background propagation into account) has
background images that are all fixed.
(WebCore::RenderLayerCompositor::fixedRootBackgroundLayer): Accessor for the GraphicsLayer that paints
the root background (will be used later).
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hasEntirelyFixedBackground): Returns true there are background images
and all are fixed.
* rendering/RenderObject.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations): This function paints a solid color if we know that the root
isn't going to fill the viewport; we want to avoid this painting if we're not painting the root background
in this pass.
* rendering/style/RenderStyle.cpp:
(WebCore::allLayersAreFixed):
(WebCore::RenderStyle::hasEntirelyFixedBackground): New helper function.
* rendering/style/RenderStyle.h:

LayoutTests:

Reviewed by Dave Hyatt.

New tests with results for a fixed root background layer when using tiled drawing.

* platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer.html: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-expected.txt: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html.html: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html.html: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed.html: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background.html: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-html-background-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-html-background-expected.txt: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-html-background.html: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Heap-use-after-free in WebCore::RenderBlock::checkFloatsInCleanLine
https://bugs.webkit.org/show_bug.cgi?id=90802

Reviewed by Julien Chaffraix.

Source/WebCore:

Test: fast/multicol/float-not-removed-crash.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildrenTo):
1. When fullRemoveInsert is True, make sure to clear the
floating objects from our list (similar to positioned objects).
Our children are getting moved to another block and we won't
get notified when they are going away.
2. Remove the redundant hasPositionedObjects check since it
is already done inside removePositionedObjects.

LayoutTests:

* fast/multicol/float-not-removed-crash-expected.txt: Added.
* fast/multicol/float-not-removed-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove NodeListsNodeData when it's no longer needed
https://bugs.webkit.org/show_bug.cgi?id=107074

Reviewed by Darin Adler.

PerformanceTests: 

Added a micro benchmark to see the benefit of removing NodeListsNodeData.
The test traverses all elements in the html5 specification page and accesses childNodes.

Don't enable this test for now since it's really a micro benchmark specifically
designed to test this patch.

* DOM/TraverseChildNodes.html: Added.
* Skipped: Don't enable newly added test by default.
* resources/results-template.html: Compare against the unscaled unit (e.g. "bytes") as
opposed to scaled units such as "K bytes".
* resources/runner.js:
(.start): Moved the code to call currentTest.setup from measureRunsPerSecondOnce so that
it'll be ran for all test types, namely of PerfTestRunner.measureTime.
(.measureRunsPerSecondOnce):

Source/WebCore: 

Remove NodeListsNodeData when the last node list is removed from it.

If we detect that we have only one node list left in the data structure,
we'll simply destroy the entire "this" object to free up the memory space.

This reduced the memory usage of the micro benchmark by roughly 3%.

Performance Tests: DOM/TraverseChildNodes.html

* dom/Node.cpp:
(WebCore::Node::clearNodeLists): Added.
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::removeChildNodeList):
(WebCore::NodeListsNodeData::removeCacheWithAtomicName):
(WebCore::NodeListsNodeData::removeCacheWithName):
(WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
(WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList): Added.
Removes "this" NodeListsNodeData if there is only one node list left.

Tools: 

Generalize the warning a little so that it's also ignored on PerformanceTests/DOM/TraverseChildNodes.html

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crash accessing RenderView's layer's backing when not composited
https://bugs.webkit.org/show_bug.cgi?id=107203

Reviewed by Benjamin Poulain.

The RenderView isn't always layer-backed in WebKit1, so null-check the backing.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Test expectations update
https://bugs.webkit.org/show_bug.cgi?id=107204

Mark this test as flaky:
fast/events/touch/multi-touch-inside-iframes.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Top layer fails for inline elements
https://bugs.webkit.org/show_bug.cgi?id=106538

Reviewed by Hajime Morita.

Source/WebCore:

This patch makes position 'static' and 'relative' compute to
'absolute' for elements in the top layer, as mandated by the
Fullscreen spec.[1] By doing so, we also fix a crash that occurred in
RenderLayer::rebuildZOrderLists when an inline element wrapped in an
anonymous block was added to the top layer.

[1]: http://fullscreen.spec.whatwg.org/#new-stacking-layer

Tests: fast/dom/HTMLDialogElement/element-removed-from-top-layer-has-original-position.html
       fast/dom/HTMLDialogElement/top-layer-position-relative.html
       fast/dom/HTMLDialogElement/top-layer-position-static.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Set position 'absolute'
for an element in the top layer. Typically, absolutely positioned
elements also automatically get display 'block', but it seems we must do
that manually here. We require display 'block' to ensure the renderer is not
considered inline and consequently wrapped in an anonymous block.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::rebuildZOrderLists): Check node() so we don't
crash on, e.g., an anonymous block. We don't expect top layer
renderers to have anonymous blocks anymore, but we nevertheless
shouldn't crash if some other renderer is parented by RenderView.

LayoutTests:

* fast/dom/HTMLDialogElement/element-removed-from-top-layer-has-original-position-expected.html: Added.
* fast/dom/HTMLDialogElement/element-removed-from-top-layer-has-original-position.html: Added.
* fast/dom/HTMLDialogElement/top-layer-position-relative-expected.html: Added.
* fast/dom/HTMLDialogElement/top-layer-position-relative.html: Added.
* fast/dom/HTMLDialogElement/top-layer-position-static-expected.html: Added.
* fast/dom/HTMLDialogElement/top-layer-position-static.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Disable a unit test
https://bugs.webkit.org/show_bug.cgi?id=107206

Unreviewed. Disable a failing test due to 140025.

* tests/WebFrameTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Test expectations update
https://bugs.webkit.org/show_bug.cgi?id=107209

Mark this test as crash on debug builds:
fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html

This crash seems to be caused by r140024.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r140051.
http://trac.webkit.org/changeset/140051
https://bugs.webkit.org/show_bug.cgi?id=107210

html-parser-srcdoc.html failing on Chromium Linux Perf and
Chromium Mac Perf with a lot of error spew about blocked
script execution in 'about:srcdoc' (Requested by dominicc on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-17

* Parser/html-parser-srcdoc.html: Removed.
* Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BackgroundHTMLParser should go 18% faster on html-parser-srcdoc benchmark
https://bugs.webkit.org/show_bug.cgi?id=107201

Reviewed by Tony Gentilcore.

Prior to this patch, we would tokenize all the input before delivering
any tokens to the main thread. Effectively, that prevented the
background parser from running in parallel with the main thread.

This patch causes us to send tokens to the main thread periodically.
The constant in this patch is somewhat arbitrary. We'll need to tune it
later with more realistic workloads.

This patch improves the performance of the html-parser-srcdoc benchmark
by 18%. (This patch is based on Eric's work in
https://github.com/tonygentilcore/webkit/commit/072331194520c7770b5e34baefbbbba948834971.)

* html/parser/BackgroundHTMLParser.cpp:
(WebCore):
(WebCore::BackgroundHTMLParser::pumpTokenizer):
(WebCore::BackgroundHTMLParser::sendTokensToMainThread):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r139402.
http://trac.webkit.org/changeset/139402
https://bugs.webkit.org/show_bug.cgi?id=107212

Perf regression on DOMDivWalk (Requested by falken_ on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-17

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore::Element::setIsInTopLayer):

LayoutTests:

* fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer-expected.html: Removed.
* fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html: Removed.
* fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd-expected.html: Removed.
* fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not track user interaction for plugins that are not snapshotted
https://bugs.webkit.org/show_bug.cgi?id=107211
<rdar://problem/12967277>

Reviewed by Dean Jackson.

When the user interacts with a snapshotted plug-in, we extend that plug-in origin's
expiration date. However, plug-ins may not be snapshotted for other reasons than the
user's initial opt-in. In this case, that plug-in's origin might be not be in the cached
table. This is an edge case that was not initially considered.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::plugInDidReceiveUserInteraction): Convert the assertion to an if
check, and return early if the entry is not found in the cache table.

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

Broaden the failure expectations of these tests:

scrollingcoordinator/non-fast-scrollable-region-scaled-iframe.html
scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html

These fail pixel tests by painting the system theme scrollbar; see
<http://bugs.webkit.org/show_bug.cgi?id=106858>

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flakiness dashboard assumes there must be ToT tests
https://bugs.webkit.org/show_bug.cgi?id=107155

Remove group as a default parameter, since we can't actually know
the name of a group initially.  Instead, introduces
currentBuilderGroupName which returns the current builder group
if it has been explicitly set, or picks the first one available
as a default. Allows us to remove some extra code tracking this
stuff as well.

Reviewed by Ojan Vafai.

* TestResultServer/static-dashboards/dashboard_base.js:
(parseCrossDashboardParameters):
(currentBuilderGroupName):
(currentBuilderGroup):
* TestResultServer/static-dashboards/flakiness_dashboard.js:
(platformAndBuildType):
* TestResultServer/static-dashboards/loader.js:
(.):


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

Roll Chromium to 177561.

* DEPS:

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

This test times out on Win7 dbg half of the time:
fast/js/toString-and-valueOf-override.html

Mark it as Timeout.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Objective-C API: Clean up JSValue.mm
https://bugs.webkit.org/show_bug.cgi?id=107163

Reviewed by Darin Adler.

m_context is no longer weak, so there is now a lot of dead code in in JSValue.mm, and a wasted message send
on every API call.  In the head of just about every method in JSValue.mm we're doing:

JSContext *context = [self context];
if (!context)
    return nil;

This is getting a retained copy of the context, which is no longer necessary now m_context is no longer weak.
We can just delete all these lines from all functions doing this, and where they were referring to the local
variable 'context', instead we can just access m_context directly.

Since we're already going to be modifying most of JSValue.mm, we'll also do the following:

1) context @property is no longer weak – the context property is declared as:

    @property(readonly, weak) JSContext *context;

This is really only informative (since we're not presently synthesizing the ivar), but it is now misleading.
We should change it to:

    @property(readonly, retain) JSContext *context;

2) the JSContext ivar and accessor can be automatically generated.  Since we're no longer doing anything
special with m_context, we can just let the compiler handle the ivar for us.  We'll delete:

    JSContext *m_context;

and:

    - (JSContext *)context
    {
        return m_context;

    }

and find&replace "m_context" to "_context" in JSValue.mm.

* API/APIJSValue.h:
* API/JSValue.mm:
(-[JSValue toObject]):
(-[JSValue toBool]):
(-[JSValue toDouble]):
(-[JSValue toNumber]):
(-[JSValue toString]):
(-[JSValue toDate]):
(-[JSValue toArray]):
(-[JSValue toDictionary]):
(-[JSValue valueForProperty:]):
(-[JSValue setValue:forProperty:]):
(-[JSValue deleteProperty:]):
(-[JSValue hasProperty:]):
(-[JSValue defineProperty:descriptor:]):
(-[JSValue valueAtIndex:]):
(-[JSValue setValue:atIndex:]):
(-[JSValue isUndefined]):
(-[JSValue isNull]):
(-[JSValue isBoolean]):
(-[JSValue isNumber]):
(-[JSValue isString]):
(-[JSValue isObject]):
(-[JSValue isEqualToObject:]):
(-[JSValue isEqualWithTypeCoercionToObject:]):
(-[JSValue isInstanceOf:]):
(-[JSValue callWithArguments:]):
(-[JSValue constructWithArguments:]):
(-[JSValue invokeMethod:withArguments:]):
(-[JSValue objectForKeyedSubscript:]):
(-[JSValue setObject:forKeyedSubscript:]):
(-[JSValue initWithValue:inContext:]):
(-[JSValue dealloc]):
(-[JSValue description]):


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