1. 14 Oct, 2013 40 commits
    • ap@apple.com's avatar
      Add an empty window.crypto.webkitSubtle · be84a7a3
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122778
      
      Reviewed by Mark Hahnenberg.
      
      Source/WebCore:
      
      Tests: security/crypto-subtle-gc-2.html
             security/crypto-subtle-gc-3.html
             security/crypto-subtle-gc.html
      
      * DerivedSources.make: Process SubtleCrypto.idl.
      
      * crypto: Added.
      * WebCore.xcodeproj/project.pbxproj:
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      
      * bindings/js/JSSubtleCryptoCustom.cpp: Added. Empty for now, but we'll certainly
      need custom bindings code here.
      
      * crypto/SubtleCrypto.cpp: Added.
      (WebCore::SubtleCrypto::SubtleCrypto):
      (WebCore::SubtleCrypto::document):
      * crypto/SubtleCrypto.h: Added.
      * crypto/SubtleCrypto.idl: Added.
      * page/Crypto.cpp:
      (WebCore::Crypto::subtle):
      * page/Crypto.h:
      * page/Crypto.idl:
      
      LayoutTests:
      
      * TestExpectations: The feature isn't enabled anywhere yet, so skipping the new tests.
      
      * security/crypto-subtle-gc-2-expected.txt: Added.
      * security/crypto-subtle-gc-2.html: Added.
      * security/crypto-subtle-gc-3-expected.txt: Added.
      * security/crypto-subtle-gc-3.html: Added.
      * security/crypto-subtle-gc-expected.txt: Added.
      * security/crypto-subtle-gc.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be84a7a3
    • mark.lam@apple.com's avatar
      Add FTL support for LogicalNot(string) · 67e54e97
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122765
      
      Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-14
      Reviewed by Filip Pizlo.
      
      This patch is tested by:
      regress/script-tests/emscripten-cube2hash.js.ftl-eager
      
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileLogicalNot):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67e54e97
    • commit-queue@webkit.org's avatar
      Remove GestureEvent leftovers from WebCore · 886d0e12
      commit-queue@webkit.org authored
      <https://webkit.org/b/122780>
      
      Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-10-14
      Reviewed by Anders Carlsson.
      
      - Removed some remaining references to PlatformGestureEvent, supposed to
        be removed by r157316
      - TOUCH_ADJUSTMENT should be reworked after GestureEvent feature
        removal
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
      * page/EventHandler.h:
      * platform/PlatformEvent.h:
      * platform/ScrollAnimatorNone.cpp:
      * platform/ScrollableArea.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      886d0e12
    • commit-queue@webkit.org's avatar
      [sh4] Fixes after r157404 and r157411. · 39909569
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122782
      
      Patch by Julien Brianceau <jbriance@cisco.com> on 2013-10-14
      Reviewed by Michael Saboff.
      
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation): Add missing SH4_32BIT_DUMMY_ARG.
      * jit/CCallHelpers.h:
      (JSC::CCallHelpers::setupArgumentsWithExecState):
      * jit/JITInlines.h:
      (JSC::JIT::callOperation): Add missing SH4_32BIT_DUMMY_ARG.
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::emit_op_put_by_id): Remove unwanted BEGIN_UNINTERRUPTED_SEQUENCE.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39909569
    • commit-queue@webkit.org's avatar
      Build fix after r157366 · 2fcb6364
      commit-queue@webkit.org authored
      http://bugs.webkit.org/show_bug.cgi?id=122783
      
      When TOUCH_AJUSTMENT is enabled build fails due to some
      refactors in TextRender functions.
      
      Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-10-14
      Reviewed by Anders Carlsson.
      
      * page/TouchAdjustment.cpp:
      (WebCore::TouchAdjustment::appendContextSubtargetsForNode):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2fcb6364
    • achicu@adobe.com's avatar
      The content of the DOM panel for iframes is not updated until the "onload" event · 7e05a123
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122653
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Test: http/tests/inspector-protocol/loading-iframe-document-node.html
      
      Renamed InspectorDOMAgent::loadEventFired to InspectorDOMAgent::didCommitLoad and moved the call site
      from InspectorInstrumentation::loadEventFiredImpl to InspectorInstrumentation::didCommitLoadImpl.
      This is to make sure that it will invalidate the content of the iframe as soon as the frame navigates
      to a different page. This way the new node can be retrieved as soon as the page has some content, and
      not just when the page is fully loaded.
      
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::didCommitLoad): Renamed from loadEventFired, as it is now called from
      didCommitLoadImpl instead.
      (WebCore::InspectorDOMAgent::frameDocumentUpdated): Updated comment to point to the new function name.
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorInstrumentation.cpp:
      (WebCore::InspectorInstrumentation::loadEventFiredImpl): Removed call do InspectorDOMAgent.loadEventFired.
      (WebCore::InspectorInstrumentation::didCommitLoadImpl): Added call to InspectorDOMAgent.didCommitLoad.
      
      LayoutTests:
      
      Added test to check that immediately after the scripting context is created, the
      inspector already has access to the nodeId of the document of the iframe.
      
      * http/tests/inspector-protocol/loading-iframe-document-node-expected.txt: Added.
      * http/tests/inspector-protocol/loading-iframe-document-node.html: Added.
      * http/tests/inspector-protocol/resources/slow-test-page.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e05a123
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r157413. · 68083b55
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/157413
      https://bugs.webkit.org/show_bug.cgi?id=122779
      
      Appears to have caused frequent crashes (Requested by ap on
      #webkit).
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/DeferGC.cpp: Removed.
      * heap/DeferGC.h:
      * jit/JITStubs.cpp:
      (JSC::tryCacheGetByID):
      (JSC::DEFINE_STUB_FUNCTION):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * runtime/ConcurrentJITLock.h:
      * runtime/InitializeThreading.cpp:
      (JSC::initializeThreadingOnce):
      * runtime/JSCellInlines.h:
      (JSC::allocateCell):
      * runtime/Structure.cpp:
      (JSC::Structure::materializePropertyMap):
      (JSC::Structure::putSpecificValue):
      (JSC::Structure::createPropertyMap):
      * runtime/Structure.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68083b55
    • roger_fong@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=122774. · 8b2f263c
      roger_fong@apple.com authored
      <rdar://problem/6138855>.
      
      Reviewed by Brent Fulgham.
      
      Add a field to keep track of hovered over index.
      Use index to determine whether or not to use the existing selected index on the mouse down event.
      
      * platform/win/PopupMenuWin.cpp:
      (WebCore::PopupMenuWin::PopupMenuWin):
      (WebCore::PopupMenuWin::show):
      (WebCore::PopupMenuWin::wndProc):
      * platform/win/PopupMenuWin.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b2f263c
    • mhahnenberg@apple.com's avatar
      COLLECT_ON_EVERY_ALLOCATION causes assertion failures · c4289229
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122652
      
      Reviewed by Filip Pizlo.
      
      COLLECT_ON_EVERY_ALLOCATION wasn't accounting for the new GC deferral mechanism,
      so we would end up ASSERTing during garbage collection.
      
      * heap/MarkedAllocator.cpp:
      (JSC::MarkedAllocator::allocateSlowCase):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4289229
    • fpizlo@apple.com's avatar
      Unreviewed, fix the paths so that the test passes. · 6dddaa95
      fpizlo@apple.com authored
      * js/regress/put-by-id.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6dddaa95
    • oliver@apple.com's avatar
      Separate out array iteration intrinsics · edfb3181
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122656
      
      Reviewed by Michael Saboff.
      
      Separate out the intrinsics for key and values iteration
      of arrays.
      
      This requires moving moving array iteration into the iterator
      instance, rather than the prototype, but this is essentially
      unobservable so we'll live with it for now.
      
      * jit/ThunkGenerators.cpp:
      (JSC::arrayIteratorNextThunkGenerator):
      (JSC::arrayIteratorNextKeyThunkGenerator):
      (JSC::arrayIteratorNextValueThunkGenerator):
      * jit/ThunkGenerators.h:
      * runtime/ArrayIteratorPrototype.cpp:
      (JSC::ArrayIteratorPrototype::finishCreation):
      * runtime/Intrinsic.h:
      * runtime/JSArrayIterator.cpp:
      (JSC::JSArrayIterator::finishCreation):
      (JSC::createIteratorResult):
      (JSC::arrayIteratorNext):
      (JSC::arrayIteratorNextKey):
      (JSC::arrayIteratorNextValue):
      (JSC::arrayIteratorNextGeneric):
      * runtime/VM.cpp:
      (JSC::thunkGeneratorForIntrinsic):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      edfb3181
    • timothy_horton@apple.com's avatar
      Virtualize PlatformCALayer · 62f0c52c
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122672
      
      Reviewed by Anders Carlsson.
      
      No new tests, just a refactoring.
      
      * WebCore.exp.in:
      setGeometryFlipped is on PlatformCALayerMac now.
      
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      Add PlatformCALayer.cpp, PlatformCALayerWin.h, and let VS do its
      thing with some other files.
      
      * WebCore.xcodeproj/project.pbxproj:
      Add PlatformCALayer.cpp and PlatformCALayerMac.h.
      
      * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
      (WebCore::AVFWrapper::platformLayer):
      Make a PlatformCALayerWin explicitly.
      
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::createPlatformCALayer):
      Added. Decide whether to make a PlatformCALayer{Mac, Win} based on the platform.
      Later, we will decide between other subclasses based on other things.
      
      (WebCore::GraphicsLayerCA::filtersCanBeComposited):
      Do the same thing for filtersCanBeComposited.
      
      (WebCore::GraphicsLayerCA::GraphicsLayerCA):
      (WebCore::GraphicsLayerCA::setContentsToSolidColor):
      (WebCore::GraphicsLayerCA::setContentsToMedia):
      (WebCore::GraphicsLayerCA::setContentsToCanvas):
      (WebCore::GraphicsLayerCA::recursiveCommitChanges):
      (WebCore::GraphicsLayerCA::ensureStructuralLayer):
      (WebCore::GraphicsLayerCA::updateContentsImage):
      (WebCore::GraphicsLayerCA::updateContentsRects):
      (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
      Use createPlatformCALayer instead of PlatformCALayer::create.
      
      * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
      For now, use the PlatformCALayerMac version of filtersCanBeComposited,
      since this code is heavily tied to having CALayers in the Web process.
      
      * platform/graphics/ca/GraphicsLayerCA.h:
      Include PlatformCALayer.h here so we can get the LayerType enum.
      (NOTE-to-be-removed: if there's a better way to do this, I'm open to
      suggestions; I couldn't puzzle out nested 'enum class' stuff).
      
      Add the createPlatformCALayers.
      
      * platform/graphics/ca/PlatformCAAnimation.h:
      Friend the subclasses too.
      
      * platform/graphics/ca/PlatformCALayer.cpp: Added.
      (WebCore::PlatformCALayer::~PlatformCALayer):
      Pull the shared part of the PlatformCALayer destructor out.
      
      * platform/graphics/ca/PlatformCALayer.h:
      (WebCore::PlatformCALayer::platformLayer):
      (WebCore::PlatformCALayer::setOwner):
      (WebCore::PlatformCALayer::PlatformCALayer):
      Virtualize all the things. Move platform specific members to their new subclasses.
      
      * platform/graphics/ca/mac/PlatformCALayerMac.h: Added.
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      Move the PLATFORM(MAC) implementations from PlatformCALayer to PlatformCALayerMac.
      
      (PlatformCALayer::platformCALayer):
      The platformCALayer lookup function is static on PlatformCALayer, so it can't
      be moved to the subclasses. It might be a good idea in the future to move towards
      a platform-independent mechanism for looking up PlatformCALayers from PlatformLayers,
      and to avoid needing to do this as often as we do now.
      
      * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
      (WebCore::CACFLayerTreeHost::CACFLayerTreeHost):
      * platform/graphics/ca/win/PlatformCALayerWin.cpp:
      Move the PLATFORM(WIN) implementations from PlatformCALayer to PlatformCALayerWin.
      
      (PlatformCALayerWin::create):
      (PlatformCALayer::platformCALayer):
      
      * platform/graphics/ca/win/PlatformCALayerWin.h: Added.
      
      * platform/graphics/win/GraphicsContext3DWin.cpp:
      (WebCore::GraphicsContext3D::GraphicsContext3D):
      * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
      (WebCore::MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie):
      Include PlatformCALayerWin.h and explicitly make PlatformCALayerWins here.
      
      * FullscreenVideoController.cpp:
      (FullscreenVideoController::FullscreenVideoController):
      Include PlatformCALayerWin.h and explicitly make PlatformCALayerWins here.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62f0c52c
    • hugo.lima@openbossa.org's avatar
      [cmake] MediaControlsApple is used only by Efl port and is on CMakeLists.txt · 58be7800
      hugo.lima@openbossa.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122772
      
      Reviewed by Anders Carlsson.
      
      * CMakeLists.txt: Removed MediaControlsApple.cpp
      * PlatformEfl.cmake: Added MediaControlsApple.cpp
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58be7800
    • ap@apple.com's avatar
      window.crypto doesn't preserve custom properties · bdb7a794
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122770
      
      Reviewed by Mark Hahnenberg.
      
      Source/WebCore: 
      
      Test: security/crypto-gc.html
      
      Generate isReachableFromOpaqueRoots that makes Crypto live as long as the document
      lives (because that's when it's observable through window object).
      
      * page/Crypto.cpp:
      (WebCore::Crypto::Crypto):
      (WebCore::Crypto::~Crypto):
      (WebCore::Crypto::document):
      * page/Crypto.h:
      (WebCore::Crypto::create):
      Made Crypto a ContextDestructionObserver, so that it can report its document to bindings.
      Removed ScriptWrappable, because it seems to have served no purpose in this class.
      
      * page/Crypto.idl: Added GenerateIsReachable. Removed ImplementationLacksVTable,
      because the class now has a vtable, and can be checked for bindings integrity.
      
      * page/DOMWindow.cpp: (WebCore::DOMWindow::crypto): Pass a document when creating
      crypto.
      
      LayoutTests: 
      
      * security/crypto-gc-expected.txt: Added.
      * security/crypto-gc.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bdb7a794
    • akling@apple.com's avatar
      CTTE: NamedNodeMap always has a corresponding Element. · 7edf26e5
      akling@apple.com authored
      <https://webkit.org/b/122769>
      
      Reviewed by Anders Carlsson.
      
      Made NamedNodeMap::m_element a reference and remove an assertion
      that it's never null.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7edf26e5
    • akling@apple.com's avatar
      REGRESSION(r157408): Crashes in RenderFullScreen::wrapRenderer(). · 23c3e745
      akling@apple.com authored
      Unreviewed crash fix for these two tests:
      
      - fullscreen/full-screen-restrictions.html
      - fullscreen/empty-anonymous-block-continuation-crash.html
      
      * rendering/RenderFullScreen.cpp:
      (RenderFullScreen::wrapRenderer):
      
          Get the RenderArena from Document like we did before this patch.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23c3e745
    • hmuller@adobe.com's avatar
      [CSS Shapes] Image valued shape-outside shapes should update the layout after... · b5abde39
      hmuller@adobe.com authored
      [CSS Shapes] Image valued shape-outside shapes should update the layout after the image has been loaded
      https://bugs.webkit.org/show_bug.cgi?id=122340
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      Ensure that the an image-valued shape-outside layout is updated after the image has
      been loaded.
      
      Test: http/tests/css/css-image-valued-shape.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::imageChanged): Added code for the shape-outside case.
      (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
      * rendering/RenderElement.cpp:
      (WebCore::RenderElement::~RenderElement): Ditto.
      (WebCore::RenderElement::setStyle): Ditto.
      
      LayoutTests:
      
      Verify that an image-valued shape-outside layout is updated after the image has been loaded.
      
      * http/tests/css/css-image-valued-shape-expected.txt: Added.
      * http/tests/css/css-image-valued-shape.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5abde39
    • mhahnenberg@apple.com's avatar
      llint_slow_path_put_by_id can deadlock on a ConcurrentJITLock · e8cc67f5
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122667
      
      Reviewed by Filip Pizlo.
      
      The issue this patch is attempting to fix is that there are places in our codebase
      where we acquire the ConcurrentJITLock for a particular CodeBlock, then we do some
      operations that can initiate a garbage collection. Garbage collection then calls 
      some methods of CodeBlock that also take the ConcurrentJITLock (because they don't
      always necessarily run during garbage collection). This causes a deadlock.
      
      To fix this issue, this patch adds a new RAII-style object (DisallowGC) that stores 
      into a thread-local field that indicates that it is unsafe to perform any operation 
      that could trigger garbage collection on the current thread. In debug builds, 
      ConcurrentJITLocker contains one of these DisallowGC objects so that we can eagerly 
      detect deadlocks.
      
      This patch also adds a new type of ConcurrentJITLocker, GCSafeConcurrentJITLocker,
      which uses the DeferGC mechanism to prevent collections from occurring while the 
      lock is held.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/DeferGC.cpp: Added.
      * heap/DeferGC.h:
      (JSC::DisallowGC::DisallowGC):
      (JSC::DisallowGC::~DisallowGC):
      (JSC::DisallowGC::isGCDisallowedOnCurrentThread):
      (JSC::DisallowGC::initialize):
      * jit/JITStubs.cpp:
      (JSC::tryCachePutByID):
      (JSC::tryCacheGetByID):
      (JSC::DEFINE_STUB_FUNCTION):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * runtime/ConcurrentJITLock.h:
      (JSC::ConcurrentJITLockerBase::ConcurrentJITLockerBase):
      (JSC::ConcurrentJITLockerBase::~ConcurrentJITLockerBase):
      (JSC::ConcurrentJITLockerBase::unlockEarly):
      (JSC::GCSafeConcurrentJITLocker::GCSafeConcurrentJITLocker):
      (JSC::ConcurrentJITLocker::ConcurrentJITLocker):
      * runtime/InitializeThreading.cpp:
      (JSC::initializeThreadingOnce):
      * runtime/JSCellInlines.h:
      (JSC::allocateCell):
      * runtime/Structure.cpp:
      (JSC::Structure::materializePropertyMap):
      (JSC::Structure::putSpecificValue):
      (JSC::Structure::createPropertyMap):
      * runtime/Structure.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8cc67f5
    • akling@apple.com's avatar
      Remove some silly null checks in Element/NamedNodeMap. · a783d0a1
      akling@apple.com authored
      <https://webkit.org/b/122767>
      
      Reviewed by Darin Adler.
      
      Make shouldIgnoreAttributeCase() take a const Element&, exposing
      some unnecessary null checks.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a783d0a1
    • fpizlo@apple.com's avatar
      Baseline JIT should use the DFG's PutById IC · d97d757b
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122704
      
      Source/JavaScriptCore: 
      
      Reviewed by Mark Hahnenberg.
              
      Mostly no big deal, just removing the old Baseline JIT's put_by_id IC support and forcing
      that JIT to use the DFG's (i.e. JITOperations) PutById IC.
              
      The only complicated part was that the PutById operations assumed that we first did a
      cell speculation, which the baseline JIT obviously won't do. So I changed all of those
      slow paths to deal with EncodedJSValue's.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::resetStubInternal):
      * bytecode/PutByIdStatus.cpp:
      (JSC::PutByIdStatus::computeFor):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      * jit/CCallHelpers.h:
      (JSC::CCallHelpers::setupArgumentsWithExecState):
      * jit/JIT.cpp:
      (JSC::PropertyStubCompilationInfo::copyToStubInfo):
      * jit/JIT.h:
      (JSC::PropertyStubCompilationInfo::PropertyStubCompilationInfo):
      (JSC::PropertyStubCompilationInfo::slowCaseInfo):
      * jit/JITInlines.h:
      (JSC::JIT::callOperation):
      * jit/JITOperationWrappers.h:
      * jit/JITOperations.cpp:
      * jit/JITOperations.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::compileGetByIdHotPath):
      (JSC::JIT::compileGetByIdSlowCase):
      (JSC::JIT::emit_op_put_by_id):
      (JSC::JIT::emitSlow_op_put_by_id):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::compileGetByIdSlowCase):
      (JSC::JIT::emit_op_put_by_id):
      (JSC::JIT::emitSlow_op_put_by_id):
      * jit/JITStubs.cpp:
      * jit/JITStubs.h:
      * jit/Repatch.cpp:
      (JSC::appropriateGenericPutByIdFunction):
      (JSC::appropriateListBuildingPutByIdFunction):
      (JSC::resetPutByID):
      
      LayoutTests: 
      
      Reviewed by Mark Hahnenberg.
      
      * js/regress/put-by-id-expected.txt: Added.
      * js/regress/put-by-id.html: Added.
      * js/regress/script-tests/put-by-id.js: Added.
      (foo):
      (bar):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d97d757b
    • bfulgham@apple.com's avatar
      [Win] Build fix after r122737. · 45e1154f
      bfulgham@apple.com authored
      * dom/Node.h: Add explicit WebCore namespace to macro definition to work around
      Visual Studio bug.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45e1154f
    • fpizlo@apple.com's avatar
      FTL should have an inefficient but correct implementation of GetById · 6cd705df
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122740
      
      Reviewed by Mark Hahnenberg.
              
      It took some effort to realize that the node->prediction() check in the DFG backends
      are completely unnecessary since the ByteCodeParser will always insert a ForceOSRExit
      if !prediction.
              
      But other than that this was an easy patch.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleGetById):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLIntrinsicRepository.h:
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileNode):
      (JSC::FTL::LowerDFGToLLVM::compileGetById):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6cd705df
    • akling@apple.com's avatar
      Pass Document directly to anonymous renderer constructors. · 42e10638
      akling@apple.com authored
      <https://webkit.org/b/122752>
      
      Reviewed by Antti Koivisto.
      
      Added separate constructors for creating anonymous renderers that
      take a Document& instead of a null Element*/Text*.
      
      Removed setDocumentForAnonymous() and all createAnonymous() helpers.
      ...and RenderObject::m_node is now a Node&, wohoo!
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42e10638
    • mihnea@adobe.com's avatar
      [CSSRegions] Move style-scoped* tests into fast/regions/style-scoped · 3dc95bb3
      mihnea@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122741
      
      Reviewed by Darin Adler.
      
      Move files, adjust TestExpectations.
      
      * fast/regions/style-scoped/style-scoped-in-flow-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-expected.html.
      * fast/regions/style-scoped/style-scoped-in-flow-override-container-style-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-container-style-expected.html.
      * fast/regions/style-scoped/style-scoped-in-flow-override-container-style.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-container-style.html.
      * fast/regions/style-scoped/style-scoped-in-flow-override-region-styling-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling-expected.html.
      * fast/regions/style-scoped/style-scoped-in-flow-override-region-styling-multiple-regions-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling-multiple-regions-expected.html.
      * fast/regions/style-scoped/style-scoped-in-flow-override-region-styling-multiple-regions.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling-multiple-regions.html.
      * fast/regions/style-scoped/style-scoped-in-flow-override-region-styling.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling.html.
      * fast/regions/style-scoped/style-scoped-in-flow.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow.html.
      * platform/efl/TestExpectations:
      * platform/gtk-wk2/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3dc95bb3
    • ossy@webkit.org's avatar
      [WK2][Efl][Soup] Make NetworkProcessMainUnix handle proxy settings. · aa8ef681
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118388
      
      Reviewed by Carlos Garcia Campos.
      
      Original patch by Kwang Yul Seo <skyul@company100.net> .
      
      Proxy configuration should honor the no_proxy environment variable
      same to WebProcess. It is necessary not to change the current behaviour.
      See https://bugs.webkit.org/show_bug.cgi?id=91747 for details.
      
      The following things were fixed by Csaba Osztrogonác:
      - moved session variable before #if not to have conflict with https://bugs.webkit.org/show_bug.cgi?id=118343
      - added GRefPtr.h include
      - fixed ifdef guards
      
      * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
      (WebKit::NetworkProcessMain):
      Copied from WebProcessMainEfl.cpp.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa8ef681
    • weinig@apple.com's avatar
      CTTE: Add more node conversion helpers · 9b9c8931
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122737
      
      Reviewed by Darin Adler.
      
      - Factor NODE_TYPE_CASTS into TYPE_CASTS_BASE(ToClassName, FromClassName)
        to allow for DOCUMENT_TYPE_CASTS.
      - Replace more static_casts<>.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b9c8931
    • mark.lam@apple.com's avatar
      Transition misc cti_op_* JITStubs to JIT operations. · 03944a0a
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122645.
      
      Reviewed by Michael Saboff.
      
      Stubs converted:
          cti_op_check_has_instance
          cti_op_create_arguments
          cti_op_del_by_id
          cti_op_instanceof
          cti_to_object
          cti_op_push_activation
          cti_op_get_pnames
          cti_op_load_varargs
      
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * jit/CCallHelpers.h:
      (JSC::CCallHelpers::setupArgumentsWithExecState):
      * jit/JIT.h:
      (JSC::JIT::emitStoreCell):
      * jit/JITCall.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITInlines.h:
      (JSC::JIT::callOperation):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_get_pnames):
      (JSC::JIT::emit_op_create_activation):
      (JSC::JIT::emit_op_create_arguments):
      (JSC::JIT::emitSlow_op_check_has_instance):
      (JSC::JIT::emitSlow_op_instanceof):
      (JSC::JIT::emitSlow_op_get_argument_by_val):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emitSlow_op_check_has_instance):
      (JSC::JIT::emitSlow_op_instanceof):
      (JSC::JIT::emit_op_get_pnames):
      (JSC::JIT::emit_op_create_activation):
      (JSC::JIT::emit_op_create_arguments):
      (JSC::JIT::emitSlow_op_get_argument_by_val):
      * jit/JITOperations.cpp:
      * jit/JITOperations.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emit_op_del_by_id):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::emit_op_del_by_id):
      * jit/JITStubs.cpp:
      * jit/JITStubs.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03944a0a
    • m.pakula@samsung.com's avatar
      Unreviewed EFL gardening · 61ac2a68
      m.pakula@samsung.com authored
      Added new baselines for tests marked as skipped.
      
      * platform/efl-wk1/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/efl/compositing/overflow/nested-scrolling-expected.txt: Added.
      * platform/efl/compositing/overflow/remove-overflow-crash2-expected.png: Added.
      * platform/efl/compositing/overflow/remove-overflow-crash2-expected.txt: Added.
      * platform/efl/editing/spelling/inline-spelling-markers-hidpi-expected.png: Added.
      * platform/efl/editing/unsupported-content/list-delete-001-expected.png:
      * platform/efl/editing/unsupported-content/list-delete-001-expected.txt: Added.
      * platform/efl/editing/unsupported-content/list-delete-003-expected.png:
      * platform/efl/editing/unsupported-content/list-delete-003-expected.txt: Added.
      * platform/efl/editing/unsupported-content/list-type-after-expected.png:
      * platform/efl/editing/unsupported-content/list-type-after-expected.txt: Added.
      * platform/efl/editing/unsupported-content/table-delete-002-expected.png:
      * platform/efl/editing/unsupported-content/table-delete-002-expected.txt: Added.
      * platform/efl/fast/canvas/fill-stroke-clip-reset-path-expected.png: Added.
      * platform/efl/fast/table/click-near-anonymous-table-expected.png: Added.
      * platform/efl/fast/table/click-near-anonymous-table-expected.txt: Added.
      * platform/efl/fast/text/international/arabic-justify-expected.png: Added.
      * platform/efl/fast/text/international/arabic-justify-expected.txt: Added.
      * platform/efl/fast/text/international/bidi-linebreak-001-expected.png: Added.
      * platform/efl/fast/text/international/bidi-linebreak-001-expected.txt: Added.
      * platform/efl/fast/text/international/bidi-linebreak-002-expected.png: Added.
      * platform/efl/fast/text/international/bidi-linebreak-002-expected.txt: Added.
      * platform/efl/fast/text/international/bidi-linebreak-003-expected.png: Added.
      * platform/efl/fast/text/international/bidi-linebreak-003-expected.txt: Added.
      * platform/efl/fast/text/unicode-variation-selector-expected.png: Added.
      * platform/efl/fast/text/unicode-variation-selector-expected.txt: Added.
      * platform/efl/media/video-colorspace-yuv420-expected.png: Added.
      * platform/efl/media/video-colorspace-yuv420-expected.txt: Added.
      * platform/efl/media/video-colorspace-yuv422-expected.png: Added.
      * platform/efl/media/video-colorspace-yuv422-expected.txt: Added.
      * platform/efl/svg/as-image/image-respects-deviceScaleFactor-expected.png: Added.
      * platform/efl/svg/as-image/image-respects-deviceScaleFactor-expected.txt: Added.
      * platform/efl/svg/hixie/data-types/002-expected.png: Added.
      * platform/efl/svg/hixie/data-types/002-expected.txt:
      * platform/efl/svg/text/non-bmp-positioning-lists-expected.png: Added.
      * platform/efl/svg/text/non-bmp-positioning-lists-expected.txt: Added.
      * platform/efl/svg/zoom/text/zoom-hixie-mixed-009-expected.png: Added.
      * platform/efl/svg/zoom/text/zoom-hixie-mixed-009-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61ac2a68
    • zandobersek@gmail.com's avatar
      Static assertions in WTF::adoptPtr should point to using adoptRef for ref-counted objects · d1149929
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122745
      
      Reviewed by Anders Carlsson.
      
      * wtf/PassOwnPtr.h:
      (WTF::adoptPtr): When the object's type is convertible to the RefCountedBase or ThreadSafeRefCountedBase type,
      the static assertion should note that adoptRef should be used instead.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1149929
    • zandobersek@gmail.com's avatar
      Reintroduce PassRefPtr<Event> copy in ScopedEventQueue::dispatchEvent · c338cc7d
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122742
      
      Reviewed by Alexey Proskuryakov.
      
      This is a follow-up to r157219 which introduced a workaround for the GCC's quirky behavior that
      was resulting in crashes due to the PassRefPtr<Event> object passed to EventDispatcher::dispatchEvent
      being copied and nullified first before retrieving the EventTarget of the Event object wrapped in that
      PassRefPtr.
      
      The implementation is now adjusted to first retrieve the pointer to the Event's EventTarget and store
      it in a local variable. That variable is then passed as the first parameter to EventDispatcher::dispatchEvent,
      and the PassRefPtr<Event> passed directly as the second parameter. Previously the pointer of that PassRefPtr
      object was passed in, with a new PassRefPtr being created which would increase the reference count of the
      ref-counted object. Passing in the original PassRefPtr avoids the unnecessary reference count increase by creating
      a copy. That still nullifies the original PassRefPtr, but that's not a problem anymore.
      
      * dom/ScopedEventQueue.cpp:
      (WebCore::ScopedEventQueue::dispatchEvent):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c338cc7d
    • betravis@adobe.com's avatar
      [CSS Shapes] Shape-Margin should be animatable · 48a6a023
      betravis@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122524
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Mark content for relayout after shape-margin changes, and add shape-margin
      to the list of animatable properties.
      
      Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-margin.html
             fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html
      
      * page/animation/CSSPropertyAnimation.cpp:
      (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add
      shape-margin to the map of animatable CSS properties.
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Compare shape-margins,
      and mark dependent content for relayout if they have changed.
      
      LayoutTests:
      
      Test that shape-margin can be set dynamically and content lays out correctly.
      Also test that shape-margin can be manipulated through CSS Animations.
      
      * fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-margin-expected.html: Added.
      * fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-margin.html: Added.
      * fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation-expected.txt: Added.
      * fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48a6a023
    • g.czajkowski@samsung.com's avatar
      [EFL] Accessibility gardening · 3f033bcb
      g.czajkowski@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122751
      
      Unreviewed EFL gardening.
      
      Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-14
      
      * platform/efl-wk2/TestExpectations: Add bug numbers and marked missing tests.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f033bcb
    • commit-queue@webkit.org's avatar
      Don't crash after OpenGL robustness reset · 77c89c51
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122750
      
      Patch by Arvid Nilsson <anilsson@blackberry.com> on 2013-10-14
      Reviewed by George Staikos.
      
      JIRA 517132.
      Just log the incident and pretend like nothing happened.
      
      No new tests, we don't have repeatable steps to reproduce a robustness
      reset.
      
      * platform/graphics/blackberry/LayerRenderer.cpp:
      (WebCore::LayerRenderer::makeContextCurrent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77c89c51
    • andersca@apple.com's avatar
      [EFL] Buildfix after r157393 · 72c44014
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122749
      
      Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-14
      Reviewed by Andreas Kling.
      
      Buildfix with error enumeration value 'CSS_FR' not handled in switch.
      
      * css/CSSCalculationValue.cpp:
      (WebCore::hasDoubleValue):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      72c44014
    • andersca@apple.com's avatar
      WebKit Nightlies broken by r157374 · 000b4a19
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122736
      
      Reviewed by Andreas Kling.
      
      Add back a callOnMainThread overload that Safari is using.
      
      * wtf/MainThread.cpp:
      (WTF::callOnMainThread):
      * wtf/MainThread.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      000b4a19
    • gyuyoung.kim@samsung.com's avatar
      Unreviewed. EFL Gardening. · 19369f97
      gyuyoung.kim@samsung.com authored
      Add baselines for new tests which was added by r156767.
      
      * platform/efl/TestExpectations: Remove tests supported by this commit.
      * platform/efl/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Added.
      * platform/efl/fast/regions/text-region-split-small-pagination-expected.txt: Added.
      * platform/efl/fast/regions/top-overflow-out-of-second-region-expected.txt: Added.
      * platform/efl/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Added.
      * platform/efl/fast/repaint/region-painting-invalidation-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19369f97
    • mario@webkit.org's avatar
      [EFL] Present replaced objects with 0xFFFC character · e228d478
      mario@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122744
      
      Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-14
      Reviewed by Mario Sanchez Prada.
      
      Source/WebCore:
      
      Replaced elements should be emitted in GTK/EFL and
      marked their presence with the replacement character.
      
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::textIteratorBehaviorForTextRange):
      
      LayoutTests:
      
      Added new accessibility expectation after r156532.
      
      * platform/efl-wk2/TestExpectations:
      * platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e228d478
    • svillar@igalia.com's avatar
      [CSS Grid Layout] Implement support for <flex> · dfdaa965
      svillar@igalia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115362
      
      Reviewed by Andreas Kling.
      
      From Blink r149134, r149480, r149532, r150287 and r156127 by <jchaffraix@chromium.org>
      From Blink r157820 by <svillar@igalia.com>
      
      Source/WebCore:
      
      Added support for flexible lengths ('fr' unit) in CSS Grid Layout
      code. This requires the addition of GridLength class to
      encapsulate the knowledge of <flex> to the grid layout code.
      
      Also updated the algorithm that computes the layout. It increases
      the value of 1fr based on the grid tracks' usedBreath to fraction
      ratio (called normalizedFractionValue). This enables increasing
      the fraction value while updating the available space to account
      for processed grid tracks. The algorithm stops when we run out of
      grid tracks or available space (one grid item has an intrinsic
      size too big). This matches the specs to the letter for the known
      available space case (both the unknown case and the interaction
      with 'span' are left out of this patch).
      
      Tests: fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html
             fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html
             fast/css-grid-layout/flex-content-resolution-columns.html
             fast/css-grid-layout/flex-content-resolution-rows.html
      
      * GNUmakefile.list.am: Added GridLength.h to the build system.
      * Target.pri: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::valueForGridTrackBreadth): Replace Length by GridLength.
      * css/CSSGrammar.y.in: Added FR support.
      * css/CSSParser.cpp: Ditto.
      (WebCore::CSSParser::parseGridBreadth):
      (WebCore::CSSParser::detectNumberToken):
      * css/CSSParserValues.cpp: Added FR support.
      (WebCore::CSSParserValue::createCSSValue):
      * css/CSSParserValues.h:
      (WebCore::CSSParserString::operator[]):
      (WebCore::CSSParserString::equalIgnoringCase):
      * css/CSSPrimitiveValue.cpp: Added FR support.
      (WebCore::isValidCSSUnitTypeForDoubleConversion):
      (WebCore::CSSPrimitiveValue::cleanup):
      (WebCore::CSSPrimitiveValue::customCSSText):
      (WebCore::CSSPrimitiveValue::cloneForCSSOM):
      (WebCore::CSSPrimitiveValue::equals):
      * css/CSSPrimitiveValue.h: Added a couple of missing const.
      (WebCore::CSSPrimitiveValue::isFlex):
      * css/StyleResolver.cpp: Added FR support.
      (WebCore::createGridTrackBreadth):
      (WebCore::createGridTrackSize):
      * rendering/RenderGrid.cpp:
      (WebCore::GridTrackForNormalization::GridTrackForNormalization):
      New helper struct to ease the computation of track breadths with
      flexible lengths.
      (WebCore::GridTrackForNormalization::operator=):
      (WebCore::RenderGrid::computePreferredTrackWidth): Replaced Length by GridLength.
      (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Grow grid lines
      having a fraction as the MaxTrackSizingFunction.
      (WebCore::RenderGrid::computeUsedBreadthOfMinLength): Replaced Length by GridLength.
      (WebCore::RenderGrid::computeUsedBreadthOfMaxLength): Ditto.
      (WebCore::sortByGridNormalizedFlexValue):
      (WebCore::RenderGrid::computeNormalizedFractionBreadth): Increase
      the fraction value while updating the available space to account
      for processed grid tracks.
      (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
      (WebCore::RenderGrid::distributeSpaceToTracks): Never shrink track sizes.
      (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
      * rendering/RenderGrid.h:
      * rendering/style/GridLength.h: Added.
      (WebCore::GridLength::GridLength):
      (WebCore::GridLength::isLength):
      (WebCore::GridLength::isFlex):
      (WebCore::GridLength::length):
      (WebCore::GridLength::flex):
      (WebCore::GridLength::setFlex):
      (WebCore::GridLength::operator==):
      * rendering/style/GridTrackSize.h: Replaced Length by GridLength.
      (WebCore::GridTrackSize::length):
      (WebCore::GridTrackSize::setLength):
      (WebCore::GridTrackSize::minTrackBreadth):
      (WebCore::GridTrackSize::maxTrackBreadth):
      (WebCore::GridTrackSize::setMinMax):
      (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth):
      (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth):
      (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth):
      (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth):
      
      LayoutTests:
      
      Added 4 new test cases to test the support for <flex> in CSS Grid
      Layout code. Also updated some of the existing ones to check the
      support for 'fr' units.
      
      * fast/css-grid-layout/flex-and-minmax-content-resolution-columns-expected.txt: Added.
      * fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html: Added.
      * fast/css-grid-layout/flex-and-minmax-content-resolution-rows-expected.txt: Added.
      * fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html: Added.
      * fast/css-grid-layout/flex-content-resolution-columns-expected.txt: Added.
      * fast/css-grid-layout/flex-content-resolution-columns.html: Added.
      * fast/css-grid-layout/flex-content-resolution-rows-expected.txt: Added.
      * fast/css-grid-layout/flex-content-resolution-rows.html: Added.
      * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
      * fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
      * fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
      * fast/css-grid-layout/grid-columns-rows-get-set.html:
      * fast/css-grid-layout/grid-dynamic-updates-relayout-expected.txt:
      * fast/css-grid-layout/grid-dynamic-updates-relayout.html:
      * fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
      * fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dfdaa965
    • commit-queue@webkit.org's avatar
      Broken text rendering when input field has selection. · 075023fa
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122716
      
      Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-14
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      Tests: fast/text/text-rendering-with-input-selection.html.
             fast/text/text-rendering-with-input-selection-expected.html.
      
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paint): Check that text has selection.
      
      LayoutTests:
      
      * fast/text/text-rendering-with-input-selection.html: Added.
      * fast/text/text-rendering-with-input-selection-expected.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      075023fa
    • zalan@apple.com's avatar
      Unexpected word wrapping for wrapped content then raw content. · 41db3c18
      zalan@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121130
      
      Reviewed by Antti Koivisto.
      
      When deciding whether a line is considered empty, we need to check if the current
      object is fully responsible for the currently uncommitted width. It helps differentiating
      <span></span><span>abcd</span> from <span>a</span><span>bcd</span>, where in the first
      case when we hit the second <span> the line is still considered empty, as opposed to the
      second example.
      
      Source/WebCore:
      
      Test: fast/css/unexpected-word-wrapping-with-non-empty-spans.html
      
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::LineBreaker::nextSegmentBreak):
      
      LayoutTests:
      
      * fast/css/unexpected-word-wrapping-with-non-empty-spans-expected.html: Added.
      * fast/css/unexpected-word-wrapping-with-non-empty-spans.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41db3c18