1. 31 Oct, 2013 10 commits
    • ap@apple.com's avatar
      Enable WebCrypto on Mac · 13a73330
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123587
      
      Reviewed by Anders Carlsson.
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig: Do it.
      
      Source/WebCore:
      
      * Configurations/FeatureDefines.xcconfig: Enable it.
      
      * bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.
      
      * crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
      Special case empty keys to avoid upsetting HashMap.
      
      * crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
      Build fix. Can't use make_unique, because constructor is private.
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig: Do it.
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig: Do it.
      
      LayoutTests:
      
      * TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
      Only skipping on specific platforms now.
      
      * crypto: Added.
      * crypto/crypto-gc-expected.txt: Copied from LayoutTests/security/crypto-gc-expected.txt.
      * crypto/crypto-gc.html: Copied from LayoutTests/security/crypto-gc.html.
      * crypto/crypto-random-values-expected.txt: Copied from LayoutTests/security/crypto-random-values-expected.txt.
      * crypto/crypto-random-values-limits-expected.txt: Copied from LayoutTests/security/crypto-random-values-limits-expected.txt.
      * crypto/crypto-random-values-limits.html: Copied from LayoutTests/security/crypto-random-values-limits.html.
      * crypto/crypto-random-values-types-expected.txt: Copied from LayoutTests/security/crypto-random-values-types-expected.txt.
      * crypto/crypto-random-values-types.html: Copied from LayoutTests/security/crypto-random-values-types.html.
      * crypto/crypto-random-values.html: Copied from LayoutTests/security/crypto-random-values.html.
      * crypto/subtle: Added.
      * crypto/subtle/argument-conversion-expected.txt: Copied from LayoutTests/security/crypto-subtle-arguments-expected.txt.
      * crypto/subtle/argument-conversion.html: Copied from LayoutTests/security/crypto-subtle-arguments.html.
      * crypto/subtle/gc-2-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-2-expected.txt.
      * crypto/subtle/gc-2.html: Copied from LayoutTests/security/crypto-subtle-gc-2.html.
      * crypto/subtle/gc-3-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-3-expected.txt.
      * crypto/subtle/gc-3.html: Copied from LayoutTests/security/crypto-subtle-gc-3.html.
      * crypto/subtle/gc-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-expected.txt.
      * crypto/subtle/gc.html: Copied from LayoutTests/security/crypto-subtle-gc.html.
      * crypto/subtle/resources: Added.
      * crypto/subtle/resources/common.js: Copied from LayoutTests/security/resources/common.js.
      * crypto/subtle/sha-1-expected.txt: Copied from LayoutTests/security/crypto-subtle-sha1-expected.txt.
      * crypto/subtle/sha-1.html: Copied from LayoutTests/security/crypto-subtle-sha1.html.
      * security/crypto-gc-expected.txt: Removed.
      * security/crypto-gc.html: Removed.
      * security/crypto-random-values-expected.txt: Removed.
      * security/crypto-random-values-limits-expected.txt: Removed.
      * security/crypto-random-values-limits.html: Removed.
      * security/crypto-random-values-types-expected.txt: Removed.
      * security/crypto-random-values-types.html: Removed.
      * security/crypto-random-values.html: Removed.
      * security/crypto-subtle-arguments-expected.txt: Removed.
      * security/crypto-subtle-arguments.html: Removed.
      * security/crypto-subtle-gc-2-expected.txt: Removed.
      * security/crypto-subtle-gc-2.html: Removed.
      * security/crypto-subtle-gc-3-expected.txt: Removed.
      * security/crypto-subtle-gc-3.html: Removed.
      * security/crypto-subtle-gc-expected.txt: Removed.
      * security/crypto-subtle-gc.html: Removed.
      * security/crypto-subtle-sha1-expected.txt: Removed.
      * security/crypto-subtle-sha1.html: Removed.
      * security/resources/common.js: Removed.
      Moved tests from security/ to crypto/.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13a73330
    • commit-queue@webkit.org's avatar
      Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION) · 897022bd
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123541
      
      Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-31
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      Enabled CSS3 text decoration tests
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::renderTextDecorationStyleFlagsToCSSValue): Mapping internal
      representation to a CSSValue
      (WebCore::ComputedStyleExtractor::propertyValue): Ditto
      * css/CSSParser.cpp: Moving parsing functions behind new flag
      (WebCore::isColorPropertyID):
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::addTextDecorationProperty):
      (WebCore::CSSParser::parseTextDecorationSkip):
      (WebCore::CSSParser::parseTextUnderlinePosition):
      * css/CSSParser.h:
      * css/CSSPrimitiveValueMappings.h:
      * css/CSSPropertyNames.in: Marking the new properties behind new flag
      * css/CSSValueKeywords.in: Marking new values behind new flag
      * css/DeprecatedStyleBuilder.cpp:
      (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
      * css/StylePropertyShorthand.cpp:
      (WebCore::shorthandForProperty): Move text decoration shorthand
      (WebCore::matchingShorthandsForLonghand):
      * css/StylePropertyShorthand.h:
      * css/StyleResolver.cpp:
      (WebCore::isValidVisitedLinkProperty):
      (WebCore::StyleResolver::applyProperty):
      * platform/graphics/GraphicsContext.h:
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::setPlatformStrokeStyle):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::drawLine):
      * platform/graphics/wince/GraphicsContextWinCE.cpp:
      (WebCore::createPen):
      * rendering/InlineFlowBox.cpp:
      * rendering/InlineFlowBox.h:
      * rendering/InlineTextBox.cpp:
      (WebCore::textDecorationStyleToStrokeStyle):
      (WebCore::computeUnderlineOffset):
      (WebCore::InlineTextBox::paintDecoration):
      * rendering/RenderObject.cpp:
      (WebCore::decorationColor):
      * rendering/RootInlineBox.cpp:
      * rendering/RootInlineBox.h:
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
      (WebCore::RenderStyle::colorIncludingFallback):
      (WebCore::RenderStyle::visitedDependentColor):
      * rendering/style/RenderStyle.h:
      * rendering/style/RenderStyleConstants.h:
      * rendering/style/StyleRareInheritedData.cpp:
      (WebCore::StyleRareInheritedData::StyleRareInheritedData):
      (WebCore::StyleRareInheritedData::operator==):
      * rendering/style/StyleRareInheritedData.h:
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
      (WebCore::StyleRareNonInheritedData::operator==):
      * rendering/style/StyleRareNonInheritedData.h:
      
      LayoutTests:
      
      * platform/mac/TestExpectations: Enable CSS3 text decoration tests
      (since CSS3_TEXT_DECORATION is enabled by default)
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      897022bd
    • ap@apple.com's avatar
      [WebCrypto] Add SHA-1 · d23ff7fa
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123582
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Tests: security/crypto-subtle-arguments.html
             security/crypto-subtle-sha1.html
      
      * WebCore.xcodeproj/project.pbxproj: Added new files.
      
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::createAlgorithmFromJSValue):
      (WebCore::sequenceOfCryptoOperationDataFromJSValue):
      (WebCore::JSSubtleCrypto::digest):
      * crypto/SubtleCrypto.idl:
      Added bindings for crypto.digest.
      
      * crypto/algorithms: Added.
      * crypto/algorithms/CryptoAlgorithmSHA1.cpp: Added.
      * crypto/algorithms/CryptoAlgorithmSHA1.h: Added.
      * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
      (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register SHA-1.
      
      * crypto/mac/CryptoAlgorithmSHA1Mac.cpp: Added.
      (WebCore::CryptoAlgorithmSHA1::digest): Performs the work synchronously, because
      otherwise we'd have to copy the data first, which is crazy for something as simple
      as hashing. We can change to a dispatch queue later if we find that it's actually
      better to copy and do the work asynchronously.
      
      LayoutTests: 
      
      * security/resources/common.js: Added from Blink.
      (importTestKeys):
      (asciiToArrayBuffer):
      (printRejectedResult):
      (printAcceptedResult):
      (failAndFinishJSTest):
      
      * security/crypto-subtle-arguments-expected.txt: Added.
      * security/crypto-subtle-arguments.html: Added.
      Added tests for how bindings treat crazy arguments. Heavily based on a test from Blink.
      
      * security/crypto-subtle-sha1-expected.txt: Added.
      * security/crypto-subtle-sha1.html: Added.
      Test that SHA-1 works.
      
      * TestExpectations: Skip these tests everywhere for now.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d23ff7fa
    • fpizlo@apple.com's avatar
      Remove CachedTranscendentalFunction because caching math functions is an ugly idea · b3336c7b
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123574
      
      Source/JavaScriptCore: 
      
      Reviewed by Mark Hahnenberg.
              
      This is performance-neutral because I also make Math.cos/sin intrinsic. This means that
      we gain the "overhead" of actually computing sin and cos but we lose the overhead of
      going through the native call thunks.
              
      Caching transcendental functions is a really ugly idea. It works for SunSpider because
      that benchmark makes very predictable calls into Math.sin. But I don't believe that this
      is representative of any kind of reality, and so for sensible uses of Math.sin/cos all
      that this was doing was adding more call overhead and some hashing overhead.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGBackwardsPropagationPhase.cpp:
      (JSC::DFG::BackwardsPropagationPhase::propagate):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::performNodeCSE):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGNodeType.h:
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      (JSC::DFG::PredictionPropagationPhase::doDoubleVoting):
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/JITOperations.h:
      * runtime/CachedTranscendentalFunction.h: Removed.
      * runtime/DateInstanceCache.h:
      * runtime/Intrinsic.h:
      * runtime/MathObject.cpp:
      (JSC::MathObject::finishCreation):
      (JSC::mathProtoFuncCos):
      (JSC::mathProtoFuncSin):
      * runtime/VM.h:
      
      Tools: 
      
      Reviewed by Mark Hahnenberg.
      
      Make it easier to see that a test doesn't have an -expected file.
      
      * Scripts/run-jsc-stress-tests:
      
      LayoutTests: 
      
      Reviewed by Mark Hahnenberg.
      
      * js/dfg-cos-constant-expected.txt: Added.
      * js/dfg-cos-constant.html: Added.
      * js/dfg-sin-constant-expected.txt: Added.
      * js/dfg-sin-constant.html: Added.
      * js/script-tests/dfg-cos-constant.js: Added.
      (foo):
      * js/script-tests/dfg-sin-constant.js: Added.
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b3336c7b
    • barraclough@apple.com's avatar
      WebPageCreationParameters should be consistent in Window.open · 9c620b2e
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123557
      
      Reviewed by Sam Weinig.
      
      When Window.open in called in WebKit2 the WebProcess sends a synchronous request to open
      a page (WebPageProxy::createNewPage). The UIProcess creates a WebpageProxy, and responds
      with instructions to the WebProcess to create the WebPage. The initial creation state of
      the WebPage is communicated to the WebProcess via two routes (firstly an asynchronous
      WebProcess::CreateWebPage message, and secondly in the synchronous response from
      WebPageProxy::createNewPage). Unfortunately these responses are inconsistent with each
      other. The creationParameters() for the page are calculated twice, and since the WKView
      will be added to a window between the async message being sent and the synchronous reply
      being returned the visibility state of the page can change.
      
      To fix the inconsistency we can set the creation parameters at the point that the
      WebPageProxy is instantiated. This will result in a functional change that is web
      visible, since the page will initially be opened in a hidden/blurred state, and may
      later become visible/focussed. This change is consistent with the direction we want to
      evolve in. Whilst we will still probably require a synchronous message from the
      WebProcess to the UIProcess on Window.open, we'll probably make this return much earlier
      – having just created the WebPageProxy, but avoiding blocking the WebProcess over the
      client delegate callback that opens the new window.
      
      This fix results in a layout test result change, due to the change in behavior (page is
      created blurred, and becomes focussed, resulting in a focus event being fired – rather
      than the window opening directly into a focussed state). This is reported as a
      progression (test is broken in WebKit1, fixed in WebKit2 after this change). In reality
      the test is actually slightly broken in DRT/test-runner – the test runs differently than
      in browser, since there is is no visible main window. In-browser this patch results in
      no change in behavior on dom/Window/mozilla-focus-blur.html (the affected test).
      
      Source/WebKit2: 
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::initializeWebPage):
          - call initializeCreationParameters
      (WebKit::WebPageProxy::initializeCreationParameters):
          - calculate m_creationParameters
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::creationParameters):
          - Added m_creationParameters, initializeCreationParameters,
            creationParameters returns m_creationParameters
      
      LayoutTests: 
      
      * platform/mac-wk2/fast/dom/Window: Added.
      * platform/mac-wk2/fast/dom/Window/mozilla-focus-blur-expected.txt: Added.
          - This test now reports a pass on WebKit2
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c620b2e
    • ap@apple.com's avatar
      REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and... · 2a262349
      ap@apple.com authored
      REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and xmlhttprequest-overridemimetype-content-type-header.html are failing
      https://bugs.webkit.org/show_bug.cgi?id=123548
      
      Reviewed by Brady Eidson.
      
      Source/WebCore:
      
      We had code that made sure that cached 200 responses weren't used for conditional
      requests. But it didn't work the other way - cached 304 responses got reused for
      subsequent unconditional requests!
      
      Adding the test uncovered this bug.
      
      * loader/cache/CachedRawResource.cpp: (WebCore::shouldIgnoreHeaderForCacheReuse):
      Should never ignore conditional headers. Code in determineRevalidationPolicy
      was already undoing this for conditional requests, but we also shouldn't use
      WebCore cache if it holds a 304 response to conditional request.
      
      * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy):
      Even though the changed code is only for raw resources, I think that we can never
      get a conditional request here any more.
      
      LayoutTests:
      
      * TestExpectations: Unskip tests that used to be affected by response-empty-arraybuffer.html
      
      * http/tests/xmlhttprequest/response-empty-arraybuffer-expected.txt:
      * http/tests/xmlhttprequest/response-empty-arraybuffer.html:
      Fix a stupid typo. This test actually fully passes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a262349
    • commit-queue@webkit.org's avatar
      [EFL] Rebaselining after r158186 · 6a4834eb
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123571
      
      Unreviewed gardening.
      
      Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2013-10-31
      
      * platform/efl/editing/deleting/smart-delete-003-expected.txt: Rebaselining after r158186.
      * platform/efl/editing/deleting/smart-delete-004-expected.txt: Rebaselining after r158186.
      * platform/efl/editing/selection/after-line-wrap-expected.txt: Rebaselining after r157851.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a4834eb
    • g.czajkowski@samsung.com's avatar
      [EFL] Add baselines for spelling tests added in r157900. · 233f6ed2
      g.czajkowski@samsung.com authored
      Unreviewed gardening.
      
      * platform/efl/editing/spelling/centering-misspelling-dots-expected.png: Added.
      * platform/efl/editing/spelling/centering-misspelling-dots-expected.txt: Added.
      * platform/efl/editing/spelling/misspelling-dots-dont-extend-beyond-words-expected.png: Added.
      * platform/efl/editing/spelling/misspelling-dots-dont-extend-beyond-words-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      233f6ed2
    • gyuyoung.kim@samsung.com's avatar
      Unreviewed EFL gardening. Add 5 printing tests to EFL TestExpectations. · 936a6347
      gyuyoung.kim@samsung.com authored
      EFL port doesn't fully support printing functionality yet.
      
      * platform/efl/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      936a6347
    • commit-queue@webkit.org's avatar
      [EFL] accessibility/textbox-role-reports-selection.html is failing · f19e9701
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112017
      
      Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-31
      Reviewed by Mario Sanchez Prada.
      
      Source/WebCore:
      
      getSelectionOffsetsForObject() now returns proper start/end offsets for
      selections "touching" the object's front border.
      
      No new tests, covered by existing ones.
      
      * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
      (getSelectionOffsetsForObject):
      
      LayoutTests:
      
      Removed failure expectations.
      
      * platform/efl-wk1/TestExpectations: The test is no longer failing.
      * platform/efl-wk2/TestExpectations: The test is no longer failing.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f19e9701
  2. 30 Oct, 2013 21 commits
  3. 29 Oct, 2013 9 commits
    • rniwa@webkit.org's avatar
      REGRESSION(r154614): Opening and closing a picture on Facebook resets scroll position · 16985db4
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122882
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      scrollLeft and scrollTop have to continue to function in the strict mode for the Web compatiblity.
      In particular, www.facebook.com and build.webkit.org depend on this behavior as of October 29th, 2013.
      
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::scrollLeft):
      (WebCore::HTMLBodyElement::setScrollLeft):
      (WebCore::HTMLBodyElement::scrollTop):
      (WebCore::HTMLBodyElement::setScrollTop):
      
      LayoutTests:
      
      * fast/dom/Element/body-scrollLeft-expected.txt:
      * fast/dom/Element/body-scrollLeft.html:
      * fast/dom/Element/body-scrollTop-expected.txt:
      * fast/dom/Element/body-scrollTop.html:
      * fast/dom/Element/scrollLeft-expected.txt:
      * fast/dom/Element/scrollLeft.html:
      * fast/dom/Element/scrollTop-expected.txt:
      * fast/dom/Element/scrollTop.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16985db4
    • rniwa@webkit.org's avatar
      Update Mavericks test expectation, tracked by bugs 123489 and 123490. · 08a4d49c
      rniwa@webkit.org authored
      * platform/mac/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08a4d49c
    • bfulgham@apple.com's avatar
      REGRESSION(r158198): editing/execCommand/insert-list-xml.xhtml fails · 9831bf8f
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123460
      
      Reviewed by Ryosuke Niwa.
      
      The original version of this test used a MathML document root,
      and attempted to add HTML content to prove that a bad cast would
      not be encountered when manipulating the MathML document via
      JavaScript.
      
      r158198 broke the test, because it enforced the requirements that
      MathML nodes not generate renderers for non-MathML children.
      
      This patch revises the test to use an SVG document, which does
      permit child HTML nodes.
      
      * TestExpectations: Remove temporary exclusion landed in
        r158216.
      * editing/execCommand/insert-list-xml-expected.txt:
      * editing/execCommand/insert-list-xml.xhtml:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9831bf8f
    • rniwa@webkit.org's avatar
      Mountain Lion rebaseline after r158231. · b21fd7b6
      rniwa@webkit.org authored
      * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b21fd7b6
    • msaboff@apple.com's avatar
      Change local variable register allocation to start at offset -1 · d19c4622
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123182
      
      Reviewed by Geoffrey Garen.
      
      Adjusted the virtual register mapping down by one slot.  Reduced
      the CallFrame header slots offsets by one.  They now start at 0.
      Changed arity fixup to no longer skip passed register slot 0 as this
      is now part of the CallFrame header.
      
      * bytecode/VirtualRegister.h:
      (JSC::operandIsLocal):
      (JSC::operandIsArgument):
      (JSC::VirtualRegister::localToOperand):
      (JSC::VirtualRegister::operandToLocal):
        Adjusted functions for shift in mapping from local to register offset.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::findArgumentPositionForLocal):
      (JSC::DFG::ByteCodeParser::addCall):
      (JSC::DFG::ByteCodeParser::handleInlining):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGVariableEventStream.cpp:
      (JSC::DFG::VariableEventStream::reconstruct):
      * dfg/DFGVirtualRegisterAllocationPhase.cpp:
      (JSC::DFG::VirtualRegisterAllocationPhase::run):
      * interpreter/CallFrame.h:
      (JSC::ExecState::frameExtent):
      (JSC::ExecState::offsetFor):
      * interpreter/Interpreter.cpp:
      (JSC::loadVarargs):
      (JSC::Interpreter::dumpRegisters):
      (JSC::Interpreter::executeCall):
      * llint/LLIntData.cpp:
      (JSC::LLInt::Data::performAssertions):
      * llint/LowLevelInterpreter.asm:
        Adjusted math to accomodate for shift in call frame slots.
      
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::compileFunction):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::calleeFrameOffset):
      * interpreter/CallFrame.cpp:
      (JSC::CallFrame::frameExtentInternal):
      * interpreter/JSStackInlines.h:
      (JSC::JSStack::pushFrame):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompile):
      * jit/JITOperations.cpp:
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::llint_slow_path_stack_check):
      * runtime/CommonSlowPaths.h:
      (JSC::CommonSlowPaths::arityCheckFor):
        Fixed offset calculation to use VirtualRegister and related calculation instead of
        doing seperate calculations.
      
      * interpreter/JSStack.h:
        Adjusted CallFrame slots down by one.  Did some miscellaneous fixing of dumpRegisters()
        in the process of testing the fixes.
      
      * jit/ThunkGenerators.cpp:
      (JSC::arityFixup):
        Changed arity fixup to no longer skip passed register slot 0 as this
        is now part of the CallFrame header.
      
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
        Changed arity fixup to no longer skip passed register slot 0 as this
        is now part of the CallFrame header.  Updated op_enter processing for
        the change in local registers.
      
      * runtime/JSGlobalObject.h:
        Removed the now unneeded extra slot in the global callframe
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d19c4622
    • jer.noble@apple.com's avatar
      [MSE] [Mac] Enable MediaSource on the Mac · 69589095
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122484
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Enable ENABLE_MEDIA_SOURCE.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit/mac:
      
      Enable ENABLE_MEDIA_SOURCE.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      Enable ENABLE_MEDIA_SOURCE.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF:
      
      Enable ENABLE_MEDIA_SOURCE.
      
      * wtf/FeatureDefines.h:
      * wtf/Platform.h: Force a clean build.
      
      LayoutTests:
      
      * platform/mac/js/dom/global-constructors-attributes-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69589095
    • eric.carlson@apple.com's avatar
      [Mac MediaStream] implement AVFoundation backed MediaStreamSource · 439f74ad
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123316
      
      Source/WebCore: 
      
      Reviewed by Jer Noble
      
      No new tests, existing tests updated.
      
      * CMakeLists.txt: Add MediaStreamSourceStates.cpp.
      
      * Modules/mediastream/MediaSourceStates.cpp:
      (WebCore::MediaSourceStates::MediaSourceStates): m_SourceStates -> m_sourceStates.
      (WebCore::MediaSourceStates::sourceType): Ditto.
      (WebCore::MediaSourceStates::facingMode): Ditto.
      * Modules/mediastream/MediaSourceStates.h: Ditto.
      * Modules/mediastream/MediaSourceStates.idl: Mark some attributes as optional.
      
      * Modules/mediastream/MediaStream.cpp:
      (WebCore::MediaStream::addTrack):
      (WebCore::MediaStream::removeTrack):
      (WebCore::MediaStream::addRemoteSource):
      (WebCore::MediaStream::removeRemoteSource):
      
      * Modules/mediastream/MediaStreamCapabilities.cpp:
      (WebCore::MediaStreamCapabilities::sourceType): MediaSourceStates -> MediaStreamSourceStates
      (WebCore::MediaStreamCapabilities::facingMode): Ditto.
      
      * Modules/mediastream/MediaStreamTrack.cpp:
      (WebCore::MediaStreamTrack::MediaStreamTrack): Don't observe source changes directly, let the
          private track do that. Change private track parameter to ref because it can't be NULL.
      (WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
      (WebCore::MediaStreamTrack::setSource): Pass through to private track.
      (WebCore::MediaStreamTrack::stopped): Ditto.
      (WebCore::MediaStreamTrack::states): Ditto.
      (WebCore::MediaStreamTrack::capabilities): Ditto.
      (WebCore::MediaStreamTrack::applyConstraints): Ditto.
      (WebCore::MediaStreamTrack::stopProducingData): Ditto.
      (WebCore::MediaStreamTrack::trackReadyStateChanged): Renamed from sourceStateChanged. Don't
          schedule an 'ended' event if called as a side effect of the stop() method having been
          called as per spec.
      (WebCore::MediaStreamTrack::trackMutedChanged): Renamed from sourceMutedChanged.
      (WebCore::MediaStreamTrack::trackEnabledChanged): Renamed from sourceEnabledChanged.
      (WebCore::MediaStreamTrack::stop): Pass through to private track.
      * Modules/mediastream/MediaStreamTrack.h:
      (WebCore::MediaStreamTrack::Observer::~Observer): Add virtual destructor.
      
      * Modules/mediastream/UserMediaRequest.cpp:
      (WebCore::UserMediaRequest::callSuccessHandler): Set track, not source, constraints.
      
      * WebCore.xcodeproj/project.pbxproj: Add new files.
      
      * bindings/js/JSMediaSourceStatesCustom.cpp:
      (WebCore::JSMediaSourceStates::facingMode): Return jsUndefined when the facing mode
          is Unknown.
      
      * platform/mediastream/MediaStreamCenter.h: Remove unused class forward defines and
          undefined method prototype.
      
      * platform/mediastream/MediaStreamDescriptor.cpp:
      (WebCore::MediaStreamDescriptor::addSource): ASSERT if source is kind None.
      (WebCore::MediaStreamDescriptor::removeSource): Ditto.
      (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
      
      * platform/mediastream/MediaStreamSource.cpp:
      (WebCore::MediaStreamSource::setReadyState): Call startProducingData when readyState changes
          to Live, stopProducingData when it changes to Ended.
      (WebCore::MediaStreamSource::removeObserver): Call stop() when there are no more observers.
      (WebCore::MediaStreamSource::setEnabled): If passed false, do nothing unless all observers
          are disabled. Call startProducingData/stopProducingData when becoming enabled/disabled.
      (WebCore::MediaStreamSource::stop): Don't bother checking to see if other observers have
          stopped, the spec says that track.stop() should permanently stop the track's source.
      * platform/mediastream/MediaStreamSource.h:
      (WebCore::MediaStreamSource::name): Make virtual so derived classes can override.
      (WebCore::MediaStreamSource::setName): Ditto.
      (WebCore::MediaStreamSource::readyState): Ditto.
      (WebCore::MediaStreamSource::enabled): Ditto.
      (WebCore::MediaStreamSource::muted): Ditto.
      (WebCore::MediaStreamSource::setReadonly): Ditto.
      (WebCore::MediaStreamSource::remote): Ditto.
      (WebCore::MediaStreamSource::setRemote): Ditto.
      (WebCore::MediaStreamSource::startProducingData): Added.
      (WebCore::MediaStreamSource::stopProducingData): Added.
      
      * platform/mediastream/MediaStreamSourceCapabilities.h: Move MediaStreamSourceStates to
          its own file.
      
      * platform/mediastream/MediaStreamSourceStates.cpp: Added.
      (WebCore::MediaStreamSourceStates::facingMode): Moved here from MediaSourceStates so the 
          strings are available to platform code.
      (WebCore::MediaStreamSourceStates::sourceType): Ditto.
      * platform/mediastream/MediaStreamSourceStates.h: Added, moved from MediaStreamSourceCapabilities.h.
      
      * platform/mediastream/MediaStreamTrackPrivate.cpp:
      (WebCore::MediaStreamTrackPrivate::create): Pass private track to constructor as PassRefPtr.
      (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Initialize member variables.
      (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate): Unregister as source observer.
      (WebCore::MediaStreamTrackPrivate::setSource): Unregister/register as source observer.
      (WebCore::MediaStreamTrackPrivate::setEnabled): Enable/disable source, call client.
      (WebCore::MediaStreamTrackPrivate::stop): New. Set readyState to Ended, optionally stop source.
      (WebCore::MediaStreamTrackPrivate::setReadyState): Inline the logic from shouldFireTrackReadyStateChanged.
      (WebCore::MediaStreamTrackPrivate::constraints): New, passthrough to the source.
      (WebCore::MediaStreamTrackPrivate::states): Ditto.
      (WebCore::MediaStreamTrackPrivate::type): Ditto.
      (WebCore::MediaStreamTrackPrivate::capabilities): Ditto.
      (WebCore::MediaStreamTrackPrivate::applyConstraints): Ditto.
      (WebCore::MediaStreamTrackPrivate::sourceReadyStateChanged): React to source changes.
      (WebCore::MediaStreamTrackPrivate::sourceMutedChanged): Ditto.
      (WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Ditto.
      (WebCore::MediaStreamTrackPrivate::observerIsEnabled): Respond to source query.
      (WebCore::MediaStreamTrackPrivate::observerIsStopped): Ditto.
      * platform/mediastream/MediaStreamTrackPrivate.h:
      
      * platform/mediastream/mac/AVAudioCaptureSource.h: Added.
      * platform/mediastream/mac/AVAudioCaptureSource.mm: Added.
      
      * platform/mediastream/mac/AVCaptureDeviceManager.h: Added.
      * platform/mediastream/mac/AVCaptureDeviceManager.mm: Added.
      
      * platform/mediastream/mac/AVMediaCaptureSource.h: Added.
      * platform/mediastream/mac/AVMediaCaptureSource.mm: Added.
      
      * platform/mediastream/mac/AVVideoCaptureSource.h: Added.
      * platform/mediastream/mac/AVVideoCaptureSource.mm: Added.
      
      * platform/mediastream/mac/MediaStreamCenterMac.cpp:
      (WebCore::MediaStreamCenterMac::validateRequestConstraints): Implement.
      (WebCore::MediaStreamCenterMac::createMediaStream): Ditto.
      (WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Ditto.
      
      * platform/mock/MockMediaStreamCenter.cpp:
      (WebCore::initializeMockSources): Update for MediaStreamSourceStates changes.
      (WebCore::MockMediaStreamCenter::createMediaStream):
      
      LayoutTests: 
      
      Reviewed by Jer Noble.
      
      * fast/mediastream/MediaStream-add-remove-tracks-expected.txt: Updated.
      * fast/mediastream/MediaStream-add-remove-tracks.html: Ditto.
      * fast/mediastream/MediaStreamConstructor-expected.txt: Ditto.
      * fast/mediastream/MediaStreamConstructor.html: Ditto.
      * fast/mediastream/MediaStreamTrack-getSources.html: Remove typo.
      * fast/mediastream/MediaStreamTrack-expected.txt: Updated results.
      * fast/mediastream/MediaStreamTrack.html: Update to test track.stop() behavior.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      439f74ad
    • zoltan@webkit.org's avatar
      Source/WebCore: [CSS Regions][CSS Shapes] Layout error when the shape has... · 35793310
      zoltan@webkit.org authored
      Source/WebCore: [CSS Regions][CSS Shapes] Layout error when the shape has negative top coordinate and it's applied on the second region
      <https://webkit.org/b/123346>
      
      Reviewed by David Hyatt.
      
      We have a layout error when there is a shape applied on the second region, and it has a negative 'top' coordinate.
      Since shapeInsideInfo::shapeLogicalTop() can return negative numbers, we need to check for it, when we're positioning
      the first line in the region.
      
      Test: fast/regions/shape-inside/shape-inside-on-multiple-regions-with-negative-shape-top.html
      
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
      
      LayoutTests: [CSS Regions][CSS Shapes] Layout error when the shape has negative top coordinate and it's applied on the second region
      <http://webkit.org/b/123346>
      
      Reviewed by David Hyatt.
      
      We have a layout error when there is a shape applied on the second region, and it has a negative 'top' coordinate.
      Since shapeInsideInfo::shapeLogicalTop() can return negative numbers, we need to check for it, when we're positioning
      the first line in the region.
      
      * fast/regions/shape-inside/shape-inside-on-multiple-regions-with-negative-shape-top-expected.html: Added.
      * fast/regions/shape-inside/shape-inside-on-multiple-regions-with-negative-shape-top.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35793310
    • rniwa@webkit.org's avatar
      Add a failing test expectation on editing/execCommand/insert-list-xml.xhtml · d7848ccd
      rniwa@webkit.org authored
      after r158198. The failure is tracked by the bug 123460.
      
      * TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7848ccd