WebKit-https.git
7 years agobmalloc: Fixed a leak in the per-thread cache
ggaren@apple.com [Tue, 8 Apr 2014 00:23:38 +0000 (00:23 +0000)]
bmalloc: Fixed a leak in the per-thread cache
https://bugs.webkit.org/show_bug.cgi?id=131330

Reviewed by Andreas Kling.

Remember to deallocate our line caches upon thread exit.

* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::~Deallocator):

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

7 years agobmalloc: rolled out the tryLock experiment
ggaren@apple.com [Tue, 8 Apr 2014 00:12:16 +0000 (00:12 +0000)]
bmalloc: rolled out the tryLock experiment
https://bugs.webkit.org/show_bug.cgi?id=131328

Reviewed by Andreas Kling.

It wasn't a speedup.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::processSmallAllocatorLog):
(bmalloc::Allocator::processMediumAllocatorLog):
* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):
(bmalloc::Deallocator::deallocateSmallLine):
(bmalloc::Deallocator::deallocateMediumLine):
* bmalloc/Deallocator.h:
(bmalloc::Deallocator::deallocateFastCase):
* bmalloc/Heap.h:
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::deallocateMediumLine):
* bmalloc/Line.h:
(bmalloc::Line<Traits>::deref):
* bmalloc/Page.h:
(bmalloc::Page<Traits>::deref):

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

7 years ago[iOS WebKit2] WKPDFView fades in tiles, PDFs load very flashily
timothy_horton@apple.com [Tue, 8 Apr 2014 00:07:45 +0000 (00:07 +0000)]
[iOS WebKit2] WKPDFView fades in tiles, PDFs load very flashily
https://bugs.webkit.org/show_bug.cgi?id=131325
<rdar://problem/16382960>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewDidScroll:]):
Forward scroll events to the current custom content provider.

* UIProcess/Cocoa/WKWebViewContentProvider.h:
Make content providers UIScrollViewDelegates (though we only forward didScroll for now).

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
(-[WKPDFView web_setMinimumSize:]):
(-[WKPDFView web_setScrollView:]):
(-[WKPDFView scrollViewDidScroll:]):
(-[WKPDFView _revalidateViews]):
(-[WKPDFView _computePageAndDocumentFrames]):
(-[WKPDFView layoutViews]): Deleted.
Keep track of each UIPDFPage, UIPDFPageView, and its frame (in unscaled/document coordinates).
Compute all the rects up front (and re-compute upon rotation, loading, etc.).
When scrolling, find all the pages that intersect the view (inflated by 1.5x in each
vertical direction), and ensure that pages that are inside that rect have
UIPDFPageViews installed, and ones that are outside that rect do not.
Use setUseBackingLayer to ensure that we have a low-resolution layer behind the
tiled layer to avoid flashiness.

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

7 years agoREGRESSION (r163194-r163227): Garbage tiles in overflow of RTL page with
bdakin@apple.com [Tue, 8 Apr 2014 00:04:20 +0000 (00:04 +0000)]
REGRESSION (r163194-r163227): Garbage tiles in overflow of RTL page with
background image
https://bugs.webkit.org/show_bug.cgi?id=131323
-and corresponding-
<rdar://problem/16402013>

Reviewed by Tim Horton.

Returning the TiledBacking::bounds() for the
FrameView::extendedBackgroundRectForPainting() in convenient for ltr pages, but it
is simply incorrect in rtl. There is no easy way to map the rect into the right
coordinate space, so this patch re-works the code to use computations in
RenderView to get the right rect.

Call RenderView::unextendedBackgroundRect() and expand and move it based on the
TiledBacking’s margins.
* page/FrameView.cpp:
(WebCore::FrameView::extendedBackgroundRectForPainting):

The logic that used to be in backgroundRect() has been moved to
unextendedBackgroundRect().
* rendering/RenderView.cpp:
(WebCore::RenderView::unextendedBackgroundRect):
(WebCore::RenderView::backgroundRect):
* rendering/RenderView.h:

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

7 years ago[CSS Shapes] inset complex calc() args vanish in serialized computed style
zoltan@webkit.org [Tue, 8 Apr 2014 00:01:56 +0000 (00:01 +0000)]
[CSS Shapes] inset complex calc() args vanish in serialized computed style
https://bugs.webkit.org/show_bug.cgi?id=129838

Reviewed by Bem Jones-Bey.

Source/WebCore:

We didn't pass the style parameter when setting the width members of CSSBasicShapeInset,
which lead to a 'should never reach asserttion' in CSSPrimitiveValue::init. This patch
adds the missing parameters to the call sites.

Extended existing parsing test script.

* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):

LayoutTests:

* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:

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

7 years agobmalloc
ggaren@apple.com [Mon, 7 Apr 2014 23:54:11 +0000 (23:54 +0000)]
bmalloc
https://bugs.webkit.org/show_bug.cgi?id=131170

Reviewed by Andreas Kling.

Initial commit.

* bmalloc: Added.
* bmalloc.xcodeproj: Added.
* bmalloc.xcodeproj/project.pbxproj: Added.
* bmalloc/Algorithm.h: Added.
(bmalloc::max):
(bmalloc::min):
(bmalloc::mask):
(bmalloc::test):
(bmalloc::roundUpToMultipleOf):
(bmalloc::roundDownToMultipleOf):
(bmalloc::sizeOf):
(bmalloc::bitCount):
(bmalloc::isPowerOfTwo):
* bmalloc/Allocator.cpp: Added.
(bmalloc::Allocator::Allocator):
(bmalloc::Allocator::~Allocator):
(bmalloc::Allocator::log):
(bmalloc::Allocator::processSmallAllocatorLog):
(bmalloc::Allocator::processMediumAllocatorLog):
(bmalloc::Allocator::allocateLarge):
(bmalloc::Allocator::allocateXLarge):
(bmalloc::Allocator::allocateMedium):
(bmalloc::Allocator::allocateSlowCase):
* bmalloc/Allocator.h: Added.
(bmalloc::Allocator::smallAllocatorFor):
(bmalloc::Allocator::allocateFastCase):
(bmalloc::Allocator::allocate):
* bmalloc/AsyncTask.cpp: Added.
(bmalloc::AsyncTask<Function>::runSlowCase):
(bmalloc::AsyncTask<Function>::pthreadEntryPoint):
(bmalloc::AsyncTask<Function>::entryPoint):
* bmalloc/AsyncTask.h: Added.
(bmalloc::Function>::AsyncTask):
(bmalloc::Function>::join):
(bmalloc::Function>::run):
(bmalloc::Function>::runSlowCase):
(bmalloc::Function>::pthreadEntryPoint):
(bmalloc::Function>::entryPoint):
* bmalloc/BAssert.h: Added.
* bmalloc/BeginTag.h: Added.
(bmalloc::BeginTag::isInFreeList):
* bmalloc/BoundaryTag.h: Added.
(bmalloc::BoundaryTag::isXLarge):
(bmalloc::BoundaryTag::setXLarge):
(bmalloc::BoundaryTag::isFree):
(bmalloc::BoundaryTag::setFree):
(bmalloc::BoundaryTag::isEnd):
(bmalloc::BoundaryTag::setEnd):
(bmalloc::BoundaryTag::hasPhysicalPages):
(bmalloc::BoundaryTag::setHasPhysicalPages):
(bmalloc::BoundaryTag::isNull):
(bmalloc::BoundaryTag::clear):
(bmalloc::BoundaryTag::size):
(bmalloc::BoundaryTag::setSize):
(bmalloc::BoundaryTag::prev):
(bmalloc::BoundaryTag::next):
* bmalloc/BoundaryTagInlines.h: Added.
(bmalloc::validate):
(bmalloc::validatePrev):
(bmalloc::validateNext):
(bmalloc::BoundaryTag::init):
(bmalloc::BoundaryTag::mergeLargeLeft):
(bmalloc::BoundaryTag::mergeLargeRight):
(bmalloc::BoundaryTag::mergeLarge):
(bmalloc::BoundaryTag::deallocate):
(bmalloc::BoundaryTag::splitLarge):
(bmalloc::BoundaryTag::allocate):
* bmalloc/Cache.cpp: Added.
(bmalloc::Cache::operator new):
(bmalloc::Cache::operator delete):
(bmalloc::Cache::Cache):
(bmalloc::Cache::allocateSlowCase):
(bmalloc::Cache::allocateSlowCaseNullCache):
(bmalloc::Cache::deallocateSlowCase):
(bmalloc::Cache::deallocateSlowCaseNullCache):
* bmalloc/Cache.h: Added.
(bmalloc::Cache::allocator):
(bmalloc::Cache::deallocator):
(bmalloc::Cache::allocateFastCase):
(bmalloc::Cache::deallocateFastCase):
(bmalloc::Cache::allocate):
(bmalloc::Cache::deallocate):
* bmalloc/Chunk.h: Added.
(bmalloc::Chunk::begin):
(bmalloc::Chunk::end):
(bmalloc::Chunk::lines):
(bmalloc::Chunk::pages):
* bmalloc/Deallocator.cpp: Added.
(bmalloc::Deallocator::Deallocator):
(bmalloc::Deallocator::~Deallocator):
(bmalloc::Deallocator::deallocateLarge):
(bmalloc::Deallocator::deallocateXLarge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):
(bmalloc::Deallocator::deallocateSmallLine):
(bmalloc::Deallocator::allocateSmallLine):
(bmalloc::Deallocator::deallocateMediumLine):
(bmalloc::Deallocator::allocateMediumLine):
* bmalloc/Deallocator.h: Added.
(bmalloc::Deallocator::deallocateFastCase):
(bmalloc::Deallocator::deallocate):
* bmalloc/EndTag.h: Added.
(bmalloc::EndTag::operator=):
* bmalloc/FixedVector.h: Added.
(bmalloc::FixedVector::begin):
(bmalloc::FixedVector::end):
(bmalloc::FixedVector::size):
(bmalloc::FixedVector::capacity):
(bmalloc::FixedVector::clear):
(bmalloc::FixedVector::isEmpty):
(bmalloc::Capacity>::FixedVector):
(bmalloc::Capacity>::operator):
(bmalloc::Capacity>::push):
(bmalloc::Capacity>::pop):
(bmalloc::Capacity>::shrink):
* bmalloc/Heap.cpp: Added.
(bmalloc::sleep):
(bmalloc::Heap::Heap):
(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::scavengeSmallPages):
(bmalloc::Heap::scavengeMediumPages):
(bmalloc::Heap::scavengeLargeRanges):
(bmalloc::Heap::allocateSmallLineSlowCase):
(bmalloc::Heap::allocateMediumLineSlowCase):
(bmalloc::Heap::allocateXLarge):
(bmalloc::Heap::deallocateXLarge):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::deallocateLarge):
* bmalloc/Heap.h: Added.
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::allocateSmallLine):
(bmalloc::Heap::deallocateMediumLine):
(bmalloc::Heap::allocateMediumLine):
* bmalloc/Inline.h: Added.
* bmalloc/LargeChunk.h: Added.
(bmalloc::LargeChunk::begin):
(bmalloc::LargeChunk::end):
(bmalloc::LargeChunk::create):
(bmalloc::LargeChunk::get):
(bmalloc::LargeChunk::beginTag):
(bmalloc::LargeChunk::endTag):
* bmalloc/Line.h: Added.
(bmalloc::Line<Traits>::begin):
(bmalloc::Line<Traits>::end):
(bmalloc::Line<Traits>::concurrentRef):
(bmalloc::Line<Traits>::deref):
* bmalloc/MediumAllocator.h: Added.
(bmalloc::MediumAllocator::isNull):
(bmalloc::MediumAllocator::MediumAllocator):
(bmalloc::MediumAllocator::line):
(bmalloc::MediumAllocator::allocate):
(bmalloc::MediumAllocator::derefCount):
(bmalloc::MediumAllocator::refill):
* bmalloc/MediumChunk.h: Added.
* bmalloc/MediumLine.h: Added.
* bmalloc/MediumPage.h: Added.
* bmalloc/MediumTraits.h: Added.
* bmalloc/Mutex.cpp: Added.
(bmalloc::Mutex::lockSlowCase):
* bmalloc/Mutex.h: Added.
(bmalloc::Mutex::Mutex):
(bmalloc::Mutex::try_lock):
(bmalloc::Mutex::lock):
(bmalloc::Mutex::unlock):
* bmalloc/ObjectType.cpp: Added.
(bmalloc::objectType):
* bmalloc/ObjectType.h: Added.
(bmalloc::isSmallOrMedium):
(bmalloc::isSmall):
* bmalloc/Page.h: Added.
(bmalloc::Page<Traits>::ref):
(bmalloc::Page<Traits>::deref):
(bmalloc::Page<Traits>::refCount):
* bmalloc/PerProcess.h: Added.
(bmalloc::PerProcess::mutex):
(bmalloc::PerProcess<T>::getFastCase):
(bmalloc::PerProcess<T>::get):
(bmalloc::PerProcess<T>::getSlowCase):
* bmalloc/PerThread.h: Added.
(bmalloc::PerThreadStorage<Cache>::get):
(bmalloc::PerThreadStorage<Cache>::init):
(bmalloc::PerThreadStorage::get):
(bmalloc::PerThreadStorage::init):
(bmalloc::PerThread<T>::getFastCase):
(bmalloc::PerThread<T>::get):
(bmalloc::PerThread<T>::destructor):
(bmalloc::PerThread<T>::getSlowCase):
* bmalloc/Range.h: Added.
(bmalloc::Range::Range):
(bmalloc::Range::begin):
(bmalloc::Range::end):
(bmalloc::Range::size):
(bmalloc::Range::operator!):
(bmalloc::Range::operator<):
* bmalloc/SegregatedFreeList.cpp: Added.
(bmalloc::SegregatedFreeList::SegregatedFreeList):
(bmalloc::SegregatedFreeList::insert):
(bmalloc::SegregatedFreeList::takeGreedy):
(bmalloc::SegregatedFreeList::take):
* bmalloc/SegregatedFreeList.h: Added.
* bmalloc/Sizes.h: Added.
* bmalloc/SmallAllocator.h: Added.
(bmalloc::SmallAllocator::isNull):
(bmalloc::SmallAllocator::canAllocate):
(bmalloc::SmallAllocator::SmallAllocator):
(bmalloc::SmallAllocator::line):
(bmalloc::SmallAllocator::allocate):
(bmalloc::SmallAllocator::objectCount):
(bmalloc::SmallAllocator::derefCount):
(bmalloc::SmallAllocator::refill):
* bmalloc/SmallChunk.h: Added.
* bmalloc/SmallLine.h: Added.
* bmalloc/SmallPage.h: Added.
* bmalloc/SmallTraits.h: Added.
* bmalloc/Syscall.h: Added.
* bmalloc/VMAllocate.h: Added.
(bmalloc::vmSize):
(bmalloc::vmValidate):
(bmalloc::vmAllocate):
(bmalloc::vmDeallocate):
(bmalloc::vmDeallocatePhysicalPages):
(bmalloc::vmAllocatePhysicalPages):
(bmalloc::vmDeallocatePhysicalPagesSloppy):
(bmalloc::vmAllocatePhysicalPagesSloppy):
* bmalloc/VMHeap.cpp: Added.
(bmalloc::VMHeap::VMHeap):
(bmalloc::VMHeap::allocateSmallChunk):
(bmalloc::VMHeap::allocateMediumChunk):
(bmalloc::VMHeap::allocateLargeChunk):
* bmalloc/VMHeap.h: Added.
(bmalloc::VMHeap::allocateSmallPage):
(bmalloc::VMHeap::allocateMediumPage):
(bmalloc::VMHeap::allocateLargeRange):
(bmalloc::VMHeap::deallocateSmallPage):
(bmalloc::VMHeap::deallocateMediumPage):
(bmalloc::VMHeap::deallocateLargeRange):
* bmalloc/Vector.h: Added.
(bmalloc::Vector::begin):
(bmalloc::Vector::end):
(bmalloc::Vector::size):
(bmalloc::Vector::capacity):
(bmalloc::Vector::last):
(bmalloc::Vector::pop):
(bmalloc::Vector<T>::Vector):
(bmalloc::Vector<T>::~Vector):
(bmalloc::Vector<T>::operator):
(bmalloc::Vector<T>::push):
(bmalloc::Vector<T>::pop):
(bmalloc::Vector<T>::shrink):
(bmalloc::Vector<T>::reallocateBuffer):
(bmalloc::Vector<T>::shrinkCapacity):
(bmalloc::Vector<T>::growCapacity):
* bmalloc/XLargeChunk.h: Added.
(bmalloc::XLargeChunk::get):
(bmalloc::XLargeChunk::begin):
(bmalloc::XLargeChunk::XLargeChunk):
(bmalloc::XLargeChunk::create):
(bmalloc::XLargeChunk::destroy):
(bmalloc::XLargeChunk::range):
(bmalloc::XLargeChunk::size):
* bmalloc/bmalloc.h: Added.
(bmalloc::api::malloc):
(bmalloc::api::free):
(bmalloc::api::realloc):
* bmalloc/mbmalloc.cpp: Added.

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

7 years ago[iOS] MediaDocument should allow autoplay
eric.carlson@apple.com [Mon, 7 Apr 2014 23:51:08 +0000 (23:51 +0000)]
[iOS] MediaDocument should allow autoplay
https://bugs.webkit.org/show_bug.cgi?id=131301

Reviewed by Jer Noble.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Don't add the RequireUserGestureForRateChange
    behavior restriction when in a MediaDocument.

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

7 years agoWeb Inspector: Hang in debuggable application after receiving WIRPermissionDenied
commit-queue@webkit.org [Mon, 7 Apr 2014 23:45:19 +0000 (23:45 +0000)]
Web Inspector: Hang in debuggable application after receiving WIRPermissionDenied
https://bugs.webkit.org/show_bug.cgi?id=131321

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-07
Reviewed by Mark Rowe.

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::xpcConnectionReceivedMessage):
Avoid attempting to take the same lock twice. Move the received message
lock grab after the WIRPermissionDenied branch, which takes the lock
inside RemoteInspector::stop.

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

7 years agoAdd API::InjectedBundle::FormClient
mitz@apple.com [Mon, 7 Apr 2014 23:00:04 +0000 (23:00 +0000)]
Add API::InjectedBundle::FormClient
https://bugs.webkit.org/show_bug.cgi?id=131317

Reviewed by Anders Carlsson.

* WebKit2.xcodeproj/project.pbxproj: Added reference to new file.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetFormClient):
* WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed to define and
create a FormClient (which derives from API::InjectedBundle::FormClient and messages a
delegate), and set it as the form client.
(didFocusTextField): Deleted.
(willSubmitForm): Deleted.
(setUpFormClient): Deleted.

* WebProcess/InjectedBundle/APIInjectedBundleFormClient.h: Added.
(API::InjectedBundle::FormClient::~FormClient):
(API::InjectedBundle::FormClient::didFocusTextField):
(API::InjectedBundle::FormClient::textFieldDidBeginEditing):
(API::InjectedBundle::FormClient::textFieldDidEndEditing):
(API::InjectedBundle::FormClient::textDidChangeInTextField):
(API::InjectedBundle::FormClient::textDidChangeInTextArea):
(API::InjectedBundle::FormClient::shouldPerformActionInTextField):
(API::InjectedBundle::FormClient::willSubmitForm):
(API::InjectedBundle::FormClient::willSendSubmitEvent):
(API::InjectedBundle::FormClient::didAssociateFormControls):
(API::InjectedBundle::FormClient::shouldNotifyOnFormChanges):

* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::InjectedBundlePageFormClient): Added a constructor
from WKBundlePageFormClientBase.
(WebKit::toWKInputFieldActionType): Added helper to convert from internal enum to C SPI
enum.
(WebKit::InjectedBundlePageFormClient::shouldPerformActionInTextField): Use helper.
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Added inheritance from
API::InjectedBundle::FormClient, marked overrides as such.

* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Removed unused forward
declarations.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::toInputFieldAction): Added helper to convert from C SPI enum to internal enum.
(WebKit::WebEditorClient::doTextFieldCommandFromEvent): Use helper.
(WebKit::WebEditorClient::textWillBeDeletedInTextField): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize m_formClient member.
(WebKit::WebPage::setInjectedBundleFormClient): Added. Updates m_formClient.
(WebKit::WebPage::close): Updated code to clear m_formClient.
(WebKit::WebPage::initializeInjectedBundleFormClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleFormClient): Updated return type.

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

7 years agoMove to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platf...
commit-queue@webkit.org [Mon, 7 Apr 2014 22:21:58 +0000 (22:21 +0000)]
Move to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platform/graphics.
https://bugs.webkit.org/show_bug.cgi?id=131276

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-04-07
Reviewed by Darin Adler.

Source/WebCore:

Replace uses of OwnPtr and PassOwnPtr in code under WebCore/platform/graphics/
opengl, texmap, transforms and efl with std::unique_ptr.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::initializeNewContext):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::create): Deleted.
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):
* platform/graphics/efl/EvasGLContext.h:
* platform/graphics/efl/EvasGLSurface.h:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::create):
(WebCore::GraphicsContext3DPrivate::setContextLostCallback):
* platform/graphics/efl/GraphicsContext3DPrivate.h:
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
(WebCore::Extensions3DOpenGLES::setEXTContextLostCallback):
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GLPlatformContext.cpp:
(WebCore::createOffScreenContext):
(WebCore::GLPlatformContext::createContext):
* platform/graphics/opengl/GLPlatformContext.h:
* platform/graphics/opengl/GLPlatformSurface.cpp:
(WebCore::GLPlatformSurface::createOffScreenSurface):
* platform/graphics/opengl/GLPlatformSurface.h:
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLOffScreenSurface::createOffScreenSurface):
* platform/graphics/surfaces/egl/EGLSurface.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::create):
(WebCore::TextureMapper::TextureMapper):
* platform/graphics/texmap/TextureMapper.h:
(WebCore::TextureMapper::platformCreateAccelerated):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapper::platformCreateAccelerated):
* platform/graphics/texmap/TextureMapperGL.h:
(WebCore::TextureMapperGL::create): Deleted.
* platform/graphics/texmap/TextureMapperImageBuffer.h:
(WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):
(WebCore::TextureMapperImageBuffer::create): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::purgeGLResources):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::operator=):
(WebCore::TransformState::applyTransform):
* platform/graphics/transforms/TransformState.h:
* platform/graphics/win/GraphicsContext3DWin.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):

Source/WebKit/efl:

Replace uses of OwnPtr for TextureMapper in AcceleratedCompositingContextEfl with std::unique_ptr.

* WebCoreSupport/AcceleratedCompositingContextEfl.h:

Source/WebKit/gtk:

Replace uses of OwnPtr for TextureMapper in AcceleratedCompositingContext with std::unique_ptr.

* WebCoreSupport/AcceleratedCompositingContext.h:

Source/WebKit2:

Replace uses of OwnPtr for TextureMapper in LayerTreeHostGtk with std::unique_ptr.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

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

7 years agoMake Mac only parts of TelephoneNumberOverlayController PLATFORM(MAC).
joepeck@webkit.org [Mon, 7 Apr 2014 22:11:16 +0000 (22:11 +0000)]
Make Mac only parts of TelephoneNumberOverlayController PLATFORM(MAC).

Unreviewed build fix for r166881.

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu): Deleted.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::drawRect):
(WebKit::TelephoneNumberOverlayController::mouseEvent):
* WebProcess/WebPage/TelephoneNumberOverlayController.h:
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:

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

7 years agoUnreviewed. Fixing the GTK build.
zandobersek@gmail.com [Mon, 7 Apr 2014 21:55:33 +0000 (21:55 +0000)]
Unreviewed. Fixing the GTK build.

* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Include the Document header from WebCore
to avoid operating on an incomplete type.
* WebProcess/WebPage/TapHighlightController.cpp: Include the RenderElement instead of RenderObject
to make the RenderObject::style() inline accessible.
* WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp: Include the Document header from WebCore

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

7 years ago[iOS WebKit2] Make back-buffers purgeable when possible
timothy_horton@apple.com [Mon, 7 Apr 2014 21:23:03 +0000 (21:23 +0000)]
[iOS WebKit2] Make back-buffers purgeable when possible
https://bugs.webkit.org/show_bug.cgi?id=131213
<rdar://problem/15373906>

Reviewed by Simon Fraser.

We should make back-buffers volatile when their owning
layer falls out of use (either stops being repainted or
is unparented), as they are inherently recreatable.

* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::volatility):
(WebKit::RemoteLayerBackingStore::lastDisplayTime):
Add storage and a getter for the backing store's last paint time.
Add setter/getter for volatility of backing store.
Add RemoteLayerTreeContext param to constructor.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
Inform the RemoteLayerTreeContext when backing store
is created and destroyed. Since we only have a Context in
the Web process, this will only happen there.

(WebKit::RemoteLayerBackingStore::encode):
(WebKit::RemoteLayerBackingStore::decode):
Move some assertions out of #else blocks which are preceded by returns.

(WebKit::RemoteLayerBackingStore::display):
Update the last display time.
If the backing store was volatile, make it non-volatile.

(WebKit::RemoteLayerBackingStore::setVolatility):
Mark the relevant surfaces as volatile or not.
setVolatility:
    - fails and returns false if any surfaces weren't marked
      volatile because they were in use
    - marks the whole backing store for repaint if the front
      surface was purged

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
Make it possible to remove the RemoteLayerBackingStore on layers
that went from drawing contents to not drawing contents.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot):
Adopt the new names from WebCore.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
Clear the backing store if the layer doesn't want to draw contents anymore.

(WebKit::PlatformCALayerRemote::ensureBackingStore):

* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
(WebKit::RemoteLayerTreeContext::backingStoreCollection):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
(WebKit::RemoteLayerTreeContext::backingStoreWasCreated):
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDestroyed):
Keep a RemoteLayerBackingStoreCollection, which just keeps track
of all backing store (even unparented) created for layers in a
particular context. Forward backing store creation/deletion to it.
Remove a unused m_rootLayer member.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
If any layers had backing store changes, start the timer
on the RemoteLayerBackingStoreCollection that will mark them
purgeable once they are no longer needed.

* Shared/mac/RemoteLayerBackingStoreCollection.mm:
* Shared/mac/RemoteLayerBackingStoreCollection.h:
Keep track of all backing store for our context.
When the timer fires, run through the backing store, finding
backing store that was last painted more than 1 second ago,
and mark them purgeable. If there was more recently-painted
backing store, let the timer fire again in another second;
otherwise, stop it.

* WebCore.exp.in:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::markOlderSurfacesPurgeable):
(WebCore::IOSurfacePool::showPoolStatistics):
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::isVolatile):
(IOSurface::setIsVolatile):
Rename purgeability functions to match the system
and reduce confusion between purgeable memory
and volatile vs. non-volatile memory.

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

7 years agoMake it possible to disable some of the FTL's more interesting features
fpizlo@apple.com [Mon, 7 Apr 2014 20:45:58 +0000 (20:45 +0000)]
Make it possible to disable some of the FTL's more interesting features
https://bugs.webkit.org/show_bug.cgi?id=131312

Reviewed by Mark Hahnenberg.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parse):
* runtime/Options.h:

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

7 years agoAnother build fix after r166879.
rniwa@webkit.org [Mon, 7 Apr 2014 20:34:53 +0000 (20:34 +0000)]
Another build fix after r166879.

* WebProcess/WebPage/mac/WebPageMac.mm:

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

7 years agoSplit CSS Selectors pseudo class and pseudo elements
benjamin@webkit.org [Mon, 7 Apr 2014 20:26:44 +0000 (20:26 +0000)]
Split CSS Selectors pseudo class and pseudo elements
https://bugs.webkit.org/show_bug.cgi?id=131295

Reviewed by Andreas Kling.

Split pseudo class and pseudo element to make it clearer what pseudo types
are possible for a given match type.

Pseudo Element types are separated and Pseudo Class are left in place. The Pseudo Class
will have to be renamed too but that will be done separately to make this change smaller.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiersWithElementName):
(WebCore::CSSParser::rewriteSpecifiers):
Use a method isPseudoElementCueFunction() to abstract the #ifdef out of the parser.

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelector):

(WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
Rename to specify this is for the pseudo element cue function, not the pseudo element cue.

(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
(WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::isPseudoElementCueFunction):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
(WebCore::CSSSelector::pseudoId):
(WebCore::CSSSelector::parsePseudoElementType):
(WebCore::CSSSelector::operator==):
* css/CSSSelector.h:
(WebCore::CSSSelector::pseudoType):
(WebCore::CSSSelector::setPseudoElementType):
(WebCore::CSSSelector::pseudoElementType):
(WebCore::CSSSelector::isUnknownPseudoElement):
(WebCore::CSSSelector::isCustomPseudoElement):
(WebCore::pseudoClassIsRelativeToSiblings):
(WebCore::CSSSelector::isSiblingSelector):
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::collectFeaturesFromSelector):
* css/RuleSet.cpp:
(WebCore::determinePropertyWhitelistType):
(WebCore::RuleSet::findBestRuleSetAndAdd):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::checkScrollbarPseudoClass):
(WebCore::SelectorChecker::determineLinkMatchType):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* css/SelectorPseudoElementTypeMap.in:
* css/SelectorPseudoTypeMap.h:
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
* css/makeSelectorPseudoElementsMap.py:
(enumerablePseudoType):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):

* rendering/style/RenderStyleConstants.h:
All the fullscreen pseudo types are pseudo class selectors. They should not have a pseudo ID.

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

7 years agoTried to fix the Mac build.
mitz@apple.com [Mon, 7 Apr 2014 20:20:28 +0000 (20:20 +0000)]
Tried to fix the Mac build.

* WebProcess/Plugins/PDF/PDFPlugin.mm:

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

7 years agoHandle clicks on DataDetectors UI for scanned phone numbers
beidson@apple.com [Mon, 7 Apr 2014 20:05:06 +0000 (20:05 +0000)]
Handle clicks on DataDetectors UI for scanned phone numbers
<rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131309

Reviewed by Tim Horton.

WebContextMenuItemDatas never need to know about a ContextMenu, so remove that concept.
Also add the concept of a selection handler for UIProcess-native menu items.
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::WebContextMenuItemData):
(WebKit::WebContextMenuItemData::encode):
(WebKit::kitItems):
(WebKit::WebContextMenuItemData::decode):
* Shared/WebContextMenuItemData.h:
(WebKit::WebContextMenuItemData::selectionHandler):

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu): Make the decoder argument optional. Make consulting the client optional.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu):

* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSelectionHandlerWrapper initWithSelectionHandler:std::]):
(-[WKSelectionHandlerWrapper executeSelectionHandler]):
(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected): If the represented object is a WKSelectionHandlerWrapper,
  execute the selection handler. Do nothing else.

Instead of getting rects from ranges, creating highlights, and storing those highlights,
work in terms of a TelephoneNumberData object that wraps both a range and a highlight.
This makes it easier to track where the mouse is down and to know what phone number we should act on when clicked.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::rectsForDrawing): Deleted.
* WebProcess/WebPage/TelephoneNumberOverlayController.h:
(WebKit::TelephoneNumberData::create):
(WebKit::TelephoneNumberData::range):
(WebKit::TelephoneNumberData::highlight):
(WebKit::TelephoneNumberData::TelephoneNumberData):
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):
(WebKit::TelephoneNumberOverlayController::handleTelephoneClick): Pass the phone number text and the point to WebPage.
(WebKit::TelephoneNumberOverlayController::mouseEvent):
(WebKit::TelephoneNumberOverlayController::clearMouseDownInformation):
(WebKit::TelephoneNumberOverlayController::clearHighlights):

* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::menuItemsWithUserData):

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleTelephoneNumberClick): Message the phone number and coordinate to the UIProcess.

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

7 years agoWeb Replay: detect possible replay divergence from unexpected DOM event dispatches
burg@cs.washington.edu [Mon, 7 Apr 2014 19:58:07 +0000 (19:58 +0000)]
Web Replay: detect possible replay divergence from unexpected DOM event dispatches
https://bugs.webkit.org/show_bug.cgi?id=131193

Reviewed by Andreas Kling.

Add assertions to catch potential nondeterministic behavior.

The assertion added by this patch catches dispatched DOM events
that are triggered by nondeterministic event loop cycles. If we
did not capture an event loop input in the current event loop
cycle nor are we manually simulating an event loop input during
playback, then DOM events fired during the unordered cycle could
run JavaScript and diverge the execution.

During playback, we can assert that EventLoopInputDispatcher is dispatching
when a DOM event is be dispatched to a document that is being replayed.

During capturing, event loop inputs are captured rather than
dispatched, so we add some accounting to track what caused a DOM
event. To approximate the extent of computation triggered by an
event loop input, we add RAII helpers to call sites where event
loop inputs are captured.

The assertions are disabled by default until the most common
sources of nondeterminism are handled and playback errors are
gracefully surfaced to the user. <https://webkit.org/b/131279>

No new tests. This patch adds extra assertions for debugging purposes.

* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp: Notify ReplayAgent of dispatched DOM event.
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
* inspector/InspectorReplayAgent.cpp: Forward dispatched DOM events to ReplayController.
(WebCore::InspectorReplayAgent::willDispatchEvent): Added.
* inspector/InspectorReplayAgent.h:
* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::CapturingInputCursor):
(WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Added.
* replay/CapturingInputCursor.h:
* replay/EventLoopInput.cpp: Added.
(WebCore::EventLoopInputExtent::EventLoopInputExtent): Added.
(WebCore::EventLoopInputExtent::~EventLoopInputExtent): Added.
* replay/EventLoopInput.h:
* replay/EventLoopInputDispatcher.h:
(WebCore::EventLoopInputDispatcher::isDispatching): Add a getter.
* replay/ReplayController.cpp:
(WebCore::logDispatchedDOMEvent): Added. This is useful for understanding script-visible events.
(WebCore::ReplayController::willDispatchEvent): Added.
* replay/ReplayController.h:
* replay/UserInputBridge.cpp: Add extent helpers to call sites that capture inputs.
(WebCore::UserInputBridge::handleMousePressEvent):
(WebCore::UserInputBridge::handleMouseReleaseEvent):
(WebCore::UserInputBridge::handleMouseMoveEvent):
(WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
(WebCore::UserInputBridge::handleKeyEvent):
(WebCore::UserInputBridge::handleWheelEvent):
(WebCore::UserInputBridge::scrollRecursively):
(WebCore::UserInputBridge::logicalScrollRecursively):

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

7 years agoIntroduce API::InjectedBundle::PageUIClient
mitz@apple.com [Mon, 7 Apr 2014 19:44:06 +0000 (19:44 +0000)]
Introduce API::InjectedBundle::PageUIClient
https://bugs.webkit.org/show_bug.cgi?id=131310

Reviewed by Anders Carlsson.

* WebKit2.xcodeproj/project.pbxproj: Added references to new files.

* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added #include that
became necessary.

* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h: Added.
(API::InjectedBundle::PageUIClient::~PageUIClient):
(API::InjectedBundle::PageUIClient::willAddMessageToConsole):
(API::InjectedBundle::PageUIClient::willSetStatusbarText):
(API::InjectedBundle::PageUIClient::willRunJavaScriptAlert):
(API::InjectedBundle::PageUIClient::willRunJavaScriptConfirm):
(API::InjectedBundle::PageUIClient::willRunJavaScriptPrompt):
(API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):
(API::InjectedBundle::PageUIClient::pageDidScroll):
(API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
(API::InjectedBundle::PageUIClient::generateFileForUpload):
(API::InjectedBundle::PageUIClient::statusBarIsVisible):
(API::InjectedBundle::PageUIClient::menuBarIsVisible):
(API::InjectedBundle::PageUIClient::toolbarsAreVisible):
(API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota):
(API::InjectedBundle::PageUIClient::didExceedDatabaseQuota):
(API::InjectedBundle::PageUIClient::plugInStartLabelTitle):
(API::InjectedBundle::PageUIClient::plugInStartLabelSubtitle):
(API::InjectedBundle::PageUIClient::plugInExtraStyleSheet):
(API::InjectedBundle::PageUIClient::plugInExtraScript):

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetUIClient): Changed to create an InjectedBundlePageUIClient and set it on
the WebPage.

* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::InjectedBundlePageUIClient): Added constructor from
WKBundlePageUIClient.
(WebKit::toUIElementVisibility): Added helper to convert from C SPI enum to internal enum.
(WebKit::InjectedBundlePageUIClient::statusBarIsVisible): Changed to use the above.
(WebKit::InjectedBundlePageUIClient::menuBarIsVisible): Ditto.
(WebKit::InjectedBundlePageUIClient::toolbarsAreVisible): Ditto.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added inheritance from
API::InjectedBundle::PageUIClient, marked overrides as such.

* WebProcess/Storage/StorageAreaMap.cpp: Added #include that became necessary.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::toolbarsVisible): Updated to use new internal enum.
(WebKit::WebChromeClient::statusbarVisible): Ditto.
(WebKit::WebChromeClient::menubarVisible): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialized m_uiClient member.
(WebKit::WebPage::setInjectedBundleUIClient): Added. Updates m_uiClient.
(WebKit::WebPage::close): Updated for change in m_uiClient.
(WebKit::WebPage::pageDidScroll): Ditto.
(WebKit::WebPage::initializeInjectedBundleUIClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleUIClient): Updated return type.

* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Added #include that became
necessary.

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

7 years agoRemove copy of combine-javascript-resources.pl that isn't used anymore
timothy@apple.com [Mon, 7 Apr 2014 19:37:14 +0000 (19:37 +0000)]
Remove copy of combine-javascript-resources.pl that isn't used anymore
https://bugs.webkit.org/show_bug.cgi?id=131307

Reviewed by Joseph Pecoraro.

* WebCore.xcodeproj/project.pbxproj:
* inspector/combine-javascript-resources.pl: Removed.

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

7 years agoMove slow JSRegress tests out of the way so that they don't show up in run-jsc-benchm...
fpizlo@apple.com [Mon, 7 Apr 2014 18:45:22 +0000 (18:45 +0000)]
Move slow JSRegress tests out of the way so that they don't show up in run-jsc-benchmarks runs and also skip tests that are extremely long-running
https://bugs.webkit.org/show_bug.cgi?id=130951

Reviewed by Geoffrey Garen.

Tools:

* Scripts/run-javascriptcore-tests:

LayoutTests:

* js/regress/ArrayBuffer-DataView-alloc-large-long-lived.html:
* js/regress/ArrayBuffer-DataView-alloc-long-lived.html:
* js/regress/ArrayBuffer-Int32Array-byteOffset.html:
* js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt: Removed.
* js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html: Removed.
* js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented-expected.txt: Removed.
* js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented.html: Removed.
* js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived.html:
* js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer.html:
* js/regress/ArrayBuffer-Int8Array-alloc-long-lived.html:
* js/regress/ArrayBuffer-Int8Array-alloc.html:
* js/regress/DataView-custom-properties.html:
* js/regress/Float32Array-matrix-mult.html:
* js/regress/Float32Array-to-Float64Array-set.html:
* js/regress/Float64Array-alloc-long-lived.html:
* js/regress/Float64Array-to-Int16Array-set.html:
* js/regress/HashMap-put-get-iterate-keys.html:
* js/regress/HashMap-put-get-iterate.html:
* js/regress/HashMap-string-put-get-iterate.html:
* js/regress/Int16Array-alloc-long-lived.html:
* js/regress/Int16Array-bubble-sort-with-byteLength.html:
* js/regress/Int16Array-bubble-sort.html:
* js/regress/Int16Array-load-int-mul.html:
* js/regress/Int16Array-to-Int32Array-set.html:
* js/regress/Int32Array-Int8Array-view-alloc.html:
* js/regress/Int32Array-alloc-huge-expected.txt: Removed.
* js/regress/Int32Array-alloc-huge-long-lived-expected.txt: Removed.
* js/regress/Int32Array-alloc-huge-long-lived.html: Removed.
* js/regress/Int32Array-alloc-huge.html: Removed.
* js/regress/Int32Array-alloc-large-long-lived-expected.txt: Removed.
* js/regress/Int32Array-alloc-large-long-lived.html: Removed.
* js/regress/Int32Array-alloc-large.html:
* js/regress/Int32Array-alloc-long-lived.html:
* js/regress/Int32Array-alloc.html:
* js/regress/Int8Array-alloc-long-lived.html:
* js/regress/Int8Array-load-with-byteLength.html:
* js/regress/Int8Array-load.html:
* js/regress/adapt-to-double-divide.html:
* js/regress/aliased-arguments-getbyval.html:
* js/regress/allocate-big-object.html:
* js/regress/arity-mismatch-inlining.html:
* js/regress/array-access-polymorphic-structure.html:
* js/regress/array-nonarray-polymorhpic-access.html:
* js/regress/array-nonarray-polymorphic-access.html:
* js/regress/array-prototype-every.html:
* js/regress/array-prototype-filter-expected.txt: Removed.
* js/regress/array-prototype-filter.html: Removed.
* js/regress/array-prototype-forEach.html:
* js/regress/array-prototype-map.html:
* js/regress/array-prototype-some.html:
* js/regress/array-with-double-add.html:
* js/regress/array-with-double-increment.html:
* js/regress/array-with-double-mul-add.html:
* js/regress/array-with-double-sum.html:
* js/regress/array-with-int32-add-sub.html:
* js/regress/array-with-int32-or-double-sum.html:
* js/regress/asmjs_bool_bug.html:
* js/regress/assign-custom-setter-polymorphic.html:
* js/regress/assign-custom-setter.html:
* js/regress/basic-set.html:
* js/regress/big-int-mul.html:
* js/regress/boolean-test.html:
* js/regress/branch-fold.html:
* js/regress/by-val-generic.html:
* js/regress/call-spread-apply.html:
* js/regress/call-spread-call.html:
* js/regress/call-spread-expected.txt: Removed.
* js/regress/call-spread.html: Removed.
* js/regress/captured-assignments.html:
* js/regress/cast-int-to-double.html:
* js/regress/cell-argument.html:
* js/regress/cfg-simplify.html:
* js/regress/chain-custom-getter-expected.txt: Removed.
* js/regress/chain-custom-getter.html: Removed.
* js/regress/chain-getter-access.html:
* js/regress/cmpeq-obj-to-obj-other.html:
* js/regress/constant-test.html:
* js/regress/delay-tear-off-arguments-strictmode.html:
* js/regress/destructuring-arguments-length-expected.txt: Removed.
* js/regress/destructuring-arguments-length.html: Removed.
* js/regress/destructuring-arguments.html:
* js/regress/destructuring-swap.html:
* js/regress/direct-arguments-getbyval.html:
* js/regress/double-get-by-val-out-of-bounds.html:
* js/regress/double-pollution-getbyval.html:
* js/regress/double-pollution-putbyoffset.html:
* js/regress/double-to-int32-typed-array-no-inline.html:
* js/regress/double-to-int32-typed-array.html:
* js/regress/double-to-uint32-typed-array-no-inline.html:
* js/regress/double-to-uint32-typed-array.html:
* js/regress/empty-string-plus-int.html:
* js/regress/emscripten-cube2hash.html:
* js/regress/emscripten-memops-expected.txt: Removed.
* js/regress/emscripten-memops.html: Removed.
* js/regress/external-arguments-getbyval.html:
* js/regress/external-arguments-putbyval.html:
* js/regress/fixed-typed-array-storage-var-index.html:
* js/regress/fixed-typed-array-storage.html:
* js/regress/fold-double-to-int.html:
* js/regress/fold-strict-eq-expected.txt: Removed.
* js/regress/fold-strict-eq.html: Removed.
* js/regress/for-of-iterate-array-entries.html:
* js/regress/for-of-iterate-array-keys.html:
* js/regress/for-of-iterate-array-values.html:
* js/regress/function-dot-apply.html:
* js/regress/function-test.html:
* js/regress/function-with-eval.html:
* js/regress/get-by-id-chain-from-try-block.html:
* js/regress/get-by-id-proto-or-self.html:
* js/regress/get-by-id-self-or-proto.html:
* js/regress/get-by-val-out-of-bounds.html:
* js/regress/get_callee_monomorphic.html:
* js/regress/get_callee_polymorphic.html:
* js/regress/getter.html:
* js/regress/global-var-const-infer-fire-from-opt.html:
* js/regress/global-var-const-infer.html:
* js/regress/imul-double-only.html:
* js/regress/imul-int-only.html:
* js/regress/imul-mixed.html:
* js/regress/in-four-cases.html:
* js/regress/in-one-case-false.html:
* js/regress/in-one-case-true.html:
* js/regress/in-two-cases.html:
* js/regress/indexed-properties-in-objects.html:
* js/regress/infer-closure-const-then-mov-no-inline.html:
* js/regress/infer-closure-const-then-mov.html:
* js/regress/infer-closure-const-then-put-to-scope-no-inline.html:
* js/regress/infer-closure-const-then-put-to-scope.html:
* js/regress/infer-closure-const-then-reenter-no-inline.html:
* js/regress/infer-closure-const-then-reenter.html:
* js/regress/infer-one-time-closure-ten-vars.html:
* js/regress/infer-one-time-closure-two-vars.html:
* js/regress/infer-one-time-closure.html:
* js/regress/infer-one-time-deep-closure.html:
* js/regress/inline-arguments-access.html:
* js/regress/inline-arguments-aliased-access.html:
* js/regress/inline-arguments-local-escape.html:
* js/regress/inline-get-scoped-var.html:
* js/regress/inlined-put-by-id-transition.html:
* js/regress/int-or-other-abs-then-get-by-val.html:
* js/regress/int-or-other-abs-zero-then-get-by-val.html:
* js/regress/int-or-other-add-then-get-by-val.html:
* js/regress/int-or-other-add.html:
* js/regress/int-or-other-div-then-get-by-val.html:
* js/regress/int-or-other-max-then-get-by-val.html:
* js/regress/int-or-other-min-then-get-by-val.html:
* js/regress/int-or-other-mod-then-get-by-val.html:
* js/regress/int-or-other-mul-then-get-by-val.html:
* js/regress/int-or-other-neg-then-get-by-val.html:
* js/regress/int-or-other-neg-zero-then-get-by-val.html:
* js/regress/int-or-other-sub-then-get-by-val.html:
* js/regress/int-or-other-sub.html:
* js/regress/int-overflow-local.html:
* js/regress/int52-spill.html:
* js/regress/integer-divide.html:
* js/regress/integer-modulo.html:
* js/regress/large-int-captured.html:
* js/regress/large-int-neg.html:
* js/regress/large-int.html:
* js/regress/logical-not.html:
* js/regress/lots-of-fields.html:
* js/regress/make-indexed-storage.html:
* js/regress/make-rope-cse.html:
* js/regress/marsaglia-expected.txt: Removed.
* js/regress/marsaglia-larger-ints.html:
* js/regress/marsaglia-osr-entry.html:
* js/regress/marsaglia.html: Removed.
* js/regress/method-on-number.html:
* js/regress/misc-strict-eq.html:
* js/regress/negative-zero-divide.html:
* js/regress/negative-zero-modulo.html:
* js/regress/negative-zero-negate.html:
* js/regress/nested-function-parsing-random-expected.txt: Removed.
* js/regress/nested-function-parsing-random.html: Removed.
* js/regress/nested-function-parsing.html:
* js/regress/new-array-buffer-dead.html:
* js/regress/new-array-buffer-push.html:
* js/regress/new-array-dead.html:
* js/regress/new-array-push.html:
* js/regress/new-spread-expected.txt: Removed.
* js/regress/new-spread.html: Removed.
* js/regress/number-test.html:
* js/regress/object-closure-call.html:
* js/regress/object-test.html:
* js/regress/poly-stricteq.html:
* js/regress/polymorphic-get-by-id.html:
* js/regress/polymorphic-put-by-id.html:
* js/regress/polymorphic-structure.html:
* js/regress/polyvariant-monomorphic-get-by-id.html:
* js/regress/proto-custom-getter-expected.txt: Removed.
* js/regress/proto-custom-getter.html: Removed.
* js/regress/proto-getter-access.html:
* js/regress/put-by-id.html:
* js/regress/put-by-val-large-index-blank-indexing-type.html:
* js/regress/put-by-val-machine-int.html:
* js/regress/rare-osr-exit-on-local.html:
* js/regress/register-pressure-from-osr.html:
* js/regress/resources/regress-post.js: Removed.
* js/regress/resources/regress-pre.js: Removed.
* js/regress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js: Removed.
* js/regress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented.js: Removed.
* js/regress/script-tests/Int32Array-alloc-huge-long-lived.js: Removed.
* js/regress/script-tests/Int32Array-alloc-huge.js: Removed.
* js/regress/script-tests/Int32Array-alloc-large-long-lived.js: Removed.
* js/regress/script-tests/array-prototype-filter.js: Removed.
* js/regress/script-tests/call-spread.js: Removed.
* js/regress/script-tests/chain-custom-getter.js: Removed.
* js/regress/script-tests/destructuring-arguments-length.js: Removed.
* js/regress/script-tests/emscripten-memops.js: Removed.
* js/regress/script-tests/fold-strict-eq.js: Removed.
* js/regress/script-tests/marsaglia.js: Removed.
* js/regress/script-tests/nested-function-parsing-random.js: Removed.
* js/regress/script-tests/new-spread.js: Removed.
* js/regress/script-tests/proto-custom-getter.js: Removed.
* js/regress/script-tests/simple-custom-getter.js: Removed.
* js/regress/script-tests/variadic-closure-call.js: Removed.
* js/regress/simple-activation-demo.html:
* js/regress/simple-custom-getter-expected.txt: Removed.
* js/regress/simple-custom-getter.html: Removed.
* js/regress/simple-getter-access.html:
* js/regress/slow-array-profile-convergence.html:
* js/regress/slow-convergence.html:
* js/regress/sparse-conditional.html:
* js/regress/splice-to-remove.html:
* js/regress/string-char-code-at.html:
* js/regress/string-concat-object.html:
* js/regress/string-concat-pair-object.html:
* js/regress/string-concat-pair-simple.html:
* js/regress/string-concat-simple.html:
* js/regress/string-cons-repeat.html:
* js/regress/string-cons-tower.html:
* js/regress/string-equality.html:
* js/regress/string-get-by-val-big-char.html:
* js/regress/string-get-by-val-out-of-bounds-insane.html:
* js/regress/string-get-by-val-out-of-bounds.html:
* js/regress/string-get-by-val.html:
* js/regress/string-hash.html:
* js/regress/string-long-ident-equality.html:
* js/regress/string-repeat-arith.html:
* js/regress/string-sub.html:
* js/regress/string-test.html:
* js/regress/string-var-equality.html:
* js/regress/structure-hoist-over-transitions.html:
* js/regress/switch-char-constant.html:
* js/regress/switch-char.html:
* js/regress/switch-constant.html:
* js/regress/switch-string-basic-big-var.html:
* js/regress/switch-string-basic-big.html:
* js/regress/switch-string-basic-var.html:
* js/regress/switch-string-basic.html:
* js/regress/switch-string-big-length-tower-var.html:
* js/regress/switch-string-length-tower-var.html:
* js/regress/switch-string-length-tower.html:
* js/regress/switch-string-short.html:
* js/regress/switch.html:
* js/regress/tear-off-arguments-simple.html:
* js/regress/tear-off-arguments.html:
* js/regress/temporal-structure.html:
* js/regress/to-int32-boolean.html:
* js/regress/undefined-test.html:
* js/regress/unprofiled-licm.html:
* js/regress/variadic-closure-call-expected.txt: Removed.
* js/regress/variadic-closure-call.html: Removed.
* js/regress/weird-inlining-const-prop.html:
* js/slow-stress: Added.
* js/slow-stress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt: Copied from LayoutTests/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt.
* js/slow-stress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html: Copied from LayoutTests/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html.
* js/slow-stress/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented-expected.txt: Copied from LayoutTests/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented-expected.txt.
* js/slow-stress/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented.html: Copied from LayoutTests/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented.html.
* js/slow-stress/Int32Array-alloc-huge-expected.txt: Copied from LayoutTests/js/regress/Int32Array-alloc-huge-expected.txt.
* js/slow-stress/Int32Array-alloc-huge-long-lived-expected.txt: Copied from LayoutTests/js/regress/Int32Array-alloc-huge-long-lived-expected.txt.
* js/slow-stress/Int32Array-alloc-huge-long-lived.html: Copied from LayoutTests/js/regress/Int32Array-alloc-huge-long-lived.html.
* js/slow-stress/Int32Array-alloc-huge.html: Copied from LayoutTests/js/regress/Int32Array-alloc-huge.html.
* js/slow-stress/Int32Array-alloc-large-long-lived-expected.txt: Copied from LayoutTests/js/regress/Int32Array-alloc-large-long-lived-expected.txt.
* js/slow-stress/Int32Array-alloc-large-long-lived.html: Copied from LayoutTests/js/regress/Int32Array-alloc-large-long-lived.html.
* js/slow-stress/array-prototype-filter-expected.txt: Copied from LayoutTests/js/regress/array-prototype-filter-expected.txt.
* js/slow-stress/array-prototype-filter.html: Copied from LayoutTests/js/regress/array-prototype-filter.html.
* js/slow-stress/call-spread-expected.txt: Copied from LayoutTests/js/regress/call-spread-expected.txt.
* js/slow-stress/call-spread.html: Copied from LayoutTests/js/regress/call-spread.html.
* js/slow-stress/chain-custom-getter-expected.txt: Copied from LayoutTests/js/regress/chain-custom-getter-expected.txt.
* js/slow-stress/chain-custom-getter.html: Copied from LayoutTests/js/regress/chain-custom-getter.html.
* js/slow-stress/destructuring-arguments-length-expected.txt: Copied from LayoutTests/js/regress/destructuring-arguments-length-expected.txt.
* js/slow-stress/destructuring-arguments-length.html: Copied from LayoutTests/js/regress/destructuring-arguments-length.html.
* js/slow-stress/emscripten-memops-expected.txt: Copied from LayoutTests/js/regress/emscripten-memops-expected.txt.
* js/slow-stress/emscripten-memops.html: Copied from LayoutTests/js/regress/emscripten-memops.html.
* js/slow-stress/fold-strict-eq-expected.txt: Copied from LayoutTests/js/regress/fold-strict-eq-expected.txt.
* js/slow-stress/fold-strict-eq.html: Copied from LayoutTests/js/regress/fold-strict-eq.html.
* js/slow-stress/marsaglia-expected.txt: Copied from LayoutTests/js/regress/marsaglia-expected.txt.
* js/slow-stress/marsaglia.html: Copied from LayoutTests/js/regress/marsaglia.html.
* js/slow-stress/nested-function-parsing-random-expected.txt: Copied from LayoutTests/js/regress/nested-function-parsing-random-expected.txt.
* js/slow-stress/nested-function-parsing-random.html: Copied from LayoutTests/js/regress/nested-function-parsing-random.html.
* js/slow-stress/new-spread-expected.txt: Copied from LayoutTests/js/regress/new-spread-expected.txt.
* js/slow-stress/new-spread.html: Copied from LayoutTests/js/regress/new-spread.html.
* js/slow-stress/proto-custom-getter-expected.txt: Copied from LayoutTests/js/regress/proto-custom-getter-expected.txt.
* js/slow-stress/proto-custom-getter.html: Copied from LayoutTests/js/regress/proto-custom-getter.html.
* js/slow-stress/script-tests: Added.
* js/slow-stress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js: Copied from LayoutTests/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js.
* js/slow-stress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented.js: Copied from LayoutTests/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived-fragmented.js.
* js/slow-stress/script-tests/Int32Array-alloc-huge-long-lived.js: Copied from LayoutTests/js/regress/script-tests/Int32Array-alloc-huge-long-lived.js.
* js/slow-stress/script-tests/Int32Array-alloc-huge.js: Copied from LayoutTests/js/regress/script-tests/Int32Array-alloc-huge.js.
* js/slow-stress/script-tests/Int32Array-alloc-large-long-lived.js: Copied from LayoutTests/js/regress/script-tests/Int32Array-alloc-large-long-lived.js.
* js/slow-stress/script-tests/array-prototype-filter.js: Copied from LayoutTests/js/regress/script-tests/array-prototype-filter.js.
* js/slow-stress/script-tests/call-spread.js: Copied from LayoutTests/js/regress/script-tests/call-spread.js.
* js/slow-stress/script-tests/chain-custom-getter.js: Copied from LayoutTests/js/regress/script-tests/chain-custom-getter.js.
* js/slow-stress/script-tests/destructuring-arguments-length.js: Copied from LayoutTests/js/regress/script-tests/destructuring-arguments-length.js.
* js/slow-stress/script-tests/emscripten-memops.js: Copied from LayoutTests/js/regress/script-tests/emscripten-memops.js.
* js/slow-stress/script-tests/fold-strict-eq.js: Copied from LayoutTests/js/regress/script-tests/fold-strict-eq.js.
* js/slow-stress/script-tests/marsaglia.js: Copied from LayoutTests/js/regress/script-tests/marsaglia.js.
* js/slow-stress/script-tests/nested-function-parsing-random.js: Copied from LayoutTests/js/regress/script-tests/nested-function-parsing-random.js.
* js/slow-stress/script-tests/new-spread.js: Copied from LayoutTests/js/regress/script-tests/new-spread.js.
* js/slow-stress/script-tests/proto-custom-getter.js: Copied from LayoutTests/js/regress/script-tests/proto-custom-getter.js.
* js/slow-stress/script-tests/simple-custom-getter.js: Copied from LayoutTests/js/regress/script-tests/simple-custom-getter.js.
* js/slow-stress/script-tests/variadic-closure-call.js: Copied from LayoutTests/js/regress/script-tests/variadic-closure-call.js.
* js/slow-stress/simple-custom-getter-expected.txt: Copied from LayoutTests/js/regress/simple-custom-getter-expected.txt.
* js/slow-stress/simple-custom-getter.html: Copied from LayoutTests/js/regress/simple-custom-getter.html.
* js/slow-stress/variadic-closure-call-expected.txt: Copied from LayoutTests/js/regress/variadic-closure-call-expected.txt.
* js/slow-stress/variadic-closure-call.html: Copied from LayoutTests/js/regress/variadic-closure-call.html.
* resources/regress-post.js: Copied from LayoutTests/js/regress/resources/regress-post.js.
* resources/regress-pre.js: Copied from LayoutTests/js/regress/resources/regress-pre.js.

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

7 years agoDate object needs to check for ES5 15.9.1.14 TimeClip limit.
mark.lam@apple.com [Mon, 7 Apr 2014 18:24:31 +0000 (18:24 +0000)]
Date object needs to check for ES5 15.9.1.14 TimeClip limit.
<https://webkit.org/b/131248>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

The current Date object code does not adequately check for the ES5
15.9.1.14 TimeClip limit.  As a result, some calculations can underflow
/ overflow and produce unexpected results.

For example, we were getting an assertion failure in
WTF::equivalentYearForDST() due int underflows in this function, which
in turn were due to an int overflow in WTF::msToYear().

This patch adds the needed checks, and adds some assertions to ensure
that the used values are sane.

The changes have no noticeable impact on benchmark results.

* runtime/DateConstructor.cpp:
(JSC::callDate):
* runtime/JSDateMath.cpp:
(JSC::localTimeOffset):
(JSC::gregorianDateTimeToMS):
(JSC::msToGregorianDateTime):
(JSC::parseDateFromNullTerminatedCharacters):
(JSC::parseDate):
* runtime/JSDateMath.h:
- parseDateFromNullTerminatedCharacters() does not need to be public.
  Made it a static function.
* runtime/VM.cpp:
(JSC::VM::resetDateCache):
- Changed cachedDateStringValue to use std::numeric_limits<double>::quiet_NaN()
  to be consistent with other Date code.

Source/WTF:

* wtf/DateMath.cpp:
- Moved the definition of maxECMAScriptTime to the .h file so that we
  can use it in other files as well.
(WTF::msToYear):
- Removed a stale comment for parseDateFromNullTerminatedCharacters().
* wtf/DateMath.h:

LayoutTests:

* js/regress-131248-expected.txt: Added.
* js/regress-131248.html: Added.
* js/script-tests/regress-131248.js: Added.
(testDateFromSetDateAdjustement):
(testDateFromSetTimeWithMilliseconds):
(testDateFromString):

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

7 years agoUnreviewed gardening for GTK.
svillar@igalia.com [Mon, 7 Apr 2014 17:33:16 +0000 (17:33 +0000)]
Unreviewed gardening for GTK.

Removed tests that have been actually passing in both release and
debug bots for some time.

* platform/gtk-wk2/TestExpectations:
* platform/gtk/TestExpectations:

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

7 years ago[CSS Shapes] Clean up invalid FIXME
zoltan@webkit.org [Mon, 7 Apr 2014 17:15:31 +0000 (17:15 +0000)]
[CSS Shapes] Clean up invalid FIXME
https://bugs.webkit.org/show_bug.cgi?id=131304

Reviewed by Andreas Kling.

No new tests, no behavior change.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):

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

7 years agoUnreviewed update of GTK expectations.
svillar@igalia.com [Mon, 7 Apr 2014 16:30:53 +0000 (16:30 +0000)]
Unreviewed update of GTK expectations.

Canvas composite tests with alpha are not working.

* platform/gtk/TestExpectations:

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

7 years ago[EFL] Turn on ENABLE_MEDIA_CONTROLS_SCRIPT
ryuan.choi@samsung.com [Mon, 7 Apr 2014 12:34:25 +0000 (12:34 +0000)]
[EFL] Turn on ENABLE_MEDIA_CONTROLS_SCRIPT
https://bugs.webkit.org/show_bug.cgi?id=131257

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Enable MEDIA_CONTROLS_SCRIPT

Source/WebCore:

no new tests. just rebased exisiting tests.

* PlatformEfl.cmake: Added the media controls script associated files.
* css/mediaControlsEfl.css: Removed.
* css/mediaControlsEflFullscreen.css: Removed.
* platform/efl/DefaultTheme/CMakeLists.txt:
* platform/efl/DefaultTheme/default.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mutebutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/unmutebutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/pausebutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playbutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption_disabled.png: Removed.
* platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc: Removed.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::toEdjeGroup):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::adjustSliderThumbSize):
(WebCore::RenderThemeEfl::mediaControlsStyleSheet): Modified to load bundle style sheet.
(WebCore::RenderThemeEfl::mediaControlsScript): Added to load bundle scripts.
(WebCore::RenderThemeEfl::emitMediaButtonSignal): Deleted.
(WebCore::RenderThemeEfl::extraMediaControlsStyleSheet): Deleted.
(WebCore::RenderThemeEfl::extraFullScreenStyleSheet): Deleted.
(WebCore::RenderThemeEfl::formatMediaControlsCurrentTime): Deleted.
(WebCore::RenderThemeEfl::hasOwnDisabledStateHandlingFor): Deleted.
(WebCore::RenderThemeEfl::paintMediaFullscreenButton): Deleted.
(WebCore::RenderThemeEfl::paintMediaMuteButton): Deleted.
(WebCore::RenderThemeEfl::paintMediaPlayButton): Deleted.
(WebCore::RenderThemeEfl::paintMediaSeekBackButton): Deleted.
(WebCore::RenderThemeEfl::paintMediaSeekForwardButton): Deleted.
(WebCore::RenderThemeEfl::paintMediaSliderTrack): Deleted.
(WebCore::RenderThemeEfl::paintMediaSliderThumb): Deleted.
(WebCore::RenderThemeEfl::paintMediaVolumeSliderContainer): Deleted.
(WebCore::RenderThemeEfl::paintMediaVolumeSliderTrack): Deleted.
(WebCore::RenderThemeEfl::paintMediaVolumeSliderThumb): Deleted.
(WebCore::RenderThemeEfl::paintMediaCurrentTime): Deleted.
(WebCore::RenderThemeEfl::supportsClosedCaptioning): Deleted.
(WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton): Deleted.
* platform/efl/RenderThemeEfl.h:

LayoutTests:

Rebased tests.

* platform/efl/TestExpectations:
* platform/efl/media/audio-controls-rendering-expected.png:
* platform/efl/media/audio-controls-rendering-expected.txt:
* platform/efl/media/controls-after-reload-expected.png:
* platform/efl/media/controls-after-reload-expected.txt:
* platform/efl/media/controls-strict-expected.png:
* platform/efl/media/controls-strict-expected.txt:
* platform/efl/media/controls-styling-expected.png:
* platform/efl/media/controls-styling-expected.txt:
* platform/efl/media/controls-without-preload-expected.png:
* platform/efl/media/controls-without-preload-expected.txt:

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

7 years agoUnreviewed gardening.
svillar@igalia.com [Mon, 7 Apr 2014 09:14:40 +0000 (09:14 +0000)]
Unreviewed gardening.

Updated expectations for GTK. Added some more failing AX tests.

* platform/gtk-wk2/TestExpectations:

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

7 years agoCSS JIT: change the node flags directly instead of using function calls when possible
benjamin@webkit.org [Mon, 7 Apr 2014 08:52:45 +0000 (08:52 +0000)]
CSS JIT: change the node flags directly instead of using function calls when possible
https://bugs.webkit.org/show_bug.cgi?id=131292

Reviewed by Andreas Kling.

For historical reasons, changing the node flags was always done with function calls.
This patch changes those calls to modify the nodes directly.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::setNodeFlag):
(WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
(WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByLastChildRules): Deleted.
(WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByFirstChildAndLastChildRules): Deleted.
* dom/Element.cpp:
(WebCore::Element::setChildrenAffectedByFirstChildRules): Deleted.
(WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
* dom/Element.h:
* dom/Node.h:
(WebCore::Node::flagChildrenAffectedByFirstChildRulesFlag):
(WebCore::Node::flagChildrenAffectedByLastChildRulesFlag):
(WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag):

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

7 years agoRemove unused header from PlatformSpeechSynthesizer.h
k.czech@samsung.com [Mon, 7 Apr 2014 08:18:36 +0000 (08:18 +0000)]
Remove unused header from PlatformSpeechSynthesizer.h
https://bugs.webkit.org/show_bug.cgi?id=131103

Reviewed by Anders Carlsson.

Since WebSpeech has switched to use std::unique_ptr, we do not need to include PassOwnPtr.

No new tests. No behaviour change, just quick fix.

* platform/PlatformSpeechSynthesizer.h:

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

7 years agoUnreviewed gardening.
svillar@igalia.com [Mon, 7 Apr 2014 07:55:22 +0000 (07:55 +0000)]
Unreviewed gardening.

Updated expectations for GTK. Added some failing AX tests.

* platform/gtk-wk2/TestExpectations:

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

7 years ago[CSSRegions] Use RenderRegion::isValid() before using a region
mihnea@adobe.com [Mon, 7 Apr 2014 06:38:03 +0000 (06:38 +0000)]
[CSSRegions] Use RenderRegion::isValid() before using a region
https://bugs.webkit.org/show_bug.cgi?id=131232

Reviewed by Andreas Kling.

Source/WebCore:

RenderRegion method isValid() should be used to test whether a region
is good to use instead of a mix between isValid() and flowThread().
When the region is designed to fragment content from a parent flow thread,
the m_flowThread is not nullified anymore, thus ensuring the same treatment for all invalid
regions.
Covered by existing regions tests.

* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::pageLogicalHeight):
(WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::getRanges):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::positionForPoint):
(WebCore::RenderRegion::pageLogicalWidth):
(WebCore::RenderRegion::pageLogicalHeight):
(WebCore::RenderRegion::styleDidChange):
(WebCore::RenderRegion::installFlowThread):
(WebCore::RenderRegion::attachRegion):
(WebCore::RenderRegion::detachRegion):
(WebCore::RenderRegion::ensureOverflowForBox):
(WebCore::RenderRegion::renderBoxRegionInfo):

LayoutTests:

Adjust test expectation now that an invalid region is not unnecessary repainted.

* fast/regions/repaint/invalid-region-repaint-crash-expected.txt:

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

7 years ago[EFL][WK1] Apply std::unique_ptr<> to NavigatorContentUtilsClientEfl
gyuyoung.kim@samsung.com [Mon, 7 Apr 2014 05:24:42 +0000 (05:24 +0000)]
[EFL][WK1] Apply std::unique_ptr<> to NavigatorContentUtilsClientEfl
https://bugs.webkit.org/show_bug.cgi?id=130958

Reviewed by Darin Adler.

As a step of replacing OwnPtr with std::unique_ptr, this patch replaces
OwnPtr with the std::unique_ptr for NavigatorContentUtilsClientEfl.

* WebCoreSupport/NavigatorContentUtilsClientEfl.cpp:
(WebCore::NavigatorContentUtilsClientEfl::create): Deleted.
* WebCoreSupport/NavigatorContentUtilsClientEfl.h:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

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

7 years agoFix the debug bots after r166863
benjamin@webkit.org [Mon, 7 Apr 2014 05:07:52 +0000 (05:07 +0000)]
Fix the debug bots after r166863

* css/PageRuleCollector.cpp:
(WebCore::checkPageSelectorComponents): I forgot to update one call site for PagePseudoClass.

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

7 years agoMake some bindings improvements, with smaller code size for error message generation
darin@apple.com [Mon, 7 Apr 2014 03:43:40 +0000 (03:43 +0000)]
Make some bindings improvements, with smaller code size for error message generation
https://bugs.webkit.org/show_bug.cgi?id=131285

Reviewed by Andreas Kling.

Source/WebCore:

* WebCore.exp.in: Updated to remove old and add new functions, for use by the Internals
JavaScript bindings.

* bindings/js/JSDOMBinding.cpp:
(WebCore::makeDOMBindingsTypeErrorStringInternal): Deleted.
(WebCore::throwTypeError): Added. Helper to avoid repeating throwVMError/createTypeError.
(WebCore::appendArgumentMustBe): Added. Helper for building up argument error strings.
(WebCore::reportDeprecatedGetterError): Added. For bindings to use.
(WebCore::throwArgumentMustBeEnumError): Ditto.
(WebCore::throwArgumentMustBeFunctionError): Ditto.
(WebCore::throwArgumentTypeError): Ditto.
(WebCore::throwArrayElementTypeError): Ditto.
(WebCore::throwAttributeTypeError): Ditto.
(WebCore::throwConstructorDocumentUnavailableError): Ditto.
(WebCore::throwGetterTypeError): Ditto.
(WebCore::throwSequenceTypeError): Ditto.
(WebCore::throwSetterTypeError): Ditto.
(WebCore::throwThisTypeError): Ditto.

* bindings/js/JSDOMBinding.h: Added declarations for new functions. Removed forward
declarations for things not used in this file. Use nullptr instead of 0. Format
templates consistently. Use a better for loop in the jsArray function. Removed
unused HasMemoryCostMemberFunction, makeDOMBindingsTypeErrorString, and
makeDOMBindingsTypeErrorStringInternal.

* bindings/js/JSNavigatorCustom.cpp: Fixed a hand-written binding that was using
makeDOMBindingsTypeErrorString to make a string.

* bindings/js/ScriptController.h: Updated forward declarations.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Cut down on use of UNUSED_PARAM. Use the new functions
for errors, keeping the code in the generated file to a minimum.
(GenerateParametersCheck): Ditto.
(GenerateConstructorDefinition): Ditto.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
Updated expected results for changes above.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Updated for
changes in JavaScript binding functions.

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

7 years agoMove the PseudoPageClass types out of the pseudo element/class mix
benjamin@webkit.org [Mon, 7 Apr 2014 02:28:54 +0000 (02:28 +0000)]
Move the PseudoPageClass types out of the pseudo element/class mix
https://bugs.webkit.org/show_bug.cgi?id=131284

Reviewed by Darin Adler.

Some more cleanup of Selector's pseudo types. This patch moves the page pseudo
class types into their own enumeration (PagePseudoClassType).

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePagePseudoSelector):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForPage):
(WebCore::CSSSelector::pseudoId):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::setPagePseudoType):
(WebCore::CSSSelector::pagePseudoClassType):
* css/PageRuleCollector.cpp:
(WebCore::checkPageSelectorComponents):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):

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

7 years agoCSS JIT: add support for :last-child and :only-child
benjamin@webkit.org [Mon, 7 Apr 2014 02:25:19 +0000 (02:25 +0000)]
CSS JIT: add support for :last-child and :only-child
https://bugs.webkit.org/show_bug.cgi?id=131283

Reviewed by Andreas Kling.

This is the straightforward implementation of :last-child and :only-child.

Both are extremely similar to :first-child. There are only minor differences:
-:last-child has an additional check for the flag IsParsingChildrenFinished.
-:only-child is like :first-child + :last-child but with combined marking.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToNextAdjacentElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
(WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByLastChildRules):
(WebCore::SelectorCompiler::setLastChildState):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByFirstChildAndLastChildRules):
(WebCore::SelectorCompiler::setOnlyChildState):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
* dom/Node.h:
(WebCore::Node::nextSiblingMemoryOffset):
(WebCore::Node::flagIsParsingChildrenFinished):
* rendering/style/RenderStyle.h:
Removed the unused flags, I will add them back later as needed.

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

7 years agoClean up WKGestureTypes.h
mitz@apple.com [Mon, 7 Apr 2014 00:54:14 +0000 (00:54 +0000)]
Clean up WKGestureTypes.h
https://bugs.webkit.org/show_bug.cgi?id=131286

Reviewed by Sam Weinig.

Renamed WKGestureTypes.h to GestureTypes.h, dropped the useless “WK” prefixes and changed
into scoped enums, with the exception of SelectionFlags.

* Shared/ios/GestureTypes.h: Copied from Source/WebKit2/Shared/ios/WKGestureTypes.h.
* Shared/ios/WKGestureTypes.h: Removed.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(copyElement):
(saveImage):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didUpdateBlockSelectionWithTouch):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _performAction:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toSelectionHandlePosition):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
(-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
(-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::selectWithGesture):
(WebKit::distanceBetweenRectsForPosition):
(WebKit::computeEdgeCenter):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
(WebKit::shouldExpand):
(WebKit::WebPage::changeBlockSelection):
(WebKit::WebPage::updateBlockSelectionWithTouch):
(WebKit::WebPage::updateSelectionWithTouches):
(WebKit::WebPage::performActionOnElement):

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

7 years agoSource/WebCore: Rework CSS calc logic, fixing some reference count mistakes in Length
darin@apple.com [Mon, 7 Apr 2014 00:16:35 +0000 (00:16 +0000)]
Source/WebCore: Rework CSS calc logic, fixing some reference count mistakes in Length
https://bugs.webkit.org/show_bug.cgi?id=131280
rdar://problem/16400823

Reviewed by Andreas Kling.

New unit test in TestWebKitAPI.

Changed the classes related to CSS "calc" to make the code a bit easier to read by
moving code out of class definitions. Also used final some more, made more things private,
used references instead of pointers, and other such changes. Biggest change, though, is to
Length, which had a broken system for managing reference counted calculated objects.
There were multiple bugs including a basic design mistake of not having a reference count
and trying to use the reference count in the object itself. Fixed and covered by the unit
test now; test found multiple problems in both the old and new implementations.

* WebCore.exp.in: Updated exports, including symbols to make the unit test practical.

* WebCore.xcodeproj/project.pbxproj: Made CalculationValue.h a Private file so it can
be used in a unit test. Also let Xcode update the file type for a gperf file.

* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::equals): Updated since m_expression is a Ref now.
(WebCore::CSSCalcValue::clampToPermittedRange): Marked inline and updated for data member
name change.
(WebCore::isIntegerResult): Changed argument order to put the operator first and use
references instead of pointers. Also marked inline.
(WebCore::createBlendHalf): Added. Helper to make the other functions more readable.
(WebCore::createExpressionNode): Made non-member function private to this file. Also made
many small improvements.
(WebCore::CSSCalcValue::create): Updated so both of these call the same constructor.

* css/CSSCalculationValue.h: Cut down CSSCalcValue class by making more things private
and deleting unneeded things. Also use Ref instead of RefPtr.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getPositionOffsetValue): Use isFixed function instead of type function.

* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops): Updated code since toCalcValue now returns PassRef
instead of PassRefPtr. Unfortunately the new code is a bit more verbose.
(WebCore::positionFromValue): Ditto.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseCalculation):

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated to pass reference rather than pointer.
(WebCore::CSSPrimitiveValue::init): Ditto.

* css/CSSToStyleMap.h: Removed unneeded include of LengthBox.h.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyLength::applyValue): Updated for function name change.
(WebCore::ApplyPropertyBorderRadius::applyValue): Removed extra parentheses.
(WebCore::ApplyPropertyFontSize::applyValue): Ditto. Also updated since toCalcValue returns Ref.

* css/LengthFunctions.cpp:
(WebCore::floatValueForLength): Updated to call value instead of getFloatValue; both are the same.

* css/StyleResolver.cpp:
(WebCore::addIntrinsicMargins): Updated for function name change.
(WebCore::createGridTrackBreadth): Ditto.

* platform/CalculationValue.cpp:
(WebCore::CalculationValue::create): Changed to return PassRef.
(WebCore::CalcExpressionNumber::evaluate): Moved this function out of the header, since it's
virtual and not really going to be inlined.
(WebCore::CalcExpressionNumber::operator==): Ditto.
(WebCore::CalculationValue::evaluate): Ditto.
(WebCore::CalcExpressionBinaryOperation::operator==): Ditto.
(WebCore::CalcExpressionLength::evaluate): Ditto.
(WebCore::CalcExpressionLength::operator==): Ditto.
(WebCore::CalcExpressionBlendLength::evaluate): Ditto.
(WebCore::CalcExpressionBlendLength::operator==): Ditto.

* platform/CalculationValue.h: Moved most functions out of the class bodies so the classes are
easier to see. Made all the == operator functions non-member ones except for the polymorphic
one from the base class. Changed the casting functions to work on references instead of pointers.
Tweaked name of some members.

* platform/Length.cpp: Reworked the CalculationValueMap (formerly CalculationValueHandleMap) to
use unsigned instead of int, and store reference counts in the map rather than trying to share the
reference count of the underlying CalculationValue object, which can lead to storage leaks where
handles end up in the map permanently.
(WebCore::calculationValues): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
(WebCore::Length::Length): Updated some data member names.
(WebCore::Length::calculationValue): Updated to return a reference instead of a PassRefPtr.
(WebCore::Length::ref): Renamed and updated for new interface to the map.
(WebCore::Length::deref): Ditto.
(WebCore::Length::nonNanCalculatedValue): Updated to use a reference instead of a pointer.
(WebCore::Length::isCalculatedEqual): Updated since this is now only called if both objects are
known to be calculated values.

* platform/Length.h: Moved most functions out of the class definition to make the class definition
easier to read. Reworked the constructors and assignment operators to handle the reference counting
correctly. Added various FIXMEs and assertions. Removed some unused functions, made others private.

* platform/LengthBox.h: Renamed some one-letter arguments to use words instead.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn): Updated for change to Length::setValue.
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray): Ditto.

* rendering/style/FillLayer.h:
(WebCore::FillLayer::initialFillXPosition): Updated to not convert a double to a float at runtime.
(WebCore::FillLayer::initialFillYPosition): Ditto.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWordSpacing): Removed a bogus FALLTHROUGH that was clearly wrong, but
harmless. Updated for changes to Length.

* rendering/style/RenderStyle.h: Updated for name changes and to avoid converting doubles to floats
at runtime.

Tools: Rework CSS calc logic, fixing some reference count mistakes in Length
https://bugs.webkit.org/show_bug.cgi?id=131280

Reviewed by Andreas Kling.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added CalculationValue.cpp.
* TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: Added.

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

7 years agoSource/WebKit/mac: Document user content related APIs
weinig@apple.com [Sun, 6 Apr 2014 23:41:10 +0000 (23:41 +0000)]
Source/WebKit/mac: Document user content related APIs

Reviewed by Anders Carlsson.

* MigrateHeaders.make:

Source/WebKit2: Document user content related APIs..

Reviewed by Anders Carlsson.

- Also demote WKScriptWorld to SPI.

* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessage.mm:
(-[WKScriptMessage _scriptWorld]):
(-[WKScriptMessage scriptWorld]): Deleted.
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Added.
* UIProcess/API/Cocoa/WKScriptWorld.h: Removed.
* UIProcess/API/Cocoa/WKScriptWorld.mm: Removed.
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController addScriptMessageHandler:name:]):
(-[WKUserContentController removeScriptMessageHandlerForName:]):
(-[WKUserContentController _addScriptMessageHandler:name:world:]):
(-[WKUserContentController _removeScriptMessageHandlerForName:world:]):
(-[WKUserContentController addScriptMessageHandler:name:world:]): Deleted.
(-[WKUserContentController removeScriptMessageHandlerForName:world:]): Deleted.
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Added.
* UIProcess/API/Cocoa/_WKScriptWorld.h: Copied from WebKit2/UIProcess/API/Cocoa/WKScriptWorld.h.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Copied from WebKit2/UIProcess/API/Cocoa/WKScriptWorld.mm.
(+[_WKScriptWorld defaultWorld]):
(+[WKScriptWorld defaultWorld]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoHonor System-Level User Preferences for Caption Display
bfulgham@apple.com [Sun, 6 Apr 2014 23:21:46 +0000 (23:21 +0000)]
Honor System-Level User Preferences for Caption Display
https://bugs.webkit.org/show_bug.cgi?id=131258

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setSelectedTextTrack): Allow preferenced change to fully dispatch
so we can properly deal with captions being turned off.
(WebCore::HTMLMediaElement::captionPreferencesChanged): Use 'webkit' variant of the
setWebKitClosedCaptionsVisible method so we properly adjust settings needed for the JS API call.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): When captions are turned off, e.g.
because the user turned off the preference, don't inadvertently turn them back on just bacause there
was an existing track that was not in a 'hidden' state.

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

7 years agoUnreviewed speculative 32-bit buildfix after r166837.
ossy@webkit.org [Sun, 6 Apr 2014 22:12:09 +0000 (22:12 +0000)]
Unreviewed speculative 32-bit buildfix after r166837.

* heap/Heap.cpp:
(JSC::Heap::updateObjectCounts):

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

7 years agoWeb Replay: add methods to encode a frame's index based on its FrameTree position
burg@cs.washington.edu [Sun, 6 Apr 2014 21:51:34 +0000 (21:51 +0000)]
Web Replay: add methods to encode a frame's index based on its FrameTree position
https://bugs.webkit.org/show_bug.cgi?id=131281

Reviewed by Timothy Hatcher.

Given a frame, its encoded index is computed by traversing the frame tree
and saving how many nodes have been traversed to reach a given frame.

This is used to disambiguate frames when dispatching frame-specific event
loop inputs during replay, such as timers and resource loaders.

* replay/SerializationMethods.cpp:
(WebCore::frameIndexFromDocument): Added.
(WebCore::frameIndexFromFrame): Added.
(WebCore::documentFromFrameIndex): Added.
(WebCore::frameFromFrameIndex): Added.
* replay/SerializationMethods.h:

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

7 years agoiOS build fix.
ap@apple.com [Sun, 6 Apr 2014 21:48:04 +0000 (21:48 +0000)]
iOS build fix.

* WebCore.exp.in: Move newly exported function to a right section of this file.

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

7 years agoFix change log dates and a small editing mistake in last patch
darin@apple.com [Sun, 6 Apr 2014 21:14:00 +0000 (21:14 +0000)]
Fix change log dates and a small editing mistake in last patch

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

7 years agoRefactor post-attach and HTMLObjectElement-related code
darin@apple.com [Sun, 6 Apr 2014 20:27:07 +0000 (20:27 +0000)]
Refactor post-attach and HTMLObjectElement-related code
https://bugs.webkit.org/show_bug.cgi?id=131282

Reviewed by Antti Koivisto.

Source/WebCore:

* dom/ContainerNode.cpp: Moved the post-attach callback code from here to
StyleResolveTree.h/cpp.
* dom/ContainerNode.h: Ditto.

* dom/Document.cpp:
(WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
PostAttachCallbackDisabler.

* dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
code to trigger image loads.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
Style::queuePostResolutionCallback and use a lambda instead of a function.
(WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
of just using wishful thinking to keep the object alive.
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
it into a 1-liner. Made dataAttr call setNeedsWidgetUpdate(true) unconditionally after
checking carefully to see that's harmless if there is no renderer. Changed classidAttr
to call setNeedsWidgetUpdate(true) unconditionally and not set m_classId.
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
instead of classId and descendantsOfType instead of getElementsByTagName.
(WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
(WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.

* html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
attribute in a data member. Rearranged header, making more private, and fixing some typos,
and doing a "using" instead of a function to disambiguate the inherited form functions.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
first child of the shadow root is guaranteed to be an element.
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
since m_needsDocumentActivationCallbacks can't be true if the old document was null.
(WebCore::is100Percent): Added helper to make function below more readable.
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
bit. The part that attracted my attention was the local variable of type RenderBox, which
was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
is a renderer of type RenderEmbeddedObject, so depend on that.

* html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
Marked more function members final. Made a protected imageLoader function so that
m_imageLoader can be private eventually. Made m_imageLoader be std::unique_ptr.

* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
(WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
(WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
(WebCore::Style::postResolutionCallbackQueue): Added.
(WebCore::Style::queuePostResolutionCallback): Added.
(WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
of as a special case. It should not work for multiple documents across multiple pages instead of
only the outermost one.
(WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
(WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
(WebCore::Style::postResolutionCallbacksAreSuspended): Added.

* style/StyleResolveTree.h: Added queuePostResolutionCallback and
postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
eventually become a private implementation detail.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm: Call toHTMLPlugInImageElement instead of
doing a static_cast.

LayoutTests:

* svg/custom/object-no-size-attributes-expected.txt: Removed expectation of an empty text
renderer from the render tree.
* svg/custom/object-no-size-attributes.xhtml: Restructured the source so there is no text
to render. Without this, we were seeing two text renderers due to the loading timing change.

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

7 years ago32-bit build fix.
mitz@apple.com [Sun, 6 Apr 2014 20:20:12 +0000 (20:20 +0000)]
32-bit build fix.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::setInputCursor):

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

7 years agoEnable WEB_REPLAY for PLATFORM(MAC)
burg@cs.washington.edu [Sun, 6 Apr 2014 17:28:20 +0000 (17:28 +0000)]
Enable WEB_REPLAY for PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=130700

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Switch on WEB_REPLAY feature flag for non-production builds.

* Configurations/FeatureDefines.xcconfig:
* replay/ReplayInputDispatchMethods.cpp: Fix the ENABLE(WEB_REPLAY) build.
It was broken by the bool to enum refactoring in r166684.
(WebCore::InitialNavigation::dispatch):

Source/WebInspectorUI:

If the ReplayAgent is available, then add an option to toggle between the
replay interface and normal Timeline interface from the timeline
sidebar panel. The option is available through a context menu item on the
sidebar panel's top navigation bar.

If web replay not available, just show the non-replay interface.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js: Add WebInspector.showReplayInterfaceSetting.
(WebInspector.loaded):

* UserInterface/Views/TimelineSidebarPanel.js: Unconditionally create the replay
interface elements, but only show them if showReplayInterfaceSetting is enabled.
(WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility): Added
(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Added.
(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar): Added.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/webkitperl/FeatureList.pm: Set the default for WEB_REPLAY for OS X engineering builds.

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

7 years ago[GTK] Stop trying to install WebKit1 documentation
rakuco@webkit.org [Sun, 6 Apr 2014 16:24:48 +0000 (16:24 +0000)]
[GTK] Stop trying to install WebKit1 documentation
https://bugs.webkit.org/show_bug.cgi?id=131278

Reviewed by Martin Robinson.

* Source/PlatformGTK.cmake: Remove install() call since the WebKit1 documentation is not
built anymore since r166584. This fixes `make install'.

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

7 years agoWeb Inspector: remove unused test hook setInspectorResourcesDataSizeLimits
burg@cs.washington.edu [Sun, 6 Apr 2014 05:55:59 +0000 (05:55 +0000)]
Web Inspector: remove unused test hook setInspectorResourcesDataSizeLimits
https://bugs.webkit.org/show_bug.cgi?id=131268

Reviewed by Timothy Hatcher.

Source/WebCore:

This was used in the old inspector frontend tests for the Network panel.
It's no longer used by any tests or frontend code.

* WebCore.exp.in: Remove symbols.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::setInspectorResourcesDataSizeLimits): Deleted.
* inspector/InspectorController.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals): Deleted.
* inspector/InspectorResourceAgent.h:
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::setResourcesDataSizeLimits): Deleted.
* inspector/NetworkResourcesData.h:
* testing/Internals.cpp:
(WebCore::Internals::setInspectorResourcesDataSizeLimits): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove symbols.

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

7 years ago[WK2] Fix unused parameter compile warning.
commit-queue@webkit.org [Sun, 6 Apr 2014 02:33:37 +0000 (02:33 +0000)]
[WK2] Fix unused parameter compile warning.
https://bugs.webkit.org/show_bug.cgi?id=131260

Patch by Miyoung Shin <myid.m.shin@gmail.com> on 2014-04-05
Reviewed by Gyuyoung Kim.

fix unused parameter warning in the WebKit2 build.

* UIProcess/API/APIDownloadClient.h:
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didCreateDestination):

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

7 years agoREGRESSION (NetworkProcess): Subresources fail to load from AppCache
ap@apple.com [Sun, 6 Apr 2014 01:00:01 +0000 (01:00 +0000)]
REGRESSION (NetworkProcess): Subresources fail to load from AppCache
https://bugs.webkit.org/show_bug.cgi?id=131262
<rdar://problem/15370653>

Reviewed by Sam Weinig.

Source/WebCore:

Exported ApplicationCacheHost::maybeLoadResource. Changed it to take a const
reference to ResourceRequest, as appropriate for WebResourceLoadScheduler.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadResource):
* loader/appcache/ApplicationCacheHost.h:

Source/WebKit2:

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad): Check application cache,
as done in ResourceLoader::start() for in-process loads.

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

7 years agoWeb Inspector: remove unused metrics and commands from the Timeline agent
burg@cs.washington.edu [Sun, 6 Apr 2014 00:51:14 +0000 (00:51 +0000)]
Web Inspector: remove unused metrics and commands from the Timeline agent
https://bugs.webkit.org/show_bug.cgi?id=131184

Reviewed by Timothy Hatcher.

Source/WebCore:

This patch removes several instrumentation hooks that are not being
used by the frontend in any way. Most of them are not hooked up to
produce any data, so they just clutter up InspectorClient and the agent.

* WebCore.exp.in: Remove didBeginFrame/didCancelFrame.
* inspector/InspectorClient.h: Remove client methods that are never overridden.
(WebCore::InspectorClient::canMonitorMainThread): Deleted.
(WebCore::InspectorClient::supportsFrameInstrumentation): Deleted.
(WebCore::InspectorClient::getAllocatedObjects): Deleted.
(WebCore::InspectorClient::dumpUncountedAllocatedObjects): Deleted.

* inspector/InspectorController.cpp: Remove unused instrumentation.
(WebCore::InspectorController::didBeginFrame): Deleted.
(WebCore::InspectorController::didCancelFrame): Deleted.
(WebCore::InspectorController::didComposite): Deleted.
(WebCore::InspectorController::wilComposite): Deleted.
* inspector/InspectorController.h:

* inspector/InspectorTimelineAgent.cpp: Remove the backend's BeginFrame enum
value, but keep it in the protocol for when it is reimplemented. Remove
management of the current frame record, and simplify some code.
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
(WebCore::InspectorTimelineAgent::clearRecordStack):
(WebCore::InspectorTimelineAgent::canMonitorMainThread): Deleted.
(WebCore::InspectorTimelineAgent::supportsFrameInstrumentation): Deleted.
(WebCore::InspectorTimelineAgent::didBeginFrame): Deleted.
(WebCore::InspectorTimelineAgent::didCancelFrame): Deleted.
(WebCore::InspectorTimelineAgent::didComposite): Deleted.
(WebCore::InspectorTimelineAgent::wilComposite): Deleted.
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): Deleted. Undo telescoping.
(WebCore::usedHeapSize): Deleted.
(WebCore::InspectorTimelineAgent::commitFrameRecord): Deleted.
* inspector/InspectorTimelineAgent.h:
(WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
* inspector/protocol/Timeline.json:

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Remove
instrumentation hook for beginFrame. This is the only backend that implements it.
(WebCore::CompositingCoordinator::syncDisplayState):

* testing/Internals.cpp: Remove crufty test methods that aren't used.
(WebCore::Internals::emitInspectorDidBeginFrame): Deleted.
(WebCore::Internals::emitInspectorDidCancelFrame): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebInspectorUI:

Remove the Memory domain from old protocol versions. Remove enum values
BeginFrame and CompositeLayers. Remove arguments to Timeline.start.
Remove miscellaneous Timeline commands that no longer exist and were never used.

* UserInterface/Protocol/Legacy/6.0/InspectorWebBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js:
* Versions/Inspector-iOS-6.0.json:
* Versions/Inspector-iOS-7.0.json:

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove symbols.

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

7 years agoFrequent PluginProcess crashes at libsqlite3.dylib: openDatabase
ap@apple.com [Sun, 6 Apr 2014 00:50:33 +0000 (00:50 +0000)]
Frequent PluginProcess crashes at libsqlite3.dylib: openDatabase
https://bugs.webkit.org/show_bug.cgi?id=131264
<rdar://problem/14165329>

Reviewed by Sam Weinig.

Don't create NSURLCache until after having called setenv.

* PluginProcess/PluginProcess.h: Added m_nsurlCacheDirectory.

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializePluginProcess): Compute NSURL cache path
on our own. This does not match CFNetwork's result in most cases, but should work
equally well.
(WebKit::PluginProcess::initializeSandbox): Create a cache with our path and best
guess for capacity.

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

7 years agoREGRESSION (r163914): Application cache cannot be used in main frame
ap@apple.com [Sun, 6 Apr 2014 00:48:04 +0000 (00:48 +0000)]
REGRESSION (r163914): Application cache cannot be used in main frame
https://bugs.webkit.org/show_bug.cgi?id=131263
<rdar://problem/16532063>

Reviewed by Sam Weinig.

* loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
Don't check main frame origin when loading into main frame, it's not a 3rd party
subframe, and the URL is unrelated to the page we are loading now.

* loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
Removed the same incorrect check that was duplicated here. The only caller already
checks isApplicationCacheBlockedForRequest().

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

7 years ago[Xcode] Clean up the platform/graphics group
mitz@apple.com [Sat, 5 Apr 2014 22:55:12 +0000 (22:55 +0000)]
[Xcode] Clean up the platform/graphics group
https://bugs.webkit.org/show_bug.cgi?id=131271

Reviewed by Eric Carlson.

* WebCore.xcodeproj/project.pbxproj: Created an opentype group and moved opentype file
references into it. Removed duplicate file references.

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

7 years ago[CMake] Include X11's include dirs in TestNetscapePlugin
rakuco@webkit.org [Sat, 5 Apr 2014 22:02:49 +0000 (22:02 +0000)]
[CMake] Include X11's include dirs in TestNetscapePlugin
https://bugs.webkit.org/show_bug.cgi?id=131270

Reviewed by Martin Robinson.

* DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: Include X11_INCLUDE_DIR since
TestNetscapePlugin includes WebCore code that includes X headers.

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

7 years agoRemove unused type casting helpers for HTMLUnknownElement...
akling@apple.com [Sat, 5 Apr 2014 21:46:01 +0000 (21:46 +0000)]
Remove unused type casting helpers for HTMLUnknownElement...

...to fix the debug build.

* html/HTMLUnknownElement.h:

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

7 years agoCanvas strokeText and fillText with SourceIn, DestinationIn, SourceOut, DestinationAt...
krit@webkit.org [Sat, 5 Apr 2014 21:34:44 +0000 (21:34 +0000)]
Canvas strokeText and fillText with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
https://bugs.webkit.org/show_bug.cgi?id=66766

Reviewed by Andreas Kling.

Source/WebCore:

Use transparency layers to draw text with certain compositing modes on
the canvas. This follows the Canvas specification and makes WebKit fully
compatible with IE. It also makes it more compatible with Firefox, even though
Firefox still has some bugs.

Test: fast/canvas/canvas-composite-text-alpha.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawTextInternal):

LayoutTests:

330 tests check compositing on Canvas with text.

* fast/canvas/canvas-composite-text-alpha-expected.txt: Added.
* fast/canvas/canvas-composite-text-alpha.html: Added.

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

7 years agoDevirtualize isHTMLUnknownElement().
akling@apple.com [Sat, 5 Apr 2014 21:33:19 +0000 (21:33 +0000)]
Devirtualize isHTMLUnknownElement().
<https://webkit.org/b/131269>

We were hitting isHTMLUnknownElement() pretty hard when marking
out-of-document Nodes. (The check is part of isHTMLAudioElement()
which is called by JSNodeOwner::isReachableFromOpaqueRoots().)

This patch uses a Node flag for the unknown element instead.
I'm also adding HTMLUnknownElement.{h,idl} to the Xcode project
since they were suspiciously missing.

Reviewed by Benjamin Poulain.

* WebCore.xcodeproj/project.pbxproj:
* dom/Node.h:
* html/HTMLElement.h:
(WebCore::HTMLElement::isHTMLUnknownElement):
* html/HTMLUnknownElement.h:
(WebCore::toHTMLUnknownElement): Deleted.

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

7 years agoAdd missing files from r166837
mhahnenberg@apple.com [Sat, 5 Apr 2014 20:06:57 +0000 (20:06 +0000)]
Add missing files from r166837

* heap/GCLogging.cpp: Added.
(JSC::GCLogging::levelAsString):
(JSC::LoggingFunctor::LoggingFunctor):
(JSC::LoggingFunctor::~LoggingFunctor):
(JSC::LoggingFunctor::operator()):
(JSC::LoggingFunctor::log):
(JSC::LoggingFunctor::reviveCells):
(JSC::LoggingFunctor::returnValue):
(JSC::GCLogging::dumpObjectGraph):
* heap/GCLogging.h: Added.

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

7 years agoEnhanced GC logging
mhahnenberg@apple.com [Sat, 5 Apr 2014 20:05:04 +0000 (20:05 +0000)]
Enhanced GC logging
https://bugs.webkit.org/show_bug.cgi?id=131246

Reviewed by Geoff Garen.

Source/JavaScriptCore:

Getting data on the state of the JSC Heap at runtime is currently in a sad state.
The OBJECT_MARK_LOGGING macro enables some basic GC logging, but it requires a full
recompile to turn it on. It would be nice if we could runtime enable our GC logging
infrastructure while incurring minimal cost when it is disabled.

It would also be nice to get a complete view of the Heap. Currently OBJECT_MARK_LOGGING
provides us with the discovered roots along with parent-child relationships as objects
are scanned. However, once an object is scanned it will never be declared as the child
of another object during that collection. This gives us a tree-like view of the
Heap (i.e. each scanned node only reports having a single parent), where the actual
Heap can be an arbitrary graph.

This patch replaces OBJECT_MARK_LOGGING and gives us these nice to haves. First it enhances
our logGC() runtime Option by changing it to be a tri-state value of None, Basic, or Verbose
logging levels. None means no logging is done, Basic is what logGC() = true would have done
prior to this patch, and Verbose logs all object relationships.

JSCell has new dump/dumpToStream methods, the latter of which is "virtual" to allow
subclasses to override the default string representation that will be dumped. These
methods allow JSCells to be dumped using the standard dataLog() calls similar to much of
the logging infrastructure in our compilers.

This patch also adds a GCLogging class that handles dumping the relationships between objects.
It does this by using the pre-existing visitChildren virtual methods to obtain the immediate
children of each live cell at the end of garbage collection.

This change meets our goal of being neutral on the benchmarks we track.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/GCLogging.cpp: Added.
(JSC::GCLogging::levelAsString):
(JSC::LoggingFunctor::LoggingFunctor):
(JSC::LoggingFunctor::operator()):
(JSC::LoggingFunctor::log):
(JSC::LoggingFunctor::reviveCells):
(JSC::LoggingFunctor::returnValue):
(JSC::GCLogging::dumpObjectGraph):
* heap/GCLogging.h: Added.
* heap/GCSegmentedArray.h:
(JSC::GCSegmentedArray::begin):
(JSC::GCSegmentedArray::end):
* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::visitSmallStrings):
(JSC::Heap::visitConservativeRoots):
(JSC::Heap::visitCompilerWorklists):
(JSC::Heap::visitProtectedObjects):
(JSC::Heap::visitTempSortVectors):
(JSC::Heap::visitArgumentBuffers):
(JSC::Heap::visitException):
(JSC::Heap::visitStrongHandles):
(JSC::Heap::visitHandleStack):
(JSC::Heap::traceCodeBlocksAndJITStubRoutines):
(JSC::Heap::visitWeakHandles):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::collect):
(JSC::Heap::didFinishCollection):
* heap/Heap.h:
* heap/MarkStack.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::dump):
* heap/SlotVisitor.h:
(JSC::SlotVisitor::markStack):
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::internalAppend):
* runtime/ClassInfo.h:
* runtime/JSCell.cpp:
(JSC::JSCell::dump):
(JSC::JSCell::dumpToStream):
(JSC::JSCell::className):
* runtime/JSCell.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::visitChildren):
* runtime/JSString.cpp:
(JSC::JSString::dumpToStream):
(JSC::JSString::visitChildren):
* runtime/JSString.h:
(JSC::JSString::length):
(JSC::JSRopeString::RopeBuilder::length):
* runtime/Options.cpp:
(JSC::parse):
(JSC::Options::setOption):
(JSC::Options::dumpOption):
* runtime/Options.h:

Source/WTF:

Remove OBJECT_MARK_LOGGING

* wtf/FeatureDefines.h:
* wtf/Platform.h:

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

7 years agoCanvas stroke and strokeRect with SourceIn, DestinationIn, SourceOut, DestinationAtop...
krit@webkit.org [Sat, 5 Apr 2014 19:57:00 +0000 (19:57 +0000)]
Canvas stroke and strokeRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
https://bugs.webkit.org/show_bug.cgi?id=66762

Reviewed by Andreas Kling.

Source/WebCore:

For fill operations we create a new ImageBuffer to ensure that the results are composited
correctly according to the Canvas spec. This patch creates a new transparency layer
for stroking on certain compositing operators to archive the same. This makes WebKit's
behavior interoperable with Firefox and IE as well.

Test: fast/fast/canvas/canvas-composite-stroke-alpha.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::strokeInternal):
(WebCore::CanvasRenderingContext2D::strokeRect):

LayoutTests:

330 tests based on canvas-composite-alpha to test correct compositing behavior with
strokeRect() and stroke().

* fast/canvas/canvas-composite-stroke-alpha-expected.txt: Added.
* fast/canvas/canvas-composite-stroke-alpha.html: Added.

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

7 years agoRemove bogus ASSERT in -JSVirtualMachine scanObjectGraph
mhahnenberg@apple.com [Sat, 5 Apr 2014 19:54:18 +0000 (19:54 +0000)]
Remove bogus ASSERT in -JSVirtualMachine scanObjectGraph
https://bugs.webkit.org/show_bug.cgi?id=131251

Reviewed by Geoffrey Garen.

* API/JSVirtualMachine.mm:
(scanExternalObjectGraph):
* API/tests/testapi.mm:

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

7 years agoUse preallocated stack reference to store adjacentBacktrackingStart
commit-queue@webkit.org [Sat, 5 Apr 2014 19:31:58 +0000 (19:31 +0000)]
Use preallocated stack reference to store adjacentBacktrackingStart
https://bugs.webkit.org/show_bug.cgi?id=131237

Patch by Yusuke Suzuki <utatane.tea@gmail.com> on 2014-04-05
Reviewed by Benjamin Poulain.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent): Deleted.
(WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures): Deleted.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail): Deleted.
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::allocateUninitialized):

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

7 years agoSource/WebCore: bad values from HTMLImageElement x and y attributes (CSSOM-View)
commit-queue@webkit.org [Sat, 5 Apr 2014 13:52:11 +0000 (13:52 +0000)]
Source/WebCore: bad values from HTMLImageElement x and y attributes (CSSOM-View)
https://bugs.webkit.org/show_bug.cgi?id=130308

Patch by Jeongeun Kim <je_julie.kim@samsung.com> on 2014-04-05
Reviewed by Simon Fraser.

According to CSSOM-View, interface HTMLImageElement,
The x attribute must return the x-coordinate.
If style is not updated when x() is called, it can’t return anything.
Style and layout should be done before getting value for x() and y().

Test: cssom/cssom-view-img-attributes-001.html

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::x):
(WebCore::HTMLImageElement::y):

LayoutTests: bad values from HTMLImageElement x and y attributes (CSSOM-View)
https://bugs.webkit.org/show_bug.cgi?id=130308

Patch by Jeongeun Kim <je_julie.kim@samsung.com> on 2014-04-05
Reviewed by Simon Fraser.

According to CSSOM-View, ‘interface HTMLImageElement’,
The x attribute must return the x-coordinate.
If style is not updated when x() is called, it can’t return anything.
Style and layout should be done before getting value for x() and y().

* cssom/cssom-view-img-attributes-001-expected.txt: Added.
* cssom/cssom-view-img-attributes-001.html: Added.

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

7 years agoREGRESSION (r166529): Fix build after renaming TileCache to LegacyTileCache
ddkilzer@apple.com [Sat, 5 Apr 2014 13:34:17 +0000 (13:34 +0000)]
REGRESSION (r166529): Fix build after renaming TileCache to LegacyTileCache
<http://webkit.org/b/130986>

* Scripts/check-for-inappropriate-objc-class-names: Add 'Legacy'
prefix to TileCache class names in exception list.

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

7 years ago[EFL][WK1] Apply override and final keyword for ChromeClientEfl
ryuan.choi@samsung.com [Sat, 5 Apr 2014 12:24:58 +0000 (12:24 +0000)]
[EFL][WK1] Apply override and final keyword for ChromeClientEfl
https://bugs.webkit.org/show_bug.cgi?id=131261

Reviewed by Gyuyoung Kim.

There are unnecessary virtual methods in ChromeClientEfl.
Almost methods are already removed from parent class and
the others does not need to be virtual method.

This patch removed them and applied override and final.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::scheduleAnimation):
(WebCore::ChromeClientEfl::serviceScriptedAnimations): Deleted.
(WebCore::ChromeClientEfl::cancelGeolocationPermissionForFrame): Deleted.
(WebCore::ChromeClientEfl::invalidateContents): Deleted.
(WebCore::ChromeClientEfl::cancelGeolocationPermissionRequestForFrame): Deleted.
(WebCore::ChromeClientEfl::iconForFiles): Deleted.
* WebCoreSupport/ChromeClientEfl.h:
(WebCore::ChromeClientEfl::scrollRectIntoView): Deleted.
(WebCore::ChromeClientEfl::numWheelEventHandlersChanged): Deleted.

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

7 years ago[CSS Shapes] Remove CSSBoxType member from BasicShape and CSSBasicShape
zoltan@webkit.org [Sat, 5 Apr 2014 08:22:35 +0000 (08:22 +0000)]
[CSS Shapes] Remove CSSBoxType member from BasicShape and CSSBasicShape
https://bugs.webkit.org/show_bug.cgi?id=129706

Reviewed by Andreas Kling.

The CSSBoxType has been moved up to ShapeValue and is no longer needed in the BasicShape classes.

No new tests, no behavior change.

* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend):
* rendering/style/BasicShapes.h:
(WebCore::BasicShape::referenceBox): Deleted.
(WebCore::BasicShape::setReferenceBox): Deleted.
(WebCore::BasicShape::BasicShape): Deleted.

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

7 years agoWebProcess freezes after fast/forms/form-associated-element-crash3.html test
ap@apple.com [Sat, 5 Apr 2014 08:19:51 +0000 (08:19 +0000)]
WebProcess freezes after fast/forms/form-associated-element-crash3.html test
https://bugs.webkit.org/show_bug.cgi?id=122130

fast/forms/form-associated-element-crash.html often times out on Mavericks WK1
https://bugs.webkit.org/show_bug.cgi?id=124593

With underlying bug having been fixed in OS X 10.9.2, removing expectations
for form-associated-element tests that were affected by it.

I'm not sure if Mountain Lion was affected, let's see if tests start to fail there.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/wk2/TestExpectations:

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

7 years agoFix the 32-bit build after r166818.
mrowe@apple.com [Sat, 5 Apr 2014 07:08:36 +0000 (07:08 +0000)]
Fix the 32-bit build after r166818.

* WebCore.exp.in:

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

7 years agoWeb Inspector: hook up probe samples to TimelineAgent's records
burg@cs.washington.edu [Sat, 5 Apr 2014 05:53:51 +0000 (05:53 +0000)]
Web Inspector: hook up probe samples to TimelineAgent's records
https://bugs.webkit.org/show_bug.cgi?id=131127

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/ScriptDebugListener.h: Add a proper forward declaration for ScriptBreakpointAction.

Source/WebCore:

Hook up probe callbacks from ScriptDebugListener so that timeline records are
created for probe samples. The record includes the probe identifier and hit count.
The actual probe evaluation result is sent separately by DebuggerAgent, and
can be looked up in frontend models using the identifier and hit count.

* inspector/InspectorTimelineAgent.cpp: Only listen to the debug server when recording.
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
(WebCore::InspectorTimelineAgent::breakpointActionProbe):
(WebCore::toProtocol):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createProbeSampleData):
* inspector/TimelineRecordFactory.h:
* inspector/protocol/Timeline.json: Add new enum value.

Source/WebInspectorUI:

* UserInterface/Controllers/TimelineManager.js: Stub out a case for the ProbeSample record type.
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):

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

7 years agoUnreviewed build fix.
bfulgham@apple.com [Sat, 5 Apr 2014 04:52:41 +0000 (04:52 +0000)]
Unreviewed build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add missing
symbol export.

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

7 years agoWeb Inspector: JSContext inspection Resource search throws exception
commit-queue@webkit.org [Sat, 5 Apr 2014 03:54:05 +0000 (03:54 +0000)]
Web Inspector: JSContext inspection Resource search throws exception
https://bugs.webkit.org/show_bug.cgi?id=131253

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-04
Reviewed by Timothy Hatcher.

Fail gracefully when none of the supported search backends are available.
In JSContext inspection the DOM and Page agents are unavailable.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.performSearch):

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

7 years agoWeb Inspector: JSContext inspection - TypeError: null is not an object (evaluating...
commit-queue@webkit.org [Sat, 5 Apr 2014 03:52:05 +0000 (03:52 +0000)]
Web Inspector: JSContext inspection - TypeError: null is not an object (evaluating 'contentView.showSourceCode')
https://bugs.webkit.org/show_bug.cgi?id=129857

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-04
Reviewed by Timothy Hatcher.

When inspecting a JSContext, there is no main frame resource, so
attempting to show it was resulting in a runtime error.
Instead, check to see if there is a main frame resource, fallback
to selecting the first tree element.

* UserInterface/Base/Main.js:
(WebInspector.toggleConsoleView):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView):

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

7 years agoStreamline cached wrapper lookup for Nodes in the normal world.
akling@apple.com [Sat, 5 Apr 2014 03:17:09 +0000 (03:17 +0000)]
Streamline cached wrapper lookup for Nodes in the normal world.
<https://webkit.org/b/131249>

Inline the hot path for toJS(..., Node*) for cached wrapper lookups
in the normal world. (Or really, out-of-line the cold path, since
that was preventing the compiler from inlining this function.)

Also have JSDOMGlobalObject cache the "is normal world" flag from
the DOMWrapperWorld so we can avoid the extra load.

Reviewed by Benjamin Poulain.

* WebCore.exp.in:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::JSDOMGlobalObject::worldIsNormal):
* bindings/js/JSNodeCustom.cpp:
(WebCore::getOutOfLineCachedWrapper):
* bindings/js/JSNodeCustom.h:
(WebCore::toJS):

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

7 years agoUnreviewed, rolling out r166820.
commit-queue@webkit.org [Sat, 5 Apr 2014 03:15:24 +0000 (03:15 +0000)]
Unreviewed, rolling out r166820.
https://bugs.webkit.org/show_bug.cgi?id=131256

Broke builds. (Requested by bdash on #webkit).

Reverted changeset:

"WIP for inlining C++.  Added a build target to produce llvm
ir."
https://bugs.webkit.org/show_bug.cgi?id=130523
http://trac.webkit.org/changeset/166820

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

7 years agoUnreviewed. iOS Build fix after r166818.
joepeck@webkit.org [Sat, 5 Apr 2014 03:03:37 +0000 (03:03 +0000)]
Unreviewed. iOS Build fix after r166818.

These member variables / declarations are accessed by iOS
in shared code in TelephoneNumberOverlayControllerMac.

* WebProcess/WebPage/TelephoneNumberOverlayController.h:

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

7 years agoWIP for inlining C++. Added a build target to produce llvm ir.
commit-queue@webkit.org [Sat, 5 Apr 2014 02:47:29 +0000 (02:47 +0000)]
WIP for inlining C++.  Added a build target to produce llvm ir.
https://bugs.webkit.org/show_bug.cgi?id=130523

Patch by Matthew Mirman <mmirman@apple.com> on 2014-04-04
Reviewed by Filip Pizlo.

The llvm ir gets placed JavaScriptCoreRuntimeToLLVMir.build with the extension .o

* JavaScriptCore.xcodeproj/project.pbxproj:
* build_index.py: Added.
* Configurations/CompileRuntimeToLLVMir.xcconfig: Added.

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

7 years agoUnreviewed. Rollout r166812, breaks 32-bit Mavericks build.
joepeck@webkit.org [Sat, 5 Apr 2014 01:24:30 +0000 (01:24 +0000)]
Unreviewed. Rollout r166812, breaks 32-bit Mavericks build.

* Shared/mac/CookieStorageShim.mm:
(WebKit::CookieStorageShim::initialize):
(-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):

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

7 years agoShow DataDetector UI on scanned phone numbers.
beidson@apple.com [Sat, 5 Apr 2014 01:10:11 +0000 (01:10 +0000)]
Show DataDetector UI on scanned phone numbers.
<rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131247

Reviewed by Tim Horton.

Source/WebCore:

Gather the ranges of the scanned telephone numbers and send them up to WK2:
* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::scanSelectionForTelephoneNumbers):
(WebCore::Editor::scanRangeForTelephoneNumbers):
* editing/Editor.h:

Add client method to receive scanned telephone number ranges:
* page/EditorClient.h:
(WebCore::EditorClient::selectedTelephoneNumberRangesChanged):

Remove unneeded placeholder UI:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarkers):
(WebCore::InlineTextBox::computeRectForReplacementMarker): Deleted.
(WebCore::InlineTextBox::paintCompositionUnderline): Deleted.
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::expansionBehavior): Deleted.

Source/WebKit2:

Add a new PageOverlay for telephone number UI, handle drawing the UI, and
handle mouse clicks on the button in that UI.

Even though clicks are detected, they aren’t acted upon yet.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Pass ranges to
  the TelephoneNumberController.
* WebProcess/WebCoreSupport/WebEditorClient.h:

This controller handles installing/removing the PageOverlay, drawing the UI elements,
and handling mouse events while any of the UI elements are shown.
There’s also a clumsy attempt to keep platform-specific parts separated out.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Added.
(WebKit::TelephoneNumberOverlayController::TelephoneNumberOverlayController):
(WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
(WebKit::TelephoneNumberOverlayController::destroyOverlay):
(WebKit::TelephoneNumberOverlayController::pageOverlayDestroyed):
(WebKit::TelephoneNumberOverlayController::willMoveToWebPage):
(WebKit::TelephoneNumberOverlayController::didMoveToWebPage):
(WebKit::TelephoneNumberOverlayController::rectsForDrawing):
(WebKit::TelephoneNumberOverlayController::selectedTelephoneNumberRangesChanged):

* WebProcess/WebPage/TelephoneNumberOverlayController.h: Added.
(WebKit::TelephoneNumberOverlayController::create):

* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Added.
(WebKit::TelephoneNumberOverlayController::drawRect):
(WebKit::TelephoneNumberOverlayController::handleTelephoneClick):
(WebKit::TelephoneNumberOverlayController::mouseEvent):
(WebKit::TelephoneNumberOverlayController::clearMouseDownInformation):
(WebKit::TelephoneNumberOverlayController::clearHighlights):

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::telephoneNumberOverlayController):
* WebProcess/WebPage/WebPage.h:

* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoAX: supportsARIAExpanded should always return true for a few roles: combobox, disclosure.
commit-queue@webkit.org [Sat, 5 Apr 2014 00:37:55 +0000 (00:37 +0000)]
AX: supportsARIAExpanded should always return true for a few roles: combobox, disclosure.
https://bugs.webkit.org/show_bug.cgi?id=129787

Patch by James Craig <jcraig@apple.com> on 2014-04-04
Reviewed by Chris Fleizach.

Source/WebCore:

Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsARIAExpanded):

LayoutTests:

* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector-protocol/dom/getAccessibilityPropertiesForNode.html:

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

7 years agoWeb Inspector: Log JS Exceptions to System Console if JavaScriptCoreOutputConsoleMess...
commit-queue@webkit.org [Fri, 4 Apr 2014 23:54:59 +0000 (23:54 +0000)]
Web Inspector: Log JS Exceptions to System Console if JavaScriptCoreOutputConsoleMessagesToSystemConsole enabled
https://bugs.webkit.org/show_bug.cgi?id=131241

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-04
Reviewed by Timothy Hatcher.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
Log the exception to the system console if system console output is enabled.

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

7 years agoInclude Session ID in WebPageCreationParameters.
mhock@apple.com [Fri, 4 Apr 2014 23:53:36 +0000 (23:53 +0000)]
Include Session ID in WebPageCreationParameters.
https://bugs.webkit.org/show_bug.cgi?id=131239

<rdar://problem/16175483>

Reviewed by Sam Weinig.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

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

7 years agoJSGenerateToNativeObject should use fast JSNode/JSElement casts.
akling@apple.com [Fri, 4 Apr 2014 23:30:50 +0000 (23:30 +0000)]
JSGenerateToNativeObject should use fast JSNode/JSElement casts.
<https://webkit.org/b/131245>

Make JSGenerateToNativeObject spit out code using the fast new wrapper
casts for JSNode and JSElement.

This avoids walking the ClassInfo chain in many core functions, e.g:

    - Node.insertBefore()
    - Node.replaceChild()
    - Node.removeChild()
    - Node.appendChild()
    - window.getComputedStyle()

Reviewed by Geoff Garen.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

7 years ago[CSS Shapes] polygon y-value calc() args serialize incorrectly
zoltan@webkit.org [Fri, 4 Apr 2014 23:25:41 +0000 (23:25 +0000)]
[CSS Shapes] polygon y-value calc() args serialize incorrectly
https://bugs.webkit.org/show_bug.cgi?id=129842

Reviewed by Bem Jones-Bey.

Source/WebCore:

The code hit ASSERT(isCalculation(value)) in CSSParser::createPrimitiveNumbericValue, because
CSSParser::validUnit had been called on both coordinates, which set the value for m_parsedCalculation,
but only one of the coordinates was calculation value. I reordered calling valudUnit and
createPrimitiveNumbericValue to be called in the correct order on the coordinates.

I added the new test case to parsing-test-utils.js.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapePolygon):

LayoutTests:

* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:

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

7 years ago[Mac][WK2] Videos do not have access to session cookies
jer.noble@apple.com [Fri, 4 Apr 2014 23:15:10 +0000 (23:15 +0000)]
[Mac][WK2] Videos do not have access to session cookies
https://bugs.webkit.org/show_bug.cgi?id=129687

Reviewed by Eric Carlson.

Update the CookieStorageShim to track changes in underlying networking stack.

* Shared/mac/CookieStorageShim.mm:
(WebKit::CookieStorageShim::initialize):
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):

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

7 years agoWeb Replay: capture and replay wheel events and scroll commands
burg@cs.washington.edu [Fri, 4 Apr 2014 23:14:15 +0000 (23:14 +0000)]
Web Replay: capture and replay wheel events and scroll commands
https://bugs.webkit.org/show_bug.cgi?id=129402

.:

Reviewed by Timothy Hatcher.

* ManualTests/inspector/replay-wheel-events.html: Added.

Source/WebCore:

Reviewed by Timothy Hatcher and Simon Fraser.

To capture and replay scrolling, the scrolling coordinator will force synchronous
scrolling during capture and replay. If the page is capturing or replaying,
ForceOnMainThread will be added to the coordinator's SynchronousScrollingReasons.

A callback was added to signal that replay session state have changed,
and thus the synchronous scrolling reasons should be recomputed.

Automated replay reftests for scrolling are not included, because they will be
too flaky until more nondeterminism is handled. Specifically, resource loading,
initial focus/active state, and parsing are known blocking issues.

Test: ManualTests/inspector/replay-wheel-events.html

* page/scrolling/ScrollingCoordinator.cpp: Add a new callback for replay state
session changes. Add ForceOnMainThread if the page's active input cursor is
capturing or replaying.

(WebCore::ScrollingCoordinator::synchronousScrollingReasons):
(WebCore::ScrollingCoordinator::replaySessionStateDidChange): Added.
* page/scrolling/ScrollingCoordinator.h:

* platform/PlatformWheelEvent.h:
* platform/ScrollTypes.h: Add explicit enum storage types so these enums can
be forward-declared. This is necessary to generate enum encode/decode implementations.

* replay/ReplayController.cpp:
(WebCore::ReplayController::setForceDeterministicSettings): If async scrolling
support is available, tell the scrolling tree to behave deterministically.

* replay/ReplayInputDispatchMethods.cpp:
(WebCore::HandleWheelEvent::dispatch): Added.
(WebCore::LogicalScrollPage::dispatch): Added.
(WebCore::ScrollPage::dispatch): Added.
* replay/SerializationMethods.cpp: Introduce more specific macros for values
deserialized to arbitraray lvalues, scalars, RefPtr, and unique_ptr. Fix existing
uses of decode macros.

(JSC::EncodingTraits<NondeterministicInputBase>::encodeValue): Fix macro name.
(JSC::EncodingTraits<KeypressCommand>::encodeValue): Fix macro name.
(JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Fix macro name.
(JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Fix macro name.
(JSC::PlatformWheelEventCocoa::PlatformWheelEventCocoa): Added. Encapsulate
and initialize data members specific to PLATFORM(COCOA).

(JSC::EncodingTraits<PlatformWheelEvent>::encodeValue): Added.
(JSC::EncodingTraits<PlatformWheelEvent>::decodeValue): Added.
* replay/SerializationMethods.h:
* replay/UserInputBridge.cpp: Fill in bridge methods to capture inputs.
(WebCore::UserInputBridge::handleWheelEvent):
(WebCore::UserInputBridge::scrollRecursively):
(WebCore::UserInputBridge::logicalScrollRecursively):
* replay/WebInputs.json: Add inputs and new enum types.

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

7 years agoImprove error checking in WebPageProxy::didReceiveEvent
ap@apple.com [Fri, 4 Apr 2014 22:56:27 +0000 (22:56 +0000)]
Improve error checking in WebPageProxy::didReceiveEvent
https://bugs.webkit.org/show_bug.cgi?id=131243
<rdar://problem/16529207>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent):

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

7 years agoUnreviewed gardening. Mark a flakey test that is failing intermittenly in pixel tests.
joepeck@webkit.org [Fri, 4 Apr 2014 22:46:44 +0000 (22:46 +0000)]
Unreviewed gardening. Mark a flakey test that is failing intermittenly in pixel tests.

* platform/mac/TestExpectations:
Mark svg/as-image/svg-as-image-canvas.html as flakey.

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

7 years agoUpgrade to SelectorFailsAllSiblings when Child selector is failed.
benjamin@webkit.org [Fri, 4 Apr 2014 22:30:44 +0000 (22:30 +0000)]
Upgrade to SelectorFailsAllSiblings when Child selector is failed.
https://bugs.webkit.org/show_bug.cgi?id=130961

Patch by Yusuke Suzuki <utatane.tea@gmail.com> on 2014-04-04
Reviewed by Benjamin Poulain.

When Child selector fails, we should resume matching from the closest
Descendant selector.
So upgrading SelectorFailsLocally to SelectorFailsAllSibling at least
to prevent unnecessary direct/indirect adjacent selectors matching.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):

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

7 years agoKeep track of filtered active attribute/uniform indices per shader program.
roger_fong@apple.com [Fri, 4 Apr 2014 22:08:47 +0000 (22:08 +0000)]
Keep track of filtered active attribute/uniform indices per shader program.
https://bugs.webkit.org/show_bug.cgi?id=131235.

Reviewed by Dean Jackson.

Tests: Covered by existing Khronos Conformance tests.
Will create a test to use multiple shader programs in a follow-up patch.

* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations): Use getActiveAttribImpl. We do not need to use the filtered list of attributes here.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniformLocation): Use filtered list of uniforms for uniform count.
* platform/graphics/GraphicsContext3D.h: Create a map of shader programs to ActiveShaderSymbolCounts.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::attachShader):
When attaching or detaching a shader the shader program's active symbols list will change. Clear it so that it will be updated later.
(WebCore::GraphicsContext3D::detachShader): Ditto.
(WebCore::GraphicsContext3D::compileShader): No need to clear symbol counts here.
(WebCore::GraphicsContext3D::getActiveAttrib): getActiveAttrib should only be able to query for attributes in the filtered list.
(WebCore::GraphicsContext3D::getActiveUniform): getActiveUniform should only be able to query for uniforms in the filtered list.
(WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount): Return the filtered symbol count for a shader program.

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

7 years agoMore documentation
andersca@apple.com [Fri, 4 Apr 2014 22:03:22 +0000 (22:03 +0000)]
More documentation
https://bugs.webkit.org/show_bug.cgi?id=131238

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:

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

7 years ago[CSS Blending] Add compositing reason for isolation.
commit-queue@webkit.org [Fri, 4 Apr 2014 20:34:23 +0000 (20:34 +0000)]
[CSS Blending] Add compositing reason for isolation.
https://bugs.webkit.org/show_bug.cgi?id=131153

Patch by Ion Rosca <rosca@adobe.com> on 2014-04-04
Reviewed by Joseph Pecoraro.

Source/WebCore:

There are 2 reasons involving blend modes for a layer to be composited:
1) the layer has blend mode and has composited descendants: CompositingReasonBlendingWithCompositedDescendants.
2) the layer has to isolate composited blending descendants: CompositingReasonIsolatesCompositedBlendingDescendants

Test: inspector-protocol/layers/layers-blending-compositing-reasons.html

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* inspector/protocol/LayerTree.json:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::logReasonsForCompositing):
* rendering/RenderLayerCompositor.h: adding CompositingReasonIsolatesCompositedBlendingDescendants.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):

LayoutTests:

* inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt: Added.
* inspector-protocol/layers/layers-blending-compositing-reasons.html: Added.

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

7 years agoWeb Inspector: Provide a way for JSContext console to log to system console
commit-queue@webkit.org [Fri, 4 Apr 2014 19:57:47 +0000 (19:57 +0000)]
Web Inspector: Provide a way for JSContext console to log to system console
https://bugs.webkit.org/show_bug.cgi?id=131050

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-04
Reviewed by Timothy Hatcher.

Applications often re-expose some log -> NSLog functionality.
We already have the capability ourselves, which includes extra
information such as sourceURL:line:column, all arguments instead
of just one argument, and backtrace information on console.trace.
Therefore it would be convenient if developers could just use
the built-in console.log and get rich output in both the inspector
and the console, without writing their own logger.

The logging will be enabled in debug builds by default, and can be enabled
otherwise by setting a user default before creating the first context.

For example, in the application itself:

    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"JavaScriptCoreOutputConsoleMessagesToSystemConsole"];

Or from outside the application:

    shell> defaults write <app-bundle-identifier> JavaScriptCoreOutputConsoleMessagesToSystemConsole -bool YES

* inspector/JSConsoleClient.h:
* inspector/JSConsoleClient.cpp:
(Inspector::JSConsoleClient::logToSystemConsole):
(Inspector::JSConsoleClient::setLogToSystemConsole):
(Inspector::JSConsoleClient::initializeLogToSystemConsole):
(Inspector::JSConsoleClient::JSConsoleClient):
Global setting for logging to system console. Enabled on
debug builds, and by a user default on supported platforms.

(Inspector::JSConsoleClient::messageWithTypeAndLevel):
Log to system console when the static setting is enabled.

* runtime/ConsoleClient.h:
* runtime/ConsoleClient.cpp:
(JSC::appendURLAndPosition):
(JSC::appendMessagePrefix):
(JSC::ConsoleClient::printConsoleMessage):
(JSC::ConsoleClient::printConsoleMessageWithArguments):
Clean up printing. Build strings and use WTFLogAlways instead of printf
for consistant logging.

* runtime/ConsoleClient.cpp:
(JSC::ConsoleClient::printConsoleMessageWithArguments):
Clean up printing. If there is no source URL, don't print a leading colon.

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

7 years ago[GTK] kill-old-processes should kill dbus-daemon processes
commit-queue@webkit.org [Fri, 4 Apr 2014 18:37:02 +0000 (18:37 +0000)]
[GTK] kill-old-processes should kill dbus-daemon processes
https://bugs.webkit.org/show_bug.cgi?id=127352

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-04-04
Reviewed by Martin Robinson.

* BuildSlaveSupport/kill-old-processes:
(main):

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

7 years agoUse more const refs in ShapeOutsideInfo and some misc cleanup
bjonesbe@adobe.com [Fri, 4 Apr 2014 18:36:32 +0000 (18:36 +0000)]
Use more const refs in ShapeOutsideInfo and some misc cleanup
https://bugs.webkit.org/show_bug.cgi?id=131192

Reviewed by Dirk Schulze.

Use const refs for pretty much everything that can't be null. Also
cleanup some code that got a bit messy when ShapeInfo was merged into
ShapeOutsideInfo.

No new tests, no behavior change.

* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::shapeToRendererPoint):
(WebCore::ShapeOutsideInfo::shapeToRendererSize):
(WebCore::referenceBox):
(WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
(WebCore::getShapeImageAndRect):
(WebCore::ShapeOutsideInfo::computedShape):
(WebCore::ShapeOutsideInfo::logicalTopOffset):
(WebCore::ShapeOutsideInfo::logicalLeftOffset):
* rendering/shapes/ShapeOutsideInfo.h:

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

7 years agoAdd radar number.
mhock@apple.com [Fri, 4 Apr 2014 18:16:54 +0000 (18:16 +0000)]
Add radar number.

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

7 years agoREGRESSION (r166615): Pressing return doesnâ\80\99t submit search term at bing.com
ap@apple.com [Fri, 4 Apr 2014 18:07:44 +0000 (18:07 +0000)]
REGRESSION (r166615): Pressing return doesnâ\80\99t submit search term at bing.com
https://bugs.webkit.org/show_bug.cgi?id=131212
<rdar://problem/16521788>

Reviewed by Dan Bernstein.

Source/WebCore:

Test: fast/forms/submit-while-you-submit.html

Turns out that m_shouldSubmit can actually be modified in a code path where we can't
directly return the result. I'm not sure if the current behavior is entirely correct
(we have open bugs about submitting forms multiple times), but let's restore it to
pre-r166615 state.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement):
(WebCore::HTMLFormElement::prepareForSubmission):
(WebCore::HTMLFormElement::submit):
* html/HTMLFormElement.h:

LayoutTests:

* fast/forms/submit-while-you-submit-expected.txt: Added.
* fast/forms/submit-while-you-submit.html: Added.

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

7 years agoUse JSCell::indexingType instead of Structure::indexingType wherever possible
mhahnenberg@apple.com [Fri, 4 Apr 2014 17:56:23 +0000 (17:56 +0000)]
Use JSCell::indexingType instead of Structure::indexingType wherever possible
https://bugs.webkit.org/show_bug.cgi?id=131230

Reviewed by Mark Lam.

Avoid the indirection through the Structure.

* bytecode/ArrayAllocationProfile.cpp:
(JSC::ArrayAllocationProfile::updateIndexingType):
* bytecode/ArrayAllocationProfile.h:
(JSC::ArrayAllocationProfile::selectIndexingType):
* heap/HeapStatistics.cpp:
(JSC::StorageStatistics::operator()):
* runtime/ArrayPrototype.cpp:
(JSC::attemptFastSort):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):

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