Remove some obsolete logic from WebKit.app.

Reviewed by Alexey Proskuryakov.

* WebKitLauncher/WebKitNightlyEnabler.m:
(poseAsWebKitApp): Remove a pre-10.6 codepath.
(enableWebKitNightlyBehaviour): Remove a 10.4-specific codepath.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ARMv7: Crash due to use after free of AssemblerBuffer
https://bugs.webkit.org/show_bug.cgi?id=124611

Reviewed by Geoffrey Garen.

Changed JITFinalizer constructor to take a MacroAssemblerCodePtr instead of a Label.
In finalizeFunction(), we use that value instead of calculating it from the label.

* assembler/MacroAssembler.cpp:
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::JITFinalizer):
(JSC::DFG::JITFinalizer::finalizeFunction):
* dfg/DFGJITFinalizer.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use std::function callbacks in CryptoAlgorithm instead of JS promises
https://bugs.webkit.org/show_bug.cgi?id=124673

Reviewed by Anders Carlsson.

To implement key wrapping/unwrapping, we'll need to chain existing operations.
It's much easier to do with C++ callbacks than with functions fulfilling JS
promises directly.

Also, this will decouple CryptoAlgorithm from JS, which is nice.

SubtleCrypto IDL says that all functions return Promise<any>, but in reality,
there is very little polymorphism, the only function whose return type depends
on algorithm is generateKey (it can create a Key or a KeyPair).

* bindings/js/JSDOMPromise.cpp:
(WebCore::PromiseWrapper::PromiseWrapper):
(WebCore::PromiseWrapper::operator=):
* bindings/js/JSDOMPromise.h:
Made it copyable, as each crypto function wraps the promise in success and failure
functional objects now.

* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt):
(WebCore::JSSubtleCrypto::decrypt):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::digest):
(WebCore::JSSubtleCrypto::generateKey):
(WebCore::JSSubtleCrypto::importKey):
(WebCore::JSSubtleCrypto::exportKey):
* crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::digest):
(WebCore::CryptoAlgorithm::generateKey):
(WebCore::CryptoAlgorithm::deriveKey):
(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::importKey):
* crypto/CryptoAlgorithm.h:
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::digest):
* crypto/algorithms/CryptoAlgorithmSHA1.h:
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::digest):
* crypto/algorithms/CryptoAlgorithmSHA224.h:
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::digest):
* crypto/algorithms/CryptoAlgorithmSHA256.h:
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::digest):
* crypto/algorithms/CryptoAlgorithmSHA384.h:
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::digest):
* crypto/algorithms/CryptoAlgorithmSHA512.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simple line layout should support floats
https://bugs.webkit.org/show_bug.cgi?id=124666

Reviewed by Dave Hyatt.

Source/WebCore: 

Tests: fast/text/simple-lines-float-compare.html
       fast/text/simple-lines-float.html

* rendering/line/LineWidth.h:
(WebCore::LineWidth::logicalLeftOffset):
        
    Expose the left offset so we don't need to recompute it.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::computeLineLeft):
        
    Include the left offset from floats.

(WebCore::SimpleLineLayout::createTextRuns):
        
    Keep the flow height updated during the loop as LineWidth reads the current position from there.

* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
        
    We now bake the border and the padding to the line left offset. No need to add it during resolve.

LayoutTests: 

* fast/text/simple-lines-float-compare-expected.html: Added.
* fast/text/simple-lines-float-compare.html: Added.
* fast/text/simple-lines-float-expected.html: Added.
* fast/text/simple-lines-float.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=124637

Unreviewed. Adding HTMLTemplateElement to global constructor
test, but this time for more platforms. I'm not sure if
GTK and EFL need this too.

* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
machMessageSize uses sizeof(mach_msg_ool_ports_descriptor_t) for out-of-line *memory*
https://bugs.webkit.org/show_bug.cgi?id=124644

Reviewed by Anders Carlsson.

* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::machMessageSize):
mach_msg_ool_descriptor_t is the correct type, given that
out-of-line memory descriptors use the mach_msg_ool_descriptor_t
member of the mach_msg_descriptor_t union.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remote Layer Tree: 100% repro crasher on the IPC thread when creating lots of layers
https://bugs.webkit.org/show_bug.cgi?id=124643

Reviewed by Anders Carlsson.

* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::sendOutgoingMessage):
Dynamically allocate storage for the message if needed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Add BoxShape and FloatRoundingRect classes
https://bugs.webkit.org/show_bug.cgi?id=124368

Reviewed by Dean Jackson.

Added the BoxShape class. It's now used to represent shape-outside box
values: [margin/border/padding/content]-box. BoxShape depends on a new
FloatRoundedRect class, which is a float analog of the existing (int)
RoundedRect class. The FloatRoundedRect class contains the same basic
methods and accessors as BorderRect and adds a set of four methods,
for example topLeftCorner(), that return a FloatRect that represents the
bounds of one elliptical corner. I also added a method, xInterceptsAtY()
that returns two X coordinates of the intersection between a horizontal
line and the rounded rectangle.

No new tests, this is just an internal refactoring.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FloatRoundedRect.cpp: Added.
(WebCore::FloatRoundedRect::FloatRoundedRect):
(WebCore::FloatRoundedRect::Radii::isZero):
(WebCore::FloatRoundedRect::Radii::scale):
(WebCore::FloatRoundedRect::Radii::expand):
(WebCore::cornerRectIntercept):
(WebCore::FloatRoundedRect::xInterceptsAtY):
* platform/graphics/FloatRoundedRect.h: Added.
(WebCore::FloatRoundedRect::Radii::Radii):
(WebCore::FloatRoundedRect::Radii::setTopLeft):
(WebCore::FloatRoundedRect::Radii::setTopRight):
(WebCore::FloatRoundedRect::Radii::setBottomLeft):
(WebCore::FloatRoundedRect::Radii::setBottomRight):
(WebCore::FloatRoundedRect::Radii::topLeft):
(WebCore::FloatRoundedRect::Radii::topRight):
(WebCore::FloatRoundedRect::Radii::bottomLeft):
(WebCore::FloatRoundedRect::Radii::bottomRight):
(WebCore::FloatRoundedRect::Radii::expand):
(WebCore::FloatRoundedRect::Radii::shrink):
(WebCore::FloatRoundedRect::rect):
(WebCore::FloatRoundedRect::radii):
(WebCore::FloatRoundedRect::isRounded):
(WebCore::FloatRoundedRect::isEmpty):
(WebCore::FloatRoundedRect::setRect):
(WebCore::FloatRoundedRect::setRadii):
(WebCore::FloatRoundedRect::move):
(WebCore::FloatRoundedRect::inflate):
(WebCore::FloatRoundedRect::expandRadii):
(WebCore::FloatRoundedRect::shrinkRadii):
(WebCore::FloatRoundedRect::topLeftCorner):
(WebCore::FloatRoundedRect::topRightCorner):
(WebCore::FloatRoundedRect::bottomLeftCorner):
(WebCore::FloatRoundedRect::bottomRightCorner):
(WebCore::operator==):
* rendering/shapes/BoxShape.cpp: Added.
(WebCore::BoxShape::BoxShape):
(WebCore::BoxShape::getExcludedIntervals):
(WebCore::BoxShape::getIncludedIntervals):
(WebCore::BoxShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/BoxShape.h: Added.
* rendering/shapes/Shape.cpp:
(WebCore::createBoxShape):
(WebCore::Shape::createShape):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PageLoadState should keep track of unreachable URLs
https://bugs.webkit.org/show_bug.cgi?id=124677

Reviewed by Dan Bernstein.

* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::reset):
(WebKit::PageLoadState::didStartProvisionalLoad):
(WebKit::PageLoadState::didFailProvisionalLoad):
(WebKit::PageLoadState::setUnreachableURL):
* UIProcess/PageLoadState.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadAlternateHTMLString):

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