WebKit-https.git
4 years agoUnreviewed, rolling out r180203 and r180210.
commit-queue@webkit.org [Sat, 28 Feb 2015 00:46:33 +0000 (00:46 +0000)]
Unreviewed, rolling out r180203 and r180210.
https://bugs.webkit.org/show_bug.cgi?id=142116

broke process suspension and tile map (Requested by thorton on
#webkit).

Reverted changesets:

"Adopt CAMachPort-as-layer-contents"
https://bugs.webkit.org/show_bug.cgi?id=141687
http://trac.webkit.org/changeset/180203

"Fix the !USE(IOSURFACE) build"
http://trac.webkit.org/changeset/180210

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

4 years agoAdd WebKit2 SPI to create a DOM File object
commit-queue@webkit.org [Sat, 28 Feb 2015 00:42:26 +0000 (00:42 +0000)]
Add WebKit2 SPI to create a DOM File object
https://bugs.webkit.org/show_bug.cgi?id=142109

Patch by Sam Weinig <sam@webkit.org> on 2015-02-27
Reviewed by Tim Horton.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
Make <WebCore/File.h> (and associated files) available to WebKit2.

Source/WebKit2:

Add a new handle type for exposing a DOM File object to script. Follow
the pattern of WKBundleNodeHandleRef and WKBundleRangeHandleRef with the
new class WKBundleFileHandleRef. It can be created for a specific path,
and then the JS wrapper can be obtained via WKBundleFrameGetJavaScriptWrapperForFileForWorld.

* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.cpp: Added.
(WKBundleFileHandleGetTypeID):
(WKBundleFileHandleCreateWithPath):
* WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h: Added.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetJavaScriptWrapperForFileForWorld):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp: Added.
(WebKit::domHandleCache):
(WebKit::InjectedBundleFileHandle::create):
(WebKit::InjectedBundleFileHandle::getOrCreate):
(WebKit::InjectedBundleFileHandle::InjectedBundleFileHandle):
(WebKit::InjectedBundleFileHandle::~InjectedBundleFileHandle):
(WebKit::InjectedBundleFileHandle::coreFile):
* WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.h: Added.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::jsWrapperForWorld):
* WebProcess/WebPage/WebFrame.h:

Tools:

Add a test for WKBundleFileHandleRef.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKBundleFileHandle.cpp: Added.
(TestWebKitAPI::didReceiveMessageFromInjectedBundle):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/WKBundleFileHandle_Bundle.cpp: Added.
(TestWebKitAPI::WKBundleFileHandleTest::WKBundleFileHandleTest):
* TestWebKitAPI/Tests/WebKit2/bundle-file.html: Added.

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

4 years agobmalloc: Pathological madvise churn on the free(malloc(x)) benchmark
ggaren@apple.com [Sat, 28 Feb 2015 00:29:22 +0000 (00:29 +0000)]
bmalloc: Pathological madvise churn on the free(malloc(x)) benchmark
https://bugs.webkit.org/show_bug.cgi?id=142058

Reviewed by Andreas Kling.

The churn was caused by repeatedly splitting an object with physical
pages from an object without, and then merging them back together again.
The merge would conservatively forget that we had physical pages, forcing
a new call to madvise on the next allocation.

This patch more strictly segregates objects in the heap from objects in
the VM heap, with these changes:

(1) Objects in the heap are not allowed to merge with objects in the VM
heap, and vice versa -- since that would erase our precise knowledge of
which physical pages had been allocated.

(2) The VM heap is exclusively responsible for allocating and deallocating
physical pages.

(3) The heap free list must consider entries for objects that are in the
VM heap to be invalid, and vice versa. (This condition can arise
because the free list does not eagerly remove items.)

With these changes, we can know that any valid object in the heap's free
list already has physical pages, and does not need to call madvise.

Note that the VM heap -- as before -- might sometimes contain ranges
or pieces of ranges that have physical pages, since we allow splitting
of ranges at granularities smaller than the VM page size. These ranges
can eventually merge with ranges in the heap during scavenging.

* bmalloc.xcodeproj/project.pbxproj:

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::owner):
(bmalloc::BoundaryTag::setOwner):
(bmalloc::BoundaryTag::initSentinel):
(bmalloc::BoundaryTag::hasPhysicalPages): Deleted.
(bmalloc::BoundaryTag::setHasPhysicalPages): Deleted. Replaced the concept
of "has physical pages" with a bit indicating which heap owns the large
object. This is a more precise concept, since the old bit was really a
Yes / Maybe bit.

* bmalloc/Deallocator.cpp:

* bmalloc/FreeList.cpp: Adopt
(bmalloc::FreeList::takeGreedy):
(bmalloc::FreeList::take):
(bmalloc::FreeList::removeInvalidAndDuplicateEntries):
* bmalloc/FreeList.h:
(bmalloc::FreeList::push): Added API for considering the owner when
deciding if a free list entry is valid.

* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap): Adopt new API.

(bmalloc::Heap::scavengeLargeRanges): Scavenge all ranges with no minimum,
since some ranges might be able to merge with ranges in the VM heap, and
they won't be allowed to until we scavenge them.

(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateMediumPage):
(bmalloc::Heap::allocateLarge): New VM heap API makes this function
simpler, since we always get back physical pages now.

* bmalloc/Heap.h:
* bmalloc/LargeObject.h:
(bmalloc::LargeObject::end):
(bmalloc::LargeObject::owner):
(bmalloc::LargeObject::setOwner):
(bmalloc::LargeObject::isValidAndFree):
(bmalloc::LargeObject::merge): Do not merge objects across heaps since
that causes madvise churn.
(bmalloc::LargeObject::validateSelf):
(bmalloc::LargeObject::init):
(bmalloc::LargeObject::hasPhysicalPages): Deleted.
(bmalloc::LargeObject::setHasPhysicalPages): Deleted. Propogate the Owner API.

* bmalloc/Owner.h: Added.

* bmalloc/SegregatedFreeList.cpp:
(bmalloc::SegregatedFreeList::SegregatedFreeList):
(bmalloc::SegregatedFreeList::insert):
(bmalloc::SegregatedFreeList::takeGreedy):
(bmalloc::SegregatedFreeList::take):
* bmalloc/SegregatedFreeList.h: Propogate the owner API.

* bmalloc/VMAllocate.h:
(bmalloc::vmDeallocatePhysicalPagesSloppy):
(bmalloc::vmAllocatePhysicalPagesSloppy): Clarified these functions and
removed an edge case.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::VMHeap):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateSmallPage):
(bmalloc::VMHeap::allocateMediumPage):
(bmalloc::VMHeap::allocateLargeObject):
(bmalloc::VMHeap::deallocateLargeObject): Be sure to give each object
a new chance to merge, since it might have been prohibited from merging
before by virtue of not being in the VM heap.

(bmalloc::VMHeap::allocateLargeRange): Deleted.
(bmalloc::VMHeap::deallocateLargeRange): Deleted.

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

4 years agoUpdating more tests after r177774
mmaxfield@apple.com [Sat, 28 Feb 2015 00:28:12 +0000 (00:28 +0000)]
Updating more tests after r177774

Unreviewed.

Most of these tests simply need to be updated. However, I found two real bugs while
going through these!

* fast/css-generated-content/after-with-inline-continuation-expected.html:
* fast/css-generated-content/after-with-inline-continuation.html:
* fast/inline/hidpi-pixel-gap-between-adjacent-selection-inlines-expected.html:
* fast/inline/hidpi-select-inline-on-subpixel-position-expected.html:
* fast/inline/hidpi-select-inline-on-subpixel-position.html:
* fast/lists/rtl-marker-expected.html:
* fast/lists/rtl-marker.html:
* fast/multicol/cell-shrinkback-expected.html:
* fast/multicol/cell-shrinkback.html:
* fast/multicol/newmulticol/breaks-3-columns-3-expected.html:
* fast/multicol/newmulticol/breaks-3-columns-3.html:
* fast/regions/last-region-border-radius-expected.html:
* fast/regions/last-region-border-radius.html:
* fast/regions/overflow/overflow-first-and-last-regions.html:
* fast/regions/overflow/overflow-in-uniform-regions-dynamic-expected.html:
* fast/regions/overflow/overflow-in-uniform-regions-dynamic.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-large-radius-expected.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-large-radius.html:
* fast/shapes/shape-outside-floats/shape-outside-rounded-inset-expected.html:
* fast/shapes/shape-outside-floats/shape-outside-rounded-inset.html:
* fast/table/td-width-fifty-percent-regression-expected.html:
* fast/table/td-width-fifty-percent-regression.html:
* fast/text/complex-initial-advance-expected.html:
* fast/text/complex-initial-advance.html:
* platform/mac/TestExpectations:

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

4 years ago[Subpixel] Subpixelize RenderListMarker
mmaxfield@apple.com [Sat, 28 Feb 2015 00:23:15 +0000 (00:23 +0000)]
[Subpixel] Subpixelize RenderListMarker
https://bugs.webkit.org/show_bug.cgi?id=142093

Reviewed by Zalan Bujtas.

Source/WebCore:

Use floats instead of ints.

Test: fast/lists/rtl-marker.html

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderListMarker.h:

LayoutTests:

* platform/mac/TestExpectations: Unskip fast/lists/rtl-marker.html

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

4 years ago<attachment> should be selected immediately upon click, and be drag/copyable upon...
timothy_horton@apple.com [Sat, 28 Feb 2015 00:09:09 +0000 (00:09 +0000)]
<attachment> should be selected immediately upon click, and be drag/copyable upon click
https://bugs.webkit.org/show_bug.cgi?id=142114
<rdar://problem/19982520>

Reviewed by Enrica Casucci.

* css/html.css:
(attachment):
Make attachment use 'user-select: all' to act as a single click-to-select unit.

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFocus): Deleted.
* html/HTMLAttachmentElement.h:
* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::isFocused): Deleted.
(WebCore::RenderAttachment::focusChanged): Deleted.
* rendering/RenderAttachment.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintAttachment):
Remove focus-related code; instead of focusing the element upon click,
we get a selection including just the <attachment>, and everything
behaves much more consistently (copy works, drag works, etc.).

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

4 years agoTest gardening, unmark now passing tests.
ap@apple.com [Sat, 28 Feb 2015 00:06:48 +0000 (00:06 +0000)]
Test gardening, unmark now passing tests.

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

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

4 years ago[iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsFor...
mmaxfield@apple.com [Sat, 28 Feb 2015 00:02:53 +0000 (00:02 +0000)]
[iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
https://bugs.webkit.org/show_bug.cgi?id=141371

Reviewed by David Kilzer.

Source/WebCore:

Null checks.

Covered by existing mathml tests.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::boundsForGlyph):
(WebCore::RenderMathMLOperator::advanceForGlyph):
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):

LayoutTests:

Updating expected results and TestExpectations

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/mathml/opentype/horizontal-munderover-expected.txt:
* platform/ios-simulator/mathml/opentype/large-operators-expected.txt:
* platform/ios-simulator/mathml/opentype/vertical-expected.txt:

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

4 years agoMake SourceBuffer ActiveDOMObject suspendable
cdumez@apple.com [Fri, 27 Feb 2015 23:46:01 +0000 (23:46 +0000)]
Make SourceBuffer ActiveDOMObject suspendable
https://bugs.webkit.org/show_bug.cgi?id=142108
<rdar://problem/19923085>

Reviewed by Jer Noble.

Source/WebCore:

Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
MediaSource and does not have any pending events. This makes it more
likely for pages using SourceBuffer objects to go into the PageCache.

Test: fast/history/page-cache-removed-source-buffer.html

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::canSuspend):
* Modules/mediasource/SourceBuffer.h:

LayoutTests:

Add a layout tests to check that a SourceBuffer removed from its
MediaSource does not prevent a Page from entering PageCache.

* fast/history/page-cache-removed-source-buffer-expected.txt: Added.
* fast/history/page-cache-removed-source-buffer.html: Added.

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

4 years agoAdd support for canvas ellipse method
dino@apple.com [Fri, 27 Feb 2015 23:40:35 +0000 (23:40 +0000)]
Add support for canvas ellipse method
https://bugs.webkit.org/show_bug.cgi?id=82791
<rdar://problem/11159172>

Patch by Sam Weinig <sam@webkit.org> on 2015-02-26
Reviewed by Dirk Schulze.

Source/WebCore:

Tests: fast/canvas/canvas-ellipse-360-winding.html
       fast/canvas/canvas-ellipse-circumference-fill.html
       fast/canvas/canvas-ellipse-circumference.html
       fast/canvas/canvas-ellipse-connecting-line.html
       fast/canvas/canvas-ellipse-negative-radius.html
       fast/canvas/canvas-ellipse-zero-lineto.html
       fast/canvas/canvas-ellipse.html

* html/canvas/CanvasPathMethods.h:
* html/canvas/CanvasPathMethods.cpp:
(WebCore::CanvasPathMethods::lineTo):
Convenience for passing a FloatPoint instead of two floats.

(WebCore::normalizeAngles):
Normalizes the angles as described in the HTML spec. Ensuring the startAngle
is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
from the start angle.

(WebCore::CanvasPathMethods::arc):
- Renames some of the parameters to be clearer.
- Normalizes the angles for consistency with ellipse.
- Moves hasInvertibleTransform() higher in the function for consistency.

(WebCore::CanvasPathMethods::ellipse): Added.

* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
Add ellipse(...).

* platform/graphics/Path.h:
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::addArc):
Rename parameters for clarity and use a nullptr.

(WebCore::Path::addEllipse):
Added. Constructs an ellipse via a transformed arc.

LayoutTests:

* fast/canvas/canvas-ellipse-360-winding-expected.txt: Added.
* fast/canvas/canvas-ellipse-360-winding.html: Added.
* fast/canvas/canvas-ellipse-circumference-expected.txt: Added.
* fast/canvas/canvas-ellipse-circumference-fill-expected.txt: Added.
* fast/canvas/canvas-ellipse-circumference-fill.html: Added.
* fast/canvas/canvas-ellipse-circumference.html: Added.
* fast/canvas/canvas-ellipse-connecting-line-expected.html: Added.
* fast/canvas/canvas-ellipse-connecting-line.html: Added.
* fast/canvas/canvas-ellipse-expected.txt: Added.
* fast/canvas/canvas-ellipse-negative-radius-expected.txt: Added.
* fast/canvas/canvas-ellipse-negative-radius.html: Added.
* fast/canvas/canvas-ellipse-zero-lineto-expected.txt: Added.
* fast/canvas/canvas-ellipse-zero-lineto.html: Added.
* fast/canvas/canvas-ellipse.html: Added.
* fast/canvas/script-tests/canvas-ellipse-360-winding.js: Added.
* fast/canvas/script-tests/canvas-ellipse.js: Added.
* fast/canvas/script-tests/js-ellipse-implementation.js: Added.
* platform/mac/fast/canvas/canvas-ellipse-circumference-expected.png: Added.
* platform/mac/fast/canvas/canvas-ellipse-circumference-fill-expected.png: Added.

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

4 years agoTest more features of content extensions.
commit-queue@webkit.org [Fri, 27 Feb 2015 23:37:07 +0000 (23:37 +0000)]
Test more features of content extensions.
https://bugs.webkit.org/show_bug.cgi?id=142100

Patch by Alex Christensen <achristensen@webkit.org> on 2015-02-27
Reviewed by Brady Eidson.

* http/tests/usercontentfilter/basic-filter.html:
* http/tests/usercontentfilter/basic-filter.html.json:
* platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt:

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

4 years agoWeb Inspector: Use Maps in ResourceCollection instead of objects
commit-queue@webkit.org [Fri, 27 Feb 2015 23:35:12 +0000 (23:35 +0000)]
Web Inspector: Use Maps in ResourceCollection instead of objects
https://bugs.webkit.org/show_bug.cgi?id=142101

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-27
Reviewed by Timothy Hatcher.

* UserInterface/Models/ResourceCollection.js:
(WebInspector.ResourceCollection):
(WebInspector.ResourceCollection.prototype.resourcesWithType):
(WebInspector.ResourceCollection.prototype.removeAllResources):
(WebInspector.ResourceCollection.prototype.resourceForURL):
(WebInspector.ResourceCollection.prototype._associateWithResource):
(WebInspector.ResourceCollection.prototype._disassociateWithResource):
(WebInspector.ResourceCollection.prototype._resourceURLDidChange):
(WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
Use Maps instead of objects.

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

4 years agoAdd ability for run-jsc-benchmarks to set library path from test binary when run...
msaboff@apple.com [Fri, 27 Feb 2015 23:32:03 +0000 (23:32 +0000)]
Add ability for run-jsc-benchmarks to set library path from test binary when run on a build bot
https://bugs.webkit.org/show_bug.cgi?id=142112

Reviewed by Filip Pizlo.

Added check for VMs in the form of <someDir>/{DumpRenderTree,webkitTestRunner,jsc} and use
<someDir> as the library path.

* Scripts/run-jsc-benchmarks:

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

4 years agoSome WebGL tests fail on ATI hardware
ap@apple.com [Fri, 27 Feb 2015 23:31:57 +0000 (23:31 +0000)]
Some WebGL tests fail on ATI hardware
https://bugs.webkit.org/show_bug.cgi?id=93560
rdar://problem/19991477

* platform/mac/TestExpectations: Updating expectations, as this is not limited to
Mavericks.

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

4 years agoAdding support for serializing HTMLAttachment elements.
enrica@apple.com [Fri, 27 Feb 2015 23:07:03 +0000 (23:07 +0000)]
Adding support for serializing HTMLAttachment elements.
https://bugs.webkit.org/show_bug.cgi?id=142026

Reviewed by Tim Horton.

Source/WebCore:

Test: editing/pasteboard/copy-paste-attachment.html

Adding support to serialize the attachment element
and properly handle it when converting a DOM range
to NSAttributedString.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processElement):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
for attachment element when serializating.
(WebCore::StyledMarkupAccumulator::appendElement):
(WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
when creating the fragment.
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::file): Added const to file() to
use it in appendCustonAttributes where the element is a const reference.
* html/HTMLAttachmentElement.h:
* html/HTMLAttributeNames.in:

LayoutTests:

* editing/pasteboard/copy-paste-attachment-expected.txt: Added.
* editing/pasteboard/copy-paste-attachment.html: Added.

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

4 years ago<attachment> should have an inactive style (gray in background)
timothy_horton@apple.com [Fri, 27 Feb 2015 23:00:03 +0000 (23:00 +0000)]
<attachment> should have an inactive style (gray in background)
https://bugs.webkit.org/show_bug.cgi?id=142103
<rdar://problem/19982486>

Reviewed by Dan Bernstein.

* rendering/RenderThemeMac.mm:
(WebCore::attachmentLabelInactiveBackgroundColor):
(WebCore::attachmentLabelInactiveTextColor):
(WebCore::RenderThemeMac::paintAttachmentLabelBackground):
(WebCore::RenderThemeMac::paintAttachmentLabel):
Use a gray background and gray text when the selection containing the
attachment isn't focused and active.

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

4 years agoAdd a "block-cookies" rule to the user content filter.
beidson@apple.com [Fri, 27 Feb 2015 22:50:03 +0000 (22:50 +0000)]
Add a "block-cookies" rule to the user content filter.
https://bugs.webkit.org/show_bug.cgi?id=142105

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/usercontentfilter/block-cookies-basic.html
       http/tests/usercontentfilter/block-cookies-send.html

* contentextensions/ContentExtensionRule.h:

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
* contentextensions/ContentExtensionsBackend.h:

* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadAction):

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):

* page/UserContentController.cpp:
(WebCore::UserContentController::actionForURL):
(WebCore::UserContentController::contentFilterBlocksURL): Deleted.
* page/UserContentController.h:

LayoutTests:

* http/tests/cookies/resources/echo-cookies.php: Added.
* http/tests/usercontentfilter/block-cookies-basic-expected.txt: Added.
* http/tests/usercontentfilter/block-cookies-basic.html: Added.
* http/tests/usercontentfilter/block-cookies-basic.html.json: Added.
* http/tests/usercontentfilter/block-cookies-send-expected.txt: Added.
* http/tests/usercontentfilter/block-cookies-send.html: Added.
* http/tests/usercontentfilter/block-cookies-send.html.json: Added.

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

4 years agoLookup panel dismisses when pages are loading in other tabs/windows
bdakin@apple.com [Fri, 27 Feb 2015 22:45:33 +0000 (22:45 +0000)]
Lookup panel dismisses when pages are loading in other tabs/windows
https://bugs.webkit.org/show_bug.cgi?id=142104
-and corresponding-
rdar://problem/19882137

Reviewed by Tim Horton.

Until rdar://problem/13875766 is resolved, we should only call into Lookup and
DataDetectors for key windows.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):

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

4 years ago[WinCairo] Unreviewed build fix.
achristensen@apple.com [Fri, 27 Feb 2015 22:17:09 +0000 (22:17 +0000)]
[WinCairo] Unreviewed build fix.

Source/WebCore:

* platform/graphics/BitmapImage.h:
* platform/win/BitmapInfo.h:
Added WEBCORE_EXPORT.

Tools:

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props:
Use TestWebKitAPIPrefix.h like in TestWebKitAPICommon.props.

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

4 years ago<attachment>'s label baseline should match that of the surrounding text
timothy_horton@apple.com [Fri, 27 Feb 2015 21:56:43 +0000 (21:56 +0000)]
<attachment>'s label baseline should match that of the surrounding text
https://bugs.webkit.org/show_bug.cgi?id=142099
rdar://problem/19982495

Reviewed by Dan Bernstein.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::baselinePosition):
* rendering/RenderAttachment.h:
Override baselinePosition and retrieve it from RenderTheme.

* rendering/RenderTheme.h:
(WebCore::RenderTheme::attachmentBaseline):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::AttachmentLayout::AttachmentLayout):
(WebCore::RenderThemeMac::attachmentBaseline):
Plumb the label baseline from AttachmentLayout to RenderAttachment.

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

4 years agoUnreviewed, rolling out r180752.
commit-queue@webkit.org [Fri, 27 Feb 2015 21:42:31 +0000 (21:42 +0000)]
Unreviewed, rolling out r180752.
https://bugs.webkit.org/show_bug.cgi?id=142098

Causes 10 SVG test failures on Windows. (Requested by
bfulgham_ on #webkit).

Reverted changeset:

"Cache glyph widths to GlyphPages"
https://bugs.webkit.org/show_bug.cgi?id=142028
http://trac.webkit.org/changeset/180752

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

4 years agoiOS, GTK, and EFL rebaselines after r180726.
rniwa@webkit.org [Fri, 27 Feb 2015 21:40:05 +0000 (21:40 +0000)]
iOS, GTK, and EFL rebaselines after r180726.

* platform/efl/editing/inserting/5058163-1-expected.txt:
* platform/gtk/editing/inserting/5058163-1-expected.txt:
* platform/ios-simulator-wk2/editing/inserting/5058163-1-expected.txt:

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

4 years ago[iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPriva...
ddkilzer@apple.com [Fri, 27 Feb 2015 21:39:31 +0000 (21:39 +0000)]
[iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>

* platform/spi/ios/OpenGLESSPI.h:  Define EAGL_IOSURFACE macro
until header refactoring is completed.

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

4 years agoUnreviewed, skip tests added in r180771 on platforms that don't support IndexedDB.
cdumez@apple.com [Fri, 27 Feb 2015 21:34:51 +0000 (21:34 +0000)]
Unreviewed, skip tests added in r180771 on platforms that don't support IndexedDB.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

4 years ago[Win] Skip IndexDB tests on Windows since it's not implemented.
bfulgham@apple.com [Fri, 27 Feb 2015 21:27:58 +0000 (21:27 +0000)]
[Win] Skip IndexDB tests on Windows since it's not implemented.

* platform/win/TestExpectations:

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

4 years agoMediaSource should be suspendable when closed
cdumez@apple.com [Fri, 27 Feb 2015 21:18:39 +0000 (21:18 +0000)]
MediaSource should be suspendable when closed
https://bugs.webkit.org/show_bug.cgi?id=142089
<rdar://problem/19923085>

Reviewed by Jer Noble.

Source/WebCore:

Make MediaSource ActiveDOMObject suspendable when it is in closed state
and it has no pending events. This increases the likelihood of pages
using MediaSource to enter the PageCache.

Tests: fast/history/page-cache-media-source-closed-2.html
       fast/history/page-cache-media-source-closed.html
       fast/history/page-cache-media-source-opened.html

LayoutTests:

Add layout tests to check that:
- Pages with an open MediaSource do not enter the PageCache
- Pages with an initially closed MediaSource enter the PageCache
- Pages with a MediaSource that changed state from opened to closed
  enter the PageCache.

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

4 years agoAdd infrastructure for handling website data in the network process
andersca@apple.com [Fri, 27 Feb 2015 20:14:22 +0000 (20:14 +0000)]
Add infrastructure for handling website data in the network process
https://bugs.webkit.org/show_bug.cgi?id=142092

Reviewed by Andreas Kling.

Source/WebKit2:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
Send back "Did" messages without actually doing anything for now.

* NetworkProcess/NetworkProcess.h:
Add new members.

* NetworkProcess/NetworkProcess.messages.in:
Add FetchWebsiteData and DeleteWebsiteDataForOrigins messages.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
Assert that all maps are empty.

(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
Add callbacks and send fetch and delete messages respectively.

(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
Make sure to invoke all callbacks.

(WebKit::NetworkProcessProxy::didFetchWebsiteData):
Find the callback and invoke it.

(WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):
Ditto.

* UIProcess/Network/NetworkProcessProxy.h:
Add new members.

* UIProcess/Network/NetworkProcessProxy.messages.in:
Add DidFetchWebsiteData and DidDeleteWebsiteDataForOrigins messages.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):
Just pass an empty WebsiteData object.

Tools:

Add a menu item that will fetch all website data, delete the returned data records, and
fetch all website data again so we can confirm that it's all empty.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController fetchAndClearWebsiteData:]):

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

4 years agoUse NeverDestroyed for JS wrapper owners.
akling@apple.com [Fri, 27 Feb 2015 19:52:11 +0000 (19:52 +0000)]
Use NeverDestroyed for JS wrapper owners.
<https://webkit.org/b/142090>

Reviewed by Chris Dumez.

Using NeverDestroyed puts these objects in BSS which is preferable
since that prevents them from pinning down entire malloc pages forever.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.

* bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.

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

4 years agoMake IDBDatabase / IDBRequest suspendable
cdumez@apple.com [Fri, 27 Feb 2015 19:24:25 +0000 (19:24 +0000)]
Make IDBDatabase / IDBRequest suspendable
https://bugs.webkit.org/show_bug.cgi?id=142076
<rdar://problem/19923085>

Reviewed by Andreas Kling.

Source/WebCore:

Make IDBDatabase / IDBRequest suspendable under certain conditions to
make it more likely for pages using indexeddb to enter the PageCache.

IDBDatabase is safely suspendable if the database is closed. IDBRequest
is safely suspendable if the request no longer has any pending activity
(i.e. state is DONE and success / failure handler was called). We may
be able to do better later but this is the bare minimum for now.

Tests: fast/history/page-cache-indexed-closed-db.html
       fast/history/page-cache-indexed-opened-db.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::closeConnection):
(WebCore::IDBDatabase::enqueueEvent):
(WebCore::IDBDatabase::canSuspend):
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::canSuspend):
* Modules/indexeddb/IDBRequest.h:

LayoutTests:

Add layout tests to make sure that:
- A page with an open indexeddb database is not page-cacheable
- A page with a closed indexeddb database is page-cacheable

* fast/history/page-cache-indexed-closed-db-expected.txt: Added.
* fast/history/page-cache-indexed-closed-db.html: Added.
* fast/history/page-cache-indexed-opened-db-expected.txt: Added.
* fast/history/page-cache-indexed-opened-db.html: Added.

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

4 years agoDrop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContai...
cdumez@apple.com [Fri, 27 Feb 2015 19:22:10 +0000 (19:22 +0000)]
Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
https://bugs.webkit.org/show_bug.cgi?id=142052

Reviewed by Andreas Kling.

Source/WebCore:

Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
returning false so pages using WebDatabase would never enter the PageCache anyway.

This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
return false when there are open databases. This check is now equivalent to the one
that was in PageCache.

An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
to false so once a page opened a database, it will never be page-cacheable. This
will be taken care of separately though.

Test: fast/history/page-cache-webdatabase-opened-db.html

* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::canSuspend):
* Modules/webdatabase/DatabaseContext.h:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
* page/DiagnosticLoggingKeys.h:

LayoutTests:

Add a layout test to check that a page with an open WebDatabase does
not enter the PageCache.

* fast/history/page-cache-webdatabase-opened-db-expected.txt: Added.
* fast/history/page-cache-webdatabase-opened-db.html: Added.

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

4 years agoCompile DFA to bytecode.
achristensen@apple.com [Fri, 27 Feb 2015 19:20:27 +0000 (19:20 +0000)]
Compile DFA to bytecode.
https://bugs.webkit.org/show_bug.cgi?id=142031

Reviewed by Benjamin Poulain.

* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
* contentextensions/ContentExtensionsBackend.h:
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::nextState): Deleted.
(WebCore::ContentExtensions::DFA::actions): Deleted.
* contentextensions/DFA.h:
(WebCore::ContentExtensions::DFA::size):
(WebCore::ContentExtensions::DFA::nodeAt):
* contentextensions/DFABytecode.h: Added.
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp: Added.
(WebCore::ContentExtensions::append):
(WebCore::ContentExtensions::set32Bits):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
(WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
(WebCore::ContentExtensions::DFABytecodeCompiler::compile):
* contentextensions/DFABytecodeCompiler.h: Added.
(WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
* contentextensions/DFABytecodeInterpreter.cpp: Added.
(WebCore::ContentExtensions::getBits):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h: Added.
(WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):

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

4 years ago[WK2] REGRESSION(r180465): WebKit::WebPage::editorState() triggers a layout.
enrica@apple.com [Fri, 27 Feb 2015 18:50:20 +0000 (18:50 +0000)]
[WK2] REGRESSION(r180465): WebKit::WebPage::editorState() triggers a layout.
https://bugs.webkit.org/show_bug.cgi?id=142015

Reviewed by Alexey Proskuryakov.

We no longer compute the font information at selection
when we update the editor state.
Instead, we request the font information only when the selection
changes and the font panel is visible.
I added an observer to be notified of the font panel visibility
changes to update NSFontManager to reflect the font at the
current selection.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/API/mac/WKView.mm:
(-[WKView updateFontPanelIfNeeded]):
(-[WKView _selectionChanged]):
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView observeValueForKeyPath:ofObject:change:context:]):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::fontAtSelection):
(WebKit::WebPageProxy::fontAtSelectionCallback):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState):
(WebKit::WebPage::fontAtSelection):

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

4 years agoUse after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
zalan@apple.com [Fri, 27 Feb 2015 18:43:48 +0000 (18:43 +0000)]
Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
https://bugs.webkit.org/show_bug.cgi?id=138366

Reviewed by Dave Hyatt.

This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.

In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
When a child is being detached from the tree, it removes itself from this hashmap.
We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
is inside a flow too and continue the cleanup accordingly.

Source/WebCore:

Test: fast/regions/region-with-multicolumn-embedded-crash.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):

LayoutTests:

* fast/regions/region-with-multicolumn-embedded-crash-expected.txt: Added.
* fast/regions/region-with-multicolumn-embedded-crash.html: Added.

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

4 years agoAdd API to remove a single content filter.
beidson@apple.com [Fri, 27 Feb 2015 18:33:39 +0000 (18:33 +0000)]
Add API to remove a single content filter.
<rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088

Reviewed by Sam Weinig.

Source/WebCore:

* page/UserContentController.cpp:
(WebCore::UserContentController::removeUserContentFilter):
* page/UserContentController.h:

Source/WebKit2:

* Shared/WebPageGroupData.h:

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupRemoveUserContentFilter):

* UIProcess/API/C/WKPageGroup.h:
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _removeUserContentFilter:]):

* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserContentFilter):
(WebKit::WebUserContentControllerProxy::removeUserContentFilter):
(WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
* UIProcess/UserContent/WebUserContentControllerProxy.h:

* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserContentFilter):
(WebKit::WebPageGroup::removeUserContentFilter):
* UIProcess/WebPageGroup.h:

* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::removeUserContentFilter):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:

* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::removeUserContentFilter):
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in:

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

4 years ago[Win] Remove remaining SafariTheme cruft
bfulgham@apple.com [Fri, 27 Feb 2015 18:09:46 +0000 (18:09 +0000)]
[Win] Remove remaining SafariTheme cruft
https://bugs.webkit.org/show_bug.cgi?id=142075

Reviewed by Anders Carlsson.

Remove reference to SafariTheme-switching preference.

Source/WebCore:

Tested by existing layout tests.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* config.h:
* page/Settings.cpp:
(WebCore::Settings::fontRenderingMode):
(WebCore::Settings::setShouldPaintNativeControls): Deleted.
* page/Settings.h:
(WebCore::Settings::shouldPaintNativeControls): Deleted.
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarTheme::nativeTheme):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderTheme::themeForPage):

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebKitClassFactory.cpp:
(WebKitClassFactory::WebKitClassFactory):
(WebKitClassFactory::QueryInterface):
(WebKitClassFactory::AddRef):
(WebKitClassFactory::Release):
(WebKitClassFactory::CreateInstance):
(WebKitClassFactory::LockServer):
* WebPreferences.cpp:
(WebPreferences::shouldPaintNativeControls): Deleted.
(WebPreferences::setShouldPaintNativeControls): Deleted.
* WebPreferences.h:
* WebView.cpp:
(WebView::initWithFrame):
(WebView::notifyPreferencesChanged):

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
(prepareConsistentTestingEnvironment):

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

4 years ago[Win] Add another batch of debug assert failures.
bfulgham@apple.com [Fri, 27 Feb 2015 17:22:45 +0000 (17:22 +0000)]
[Win] Add another batch of debug assert failures.

* platform/win/TestExpectations:

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

4 years ago[Win] Rebaseline test after r180726.
bfulgham@apple.com [Fri, 27 Feb 2015 17:02:08 +0000 (17:02 +0000)]
[Win] Rebaseline test after r180726.

* platform/win/TestExpectations: Mark a flaky test.
* platform/win/editing/inserting/5058163-1-expected.txt:

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

4 years agoAdd comment about CSS value name mangling
mmaxfield@apple.com [Fri, 27 Feb 2015 16:59:18 +0000 (16:59 +0000)]
Add comment about CSS value name mangling

Unreviewed

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

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

4 years agoCache glyph widths to GlyphPages
antti@apple.com [Fri, 27 Feb 2015 16:12:13 +0000 (16:12 +0000)]
Cache glyph widths to GlyphPages
https://bugs.webkit.org/show_bug.cgi?id=142028

Reviewed by Andreas Kling.

Currently we have a separate cache in Font for glyph widths. In practice we always need
the widths so we can just cache them in GlyphPages. This simplifies the code and removes
a per-character hash lookup from WidthIterator.

* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::initCharWidths):
(WebCore::Font::platformGlyphInit):
(WebCore::createAndFillGlyphPage):
(WebCore::Font::computeWidthForGlyph):

    Rename to make it clear this doesn't cache.

(WebCore::GlyphPage::setGlyphDataForIndex):

    Initialize the width.
    This could go to GlyphPage.cpp if we had one.

* platform/graphics/Font.h:
(WebCore::Font::glyphZeroWidth):
(WebCore::Font::isZeroWidthSpaceGlyph):
(WebCore::Font::zeroGlyph): Deleted.
(WebCore::Font::setZeroGlyph): Deleted.
(WebCore::Font::widthForGlyph): Deleted.
* platform/graphics/FontCascade.cpp:
(WebCore::offsetToMiddleOfGlyph):
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::glyphDataForCharacter):
* platform/graphics/GlyphPage.h:
(WebCore::GlyphData::GlyphData):

    Return width too as part of GlyphData.

(WebCore::GlyphPage::glyphDataForIndex):
(WebCore::GlyphPage::setGlyphDataForCharacter):
(WebCore::GlyphPage::setGlyphDataForIndex):
(WebCore::GlyphPage::GlyphPage):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):

    No need to lookup width separately now.

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::advanceForGlyph):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::missingGlyphForFont):
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFont):

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

4 years agoUnreviewed, roll out r180723. It broke a bunch of tests.
fpizlo@apple.com [Fri, 27 Feb 2015 07:26:23 +0000 (07:26 +0000)]
Unreviewed, roll out r180723. It broke a bunch of tests.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::constLocal):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ConstDeclNode::emitCodeSingle):
* tests/stress/const-arguments.js: Removed.

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

4 years agoiOS build fix after r180717.
ap@apple.com [Fri, 27 Feb 2015 06:06:46 +0000 (06:06 +0000)]
iOS build fix after r180717.

* Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):

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

4 years agoisEditablePosition and related functions shouldn't move position out of table
rniwa@webkit.org [Fri, 27 Feb 2015 05:51:31 +0000 (05:51 +0000)]
isEditablePosition and related functions shouldn't move position out of table
https://bugs.webkit.org/show_bug.cgi?id=129200

Reviewed by Darin Adler.

Source/WebCore:

This patch removes the legacy editing position for elements display: table in its computed style.
Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
such an element for historical reasons. This forced us to update the style tree before computing
the editability of a position because we have to check the editability of the position outside
the element with display: table if the position was using such a legacy editing position.
e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
should still be considered editable if the parent node of the table was editable.

This patch replaces such a legacy editing position by using modern position types:
PositionIsBeforeAnchor and PositionIsAfterAnchor.

No new tests since there should be no change in the user perceived editing operations.

* dom/Position.cpp:
(WebCore::Position::previous): Setup the node and the offset correctly when the original position's
type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
position inside a table.
(WebCore::Position::next): Ditto.
(WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
of positions.
(WebCore::Position::atEndOfTree): Ditto.
(WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
for an atomic element or a table element as done in the equivalent code in Position::upstream.
(WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
(table, 1) when there are more than two children of the table.

* dom/PositionIterator.cpp:
(WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
positions. So convert it to a modern position by returning a position before or after a table here.
* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
is actually empty before executing the simple code path for an empty unsplittable element. Without
this check, block formatting a table element will fail.

* editing/htmlediting.cpp:
(WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
of a position before or after an element is determined by its parent, not the element itself.
(WebCore::isAtUnsplittableElement): Ditto.
(WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
an element with display: table. This is the code removal for which this patch was made.
(WebCore::editableRootForPosition): Ditto.

LayoutTests:

Rebaselined a test. There is no visual difference.

* platform/mac/editing/inserting/5058163-1-expected.txt:

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

4 years agoWeb Inspector: Add a subtle blue background for selected console messages
nvasilyev@apple.com [Fri, 27 Feb 2015 05:32:07 +0000 (05:32 +0000)]
Web Inspector: Add a subtle blue background for selected console messages
https://bugs.webkit.org/show_bug.cgi?id=142073

Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.css:
(.console-item.selected::after):
(.console-messages:focus .console-item.selected):
(.console-messages:focus .console-item.selected + .console-item):
(.console-error-level + .console-item):
(.console-error-level .section .header .title):
(.console-warning-level):
(.console-warning-level + .console-item):

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

4 years ago[Win] More test expectation updates.
bfulgham@apple.com [Fri, 27 Feb 2015 05:27:13 +0000 (05:27 +0000)]
[Win] More test expectation updates.

* platform/win/TestExpectations:

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

4 years agoBytecodeGenerator::constLocal() behaves identically to BytecodeGenerator::local(...
fpizlo@apple.com [Fri, 27 Feb 2015 05:12:46 +0000 (05:12 +0000)]
BytecodeGenerator::constLocal() behaves identically to BytecodeGenerator::local() for the purposes of its one caller
https://bugs.webkit.org/show_bug.cgi?id=142071

Rubber stamped by Benjamin Poulain.

The only behavioral differences between constLocal() and local() are:

- constLocal() doesn't have a special case for "this" that overrides other checks like the
  shouldOptimizeLocals() check.  But the one user of constLocal() is for the "const x"
  expression, and "const this" doesn't parse.

- constLocal() won't createArgumentsIfNecessary() for "arguments".  But it's harmless if
  it does, since its one user assigns to the local.

So, we can remove constLocal() and make its one caller use local() instead.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::constLocal): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ConstDeclNode::emitCodeSingle):
* tests/stress/const-arguments.js: Added.
(foo):
(check):

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

4 years agoWeb Inspector: Colored console messages apply text color to object tree properties
commit-queue@webkit.org [Fri, 27 Feb 2015 04:11:03 +0000 (04:11 +0000)]
Web Inspector: Colored console messages apply text color to object tree properties
https://bugs.webkit.org/show_bug.cgi?id=142051

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-26
Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectPreviewView.css:
(.object-preview):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree):
Default the color to black within Object Tree and Object Preview views.

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

4 years agoWeb Inspector: Clear Log on Reload clears some logs that were after reload
commit-queue@webkit.org [Fri, 27 Feb 2015 04:08:24 +0000 (04:08 +0000)]
Web Inspector: Clear Log on Reload clears some logs that were after reload
https://bugs.webkit.org/show_bug.cgi?id=142070

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-26
Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
We can bail after calling clearLog, since that will already start
a new session for us.

(WebInspector.LogContentView.prototype._clearLog):
Don't trigger a backend clear messages, since that will cause us to
clear messages received between the request and response.

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

4 years agoImplement <attachment> element appearance on Mac
timothy_horton@apple.com [Fri, 27 Feb 2015 02:07:22 +0000 (02:07 +0000)]
Implement <attachment> element appearance on Mac
https://bugs.webkit.org/show_bug.cgi?id=142023

Reviewed by Dean Jackson.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* css/html.css:
(attachment):
* platform/ThemeTypes.h:
Add a new -webkit-appearance value, attachment.

* WebCore.xcodeproj/project.pbxproj:
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFile):
Let the renderer know when the file changes (so it can relayout and repaint).

(WebCore::HTMLAttachmentElement::filePath):
(WebCore::HTMLAttachmentElement::fileName):
* html/HTMLAttachmentElement.h:
Handy acccessors for the full path and the name of the file.

* platform/spi/mac/IconServicesSPI.h: Added.
* platform/spi/mac/LaunchServicesSPI.h: Added.
Add some IconServices and LaunchServices SPI headers.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::RenderAttachment):
Don't have a default intrinsic size; we'll adjust in layout().

(WebCore::RenderAttachment::isSelected):
(WebCore::RenderAttachment::isFocused):
(WebCore::RenderAttachment::isSelectedOrFocused):
Factor out from paintReplaced().

(WebCore::RenderAttachment::layout):
Use RenderTheme to compute the intrinsic size of this attachment.

(WebCore::RenderAttachment::paintReplaced):
Use RenderTheme to paint the attachment.

(WebCore::RenderAttachment::representedFileChanged):
When the represented file changes, we need to recompute the intrinsic size and repaint.

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::adjustAttachmentStyle):
(WebCore::RenderTheme::paintAttachment):
Plumb through the attachment appearance.

* rendering/RenderAttachment.h:
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintAttachment):
(WebCore::RenderTheme::attachmentIntrinsicSize):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::attachmentIconBackgroundColor):
(WebCore::attachmentIconBorderColor):
(WebCore::AttachmentLayout):
AttachmentLayout lays out the innards of the RenderThemeMac attachment
presentation: an icon with an optional bordered background, with a label
underneath it with an optional background.

(WebCore::RenderThemeMac::attachmentIntrinsicSize):
(WebCore::paintAttachmentIconBackground):
(WebCore::paintAttachmentIcon):
(WebCore::RenderThemeMac::paintAttachmentLabelBackground):
(WebCore::RenderThemeMac::paintAttachmentLabel):
(WebCore::RenderThemeMac::paintAttachment):
Paint the attachment element. Paint the optional backgrounds (and swap
out the text color) if the element is selected/focused.

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

4 years agoAssertion fix for r180711: The bool returning form of BytecodeGenerator::addVar(...
mark.lam@apple.com [Fri, 27 Feb 2015 02:07:02 +0000 (02:07 +0000)]
Assertion fix for r180711: The bool returning form of BytecodeGenerator::addVar() can be removed.
<https://webkit.org/b/142064>

Reviewed by Joseph Pecoraro.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addVar):

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

4 years agoAX: Expose caret browsing preference to accessibility API
commit-queue@webkit.org [Fri, 27 Feb 2015 01:57:48 +0000 (01:57 +0000)]
AX: Expose caret browsing preference to accessibility API
https://bugs.webkit.org/show_bug.cgi?id=141862

Patch by Doug Russell <d_russell@apple.com> on 2015-02-26
Reviewed by Chris Fleizach.

Exposing the caret browsing setting on WebCore::Frame via the accessibility API would allow assistive tech apps to enable it contextually (for example, when the assistive tech app is running).
Enabling caret browsing when assistive tech apps are running greatly improves the reliability of keyboard navigation on the web. Most especially in cases where selection would be disrupted by focus events.

Source/WebCore:

Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
       platform/mac/accessibility/caret-browsing-attribute.html
       platform/mac/accessibility/caret-browsing-tab-selection.html

* accessibility/AccessibilityObject.h:
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::caretBrowsingEnabled):
(WebCore::AccessibilityObject::setCaretBrowsingEnabled):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(setBoolAttributeValueCallback):
(selectedTextMarkerRangeCallback):
(resetSelectedTextMarkerRangeCallback):
(AccessibilityUIElement::setBoolAttributeValue):
(AccessibilityUIElement::selectedTextMarkerRange):
(AccessibilityUIElement::resetSelectedTextMarkerRange):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setBoolAttributeValue):
(AccessibilityUIElement::selectedTextMarkerRange):
(AccessibilityUIElement::resetSelectedTextMarkerRange):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::selectedTextMarkerRange):
(WTR::AccessibilityUIElement::resetSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setBoolAttributeValue):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setBoolAttributeValue):
(WTR::AccessibilityUIElement::selectedTextMarkerRange):
(WTR::AccessibilityUIElement::resetSelectedTextMarkerRange):

LayoutTests:

* accessibility/parent-delete-expected.txt:
* platform/mac/accessibility/caret-browsing-arrow-nav-expected.txt: Added.
* platform/mac/accessibility/caret-browsing-arrow-nav.html: Added.
* platform/mac/accessibility/caret-browsing-attribute-expected.txt: Added.
* platform/mac/accessibility/caret-browsing-attribute.html: Added.
* platform/mac/accessibility/caret-browsing-tab-selection-expected.txt: Added.
* platform/mac/accessibility/caret-browsing-tab-selection.html: Added.
* platform/mac/accessibility/document-attributes-expected.txt:
* platform/mac/accessibility/resources/accessibility-helper.js: Added.
(clearSelectionAndFocusOnWebArea):
(elementAtStartMarkerOfSelectedTextMarkerRange):
(caretBrowsingEnabled):
(setCaretBrowsingEnabled):

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

4 years agoRemove unnecessary create() factory functions
gyuyoung.kim@samsung.com [Fri, 27 Feb 2015 01:56:38 +0000 (01:56 +0000)]
Remove unnecessary create() factory functions
https://bugs.webkit.org/show_bug.cgi?id=142039

Reviewed by Chris Dumez.

Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
and DatabaseUnpauseTask::create.

* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
(WebCore::DatabaseThread::setPaused):
(WebCore::DatabaseUnpauseTask::create): Deleted.
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::importKey):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::create): Deleted.
* html/HTMLMediaSession.h:

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

4 years agoMachineThreads::Thread clean up has a use after free race condition.
mark.lam@apple.com [Fri, 27 Feb 2015 01:25:21 +0000 (01:25 +0000)]
MachineThreads::Thread clean up has a use after free race condition.
<https://webkit.org/b/141990>

Reviewed by Filip Pizlo.

MachineThreads::Thread clean up relies on the clean up mechanism
implemented in _pthread_tsd_cleanup_key(), which looks like this:

void _pthread_tsd_cleanup_key(pthread_t self, pthread_key_t key)
{
    void (*destructor)(void *);
    if (_pthread_key_get_destructor(key, &destructor)) {
        void **ptr = &self->tsd[key];
        void *value = *ptr;

    // === Start of window for the bug to manifest =================

        // At this point, this thread has cached "destructor" and "value"
        // (which is a MachineThreads*).  If the VM gets destructed (along
        // with its MachineThreads registry) by another thread, then this
        // thread will have no way of knowing that the MachineThreads* is
        // now pointing to freed memory.  Calling the destructor below will
        // therefore result in a use after free scenario when it tries to
        // access the MachineThreads' data members.

        if (value) {
            *ptr = NULL;
            if (destructor) {

    // === End of window for the bug to manifest ==================

                destructor(value);
            }
        }
    }
}

The fix is to add each active MachineThreads to an ActiveMachineThreadsManager,
and always check if the manager still contains that MachineThreads object
before we call removeCurrentThread() on it.  When MachineThreads is destructed,
it will remove itself from the manager.  The add, remove, and checking
operations are all synchronized on the manager's lock, thereby ensuring that
the MachineThreads object, if found in the manager, will remain alive for the
duration of time we call removeCurrentThread() on it.

There's also possible for the MachineThreads object to already be destructed
and another one happened to have been instantiated at the same address.
Hence, we should only remove the exiting thread if it is found in the
MachineThreads object.

There is no test for this issue because this bug requires a race condition
between 2 threads where:
1. Thread B, which had previously used the VM, exiting and
   getting to the bug window shown in _pthread_tsd_cleanup_key() above.
2. Thread A destructing the VM (and its MachineThreads object)
   within that window of time before Thread B calls the destructor.

It is not possible to get a reliable test case without invasively
instrumenting _pthread_tsd_cleanup_key() or MachineThreads::removeCurrentThread()
to significantly increase that window of opportunity.

* heap/MachineStackMarker.cpp:
(JSC::ActiveMachineThreadsManager::Locker::Locker):
(JSC::ActiveMachineThreadsManager::add):
(JSC::ActiveMachineThreadsManager::remove):
(JSC::ActiveMachineThreadsManager::contains):
(JSC::ActiveMachineThreadsManager::ActiveMachineThreadsManager):
(JSC::activeMachineThreadsManager):
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::removeThreadIfFound):
(JSC::MachineThreads::removeCurrentThread): Deleted.
* heap/MachineStackMarker.h:

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

4 years agoWeb Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
joepeck@webkit.org [Fri, 27 Feb 2015 01:15:23 +0000 (01:15 +0000)]
Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
https://bugs.webkit.org/show_bug.cgi?id=142061

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/Debugger.json:
* inspector/protocol/Runtime.json:
Input flag "saveResult" on whether we should try to save a result.
Output int "savedResultIndex" to tell the frontend the saved state.

* inspector/InjectedScriptSource.js:
Handle saving and clearing $1-$99 values.
Include in BasicCommandLineAPI for JSContext inspection.

* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeEvalCall):
* inspector/InjectedScriptBase.h:
Allow an optional "savedResultIndex" out value on evals.

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::evaluate):
(Inspector::InjectedScript::evaluateOnCallFrame):
* inspector/InjectedScript.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::evaluate):
* inspector/agents/InspectorRuntimeAgent.h:
Plumbing for new in and out parameters.

Source/WebCore:

* inspector/CommandLineAPIModuleSource.js:
Replace $1-$4 "inspected objects" with $1-$99 "saved results".

* bindings/js/JSCommandLineAPIHostCustom.cpp:
(WebCore::JSCommandLineAPIHost::inspectedObject):
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::CommandLineAPIHost):
(WebCore::CommandLineAPIHost::InspectableObject::get):
(WebCore::CommandLineAPIHost::addInspectedObject):
(WebCore::CommandLineAPIHost::inspectedObject):
(WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
* inspector/CommandLineAPIHost.h:
* inspector/CommandLineAPIHost.idl:
Since we now just save the single $0 inspected object, eliminate
keeping track of a list of 5 values.

Source/WebInspectorUI:

* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evalCallback):
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Add a saveResult parameter for the new protocol command in parameter.

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype._rootPropertyPathForObject):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.appendTitleSuffix):
For console evaluation results, show a "= $n" when the evaluation was
given a saved result index.

* UserInterface/Views/LogContentView.css:
(.console-saved-variable):
* UserInterface/Views/ObjectPreviewView.css:
(.object-preview-name):
Make $n and class names in previews always non-italics.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.printResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(get WebInspector.JavaScriptRuntimeCompletionProvider.prototype.):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
Try to provide better autocompletion for $n, by populating autocompletion menus
from $1-$n where n is the maximum saved result index seen. Clear the maximum
when we clear the console.

* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.clearMaximumSavedResultIndex):
Keep track of the maximum savedResultIndex for console evaluation results.

LayoutTests:

* inspector/debugger/command-line-api-exception-nested-catch.html:
* inspector/debugger/command-line-api-exception.html:
* inspector/model/remote-object-get-properties.html:
* inspector/model/remote-object-weak-collection.html:
* inspector/model/remote-object.html:
Update evaluateInInspectedWindow call sites for new parameter.

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

4 years agoWeb Inspector: Set/Map appear as lossless when they have lossy entries
joepeck@webkit.org [Fri, 27 Feb 2015 01:15:17 +0000 (01:15 +0000)]
Web Inspector: Set/Map appear as lossless when they have lossy entries
https://bugs.webkit.org/show_bug.cgi?id=142050

Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
Take into account the lossless states of entry keys and values.

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

4 years agoWeb Inspector: New ObjectTree UI for Arrays / Maps / Sets
joepeck@webkit.org [Fri, 27 Feb 2015 01:15:15 +0000 (01:15 +0000)]
Web Inspector: New ObjectTree UI for Arrays / Maps / Sets
https://bugs.webkit.org/show_bug.cgi?id=142037

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Miscellaneous changes.

* UserInterface/Models/PropertyDescriptor.js:
(WebInspector.PropertyDescriptor.prototype.isIndexProperty):
Useful for quickly checking if this property is numeric and possibly
an array index.

* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath.prototype.appendMapKey):
(WebInspector.PropertyPath.prototype.appendMapValue):
(WebInspector.PropertyPath.prototype.appendSetIndex):
Be specific about property paths into maps / sets. Note that a map
value may be displayable if the key is simple.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.hasValue):
A simple value RemoteObject may have the value "undefined". So provide
a falsey proof helper that actually checks if we have a value.

(WebInspector.RemoteObject.prototype.isArray):
(WebInspector.RemoteObject.prototype.backendGetOwnPropertyDescriptor):
(WebInspector.RemoteObject.prototype.wrappedCallback):
(WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor):
Currently backend APIs exist only to get all properties. In the case
of collections, we often want to get only one property (__proto__).
This is a simple implementation on top of callFunctionOn.

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype.appendUndefined): Deleted.
(WebInspector.ConsoleMessageImpl.prototype._printArray): Deleted.
(WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry): Deleted.
Simplify array formatted to just use an ObjectTreeView. Add fixmes
that we should seed the ObjectTreeView with a starting property path.

* UserInterface/Views/FormattedValue.css:
(.formatted-node > ol):
Sometimes, a node's display was getting overridden by various console styles.
Force a node to always display block. We may be able to remove this later.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
Helper for formatting a node / object / value more easily. This
is used by all collection types.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
We lost the nice sparse array support when switching to the new preview path,
we should add it back.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index):
(.object-tree-array-index > .titles):
(.object-tree-array-index > .icon):
(.object-tree-array-index .index-name):
(.object-tree-array-index .index-value .object-tree):
(.object-tree-array-index .index-value .object-tree .object-tree-outline):
(.object-tree-property + ol .object-tree-array-index):
New styles specific to array index tree elements.

* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name):
(.object-tree-map-entry.key):
(.object-tree-map-entry.key:first-of-type):
(.object-tree-map-entry):
New styles specific to map key/value tree elements.

* UserInterface/Views/ObjectTreeCollectionTreeElement.js: Removed.
Remove old collection implementation.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js: Added.
(WebInspector.ObjectTreeArrayIndexTreeElement):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype.get property):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValue):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathType):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._thisPropertyPath):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathString):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._updateTitle):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createInteractiveGetterElement.):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createReadOnlyIconElement):
Index followed by formatted value. Unfortunately a page can hack up an array
with getter properties, so also support getter values in an array. This ends
up copying a lot of ObjectTreePropertyTreeElement as a result.

* UserInterface/Views/ObjectTreeMapEntryTreeElement.js: Added.
(WebInspector.ObjectTreeMapEntryTreeElement):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.get object):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._propertyPathString):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeMapKeyTreeElement):
(WebInspector.ObjectTreeMapKeyTreeElement.prototype.displayPropertyName):
(WebInspector.ObjectTreeMapKeyTreeElement.prototype.resolvedValuePropertyPath):
(WebInspector.ObjectTreeMapValueTreeElement):
(WebInspector.ObjectTreeMapValueTreeElement.prototype.displayPropertyName):
(WebInspector.ObjectTreeMapValueTreeElement.prototype.resolvedValuePropertyPath):
Key/value followed by formatted value.

* UserInterface/Views/ObjectTreeSetIndexTreeElement.js: Added.
(WebInspector.ObjectTreeSetIndexTreeElement):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype.get object):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
Dot followed by formatted value.

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property > .titles):
Reformat.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree-property :matches(.formatted-string, .formatted-regexp)):
Upgrade generic styles.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
(WebInspector.ObjectTreeView.emptyMessageElement):
(WebInspector.ObjectTreeView.prototype.expand):
(WebInspector.ObjectTreeView.prototype.collapse):
(WebInspector.ObjectTreeView.prototype.update):
(WebInspector.ObjectTreeView.prototype._updateChildren):
(WebInspector.ObjectTreeView.prototype._updateEntries):
(WebInspector.ObjectTreeView.prototype._updateProperties):
(WebInspector.ObjectTreeView.prototype._handlePreviewOrTitleElementClick):
Both ObjectTreeView and ObjectTreePropertyTreeElement will fetch only collection
entries or properties depending on the type of the object being expanded.

(WebInspector.ObjectTreeView.prototype._trackWeakEntries):
(WebInspector.ObjectTreeView.prototype._untrackWeakEntries):
Allow WeakMap entries to be Garbage Collected when the ObjectTreeView
collapses or the console is cleared. FIXME for handling sub-tree WeakMaps.

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

4 years agoRemove unnecessary create() factory functions in CDMFoo, NamedNodeMap
gyuyoung.kim@samsung.com [Fri, 27 Feb 2015 01:04:19 +0000 (01:04 +0000)]
Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
https://bugs.webkit.org/show_bug.cgi?id=141902

Reviewed by Darin Adler.

Create instance using std::make_unique<> in CDMFactory directly. To do that,
CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.

No new tests, no behavior changes.

* Modules/encryptedmedia/CDM.cpp:
(WebCore::installedCDMFactories):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMPrivateClearKey.h:
(WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
(WebCore::CDMPrivateClearKey::create): Deleted.
* Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
(WebCore::CDMPrivateMediaPlayer::create): Deleted.
* dom/Element.cpp:
(WebCore::Element::attributes):
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::NamedNodeMap):
(WebCore::NamedNodeMap::create): Deleted.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
(WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.

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

4 years agoThe bool returning form of BytecodeGenerator::addVar() can be removed
fpizlo@apple.com [Fri, 27 Feb 2015 00:55:19 +0000 (00:55 +0000)]
The bool returning form of BytecodeGenerator::addVar() can be removed
https://bugs.webkit.org/show_bug.cgi?id=142064

Reviewed by Mark Lam.

It's easier to implement addVar() when you don't have to return whether it's a new
variable or not.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addVar):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::addVar): Deleted.

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

4 years ago[Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI...
aestes@apple.com [Fri, 27 Feb 2015 00:09:03 +0000 (00:09 +0000)]
[Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
https://bugs.webkit.org/show_bug.cgi?id=142062

Reviewed by Daniel Bates.

* WebCore.xcodeproj/project.pbxproj:
* platform/mac/ContentFilterMac.mm:
* platform/spi/cocoa/NEFilterSourceSPI.h: Added.
* platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.

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

4 years ago[Win] More Debug assertion updates.
bfulgham@apple.com [Thu, 26 Feb 2015 23:53:19 +0000 (23:53 +0000)]
[Win] More Debug assertion updates.

* platform/win/TestExpectations:

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

4 years agoAdd API to remove all website data for the given data records
andersca@apple.com [Thu, 26 Feb 2015 23:34:16 +0000 (23:34 +0000)]
Add API to remove all website data for the given data records
https://bugs.webkit.org/show_bug.cgi?id=142060

Reviewed by Beth Dakin.

Source/WebCore:

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeResourcesWithOrigins):
New function that removes all resources that match the set of origins in a given session.

Source/WebKit2:

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
Add new method declaration.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataRecords):
Add a helper function that converts an NSArray of _WKWebsiteDataRecords to a Vector of WebsiteDataRecords.

(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
Call through to the underlying WebsiteDataStore.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
Figure out which processes to call deleteWebsiteDataForOrigins for and do so. Add a callback aggregator so we can
call the completion handler at the right time.

* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new members.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::deleteWebsiteDataForOrigins):
Use the newly added MemoryCache member function to delete all resources matching the set of origins.

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

4 years ago[Win] Remove WebKitExportGenerator project (and related)
bfulgham@apple.com [Thu, 26 Feb 2015 23:26:03 +0000 (23:26 +0000)]
[Win] Remove WebKitExportGenerator project (and related)
https://bugs.webkit.org/show_bug.cgi?id=142035

Reviewed by Dean Jackson.

Source/WebKit:

* WebKit.vcxproj/WebKit.sln: Remove references to WebKitExportGenerator
* WebKit.vcxproj/WebKit.submit.sln: Ditto.
* WebKit.vcxproj/WebKit/WebKit.vcxproj: Ditto.
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters: Ditto.
* WebKit.vcxproj/WebKitExportGenerator: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj.filters: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorBuildCmd.cmd: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorCommon.props: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorDebug.props: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorDebugWinCairo.props: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPostBuild.cmd: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPreBuild.cmd: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorProduction.props: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorRelease.props: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorReleaseWinCairo.props: Removed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Removed.
* WebKit.vcxproj/WebKitExportGenerator/make-export-file-generator: Removed.

Tools:

* win/AssembleBuildLogs/AssembleLogs.cmd: Don't look for a
build log from WebKitExportGenerator.

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

4 years agoRename DatabaseManager::manager() to DatabaseManager::singleton()
cdumez@apple.com [Thu, 26 Feb 2015 23:22:17 +0000 (23:22 +0000)]
Rename DatabaseManager::manager() to DatabaseManager::singleton()
https://bugs.webkit.org/show_bug.cgi?id=142054

Reviewed by Ryosuke Niwa.

Rename DatabaseManager::manager() to DatabaseManager::singleton() as
per coding style and use WTF::NeverDestroyed.

Source/WebCore:

* Modules/webdatabase/DOMWindowWebDatabase.cpp:
(WebCore::DOMWindowWebDatabase::openDatabase):
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::DatabaseBackendBase):
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::DatabaseContext):
(WebCore::DatabaseContext::~DatabaseContext):
(WebCore::DatabaseContext::stopDatabases):
(WebCore::DatabaseContext::databaseExceededQuota):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::singleton):
(WebCore::DatabaseManager::manager): Deleted.
* Modules/webdatabase/DatabaseManager.h:
(WebCore::DatabaseManager::~DatabaseManager): Deleted.
* Modules/webdatabase/SQLTransactionClient.cpp:
(WebCore::SQLTransactionClient::didExceedQuota):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):

Source/WebKit/mac:

* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager init]):
(-[WebDatabaseManager origins]):
(-[WebDatabaseManager databasesWithOrigin:]):
(-[WebDatabaseManager detailsForDatabase:withOrigin:]):
(-[WebDatabaseManager deleteAllDatabases]):
(-[WebDatabaseManager deleteOrigin:]):
(-[WebDatabaseManager deleteDatabase:withOrigin:]):
* Storage/WebDatabaseQuotaManager.mm:
(-[WebDatabaseQuotaManager usage]):
(-[WebDatabaseQuotaManager quota]):
(-[WebDatabaseQuotaManager setQuota:]):
* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin usage]):
(-[WebSecurityOrigin quota]):
(-[WebSecurityOrigin setQuota:]):
* WebView/WebFrame.mm:
(-[WebFrame _cacheabilityDictionary]):
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* WebDatabaseManager.cpp:
(WebDatabaseManager::sharedWebDatabaseManager):
(WebDatabaseManager::origins):
(WebDatabaseManager::databasesWithOrigin):
(WebDatabaseManager::detailsForDatabase):
(WebDatabaseManager::deleteAllDatabases):
(WebDatabaseManager::deleteOrigin):
(WebDatabaseManager::deleteDatabase):
(WebDatabaseManager::setQuota):
(WebKitInitializeWebDatabasesIfNecessary):
* WebSecurityOrigin.cpp:
(WebSecurityOrigin::usage):
(WebSecurityOrigin::quota):
(WebSecurityOrigin::setQuota):
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::initialize):
(WebKit::WebDatabaseManager::getDatabasesByOrigin):
(WebKit::WebDatabaseManager::getDatabaseOrigins):
(WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManager::deleteAllDatabases):
(WebKit::WebDatabaseManager::setQuotaForOrigin):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

4 years agoVarious array access corner cases should take OSR exit feedback
fpizlo@apple.com [Thu, 26 Feb 2015 22:44:45 +0000 (22:44 +0000)]
Various array access corner cases should take OSR exit feedback
https://bugs.webkit.org/show_bug.cgi?id=142056

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:

Two major changes here:

- Don't keep converting GetById into GetArrayLength if we exited due to any kind of array
  type check.

- Use a generic form of GetByVal/PutByVal if we exited due to any kind of exotic checks,
  like the Arguments safety checks. We use the "ExoticObjectMode" for out-of-bounds on
  arguments for now, since it's a convenient way of forcing out-of-bounds to be handled by
  the Generic array mode.

* bytecode/ExitKind.cpp:
(JSC::exitKindToString):
* bytecode/ExitKind.h:
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::refine):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
(JSC::DFG::SpeculativeJIT::compileGetArgumentsLength):
* tests/stress/array-length-array-storage-plain-object.js: Added.
(foo):
* tests/stress/array-length-plain-object.js: Added.
(foo):

LayoutTests:

* js/regress/arguments-out-of-bounds-expected.txt: Added.
* js/regress/arguments-out-of-bounds.html: Added.
* js/regress/exit-length-on-plain-object-expected.txt: Added.
* js/regress/exit-length-on-plain-object.html: Added.
* js/regress/script-tests/arguments-out-of-bounds.js: Added.
(foo):
(bar):
* js/regress/script-tests/exit-length-on-plain-object.js: Added.
(foo):
* js/regress/script-tests/string-out-of-bounds.js: Added.
(bar):
* js/regress/string-out-of-bounds-expected.txt: Added.
* js/regress/string-out-of-bounds.html: Added.

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

4 years agobmalloc: Large object free list can grow infinitely
ggaren@apple.com [Thu, 26 Feb 2015 22:24:37 +0000 (22:24 +0000)]
bmalloc: Large object free list can grow infinitely
https://bugs.webkit.org/show_bug.cgi?id=142055

Reviewed by Andreas Kling.

By design, we don't eagerly remove large objects from the free list.
This creates two simple pathologies:

    (1) If you free and then allocate the same object repeatedly, it will
    duplicate itself in the free list repeatedly. Since it is never
    invalid at the time of allocation, it will never be removed.

    (2) If you split and then merge the same object repeatedly, it will
    duplicate its split sibling in the free list repeatedly. If its
    sibling is in a separate free list size class, it will never be
    consulted at the time of allocation, so it will never be removed.

So, a simple "while (1) { free(malloc(x)); }" causes infinite memory
use in the free list.

The solution in this patch is a simple helper to remove garbage from the
free list if it grows too large. This pathology is not common, so the
cost is OK.

Long-term, perhaps we should rethink the laziness of these free lists.

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::isMarked):
(bmalloc::BoundaryTag::setMarked): New bit, used by free list GC.

* bmalloc/FreeList.cpp:
(bmalloc::FreeList::removeInvalidAndDuplicateEntries): The GC algorithm.

* bmalloc/FreeList.h:
(bmalloc::FreeList::FreeList):
(bmalloc::FreeList::push): Invoke the GC if we're getting huge.

* bmalloc/LargeObject.h:
(bmalloc::LargeObject::isMarked):
(bmalloc::LargeObject::setMarked):
(bmalloc::LargeObject::validateSelf): Expose the new bit.

* bmalloc/Sizes.h: New constant to control GC frequency.

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

4 years agoFix the !ENABLE(GEOLOCATION) build after r180533
ossy@webkit.org [Thu, 26 Feb 2015 22:22:55 +0000 (22:22 +0000)]
Fix the !ENABLE(GEOLOCATION) build after r180533
https://bugs.webkit.org/show_bug.cgi?id=142053

Reviewed by Chris Dumez.

* Modules/geolocation/GeoNotifier.cpp:
* Modules/geolocation/GeoNotifier.h:

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

4 years ago[EFL] Bump EFL version to 1.13.0
ossy@webkit.org [Thu, 26 Feb 2015 22:04:13 +0000 (22:04 +0000)]
[EFL] Bump EFL version to 1.13.0
https://bugs.webkit.org/show_bug.cgi?id=141708

Reviewed by Gyuyoung Kim.

* efl/jhbuild.modules:

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

4 years ago[iOS Media] incorrect front padding on time values
dino@apple.com [Thu, 26 Feb 2015 21:04:06 +0000 (21:04 +0000)]
[iOS Media] incorrect front padding on time values
https://bugs.webkit.org/show_bug.cgi?id=142027
<rdar://problem/19960790>

Reviewed by Brent Fulgham.

My last commit was updating the OS X file,
not the iOS file.

We don't want to prefix times with a "0".

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.formatTime):
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.formatTime):

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

4 years agoURTBF after r180693.
ossy@webkit.org [Thu, 26 Feb 2015 20:40:57 +0000 (20:40 +0000)]
URTBF after r180693.

* CMakeLists.txt:

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

4 years ago2015-02-26 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 26 Feb 2015 20:20:07 +0000 (20:20 +0000)]
2015-02-26  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Mac build.

        Unreviewed.

        * bmalloc.xcodeproj/project.pbxproj: Make FreeList.h available.

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

4 years agobmalloc: Refactored SegregatedFreeList and BoundaryTag::init
ggaren@apple.com [Thu, 26 Feb 2015 20:05:14 +0000 (20:05 +0000)]
bmalloc: Refactored SegregatedFreeList and BoundaryTag::init
https://bugs.webkit.org/show_bug.cgi?id=142049

Reviewed by Anders Carlsson.

Split out a FreeList class from SegregatedFreeList. This will make it
easier to add behaviors on free list insertion and removal -- and it's
probably how I should have designed things at the start.

Moved BoundaryTag::init into LargeObject, since all the related logic
lives in LargeObject now too, and this allows us to remove BoundaryTagInlines.h.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/BoundaryTagInlines.h: Removed.
* bmalloc/FreeList.cpp: Copied from Source/bmalloc/bmalloc/SegregatedFreeList.cpp.
(bmalloc::FreeList::takeGreedy):
(bmalloc::FreeList::take):
(bmalloc::SegregatedFreeList::SegregatedFreeList): Deleted.
(bmalloc::SegregatedFreeList::insert): Deleted.
(bmalloc::SegregatedFreeList::takeGreedy): Deleted.
(bmalloc::SegregatedFreeList::take): Deleted.
* bmalloc/FreeList.h: Copied from Source/bmalloc/bmalloc/SegregatedFreeList.h.
(bmalloc::FreeList::push):
* bmalloc/LargeObject.h:
(bmalloc::LargeObject::init):
* bmalloc/SegregatedFreeList.cpp:
(bmalloc::SegregatedFreeList::SegregatedFreeList):
(bmalloc::SegregatedFreeList::insert):
(bmalloc::SegregatedFreeList::takeGreedy):
(bmalloc::SegregatedFreeList::take):
* bmalloc/SegregatedFreeList.h:
* bmalloc/Sizes.h:
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):

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

4 years agoDFG SSA stack accesses shouldn't speak of VariableAccessDatas
fpizlo@apple.com [Thu, 26 Feb 2015 19:51:52 +0000 (19:51 +0000)]
DFG SSA stack accesses shouldn't speak of VariableAccessDatas
https://bugs.webkit.org/show_bug.cgi?id=142036

Reviewed by Michael Saboff.

VariableAccessData is a useful thing in LoadStore and ThreadedCPS, but it's purely harmful in
SSA because you can't cook up new VariableAccessDatas. So, if you know that you want to load
or store to the stack, and you know what format to use as well as the location, then prior to
this patch you couldn't do it unless you found some existing VariableAccessData that matched
your requirements. That can be a hard task.

It's better if SSA doesn't speak of VariableAccessDatas but instead just has stack accesses
that speak of the things that a stack access needs: local, machineLocal, and format. This
patch changes the SSA way of accessing the stack to do just that.

Also add more IR validation.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGFlushFormat.h:
(JSC::DFG::isConcrete):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGGraph.h:
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::hasVariableAccessData):
* dfg/DFGNode.h:
(JSC::DFG::StackAccessData::StackAccessData):
(JSC::DFG::StackAccessData::flushedAt):
(JSC::DFG::Node::convertToPutStack):
(JSC::DFG::Node::convertToGetStack):
(JSC::DFG::Node::hasUnlinkedLocal):
(JSC::DFG::Node::hasStackAccessData):
(JSC::DFG::Node::stackAccessData):
(JSC::DFG::Node::willHaveCodeGenOrOSR):
* dfg/DFGNodeType.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGPutLocalSinkingPhase.cpp: Removed.
* dfg/DFGPutLocalSinkingPhase.h: Removed.
* dfg/DFGPutStackSinkingPhase.cpp: Copied from Source/JavaScriptCore/dfg/DFGPutLocalSinkingPhase.cpp.
(JSC::DFG::performPutStackSinking):
(JSC::DFG::performPutLocalSinking): Deleted.
* dfg/DFGPutStackSinkingPhase.h: Copied from Source/JavaScriptCore/dfg/DFGPutLocalSinkingPhase.h.
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
(JSC::DFG::Validate::validateCPS):
(JSC::DFG::Validate::validateSSA):
* dfg/DFGVirtualRegisterAllocationPhase.cpp:
(JSC::DFG::VirtualRegisterAllocationPhase::run):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetStack):
(JSC::FTL::LowerDFGToLLVM::compilePutStack):
(JSC::FTL::LowerDFGToLLVM::compileGetLocal): Deleted.
(JSC::FTL::LowerDFGToLLVM::compilePutLocal): Deleted.
* ftl/FTLOSRExit.h:
* tests/stress/many-sunken-locals.js: Added. This failure mode was caught by some miscellaneous test, so I figured I should write an explicit test for it.
(foo):
(bar):
(baz):
(fuzz):
(buzz):

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

4 years agoRolling out r180602, r180608, r180613, r180617, r180671.
mark.lam@apple.com [Thu, 26 Feb 2015 19:44:08 +0000 (19:44 +0000)]
Rolling out r180602, r180608, r180613, r180617, r180671.
<https://webkit.org/b/141990>

Not reviewed.

The r180602 solution does result in more work for GC when worker
threads are in use.  Filip is uncomfortable with that.
The EFL and GTK ports also seem to be unhappy with this change.
Rolling out while we investigate.

Source/JavaScriptCore:

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::gatherStackRoots):
(JSC::Heap::machineThreads): Deleted.
* heap/Heap.h:
(JSC::Heap::machineThreads):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
* heap/MachineStackMarker.h:
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

LayoutTests:

* platform/efl/TestExpectations:

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

4 years agoSource/JavaScriptCore:
mmaxfield@apple.com [Thu, 26 Feb 2015 19:39:11 +0000 (19:39 +0000)]
Source/JavaScriptCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

This patch implements initial parsing support for the -apple-trailing-word CSS property.
This property has two possible (mutually exclusive) values: auto and
-apple-partially-balanced. This property is inherited.

The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.

This is an internal property that will allow us to control line breaking behavior for
short paragraphs.

Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
the new value must be implemented as -webkit-partially-balanced. Using the -apple-
prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
version.

Test: platform/mac/fast/text/trailing-word-parse.html

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
CSS value.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
pair.
(WebCore::isKeywordPropertyID): New property is a keyword property.
(WebCore::CSSParser::parseValue): Use the keyword property codepath.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
representation and CSS values.
(WebCore::CSSPrimitiveValue::operator TrailingWord):
* css/CSSPropertyNames.in: New property.
* css/CSSValueKeywords.in: New value.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
* rendering/style/RenderStyle.h: Getter, setter and initial value.
* rendering/style/RenderStyleConstants.h: Internal data type.
* rendering/style/StyleRareInheritedData.h: One bit to control this style property.
* rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.

Source/WebKit/mac:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

LayoutTests:
Parsing support for -webkit-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

Test parsing using getComputedStyle().

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html: Updated.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt: Updated.
* platform/mac/fast/text/trailing-word-parse-expected.txt: Added.
* platform/mac/fast/text/trailing-word-parse.html: Added.

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

4 years agobmalloc: free up a bit in BoundaryTag
ggaren@apple.com [Thu, 26 Feb 2015 19:30:11 +0000 (19:30 +0000)]
bmalloc: free up a bit in BoundaryTag
https://bugs.webkit.org/show_bug.cgi?id=142048

Reviewed by Brady Eidson.

We were wasting a bit by accident, and I need one now.

* bmalloc/Algorithm.h:
(bmalloc::rightShift): Deleted. Not needed, now that I've simplified
the math.

* bmalloc/BoundaryTag.h: Since each boundary tag bucket is 1024 bytes
long, the maximum offset into a bucket is 1023.

You need 5 bits to count up to 1024, but only 4 to count up to 1023.

Math is hard.

(bmalloc::BoundaryTag::compactBegin): Switched to division because it
is simpler, and easier to match up with our ASSERT. The compiler will
turn division by constant power of two into a shift for us.

(bmalloc::BoundaryTag::setRange): Added an ASSERT for compactBegin
because we do encode it, so we should ASSERT that encoding did not
lose information.

* bmalloc/Sizes.h: Shifting is no longer used since we use division
instead.

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

4 years agoMake WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
beidson@apple.com [Thu, 26 Feb 2015 19:29:48 +0000 (19:29 +0000)]
Make WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
https://bugs.webkit.org/show_bug.cgi?id=142047

Reviewed by Geoff Garen.

Source/WebKit2:

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupRemoveAllUserContentFilters): Remove all content filters instead of removing all user scripts.

LayoutTests:

* platform/mac-wk2/TestExpectations: Renable content filter tests, as they should no longer interfere with others.

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

4 years agoUnreviewed. Fix a accidental deletion from r178674.
roger_fong@apple.com [Thu, 26 Feb 2015 19:16:30 +0000 (19:16 +0000)]
Unreviewed. Fix a accidental deletion from r178674.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
Return the fake WebGL context.

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

4 years agoCleanup RenderSVGResourceClipper class.
commit-queue@webkit.org [Thu, 26 Feb 2015 18:37:14 +0000 (18:37 +0000)]
Cleanup RenderSVGResourceClipper class.
https://bugs.webkit.org/show_bug.cgi?id=142032.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-02-26
Reviewed by Darin Adler.
Source/WebCore:

This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
It includes cleanup for RenderSVGResourceClipper class.

* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
typedef instead of a class and rename it to ClipperMaskImage. The purpose
of having it a class even though it includes only one member was because
we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
as a separate object on the heap anymore.

(WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
double hash table lookups by calling HashMap::contains() and then HashMap::get(),
we can use HashMap::add() instead.

LayoutTests:

* svg/clip-path/clip-path-line-use-before-defined-expected.svg:
* svg/clip-path/clip-path-line-use-before-defined.svg: Simplify the test
and make separate drawings for different cases.

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

4 years ago[Win] Debug-only JavaScriptCore failures
msaboff@apple.com [Thu, 26 Feb 2015 18:36:43 +0000 (18:36 +0000)]
[Win] Debug-only JavaScriptCore failures
https://bugs.webkit.org/show_bug.cgi?id=142045

Rubber stamped by Filip Pizlo.

Reduced loop count to a more reasonable value of 10,000.  This still gets us to tier up
to the FTL, but doesn't take too long to run.

* tests/stress/repeated-arity-check-fail.js:

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

4 years agoSetting any of the <object> element plugin controlling attributes does not have any...
commit-queue@webkit.org [Thu, 26 Feb 2015 18:34:51 +0000 (18:34 +0000)]
Setting any of the <object> element plugin controlling attributes does not have any affect.
https://bugs.webkit.org/show_bug.cgi?id=141936.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-02-26
Reviewed by Zalan Bujtas.

Source/WebCore:

When setting any of the <object> element plugin controlling attributes
dynamically we need to mark the the element to be dirty by calling
setNeedsStyleRecalc(), so it has to recreate its renderer when needed.

Test: svg/as-object/svg-in-object-dynamic-attribute-change.html

* dom/Element.h: Delete unimplemented function.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
setNeedsStyleRecalc() when one of the plugin controlling attributes gets
changed. We have to clear the m_useFallbackContent because the attribute's
new value might fix the object rendering.

* html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to
reconstruct the object renderer in the image case. This can happen if the
image was rendering fallback content and the attribute's new value fixes
the object rendering.

LayoutTests:

* svg/as-object/resources/lime100x100.html: Added.
* svg/as-object/resources/lime100x100.png: Added.
* svg/as-object/resources/lime100x100.svg: Added.
* svg/as-object/resources/red100x100.svg: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change-expected.html: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change.html: Added.
Ensure that changing the 'type' and the 'data' attributes of the <object>
element will have the expected outcome. Also make sure that the <object>
element renderer falls back correctly when setting any of the attributes
to some unexpected value.

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

4 years agoCheck in missing WebEditingTester.xcconfig file.
weinig@apple.com [Thu, 26 Feb 2015 18:33:38 +0000 (18:33 +0000)]
Check in missing WebEditingTester.xcconfig file.

* WebEditingTester/Configurations/WebEditingTester.xcconfig: Added.

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

4 years ago[webkitpy] Remove skipped file related crufts
ossy@webkit.org [Thu, 26 Feb 2015 18:32:48 +0000 (18:32 +0000)]
[webkitpy] Remove skipped file related crufts
https://bugs.webkit.org/show_bug.cgi?id=142046

Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/port/base.py:
(Port.skipped_layout_tests):
(Port._tests_from_skipped_file_contents): Deleted.
(Port): Deleted.
(Port._expectations_from_skipped_files): Deleted.
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_default_timeout_ms):
(MacTest): Deleted.
(test_tests_from_skipped_file_contents): Deleted.

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

4 years ago[Win] Unreviewed build fix after r180676.
bfulgham@apple.com [Thu, 26 Feb 2015 18:19:41 +0000 (18:19 +0000)]
[Win] Unreviewed build fix after r180676.

I forgot to checkin one of the more important changes!

* win/tools/vsprops/common.props:

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

4 years ago[Win] Unreviewed test updates for Debug bots.
bfulgham@apple.com [Thu, 26 Feb 2015 17:30:37 +0000 (17:30 +0000)]
[Win] Unreviewed test updates for Debug bots.

* platform/win/TestExpectations:

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

4 years ago[Win] Unreviewed WinCairo build fix after r180653.
bfulgham@apple.com [Thu, 26 Feb 2015 17:04:41 +0000 (17:04 +0000)]
[Win] Unreviewed WinCairo build fix after r180653.

TestWebKitAPI should know about proper WEBCORE_EXPORT definitions.

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props:
* TestWebKitAPI/win/TestWebKitAPIPrefix.cpp: Added.
* TestWebKitAPI/win/TestWebKitAPIPrefix.h: Added.

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

4 years ago[Win] Make build logs more legible by reducing noise
bfulgham@apple.com [Thu, 26 Feb 2015 16:51:10 +0000 (16:51 +0000)]
[Win] Make build logs more legible by reducing noise
https://bugs.webkit.org/show_bug.cgi?id=142034

Reviewed by Alexey Proskuryakov.

Modify batch files, makefiles, and DOS commands to remove
uninteresting/unhelpful output.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.vcxproj/jsc/jscLauncherPreBuild.cmd:
* JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd:
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreBuild.cmd:
* JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiLauncherPostBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiLauncherPreBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd:

Source/WebCore:

* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCorePreBuild.cmd:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:

Source/WebInspectorUI:

* WebInspectorUI.vcxproj/WebInspectorUI.make:

Source/WebKit:

* WebKit.vcxproj/Interfaces/InterfacesPostBuild.cmd:
* WebKit.vcxproj/Interfaces/InterfacesPreBuild.cmd:
* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd:
* WebKit.vcxproj/WebKit/WebKitPreBuild.cmd:
* WebKit.vcxproj/WebKitGUID/WebKitGUIDPreBuild.cmd:

Source/WTF:

* WTF.vcxproj/WTFGenerated.make:
* WTF.vcxproj/WTFPreBuild.cmd:
* WTF.vcxproj/copy-files.cmd:

WebKitLibraries:

* win/tools/vsprops/common.props:

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

4 years ago[FreeType] REGRESSION(r180563): Introduced crashes
commit-queue@webkit.org [Thu, 26 Feb 2015 16:24:41 +0000 (16:24 +0000)]
[FreeType] REGRESSION(r180563): Introduced crashes
https://bugs.webkit.org/show_bug.cgi?id=142044

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-02-26
Reviewed by Martin Robinson.

No new tests, should be caught by any woff font test.

Use optionsPattern, not m_pattern, when m_pattern may be null.

* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::initializeWithFontFace):

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

4 years agoRevert bug 19975, now that gcc 4.7 is required.
commit-queue@webkit.org [Thu, 26 Feb 2015 15:21:13 +0000 (15:21 +0000)]
Revert bug 19975, now that gcc 4.7 is required.
https://bugs.webkit.org/show_bug.cgi?id=129927

Patch by Landry Breuil <landry@openbsd.org> on 2015-02-26
Reviewed by Andreas Kling.

isfinite() and signbit() are provided by gcc's cmath header.

* wtf/MathExtras.h:

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

4 years ago[EFL] Remove unnecessary comment after r179110
ossy@webkit.org [Thu, 26 Feb 2015 13:53:59 +0000 (13:53 +0000)]
[EFL] Remove unnecessary comment after r179110
https://bugs.webkit.org/show_bug.cgi?id=142042

Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:

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

4 years ago[WK2] Unreviewed gardening, skip failing tests related to missing
ossy@webkit.org [Thu, 26 Feb 2015 13:44:40 +0000 (13:44 +0000)]
[WK2] Unreviewed gardening, skip failing tests related to missing
EventSender.beginDragWithFiles implementation in wk2/TestExpectations.

There is no good reason to wait for 30 seconds timeout, let's skip them everywhere.

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

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

4 years ago[EFL] Unreviewed gardening, skip fast/workers tests to unbreak the buildbot.
ossy@webkit.org [Thu, 26 Feb 2015 11:44:06 +0000 (11:44 +0000)]
[EFL] Unreviewed gardening, skip fast/workers tests to unbreak the buildbot.
https://bugs.webkit.org/show_bug.cgi?id=142041

* platform/efl/TestExpectations:

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

4 years ago[EFL] Unreviewed gardening, comment out old expectations
ossy@webkit.org [Thu, 26 Feb 2015 11:33:23 +0000 (11:33 +0000)]
[EFL] Unreviewed gardening, comment out old expectations
of WebGL tests to really skip them as we expected.

* platform/efl/TestExpectations:

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

4 years agoASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
svillar@igalia.com [Thu, 26 Feb 2015 10:58:15 +0000 (10:58 +0000)]
ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
https://bugs.webkit.org/show_bug.cgi?id=141645

Reviewed by Chris Dumez.

Source/WebCore:

This bug has been here since r110484 but was uncovered by
r180140. The problem r110484 was trying to fix was that
CSSPrimitiveValue::convertToLength<Length> ended up calling
CSSPrimitiveValue::computeLengthDouble() which was apparently
dereferencing conversionData.style() and
conversionData.rootStyle() pointers without checking them. That's
why that fix added this condition to convertToLength():

isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())

which is not correct, because for the 4 possible font relative
length types, 3 of them just use the style() pointer and the other
one just uses rootStyle() which BTW could be NULL. This erroneous
condition makes that function to return Length(Undefined) more
often than it should.

From now on it only returns Length(Undefined) if the style()
pointer is NULL and the font relative length type is one in the
set (CSS_EMS, CSS_EXS, CSS_CHS);

Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html

* css/CSSPrimitiveValue.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
(WebCore::CSSPrimitiveValue::convertToLength):

LayoutTests:

* fast/css-grid-layout/grid-with-relative-font-length-crash-expected.txt: Added.
* fast/css-grid-layout/grid-with-relative-font-length-crash.html: Added.

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

4 years agoUNREACHABLE_FOR_PLATFORM() should be release assert
ossy@webkit.org [Thu, 26 Feb 2015 10:50:57 +0000 (10:50 +0000)]
UNREACHABLE_FOR_PLATFORM() should be release assert
https://bugs.webkit.org/show_bug.cgi?id=141904

Reviewed by Darin Adler.

* wtf/Assertions.h:
(UNREACHABLE_FOR_PLATFORM):

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

4 years agoAdd calleeSaveRegisters() implementation for ARM Traditional
ossy@webkit.org [Thu, 26 Feb 2015 09:20:24 +0000 (09:20 +0000)]
Add calleeSaveRegisters() implementation for ARM Traditional
https://bugs.webkit.org/show_bug.cgi?id=141903

Reviewed by Darin Adler.

* jit/RegisterSet.cpp:
(JSC::RegisterSet::calleeSaveRegisters):

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

4 years ago[Cocoa] Prod libcache to drop caches in memory pressure relief handler.
akling@apple.com [Thu, 26 Feb 2015 08:15:04 +0000 (08:15 +0000)]
[Cocoa] Prod libcache to drop caches in memory pressure relief handler.
<https://webkit.org/b/142024>
<rdar://problem/19966096>

Reviewed by Antti Koivisto.

libcache already listens to the OS memory pressure notifications, but we still
need to manually request a cleanup when doing an iOS process suspension, or when
simulating memory pressure.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
cache_simulate_memory_warning_event() to make sure that nonessential objects
being kept alive by NSCaches get dropped when we need the memory.

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

4 years agoBlack line across screen on Adobe Illustrator detail page (non-retina only)
zalan@apple.com [Thu, 26 Feb 2015 06:56:01 +0000 (06:56 +0000)]
Black line across screen on Adobe Illustrator detail page (non-retina only)
https://bugs.webkit.org/show_bug.cgi?id=141866

Reviewed by Simon Fraser.

Phase is relative to the destination origin. We need to take location information into account
while snapping so that the result is inline with the snapped destination rect.
(location affects the snapped size.)

Source/WebCore:

Test: fast/backgrounds/gradient-background-on-subpixel-position.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:

* fast/backgrounds/gradient-background-on-subpixel-position-expected.html: Added.
* fast/backgrounds/gradient-background-on-subpixel-position.html: Added.

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

4 years agoWeb Inspector: CRASH when debugger pauses inside a Promise handler
msaboff@apple.com [Thu, 26 Feb 2015 06:05:02 +0000 (06:05 +0000)]
Web Inspector: CRASH when debugger pauses inside a Promise handler
https://bugs.webkit.org/show_bug.cgi?id=141396

Reviewed by Mark Lam.

Source/JavaScriptCore:

For frames that don't have a scope, typically native frames, use the lexicalGlobalObject to
create the DebuggerScope for that frame.

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::scope):

LayoutTests:

New test.

* inspector/debugger/breakpoint-scope-expected.txt: Added.
* inspector/debugger/breakpoint-scope.html: Added.
* inspector/debugger/resources/scope.js: Added.

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

4 years ago[Win] Make Windows green again after r180654.
bfulgham@apple.com [Thu, 26 Feb 2015 05:43:59 +0000 (05:43 +0000)]
[Win] Make Windows green again after r180654.

* platform/win/TestExpectations:

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

4 years agoDFG abstract heaps should respect the difference between heap and stack
fpizlo@apple.com [Thu, 26 Feb 2015 04:29:26 +0000 (04:29 +0000)]
DFG abstract heaps should respect the difference between heap and stack
https://bugs.webkit.org/show_bug.cgi?id=142022

Reviewed by Geoffrey Garen.

We will soon (https://bugs.webkit.org/show_bug.cgi?id=141174) be in a world where a "world
clobbering" operation cannot write to our stack, but may be able to read from it. This
means that we need to change the DFG abstract heap hierarchy to have a notion of Heap that
subsumes all that World previously subsumed, and a new notion of Stack that is a subtype
of World and a sibling of Heap.

So, henceforth "clobbering the world" means reading World and writing Heap.

This makes a bunch of changes to make this work, including changing the implementation of
disjointness in AbstractHeap to make it support a more general hierarchy. I was expecting
a slow-down, but I measured the heck out of this and found no perf difference.

* dfg/DFGAbstractHeap.cpp:
(JSC::DFG::AbstractHeap::dump):
* dfg/DFGAbstractHeap.h:
(JSC::DFG::AbstractHeap::supertype):
(JSC::DFG::AbstractHeap::isStrictSubtypeOf):
(JSC::DFG::AbstractHeap::isSubtypeOf):
(JSC::DFG::AbstractHeap::overlaps):
(JSC::DFG::AbstractHeap::isDisjoint):
* dfg/DFGClobberize.cpp:
(JSC::DFG::clobbersHeap):
(JSC::DFG::clobbersWorld): Deleted.
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):

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

4 years agoUpdate fast/regions/region-overflow-break.html after r177774
mmaxfield@apple.com [Thu, 26 Feb 2015 04:18:47 +0000 (04:18 +0000)]
Update fast/regions/region-overflow-break.html after r177774

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-02-25

* fast/regions/region-overflow-break-expected.html:
* platform/mac/TestExpectations:

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