master.cfg should handle special return codes of run-perf-tests
https://bugs.webkit.org/show_bug.cgi?id=135974

Patch by Renato Nagy <nagy.renato@stud.u-szeged.hu> on 2014-08-18
Reviewed by Ryosuke Niwa.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunAndUploadPerfTests.getText2):
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
(RunAndUploadPerfTestsTest):
(RunAndUploadPerfTestsTest.assertResults):
(RunAndUploadPerfTestsTest.test_tests_failed):
(RunAndUploadPerfTestsTest.test_build_bad_build):
(RunAndUploadPerfTestsTest.test_build_bad_source_json):
(RunAndUploadPerfTestsTest.test_build_bad_marge):
(RunAndUploadPerfTestsTest.test_build_bad_failed_uploading):
(RunAndUploadPerfTestsTest.test_build_bad_preparation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Adding a GTK-specific baseline
that's required after changes in r172620.

* platform/gtk/editing/pasteboard/onpaste-text-html-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Gesture scrolls don't work in the WebKit1 clients after scrolling a non-scrollable iFrame
https://bugs.webkit.org/show_bug.cgi?id=136029
<rdar://problem/17767169>

Reviewed by Maciej Stachowiak.

This is difficult to test in our layout tests, since it relies on specific host application
behavior.

If the platform widget is a frame view (IFrame), and we are in WebKit1, 'passWheelEventToWidget'
has already called 'scrollWheel' on the underlying platform widget. We need to return true in
this case to avoid getting multiple copies of the scrollWheel event sent to the platform widget.

* page/EventHandler.cpp:
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Revise default stub to
accept a Widget* argument.
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Check for WK1 case and
return 'true' when the underlying NSScrollView has been issues a scrollWheel event.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove people that have left Adobe from Security Contact list
https://bugs.webkit.org/show_bug.cgi?id=135256

Reviewed by Alexey Proskuryakov.

* security/security-group-members.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Follow-up to r136040 based on Darin Adler's comments.

Pass Widget* as a Widget&, since it can never be null.

* page/EventHandler.cpp:
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformCompleteWheelEvent):
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix keyTimes list length of from/to/by animations.
https://bugs.webkit.org/show_bug.cgi?id=136037

Patch by Renata Hodovan <rhodovan.u-szeged@partner.samsung.com> on 2014-08-18
Reviewed by Darin Adler.

Source/WebCore:

For from/to/by animations, the length of keyTimes and keyPoints
attribute if are specified must be equal and must have at least
2 values.

This is backport of my fix in Blink: https://codereview.chromium.org/453243003/

Test: svg/animations/invalid-keytime-number-crash.html

* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::startedActiveInterval):

LayoutTests:

* svg/animations/invalid-keytime-number-crash-expected.txt: Added.
* svg/animations/invalid-keytime-number-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Completed iterator can be revived by adding more than one new entry to the target object
https://bugs.webkit.org/show_bug.cgi?id=129993

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-08-18
Reviewed by Oliver Hunt.

Source/JavaScriptCore:

When iterator reaches end, finish iterator.

* runtime/JSMapIterator.h:
(JSC::JSMapIterator::finish):
* runtime/JSSetIterator.h:
(JSC::JSSetIterator::finish):
* runtime/MapData.h:
(JSC::MapData::const_iterator::finish): set index of iterator to max
Int32.
* runtime/MapIteratorPrototype.cpp:
(JSC::MapIteratorPrototypeFuncNext):
* runtime/SetIteratorPrototype.cpp:
(JSC::SetIteratorPrototypeFuncNext):

LayoutTests:

Test a Map or Set iterator should remain dead after using it.

* js/basic-map-expected.txt:
* js/basic-set-expected.txt:
* js/script-tests/basic-map.js:
(set var):
(set map):
* js/script-tests/basic-set.js:
(keys.set keys):
(set add.set add):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
https://bugs.webkit.org/show_bug.cgi?id=136010

Reviewed by Darin Adler.

Source/WebCore:

r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh,
and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to
an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the
navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer
scheduled, the policy delegate is never executed and the external app never launches.

Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed
and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load.
This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and
didCancelClientRedirectForFrame on the frame load delegate.

To constrain this check only to the navigation types covered by r167856, only two NavigationSchedulers
(ScheduledRedirect and ScheduledLocationChange) enable the invalid URL check.

Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after
check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this
patch reverts r170120 (but keeps some of its tests).

Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html
       fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
       fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html
       fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
       fast/loader/window-open-to-invalid-url-calls-policy-delegate.html
       fast/loader/window-open-to-invalid-url-disallowed.html

* WebCore.exp.in: Updated the symbol FrameLoader::loadFrameRequest.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::changeLocation): Added an AllowNavigationToInvalidURL argument; passed down to urlSelected.
(WebCore::FrameLoader::urlSelected): Added an AllowNavigationToInvalidURL argument; passed down to loadFrameRequest.
(WebCore::FrameLoader::loadURLIntoChildFrame): Passed AllowNavigationToInvalidURL::Yes to loadURL.
(WebCore::FrameLoader::loadFrameRequest): Added an AllowNavigationToInvalidURL argument; passed down to loadURL and loadPostRequest.
(WebCore::FrameLoader::loadURL): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNewWindowPolicy and loadWithNavigationAction.
(WebCore::FrameLoader::loadPostRequest): Ditto.
(WebCore::FrameLoader::load): Passed AllowNavigationToInvalidURL::Yes to continueLoadAfterNewWindowPolicy.
(WebCore::FrameLoader::loadWithNavigationAction): Added an AllowNavigationToInvalidURL argument; passed down to loadWithDocumentLoader.
(WebCore::FrameLoader::loadWithDocumentLoader): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNavigationPolicy.
(WebCore::FrameLoader::reloadWithOverrideEncoding): Passed AllowNavigationToInvalidURL::Yes to loadWithDocumentLoader.
(WebCore::FrameLoader::reload): Ditto.
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
    Added an AllowNavigationToInvalidURL argument; if its value is No and the request's URL is invalid, do not continue.
    Added a FIXME about calling clientRedirectCancelledOrFinished on non-quick redirect cancellations.
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Added an AllowNavigationToInvalidURL argument; passed down to loadWithNavigationAction.
(WebCore::FrameLoader::loadDifferentDocumentItem): Passed AllowNavigationToInvalidURL::Yes to either loadWithDocumentLoader or loadWithNavigationAction.
* loader/FrameLoader.h:
* loader/FrameLoaderTypes.h: Defined AllowNavigationToInvalidURL to have values of Yes and No.
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledRedirect::fire): Passed AllowNavigationToInvalidURL::No to FrameLoader::changeLocation.
(WebCore::ScheduledLocationChange::fire): Ditto.
(WebCore::NavigationScheduler::shouldScheduleNavigation): Removed the URL::isValid check.
(WebCore::NavigationScheduler::scheduleLocationChange): Passed AllowNavigationToInvalidURL::No to FrameLoder::changeLocation during fragment navigations.
* page/ContextMenuController.cpp:
(WebCore::openNewWindow): Passed AllowNavigationToInvalidURL::Yes to FrameLoader::loadFrameRequest.
(WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
* page/Settings.in: Removed allowNavigationToInvalidURL.

Source/WebKit/mac:

* Misc/WebKitVersionChecks.h: Removed WEBKIT_FIRST_VERSION_WITH_NAVIGATION_URL_VALIDATION.
* WebView/WebPDFView.mm:
(-[WebPDFView PDFViewWillClickOnLink:withURL:]): Passed AllowNavigationToInvalidURL::Yes to FrameLoader::loadFrameRequest.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Reverted the linked-on-or-after check added in r170120 since it's no longer necessary.

LayoutTests:

Removed tests that verified the behavior of setAllowNavigationToInvalidURL(true), which no longer exists:
* fast/loader/allow-redirect-to-invalid-url-using-javascript-expected.txt: Removed.
* fast/loader/allow-redirect-to-invalid-url-using-javascript.html: Removed.
* fast/loader/allow-redirect-to-invalid-url-using-meta-refresh-expected.txt: Removed.
* fast/loader/allow-redirect-to-invalid-url-using-meta-refresh.html: Removed.

Added tests that verify the policy delegate is executed on some navigations to invalid URLs:
* fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate-expected.txt: Added.
* fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html: Added.
* fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate-expected.txt: Added.
* fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html: Added.
* fast/loader/window-open-to-invalid-url-calls-policy-delegate-expected.txt: Added.
* fast/loader/window-open-to-invalid-url-calls-policy-delegate.html: Added.

Renamed some existing tests added in r170120, modified them to log willPerformClientRedirectToURL and
didCancelClientRedirectForFrame, and added a test to verify navigations in existing frames via window.open:
* fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt: Renamed from fast/loader/disallow-redirect-to-invalid-url-using-javascript-expected.txt.
* fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html: Renamed from fast/loader/disallow-redirect-to-invalid-url-using-javascript.html.
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt: Renamed from fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh-expected.txt.
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html: Renamed from fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh.html.
* fast/loader/window-open-to-invalid-url-disallowed-expected.txt: Added.
* fast/loader/window-open-to-invalid-url-disallowed.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
calc() doesn't work for SVG CSS properties
https://bugs.webkit.org/show_bug.cgi?id=136026

Reviewed by Andreas Kling.

Source/WebCore:

Make calc() work on SVG CSS properties as well. stroke-width and
stroke-dashoffset used SVGLength. SVGLength doesn't work together with
cross units length arguments like % and px (just returns 0 in these
cases). I moved these properties over to Length. All modified files
beside to SVGCSSParser are related to this switch.

Test: svg/css/parse-calc-length.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::svgPropertyValue):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/style/RenderStyle.h:
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::setStrokeWidth):
(WebCore::SVGRenderStyle::setStrokeDashOffset):
(WebCore::SVGRenderStyle::strokeWidth):
(WebCore::SVGRenderStyle::strokeDashOffset):
(WebCore::SVGRenderStyle::initialStrokeDashOffset): Deleted.
(WebCore::SVGRenderStyle::initialStrokeWidth): Deleted.
* rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleStrokeData::StyleStrokeData):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeWidth):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::valueForLength):

LayoutTests:

Test calc() on length properties for SVG.

* svg/css/getComputedStyle-basic-expected.txt:
* svg/css/parse-calc-length-expected.txt: Added.
* svg/css/parse-calc-length.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable Web Inspector in MiniBrowser WK2 windows
https://bugs.webkit.org/show_bug.cgi?id=136045

Reviewed by Tim Horton.

Set the pref to enable developer extras for all WK2 windows.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Small cleanup for ShapeOutsideDeltas
https://bugs.webkit.org/show_bug.cgi?id=136043

Reviewed by Zoltan Horvath.

Remove explicit initializtion of LayoutUnit members and explicitly
size the boolean flags so they pack properly.

No new tests, no behavior change.

* rendering/shapes/ShapeOutsideInfo.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The parser should generate AST nodes the var declarations with no initializers
https://bugs.webkit.org/show_bug.cgi?id=135545

Patch by Saam Barati <sbarati@apple.com> on 2014-08-18
Reviewed by Geoffrey Garen.

Currently, JSC's parser ignores variable declarations
that have no assignment initializer value because all
variables are implicitly assigned to undefined. But,
type profiling needs an AST node to be generated for these
empty variable declarations because it needs to be able to
profile their text locations and to see that their type
is undefined.

* bytecompiler/NodesCodegen.cpp:
(JSC::EmptyVarExpression::emitBytecode):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createVarStatement):
(JSC::ASTBuilder::createEmptyVarExpression):
* parser/NodeConstructors.h:
(JSC::EmptyVarExpression::EmptyVarExpression):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVarDeclarationList):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createEmptyVarExpression):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove a test inadvertently landed in r172709.

* fast/loader/redirect-to-invalid-url-using-javascript-disallowed-after-load.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the iOS build after r172709.

* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Unreviewed merge correction.

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformCompleteWheelEvent): Revert an
unintended change from r172705.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element
https://bugs.webkit.org/show_bug.cgi?id=135999

Reviewed by Antti Koivisto.

Source/WebCore:

In Element's checkForEmptyStyleChange(), the style invalidation was only considering the invalidation of the element
for which the subtree has changed. When the pseudo class :empty is used with a sibling combinator (e.g. foo:empty+bar),
we were never invalidating the style of the element on which the selector applies.

This patch fixes the issue by invalidating the whole subtree rooted at the parent if the :empty rules applies
to siblings. A new flag "styleOfSiblingsAffectedByEmpty" is introduced to cover this case.

SelectorChecker just sets the flag all the time if any sibling rule exists.
This is overkill but that code is just there for non-jit cases.

SelectorCompiler does a better job and only sets the flag if matching anything else than the rightmost element.
There is a case not optimized, :empty with descendant (e.g. foo:empty>bar). Those cases are useless in practice,
it is not worth optimizing them.

Tests: fast/css/pseudo-element-updates-on-empty.html
       fast/selectors/not-empty-adjacent-style-update.html
       fast/selectors/not-empty-style-update.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::fragmentMatchesTheRightmostElement):
shouldUseRenderStyleFromCheckingContext() is renamed fragmentMatchesTheRightmostElement() because
it is now also used by generateElementIsEmpty() in a context where the Context's style is irrelevant.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
(WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
(WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext): Deleted.
(WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): Deleted.
* dom/Element.cpp:
(WebCore::checkForEmptyStyleChange):
(WebCore::Element::setStyleOfSiblingsAffectedByEmpty):
(WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty):
* dom/Element.h:
(WebCore::Element::styleOfSiblingsAffectedByEmpty):
* dom/ElementRareData.h:
(WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty):
(WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty):
(WebCore::ElementRareData::ElementRareData):

LayoutTests:

* fast/css/pseudo-element-updates-on-empty-expected.html: Added.
* fast/css/pseudo-element-updates-on-empty.html: Added.
* fast/selectors/empty-adjacent-style-update-expected.txt:
* fast/selectors/empty-adjacent-style-update.html:
* fast/selectors/empty-style-update-expected.txt:
* fast/selectors/empty-style-update.html:
* fast/selectors/not-empty-adjacent-style-update-expected.txt: Copied from LayoutTests/fast/selectors/empty-adjacent-style-update-expected.txt.
* fast/selectors/not-empty-adjacent-style-update.html: Copied from LayoutTests/fast/selectors/empty-adjacent-style-update.html.
* fast/selectors/not-empty-style-update-expected.txt: Copied from LayoutTests/fast/selectors/empty-style-update-expected.txt.
* fast/selectors/not-empty-style-update.html: Copied from LayoutTests/fast/selectors/empty-style-update.html.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Introduce an inspector Abstract Syntax Tree.
https://bugs.webkit.org/show_bug.cgi?id=135763

Patch by Saam Barati <sbarati@apple.com> on 2014-08-18
Reviewed by Joseph Pecoraro.

This patch adds an Abstract Syntax Tree to the Web inspector.
This syntax tree is modeled off the Esprima.js syntax tree
which complies with the Mozilla Parser API:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API
Script is the owner of the Web Inspector syntax tree, and has an API
for accessing its syntax tree property.

* UserInterface/External/Esprima/esprima.js:
* UserInterface/Main.html:
* UserInterface/Models/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.requestScriptSyntaxTree.makeSyntaxTreeAndCallCallback):
(WebInspector.Script.prototype._resolveResource):
(WebInspector.Script.prototype._makeSyntaxTree):
* UserInterface/Models/ScriptSyntaxTree.js: Added.
(WebInspector.ScriptSyntaxTree):
(WebInspector.ScriptSyntaxTree.prototype.get parsedSuccessfully):
(WebInspector.ScriptSyntaxTree.prototype.forEachNode):
(WebInspector.ScriptSyntaxTree.prototype.):
(WebInspector.ScriptSyntaxTree.prototype.filter):
(WebInspector.ScriptSyntaxTree.prototype.filterForNodesInRange):
(WebInspector.ScriptSyntaxTree.prototype.filterByRange):
(WebInspector.ScriptSyntaxTree.prototype.containsNonEmptyReturnStatement.removeFunctionsFilter):
(WebInspector.ScriptSyntaxTree.prototype.containsNonEmptyReturnStatement):
(WebInspector.ScriptSyntaxTree.prototype.updateTypes):
(WebInspector.ScriptSyntaxTree.prototype._defaultParserState):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._recurseArray):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement CanvasRenderingContext2D direction attribute
https://bugs.webkit.org/show_bug.cgi?id=135878

Reviewed by Darin Adler.

Source/WebCore:

The attribute, 'direction', represents the text directionality.
This is an important attribute for the bi-directional text within the CanvasRenderingContext2D.
The allowed set of values are 'rtl', 'ltr' and 'inherit'.

Specification URL: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#dom-context-2d-direction

Test: fast/canvas/canvas-direction.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::inheritedDirection):
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::reset):
(WebCore::CanvasRenderingContext2D::State::State):
(WebCore::CanvasRenderingContext2D::State::operator=):
(WebCore::CanvasRenderingContext2D::direction):
(WebCore::CanvasRenderingContext2D::setDirection):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:

LayoutTests:

* fast/canvas/canvas-direction-expected.txt: Added.
* fast/canvas/canvas-direction.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix resource leak in unclosed file descriptor handles
https://bugs.webkit.org/show_bug.cgi?id=135458

Patch by Przemyslaw Kuczynski <p.kuczynski@samsung.com> on 2014-08-18
Reviewed by Oliver Hunt.

Leaving descriptor unclosed will cause the resources associated with the open
file description never be freed (they are freed on closing the last descriptor
refering to the underlying file).

* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): Closed newStdout descriptor.
(WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): Closed m_savedStdout descriptor.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix unintentional integer overflow before widen
https://bugs.webkit.org/show_bug.cgi?id=135463

Patch by Przemyslaw Kuczynski <p.kuczynski@samsung.com> on 2014-08-18
Reviewed by Oliver Hunt.

Overflowing expression is evaluated using operands arithmetic but then is used in
context which expects an wider integer type. To avoid overflow at least one operand
has to be representative of the wider type.

Source/WebCore:

* loader/FTPDirectoryParser.cpp:
(WebCore::parseOneFTPLine): Changed strtoul to strtoull.
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::incrementProgress): Added static_cast to long long.
* platform/efl/FileSystemEfl.cpp:
(WebCore::getVolumeFreeSizeForPath): Added static_cast to uint64_t.

Source/WebKit2:

* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::getMemorySize): Added long long literal.

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