Remove "Add to iPhoto" from the action menu's sharing menu
https://bugs.webkit.org/show_bug.cgi?id=138251
<rdar://problem/18837197>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
Retain/autorelease the new array.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rolled in r175389.

WebKit was failing to build 32bit on some Apple internal systems because
those systems were configured to build bmalloc 64-bit-only. Those systems
have been updated to build bmalloc as a universal binary, so everything
should work fine now.

The relevant setting is controlled by an environment variable on the
build system, and not by the project file in the source tree, so there's
no new code change here.

        Enable bmalloc in 32bit builds
        https://bugs.webkit.org/show_bug.cgi?id=138232

        Reviewed by Andreas Kling.

* wtf/FastMalloc.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build for pre-Yosemite systems after r175417

* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove webkit prefix from CSS columns.
https://bugs.webkit.org/show_bug.cgi?id=137132.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-10-31
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Import tests for basic multi-column properties settings. They are approved by W3C and
pass the WebKit testing. More tests need to be imported when they are approved.

* css: Added.
* css/multicol: Added.
* css/multicol/multicol-basic-001-expected.html: Added.
* css/multicol/multicol-basic-001.html: Added.
* css/multicol/multicol-basic-002-expected.html: Added.
* css/multicol/multicol-basic-002.html: Added.
* css/multicol/multicol-basic-003-expected.html: Added.
* css/multicol/multicol-basic-003.html: Added.
* css/multicol/multicol-basic-004-expected.html: Added.
* css/multicol/multicol-basic-004.html: Added.

Source/WebCore:

CSS columns properties are ready for un-prefixing. There are still a couple
that we haven't implemented, such as the ones starting with "break-", so we're
just going to do the ones starting with "column-".  The list of column un-
prefixed properties in this change set is:
    - column-count
    - column-fill
    - column-gap
    - column-progression
    - column-rule
    - column-rule-color
    - column-rule-style
    - column-rule-width
    - column-span
    - column-width
    - columns

Tests: fast/multicol/column-box-alignment-rtl.html
       fast/multicol/multicol-aliases.html
       imported/w3c/css/multicol/multicol-basic-001.html
       imported/w3c/css/multicol/multicol-basic-002.html
       imported/w3c/css/multicol/multicol-basic-003.html
       imported/w3c/css/multicol/multicol-basic-004.html

Add new un-prefixed column properties and make the -webkit* ones be aliases
to the new ones.
* css/CSSPropertyNames.in:

Use the new enums CSSPropertyColumn* instead of the prefixed ones.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isColorPropertyID):
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitColumnsShorthand):
(WebCore::webkitColumnRuleShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::paintColumnRules):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::colorIncludingFallback):

LayoutTests:

Ensure the CSS un-prefixed column properties are behaving the same way as the
prefixed ones. The CSS prefixed column properties are still supported by making
them aliases of the un-prefixed ones.  Also port some of the W3C and Mozilla
tests for css column properties tests.

Change to the un-prefixed column names to be compared with the return of CSSStyleDeclaration.item().
And change the expected names to be the un-prefixed ones also.
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:

Change to the un-prefixed column names and compare them with the return of object.style.cssText().
* fast/css/remove-shorthand-expected.txt:

Test for the effect of the rtl settings on column flow; it is ported from Mozilla.
* fast/multicol/column-box-alignment-rtl-expected.html: Added.
* fast/multicol/column-box-alignment-rtl.html: Added.

Ensure the prefixed and the un-prefixed column properties are behaving exactly the same.
* fast/multicol/multicol-aliases-expected.html: Added.
* fast/multicol/multicol-aliases.html: Added.

Change to the un-prefixed column names to be compared with the return of CSSStyleDeclaration.item().
* svg/css/getComputedStyle-basic-expected.txt:

Remove the use of the un-prefixed columns property since it seems unrelated to the test.
* svg/custom/svg-fonts-in-html.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build for Yosemite systems after r175417

* UIProcess/mac/WKActionMenuController.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix assertion in CachedResource::addDataBuffer

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::addDataBuffer):

    Don't call to base class if buffering mode changed (happens with some special top level document types).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fix ASan build after r175382

* wtf/SizeLimits.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use system art for action menus when possible
https://bugs.webkit.org/show_bug.cgi?id=138260

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):

Source/WebKit2:

* Resources/AddImageToPhotosTemplate.pdf: Removed.
* Resources/CopyImageTemplate.pdf: Removed.
* Resources/SaveImageToDownloadsTemplate.pdf: Removed.
* Resources/ShareImageTemplate.pdf: Removed.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
* WebKit2.xcodeproj/project.pbxproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope
https://bugs.webkit.org/show_bug.cgi?id=138252

Reviewed by Geoffrey Garen.

Added scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope.
Although the scope register is filled in with the ScopeChain register for all 
three bytecodes, this operand is not used in the processing of the bytecodes.
That will be addressed in a future patch.

* bytecode/BytecodeList.json: Lengthened the three bytecodes.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Added code to dump the scope operand.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPopScope):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::emitPopScopes):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::scopeRegister):
Added scope register to these emit functions and the bytecodes they emit.
New m_scopeRegister and accessor.

* bytecompiler/NodesCodegen.cpp:
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::TryNode::emitBytecode):
Created a RegisterID for the ScopeChain register and used it to emit the updated
bytecodes.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_push_name_scope):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_push_name_scope):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
Updated the operand indecies for the processing of the updated bytecodes.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
https://bugs.webkit.org/show_bug.cgi?id=138227

Reviewed by Benjamin Poulain.

Restructure CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement()
a bit to do less if checks. The previous implementation was doing 7 if
checks no matter the input value. The new implementation does less
if checks depending on the input type.

Also, the isImageControlsRootElement() was showing in the profiles so
I updated the condition to only do this virtual function call if the
input is an HTMLDivElement (which we can check more efficiently).

With the change, I see that we're spending about ~26% less time in
this method when running speedometer. However, the impact on the
overall score is within noise.

No new tests, no behavior change.

* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r175376): Occasional null deref when doing a dictionary lookup
https://bugs.webkit.org/show_bug.cgi?id=138261
<rdar://problem/18841709>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
rangeForDictionaryLookupAtHitTestResult can easily return null.


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