WebKit-https.git
5 years agoSave and restore callee save registers in WebAssembly
commit-queue@webkit.org [Thu, 17 Sep 2015 17:38:08 +0000 (17:38 +0000)]
Save and restore callee save registers in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149247

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-17
Reviewed by Michael Saboff.

Save callee save registers when entering WebAssembly functions
and restore them when returning.

* jit/RegisterSet.cpp:
(JSC::RegisterSet::webAssemblyCalleeSaveRegisters):
* jit/RegisterSet.h:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::startFunction):
(JSC::WASMFunctionCompiler::endFunction):
(JSC::WASMFunctionCompiler::buildReturn):
(JSC::WASMFunctionCompiler::localAddress):
(JSC::WASMFunctionCompiler::temporaryAddress):
(JSC::WASMFunctionCompiler::boxArgumentsAndAdjustStackPointer):
(JSC::WASMFunctionCompiler::callAndUnboxResult):

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

5 years agocolumn-rule-style: outset/inset doesn't work
zalan@apple.com [Thu, 17 Sep 2015 17:03:27 +0000 (17:03 +0000)]
column-rule-style: outset/inset doesn't work
https://bugs.webkit.org/show_bug.cgi?id=148815
Source/WebCore:

<rdar://problem/22582644>

Reviewed by David Hyatt.

https://drafts.csswg.org/css-multicol-1/#crs
The <‘border-style’> values are interpreted as in the collapsing border model.

Unskipped 4 multicolumn tests,

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::paintColumnRules):
* rendering/RenderTableCell.cpp:
(WebCore::collapsedBorderStyle): Deleted.
* rendering/style/RenderStyle.h:
(WebCore::collapsedBorderStyle):

LayoutTests:

Reviewed by David Hyatt.

https://drafts.csswg.org/css-multicol-1/#crs
The <‘border-style’> values are interpreted as in the collapsing border model.

* TestExpectations:

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

5 years agoMake Windows tests green.
achristensen@apple.com [Thu, 17 Sep 2015 16:51:31 +0000 (16:51 +0000)]
Make Windows tests green.

* platform/win/TestExpectations:
Skip new IndexedDB test on Windows after r189879 because IndexedDB is not enabled on Windows yet.
Also skip new accessibility test after r189862 because stringValue is not implemented.

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

5 years agoRange.deleteContents cannot delete DocType
cdumez@apple.com [Thu, 17 Sep 2015 15:51:08 +0000 (15:51 +0000)]
Range.deleteContents cannot delete DocType
https://bugs.webkit.org/show_bug.cgi?id=148773
<rdar://problem/22571280>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C DOM test now that more checks are passing.

* web-platform-tests/dom/ranges/Range-deleteContents-expected.txt:

Source/WebCore:

Range.deleteContents() was not able to delete a DocumentType Node, and
was throwing a HIERARCHY_REQUEST_ERR. The DOM specification does not
say we should throw in such case:
https://dom.spec.whatwg.org/#dom-range-deletecontents

However, Range.extractContents() should still throw an exception
if any of the contained children in a DocumentType Node:
https://dom.spec.whatwg.org/#concept-range-extract (Step 12)

No new tests, already covered by existing test.

* dom/Range.cpp:
(WebCore::Range::deleteContents):
(WebCore::Range::extractContents):
(WebCore::Range::checkDeleteExtract):
* dom/Range.h:

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

5 years ago[Mac MediaStream] Cleanup capture source classes
eric.carlson@apple.com [Thu, 17 Sep 2015 15:33:29 +0000 (15:33 +0000)]
[Mac MediaStream] Cleanup capture source classes
https://bugs.webkit.org/show_bug.cgi?id=149233

Reviewed by Jer Noble.

* platform/cf/CoreMediaSoftLink.cpp: Soft-link CMAudioFormatDescriptionGetStreamBasicDescription,
  CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer, and CMSampleBufferGetNumSamples.
* platform/cf/CoreMediaSoftLink.h:

* platform/mediastream/mac/AVAudioCaptureSource.h:
(WebCore::AVAudioCaptureSource::Observer::~Observer):
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::AVAudioCaptureSource): Initialize m_inputDescription.
(WebCore::AVAudioCaptureSource::capabilities): 0 -> nullptr.
(WebCore::AVAudioCaptureSource::addObserver): New, add an observer and tell it to prepare.
(WebCore::AVAudioCaptureSource::removeObserver): New.
(WebCore::operator==): Compare AudioStreamBasicDescription.
(WebCore::operator!=):
(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Call
  observer->prepare when passed a new stream description, call observer->process.

* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::refreshCaptureDeviceList): Set m_groupID and m_localizedName.
(WebCore::AVCaptureDeviceManager::sessionSupportsConstraint): Invalid constraint names should
  be ignored, so return true when passed one.
(WebCore::AVCaptureDeviceManager::getSourcesInfo): This just didn't work, fix it.
(WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType): Optional constraints are
  optional so they don't need to be validated.
(WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints): m_audioSource -> m_audioAVMediaCaptureSource,
  m_videoSource -> m_videoAVMediaCaptureSource.
(WebCore::AVCaptureDeviceManager::sourceWithUID): Ditto.

* platform/mediastream/mac/AVMediaCaptureSource.h:
(WebCore::AVMediaCaptureSource::session):
(WebCore::AVMediaCaptureSource::device):
(WebCore::AVMediaCaptureSource::currentStates):
(WebCore::AVMediaCaptureSource::constraints):
(WebCore::AVMediaCaptureSource::statesDidChanged):
(WebCore::AVMediaCaptureSource::createWeakPtr):
(WebCore::AVMediaCaptureSource::buffer): Deleted.
(WebCore::AVMediaCaptureSource::setBuffer): Deleted.
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Initilize m_weakPtrFactory.
(WebCore::AVMediaCaptureSource::scheduleDeferredTask): New, call a function asynchronously on
  the main thread.
(-[WebCoreAVMediaCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]): Don't
  dispatch calls to the main thread, let the derived classes do that if necessary.

* platform/mediastream/mac/AVVideoCaptureSource.h:
(WebCore::AVVideoCaptureSource::width):
(WebCore::AVVideoCaptureSource::height):
(WebCore::AVVideoCaptureSource::previewLayer):
(WebCore::AVVideoCaptureSource::currentFrameSampleBuffer):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setFrameRateConstraint): Remove unwanted logging.
(WebCore::AVVideoCaptureSource::setupCaptureSession): Configure the AVCaptureVideoDataOutput so
  it delivers 32-bit BGRA samples.
(WebCore::AVVideoCaptureSource::calculateFramerate): Return bool to signal if the frame rate
  changed.
(WebCore::AVVideoCaptureSource::processNewFrame): New. Process sample buffer, invalidate cached
  image, signal when characteristics change.
(WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Schedule
  call to processNewFrame on the main thread so we do all video processing on main thread.
(WebCore::AVVideoCaptureSource::currentFrameImage): Create and return a CVImageBuffer of the
  current video frame.
(WebCore::AVVideoCaptureSource::paintCurrentFrameInContext): Draw the current frame to a context.

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

5 years ago[GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
mcatanzaro@igalia.com [Thu, 17 Sep 2015 13:00:48 +0000 (13:00 +0000)]
[GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
https://bugs.webkit.org/show_bug.cgi?id=147453

Reviewed by Carlos Garcia Campos.

Except when running on X11, this function always crashes if called before the web view is
realized, as gdk_window_create_similar_surface will return null in that case. Avoid this by
simply realizing the widget before calling that.

Thanks to Carlos Garnacho for some debugging help.

* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend):

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

5 years ago[CSS Grid Layout] Using automatic (instead of min-content) minimums for 'auto' tracks
svillar@igalia.com [Thu, 17 Sep 2015 12:13:30 +0000 (12:13 +0000)]
[CSS Grid Layout]  Using automatic (instead of min-content) minimums for 'auto' tracks
https://bugs.webkit.org/show_bug.cgi?id=142329

Reviewed by Darin Adler.

Based on Blink's r198697 by <svillar@igalia.com> and r200478 by <jfernandez@igalia.com>

Source/WebCore:

More precisely (syntax-wise), this would allow 'auto' to be used within the
minmax() function (it's currently forbidden) and have the 'auto' keyword map
to minmax(auto, auto) instead of minmax(min-content, max-content).
- As a minimum, 'auto' would mean "use the specified minimum size, or if
that is auto, treat as 0 or min-content per Flexbox rules".
- As a maximum, 'auto' would mean "use the max-content size".

Regarding the implementation, a new phase is added to the track sizing
algorithm called ResolveIntrinsicMinimums (the former ResolveIntrinsicMinimums
is now called ResolveContentBasedMinimums which does not include 'auto'
resolution) which will be run before any other. This phase uses the minimum
size of grid items (as specified by min-width/height).

Tests: fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html
       fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridBreadth):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfMinLength):
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
(WebCore::RenderGrid::minSizeForChild):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase):
(WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase):
(WebCore::RenderGrid::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase):
(WebCore::RenderGrid::markAsInfinitelyGrowableForTrackSizeComputationPhase):
(WebCore::RenderGrid::updateTrackSizeForTrackSizeComputationPhase):
(WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase):
* rendering/RenderGrid.h:
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::minTrackBreadth):
(WebCore::GridTrackSize::maxTrackBreadth):
(WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes):
(WebCore::GridTrackSize::hasIntrinsicMinTrackBreadth):
(WebCore::GridTrackSize::hasAutoMinTrackBreadth):
(WebCore::GridTrackSize::hasAutoMaxTrackBreadth):
(WebCore::GridTrackSize::hasMaxContentOrAutoMaxTrackBreadth):
(WebCore::GridTrackSize::hasAutoOrMinContentMinTrackBreadthAndIntrinsicMaxTrackBreadth):
(WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth): Deleted.

LayoutTests:

New tests to verify that auto is a valid keyword inside
minmax. Updated the expectations of existing tests to
reflect the new status of auto.

* fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-auto-columns-rows-get-set.html:
* fast/css-grid-layout/grid-automatic-minimum-for-auto-columns-expected.txt: Added.
* fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html: Added.
* fast/css-grid-layout/grid-automatic-minimum-for-auto-rows-expected.txt: Added.
* fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html: Added.
* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/non-grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set.html:
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:

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

5 years ago[CSS Grid Layout] Relayout whenever Box Alignment properties change
jfernandez@igalia.com [Thu, 17 Sep 2015 09:13:35 +0000 (09:13 +0000)]
[CSS Grid Layout] Relayout whenever Box Alignment properties change
https://bugs.webkit.org/show_bug.cgi?id=148070

Reviewed by Darin Adler.

Source/WebCore:

We were Reattaching the styles to the RenderTree whenever Content Alignment
properties (align-items and justify-items) changed their values, since the
Self Alignment properties depend on such values to resolve 'auto' values
during layout.

This patch removes such restriction, since we resolve the auto values
whenever we access the alignment properties. The only thing we need to
do is to mark a grid item for layout whenever the Default Alignment
properties change from/to stretch, since it implies a resize of the grid
items using 'auto' values for the Self Alignment properties.

Tests: fast/css-grid-layout/relayout-align-items-changed.html
       fast/css-grid-layout/relayout-align-self-changed.html
       fast/css-grid-layout/relayout-justify-items-changed.html
       fast/css-grid-layout/relayout-justify-self-changed.html
       fast/repaint/align-items-change.html
       fast/repaint/align-items-overflow-change.html
       fast/repaint/align-self-change.html
       fast/repaint/align-self-overflow-change.html
       fast/repaint/justify-items-change.html
       fast/repaint/justify-items-legacy-change.html
       fast/repaint/justify-items-overflow-change.html
       fast/repaint/justify-self-change.html
       fast/repaint/justify-self-overflow-change.html

* rendering/RenderGrid.cpp:
(WebCore::defaultAlignmentIsStretch):
(WebCore::RenderGrid::styleDidChange):
* rendering/RenderGrid.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::resolveAlignmentOverflow):
(WebCore::RenderStyle::changeRequiresLayout):
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange): Deleted.

LayoutTests:

Tests to verify we force a layout of grid container or grid items, as appropriated,
whenever Box Alignment properties change their value.

This patch also adds some repaint tests, so we can ensure we generate the correct
repaint rects as well.

* fast/css-grid-layout/relayout-align-items-changed-expected.txt: Added.
* fast/css-grid-layout/relayout-align-items-changed.html: Added.
* fast/css-grid-layout/relayout-align-self-changed-expected.txt: Added.
* fast/css-grid-layout/relayout-align-self-changed.html: Added.
* fast/css-grid-layout/relayout-justify-items-changed-expected.txt: Added.
* fast/css-grid-layout/relayout-justify-items-changed.html: Added.
* fast/css-grid-layout/relayout-justify-self-changed-expected.txt: Added.
* fast/css-grid-layout/relayout-justify-self-changed.html: Added.
* fast/repaint/align-items-change-expected.txt: Added.
* fast/repaint/align-items-change.html: Added.
* fast/repaint/align-items-overflow-change-expected.txt: Added.
* fast/repaint/align-items-overflow-change.html: Added.
* fast/repaint/align-self-change-expected.txt: Added.
* fast/repaint/align-self-change.html: Added.
* fast/repaint/align-self-overflow-change-expected.txt: Added.
* fast/repaint/align-self-overflow-change.html: Added.
* fast/repaint/justify-items-change-expected.txt: Added.
* fast/repaint/justify-items-change.html: Added.
* fast/repaint/justify-items-legacy-change-expected.txt: Added.
* fast/repaint/justify-items-legacy-change.html: Added.
* fast/repaint/justify-items-overflow-change-expected.txt: Added.
* fast/repaint/justify-items-overflow-change.html: Added.
* fast/repaint/justify-self-change-expected.txt: Added.
* fast/repaint/justify-self-change.html: Added.
* fast/repaint/justify-self-overflow-change-expected.txt: Added.
* fast/repaint/justify-self-overflow-change.html: Added.

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

5 years agoREGRESSION(r188427): Web Inspector: Extra whitespace left behind in styles sidebar...
commit-queue@webkit.org [Thu, 17 Sep 2015 07:28:52 +0000 (07:28 +0000)]
REGRESSION(r188427): Web Inspector: Extra whitespace left behind in styles sidebar after clicking in and out
https://bugs.webkit.org/show_bug.cgi?id=149197

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2015-09-17
Reviewed by Timothy Hatcher.

In r188427, logic was added to preserve the leading whitespace of styles in a CSS file.
An unfortunate side effect of this was that extra newlines in between CSS properties
were treated as valid and left where they were.  This is undesired behaviour and often
clutters the styles sidebar.  These changes remove the extra newlines.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):

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

5 years agoprinting does not use minimum page zoom factor
carlosgc@webkit.org [Thu, 17 Sep 2015 07:24:50 +0000 (07:24 +0000)]
printing does not use minimum page zoom factor
https://bugs.webkit.org/show_bug.cgi?id=108507

Reviewed by Darin Adler.

Source/WebCore:

* page/PrintContext.cpp:
(WebCore::PrintContext::beginAndComputePageRectsWithPageSize):
Helper function to share common code from numberOfPages() and
spoolAllPagesWithBoundaries().
(WebCore::PrintContext::numberOfPages): Use beginAndComputePageRectsWithPageSize().
(WebCore::PrintContext::spoolAllPagesWithBoundaries): Use
beginAndComputePageRectsWithPageSize() and don't flip the Y axis
for non Cocoa platforms.
* page/PrintContext.h:

Source/WebKit/mac:

Pass a the frame as a reference instead of using pointers.

* Misc/WebCoreStatistics.mm:
(-[WebFrame numberOfPagesWithPageWidth:pageHeight:]):
(-[WebFrame printToCGContext:pageWidth:pageHeight:]):

Source/WebKit2:

Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
should be generated in printing mode.

* Shared/API/c/WKImage.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toSnapshotOptions):
* Shared/ImageOptions.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::numberOfPages): Pass the frame as a
reference instead of a pointer.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
calculate the bitmap height based on the number of pages.
(WebKit::WebPage::snapshotAtSize): In case of printing, use
PrintContext::spoolAllPagesWithBoundaries() and return.

Tools:

WebKitTestRunner always takes the snapshots from the UI process
(expect for IOS), so in the case of printing, the layout in the
web view is not the expected one. When printing, we need to take
the snapshot in the web process and ensure it's rendered with a
PrintContext.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump): When dumping pixels, pass
kWKSnapshotOptionsPrinting option to
WKBundlePageCreateSnapshotWithOptions() when printing. When not
printing, don't even create the snapshot, since it will be ignored
by the UI process that always creates its own from the WebView (expect for IOS platform)
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults): Use always the snapshot image
received from the web process if any when comparing pixel
results. Now we only receive a snapshot from the web process in
case of printing, or when platform is IOS. Otherwhise, generate
the snapshot from the WebView as usual.
* WebKitTestRunner/TestInvocation.h: Add SnapshotResultType enum
parameter to dumpPixelsAndCompareWithExpected, since the snapshot
is created by the caller now, but the CG implementation needs to
know if it's a Web or UI process snapshot.
* WebKitTestRunner/cairo/TestInvocationCairo.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Create a
cairo surface for the given image.
* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Create a
CGContext for the given image.

LayoutTests:

Unskip printing reftests that should pass now.

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

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

5 years agoWeb Inspector: Reduce Annotation Update Frequency
commit-queue@webkit.org [Thu, 17 Sep 2015 06:51:50 +0000 (06:51 +0000)]
Web Inspector: Reduce Annotation Update Frequency
https://bugs.webkit.org/show_bug.cgi?id=149250

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-16
Reviewed by Saam Barati.

* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype.insertAnnotations):
Set a lower bound of 500ms on update frequency for both annotators.

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

5 years agoremoveShadow shouldn't call ChildNodeRemovalNotifier with the shadow host as the...
rniwa@webkit.org [Thu, 17 Sep 2015 06:12:06 +0000 (06:12 +0000)]
removeShadow shouldn't call ChildNodeRemovalNotifier with the shadow host as the removal point
https://bugs.webkit.org/show_bug.cgi?id=149244

Reviewed by Antti Koivisto.

Since a shadow host is in a different tree than nodes in its shadow tree, it's incorrect to call
removedFrom with the shadow host as the removal point. This causes HTMLSlotElement::removedFrom
which will be added in the bug 149241 to call methods on a wrong ShadowRoot.

We still keep the ad-hoc behavior of using the shadow host as the insertion/removal point when
calling insertedInto and removedFrom on the shadow root itself to update the InDocument node flag.
We may want to re-visit this design in the future.

No new tests since I couldn't quite create a reduction. However, tests I'm adding in the bug 149241
will crash without this change.

I separated this patch from the bug 149241 to isolate the high-risk code change here.

* dom/Element.cpp:
(WebCore::Element::addShadowRoot): Call insertedInto on ShadowRoot, and then call it on all its
children separately with the insertion point set to the shadow root since insertedInto relies on
insertion point's inDocument flag to be true when the shadow host is in the document.
(WebCore::Element::removeShadowRoot): Ditto in the reverse order.

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

5 years agoRemove all uses of PassRefPtr in WebCore/inspector
gyuyoung.kim@webkit.org [Thu, 17 Sep 2015 05:40:02 +0000 (05:40 +0000)]
Remove all uses of PassRefPtr in WebCore/inspector
https://bugs.webkit.org/show_bug.cgi?id=149156

Reviewed by Darin Adler.

* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction):
(WebCore::DOMEditor::ReplaceChildNodeAction::ReplaceChildNodeAction):
(WebCore::DOMEditor::insertBefore):
(WebCore::DOMEditor::replaceChild):
* inspector/DOMEditor.h:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::removeChildAndMoveToNew):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightSelector):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::didOpenDatabase):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseInstrumentation.h:
* inspector/InspectorDatabaseResource.h:
(WebCore::InspectorDatabaseResource::setDatabase):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::create):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::highlightNodeList):
* inspector/InspectorOverlay.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::sharedBufferContent):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::startProfiling):
(WebCore::stopProfiling):
(WebCore::InspectorTimelineAgent::stopFromConsole):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerResource.h:
(WebCore::InspectorWorkerResource::create):
* inspector/InstrumentingAgents.h:
* inspector/NetworkResourcesData.cpp:
(WebCore::createOtherResourceTextDecoder):
(WebCore::NetworkResourcesData::addResourceSharedBuffer):
* inspector/NetworkResourcesData.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::createQuad):
* inspector/WebInjectedScriptHost.h:
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
* inspector/WebInjectedScriptManager.h:

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

5 years agoAdd failing expectation to css3/font-feature-settings-rendering-2.html on Mavericks.
rniwa@webkit.org [Thu, 17 Sep 2015 05:22:41 +0000 (05:22 +0000)]
Add failing expectation to css3/font-feature-settings-rendering-2.html on Mavericks.
The test failure is tracked by webkit.org/b/149246.

Also rebaseline js/dom/global-constructors-attributes-idb.html on WK1 after r189879.

* js/dom/global-constructors-attributes-idb-expected.txt: Replaced with LayoutTests/platform/wk2/js/dom/global-constructors-attributes-idb-expected.txt.
* platform/mac/TestExpectations:
* platform/wk2/js/dom/global-constructors-attributes-idb-expected.txt: Removed.

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

5 years agoHave window.indexedDB.open return an IDBOpenDBRequest.
beidson@apple.com [Thu, 17 Sep 2015 04:27:46 +0000 (04:27 +0000)]
Have window.indexedDB.open return an IDBOpenDBRequest.
https://bugs.webkit.org/show_bug.cgi?id=149234

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/opendatabase-request.html

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::open):
(WebCore::IDBClient::IDBFactory::openInternal):
* Modules/indexeddb/client/IDBFactoryImpl.h:

LayoutTests:

* storage/indexeddb/modern/opendatabase-request-expected.txt: Added.
* storage/indexeddb/modern/opendatabase-request.html: Added.

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

5 years agoTurn ChildNodeInsertion/RemovalNotifier classes into functions
antti@apple.com [Thu, 17 Sep 2015 03:27:11 +0000 (03:27 +0000)]
Turn ChildNodeInsertion/RemovalNotifier classes into functions
https://bugs.webkit.org/show_bug.cgi?id=149236

Reviewed by Ryosuke Niwa.

Less architecture, more readability.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::notifyChildInserted):
(WebCore::ContainerNode::notifyChildRemoved):
(WebCore::ContainerNode::removeChildren):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyDescendantInsertedIntoDocument):
(WebCore::notifyDescendantInsertedIntoTree):
(WebCore::notifyNodeInsertedIntoDocument):
(WebCore::notifyNodeInsertedIntoTree):
(WebCore::notifyChildNodeInserted):
(WebCore::notifyNodeRemovedFromDocument):
(WebCore::notifyNodeRemovedFromTree):
(WebCore::notifyChildNodeRemoved):
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument): Deleted.
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree): Deleted.
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument): Deleted.
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree): Deleted.
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::ChildNodeInsertionNotifier): Deleted.
(WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier): Deleted.
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument): Deleted.
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree): Deleted.
(WebCore::ChildNodeInsertionNotifier::notify): Deleted.
(WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument): Deleted.
(WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree): Deleted.
(WebCore::ChildNodeRemovalNotifier::notify): Deleted.
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot):
(WebCore::Element::createShadowRoot):

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

5 years agoRemove all uses of PassRefPtr in WebCore/bindings
gyuyoung.kim@webkit.org [Thu, 17 Sep 2015 03:00:30 +0000 (03:00 +0000)]
Remove all uses of PassRefPtr in WebCore/bindings
https://bugs.webkit.org/show_bug.cgi?id=149207

Reviewed by Darin Adler.

If RefPtr<>&& argument is passed to new variable or other function, we use copyRef() or WTF::move().
copyRef() should be used when the argument continues to be used in following code. If it is final use
inside function, we have to use WTF::move().

* bridge/NP_jsobject.cpp:
* bridge/NP_jsobject.h:
* bridge/c/CRuntimeObject.cpp:
(JSC::Bindings::CRuntimeObject::CRuntimeObject):
* bridge/c/CRuntimeObject.h:
(JSC::Bindings::CRuntimeObject::create):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::CInstance):
* bridge/c/c_instance.h:
(JSC::Bindings::CInstance::create):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Array::Array):
(JSC::Bindings::Instance::Instance):
* bridge/jsc/BridgeJSC.h:
* bridge/objc/ObjCRuntimeObject.h:
(JSC::Bindings::ObjCRuntimeObject::create):
* bridge/objc/ObjCRuntimeObject.mm:
(JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
* bridge/objc/WebScriptObjectProtocol.h:
* bridge/objc/objc_instance.h:
* bridge/objc/objc_instance.mm:
(ObjcInstance::ObjcInstance):
(ObjcInstance::create):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcArray::ObjcArray):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::RuntimeObject):
* bridge/runtime_object.h:
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::create):
* bridge/runtime_root.h:

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

5 years agoBuild fix for WebAssembly after r189884
ssakshuwong@apple.com [Thu, 17 Sep 2015 01:35:33 +0000 (01:35 +0000)]
Build fix for WebAssembly after r189884

* jit/JITOperations.cpp

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

5 years agoLayoutTests/imported/w3c:
cdumez@apple.com [Thu, 17 Sep 2015 01:24:58 +0000 (01:24 +0000)]
LayoutTests/imported/w3c:
Element's attribute NS API should treat defined undefined namespace as null
https://bugs.webkit.org/show_bug.cgi?id=149238
<rdar://problem/22562204>

Reviewed by Ryosuke Niwa.

Rebaseline W3C DOM test that one more check is passing.

* web-platform-tests/dom/nodes/attributes-expected.txt:

Source/WebCore:
Element's attribute NS API should defined treat undefined namespace as null
https://bugs.webkit.org/show_bug.cgi?id=149238
<rdar://problem/22562204>

Reviewed by Ryosuke Niwa.

Element's attribute NS API should treat defined undefined namespace as null
instead of converting it to the "undefined" String. This is because the
namespace parameter is a nullable String as per the DOM spec:
- https://dom.spec.whatwg.org/#element

The attribute is nullable and WebIDL says undefined should be converted
to null for nullable parameters:
- https://heycam.github.io/webidl/#es-nullable-type (step 3)

Firefox follows the specification.

No new tests, already covered by existing test.

* dom/Element.idl:

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

5 years agoImplement indirect calls in WebAssembly
commit-queue@webkit.org [Thu, 17 Sep 2015 01:23:20 +0000 (01:23 +0000)]
Implement indirect calls in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149100

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-16
Reviewed by Geoffrey Garen.

This patch implement indirect calls for WebAssembly files generated by
pack-asmjs <https://github.com/WebAssembly/polyfill-prototype-1>.
pack-asmjs uses the same indirect call model as asm.js. In asm.js, an
indirect call looks like this:
    t[i & n](...)
where t is a variable referring to an array of functions with the same
signature, i is an integer expression, n is an integer that is equal to
(t.length - 1), and t.length is a power of two. pack-asmjs does not
use the '&' operator nor n in the WebAssembly output, but the semantics
is still the same as asm.js.

* tests/stress/wasm-calls.js:
* tests/stress/wasm/calls.wasm:
* wasm/WASMFormat.h:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildCallIndirect):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseExpressionF64):
(JSC::WASMFunctionParser::parseCallIndirect):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildCallIndirect):
* wasm/WASMModuleParser.cpp:
(JSC::WASMModuleParser::parseFunctionPointerTableSection):
(JSC::WASMModuleParser::parseFunctionDefinitionSection):

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

5 years agoFix 32-bit build issues in WebAssembly
commit-queue@webkit.org [Thu, 17 Sep 2015 01:16:09 +0000 (01:16 +0000)]
Fix 32-bit build issues in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149240

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-16
Reviewed by Geoffrey Garen.

Fix the syntax error and replace the instructions that are not available on
64-bit platforms.

* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::startFunction):
(JSC::WASMFunctionCompiler::endFunction):
(JSC::WASMFunctionCompiler::buildReturn):
(JSC::WASMFunctionCompiler::callAndUnboxResult):
(JSC::WASMFunctionCompiler::loadValueAndConvertToDouble):

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

5 years agoCreate a font which can be used for testing font features
mmaxfield@apple.com [Thu, 17 Sep 2015 01:15:27 +0000 (01:15 +0000)]
Create a font which can be used for testing font features
https://bugs.webkit.org/show_bug.cgi?id=149237

Reviewed by Simon Fraser.

Tools:

This patch adds a new project in the Tools/ directory which generates a font which can
be used for testing font features. This is a standalone project consisting of two files:
1. A file which actually generates the byte vector representing the font. This file has
a single public function: std::vector<uint8_t> generateFont(). This file is not platform
specific, and only relies on the C++ STL.
2. A file with a main() which calls generateFont() and writes out the font, as well as
uses the font to render some demonstration text into a .png file. This file is platform
specific.

The font itself only supports the following characters:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
However, the shape of these letters are either an X or a check mark.

The letter "A" always is a check mark.
The letter "B" always is an X.
Without any font features turned on, the rest of the letters are shown as X.

Each font feature has an letter associated with it. When the font feature is enabled,
that letter is shown as a check mark. For example, when "smcp" is enabled, "J" is shown
as a check mark.

Here are the mappings of font features to letters:
liga: C
clig: D
dlig: E
hlig: F
calt: G
subs: H
sups: I
smcp: J
c2sc: K
pcap: L
c2pc: M
unic: N
titl: O
onum: P
pnum: Q
tnum: R
frac: S
afrc: T
ordn: U
zero: V
hist: W
jp78: X
jp83: Y
jp90: Z
jp04: a
smpl: b
trad: c
fwid: d
pwid: e
ruby: f

* FontWithFeatures/FontWithFeatures.xcodeproj/project.pbxproj: Added.
* FontWithFeatures/FontWithFeatures/FontCreator.cpp: Added.
(integralLog2):
(roundDownToPowerOfTwo):
(isFourByteAligned):
(clampTo):
(append32):
(writeCFFEncodedNumber):
(CFFBuilder::CFFBuilder):
(CFFBuilder::takeResult):
(CFFBuilder::moveTo):
(CFFBuilder::lineTo):
(CFFBuilder::curveToCubic):
(CFFBuilder::closePath):
(CFFBuilder::writePoint):
(generateBoxCharString):
(generateCheckCharString):
(generateXCharString):
(charStringForGlyph):
(Generator::generate):
(Generator::Placeholder::Placeholder):
(Generator::Placeholder::populate):
(Generator::Placeholder::~Placeholder):
(Generator::placeholder):
(Generator::append16):
(Generator::append32):
(Generator::append32BitCode):
(Generator::overwrite16):
(Generator::overwrite32):
(Generator::appendCFFTable):
(Generator::appendSubstitutionSubtable):
(Generator::appendScriptSubtable):
(Generator::appendGSUBTable):
(Generator::appendOS2Table):
(Generator::appendFormat12CMAPTable):
(Generator::appendFormat4CMAPTable):
(Generator::appendCMAPTable):
(Generator::appendHEADTable):
(Generator::appendHHEATable):
(Generator::appendHMTXTable):
(Generator::appendMAXPTable):
(Generator::appendNAMETable):
(Generator::appendPOSTTable):
(Generator::calculateChecksum):
(Generator::appendTable):
(generateFont):
* FontWithFeatures/FontWithFeatures/FontCreator.h: Added.
* FontWithFeatures/FontWithFeatures/main.cpp: Added.
(drawTextWithFeature):
(main):

LayoutTests:

* css3/font-feature-settings-rendering-2-expected.html: Added.
* css3/font-feature-settings-rendering-2.html: Added.
* css3/resources/FontWithFeatures.otf: Added.
* platform/efl/TestExpectations:
* platform/win/TestExpectations:

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

5 years agoJavaScriptCore should discard baseline code after some time
ggaren@apple.com [Thu, 17 Sep 2015 00:28:34 +0000 (00:28 +0000)]
JavaScriptCore should discard baseline code after some time
https://bugs.webkit.org/show_bug.cgi?id=149220

Reviewed by Saam Barati.

This is a bit more complicated than discarding optimized code because
the engine previously assumed that we would never discard baseline code.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Record creation time (and compute time since
creation) instead of install time because CodeBlocks can be installed
more than once, and we don't want to have to worry about edge cases
created by CodeBlocks seeming to get younger.

(JSC::CodeBlock::visitAggregate): Be explicit about only doing the
weak reference fixpoint for optimized CodeBlocks. We used to avoid the
fixpoint for baseline CodeBlocks implicitly, since they would always
visit themselves strongly right away. But now baseline CodeBlocks might
not visit themselves strongly, since they might choose to jettison due
to old age.

(JSC::CodeBlock::shouldVisitStrongly): Add old age as a reason not to
visit ourselves strongly, so that baseline CodeBlocks can jettison due
to old age.

(JSC::CodeBlock::shouldJettisonDueToWeakReference): Be explicit about
only jettisoning optimized CodeBlocks due to weak references so that we
don't confuse ourselves into thinking that we will jettison a baseline
CodeBlock due to weak references.

(JSC::CodeBlock::shouldJettisonDueToOldAge): Updated to use creation time.

(JSC::CodeBlock::visitOSRExitTargets): Clarify a comment and add an
ASSERT to help record some things I discovered while debugging.

(JSC::CodeBlock::jettison): Allow a baseline CodeBlock to jettison. Don't
assume that we have an alternative or a profiler.

(JSC::CodeBlock::install): Deleted.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::releaseAlternative): Deleted.
(JSC::CodeBlock::setInstallTime): Deleted.
(JSC::CodeBlock::timeSinceInstall): Deleted.

* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit): Simplified the computation of
baseline CodeBlock.

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::checkLivenessAndVisitChildren): Be sure to strongly
visit our inline callframes because we assume that an optimized CodeBlock
will keep its OSR exit targets alive, but the CodeBlock object won't be
able to mark them for itself until compilation has completed (since it
won't have a JITCode object yet).

* dfg/DFGToFTLDeferredCompilationCallback.cpp:
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):
Updated for interface change.

* jit/JITCode.h:
(JSC::JITCode::timeToLive): Provide a time to live for interpreter and
baseline code, so they will jettison when old. Use seconds in our
code so that we don't need comments. Make DFG 2X interpreter+baseline,
and FTL 2X DFG+interpreter+baseline, also matching the time we allot
before throwing away all code.

* jit/JITToDFGDeferredCompilationCallback.cpp:
(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics): Updated for interface change.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode): Allow our caller to install nullptr,
since we need to do this when jettisoning a baseline CodeBlock. Require
our caller to specify the details of the installation because we can't
rely on a non-null CodeBlock in order to compute them.

(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/Executable.h:
(JSC::ScriptExecutable::recordParse): Updated for interface change.

* runtime/Options.h: Renamed the CodeBlock liveness option since it now
controls baseline and optimized code.

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

5 years agoRemove obsolete code for deleting CodeBlocks
ggaren@apple.com [Thu, 17 Sep 2015 00:16:35 +0000 (00:16 +0000)]
Remove obsolete code for deleting CodeBlocks
https://bugs.webkit.org/show_bug.cgi?id=149231

Reviewed by Mark Lam.

* heap/Heap.cpp:
(JSC::Heap::deleteAllCodeBlocks): ASSERT that we're called in a valid
state, and do the compiler waiting ourselves instead of having our
caller do it. This is more appropriate to our new limited use.

(JSC::Heap::collectImpl):
(JSC::Heap::deleteOldCode): Deleted. Don't call deleteAllCodeBlocks
periodically because it's not such a good idea to delete everything
at once, and CodeBlocks now have a more precise individual policy for
when to delete. Also, this function used to fail all or nearly all of
the time because its invariants that we were not executing or compiling
could not be met.

* heap/Heap.h:

* jsc.cpp:
(GlobalObject::finishCreation):
(functionDeleteAllCompiledCode): Deleted.
* tests/stress/deleteAllCompiledCode.js: Removed. Removed this testing
code because it did not do what it thought it did. All of this code
was guaranteed to no-op since it would run JavaScript to call a function
that would return early because JavaScript was running.

* runtime/VM.cpp:
(JSC::VM::deleteAllCode): This code is simpler now becaue
heap.deleteAllCodeBlocks does some work for us.

* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope): Don't delete code on VM entry. This
policy was old, and it dated back to a time when we

    (a) couldn't run in the interpreter if compilation failed;

    (b) didn't reduce the rate of compilation in response to executable
    memory pressure;

    (c) didn't throw away individual CodeBlocks automatically.

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

5 years agoPossible small iOS PLT regression from r189537
cdumez@apple.com [Thu, 17 Sep 2015 00:10:33 +0000 (00:10 +0000)]
Possible small iOS PLT regression from r189537
https://bugs.webkit.org/show_bug.cgi?id=149232

Reviewed by Ryosuke Niwa.

r189537 may have regressed PLT a bit on iOS. That change added a couple
of extra branches to throw exceptions. This patch marks those branches
as UNLIKELY() as we already do for other similar checks in the JS
bindings.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_get_property):
(webkit_dom_test_obj_class_init):
(webkit_dom_test_obj_get_strict_type_checking_attribute):
(webkit_dom_test_obj_set_strict_type_checking_attribute):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjStrictTypeCheckingAttribute):
(WebCore::setJSTestObjStrictTypeCheckingAttribute):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj strictTypeCheckingAttribute]):
(-[DOMTestObj setStrictTypeCheckingAttribute:]):
* bindings/scripts/test/TestObj.idl:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::setTHead):
(WebCore::HTMLTableElement::setTFoot):

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 16 Sep 2015 23:54:49 +0000 (23:54 +0000)]
Versioning.

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

5 years ago[ES6] Implement tail calls in the LLInt and Baseline JIT
msaboff@apple.com [Wed, 16 Sep 2015 23:40:35 +0000 (23:40 +0000)]
[ES6] Implement tail calls in the LLInt and Baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=148661

Fix for the breakage of Speedometer/Full.html (https://bugs.webkit.org/show_bug.cgi?id=149162).

Reviewed by Filip Pizlo.
Changed SetupVarargsFrame.cpp::emitSetVarargsFrame to align the callframe size to be a
multiple of stackAlignmentRegisters() in addition to the location of the new frame.

Fixed Reviewed by Filip Pizlo.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbortReason.h:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::Call::Call):
(JSC::AbstractMacroAssembler::repatchNearCall):
(JSC::AbstractMacroAssembler::repatchCompact):
* assembler/CodeLocation.h:
(JSC::CodeLocationNearCall::CodeLocationNearCall):
(JSC::CodeLocationNearCall::callMode):
(JSC::CodeLocationCommon::callAtOffset):
(JSC::CodeLocationCommon::nearCallAtOffset):
(JSC::CodeLocationCommon::dataLabelPtrAtOffset):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::locationOfNearCall):
(JSC::LinkBuffer::locationOf):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::nearCall):
(JSC::MacroAssemblerARM::nearTailCall):
(JSC::MacroAssemblerARM::call):
(JSC::MacroAssemblerARM::linkCall):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::nearCall):
(JSC::MacroAssemblerARM64::nearTailCall):
(JSC::MacroAssemblerARM64::ret):
(JSC::MacroAssemblerARM64::linkCall):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::nearCall):
(JSC::MacroAssemblerARMv7::nearTailCall):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::linkCall):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::nearCall):
(JSC::MacroAssemblerMIPS::nearTailCall):
(JSC::MacroAssemblerMIPS::call):
(JSC::MacroAssemblerMIPS::linkCall):
(JSC::MacroAssemblerMIPS::repatchCall):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::call):
(JSC::MacroAssemblerSH4::nearTailCall):
(JSC::MacroAssemblerSH4::nearCall):
(JSC::MacroAssemblerSH4::linkCall):
(JSC::MacroAssemblerSH4::repatchCall):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::linkCall):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::breakpoint):
(JSC::MacroAssemblerX86Common::nearTailCall):
(JSC::MacroAssemblerX86Common::nearCall):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::linkCall):
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::callTypeFor):
(JSC::CallLinkInfo::isVarargsCallType):
(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::specializationKind):
(JSC::CallLinkInfo::callModeFor):
(JSC::CallLinkInfo::callMode):
(JSC::CallLinkInfo::isTailCall):
(JSC::CallLinkInfo::isVarargs):
(JSC::CallLinkInfo::registerPreservationMode):
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFromLLInt):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCallInTailPosition):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargsInTailPosition):
(JSC::BytecodeGenerator::emitConstructVarargs):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
(JSC::LabelNode::emitBytecode):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
* interpreter/Interpreter.h:
(JSC::Interpreter::isCallBytecode):
(JSC::calleeFrameForVarargs):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::jumpToExceptionHandler):
(JSC::CCallHelpers::prepareForTailCallSlow):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::emit_op_call):
(JSC::JIT::emit_op_tail_call):
(JSC::JIT::emit_op_call_eval):
(JSC::JIT::emit_op_call_varargs):
(JSC::JIT::emit_op_tail_call_varargs):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::emitSlow_op_call):
(JSC::JIT::emitSlow_op_tail_call):
(JSC::JIT::emitSlow_op_call_eval):
(JSC::JIT::emitSlow_op_call_varargs):
(JSC::JIT::emitSlow_op_tail_call_varargs):
(JSC::JIT::emitSlow_op_construct_varargs):
* jit/JITCall32_64.cpp:
(JSC::JIT::emitSlow_op_call):
(JSC::JIT::emitSlow_op_tail_call):
(JSC::JIT::emitSlow_op_call_eval):
(JSC::JIT::emitSlow_op_call_varargs):
(JSC::JIT::emitSlow_op_tail_call_varargs):
(JSC::JIT::emitSlow_op_construct_varargs):
(JSC::JIT::emit_op_call):
(JSC::JIT::emit_op_tail_call):
(JSC::JIT::emit_op_call_eval):
(JSC::JIT::emit_op_call_varargs):
(JSC::JIT::emit_op_tail_call_varargs):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITInlines.h:
(JSC::JIT::emitNakedCall):
(JSC::JIT::emitNakedTailCall):
(JSC::JIT::updateTopCallFrame):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/Repatch.cpp:
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):
* jit/SetupVarargsFrame.cpp:
(JSC::emitSetVarargsFrame):
* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::slowPathFor):
(JSC::linkCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::arityFixupGenerator):
(JSC::unreachableGenerator):
(JSC::baselineGetterReturnThunkGenerator):
* jit/ThunkGenerators.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::arityCheckFor):
(JSC::CommonSlowPaths::opIn):

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

5 years agoWeb Inspector: Fix common typo "supress" => "suppress"
commit-queue@webkit.org [Wed, 16 Sep 2015 23:25:22 +0000 (23:25 +0000)]
Web Inspector: Fix common typo "supress" => "suppress"
https://bugs.webkit.org/show_bug.cgi?id=149199

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-16
Reviewed by Gyuyoung Kim.

Source/WebCore:

* html/shadow/ContentDistributor.h:
(WebCore::ContentDistributor::needsDistribution):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
* platform/NotImplemented.h:
* platform/graphics/ca/win/LayerChangesFlusher.cpp:
(WebCore::LayerChangesFlusher::hookCallback):
* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::deviceRemoved):
* platform/win/makesafeseh.asm:

Source/WebInspectorUI:

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.select):
(WebInspector.DataGridNode.prototype.deselect):
* UserInterface/Views/SearchBar.js:
(WebInspector.SearchBar):

Source/WebKit2:

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):

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

5 years agoUnreviewed, rolling out r189875 and r189878.
commit-queue@webkit.org [Wed, 16 Sep 2015 23:05:47 +0000 (23:05 +0000)]
Unreviewed, rolling out r189875 and r189878.
https://bugs.webkit.org/show_bug.cgi?id=149235

cygwin cmake build not ready yet (Requested by alexchristensen
on #webkit).

Reverted changesets:

"Switch AppleWin build to use CMake"
https://bugs.webkit.org/show_bug.cgi?id=149163
http://trac.webkit.org/changeset/189875

"Cygwin build fix after r189875"
http://trac.webkit.org/changeset/189878

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

5 years agoWebIDL: Rename [ReturnNewObject] to [NewObject] and use it more consistently in DOM
cdumez@apple.com [Wed, 16 Sep 2015 23:01:09 +0000 (23:01 +0000)]
WebIDL: Rename [ReturnNewObject] to [NewObject] and use it more consistently in DOM
https://bugs.webkit.org/show_bug.cgi?id=149192

Reviewed by Darin Adler.

Rename [ReturnNewObject] to [NewObject] and use it more consistently in
DOM.

This aligns our IDL extended attribute naming with standard Web IDL:
https://heycam.github.io/webidl/#NewObject

We already have [ReturnNewObject] in most places that the DOM
specification uses [NewObject] but we are missing a few so I'll
fix this as well:
https://dom.spec.whatwg.org/#interface-document

Using [NewObject] lets the bindings generator know that the API in
question always returns new objects and that we can bypass the check
for existing wrappers and directly create a new wrapper for the
returned object.

This patch also adds support for generating the toJSNewlyCreated()
utility function for most types. Previously, to use [ReturnNewObject]
for a new type, you needed to add the type to a hard-coded list in
the bindings generator then provide your own implementation for
toJSNewlyCreated() as custom bindings.

No new-exposed behavior change.

* bindings/js/JSDocumentCustom.cpp:
* bindings/js/JSEventCustom.cpp:
* bindings/js/JSNodeListCustom.cpp:
Add toJSNewlyCreated() custom implementation for Node, Event and
Document, that shares code with the existing toJS() implementation for
those types.

* bindings/js/JSCDATASectionCustom.cpp: Removed.
* bindings/js/JSTextCustom.cpp: Removed.
* bindings/js/JSTouchCustom.cpp: Removed.
* bindings/js/JSTouchListCustom.cpp: Removed.
Drop several custom bindings files as the bindings generator is
now able to generate the toJSNewlyCreated() utility function for
most types.

* bindings/scripts/CodeGeneratorJS.pm:
- Rename [ReturnNewObject] to [NewObject].
- Generate a toJSNewlyCreated() whenever we generate a toJS() already.
  Get rid of the hard-coded list of types that need a
  toJSNewlyCreated().

* bindings/scripts/IDLAttributes.txt:
Rename [ReturnNewObject] to [NewObject].

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
* bindings/scripts/test/JS/JSreadonly.h:
Rebaseline bindings tests.

* dom/Attr.idl:
* dom/CDATASection.idl:
* dom/Comment.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/EntityReference.idl:
* dom/ProcessingInstruction.idl:
Add [JSGenerateToJSObject] so that the bindings generator generates
a toJS() / toJSNewlyCreated() for this type. While it is not strictly
needed, it avoids falling back to using the toJS() from Node which
calls the virtual nodeType() function to determine the node type.
This change was made for efficiency purposes.

* dom/DOMImplementation.idl:
Rename [ReturnNewObject] to [NewObject] and add it to createHTMLDocument()
as well, as per the specification:
https://dom.spec.whatwg.org/#interface-domimplementation

* dom/Document.idl:
Rename [ReturnNewObject] to [NewObject] and add it to more operations
as per he DOM specification:
https://dom.spec.whatwg.org/#document

* dom/Node.idl:
Add [NewObject] to cloneNode() as per the DOM specification:
https://dom.spec.whatwg.org/#node

* dom/ParentNode.idl:
Add [NewObject] to querySelectorAll() as per the DOM specification:
https://dom.spec.whatwg.org/#parentnode

* dom/Range.idl:
Add [NewObject] for several operations, as per the DOM specification:
https://dom.spec.whatwg.org/#interface-range

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

5 years agoUnreviewed ChangeLog update
mmaxfield@apple.com [Wed, 16 Sep 2015 21:04:43 +0000 (21:04 +0000)]
Unreviewed ChangeLog update

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

5 years agoHave window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
beidson@apple.com [Wed, 16 Sep 2015 20:45:01 +0000 (20:45 +0000)]
Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
https://bugs.webkit.org/show_bug.cgi?id=149229

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/deletedatabase-request.html
      storage/indexeddb/modern/deletedatabase-null-name-exception.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBDatabaseIdentifier.cpp: Added.
(WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
* Modules/indexeddb/IDBDatabaseIdentifier.h: Added.
(WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
(WebCore::IDBDatabaseIdentifier::isHashTableDeletedValue):
(WebCore::IDBDatabaseIdentifier::hash):
(WebCore::IDBDatabaseIdentifier::isValid):
(WebCore::IDBDatabaseIdentifier::operator==):
(WebCore::IDBDatabaseIdentifier::databaseName):
(WebCore::IDBDatabaseIdentifierHash::hash):
(WebCore::IDBDatabaseIdentifierHash::equal):
(WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::shouldThrowSecurityException):
(WebCore::IDBClient::IDBFactory::getDatabaseNames):
(WebCore::IDBClient::IDBFactory::open):
(WebCore::IDBClient::IDBFactory::deleteDatabase):
* Modules/indexeddb/client/IDBFactoryImpl.h:

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
(WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
(WebCore::IDBClient::IDBOpenDBRequest::create):

* Modules/indexeddb/client/IDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::result):
(WebCore::IDBClient::IDBRequest::errorCode):
(WebCore::IDBClient::IDBRequest::error):
(WebCore::IDBClient::IDBRequest::source):
(WebCore::IDBClient::IDBRequest::transaction):
(WebCore::IDBClient::IDBRequest::readyState):
(WebCore::IDBClient::IDBRequest::eventTargetInterface):
(WebCore::IDBClient::IDBRequest::activeDOMObjectName):
(WebCore::IDBClient::IDBRequest::canSuspendForPageCache):
* Modules/indexeddb/client/IDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h.

* platform/Logging.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Enable IDB in WK1.

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/wk2/TestExpectations:
* storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt: Added.
* storage/indexeddb/modern/deletedatabase-null-name-exception.html: Added.
* storage/indexeddb/modern/deletedatabase-request-expected.txt: Added.
* storage/indexeddb/modern/deletedatabase-request.html: Added.

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

5 years agoCygwin build fix after r189875
achristensen@apple.com [Wed, 16 Sep 2015 19:55:15 +0000 (19:55 +0000)]
Cygwin build fix after r189875

* Scripts/build-webkit:
* Scripts/webkitdirs.pm:
(jhbuildWrapperPrefixIfNeeded):
(generateBuildSystemFromCMakeProject):
Make things work with cygwin and cmake.

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

5 years ago[iOS] Inline implementation of -[WKImagePreviewViewController previewActions]
mitz@apple.com [Wed, 16 Sep 2015 19:52:17 +0000 (19:52 +0000)]
[iOS] Inline implementation of -[WKImagePreviewViewController previewActions]
https://bugs.webkit.org/show_bug.cgi?id=149224

Reviewed by Tim Horton.

* Platform/spi/ios/UIKitSPI.h: Declare UIViewControllerPreviewAction and its factory method.
* UIProcess/WKImagePreviewViewController.mm:
(-[WKImagePreviewViewController previewActions]): Moved here.

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

5 years agoUnreviewed, drop dom/xhtml/level3/core/nodegetbaseuri03.xhtml test.
cdumez@apple.com [Wed, 16 Sep 2015 19:05:08 +0000 (19:05 +0000)]
Unreviewed, drop dom/xhtml/level3/core/nodegetbaseuri03.xhtml test.

This test is outdated and we have more recent DOM tests covering
the newly expected behavior.

* dom/xhtml/level3/core/nodegetbaseuri03.js: Removed.
* dom/xhtml/level3/core/nodegetbaseuri03.xhtml: Removed.

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

5 years agoSwitch AppleWin build to use CMake
achristensen@apple.com [Wed, 16 Sep 2015 18:57:44 +0000 (18:57 +0000)]
Switch AppleWin build to use CMake
https://bugs.webkit.org/show_bug.cgi?id=149163

Reviewed by Brent Fulgham.

* Scripts/build-webkit:
Build with CMake.
* Scripts/run-api-tests:
(runTest):
(listAllTests):
(prepareEnvironmentForRunningTestTool):
(testToolPaths):
(testToolPath): Deleted.
Run the API tests as separate executables on Windows.
It used to be TestWebKitAPI.exe, and it is now TestWTF.exe, TestWebCore.exe, and TestWebKit.exe.

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

5 years agoAdd newer build.webkit.org pages to robots.txt
ap@apple.com [Wed, 16 Sep 2015 18:08:32 +0000 (18:08 +0000)]
Add newer build.webkit.org pages to robots.txt
https://bugs.webkit.org/show_bug.cgi?id=149219

Reviewed by Darin Adler.

Indexing bot watcher's dashboard can't be good.

* BuildSlaveSupport/build.webkit.org-config/public_html/robots.txt:

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

5 years agoAdd initial support for [Unforgeable] IDL extended attribute
cdumez@apple.com [Wed, 16 Sep 2015 17:46:24 +0000 (17:46 +0000)]
Add initial support for [Unforgeable] IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=149147

Reviewed by Darin Adler.

Source/WebCore:

Add initial support for [Unforgeable] IDL extended attribute:
https://heycam.github.io/webidl/#Unforgeable

In particular, attributes marked as unforgeable are now:
- on the instance rather than the prototype
- non-configurable. WebKit does not match the Web IDL specification
  and most properties are currently non-configurable already. However,
  I added an extra check for [Unforgeable] so that unforgeable
  attributes stay unconfigurable if we later decide to match the spec
  and mark properties as configurable.

Operation marked as unforgeable are now non-configurable. However, this
patch does not move them from the prototype to the instance yet. This
needs to be addressed in a follow-up patch as this is a larger change.

This patch also drops support for the undocumented
[OperationsNotDeletable] IDL extended attribute. It is no longer needed
now that we support [Unforgeable] and still support [NotDeletable] for
operations.

Test: fast/dom/unforgeable-attributes.html

* Modules/plugins/QuickTimePluginReplacement.idl:
Drop [OperationsNotDeletable] on the interface and mark the only
operation on this interface as [NotDeletable]. There is no behavior
change but this allows us to drop support for a non-standard and
undocumented IDL extended attribute.

* bindings/scripts/CodeGeneratorJS.pm:
(AttributeShouldBeOnInstance):
(GenerateAttributesHashTable):
(GenerateImplementation):
Add initial support for [Unforgeable] IDL extended attribute.

* bindings/scripts/IDLAttributes.txt:
Add [Unforgeable]. Drop [OperationsNotDeletable].

* crypto/CryptoKeyPair.idl:
Drop [OperationsNotDeletable] on the interface as this interface has
no operations.

* dom/Document.idl:
* page/DOMWindow.idl:
* page/Location.idl:
Mark attributes / interfaces as [Unforgeable] as per the latest HTML
specification:
https://html.spec.whatwg.org/multipage/dom.html#document
https://html.spec.whatwg.org/multipage/browsers.html#window
https://html.spec.whatwg.org/multipage/browsers.html#the-location-interface

LayoutTests:

New test that verifies that well-known [Unforgeable] attributes
are on the instance rather than the prototype and that they are
non-configurable.

* fast/dom/unforgeable-attributes-expected.txt: Added.
* fast/dom/unforgeable-attributes.html: Added.

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

5 years agoWeb Inspector: Turn off line wrapping in resource text editors
commit-queue@webkit.org [Wed, 16 Sep 2015 17:38:30 +0000 (17:38 +0000)]
Web Inspector: Turn off line wrapping in resource text editors
https://bugs.webkit.org/show_bug.cgi?id=149121

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-16
Reviewed by Darin Adler.

* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):

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

5 years ago[Mac] Allow reading from SubmitDiagInfo.domains in Networking process
ap@apple.com [Wed, 16 Sep 2015 17:35:11 +0000 (17:35 +0000)]
[Mac] Allow reading from SubmitDiagInfo.domains in Networking process
https://bugs.webkit.org/show_bug.cgi?id=149176
rdar://problem/22483680

Reviewed by Darin Adler.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

5 years agoSimple line layout: Glitch selecting long text.
zalan@apple.com [Wed, 16 Sep 2015 17:31:45 +0000 (17:31 +0000)]
Simple line layout: Glitch selecting long text.
https://bugs.webkit.org/show_bug.cgi?id=149204
rdar://problem/22646472

Reviewed by Antti Koivisto.

When long text is split into multiple RenderText objects, we ignore renderer boundaries while
collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer).
This patch ensures that fragments with hypen character ignore renderer boundaries too.

Source/WebCore:

Test: fast/text/multiple-renderers-with-hypen-on-boundary.html

* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

LayoutTests:

* fast/text/multiple-renderers-with-hypen-on-boundary-expected.html: Added.
* fast/text/multiple-renderers-with-hypen-on-boundary.html: Added.

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

5 years agofast/events/mouse-cursor-change.html is flaky on Mac
ap@apple.com [Wed, 16 Sep 2015 17:29:40 +0000 (17:29 +0000)]
fast/events/mouse-cursor-change.html is flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=149216

Reviewed by Darin Adler.

* fast/events/mouse-cursor-change.html: Increase the timeout. I don't see a way to make
this test 100% reliable, but this change makes it work in my local testing.

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

5 years ago[iOS] Unifiy WebKit2PlatformTouchPoint definition
mitz@apple.com [Wed, 16 Sep 2015 17:24:07 +0000 (17:24 +0000)]
[iOS] Unifiy WebKit2PlatformTouchPoint definition
https://bugs.webkit.org/show_bug.cgi?id=149221

Reviewed by Darin Adler.

* Shared/WebEventConversion.cpp:
(WebKit::touchEventType):
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):

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

5 years agoRollout r189851 and 189853 because they didn’t actually fix the permissions issue
achristensen@apple.com [Wed, 16 Sep 2015 16:55:17 +0000 (16:55 +0000)]
Rollout r189851 and 189853 because they didn’t actually fix the permissions issue

* BuildSlaveSupport/built-product-archive:
(unzipArchive):

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

5 years agoUnreviewed, rebaseline W3C html/dom test for iOS after r189842.
cdumez@apple.com [Wed, 16 Sep 2015 16:08:17 +0000 (16:08 +0000)]
Unreviewed, rebaseline W3C html/dom test for iOS after r189842.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

5 years agoMore test result fixing after r189841.
ap@apple.com [Wed, 16 Sep 2015 16:01:11 +0000 (16:01 +0000)]
More test result fixing after r189841.

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

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

5 years agoMark http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html as flaky...
ap@apple.com [Wed, 16 Sep 2015 15:57:20 +0000 (15:57 +0000)]
Mark http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html as flaky, because it is.

It was already marked as flaky on mac-wk2.

* platform/ios-simulator-wk2/TestExpectations:

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

5 years agoRemove stray logging string mistakenly left in r189746.
beidson@apple.com [Wed, 16 Sep 2015 15:32:21 +0000 (15:32 +0000)]
Remove stray logging string mistakenly left in r189746.

* Modules/indexeddb/legacy/LegacyFactory.cpp:
(WebCore::LegacyFactory::deleteDatabase):

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

5 years agoSource/WebCore:
cfleizach@apple.com [Wed, 16 Sep 2015 15:02:46 +0000 (15:02 +0000)]
Source/WebCore:
AX: No VoiceOver typing feedback in some search fields
https://bugs.webkit.org/show_bug.cgi?id=149177

Reviewed by Mario Sanchez Prada.

If SearchFieldRole is not marked as a TextControl, it does not end up returning the accessibilityValue,
which is needed to output the right text to VoiceOver.

Test: accessibility/ax-value-with-search.html

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

LayoutTests:
AX: No VO typing feedback in some text fields
https://bugs.webkit.org/show_bug.cgi?id=149177

Reviewed by Mario Sanchez Prada.

* accessibility/ax-value-with-search-expected.txt: Added.
* accessibility/ax-value-with-search.html: Added.

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

5 years ago[EFL] Fix the help message of separated web process option of MiniBrowser
ossy@webkit.org [Wed, 16 Sep 2015 12:48:38 +0000 (12:48 +0000)]
[EFL] Fix the help message of separated web process option of MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=149212

Reviewed by Gyuyoung Kim.

* MiniBrowser/efl/main.c:

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

5 years ago[css-grid] Grid container's height should include scrollbar
rego@igalia.com [Wed, 16 Sep 2015 10:09:23 +0000 (10:09 +0000)]
[css-grid] Grid container's height should include scrollbar
https://bugs.webkit.org/show_bug.cgi?id=149210

Reviewed by Sergio Villar Senin.

Source/WebCore:

Add scrollbar's size in the grid container's height calculation at
RenderGrid::layoutGridItems().

Test: fast/css-grid-layout/grid-container-margin-border-padding-scrollbar.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutGridItems): Include scrollbarLogicalHeight()
while computing the grid's logical height.

LayoutTests:

Add test to check both height and width (which was already working as
expected) with margins, borders, paddings and scrollbars.

* fast/css-grid-layout/grid-container-margin-border-padding-scrollbar-expected.txt: Added.
* fast/css-grid-layout/grid-container-margin-border-padding-scrollbar.html: Added.

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

5 years agoUnreviewed. Fix GObject DOM bindings API break after r189676.
carlosgc@webkit.org [Wed, 16 Sep 2015 08:29:37 +0000 (08:29 +0000)]
Unreviewed. Fix GObject DOM bindings API break after r189676.

webkit_dom_character_data_append_data() used to raise exceptions.

* bindings/scripts/CodeGeneratorGObject.pm:
(FunctionUsedToRaiseException):

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

5 years ago[GTK] Web Process crash recovery no longer works
carlosgc@webkit.org [Wed, 16 Sep 2015 08:00:34 +0000 (08:00 +0000)]
[GTK] Web Process crash recovery no longer works
https://bugs.webkit.org/show_bug.cgi?id=149064

Reviewed by Žan Doberšek.

After a web process crash the new DrawingArea is never resized, so
nothing is rendered into the web view.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDidRelaunchWebProcess): Queue a widget resize to ensure
the new DrawingAreaProxy is resized.

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

5 years agoFix python syntax after r189851.
achristensen@apple.com [Wed, 16 Sep 2015 07:19:29 +0000 (07:19 +0000)]
Fix python syntax after r189851.

* BuildSlaveSupport/built-product-archive:
(unzipArchive):
For loops need a colon.

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

5 years agoMac rebaseline after r189841.
rniwa@webkit.org [Wed, 16 Sep 2015 07:14:30 +0000 (07:14 +0000)]
Mac rebaseline after r189841.

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

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

5 years agoFix Windows test bots after changing to non-cygwin build
achristensen@apple.com [Wed, 16 Sep 2015 07:06:33 +0000 (07:06 +0000)]
Fix Windows test bots after changing to non-cygwin build
https://bugs.webkit.org/show_bug.cgi?id=149196

Reviewed by Daniel Bates.

* BuildSlaveSupport/built-product-archive:
(unzipArchive):
Using different versions of python makes what I think is https://bugs.python.org/issue15795
prevent us from executing files from the archive on the test bots.

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

5 years agoUnreviewed, rolling out r189847.
commit-queue@webkit.org [Wed, 16 Sep 2015 06:59:25 +0000 (06:59 +0000)]
Unreviewed, rolling out r189847.
https://bugs.webkit.org/show_bug.cgi?id=149208

Asserts on all the tests (Requested by ap on #webkit).

Reverted changeset:

"Simple line layout: Glitch selecting long text."
https://bugs.webkit.org/show_bug.cgi?id=149204
http://trac.webkit.org/changeset/189847

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

5 years agoBuild fix for WebAssembly after r189848
ssakshuwong@apple.com [Wed, 16 Sep 2015 06:49:53 +0000 (06:49 +0000)]
Build fix for WebAssembly after r189848

* jit/JITOperations.cpp

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

5 years agoRollout r189774 and 189818.
msaboff@apple.com [Wed, 16 Sep 2015 06:14:54 +0000 (06:14 +0000)]
Rollout r189774 and 189818.

Broke Speedometer/Full.html

Not reviewed.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbortReason.h:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::Call::Call):
(JSC::AbstractMacroAssembler::repatchNearCall):
(JSC::AbstractMacroAssembler::repatchCompact):
* assembler/CodeLocation.h:
(JSC::CodeLocationNearCall::CodeLocationNearCall):
(JSC::CodeLocationCommon::callAtOffset):
(JSC::CodeLocationCommon::nearCallAtOffset):
(JSC::CodeLocationCommon::dataLabelPtrAtOffset):
(JSC::CodeLocationNearCall::callMode): Deleted.
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::locationOfNearCall):
(JSC::LinkBuffer::locationOf):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::nearCall):
(JSC::MacroAssemblerARM::call):
(JSC::MacroAssemblerARM::linkCall):
(JSC::MacroAssemblerARM::nearTailCall): Deleted.
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::nearCall):
(JSC::MacroAssemblerARM64::ret):
(JSC::MacroAssemblerARM64::linkCall):
(JSC::MacroAssemblerARM64::nearTailCall): Deleted.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::nearCall):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::linkCall):
(JSC::MacroAssemblerARMv7::nearTailCall): Deleted.
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::nearCall):
(JSC::MacroAssemblerMIPS::call):
(JSC::MacroAssemblerMIPS::linkCall):
(JSC::MacroAssemblerMIPS::repatchCall):
(JSC::MacroAssemblerMIPS::nearTailCall): Deleted.
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::call):
(JSC::MacroAssemblerSH4::nearCall):
(JSC::MacroAssemblerSH4::linkCall):
(JSC::MacroAssemblerSH4::repatchCall):
(JSC::MacroAssemblerSH4::nearTailCall): Deleted.
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::linkCall):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::breakpoint):
(JSC::MacroAssemblerX86Common::nearCall):
(JSC::MacroAssemblerX86Common::nearTailCall): Deleted.
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::linkCall):
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::callTypeFor):
(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::specializationKind):
(JSC::CallLinkInfo::registerPreservationMode):
(JSC::CallLinkInfo::isVarargsCallType): Deleted.
(JSC::CallLinkInfo::callModeFor): Deleted.
(JSC::CallLinkInfo::callMode): Deleted.
(JSC::CallLinkInfo::isTailCall): Deleted.
(JSC::CallLinkInfo::isVarargs): Deleted.
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFromLLInt):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCallInTailPosition):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargsInTailPosition):
(JSC::BytecodeGenerator::emitConstructVarargs):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
(JSC::LabelNode::emitBytecode):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
* interpreter/Interpreter.h:
(JSC::Interpreter::isCallBytecode):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::jumpToExceptionHandler):
(JSC::CCallHelpers::prepareForTailCallSlow): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::emit_op_call):
(JSC::JIT::emit_op_call_eval):
(JSC::JIT::emit_op_call_varargs):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::emitSlow_op_call):
(JSC::JIT::emitSlow_op_call_eval):
(JSC::JIT::emitSlow_op_call_varargs):
(JSC::JIT::emitSlow_op_construct_varargs):
(JSC::JIT::emit_op_tail_call): Deleted.
(JSC::JIT::emit_op_tail_call_varargs): Deleted.
(JSC::JIT::emitSlow_op_tail_call): Deleted.
(JSC::JIT::emitSlow_op_tail_call_varargs): Deleted.
* jit/JITCall32_64.cpp:
(JSC::JIT::emitSlow_op_call):
(JSC::JIT::emitSlow_op_call_eval):
(JSC::JIT::emitSlow_op_call_varargs):
(JSC::JIT::emitSlow_op_construct_varargs):
(JSC::JIT::emit_op_call):
(JSC::JIT::emit_op_call_eval):
(JSC::JIT::emit_op_call_varargs):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::emitSlow_op_tail_call): Deleted.
(JSC::JIT::emitSlow_op_tail_call_varargs): Deleted.
(JSC::JIT::emit_op_tail_call): Deleted.
(JSC::JIT::emit_op_tail_call_varargs): Deleted.
* jit/JITInlines.h:
(JSC::JIT::emitNakedCall):
(JSC::JIT::updateTopCallFrame):
(JSC::JIT::emitNakedTailCall): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/Repatch.cpp:
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):
* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::slowPathFor):
(JSC::linkCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::arityFixupGenerator):
(JSC::baselineGetterReturnThunkGenerator):
(JSC::unreachableGenerator): Deleted.
* jit/ThunkGenerators.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::arityCheckFor):
(JSC::CommonSlowPaths::opIn):
* tests/stress/mutual-tail-call-no-stack-overflow.js: Removed.
* tests/stress/tail-call-no-stack-overflow.js: Removed.
* tests/stress/tail-call-recognize.js: Removed.
* tests/stress/tail-call-varargs-no-stack-overflow.js: Removed.
* tests/stress/tail-calls-dont-overwrite-live-stack.js: Removed.

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

5 years agoSimple line layout: Glitch selecting long text.
zalan@apple.com [Wed, 16 Sep 2015 06:07:16 +0000 (06:07 +0000)]
Simple line layout: Glitch selecting long text.
https://bugs.webkit.org/show_bug.cgi?id=149204
rdar://problem/22646472

Reviewed by Antti Koivisto.

When long text is split into multiple RenderText objects, we ignore renderer boundaries while
collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer).
This patch ensures that fragments with hypen character ignore renderer boundaries too.

Source/WebCore:

Test: fast/text/multiple-renderers-with-hypen-on-boundary.html

* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

LayoutTests:

* fast/text/multiple-renderers-with-hypen-on-boundary-expected.html: Added.
* fast/text/multiple-renderers-with-hypen-on-boundary.html: Added.

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

5 years agoImplement imported global variables in WebAssembly
commit-queue@webkit.org [Wed, 16 Sep 2015 05:49:11 +0000 (05:49 +0000)]
Implement imported global variables in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149206

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-15
Reviewed by Filip Pizlo.

Values can now be imported to a WebAssembly module through properties of
the imports object that is passed to loadWebAssembly(). In order to
avoid any side effect when accessing the imports object, we check that
the properties are data properties. We also check that each value is a
primitive and is not a Symbol. According to the ECMA262 6.0 spec,
calling ToNumber() on a primitive that is not a Symbol should not cause
any side effect.[1]

[1]: http://www.ecma-international.org/ecma-262/6.0/#sec-tonumber

* tests/stress/wasm-globals.js:
* tests/stress/wasm/globals.wasm:
* wasm/WASMModuleParser.cpp:
(JSC::WASMModuleParser::parseModule):
(JSC::WASMModuleParser::parseGlobalSection):
* wasm/WASMModuleParser.h:

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

5 years agoWeb Inspector: Picking unchanged for font-size does not reset back to the unchanged...
commit-queue@webkit.org [Wed, 16 Sep 2015 04:22:21 +0000 (04:22 +0000)]
Web Inspector: Picking unchanged for font-size does not reset back to the unchanged value
https://bugs.webkit.org/show_bug.cgi?id=148351

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2015-09-15
Reviewed by Brian Burg.

Visual number editors now save any new values in the special placeholder element
to display it whenever the "Unchanged" option is selected by the user.

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
(WebInspector.VisualStyleNumberInputBox.prototype._setNumberInputIsEditable):
(WebInspector.VisualStyleNumberInputBox.prototype._keywordChanged):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown.adjustValue):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):

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

5 years agoFix asm.js errors in WebAssembly tests
commit-queue@webkit.org [Wed, 16 Sep 2015 03:52:20 +0000 (03:52 +0000)]
Fix asm.js errors in WebAssembly tests
https://bugs.webkit.org/show_bug.cgi?id=149203

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-15
Reviewed by Geoffrey Garen.

Our WebAssembly implementation uses asm.js for testing. Using Firefox to
parse asm.js reveals many errors that are not caught by pack-asmjs. For
example,
- asm.js does not allow the use of the multiplication operator (*) to
  multiply two integers, because the result can be so large that some
  lower bits of precision are lost. Math.imul is used instead.
- an int variable must be coerced to either signed (via x|0) or unsigned
  (via x>>>0) before it's returned.

* tests/stress/wasm-arithmetic-int32.js:
* tests/stress/wasm-calls.js:
* tests/stress/wasm-control-flow.js:
* tests/stress/wasm-globals.js:
* tests/stress/wasm-locals.js:
* tests/stress/wasm-relational.js:
* tests/stress/wasm/control-flow.wasm:

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

5 years agoGTK+ build fix attempt after r189841.
rniwa@webkit.org [Wed, 16 Sep 2015 03:46:46 +0000 (03:46 +0000)]
GTK+ build fix attempt after r189841.

* PlatformGTK.cmake:

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

5 years agoDocument.createElement(localName) does not handle correctly missing or null parameter
cdumez@apple.com [Wed, 16 Sep 2015 03:36:55 +0000 (03:36 +0000)]
Document.createElement(localName) does not handle correctly missing or null parameter
https://bugs.webkit.org/show_bug.cgi?id=149184
<rdar://problem/22565070>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/nodes/Document-createElement-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Document.createElement(localName) does not handle correct missing or
null parameter:
- https://dom.spec.whatwg.org/#interface-document

As per the specification, the parameter is a non-nullable DOMString and
is mandatory. Therefore, as per Web IDL, we should have the following
behavior:
1. If the parameter is missing, we should throw an exception
2. If the parameter is null, we should convert it to the "null" string
   and create a <null> element.

Chrome and Firefox behave according to the specification. However,
WebKit was doing:
1. Create a <undefined> element
2. Throw an InvalidCharacterError

This patch aligns WebKit's behavior with the specification and other
major browsers.

No new tests, already covered by existing tests.

* dom/Document.idl:

LayoutTests:

Update / rebaseline existing tests now that our behavior has changed.

* fast/dom/Document/createElementNS-namespace-err-expected.txt:
* fast/dom/Document/script-tests/createElementNS-namespace-err.js:
* fast/dom/dom-method-document-change.html:
* fast/dom/element-removed-while-inserting-parent-crash.html:
* fast/inspector-support/uncaught-dom3-exception-expected.txt:

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

5 years agoAdd ShadowRoot interface and Element.prototype.attachShadow
rniwa@webkit.org [Wed, 16 Sep 2015 02:40:53 +0000 (02:40 +0000)]
Add ShadowRoot interface and Element.prototype.attachShadow
https://bugs.webkit.org/show_bug.cgi?id=149187

Reviewed by Antti Koivisto.

.:

* Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Add back ShadowRoot IDL interface and Element.prototype.attachShadow in accordance with
http://w3c.github.io/webcomponents/spec/shadow/ at db27e6e36eab512d86edcdabb33ed27b5751acd7 excluding getSelection(),
elementFromPoint(), elementsFromPoint(), caretPositionFromPoint(), and styleSheets attribute on ShadowRoot interface.

The feature is enabled by default on Mac and iOS ports for testing and disabled by default elsewhere.

Also added HTMLElement::canHaveUserAgentShadowRoot which returns false by default and overridden elsewhere to return true
to distinguish elements for which attachShadow is supposed to throw NotSupported.
See https://w3c.github.io/webcomponents/spec/shadow/#widl-Element-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict

Tests: fast/shadow-dom/Element-interface-attachShadow.html
       fast/shadow-dom/Element-interface-shadowRoot-attribute.html
       fast/shadow-dom/ShadowRoot-interface.html

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* dom/Element.cpp:
(WebCore::Element::bindingsOffsetParent):
(WebCore::Element::offsetParent):
(WebCore::Element::addShadowRoot):
(WebCore::Element::createShadowRoot):
(WebCore::Element::attachShadow): Added.
(WebCore::Element::bindingShadowRoot): Added. Returns null unless the attached shadow root is in the "open" mode.
* dom/Element.h:
* dom/Element.idl: Added attachShadow and shadowRoot. We only expose these to JS for now since Dictionary argument isn't
supported by other binding code.
* dom/ShadowRoot.cpp: Removed an unused enum.
* dom/ShadowRoot.h:
(WebCore::ShadowRoot::Type): Replaced old-style enum "ShadowRootType" by an enum class named "Type". Also added two new
values Open and Closed for author shadow roots.
(WebCore::ShadowRoot::type):
* dom/ShadowRoot.idl: Added.
* html/HTMLButtonElement.h:
* html/HTMLDetailsElement.h:
(HTMLButtonElement::canHaveUserAgentShadowRoot): Ditto.
* html/HTMLElement.h:
(WebCore::HTMLElement::canHaveUserAgentShadowRoot): Added. Returns false by default.
* html/HTMLInputElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLMarqueeElement.h:
* html/HTMLMediaElement.h:
* html/HTMLMeterElement.h:
* html/HTMLPlugInElement.h:
* html/HTMLProgressElement.h:
* html/HTMLSelectElement.h:
* html/HTMLSummaryElement.h:
* html/HTMLTextAreaElement.h:
* html/shadow/InsertionPoint.h:
(ShadowRootWithInsertionPoints::ShadowRootWithInsertionPoints):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::selectionPseudoStyle):
* rendering/RenderLayer.cpp:
(WebCore::rendererForScrollbar):
* svg/SVGElement.cpp:
(WebCore::SVGElement::correspondingUseElement):
* testing/Internals.cpp:
(WebCore::Internals::shadowRootType):

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Add new tests for Shadow DOM with failing expectations on all platforms but Mac.

* TestExpectations:
* fast/shadow-dom: Added.
* fast/shadow-dom/Element-interface-attachShadow-expected.txt: Added.
* fast/shadow-dom/Element-interface-attachShadow.html: Added.
* fast/shadow-dom/Element-interface-shadowRoot-attribute-expected.txt: Added.
* fast/shadow-dom/Element-interface-shadowRoot-attribute.html: Added.
* fast/shadow-dom/ShadowRoot-interface-expected.txt: Added.
* fast/shadow-dom/ShadowRoot-interface.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/TestExpectations:
* platform/mac/js/dom/constructor-length-expected.txt:

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

5 years ago[Win] Unreviewed release fix after r189832
bfulgham@apple.com [Wed, 16 Sep 2015 02:10:46 +0000 (02:10 +0000)]
[Win] Unreviewed release fix after r189832

* platform/graphics/ca/win/PlatformCALayerWin.h: The implementation
should exist in Release builds as well.

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

5 years agoAppscale queue status json output lacks bots
commit-queue@webkit.org [Wed, 16 Sep 2015 02:04:31 +0000 (02:04 +0000)]
Appscale queue status json output lacks bots
https://bugs.webkit.org/show_bug.cgi?id=149194
<rdar://problem/22171089>

Patch by Aakash Jain <aakash_jain@apple.com> on 2015-09-15
Reviewed by Alexey Proskuryakov.

* QueueStatusServer/handlers/queuestatusjson.py:
(QueueStatusJSON._bots): Order the results by date so as to get latest events, this was default in AppEngine.
* QueueStatusServer/index.yaml: Index according to appscale requirements.

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

5 years ago[WebGL] Only require that the stencil value and write masks have as many bits set...
commit-queue@webkit.org [Wed, 16 Sep 2015 01:54:47 +0000 (01:54 +0000)]
[WebGL] Only require that the stencil value and write masks have as many bits set as the stencil buffer is deep
https://bugs.webkit.org/show_bug.cgi?id=149174

Patch by Jinyoung Hur <hur.ims@navercorp.com> on 2015-09-15
Reviewed by Dean Jackson.

Copied the stencil mask related tests from the webgl/1.0.2/resources/webgl_test_files/conformance/state/gl-get-calls.html.

It seems that there is a difference in the way that glGetIntegerV returns an unsigned int type value among
OpenGL implementatios. Some return the whole bits of value(e.g., 0xffffffff -> 0xffffffff), whereas some(e.g., ANGLE)
return a max-int-clamped value(e.g., 0xffffffff -> 0x7fffffff).

It would be good to make this test independent on the OpenGL implementations.

* fast/canvas/webgl/gl-get-calls-expected.txt:
* fast/canvas/webgl/gl-get-calls.html:

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

5 years ago[EFL] Unreviewed gardening 16th Sep.
gyuyoung.kim@webkit.org [Wed, 16 Sep 2015 01:34:05 +0000 (01:34 +0000)]
[EFL] Unreviewed gardening 16th Sep.

Mark fast/css, fast/form tests to failure. Besides some tests of imported/w3c/web-platform-tests/html
are marked to pass on EFL port.

* platform/efl/TestExpectations:

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

5 years agoStyle invalidation affecting siblings does not work with inline-style changes
benjamin@webkit.org [Wed, 16 Sep 2015 01:31:50 +0000 (01:31 +0000)]
Style invalidation affecting siblings does not work with inline-style changes
https://bugs.webkit.org/show_bug.cgi?id=149189

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-09-15
Reviewed by Antti Koivisto.

Source/WebCore:

Style::resolveTree() made the assumption that inline style changes only affect
descendants and should not participate in "StyleRecalcAffectsNextSiblingElementStyle".
That was wrong. If the inline style change through CSSOM, it can cause the creation
of a style attribute, which is observable through "StyleRecalcAffectsNextSiblingElementStyle".

This patch removes the incorrect assumption. Style invalidation is always propagated now.

Tests: fast/css/style-attribute-invalidation-propagates-to-counted-siblings.html
       fast/css/style-attribute-invalidation-propagates-to-direct-siblings.html
       fast/css/style-attribute-invalidation-propagates-to-indirect-siblings.html

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::InlineCSSStyleDeclaration::didMutate): Deleted.
* dom/StyledElement.cpp:
(WebCore::StyledElement::inlineStyleChanged):
* dom/StyledElement.h:
(WebCore::StyledElement::invalidateStyleAttribute):
Clean up inline-style invalidation a tiny bit.

* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
Fix the bug.

LayoutTests:

* fast/css/style-attribute-invalidation-propagates-to-counted-siblings-expected.txt: Added.
* fast/css/style-attribute-invalidation-propagates-to-counted-siblings.html: Added.
* fast/css/style-attribute-invalidation-propagates-to-direct-siblings-expected.txt: Added.
* fast/css/style-attribute-invalidation-propagates-to-direct-siblings.html: Added.
* fast/css/style-attribute-invalidation-propagates-to-indirect-siblings-expected.txt: Added.
* fast/css/style-attribute-invalidation-propagates-to-indirect-siblings.html: Added.

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

5 years agoAdd anchor tags for scroll snapping examples.
wenson_hsieh@apple.com [Wed, 16 Sep 2015 01:14:29 +0000 (01:14 +0000)]
Add anchor tags for scroll snapping examples.

* demos/scroll-snap/index.html: Added anchor tags.

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

5 years agoWeb Inspector: Paused Debugger prevents page reload
commit-queue@webkit.org [Wed, 16 Sep 2015 01:03:35 +0000 (01:03 +0000)]
Web Inspector: Paused Debugger prevents page reload
https://bugs.webkit.org/show_bug.cgi?id=148174

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-15
Reviewed by Brian Burg.

Source/JavaScriptCore:

* debugger/Debugger.h:
(JSC::Debugger::suppressAllPauses):
(JSC::Debugger::setSuppressAllPauses):
* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::pauseIfNeeded):
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::setSuppressAllPauses):
Provide a way to suppress pauses.

Source/WebCore:

When navigating the page while paused, suppress any pausing until the page
has completed navigation. If not paused and navigating, you can still pause
in pagehide and unload handlers or other late page events.

Could not write a reliable test for this at the moment.
InspectorTest.reloadPage has multiple issues with the output,
so I'll investigate making reload tests more reliable later.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::resume): Deleted.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
We now use existing InspectorInstrumentation functions instead of a method
on InspectorController during load. In dropping the method InspectorController
can drop a member variable no longer used.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willStartProvisionalLoad):
Add a new instrumentation hook.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willStartProvisionalLoadImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
When starting or completing main frame navigations, let the PageDebuggerAgent do some work.

* inspector/PageDebuggerAgent.h:
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::mainFrameStartedLoading):
(WebCore::PageDebuggerAgent::mainFrameStoppedLoading):
(WebCore::PageDebuggerAgent::mainFrameNavigated):
Suppress pausing if navigating while paused. Otherwise behave as normal.

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

5 years ago[Win] Provide a means for viewing the layer tree
bfulgham@apple.com [Wed, 16 Sep 2015 01:00:32 +0000 (01:00 +0000)]
[Win] Provide a means for viewing the layer tree
https://bugs.webkit.org/show_bug.cgi?id=149165

Reviewed by Simon Fraser.

Source/WebCore:

Revise the old fprintf logic to generate a string
containing the layer tree so that it can be output
to the debugger (or elsewhere).

* platform/graphics/ca/PlatformCALayer.h: Rename 'printTree'
to 'printLayerTree', and make it available in release builds.
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::printLayerTree): Added. Calls into
the PlatformCALayer implementation.
* platform/graphics/ca/win/CACFLayerTreeHost.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(printIndent): Revise to use two-space indent and use StringBuilder.
(printTransform): Ditto.
(printColor): Added helper function.
(printLayer): Revised to output information on the layer contents.
(PlatformCALayerWin::printLayerTree): Renamed from 'printTree'.
(PlatformCALayerWin::printTree): Deleted.
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::drawRepaintCounters): Drive-by fix. Match the
cocoa repaint counter logic by not painting counters for the layers that
contain the tile grid.
* platform/graphics/ca/win/PlatformCALayerWin.h:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::drawRepaintCounters):

Source/WebKit/win:

Add a new WebView method "printLayerTree" so that clients
can get a string dump of the current layer tree. Add this
to a new COM interface version so no existing clients break
compatibility.

* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::QueryInterface): Recognize the new interface version.
(WebView::printLayerTree): Added. This just calls the WebCore
implementation.
* WebView.h:

Tools:

Update MiniBrowser with a new Debug menu option that will
dump the current layer tree to the debug console.

* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.rc:
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibResource.h:
* MiniBrowser/win/Common.cpp:
(WndProc): Add handler for 'Print Layer Tree' menu option.
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::printLayerTree): Added Handler.
* MiniBrowser/win/MiniBrowser.h:

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

5 years agoNested isolates can cause an infinite loop when laying out bidi runs
mmaxfield@apple.com [Wed, 16 Sep 2015 00:30:38 +0000 (00:30 +0000)]
Nested isolates can cause an infinite loop when laying out bidi runs
https://bugs.webkit.org/show_bug.cgi?id=149153

Reviewed by David Hyatt.

Source/WebCore:

When traversing bidi runs, we might encounter a run which is supposed to be isolated. In this
situation, we will append a placeholder run in the run list, and remember a pointer to these
isolated runs inside BidiResolver. Then, once we're done traversing the bidi runs, we return
to the isolated runs and handle them separately (and replace the placeholder with the result).

However, due to the fact that our BidiRuns start at leaf nodes, we have to keep track of which
local root of the render tree we were inspecting (to ensure that we visit the same node
multiple times if there are nested isolate spans). We were not correctly keeping track of this
local root, which was leading us to consider the same root multiple times, thereby leading to
an infinite loop.

The solution is simply to keep root information alongside the isolated run information inside
BidiResolver. However, BidiResolver is inside platform/, which means that this new type should
be a template argument, just like how BidiRun itself is a template argument.

This new type, BidiIsolatedRun, holds all the information that our isolate-revisiting logic
needs inside constructBidiRunsForSegment(). It also holds a reference to the placeholder run
which we will replace.

Test: fast/text/international/unicode-bidi-isolate-nested-crash.html

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawBidiText): BidiIsolatedRun template argument is unused, so pass
in Void.
* platform/text/BidiResolver.h: Add template argument.
(WebCore::BidiResolver::isolatedRuns):
(WebCore::IsolatedRun>::~BidiResolver):
(WebCore::IsolatedRun>::appendRun):
(WebCore::IsolatedRun>::embed):
(WebCore::IsolatedRun>::checkDirectionInLowerRaiseEmbeddingLevel):
(WebCore::IsolatedRun>::lowerExplicitEmbeddingLevel):
(WebCore::IsolatedRun>::raiseExplicitEmbeddingLevel):
(WebCore::IsolatedRun>::commitExplicitEmbedding):
(WebCore::IsolatedRun>::updateStatusLastFromCurrentDirection):
(WebCore::IsolatedRun>::reorderRunsFromLevels):
(WebCore::IsolatedRun>::createBidiRunsForLine):
(WebCore::IsolatedRun>::setMidpointForIsolatedRun): Use references instead of pointers.
(WebCore::IsolatedRun>::midpointForIsolatedRun): Ditto.
(WebCore::Run>::~BidiResolver): Deleted.
(WebCore::Run>::appendRun): Deleted.
(WebCore::Run>::embed): Deleted.
(WebCore::Run>::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
(WebCore::Run>::lowerExplicitEmbeddingLevel): Deleted.
(WebCore::Run>::raiseExplicitEmbeddingLevel): Deleted.
(WebCore::Run>::commitExplicitEmbedding): Deleted.
(WebCore::Run>::updateStatusLastFromCurrentDirection): Deleted.
(WebCore::Run>::reorderRunsFromLevels): Deleted.
(WebCore::Run>::createBidiRunsForLine): Deleted.
(WebCore::Run>::setMidpointForIsolatedRun): Deleted.
(WebCore::Run>::midpointForIsolatedRun): Deleted.
* rendering/InlineIterator.h:
(WebCore::BidiIsolatedRun::BidiIsolatedRun): New type.
(WebCore::addPlaceholderRunForIsolatedInline): Create new type, and include local root
information.
(WebCore::IsolateTracker::addFakeRunIfNecessary): Include local root information.
(WebCore::InlineBidiResolver::appendRun): Ditto.
* rendering/RenderBlockLineLayout.cpp: Update for new BidiIsolatedRun type.
(WebCore::setUpResolverToResumeInIsolate):
(WebCore::constructBidiRunsForSegment):
* rendering/line/TrailingObjects.h:

LayoutTests:

* fast/text/international/unicode-bidi-isolate-nested-crash-expected.html: Added.
* fast/text/international/unicode-bidi-isolate-nested-crash.html: Added.

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

5 years agoAdd empty IDBFactory implementation for Modern IDB.
beidson@apple.com [Wed, 16 Sep 2015 00:19:29 +0000 (00:19 +0000)]
Add empty IDBFactory implementation for Modern IDB.
https://bugs.webkit.org/show_bug.cgi?id=149191

Reviewed by Jer Noble.

Source/WebCore:

No new tests (No behavior change).

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::create):
(WebCore::IDBClient::IDBFactory::IDBFactory):
(WebCore::IDBClient::IDBFactory::getDatabaseNames):
(WebCore::IDBClient::IDBFactory::open):
(WebCore::IDBClient::IDBFactory::deleteDatabase):
(WebCore::IDBClient::IDBFactory::cmp):
* Modules/indexeddb/client/IDBFactoryImpl.h:

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* loader/EmptyClients.cpp:
* page/DatabaseProvider.h:

Source/WebKit:

* Storage/WebDatabaseProvider.h:

Source/WebKit2:

* WebProcess/Databases/WebDatabaseProvider.h:

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

5 years agoSplit FontDescription into lower and higher level types
antti@apple.com [Wed, 16 Sep 2015 00:16:58 +0000 (00:16 +0000)]
Split FontDescription into lower and higher level types
https://bugs.webkit.org/show_bug.cgi?id=149036

Reviewed by Darin Adler.

Currently FontDescription is used through the text subsystem. However much of the data it
carries is only needed by FontCascade and text layout but not by the lower level Font/FontCache
layer. This makes code confusing. For example families specified in FontDescription are ignored
at lower levels.

Split it into a low level FontDescription and a high level FontCascadeDescription type:

FontDescription <-> Font
FontCascadeDescription <-> FontCascade

The former only carries information that is needed to instantiate a Font or fetch it from the FontCache.
The latter has additional data for CSS font cascade semantics and other higher level features.

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

5 years agoGraphicsContext::drawBidiText()'s BidiResolver should not have isolated runs
mmaxfield@apple.com [Wed, 16 Sep 2015 00:05:58 +0000 (00:05 +0000)]
GraphicsContext::drawBidiText()'s BidiResolver should not have isolated runs
https://bugs.webkit.org/show_bug.cgi?id=149193

Reviewed by Anders Carlsson.

There are two users of BidiResolver, one which needs isolated runs (in RenderBlockLineLayout) and
one which doesn't (in GraphicsContext::drawBidiText()). Because of [1], the isolated runs vector
is migrating to a new type outside of platform/. Therefore, only the first user of BidiResolver
should have this member variable.

This is achieved by creating two subclasses of BidiResolver, and using the Curiously Repeating
Template pattern to downcast into specializations.

[1] https://bugs.webkit.org/show_bug.cgi?id=149153

No new tests because there is no behavior change.

* platform/text/BidiResolver.h:
(WebCore::BidiResolverBase::BidiResolverBase):
(WebCore::BidiResolverBase::increment):
(WebCore::BidiResolverBase::appendRun):
(WebCore::BidiResolverBase::incrementInternal):
(WebCore::IsolateRun>::~BidiResolverWithIsolate):
(WebCore::Subclass>::appendRunInternal):
(WebCore::Subclass>::embed):
(WebCore::Subclass>::checkDirectionInLowerRaiseEmbeddingLevel):
(WebCore::Subclass>::lowerExplicitEmbeddingLevel):
(WebCore::Subclass>::raiseExplicitEmbeddingLevel):
(WebCore::Subclass>::commitExplicitEmbedding):
(WebCore::Subclass>::updateStatusLastFromCurrentDirection):
(WebCore::Subclass>::reorderRunsFromLevels):
(WebCore::Subclass>::createBidiRunsForLine):
(WebCore::Subclass>::setMidpointForIsolatedRun):
(WebCore::Subclass>::midpointForIsolatedRun):
(WebCore::BidiResolver::BidiResolver): Deleted.
(WebCore::BidiResolver::increment): Deleted.
(WebCore::BidiResolver::isolatedRuns): Deleted.
(WebCore::Run>::~BidiResolver): Deleted.
(WebCore::Run>::appendRun): Deleted.
(WebCore::Run>::embed): Deleted.
(WebCore::Run>::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
(WebCore::Run>::lowerExplicitEmbeddingLevel): Deleted.
(WebCore::Run>::raiseExplicitEmbeddingLevel): Deleted.
(WebCore::Run>::commitExplicitEmbedding): Deleted.
(WebCore::Run>::updateStatusLastFromCurrentDirection): Deleted.
(WebCore::Run>::reorderRunsFromLevels): Deleted.
(WebCore::Run>::createBidiRunsForLine): Deleted.
(WebCore::Run>::setMidpointForIsolatedRun): Deleted.
(WebCore::Run>::midpointForIsolatedRun): Deleted.
* rendering/InlineIterator.h:
(WebCore::InlineBidiResolver::incrementInternal):
(WebCore::InlineBidiResolver::appendRunInternal):
(WebCore::InlineBidiResolver::increment): Deleted.
(WebCore::InlineBidiResolver::appendRun): Deleted.
* rendering/line/TrailingObjects.h:

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

5 years agoWeb Inspector: command-click in NewTabContentView should open new tab without switchi...
bburg@apple.com [Tue, 15 Sep 2015 23:44:30 +0000 (23:44 +0000)]
Web Inspector: command-click in NewTabContentView should open new tab without switching to it
https://bugs.webkit.org/show_bug.cgi?id=149173

Reviewed by Joseph Pecoraro.

To allow a user to quickly restore tabs, it should be possible to command-click
all the tabs that are desired without going back through the [+] tab button.

* UserInterface/Base/Main.js:
(WebInspector.createNewTabWithType): Renamed.

    Use an options object and split creating the tab from deleting the
    replaced tab and showing the new tab. Add better error checking.

(WebInspector.createNewTab): Deleted.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView):
(WebInspector.NewTabContentView.prototype._createNewTabWithType): Renamed.

    If the meta key is pressed, don't switch to the new tab or remove this view
    unless there are no more tabs that can be created beyond the current one.

(WebInspector.NewTabContentView.prototype._allowableTabTypes): Added.
(WebInspector.NewTabContentView.prototype._createNewTab): Deleted.

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

5 years agonew Event() without parameter should throw
cdumez@apple.com [Tue, 15 Sep 2015 22:10:54 +0000 (22:10 +0000)]
new Event() without parameter should throw
https://bugs.webkit.org/show_bug.cgi?id=149146
<rdar://problem/22565070>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that a new check is passing.

* web-platform-tests/dom/events/Event-constructors-expected.txt:

Source/WebCore:

new Event() without parameter should throw because the type parameter
is mandatory as per the specification:
https://dom.spec.whatwg.org/#interface-event

Both Firefox and Chrome throw in this case. However, WebKit was
creating an event whose type is the string "undefined". This patch
aligns our behavior with the specification and other major browsers.

No new tests, already covered by existing test.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):

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

5 years ago[GTK] Build failure with ACCELERATED_2D_CANVAS when cairo-gl has built with OpenGLESv...
clopez@igalia.com [Tue, 15 Sep 2015 21:50:18 +0000 (21:50 +0000)]
[GTK] Build failure with ACCELERATED_2D_CANVAS when cairo-gl has built with OpenGLESv2 support only.
https://bugs.webkit.org/show_bug.cgi?id=149172

Reviewed by Martin Robinson.

No new tests, no behavior change.

* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::cairoDevice):

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

5 years agoElement.getAttributeNS() should return null if the attribute does not exist
cdumez@apple.com [Tue, 15 Sep 2015 21:39:02 +0000 (21:39 +0000)]
Element.getAttributeNS() should return null if the attribute does not exist
https://bugs.webkit.org/show_bug.cgi?id=149180
<rdar://problem/22561011>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C DOM tests now that more checks are passing.

* web-platform-tests/dom/nodes/attributes-expected.txt:
* web-platform-tests/dom/nodes/case-expected.txt:

Source/WebCore:

Element.getAttributeNS() should return null if the attribute does not
exist, similarly to what Element.getAttribute() does:
- https://dom.spec.whatwg.org/#element (both return a nullable DOMString).
- https://dom.spec.whatwg.org/#dom-element-getattributens (step 2)

Firefox and Chrome match the specification. However, WebKit was returning
an empty string for getAttributeNS() and null for getAttribute(). This
patch aligns WebKit's behavior with the specification and other browsers.

No new tests, already covered by existing tests.

* dom/Element.idl:

LayoutTests:

Rebaseline / update existing tests now that our behavior has changed.

* fast/dom/Element/attribute-uppercase-expected.txt:
* fast/dom/Element/mozilla-dom-base-tests/test_bug1075702-expected.txt:
* fast/dom/Element/mozilla-dom-base-tests/test_bug1075702.html:
* fast/dom/Element/setAttributeNode-overriding-lowercase-values-1-expected.txt:
* fast/dom/Element/setAttributeNode-overriding-lowercase-values-2-expected.txt:

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

5 years agoContentDistribution should be only used for details elements
rniwa@webkit.org [Tue, 15 Sep 2015 21:31:31 +0000 (21:31 +0000)]
ContentDistribution should be only used for details elements
https://bugs.webkit.org/show_bug.cgi?id=149148

Reviewed by Antti Koivisto.

Extracted ShadowRootWithInsertionPoints out of ShadowRoot for HTMLDetailsElement and HTMLSummaryElement.

We don't add a separate .h and .cpp files since this is a temporary measure until we replace it with
a slot-based shadow DOM implementation.

No new tests. There should be no observable behavioral change.

* dom/Element.cpp:
(WebCore::Element::addShadowRoot): Removed the call to didShadowBoundaryChange since this function is only
called in ensureUserAgentShadowRoot. Also moved the call to didAddUserAgentShadowRoot for
HTMLDetailsElement's shadow root which uses this function instead of ensureUserAgentShadowRoot.
(WebCore::Element::removeShadowRoot): Removed the call to invalidateDistribution since it's only called by
~Element.
(WebCore::Element::createShadowRoot):
(WebCore::Element::ensureUserAgentShadowRoot): Moved the call didAddUserAgentShadowRoot into addShadowRoot
since HTMLDetailsElement uses a subclass of ShadowRoot.
(WebCore::Element::childrenChanged):
(WebCore::Element::removeAllEventListeners):

* dom/Element.h:
(Element::addShadowRoot): Made this function a protected member as it's now used by HTMLDetailsElement.

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::childrenChanged): Deleted.

* dom/ShadowRoot.h:
(WebCore::ShadowRoot::distributor): Made this a virtual function and return nullptr by default.
(WebCore::ShadowRoot::isOrphan):

* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::create): Uses ShadowRootWithInsertionPoints instead of ShadowRoot.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::runPostTypeUpdateTasks): Removed the call to invalidateDistribution since it's
only relevant for HTMLDetailsElement's shadow DOM.

* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::create): Uses ShadowRootWithInsertionPoints instead of ShadowRoot.

* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::ensureDistribution):
(WebCore::ContentDistributor::invalidateDistribution):

* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::childrenChanged):
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
(WebCore::findInsertionPointOf):
(WebCore::ShadowRootWithInsertionPoints::childrenChanged): Moved from ShadowRoot.

* html/shadow/InsertionPoint.h:
(WebCore::ShadowRootWithInsertionPoints::create): Added.
(WebCore::ShadowRootWithInsertionPoints::ShadowRootWithInsertionPoints): Added.

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

5 years agoUnreviewed, rebaseline several W3C HTML tests on iOS after r189762.
cdumez@apple.com [Tue, 15 Sep 2015 20:42:22 +0000 (20:42 +0000)]
Unreviewed, rebaseline several W3C HTML tests on iOS after r189762.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:
* platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt:

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

5 years agoImplement calls to JavaScript functions in WebAssembly
commit-queue@webkit.org [Tue, 15 Sep 2015 20:00:23 +0000 (20:00 +0000)]
Implement calls to JavaScript functions in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149093

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-15
Reviewed by Filip Pizlo.

This patch implements calls to JavaScript functions in WebAssembly.
WebAssembly functions can only call JavaScript functions that are
imported to their module via an object that is passed into
loadWebAssembly(). References to JavaScript functions are resolved at
the module's load time, just like asm.js.

* jsc.cpp:
(GlobalObject::finishCreation):
(functionLoadWebAssembly):
* tests/stress/wasm-calls.js:
* tests/stress/wasm/calls.wasm:
* wasm/JSWASMModule.cpp:
(JSC::JSWASMModule::visitChildren):
* wasm/JSWASMModule.h:
(JSC::JSWASMModule::importedFunctions):
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildCallImport):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseExpressionF64):
(JSC::WASMFunctionParser::parseCallImport):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildCallInternal):
(JSC::WASMFunctionSyntaxChecker::buildCallImport):
(JSC::WASMFunctionSyntaxChecker::updateTempStackHeightForCall):
* wasm/WASMModuleParser.cpp:
(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parse):
(JSC::WASMModuleParser::parseModule):
(JSC::WASMModuleParser::parseFunctionImportSection):
(JSC::WASMModuleParser::getImportedValue):
(JSC::parseWebAssembly):
* wasm/WASMModuleParser.h:

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

5 years ago[Win] Tiled drawing is rendering more times than it should
bfulgham@apple.com [Tue, 15 Sep 2015 19:56:34 +0000 (19:56 +0000)]
[Win] Tiled drawing is rendering more times than it should
https://bugs.webkit.org/show_bug.cgi?id=149144
<rdar://problem/22313905>

Reviewed by Simon Fraser.

Provide a more faithful implemenation of the Objective C tiled drawing logic.
(1) Create a new WebTiledBackingLayerWin class that represents a the
    container of tiles. This matches the Objective C design.
(2) Move implementation of several methods (e.g., isOpaque) to the internal
    class implementation so that the Tile Drawing logic can perform special
    handling in these cases.
(3) Remove the duplicated Tiled Drawing logic from PlatformCALayerWinInternal,
    since it was just duplicating code in TileController and TileGrid.
(4) Clean up the display callback code to avoid performing incorrect flipping
    of the coordinate system.

* PlatformAppleWin.cmake: Add new WebTiledBackingLayerWin file.
* WebCore.vcxproj/WebCore.vcxproj: Add the new WebTiledBackingLayerWin files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* platform/graphics/ca/PlatformCALayer.cpp:
(PlatformCALayer::flipContext): Added convenience method.
(PlatformCALayer::drawRepaintIndicator): Ditto.
* platform/graphics/ca/TileGrid.cpp:
(TileGrid::platformCALayerPaintContents): Flip the context before drawing the repaint
indicator on Windows.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::PlatformCALayerWin): Create a WebTiledBackingLayerWin
object if using tiled drawing.
(PlatformCALayerWin::~PlatformCALayerWin):
(PlatformCALayerWin::isOpaque): Move implementation to internal class.
(PlatformCALayerWin::setOpaque): Ditto.
(PlatformCALayerWin::setBorderWidth): Ditto.
(PlatformCALayerWin::setBorderColor): Ditto.
(PlatformCALayerWin::contentsScale): Ditto.
(PlatformCALayerWin::setContentsScale): Ditto.
(PlatformCALayerWin::cornerRadius): Ditto.
(PlatformCALayerWin::tiledBacking): Ditto.
(PlatformCALayerWin::drawTextAtPoint): New helper method to draw repaint counter
text. Needed to work around bug in CG.
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::PlatformCALayerWinInternal): Remove tiling-logic
related member variables.
(PlatformCALayerWinInternal::~PlatformCALayerWinInternal):
(shouldInvertBeforeDrawingContent): Added convenience method.
(shouldInvertBeforeDrawingRepaintCounters): Ditto.
(PlatformCALayerWinInternal::displayCallback):
(PlatformCALayerWinInternal::drawRepaintCounters): Helper method to
share code between the two layer classes.
(PlatformCALayerWinInternal::internalSetNeedsDisplay): use nullptr.
(PlatformCALayerWinInternal::setNeedsDisplay): Ditto.
(PlatformCALayerWinInternal::setNeedsDisplayInRect): Move tiled code
to WebTiledBackingLayerWin and simplify the remaing code.
(PlatformCALayerWinInternal::setSublayers): Remove tile code.
(PlatformCALayerWinInternal::getSublayers): Ditto.
(PlatformCALayerWinInternal::removeAllSublayers): Ditto.
(PlatformCALayerWinInternal::insertSublayer): Ditto.
(PlatformCALayerWinInternal::sublayerCount): Ditto.
(PlatformCALayerWinInternal::indexOfSublayer): Ditto.
(PlatformCALayerWinInternal::sublayerAtIndex): Ditto.
(PlatformCALayerWinInternal::setBounds): Ditto.
(PlatformCALayerWinInternal::setFrame): Ditto.
(PlatformCALayerWinInternal::isOpaque): Ditto.
(PlatformCALayerWinInternal::setOpaque): Ditto.
(PlatformCALayerWinInternal::contentsScale): Ditto.
(PlatformCALayerWinInternal::setContentsScale): Ditto.
(PlatformCALayerWinInternal::setBorderWidth): Ditto.
(PlatformCALayerWinInternal::setBorderColor): Ditto.
(layerTypeIsTiled): Deleted.
(PlatformCALayerWinInternal::constrainedSize): Deleted.
(PlatformCALayerWinInternal::tileDisplayCallback): Deleted.
(PlatformCALayerWinInternal::addTile): Deleted.
(PlatformCALayerWinInternal::removeTile): Deleted.
(PlatformCALayerWinInternal::tileAtIndex): Deleted.
(PlatformCALayerWinInternal::tileCount): Deleted.
(PlatformCALayerWinInternal::updateTiles): Deleted.
(PlatformCALayerWinInternal::drawTile): Deleted.
(PlatformCALayerWinInternal::createTileController): Deleted.
(PlatformCALayerWinInternal::tiledBacking): Deleted.
* platform/graphics/ca/win/PlatformCALayerWinInternal.h:
(WebCore::PlatformCALayerWinInternal::owner):
* platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: Added.
(WebTiledBackingLayerWin::WebTiledBackingLayerWin):
(WebTiledBackingLayerWin::~WebTiledBackingLayerWin):
(DisplayOnMainThreadContext::DisplayOnMainThreadContext):
(redispatchOnMainQueue):
(WebTiledBackingLayerWin::displayCallback):
(WebTiledBackingLayerWin::setNeedsDisplay):
(WebTiledBackingLayerWin::setNeedsDisplayInRect):
(WebTiledBackingLayerWin::setBounds):
(WebTiledBackingLayerWin::isOpaque):
(WebTiledBackingLayerWin::setOpaque):
(WebTiledBackingLayerWin::contentsScale):
(WebTiledBackingLayerWin::setContentsScale):
(WebTiledBackingLayerWin::setBorderWidth):
(WebTiledBackingLayerWin::setBorderColor):
(WebTiledBackingLayerWin::createTileController):
(WebTiledBackingLayerWin::tiledBacking):
(WebTiledBackingLayerWin::invalidate):
* platform/graphics/ca/win/WebTiledBackingLayerWin.h: Added.

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

5 years agoFix the !ENABLE(DFG_JIT) build after r188696
ossy@webkit.org [Tue, 15 Sep 2015 19:47:34 +0000 (19:47 +0000)]
Fix the !ENABLE(DFG_JIT) build after r188696
https://bugs.webkit.org/show_bug.cgi?id=149158

Reviewed by Yusuke Suzuki.

* bytecode/GetByIdStatus.cpp:
* bytecode/GetByIdStatus.h:

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

5 years agofunctions that use try/catch will allocate a top level JSLexicalEnvironment even...
commit-queue@webkit.org [Tue, 15 Sep 2015 19:26:45 +0000 (19:26 +0000)]
functions that use try/catch will allocate a top level JSLexicalEnvironment even when it is not necessary
https://bugs.webkit.org/show_bug.cgi?id=148169

Patch by Saam barati <sbarati@apple.com> on 2015-09-15
Reviewed by Geoffrey Garen.

We used to do this before we had proper lexical scoping
in the bytecode generator. There is absolutely no reason
why need to allocate a top-level "var" activation when a
function/program uses a "catch" block.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createTryStatement):
(JSC::ASTBuilder::incConstants):
(JSC::ASTBuilder::usesThis):
(JSC::ASTBuilder::usesArguments):
(JSC::ASTBuilder::usesWith):
(JSC::ASTBuilder::usesEval):
(JSC::ASTBuilder::usesCatch): Deleted.
* parser/Nodes.h:
(JSC::ScopeNode::isStrictMode):
(JSC::ScopeNode::setUsesArguments):
(JSC::ScopeNode::usesThis):
(JSC::ScopeNode::needsActivation):
(JSC::ScopeNode::hasCapturedVariables):
(JSC::ScopeNode::captures):
(JSC::ScopeNode::needsActivationForMoreThanVariables): Deleted.
* parser/ParserModes.h:
* runtime/Executable.h:
(JSC::ScriptExecutable::usesEval):
(JSC::ScriptExecutable::usesArguments):
(JSC::ScriptExecutable::needsActivation):
(JSC::ScriptExecutable::isStrictMode):
(JSC::ScriptExecutable::ecmaMode):

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

5 years agoREGRESSION(r189774): CLoop doesn't build after r189774
msaboff@apple.com [Tue, 15 Sep 2015 19:00:13 +0000 (19:00 +0000)]
REGRESSION(r189774): CLoop doesn't build after r189774
https://bugs.webkit.org/show_bug.cgi?id=149171

Unreviewed build fix for the C Loop.

Added needed C Loop label opcodes.

* bytecode/BytecodeList.json:

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

5 years ago[New Block-Inside-Inline Model] Implement margin collapsing across contiguous anonymo...
hyatt@apple.com [Tue, 15 Sep 2015 18:38:18 +0000 (18:38 +0000)]
[New Block-Inside-Inline Model] Implement margin collapsing across contiguous anonymous inline blocks.
https://bugs.webkit.org/show_bug.cgi?id=149132

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new tests inside fast/block/inside-inlines/

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::anonymousInlineBlock):
Change this accessor to be more robust and be willing to both recur (in case we ever do decide intermediate line boxes should exist)
and to type check. This is not currently needed, but I'm just being paranoid and future proof.

(WebCore::InlineFlowBox::addToLine):
Again, for thoroughness, I am making sure to propagate the hasAnonymousInlineBlock() bit through to parents. This is only needed
if we build intermediate line boxes for lines with anonymous inline blocks.

(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
Anonymous inline blocks receive a layout via layoutBlockChild, in order to make sure that margin collapsing runs. This means
that unlike other line objects, the position of the child has been determined already. Therefore we simply set the position
of the line box that wraps the anonymous inline block to the already-computed position for that block.

Also patch the code that sets lineTop and lineBottom using the root box's dimensions. We don't really care about the root line
box on anonymous inline block lines and just want to set lineTop and lineBottom to fit the anonymous inline block.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):
Refactor collapseMargins to call a helper function that can pass in a previous "sibling", and that can handle the child
being null. We do this to perform a margin collapse when anonymous inline blocks run up against regular lines (which is like
collapsing with a sibling block "child").

* rendering/RenderBlockFlow.h:
Tweak the MarginInfo constructor to take a const RenderBlockFlow. Tweak some line layout methods to pass in the LineLayoutState
so that MarginInfo is available during line layout.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxes):
When we create a new line box, if it is not an anonymous inline block line and our previous line was, simulate a margin
collapse in order to possibly push the line box down or up. Re-use the pagination adjustment code to rewind line layout
and perform it again if pushed below a float.

(WebCore::constructBidiRunsForSegment):
(WebCore::RenderBlockFlow::layoutRunsAndFloats):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::layoutLineBoxes):
(WebCore::RenderBlockFlow::determineStartPosition):
(WebCore::RenderBlockFlow::matchedEndLine):
(WebCore::RenderBlockFlow::updateRegionForLine):
(WebCore::RenderBlockFlow::marginCollapseLinesFromStart):
Patch line layout to run margin collapsing when anonymous inline blocks are encountered. This involves making sure
margin info and float bottom positions are passed through so that layoutBlockChild can be properly called on
anonymous inline blocks that we encounter.

In addition line layout when it syncs dirty lines has to run margin collapsing on earlier lines in order to make
sure margin info is properly set up at the first dirty line position.

Note that there will be more improvements/changes in this area (dirty line syncing), as the current model is inefficient
when many anonymous inline blocks are scattered throughout a large-scale line box tree.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::ascentAndDescentForBox):
Make sure to rely on the block layout code for the placement of the boxes themselves. Set up the line box code to not have
an effect on ascent/descent.

* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::handleReplaced):
When we encounter an anonymous inline block, lay it out when it is seen. We have to delay the layout, since we have
to be able to perform it mid-line-layout when the containing block's logical height is at the correct value and all previous
lines are placed. Margin info also has to be current.

* rendering/line/LineBreaker.cpp:
* rendering/line/LineBreaker.h:
Patched to pass LineLayoutState through so that the stuff we need to perform block layout is available (margin info and float vars).

* rendering/line/LineLayoutState.h:
Add the block layout margin and float bottom information to the line layout state so that we have it available when performing
layouts and margin collapses on anonymous inline block children.

LayoutTests:

* fast/block/inside-inlines/new-model/margin-collapse: Added.
* fast/block/inside-inlines/new-model/margin-collapse/001-expected.html: Added.
* fast/block/inside-inlines/new-model/margin-collapse/001.html: Added.
* fast/block/inside-inlines/new-model/margin-collapse/002-expected.html: Added.
* fast/block/inside-inlines/new-model/margin-collapse/002.html: Added.
* fast/block/inside-inlines/new-model/margin-collapse/003-expected.html: Added.
* fast/block/inside-inlines/new-model/margin-collapse/003.html: Added.
* fast/block/inside-inlines/new-model/margin-collapse/004-expected.html: Added.
* fast/block/inside-inlines/new-model/margin-collapse/004.html: Added.

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

5 years agoWeb Inspector: Watch Expressions uncaught exceptions on page reload
commit-queue@webkit.org [Tue, 15 Sep 2015 18:36:04 +0000 (18:36 +0000)]
Web Inspector: Watch Expressions uncaught exceptions on page reload
https://bugs.webkit.org/show_bug.cgi?id=149150

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-15
Reviewed by Brian Burg.

Instead of waiting 50ms to Resume, when the page navigates
Resume immediately. This ensures nobody is using a stale
activeCallFrame after the navigation.

Also clean up the manager a bit by removing some deletes.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.restoreBreakpointsSoon):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.debuggerDidResume):
(WebInspector.DebuggerManager.prototype._mainResourceDidChange):
(WebInspector.DebuggerManager.prototype._didResumeInternal):
(WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
(WebInspector.DebuggerManager.prototype.debuggerDidResume.delayedWork): Deleted.

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

5 years agoWeb Inspector: Closing the final inspector tab should be allowed
commit-queue@webkit.org [Tue, 15 Sep 2015 18:26:27 +0000 (18:26 +0000)]
Web Inspector: Closing the final inspector tab should be allowed
https://bugs.webkit.org/show_bug.cgi?id=149130

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-15
Reviewed by Brian Burg.

Previously we did not allow closing the last inspector tab. Now, we
will allow closing all inspector tabs, and when the last is closed,
present an unclosable New Tab tab, which would then be used to create
a new tab.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
If we have no tabs to restore, show the New Tab tab.

(WebInspector._openDefaultTab):
When the last tab is closed, the tab bar requests we open a default tab.
Open the New Tab tab.

(WebInspector.TabBar.prototype._handleClick):
Disallow closing the single default tab.

(WebInspector._newTabItemClicked):
(WebInspector.showNewTabTab):
Share logic for showing the New Tab tab.

* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView):
Mark the new tab's tab bar item as the "default" tab bar item. It gets
special behavior when it is the single normal tab (cannot be closed).

* UserInterface/Views/TabBar.css:
(body:not(.window-inactive) .tab-bar > .item:hover > .close):
(body:not(.window-inactive) .tab-bar.single-tab > .item.default-tab:hover > .close):
(.tab-bar.single-tab > .item.default-tab > .close):
(body:not(.window-inactive) .tab-bar:not(.single-tab) > .item:not(.hide-close-button):hover > .close): Deleted.
(.tab-bar > .item.hide-close-button > .close): Deleted.
Update styles to only disable the close button on the
"default-tab" when it is the "single-tab" open. Otherwise
always allow closing tabs.

* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype.removeTabBarItem):
(WebInspector.TabBar.prototype.hasNormalTab):
(WebInspector.TabBar.prototype._openDefaultTab):
When removing the last normal tab, send an event to open
the default tab.

* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem.prototype.get default):
(WebInspector.TabBarItem.prototype.get isDefaultTab):
(WebInspector.TabBarItem.prototype.set isDefaultTab):
(WebInspector.TabBarItem.prototype.get hideCloseButton): Deleted.
(WebInspector.TabBarItem.prototype.set hideCloseButton): Deleted.
Switch to marking a tab bar item as the default tab. This tab
will be allowed when it is the single remaining tab. Currently
the default tab is always the "New Tab" tab.

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

5 years agoWeb Inspector: new tab content view should disallow split console
bburg@apple.com [Tue, 15 Sep 2015 18:18:03 +0000 (18:18 +0000)]
Web Inspector: new tab content view should disallow split console
https://bugs.webkit.org/show_bug.cgi?id=149164

Reviewed by Joseph Pecoraro.

* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype.get supportsSplitContentBrowser):

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

5 years agoMake the IDBAny::Type enum into an enum class.
beidson@apple.com [Tue, 15 Sep 2015 18:09:29 +0000 (18:09 +0000)]
Make the IDBAny::Type enum into an enum class.
https://bugs.webkit.org/show_bug.cgi?id=149169.

Reviewed by Oliver Hunt.

No new tests (Cleanup, no behavior change).

* Modules/indexeddb/IDBAny.h:
* Modules/indexeddb/legacy/LegacyAny.cpp:
(WebCore::LegacyAny::createInvalid):
(WebCore::LegacyAny::createNull):
(WebCore::LegacyAny::LegacyAny):
(WebCore::LegacyAny::domStringList):
(WebCore::LegacyAny::idbCursor):
(WebCore::LegacyAny::idbCursorWithValue):
(WebCore::LegacyAny::idbDatabase):
(WebCore::LegacyAny::idbFactory):
(WebCore::LegacyAny::idbIndex):
(WebCore::LegacyAny::idbObjectStore):
(WebCore::LegacyAny::idbTransaction):
(WebCore::LegacyAny::scriptValue):
(WebCore::LegacyAny::string):
(WebCore::LegacyAny::integer):
(WebCore::LegacyAny::legacyCursor):
(WebCore::LegacyAny::legacyCursorWithValue):
(WebCore::LegacyAny::legacyDatabase):
(WebCore::LegacyAny::legacyFactory):
(WebCore::LegacyAny::legacyIndex):
(WebCore::LegacyAny::legacyObjectStore):
(WebCore::LegacyAny::legacyTransaction):
* Modules/indexeddb/legacy/LegacyCursor.cpp:
(WebCore::LegacyCursor::LegacyCursor):
(WebCore::LegacyCursor::effectiveObjectStore):
* Modules/indexeddb/legacy/LegacyObjectStore.cpp:
* Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
(WebCore::LegacyOpenDBRequest::dispatchEvent):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::getResultCursor):
(WebCore::effectiveObjectStore):
* bindings/js/JSIDBAnyCustom.cpp:
(WebCore::toJS):
* inspector/InspectorIndexedDBAgent.cpp:
* page/DatabaseProvider.h:

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

5 years ago[GTK] Remove outdated README under po directory
mcatanzaro@igalia.com [Tue, 15 Sep 2015 17:48:58 +0000 (17:48 +0000)]
[GTK] Remove outdated README under po directory
https://bugs.webkit.org/show_bug.cgi?id=149166

Reviewed by Martin Robinson.

* README: Removed.

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

5 years ago[INTL] Implement supportedLocalesOf on Intl Constructors
commit-queue@webkit.org [Tue, 15 Sep 2015 17:43:27 +0000 (17:43 +0000)]
[INTL] Implement supportedLocalesOf on Intl Constructors
https://bugs.webkit.org/show_bug.cgi?id=147599

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-09-15
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Implements all of the abstract operations used by supportedLocalesOf,
except during canonicalization it does not replace redundant tags,
or subtags with their preferred values.

* icu/unicode/ucal.h: Added.
* icu/unicode/udat.h: Added.
* icu/unicode/umisc.h: Added.
* icu/unicode/unum.h: Added.
* icu/unicode/utypes.h: Clear the U_SHOW_CPLUSPLUS_API flag to prevent C++ headers from being included.
* runtime/CommonIdentifiers.h: Adde localeMatcher.
* runtime/IntlCollatorConstructor.cpp:
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf): Implemented.
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf): Implemented.
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf): Implemented.
* runtime/IntlObject.cpp:
(JSC::canonicalizeLanguageTag):
(JSC::getCanonicalLangTag):
(JSC::getPrivateUseLangTag):
(JSC::getGrandfatheredLangTag):
(JSC::canonicalizeLocaleList):
(JSC::bestAvailableLocale):
(JSC::lookupSupportedLocales):
(JSC::bestFitSupportedLocales):
(JSC::supportedLocales):
(JSC::getIntlStringOption):
(JSC::getIntlBooleanOption):
* runtime/IntlObject.h:
* runtime/JSCJSValue.h: Added toLength.
* runtime/JSCJSValue.cpp: Added toLength.
(JSC::JSValue::toLength): Implement ToLength from ECMA 262 6.0 7.1.15
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::intlCollatorAvailableLocales): Added lazy locale list.
(JSC::JSGlobalObject::intlDateTimeFormatAvailableLocales): Added lazy locale list.
(JSC::JSGlobalObject::intlNumberFormatAvailableLocales): Added lazy locale list.
* runtime/JSGlobalObject.h:

LayoutTests:

* js/intl-collator-expected.txt: Added tests for supportedLocalesOf
* js/intl-datetimeformat-expected.txt: Added tests for supportedLocalesOf
* js/intl-numberformat-expected.txt: Added tests for supportedLocalesOf
* js/script-tests/intl-collator.js: Added tests for supportedLocalesOf
* js/script-tests/intl-datetimeformat.js: Added tests for supportedLocalesOf
* js/script-tests/intl-numberformat.js: Added tests for supportedLocalesOf

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

5 years agoMove most IDB object encoding/decoding from WebKit2 to WebCore.
beidson@apple.com [Tue, 15 Sep 2015 16:36:19 +0000 (16:36 +0000)]
Move most IDB object encoding/decoding from WebKit2 to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=149152

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Cleanup, no behavior change).

* Modules/indexeddb/IDBDatabaseMetadata.h:
(WebCore::IDBDatabaseMetadata::encode):
(WebCore::IDBDatabaseMetadata::decode):
* Modules/indexeddb/IDBIndexMetadata.h:
(WebCore::IDBIndexMetadata::encode):
(WebCore::IDBIndexMetadata::decode):
* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
* Modules/indexeddb/IDBKeyPath.h:
(WebCore::IDBKeyPath::encode):
(WebCore::IDBKeyPath::decode):
* Modules/indexeddb/IDBKeyRangeData.h:
(WebCore::IDBKeyRangeData::encode):
(WebCore::IDBKeyRangeData::decode):
* Modules/indexeddb/IDBObjectStoreMetadata.h:
(WebCore::IDBObjectStoreMetadata::encode):
(WebCore::IDBObjectStoreMetadata::decode):

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBDatabaseMetadata>::encode): Deleted.
(IPC::ArgumentCoder<IDBDatabaseMetadata>::decode): Deleted.
(IPC::ArgumentCoder<IDBIndexMetadata>::encode): Deleted.
(IPC::ArgumentCoder<IDBIndexMetadata>::decode): Deleted.
(IPC::ArgumentCoder<IDBKeyData>::encode): Deleted.
(IPC::ArgumentCoder<IDBKeyData>::decode): Deleted.
(IPC::ArgumentCoder<IDBKeyPath>::encode): Deleted.
(IPC::ArgumentCoder<IDBKeyPath>::decode): Deleted.
(IPC::ArgumentCoder<IDBKeyRangeData>::encode): Deleted.
(IPC::ArgumentCoder<IDBKeyRangeData>::decode): Deleted.
(IPC::ArgumentCoder<IDBObjectStoreMetadata>::encode): Deleted.
(IPC::ArgumentCoder<IDBObjectStoreMetadata>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:

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

5 years agoMake the enum IDBKey::Type into a utility enum class.
beidson@apple.com [Tue, 15 Sep 2015 15:51:02 +0000 (15:51 +0000)]
Make the enum IDBKey::Type into a utility enum class.
https://bugs.webkit.org/show_bug.cgi?id=149149

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Cleanup, no behavior change).

* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::isValid):
(WebCore::IDBKey::compare):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::createNumber):
(WebCore::IDBKey::createDate):
(WebCore::IDBKey::createMultiEntryArray):
(WebCore::IDBKey::createArray):
(WebCore::IDBKey::type):
(WebCore::IDBKey::array):
(WebCore::IDBKey::string):
(WebCore::IDBKey::date):
(WebCore::IDBKey::number):
(WebCore::IDBKey::compareTypes):
(WebCore::IDBKey::IDBKey):
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare):
(WebCore::IDBKeyData::loggingString):
(WebCore::IDBKeyData::setArrayValue):
(WebCore::IDBKeyData::setStringValue):
(WebCore::IDBKeyData::setDateValue):
(WebCore::IDBKeyData::setNumberValue):
* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::minimum):
(WebCore::IDBKeyData::maximum):
* Modules/indexeddb/IndexedDB.h:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyToJSValue):
(WebCore::createIDBKeyFromValue):
(WebCore::createIDBKeyFromScriptValueAndKeyPath):
(WebCore::generateIndexKeysForValue):
* inspector/InspectorIndexedDBAgent.cpp:

Source/WebKit2:

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBKeyData>::encode):
(IPC::ArgumentCoder<IDBKeyData>::decode):

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

5 years agoUnreviewed gardening.
achristensen@apple.com [Tue, 15 Sep 2015 15:33:09 +0000 (15:33 +0000)]
Unreviewed gardening.

* platform/win/TestExpectations:
Fix Windows tests after r189769.

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

5 years ago[cmake] Enable debug fission only if it is supported
ossy@webkit.org [Tue, 15 Sep 2015 15:01:09 +0000 (15:01 +0000)]
[cmake] Enable debug fission only if it is supported
https://bugs.webkit.org/show_bug.cgi?id=149161

Reviewed by Martin Robinson.

* Source/cmake/OptionsCommon.cmake:

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