CSS JIT: the adjacent position is never reset
https://bugs.webkit.org/show_bug.cgi?id=131145

Reviewed by Andreas Kling.

Source/WebCore: 

Corresponding radar: <rdar://problem/16440036>. The backtracking action would use a tail
when not needed.

Test: fast/selectors/multiple-adjacent-chain-without-adjacent-tail.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::updateChainStates):

LayoutTests: 

* fast/selectors/multiple-adjacent-chain-without-adjacent-tail-expected.txt: Added.
* fast/selectors/multiple-adjacent-chain-without-adjacent-tail.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Use RenderStyle::hasFlowInto when needed
https://bugs.webkit.org/show_bug.cgi?id=131092

Reviewed by Andrei Bucur.

Add hasFlowInto() helper method on RenderStyle to be used
instead of directly checking the presence or absence of flowThread value.
No new functionality, no new tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/Element.cpp:
(WebCore::Element::shouldMoveToFlowThread):
* rendering/style/RenderStyle.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::isRendererReparented):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sandbox violation in NetworkProcess when uploading a bundle
https://bugs.webkit.org/show_bug.cgi?id=131133

Reviewed by Brady Eidson.

Source/WebCore:

Track generated file ownership explicitly, so that each copy of FormData would know
whether to delete the file.

This part is needed to prevent asserting in FormData destructor in NetworkProcess,
because it doesn't delete the files. Also, some cleanup.

* WebCore.exp.in: Don't export FormData::removeGeneratedFilesIfNeeded(), WebKit2
doesn't need it any more.
* platform/network/FormData.cpp: Removed m_hasGeneratedFiles. There is no problem
iterating over FormDataElements to compute it, and that's more robust when FormDatas
are passed or stored on disk permanently.
Updated touched functions to use C++ iteration, and renamed "e" to "element".
(WebCore::FormData::encode): Keep encoding a boolean for hasGeneratedFiles, because
the encoded FormData can be stored persitently, and we can't change the format.

* platform/network/FormData.h: (WebCore::FormDataElement::FormDataElement):
Added m_ownsGeneratedFile. FormData will only delete files it owns. Since files
are generated immediately before form submission, it's always the FormData being
submitted that owns the generated files.

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Don't delete the files. It can't work.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
https://bugs.webkit.org/show_bug.cgi?id=131151

Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

Like ewebkit2, we'd beter to use EFL type instead of WebKit specific type
In addition, changed type of id as int to match with ewebkit2.

* ewk/ewk_frame.h: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
* ewk/ewk_touch_event.cpp:
(toPlatformTouchPointState):

Tools:

* DumpRenderTree/efl/EventSender.cpp: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
(TouchEventInfo::TouchEventInfo):
(sendTouchEvent):
(addTouchPointCallback):
(updateTouchPointCallback):
(cancelTouchPointCallback):
(releaseTouchPointCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r166144): fast/preloader/document-write.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=130942

* platform/mac/TestExpectations: Removing test expectation, because the offending
revision was rolled out.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitPerfMonitor: Y-axis adjustment is too aggressive
https://bugs.webkit.org/show_bug.cgi?id=130937

Reviewed by Andreas Kling.

Previously, adjusted min. and max. were defined as the two standards deviations away from EWMA of measured
results. This had two major problems:
1. Two standard deviations can be too small to show the confidence interval for results.
2. Sometimes baseline and target can be more than two standards deviations away.

Fixed the bug by completely rewriting the algorithm to compute the interval. Instead of blindly using two
standard deviations as margins, we keep adding quarter the standard deviation on each side until more than 90%
of points lie in the interval or we've expanded 4 standard deviations. Once this condition is met, we reduce
the margin on each side separately to reduce the empty space on either side.

A more rigorous approach would involve computing least squared value of results with respect to intervals
but that seems like an overkill for a simple UI problem; it's also computationally expensive.

* public/index.html:
(Chart..adjustedIntervalForRun): Extracted from computeYAxisBoundsToFitLines.
(Chart..computeYAxisBoundsToFitLines): Compute the min. and max. adjusted intervals out of adjusted intervals
for each runs (current, baseline, and target) so that at least one point from each set of results is shown.
We wouldn't see the difference between measured values versus baseline and target values otherwise.
* public/js/helper-classes.js:
(PerfTestResult.unscaledConfidenceIntervalDelta): Returns the default value if the confidence
interval delta cannot be computed.
(PerfTestResult.isInUnscaledInterval): Added. Returns true iff the confidence intervals lies
within the given interval.
(PerfTestRuns..filteredResults): Extracted from unscaledMeansForAllResults now that PerfTestRuns.min and
PerfTestRuns.max need to use both mean and confidence interval delta for each result.
(PerfTestRuns..unscaledMeansForAllResults):
(PerfTestRuns.min): Take the confidence interval delta into account.
(PerfTestRuns.max): Ditto.
(PerfTestRuns.countResults): Returns the number of results in the given time frame (> minTime).
(PerfTestRuns.countResultsInInterval): Returns the number of results whose confidence interval lie within the
given interval.
(PerfTestRuns.exponentialMovingArithmeticMean): Fixed the typo so that it actually computes the EWMA.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitPerfMonitor: Tooltips can be cut off at the top
https://bugs.webkit.org/show_bug.cgi?id=130960

Reviewed by Andreas Kling.

* public/common.css:
(#title): Removed the gradients, box shadows, and border from the header.
(#title h1): Reduce the font size.
(#title ul): Use line-height to vertically align the navigation bar instead of specifying a padding atop.
* public/index.html:
(.tooltop:before): Added. Identical to .tooltop:after except it's upside down (arrow facing up).
(.tooltip.inverted:before): Show the arrow facing up when .inverted is set.
(.tooltip.inverted:before): Hide the arrow facing down when .inverted is set.
* public/js/helper-classes.js:
(Tooltip.show): Show the tooltip below the point if placing it above the point results in the top of the
tooltip extending above y=0.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][CMake] Look for glx.h in OPENGL_INCLUDE_DIR.
https://bugs.webkit.org/show_bug.cgi?id=131095

Reviewed by Martin Robinson.

One needs to take into account OpenGL's include directory found via
find_package() when looking for glx.h, since if the former is a
non-standard location the latter will also be. If this is not it is
possible that OpenGL is found but GLX support is not properly detected.

* Source/cmake/OptionsGTK.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: AccessibilityObject::children() returns invalid results sometimes
https://bugs.webkit.org/show_bug.cgi?id=130563

Reviewed by Joseph Pecoraro.

Source/WebCore: 

Allow the DOM inspector to handle AX objects that do not have Node equivalents
(e.g. anonymous renderers).

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::processAccessibilityChildren):
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:

LayoutTests: 

* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash after mutating after pseudo style
https://bugs.webkit.org/show_bug.cgi?id=130881

Reviewed by Andreas Kling.

Source/WebCore: 

Test: fast/css/pseudo-after-crash.html

* style/StyleResolveTree.cpp:
(WebCore::Style::updateBeforeOrAfterPseudoElement):
        
    Invalidate the cached renderer for pseudo elements too.
    
(WebCore::Style::needsPseudeElement): Deleted.
        
    Fix spelling.

LayoutTests: 

* fast/css/pseudo-after-crash-expected.txt: Added.
* fast/css/pseudo-after-crash.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add EFL WK2 performance bot to build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=131034

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-03
Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/config.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][Cmake] Enable CSS JIT
https://bugs.webkit.org/show_bug.cgi?id=131022

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-04-03
Reviewed by Martin Robinson.

* wtf/Platform.h: Enable CSS JIT for GTK port.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add EFL WK2 performance bot to build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=131034

Fix after r166707, use "Perf" instead of "perf" for consistency.

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-03
Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/config.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[webkitpy] perf profiler does not understand --call-graph argument
https://bugs.webkit.org/show_bug.cgi?id=131132

Reviewed by Ryosuke Niwa.

New versions of perf profiler have changed the argument from --call-graph to -g.

* Scripts/webkitpy/common/system/profiler.py:
(Perf.wrapper_arguments): Use -g instead of --call-graph.
* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest.test_profiler_as_wrapper): Update test accordingly.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
https://bugs.webkit.org/show_bug.cgi?id=129713

Reviewed by Darin Adler.

Source/WebCore:

Grid positioning properties no longer accept <string> values for
named grid lines as they did in previous versions of the specs. They
were first replaced by <ident> and since the beginning of 2014 they
should only accept <custom-ident>.

Updated the parser and the style resolver to this new syntax. Also
updated the tests accordingly.

Test: fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html

* css/CSSParser.cpp:
(WebCore::isValidCustomIdent): New function that checks that the
<custom-ident> is valid.
(WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
(WebCore::CSSParser::parseGridPosition):
(WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
Replaced by WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition.
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::createGridPosition):

LayoutTests:

Replaced <string> by <custom-ident> in the tests. Also added a new
one to check that children are properly layed out after changes in
the grid line names.

* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child-expected.txt: Added.
* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html: Added.
* fast/css-grid-layout/grid-item-area-get-set.html:
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html:
* fast/css-grid-layout/grid-item-bad-resolution-double-span.html:
* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-named-grid-line-resolution-expected.txt:
* fast/css-grid-layout/grid-item-named-grid-line-resolution.html:
* fast/css-grid-layout/grid-item-negative-position-resolution.html:
* fast/css-grid-layout/grid-item-position-changed-dynamic.html:
* fast/css-grid-layout/grid-item-start-before-get-set-expected.txt:
* fast/css-grid-layout/grid-item-start-before-get-set.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Enable CSS JIT again, it works fine after r166666.

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-03
Reviewed by Csaba Osztrogonác.

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderSnapshottedPlugIn::paint should use iterator for traversal.
https://bugs.webkit.org/show_bug.cgi?id=131158

Reviewed by Dean Jackson.

* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paint):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Include region range information when printing the render tree
https://bugs.webkit.org/show_bug.cgi?id=131159

Reviewed by Mihnea Ovidenie.

With this change showRenderObject() will print the region range for objects inside
a flow thread. The format is:
Rs: <startRegion> Re: <endRegion>

Because this can be called anytime during debugging, it's necessary to disable the
current flow thread caching to prevent using the wrong flow thread for an object.

Tests: No new tests, no functional change.

* rendering/RenderFlowThread.cpp:
(WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler):
(WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler):
* rendering/RenderFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRegionsInformation): Added.
(WebCore::RenderObject::showRenderObject):
* rendering/RenderObject.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ARMv7 compare32() should not use TST to do CMP's job.
<https://webkit.org/b/131146>

Reviewed by Geoffrey Garen.

The ARMv7 implementation of "compare32(RegisterID left, TrustedImm32 right)"
was using "tst reg, reg" to implement "cmp reg, #0".  Unfortunately, the tst
instruction doesn't set the Overflow (V) flag and this results in random
results depending on whether there was a preceeding instruction that did set
the Overflow (V) flag.  This issue was causing emscripten-cube2hash to run
with a lot of OSR exits where not expected as well as producing wrong results.

The fix is to use "cmp reg, #0" to do the job properly.

* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::compare32):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Make sure grid element's shrink-to-fit behavior is correct
https://bugs.webkit.org/show_bug.cgi?id=103473

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-04-03
Reviewed by Sergio Villar Senin.

Added a new Layout Test to verify the shrink-to-fit behavior works as expected
for out-of-flow positioned grid elements.

* fast/css-grid-layout/grid-element-shrink-to-fit-expected.html: Added.
* fast/css-grid-layout/grid-element-shrink-to-fit.html: Added.

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