WebKit-https.git
6 years agoUnreviewed, fix build after r188860
wenson_hsieh@apple.com [Mon, 24 Aug 2015 17:13:06 +0000 (17:13 +0000)]
Unreviewed, fix build after r188860

* page/mac/WheelEventDeltaFilterMac.mm:
(WebCore::WheelEventDeltaFilterMac::updateFromDelta): Convert argument explicitly to an NSPoint.

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

6 years agoUnreviewed, slight layout test clean up after r188829.
cdumez@apple.com [Mon, 24 Aug 2015 17:02:25 +0000 (17:02 +0000)]
Unreviewed, slight layout test clean up after r188829.

Remove a useless blank line.

* fast/dom/named-items-with-symbol-name-expected.txt:
* fast/dom/named-items-with-symbol-name.html:

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

6 years agoREGRESSION (r188581): Web Inspector: Console user command isn't visible when it's...
nvasilyev@apple.com [Mon, 24 Aug 2015 15:57:09 +0000 (15:57 +0000)]
REGRESSION (r188581): Web Inspector: Console user command isn't visible when it's expected to be
https://bugs.webkit.org/show_bug.cgi?id=148283

One of the improvements of r188581 "Option-Enter should commit console command
without erasing the prompt" was not to show a console user command if it's the
same as the previous one.

However, there could be a lot of other messages between the last two user
commands - console.log, CSS warnings, etc. In that case we should show a console
user command again by resetting _lastCommitted.

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
Reset _lastCommitted for all messages except for user commands and use command results.

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

6 years agoWeb Inspector: Rendering Frames filter checkboxes all become checked during recording
mattbaker@apple.com [Mon, 24 Aug 2015 15:55:40 +0000 (15:55 +0000)]
Web Inspector: Rendering Frames filter checkboxes all become checked during recording
https://bugs.webkit.org/show_bug.cgi?id=148375

Reviewed by Timothy Hatcher.

* UserInterface/Views/ChartDetailsSectionRow.js:
(WebInspector.ChartDetailsSectionRow.prototype._createLegend):
Removed incorrect code that forced checked to true.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel._refreshFrameSelectionChart):
Persist legend item checkbox state when updating the chart.

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

6 years agoUse _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
wenson_hsieh@apple.com [Mon, 24 Aug 2015 15:23:21 +0000 (15:23 +0000)]
Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
https://bugs.webkit.org/show_bug.cgi?id=147320

Reviewed by Simon Fraser.

Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
Source/WebCore:

as a fallback. Here, we refactor EventHandler to use the new filters for overflow scrolling and replace
the MainFrame's WheelEventDeltaTracker with an appropriate type of WheelEventDeltaFilter.

In the case where an _NSScrollingPredominantAxisFilter is unavailable, the platform-invariant wheel
event delta filter simply uses the existing wheel event delta tracker to compute the current predominant
axis. It uses the predominant axis to determine which axis (if any) should have its delta zeroed out.

This patch also introduces NSScrollingInputFilterSPI.h, which either imports the internal input filter
header from AppKit or declares relevant interfaces and functions.

No new tests, since this change does not add new functionality.

* CMakeLists.txt: Add page/WheelEventDeltaFilter.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
* WebCore.xcodeproj/project.pbxproj: Add WheelEventDeltaFilter.cpp, WheelEventDeltaFilter.h, and their Mac counterparts.
* page/EventHandler.cpp:
(WebCore::didScrollInScrollableArea): Refactored to no longer handle axes separately.
(WebCore::handleWheelEventInAppropriateEnclosingBox): Ditto.
(WebCore::EventHandler::platformRecordWheelEvent): Refactored to update the wheel delta filter.
(WebCore::EventHandler::clearLatchedState): Ditto.
(WebCore::EventHandler::defaultWheelEventHandler): Refactored to use wheel delta filters. No longer splits wheel events
        and handles them on separate axes.
(WebCore::didScrollInScrollableAreaForSingleAxis): Deleted.
(WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Deleted.
* page/EventHandler.h:
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame): Initializes the appropriate type of WheelEventDeltaFilter.
* page/MainFrame.h:
* page/WheelEventDeltaFilter.cpp: Added.
(WebCore::WheelEventDeltaFilter::WheelEventDeltaFilter):
(WebCore::WheelEventDeltaFilter::~WheelEventDeltaFilter):
(WebCore::WheelEventDeltaFilter::create):
(WebCore::BasicWheelEventDeltaFilter::BasicWheelEventDeltaFilter):
(WebCore::BasicWheelEventDeltaFilter::updateFromDelta):
(WebCore::BasicWheelEventDeltaFilter::beginFilteringDeltas):
(WebCore::BasicWheelEventDeltaFilter::endFilteringDeltas):
(WebCore::deltaIsPredominantlyVertical):
(WebCore::BasicWheelEventDeltaFilter::dominantScrollGestureDirection):
* page/WheelEventDeltaFilter.h: Refactored WheelEventDeltaTracker logic to work as a filter instead.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents): Refactored to use wheel delta filters.
(WebCore::EventHandler::platformRecordWheelEvent): Ditto.
* page/mac/WheelEventDeltaFilterMac.h: Wraps the new _NSScrollingPredominantAxisFilter.
* page/mac/WheelEventDeltaFilterMac.mm: Added.
(WebCore::WheelEventDeltaFilterMac::WheelEventDeltaFilterMac):
(WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
(WebCore::WheelEventDeltaFilterMac::updateFromDelta):
(WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::copyWithDeltas): Used to create a copy of the platform wheel event with filtered deltas.
(WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta): Deleted. No longer necessary, since we won't be handling wheel
        events on separate axes.
(WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta): Ditto.
* platform/spi/mac/NSScrollingInputFilterSPI.h: Added.

Source/WebKit2:

as a fallback. Here, we refactor EventDispatcher to use the new filters for mainframe scrolling.

No new tests, since this change does not add new functionality.

* WebProcess/WebPage/EventDispatcher.cpp: Include WheelEventDeltaFilterMac.h when necessary.
(WebKit::EventDispatcher::EventDispatcher): Initialize a WheelEventDeltaFilterMac when possible. Otherwise,
    fall back to a BasicWheelEventDeltaFilter.
(WebKit::EventDispatcher::wheelEvent): Use filtered deltas to initialize the platform wheel event instead
    of zeroing out non-predominant axes.
* WebProcess/WebPage/EventDispatcher.h: Replace m_recentWheelEventDeltaTracker with m_recentWheelEventDeltaFilter.

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

6 years agoUnreviewed, fix typo in a comment ("unsused" -> "unused")
mcatanzaro@igalia.com [Mon, 24 Aug 2015 13:39:11 +0000 (13:39 +0000)]
Unreviewed, fix typo in a comment ("unsused" -> "unused")

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

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

6 years agoUnreviewed. Fix cairo performance regression introduced in r188379.
carlosgc@webkit.org [Mon, 24 Aug 2015 13:23:45 +0000 (13:23 +0000)]
Unreviewed. Fix cairo performance regression introduced in r188379.

A missing break in a switch was making us to use High image
interpolation quality by default.

* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext): Add the
missing break.

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

6 years agoUnreviewed. Fix GObject DOM bindings API break test after r188809.
carlosgc@webkit.org [Mon, 24 Aug 2015 11:33:05 +0000 (11:33 +0000)]
Unreviewed. Fix GObject DOM bindings API break test after r188809.

element.getElementsByTagName and element.getElementsByClassName
were also changed in r188809 to return an HTMLCollection. The
build didn't fail because we don't use those in our tests, but the
API breaks need to be fixed too.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_element_get_elements_by_tag_name):
(webkit_dom_element_get_elements_by_tag_name_ns):
(webkit_dom_element_get_elements_by_class_name):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName):

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

6 years agoUnreviewed. Fix GObject DOM bindings API break test after r188735.
carlosgc@webkit.org [Mon, 24 Aug 2015 11:15:41 +0000 (11:15 +0000)]
Unreviewed. Fix GObject DOM bindings API break test after r188735.

document.getElementsByClassName returns an HTMLCollection since
r188735. So, rename it as
webkit_dom_document_get_elements_by_class_name_as_html_collection,
and deprecate the old method returning a NodeList.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_document_get_elements_by_class_name): Use the
implementation returning a NodeList.
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
* bindings/gobject/webkitdom.symbols: Ditto.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName): Also check getElementsByClassName.

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

6 years agoUnreviewed. Fix GTK+ build after r188711.
carlosgc@webkit.org [Mon, 24 Aug 2015 10:23:38 +0000 (10:23 +0000)]
Unreviewed. Fix GTK+ build after r188711.

Since r188711 document.createNodeIterator and
document.createTreeWalker, don't raise exceptions anymore. Keep
the GError parameter even if it's ignored to not break the API
compatibility.

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

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

6 years agoUnreviewed. Fix GTK+ build after r188809.
carlosgc@webkit.org [Mon, 24 Aug 2015 10:19:39 +0000 (10:19 +0000)]
Unreviewed. Fix GTK+ build after r188809.

document.getElementsByTagName returns an HTMLCollection since
r188809. So, rename it as
webkit_dom_document_get_elements_by_tag_name_as_html_collection,
and deprecate the old methods returning a NodeList.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_document_get_elements_by_tag_name): Use the
implementation returning a NodeList.
(webkit_dom_document_get_elements_by_tag_name_ns): Ditto.
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
* bindings/gobject/webkitdom.symbols: Ditto.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName): Bring back this method, now that we
have deprecated API again and add the checks for
getElementsByTagName methods.
(GenerateFunction): Use GetEffectiveFunctionName().

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

6 years ago@font-face related cleanup
mmaxfield@apple.com [Mon, 24 Aug 2015 08:06:00 +0000 (08:06 +0000)]
@font-face related cleanup
https://bugs.webkit.org/show_bug.cgi?id=148355

Reviewed by Darin Adler.

This patch cleans up much of our code related to web fonts. In general, it
migrates to using C++ for-each style loops, uses Ref instead of RefPtr when
things can't be nullptr, migrates to C++ Rvalue-references instead of
PassRefPtr, and refactors CSSFontSelector::addFontFaceRule() to use helper
functions.

No new tests because there is no behavior change.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::fontLoaded): Use a C++ for-each loop.
* css/CSSFontFace.h:
(WebCore::CSSFontFace::create): Use C++ Rvalue-references instead of
PassRefPtr.
(WebCore::CSSFontFace::CSSFontFace): Ditto.
* css/CSSFontSelector.cpp:
(WebCore::computeTraitsMask): Migrated a chunk of
CSSFontSelector::addFontFaceRule() into this helper function.
(WebCore::createFontFace): Ditto.
(WebCore::familyNameFromPrimitive): Ditto.
(WebCore::CSSFontSelector::addFontFaceRule): Call the newly-created helper
functions. In addition, migrate to Refs instead of RefPtrs.
(WebCore::compareFontFaces): Migrate to references instead of pointers.
(WebCore::CSSFontSelector::getFontFace): Migrate to Refs instead of
RefPtrs. Also use C++ for-each loops.
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace): Use C++ for-each
loops.
(WebCore::CSSSegmentedFontFace::isValid): Ditto.
(WebCore::CSSSegmentedFontFace::appendFontFace): Migrate to Rvalue-
references instead of PassRefPtr.
* css/CSSSegmentedFontFace.h:
* platform/graphics/FontCache.h:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::getTraitsInFamily): Return the result instead of being
passed an out parameter.
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::getTraitsInFamily): Ditto.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::traitsInFamilyEnumProc): Ditto.
(WebCore::FontCache::getTraitsInFamily): Ditto.

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

6 years agoAddressed a missed piece of review feedback from r188851.
aestes@apple.com [Mon, 24 Aug 2015 06:54:41 +0000 (06:54 +0000)]
Addressed a missed piece of review feedback from r188851.

* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm:

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

6 years ago[Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveS...
aestes@apple.com [Mon, 24 Aug 2015 06:48:28 +0000 (06:48 +0000)]
[Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
https://bugs.webkit.org/show_bug.cgi?id=147872
rdar://problem/22044000

Reviewed by Dan Bernstein.
Source/WebCore:

Passed the ResourceLoader request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().

New API test: ContentFiltering.ServerRedirect

* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h: Added a URL argument to dispatchDidReceiveServerRedirectForProvisionalLoad().
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal): Passed the request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
* testing/Internals.cpp:
(WebCore::Internals::Internals): Stopped calling MockContentFilter::ensureInstalled().
* testing/MockContentFilterSettings.cpp:
(WebCore::MockContentFilterSettings::setEnabled): Called MockContentFilter::ensureInstalled() to ensure the
mock is installed whenever the filter is enabled.
* testing/MockContentFilterSettings.h: Exported member functions used by TestWebKitAPI.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Set provisionalURL using the URL argument.

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Added the URL argument.
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Added an API test.

* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Linked libWebCoreTestSupport in order to use MockContentFilter.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm: Added.
(-[ServerRedirectNavigationDelegate webView:didStartProvisionalNavigation:]): Expect the initial request URL.
(-[ServerRedirectNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]): Expect the redirect URL.
(-[ServerRedirectNavigationDelegate webView:didCommitNavigation:]):
(TEST): Tested that -[WKWebView URL] is updated after a redirect when content filtering is enabled.
* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm: Added.
(+[ServerRedirectPlugIn initialize]): Enable MockContentFilter.
* TestWebKitAPI/cocoa/TestProtocol.h: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.h.
* TestWebKitAPI/cocoa/TestProtocol.mm: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.mm.

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

6 years ago[JSC] Get rid of NodePointerTraits
benjamin@webkit.org [Mon, 24 Aug 2015 06:19:49 +0000 (06:19 +0000)]
[JSC] Get rid of NodePointerTraits
https://bugs.webkit.org/show_bug.cgi?id=148340

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-08-23
Reviewed by Anders Carlsson.

NodePointerTraits does exactly the same thing has the default trait.

* dfg/DFGBasicBlock.h:
* dfg/DFGCommon.h:
(JSC::DFG::NodePointerTraits::defaultValue): Deleted.
(JSC::DFG::NodePointerTraits::isEmptyForDump): Deleted.

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

6 years ago[JSC] Reduce the memory usage of BytecodeLivenessAnalysis
benjamin@webkit.org [Mon, 24 Aug 2015 06:18:42 +0000 (06:18 +0000)]
[JSC] Reduce the memory usage of BytecodeLivenessAnalysis
https://bugs.webkit.org/show_bug.cgi?id=148353

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-08-23
Reviewed by Darin Adler.

BytecodeLivenessAnalysis easily takes kilobytes of memory for
non trivial blocks and that memory sticks around because
it stored on CodeBlock.

This patch reduces that memory use a bit.

Most of the memory is in the array of BytecodeBasicBlock.
BytecodeBasicBlock is shrunk by:
-Making it not ref-counted.
-Removing m_predecessors, it was only used for debugging and
 is usually big.
-Added a shrinkToFit() phase to shrink the vectors once we are
 done building the BytecodeBasicBlock.

There are more things we should do in the future:
-Store all the BytecodeBasicBlock direclty in the array.
 We know the size ahead of time, this would be a pure win.
 The only tricky part is changing m_successors to have the
 index of the successor instead of a pointer.
-Stop putting duplicates in m_successors.

* bytecode/BytecodeBasicBlock.cpp:
(JSC::computeBytecodeBasicBlocks):
(JSC::BytecodeBasicBlock::shrinkToFit): Deleted.
(JSC::linkBlocks): Deleted.
* bytecode/BytecodeBasicBlock.h:
(JSC::BytecodeBasicBlock::addSuccessor):
(JSC::BytecodeBasicBlock::addPredecessor): Deleted.
(JSC::BytecodeBasicBlock::predecessors): Deleted.
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::getLeaderOffsetForBasicBlock):
(JSC::findBasicBlockWithLeaderOffset):
(JSC::findBasicBlockForBytecodeOffset):
(JSC::stepOverInstruction):
(JSC::computeLocalLivenessForBytecodeOffset):
(JSC::computeLocalLivenessForBlock):
(JSC::BytecodeLivenessAnalysis::dumpResults): Deleted.
* bytecode/BytecodeLivenessAnalysis.h:

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

6 years agoWeb Inspector: Filtered style not applied to graph elements during timeline recording
mattbaker@apple.com [Mon, 24 Aug 2015 05:33:42 +0000 (05:33 +0000)]
Web Inspector: Filtered style not applied to graph elements during timeline recording
https://bugs.webkit.org/show_bug.cgi?id=148339

Reviewed by Brian Burg.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
Check for hidden state change when applying filters to newly added tree elements.

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

6 years agoChange compiler-pipeline image for type profiler and code coverage profiler blog...
saambarati1@gmail.com [Mon, 24 Aug 2015 05:27:59 +0000 (05:27 +0000)]
Change compiler-pipeline image for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/compiler-pipeline-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/compiler-pipeline-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/compiler-pipeline.png: Removed.

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

6 years agoUnreviewed, rolling back in r188792.
ggaren@apple.com [Mon, 24 Aug 2015 02:07:27 +0000 (02:07 +0000)]
Unreviewed, rolling back in r188792.
https://bugs.webkit.org/show_bug.cgi?id=148347

Previously reverted changesets:

"Unify code paths for manually deleting all code"
https://bugs.webkit.org/show_bug.cgi?id=148280
http://trac.webkit.org/changeset/188792

The previous patch caused some inspector tests to hang because it
introduced extra calls to sourceParsed, and sourceParsed is
pathologically slow in WK1 debug builds. This patch restores pre-existing
code to limit calls to sourceParsed, excluding code not being debugged
(i.e., inspector code).

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

6 years agoFixed the 32-bit Mac build after r188844.
aestes@apple.com [Sun, 23 Aug 2015 22:51:28 +0000 (22:51 +0000)]
Fixed the 32-bit Mac build after r188844.

* TestWebKitAPI/WKWebViewConfigurationExtras.h:
* TestWebKitAPI/WKWebViewConfigurationExtras.mm:

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

6 years ago[Cocoa] API tests using the Modern WebKit API should be able to create web process...
aestes@apple.com [Sun, 23 Aug 2015 22:31:32 +0000 (22:31 +0000)]
[Cocoa] API tests using the Modern WebKit API should be able to create web process plug-ins
https://bugs.webkit.org/show_bug.cgi?id=148317

Reviewed by Dan Bernstein.

Added the ability for Modern WebKit API tests to create WKWebProcessPlugIns. A test can create a plug-in by
creating a class that conforms to WKWebProcessPlugIn, adding it to the WebProcessPlugIn target, and using the
WKWebViewConfiguration returned by +[WKWebViewConfiguration testwebkitapi_configurationWithTestPlugInClassName:]
when creating WKWebViews.

Since TestWebKitAPI relies on a bundle parameter to know which test class to instantiate in the plug-in, I also
added a new API test for bundle parameters.

* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Added. Named the bundle TestWebKitAPI.wkbundle and
named its executable TestWebKitAPI.bundle.
* TestWebKitAPI/PlatformUtilities.h: Declared TestPlugInClassNameParameter.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added the WebProcessPlugIn target.
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleParameters.mm: Added.
(TEST): Tested bundle parameters by verifying that parameter changes in the UI process are observed in the bundle.
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleParametersPlugIn.mm: Added.
(-[BundleParametersPlugIn webProcessPlugIn:didCreateBrowserContextController:]): Started observing changes to a
bundle parameter and asked for an initial notification.
(-[BundleParametersPlugIn dealloc]): Stopped observing changes to a bundle parameter.
(-[BundleParametersPlugIn observeValueForKeyPath:ofObject:change:context:]): When a bundle parameter changes,
mirror its value in the main frame's JSContext.
* TestWebKitAPI/WKWebViewConfigurationExtras.h: Added.
* TestWebKitAPI/WKWebViewConfigurationExtras.mm: Added.
(+[WKWebViewConfiguration testwebkitapi_configurationWithTestPlugInClassName:]): Created a configuration with
TestWebKitAPI's bundle URL and set a bundle parameter indicating the test plug-in's class name.
* TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm: Defined TestPlugInClassNameParameter.
* TestWebKitAPI/cocoa/WebProcessPlugIn/Info.plist: Added. Set the principal class to WebProcessPlugIn.
* TestWebKitAPI/cocoa/WebProcessPlugIn/WebProcessPlugIn.mm: Added.
(-[WebProcessPlugIn webProcessPlugIn:initializeWithObject:]): Forwarded to a newly-created test class instance.
(-[WebProcessPlugIn respondsToSelector:]): Returned YES if the test class instance response.
(-[WebProcessPlugIn forwardingTargetForSelector:]): Forwarded unimplemented methods to the test class instance.

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

6 years agoTypo fix after r188842.
ossy@webkit.org [Sun, 23 Aug 2015 21:42:50 +0000 (21:42 +0000)]
Typo fix after r188842.

* CMakeLists.txt:

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

6 years agoSpeculative buildfix after r188828.
ossy@webkit.org [Sun, 23 Aug 2015 21:37:43 +0000 (21:37 +0000)]
Speculative buildfix after r188828.

* CMakeLists.txt:

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

6 years agoUnreviewed, rolling back in r188803.
ggaren@apple.com [Sun, 23 Aug 2015 21:28:38 +0000 (21:28 +0000)]
Unreviewed, rolling back in r188803.

"Debugger's VM should never be null"
https://bugs.webkit.org/show_bug.cgi?id=148341
http://trac.webkit.org/changeset/188803

Source/JavaScriptCore:

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::attach):
(JSC::Debugger::detach):
(JSC::Debugger::isAttached):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::recompileAllJSFunctions):
(JSC::Debugger::setBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
(JSC::Debugger::setBreakpointsActivated):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepOutOfFunction):
(JSC::Debugger::returnEvent):
(JSC::Debugger::didExecuteProgram):
* debugger/Debugger.h:
* inspector/JSGlobalObjectScriptDebugServer.cpp:
(Inspector::JSGlobalObjectScriptDebugServer::JSGlobalObjectScriptDebugServer):
(Inspector::JSGlobalObjectScriptDebugServer::removeListener):
(Inspector::JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused):
(Inspector::JSGlobalObjectScriptDebugServer::recompileAllJSFunctions): Deleted.
* inspector/JSGlobalObjectScriptDebugServer.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::ScriptDebugServer):
* inspector/ScriptDebugServer.h:

Source/WebCore:

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::PageScriptDebugServer):
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didPause):
(WebCore::PageScriptDebugServer::runEventLoopWhilePaused):

Source/WebKit/mac:

* WebView/WebScriptDebugger.mm:
(toWebFrame):
(WebScriptDebugger::WebScriptDebugger):

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

6 years agoURTBF after r188828.
ossy@webkit.org [Sun, 23 Aug 2015 21:27:33 +0000 (21:27 +0000)]
URTBF after r188828.

* WebKitTestRunner/PlatformWebView.h:

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

6 years agoRemove SVGFrameLoaderClient and dataProtocolFrameLoader
antti@apple.com [Sun, 23 Aug 2015 16:37:01 +0000 (16:37 +0000)]
Remove SVGFrameLoaderClient and dataProtocolFrameLoader
https://bugs.webkit.org/show_bug.cgi?id=148370

Reviewed by Darin Adler.

With data protocol handled internally in WebKit these are no longer needed.

This mostly reverts code changes from http://trac.webkit.org/179626 keeping the tests.

* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::setDataBufferingPolicy):
(WebCore::ResourceLoader::dataProtocolFrameLoader): Deleted.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::documentLoader):
(WebCore::ResourceLoader::originalRequest):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::finishLoading):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageClients.h:

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

6 years agobuild.webkit.org/dashboard: Combined queues don't turn orange on internal failure
ap@apple.com [Sun, 23 Aug 2015 16:33:01 +0000 (16:33 +0000)]
build.webkit.org/dashboard: Combined queues don't turn orange on internal failure
https://bugs.webkit.org/show_bug.cgi?id=148356

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js:
(BuildbotCombinedQueueView.prototype.update):

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

6 years agoWeb Inspector: Drop webkit prefixes from animation, keyframes and transform
timothy@apple.com [Sun, 23 Aug 2015 16:31:16 +0000 (16:31 +0000)]
Web Inspector: Drop webkit prefixes from animation, keyframes and transform
https://bugs.webkit.org/show_bug.cgi?id=148364

Reviewed by Darin Adler.

* UserInterface/Views/BreakpointTreeElement.css:
(.breakpoint-generic-line-icon .icon > span):
(.data-updated.breakpoint-generic-line-icon .icon > span):
* UserInterface/Views/ColorPicker.css:
(.color-picker > .slider):
* UserInterface/Views/DashboardContainerView.css:
(.toolbar .dashboard):
(.toolbar .dashboard.slide-out-up):
(.toolbar .dashboard.slide-out-down):
(.toolbar .dashboard.slide-in-up):
(.toolbar .dashboard.slide-in-down):
(@keyframes slide-top-edge):
(@keyframes slide-bottom-edge):
(@-webkit-keyframes slide-top-edge): Deleted.
(@-webkit-keyframes slide-bottom-edge): Deleted.
* UserInterface/Views/DebuggerDashboardView.css:
(.dashboard.debugger .navigation-bar .item.button > .glyph):
(@keyframes pulse-pause-button):
(@-webkit-keyframes pulse-pause-button): Deleted.
* UserInterface/Views/DefaultDashboardView.css:
(.toolbar .dashboard.default > .item.pulsing):
(@keyframes console-item-pulse):
(@-webkit-keyframes console-item-pulse): Deleted.
* UserInterface/Views/GoToLineDialog.css:
(.go-to-line-dialog):
* UserInterface/Views/HoverMenu.css:
(.hover-menu):
* UserInterface/Views/IndeterminateProgressSpinner.css:
(@keyframes discrete-spinner):
(.indeterminate-progress-spinner):
(@-webkit-keyframes discrete-spinner): Deleted.
* UserInterface/Views/Main.css:
(.bouncy-highlight):
(@keyframes bouncy-highlight-animation):
(@-webkit-keyframes bouncy-highlight-animation): Deleted.
* UserInterface/Views/ProbeSetDataGrid.css:
(.details-section.probe-set .data-grid tr.revealed.highlighted):
(@keyframes blink-frame-highlight):
(.details-section.probe-set .data-grid > tr.data-updated):
(@keyframes blink-probe-frame):
(@-webkit-keyframes blink-frame-highlight): Deleted.
(@-webkit-keyframes blink-probe-frame): Deleted.
* UserInterface/Views/TextEditor.css:
(.text-editor > .CodeMirror .highlighted):
(@keyframes text-editor-highlight-fadeout):
(.text-editor > .CodeMirror .hovered-expression-highlight):
(@keyframes text-editor-hovered-expression-highlight-fadeout):
(@-webkit-keyframes text-editor-highlight-fadeout): Deleted.
(@-webkit-keyframes text-editor-hovered-expression-highlight-fadeout): Deleted.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview.frames > .timeline-ruler > .markers > .divider):
(.timeline-overview.frames > .timeline-ruler:not(.both-handles-clamped) > .selection-handle.right):
(.timeline-overview.frames > .timeline-ruler:not(.both-handles-clamped) > .shaded-area.right):
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header > .divider):
(.timeline-ruler > .markers > .divider):
(.timeline-ruler > .markers > .marker):
(.timeline-ruler > .selection-handle.left):
(.timeline-ruler > .selection-handle.right):

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

6 years agobuild.webkit.org/dashboard: Respect step's hidden flag
ap@apple.com [Sun, 23 Aug 2015 16:29:45 +0000 (16:29 +0000)]
build.webkit.org/dashboard: Respect step's hidden flag
https://bugs.webkit.org/show_bug.cgi?id=148357

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype._parseData):

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

6 years agoAX: Fix accessibility/deleting-iframe-destroys-axcache.html test
commit-queue@webkit.org [Sun, 23 Aug 2015 16:26:29 +0000 (16:26 +0000)]
AX: Fix accessibility/deleting-iframe-destroys-axcache.html test
https://bugs.webkit.org/show_bug.cgi?id=148328

Patch by Nan Wang <n_wang@apple.com> on 2015-08-23
Reviewed by Darin Adler.

Tools:

We should only expose stringValue() when value attribute is set.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::stringValue):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::stringValue):

LayoutTests:

* platform/mac/TestExpectations:

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

6 years agoRemove style checking rule regarding OwnPtr and PassOwnPtr
gyuyoung.kim@webkit.org [Sun, 23 Aug 2015 10:35:19 +0000 (10:35 +0000)]
Remove style checking rule regarding OwnPtr and PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=148360

Reviewed by Darin Adler.

OwnPtr and PassOwnPtr were totally removed though, style rule is still alive.
Removed it.

* Scripts/do-webcore-rename:
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(PassPtrTest.test_pass_own_ptr_in_function): Deleted.
(PassPtrTest.test_pass_ref_ptr_return_value): Deleted.
(PassPtrTest.test_own_ptr_parameter_value): Deleted.
(WebKitStyleTest.test_names): Deleted.

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

6 years agoFactor out and add logging to swipe-start hysteresis code
timothy_horton@apple.com [Sun, 23 Aug 2015 04:14:44 +0000 (04:14 +0000)]
Factor out and add logging to swipe-start hysteresis code
https://bugs.webkit.org/show_bug.cgi?id=148361

Reviewed by Darin Adler.

* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
(WebKit::ViewGestureController::shouldIgnorePinnedState):
(WebKit::ViewGestureController::setShouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
Move pending-swipe members into PendingSwipeTracker.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::scrollEventCanInfluenceSwipe):
(WebKit::deltaShouldCancelSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::reset):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
Move pending-swipe methods into PendingSwipeTracker.
Clean up the logic a bit.
Add some logging.

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

6 years agoChange image for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Sun, 23 Aug 2015 02:28:09 +0000 (02:28 +0000)]
Change image for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-1x.png:
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-2x.png:

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

6 years agoChange video for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Sat, 22 Aug 2015 23:05:36 +0000 (23:05 +0000)]
Change video for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/types-changing.mov:

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

6 years agoAdd 1x/2x resources for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Sat, 22 Aug 2015 22:46:53 +0000 (22:46 +0000)]
Add 1x/2x resources for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage.png: Removed.
* blog-files/type-profiler-and-code-coverage-profiler/subtle-bug-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/subtle-bug-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/subtle-bug.png: Removed.
* blog-files/type-profiler-and-code-coverage-profiler/type-profiler-api-view-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/type-profiler-api-view-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/type-profiler-api-view.png: Removed.
* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere.png: Removed.

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

6 years agoNodeList should not have a named getter
cdumez@apple.com [Sat, 22 Aug 2015 22:29:26 +0000 (22:29 +0000)]
NodeList should not have a named getter
https://bugs.webkit.org/show_bug.cgi?id=148117

Reviewed by Darin Adler.

Source/WebCore:

Drop the named property getter on NodeList to match the specification:
https://dom.spec.whatwg.org/#interface-nodelist

This change could be a bit risky but:
1. Firefox and IE never had this named property getter on NodeList.
2. Chrome successfuly dropped this named property getter in early 2014:
   https://src.chromium.org/viewvc/blink?revision=166356&view=revision
3. Our named property getter on NodeList is only partly functional:
   It only matches by 'id' attribute, not by 'name' attribute.
4. Our APIs that were wrongly returning a NodeList instead of an
   HTMLCollection (getElementsByTagName() / getElementsByClassName())
   have been fixed in r188735 and r188809. HTMLCollection does have
   a named property getter.
5. This named getter adds code complexity.

* bindings/js/JSNodeListCustom.cpp:
(WebCore::createWrapper): Deleted.
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::invalidateCache): Deleted.
* dom/ChildNodeList.h:
* dom/LiveNodeList.cpp:
* dom/LiveNodeList.h:
* dom/NodeList.h:
* dom/NodeList.idl:
* dom/StaticNodeList.cpp:
(WebCore::StaticElementList::length): Deleted.
(WebCore::StaticElementList::item): Deleted.
* dom/StaticNodeList.h:
* html/HTMLCollection.h:

LayoutTests:

* fast/dom/childnode-item-after-itemname-expected.txt: Removed.
* fast/dom/childnode-item-after-itemname.html: Removed.
Drop test as it is no longer relevant now that NodeList no longer
has a named property getter.

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

6 years agoWebKitTestRunner should use WKWebView on OS X and iOS
timothy_horton@apple.com [Sat, 22 Aug 2015 22:20:46 +0000 (22:20 +0000)]
WebKitTestRunner should use WKWebView on OS X and iOS
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

Reviewed by Anders Carlsson.
Patch by Enrica Casucci and myself.

* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::windowSnapshotEnabled): Deleted.
Add a PlatformWebView constructor that takes a WKWebViewConfiguration
instead of WKContext and WKPageGroup.

Remove the unused, always-true windowSnapshotEnabled().
While technically some platforms don't have window snapshotting,
they just return null instead of implementing windowSnapshotEnabled().

* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::initialize):
(WTR::TestController::createWebViewWithOptions):
Delegate to the various platforms for creating PlatformWebView instances,
for creating WKContexts, and for accessing WKPreferences,
so that they can do special things (like, use WKWebView instead!).

(WTR::TestController::resetPreferencesToConsistentValues):
Make explicit WebKitTestRunner's desired default for two preferences
which have differing defaults between the antique and modern API,
for consistency's sake.

(WTR::TestController::resetStateToConsistentValues):
Add platformResetStateToConsistentValues.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
Adjust to the aforementioned removal of windowSnapshotEnabled().

* WebKitTestRunner/ios/TestControllerCocoa.mm:
(WTR::TestController::platformResetStateToConsistentValues):
(WTR::TestController::platformPreferences):
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
(WTR::TestController::platformInitializeConfiguration):
Implement the new platform functions for the Modern WebKit2 API,
in a new TestControllerCocoa file that is shared between iOS and Mac.

For platformMaybeCreateContext, use the trick that we know we can cast
the WKProcessPool to a WKContextRef to retrieve a WKContextRef from
WKWebView's configuration.

Ditto for WKPreferencesRef and WKPreferences.

Remove user content filters on the WKWebView's userContentController.

* WebKitTestRunner/mac/TestControllerMac.mm:
* WebKitTestRunner/ios/TestControllerIOS.mm:
Move code into TestControllerCocoa.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::addUserScript):
(WTR::TestRunner::addUserStyleSheet):
Adopt WKBundlePage API for user scripts/sheets.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
Make and keep a WKWebView instead of a WKView.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
Reach inside the WKWebView to the WKView when dispatching events.
This is fairly ugly and we should come up with a better solution.
Also, fix some flipping and style errors.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add SPI to disable window occlusion detection, for WebKitTestRunner's use.

* Shared/WebPreferencesDefinitions.h:
Remove a completely unused WebPreference. It is a WebCore Setting,
but in the API it's exposed as a WKPage setter and WKView and WKWebView property
instead of as a WKPreference, so there's no need for the WebPreference.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageAddUserScript):
(WKBundlePageAddUserStyleSheet):
(WKBundlePageRemoveAllUserContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
* WebProcess/WebPage/WebPage.h:
Add WKBundlePage functions for user script and style sheet manipulation.
These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
(used by the WKBundle functions), so they work correctly with the modern API.

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

6 years agoTweak a test that became flaky on some machines after r188793.
ap@apple.com [Sat, 22 Aug 2015 19:29:44 +0000 (19:29 +0000)]
Tweak a test that became flaky on some machines after r188793.

* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:

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

6 years agoUnreviewed, attempt to fix GTK build after r188718
mcatanzaro@igalia.com [Sat, 22 Aug 2015 18:38:29 +0000 (18:38 +0000)]
Unreviewed, attempt to fix GTK build after r188718

Source/WebKit2:

* CMakeLists.txt: Build WKPageConfigurationRef.cpp
* PlatformEfl.cmake: Don't build WKPageConfigurationRef.cpp

Tools:

* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::PlatformWebView):

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

6 years agoDFG string concatenation shouldn't be playing fast and loose with effects and OSR...
fpizlo@apple.com [Sat, 22 Aug 2015 18:35:47 +0000 (18:35 +0000)]
DFG string concatenation shouldn't be playing fast and loose with effects and OSR exit
https://bugs.webkit.org/show_bug.cgi?id=148338

Reviewed by Michael Saboff and Saam Barati.

Prior to this change, DFG string concatenation appeared to have various different ways of
creating an OSR exit right after a side effect. That's bad, because the exit will cause
us to reexecute the side effect. The code appears to have some hacks for avoiding this,
but some cases are basically unavoidable, like the OOM case of string concatenation: in
trunk that could cause two executions of the toString operation.

This changes the string concatenation code to either be speculative or effectful but
never both. It's already the case that when this code needs to be effectful, it also
needs to be slow (it does int->string conversions, calls JS functions, etc). So, this is
a small price to pay for sanity.

The biggest part of this change is the introduction of StrCat, which is like MakeRope but
does toString conversions on its own instead of relying on separate nodes. StrCat can
take either 2 or 3 children. It's the effectful but not speculative version of MakeRope.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::convertStringAddUse):
(JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
(JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::JSValueOperand::JSValueOperand):
(JSC::DFG::JSValueOperand::~JSValueOperand):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStrCat):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
* jit/JITOperations.h:
* tests/stress/exception-effect-strcat.js: Added. This test previously failed.
* tests/stress/exception-in-strcat-string-overflow.js: Added. An earlier version of this patch made this fail.
* tests/stress/exception-in-strcat.js: Added.

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

6 years ago[JSC] Static hash tables should be 100% compile-time constant.
akling@apple.com [Sat, 22 Aug 2015 18:05:50 +0000 (18:05 +0000)]
[JSC] Static hash tables should be 100% compile-time constant.
<https://webkit.org/b/148359>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

We were dirtying the memory pages containing static hash tables the
first time they were used, when a dynamically allocated index-to-key
table was built and cached in the HashTable struct.

It turns out that this "optimization" was completely useless, since
we've long since decoupled static hash tables from the JSC::VM and
we can get the key for an index via HashTable::values[index].m_key!

We also get rid of VM::keywords which was a little wrapper around
a VM-specific copy of JSC::mainTable. There was nothing VM-specific
about it at all, so clients now use JSC::mainTable directly.

After this change all fooHashTable structs end up in __DATA __const
and no runtime initialization/allocation takes place.

* create_hash_table:
* jsc.cpp:
* parser/Lexer.cpp:
(JSC::isLexerKeyword):
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):
(JSC::Keywords::Keywords): Deleted.
* parser/Lexer.h:
(JSC::Keywords::isKeyword): Deleted.
(JSC::Keywords::getKeyword): Deleted.
(JSC::Keywords::~Keywords): Deleted.
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::tryJSONPParse):
* runtime/Lookup.cpp:
(JSC::HashTable::createTable): Deleted.
(JSC::HashTable::deleteTable): Deleted.
* runtime/Lookup.h:
(JSC::HashTable::entry):
(JSC::HashTable::ConstIterator::key):
(JSC::HashTable::ConstIterator::skipInvalidKeys):
(JSC::HashTable::copy): Deleted.
(JSC::HashTable::initializeIfNeeded): Deleted.
(JSC::HashTable::begin): Deleted.
(JSC::HashTable::end): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM): Deleted.
* runtime/VM.h:
* testRegExp.cpp:

Source/WebCore:

Adjust WebCore bindings generator for new JSC::HashTable layout
and rebaseline the bindings tests for that change.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTable):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:

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

6 years agoUnreviewed, fix build without ENABLE_CSS_GRID_LAYOUT after r188582
mcatanzaro@igalia.com [Sat, 22 Aug 2015 17:42:46 +0000 (17:42 +0000)]
Unreviewed, fix build without ENABLE_CSS_GRID_LAYOUT after r188582

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegion):

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

6 years agostd::once_flag needs to be static.
andersca@apple.com [Sat, 22 Aug 2015 17:14:22 +0000 (17:14 +0000)]
std::once_flag needs to be static.

* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::MainThreadFunctionTracker::singleton):

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

6 years agoPage::renderTreeSize() does not include anonymous renderers.
zalan@apple.com [Sat, 22 Aug 2015 13:38:01 +0000 (13:38 +0000)]
Page::renderTreeSize() does not include anonymous renderers.
https://bugs.webkit.org/show_bug.cgi?id=148352

Reviewed by Andreas Kling.

Anonymous renderes take the document as their node. Instead
of checking whether the node is the document, we could just check
if the RenderView is available.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::~RenderObject):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView): Deleted.
* rendering/RenderView.h: Include the RenderView in render tree size as well.

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

6 years agoDecode data URLs in web process
antti@apple.com [Sat, 22 Aug 2015 09:57:23 +0000 (09:57 +0000)]
Decode data URLs in web process
https://bugs.webkit.org/show_bug.cgi?id=148128

Reviewed by Darin Adler.

Source/WebCore:

We currenly send data URLs to networking layer for decoding. This involves a long and slow roundtrip through IPC and API layers.

* WebCore.xcodeproj/project.pbxproj:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Deleted.

    Remove this awkward interface for WebKit2.

* loader/ResourceLoadScheduler.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::loadDataURL):

    Load using DataURLDecoder.

* loader/ResourceLoader.h:

    Make start() public and export it so it can be called directly from WebKit2.

* platform/network/DataURLDecoder.cpp: Added.
(WebCore::DataURLDecoder::decodeQueue):
(WebCore::DataURLDecoder::DecodeTask::DecodeTask):
(WebCore::DataURLDecoder::createDecodeTask):

    Parse data URL metadata and initialize the decode task.

(WebCore::DataURLDecoder::decodeBase64):
(WebCore::DataURLDecoder::decodeEscaped):
(WebCore::DataURLDecoder::decode):

    Asynchronously decode in a concurrent distpatch queue.

* platform/network/DataURLDecoder.h: Added.
* platform/network/ios/QuickLook.h:
* platform/text/DecodeEscapeSequences.h:
(WebCore::URLEscapeSequence::findEndOfRun):
(WebCore::URLEscapeSequence::decodeRun):

    Factor buffer generation to a function.

(WebCore::decodeEscapeSequences):
(WebCore::decodeURLEscapeSequencesAsData):

    Add decode function that produces bytes instead of a String.

Source/WebKit2:

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):

    Don't send data: loads to the network process, handle them locally.

(WebKit::WebResourceLoadScheduler::startLocalLoad):

    Call ResourceLoder::start() directly.

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

6 years agoAX: aria-table-content.html test failing on windows
commit-queue@webkit.org [Sat, 22 Aug 2015 07:20:33 +0000 (07:20 +0000)]
AX: aria-table-content.html test failing on windows
https://bugs.webkit.org/show_bug.cgi?id=148354

Update TestExpectation for Windows to Skip test.

Patch by Doug Russell <d_russell@apple.com> on 2015-08-22
Reviewed by Tim Horton.

* platform/win/TestExpectations:

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

6 years agoWeb Inspector: Type profiler shows 'Undefined' annotation for functions with no retur...
commit-queue@webkit.org [Sat, 22 Aug 2015 03:27:24 +0000 (03:27 +0000)]
Web Inspector: Type profiler shows 'Undefined' annotation for functions with no return statements
https://bugs.webkit.org/show_bug.cgi?id=146882

Patch by Saam barati <sbarati@apple.com> on 2015-08-21
Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):

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

6 years agoUnreviewed, rolling out r188807, r188813, and r188815.
commit-queue@webkit.org [Sat, 22 Aug 2015 02:32:41 +0000 (02:32 +0000)]
Unreviewed, rolling out r188807, r188813, and r188815.
https://bugs.webkit.org/show_bug.cgi?id=148349

lots of 32-bit build problems, better to resolve separately
and try again (Requested by thorton on #webkit).

Reverted changesets:

"WebKitTestRunner should use WKWebView on OS X and iOS"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188807

"Stop building WebKitTestRunner for 32-bit platforms"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188813

"Stop building WebKitTestRunner for 32-bit platforms"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188815

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

6 years agoWeb Inspector: WebInspector.domTreeManager.regionLayoutUpdated does not exist
commit-queue@webkit.org [Sat, 22 Aug 2015 02:27:23 +0000 (02:27 +0000)]
Web Inspector: WebInspector.domTreeManager.regionLayoutUpdated does not exist
https://bugs.webkit.org/show_bug.cgi?id=148348

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

* UserInterface/Protocol/CSSObserver.js:
(WebInspector.CSSObserver.prototype.regionLayoutUpdated):
Just do the same as the new event name.

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

6 years agoStop building WebKitTestRunner for 32-bit platforms
timothy_horton@apple.com [Sat, 22 Aug 2015 01:43:10 +0000 (01:43 +0000)]
Stop building WebKitTestRunner for 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
This is a restriction on the valid set, not the desired set.

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

6 years agoMake Dashboard.Branches be objects of the form (repository, "branch name") and update...
commit-queue@webkit.org [Sat, 22 Aug 2015 01:39:48 +0000 (01:39 +0000)]
Make Dashboard.Branches be objects of the form (repository, "branch name") and update existing code
to work with these new objects.
https://bugs.webkit.org/show_bug.cgi?id=148188

Patch by Jason Marcell <jmarcell@apple.com> on 2015-08-21
Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype._normalizeQueueInfo): Renamed BuildbotQueue.branch to BuildbotQueue.branches.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js:
(BuildbotCombinedQueueView): Changed to work with new branch objects which represent a
(repository, "branch name")-pair.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js: Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue): Renamed BuildbotQueue.branch to BuildbotQueue.branches.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._appendPendingRevisionCount): Changed to work with new branch
objects which represent a (repository, "branch name")-pair.
(BuildbotQueueView.prototype._presentPopoverForPendingCommits): Ditto.
(BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Ditto.
(BuildbotQueueView.prototype._addDividerToPopover): Ditto.
(BuildbotQueueView.prototype.revisionContentForIteration): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js: Renamed
BuildbotQueue.branch to BuildbotQueue.branches.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.get defaultBranches): Changed to new (repository, "branch name") format.

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

6 years agoStop building WebKitTestRunner for 32-bit platforms
timothy_horton@apple.com [Sat, 22 Aug 2015 01:34:47 +0000 (01:34 +0000)]
Stop building WebKitTestRunner for 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
WKWebView is not available on 32-bit OS X.

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

6 years ago[Win] Unreviewed test correction after r188709.
bfulgham@apple.com [Sat, 22 Aug 2015 01:26:50 +0000 (01:26 +0000)]
[Win] Unreviewed test correction after r188709.

I removed a function argument that happened to be mirrored by a global
value with the same name. This prevented a compile error, but testing
showed that the wrong value was being used in the function.

* DumpRenderTree/win/FrameLoadDelegate.cpp:
(FrameLoadDelegate::willPerformClientRedirectToURL): Put function argument
back

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

6 years agoUnreviewed, rolling out r188792 and r188803.
commit-queue@webkit.org [Sat, 22 Aug 2015 00:53:55 +0000 (00:53 +0000)]
Unreviewed, rolling out r188792 and r188803.
https://bugs.webkit.org/show_bug.cgi?id=148347

broke lots of tests, ggaren is going to investigate and reland
(Requested by thorton on #webkit).

Reverted changesets:

"Unify code paths for manually deleting all code"
https://bugs.webkit.org/show_bug.cgi?id=148280
http://trac.webkit.org/changeset/188792

"Debugger's VM should never be null"
https://bugs.webkit.org/show_bug.cgi?id=148341
http://trac.webkit.org/changeset/188803

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

6 years agodocument.getElementsByTagName should return an HTMLCollection
cdumez@apple.com [Sat, 22 Aug 2015 00:50:13 +0000 (00:50 +0000)]
document.getElementsByTagName should return an HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=110611

Reviewed by Darin Adler.

Source/WebCore:

Update getElementsByTagName*() to return an HTMLCollection as per
the specification:
- https://dom.spec.whatwg.org/#interface-document
- https://dom.spec.whatwg.org/#interface-element

Firefox, Chrome and IE all match the specification but WebKit was
returning a NodeList.

Performance:
DOM/get-elements-by-tag-name-traversal-uncached.html is ~4.5% faster.

Test: fast/dom/getElementsByTagName-return-type.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Rename TagNodeList.* to TagCollection.*

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
Update the function to use descendantsOfType<>() instead of
getElementsByTagName(). The code is both shorter and more efficient.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByTagNameForObjC):
(WebCore::ContainerNode::getElementsByTagNameNS):
(WebCore::ContainerNode::getElementsByTagNameNSForObjC):
* dom/ContainerNode.h:
- Have getElementsByTagName*() return an HTMLCollection.
- Introduce versions used by the ObjC bindings that return a NodeList
  for API compatibility reasons.
- Move the localName null check to the *ForObjC versions and use a
  simple assertion for the non ObjC versions. This gets rid of a
  branch for our JS bindings as this function is hot. It is currently
  impossible to get a null AtomicString from our JS bindings code because
  getElementsByTagName() and getElementsByTagName(undefined) in JS end up
  calling ContainerNode::getElementsByTagName("undefined").
  Also getElementsByTagName(null) in JS ends up calling
  ContainerNode::getElementsByTagName("null"). I have also gotten rid of
  most of the getElementsByTagName() calls from our native code. The
  remaining ones either call with a non-null AtomicString and they now
  have a null-check.

* dom/Document.idl:
* dom/Element.idl:
Have getElementsByTagName*() return an HTMLCollection except for ObjC
bindings in order to maintain legacy API compatibility.

* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches):
(WebCore::NodeListsNodeData::invalidateCaches):
HTMLCollection::invalidateCache(attr) is now renamed to
invalidateCacheForAttribute(attr) to avoid ambiguity with
HTMLCollection::invalidateCache(doc) and for consistency
with LiveNodeList.

* dom/NodeRareData.h:
Make necessary updates now that TagNodeList is renamed to TagCollection
and is an HTMLCollection.

* dom/TagCollection.cpp: Renamed from Source/WebCore/dom/TagNodeList.cpp.
* dom/TagCollection.h: Renamed from Source/WebCore/dom/TagNodeList.h.
Rename TagNodeList / HTMLTagNodeList to TagCollection / HTMLTagCollection
and inherit CachedHTMLCollection instead of CachedLiveNodeList.

* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToBodyElement):
Update code using getElementsByTagName() to reflect the fact that it
now returns an HTMLCollection and item() returns an Element*. This
function is matching any Element with "body" tag, not just HTMLBodyElement
so I did not refactor it to use an descendantsOfType<HTMLBodyElement>().
It is not clear to me what the intention of this code is.

* editing/markup.cpp:
(WebCore::createFragmentFromMarkup):
* editing/markup.h:
- Return a Ref<> instead of a PassRefPtr<> as it can never return null.
- Use descendantsOfType<HTMLAttachmentElement>(fragment) instead of
  getElementsByTagName() as it results in both shorter and more efficient
  code.

* html/CollectionType.h:
Add new ByTag / ByHTMLTag collection types for TagCollection /
HTMLTabCollection.

* html/GenericCachedHTMLCollection.cpp:
(WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
Handle new ByTag / ByHTMLTag collection types in the switch statement.

* html/HTMLCollection.cpp:
(WebCore::invalidationTypeExcludingIdAndNameAttributes):
(WebCore::HTMLCollection::~HTMLCollection):
Handle new ByTag / ByHTMLTag collection types in switch statements.

(WebCore::HTMLCollection::tags):
Add a null-check on localName() before calling getElementsByTagName().
This function is currently for ObjC bindings only.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
Simplify / optimize the code by using descendantsOfType<HTMLPlugInImageElement>()
instead of getElementsByTagName().

* html/MediaDocument.cpp:
(WebCore::descendantVideoElement):
Use descendantsOfType<HTMLVideoElement> instead of getElementsByTagNameNS().

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _documentFragmentWithMarkupString:baseURLString:]):
Use .ptr() as createFragmentFromMarkup() now returns a
Ref<> instead of a RefPtr<>.

Source/WebKit/win:

* DOMCoreClasses.cpp:
(DOMDocument::getElementsByTagName):
(DOMDocument::getElementsByTagNameNS):
Add null checks for localName() before calling
ContainerNode::getElementsByTagName*().

LayoutTests:

* fast/dom/getElementsByTagName-return-type-expected.txt: Added.
* fast/dom/getElementsByTagName-return-type.html: Added.
New test checking that getElementsByTagName*() returns an HTMLcollection.

* fast/dom/NodeList/script-tests/nodelist-item-call-as-function.js:
* fast/dom/domListEnumeration-expected.txt:
* fast/dom/named-items-with-symbol-name-expected.txt:
* fast/dom/script-tests/domListEnumeration.js:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* js/dom/constructor-expected.txt:
* js/dom/script-tests/constructor.js:
* platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
* platform/mac/fast/dom/wrapper-classes-objc.html:
Rebaseline / update.

* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
One of the checks is now failing because HTMLCollection.item()'s
parameter is optional. The specification says the parameter should
be mandatory so I did not update the test. It was previously passing
because NodeList.item()'s parameter is mandatory.

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

6 years agoParse control flow statements in WebAssembly
commit-queue@webkit.org [Sat, 22 Aug 2015 00:49:20 +0000 (00:49 +0000)]
Parse control flow statements in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=148333

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

Parse control flow statements in WebAssembly files generated by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>.

* wasm/WASMConstants.h:
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseStatement):
(JSC::WASMFunctionParser::parseIfStatement):
(JSC::WASMFunctionParser::parseIfElseStatement):
(JSC::WASMFunctionParser::parseWhileStatement):
(JSC::WASMFunctionParser::parseDoStatement):
(JSC::WASMFunctionParser::parseLabelStatement):
(JSC::WASMFunctionParser::parseBreakStatement):
(JSC::WASMFunctionParser::parseBreakLabelStatement):
(JSC::WASMFunctionParser::parseContinueStatement):
(JSC::WASMFunctionParser::parseContinueLabelStatement):
(JSC::WASMFunctionParser::parseSwitchStatement):
* wasm/WASMFunctionParser.h:
(JSC::WASMFunctionParser::WASMFunctionParser):
* wasm/WASMReader.cpp:
(JSC::WASMReader::readCompactInt32):
(JSC::WASMReader::readSwitchCase):
* wasm/WASMReader.h:

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

6 years agoWebKitTestRunner should use WKWebView on OS X and iOS
timothy_horton@apple.com [Sat, 22 Aug 2015 00:34:31 +0000 (00:34 +0000)]
WebKitTestRunner should use WKWebView on OS X and iOS
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

Reviewed by Anders Carlsson.
Patch by Enrica Casucci and myself.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add SPI to disable window occlusion detection, for WebKitTestRunner's use.

* Shared/WebPreferencesDefinitions.h:
Remove a completely unused WebPreference. It is a WebCore Setting,
but in the API it's exposed as a WKPage setter and WKView and WKWebView property
instead of as a WKPreference, so there's no need for the WebPreference.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageAddUserScript):
(WKBundlePageAddUserStyleSheet):
(WKBundlePageRemoveAllUserContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
* WebProcess/WebPage/WebPage.h:
Add WKBundlePage functions for user script and style sheet manipulation.
These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
(used by the WKBundle functions), so they work correctly with the modern API.

* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::windowSnapshotEnabled): Deleted.
Add a PlatformWebView constructor that takes a WKWebViewConfiguration
instead of WKContext and WKPageGroup.

Remove the unused, always-true windowSnapshotEnabled().
While technically some platforms don't have window snapshotting,
they just return null instead of implementing windowSnapshotEnabled().

* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::initialize):
(WTR::TestController::createWebViewWithOptions):
Delegate to the various platforms for creating PlatformWebView instances,
for creating WKContexts, and for accessing WKPreferences,
so that they can do special things (like, use WKWebView instead!).

(WTR::TestController::resetPreferencesToConsistentValues):
Make explicit WebKitTestRunner's desired default for two preferences
which have differing defaults between the antique and modern API,
for consistency's sake.

(WTR::TestController::resetStateToConsistentValues):
Add platformResetStateToConsistentValues.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
Adjust to the aforementioned removal of windowSnapshotEnabled().

* WebKitTestRunner/ios/TestControllerCocoa.mm:
(WTR::TestController::platformResetStateToConsistentValues):
(WTR::TestController::platformPreferences):
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
(WTR::TestController::platformInitializeConfiguration):
Implement the new platform functions for the Modern WebKit2 API,
in a new TestControllerCocoa file that is shared between iOS and Mac.

For platformMaybeCreateContext, use the trick that we know we can cast
the WKProcessPool to a WKContextRef to retrieve a WKContextRef from
WKWebView's configuration.

Ditto for WKPreferencesRef and WKPreferences.

Remove user content filters on the WKWebView's userContentController.

* WebKitTestRunner/mac/TestControllerMac.mm:
* WebKitTestRunner/ios/TestControllerIOS.mm:
Move code into TestControllerCocoa.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::addUserScript):
(WTR::TestRunner::addUserStyleSheet):
Adopt WKBundlePage API for user scripts/sheets.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
Make and keep a WKWebView instead of a WKView.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
Reach inside the WKWebView to the WKView when dispatching events.
This is fairly ugly and we should come up with a better solution.
Also, fix some flipping and style errors.

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

6 years agoBuild fix.
andersca@apple.com [Sat, 22 Aug 2015 00:03:34 +0000 (00:03 +0000)]
Build fix.

* wtf/MainThread.h:

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

6 years agoDebugger's VM should never be null
ggaren@apple.com [Fri, 21 Aug 2015 23:57:07 +0000 (23:57 +0000)]
Debugger's VM should never be null
https://bugs.webkit.org/show_bug.cgi?id=148341

Reviewed by Joseph Pecoraro.

It doesn't make sense for a Debugger's VM to be null, and code related
to maintaining that illusion just caused the Web Inspector to crash on
launch (https://bugs.webkit.org/show_bug.cgi?id=148312). So, let's stop
doing that.

Now, Debugger requires its subclass to provide a never-null VM&.

Source/JavaScriptCore:

Also took the opportunity, based on review feedback, to remove some
confusion in the virtual recompileAllJSFunctions hierarchy, by eliminating
the pure virtual in ScriptDebugServer and the unnecessary override in
JSGlobalObjectScriptDebugServer.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::attach):
(JSC::Debugger::detach):
(JSC::Debugger::isAttached):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::recompileAllJSFunctions):
(JSC::Debugger::setBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
(JSC::Debugger::setBreakpointsActivated):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepOutOfFunction):
(JSC::Debugger::returnEvent):
(JSC::Debugger::didExecuteProgram):
* debugger/Debugger.h:
* inspector/JSGlobalObjectScriptDebugServer.cpp:
(Inspector::JSGlobalObjectScriptDebugServer::JSGlobalObjectScriptDebugServer):
(Inspector::JSGlobalObjectScriptDebugServer::recompileAllJSFunctions):
(Inspector::JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused):
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::ScriptDebugServer):
* inspector/ScriptDebugServer.h:

Source/WebCore:

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didPause):

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

6 years ago[OS X] Remove dead code from FontCache::systemFallbackForCharacters()
mmaxfield@apple.com [Fri, 21 Aug 2015 23:50:21 +0000 (23:50 +0000)]
[OS X] Remove dead code from FontCache::systemFallbackForCharacters()
https://bugs.webkit.org/show_bug.cgi?id=148218

Reviewed by Daniel Bates.

lookupCTFont() in FontCacheMac.mm will always return the best font (because
CTFontCreateForCharactersWithLanguage() does so). Also, all fonts that will
be created on WebKit's behalf are already printer fonts.

No new tests because there is no behavior change.

* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters): Deleted.

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

6 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Fri, 21 Aug 2015 23:48:52 +0000 (23:48 +0000)]
[Win] Unreviewed build fix.

* win/tools/vsprops/common.props: Ignore a warning that is filling the
build logs with useless cruft.

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

6 years agoRe-mark accessibility/mac/search-with-frames.html flaky
timothy_horton@apple.com [Fri, 21 Aug 2015 23:46:17 +0000 (23:46 +0000)]
Re-mark accessibility/mac/search-with-frames.html flaky

* platform/mac/TestExpectations:
It's still not 100%.

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

6 years agoFix build.
andersca@apple.com [Fri, 21 Aug 2015 23:41:40 +0000 (23:41 +0000)]
Fix build.

* platform/network/win/NetworkStateNotifierWin.cpp:
(WebCore::NetworkStateNotifier::addrChangeCallback):
(WebCore::NetworkStateNotifier::callAddressChanged): Deleted.

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

6 years agoAddress review feedback from Darin.
andersca@apple.com [Fri, 21 Aug 2015 23:37:24 +0000 (23:37 +0000)]
Address review feedback from Darin.

* wtf/MainThread.h:
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::callOnMainThread):
(WTF::cancelCallOnMainThread):

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

6 years ago[Cocoa] Clean up Font class
mmaxfield@apple.com [Fri, 21 Aug 2015 23:34:07 +0000 (23:34 +0000)]
[Cocoa] Clean up Font class
https://bugs.webkit.org/show_bug.cgi?id=148216

Reviewed by Dean Jackson.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::Font::platformGlyphInit): Deleted.
* platform/graphics/Font.h:
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformInit):

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

6 years agoRemove unused code relative to allocation sinking
basile_clement@apple.com [Fri, 21 Aug 2015 23:30:40 +0000 (23:30 +0000)]
Remove unused code relative to allocation sinking
https://bugs.webkit.org/show_bug.cgi?id=148342

Reviewed by Mark Lam.

This removes two things:

 - The DFGPromoteHeapAccess.h file which is a relic of the old sinking
   phase and is no longer used (it has been subsumed by
   ObjectAllocationSinking::promoteLocalHeap)

 - Code in the allocation sinking phase for sinking
   MaterializeCreateActivation and MaterializeNewObject. Handling those
   is no longer necessary since the phase no longer runs in a fixpoint
   and thus will never see those nodes, since no other phase creates
   them.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPromoteHeapAccess.h: Removed.

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

6 years ago[Cocoa] Unify two more FontCache functions
mmaxfield@apple.com [Fri, 21 Aug 2015 23:28:08 +0000 (23:28 +0000)]
[Cocoa] Unify two more FontCache functions
https://bugs.webkit.org/show_bug.cgi?id=148217

Reviewed by Dean Jackson.

Move duplicated code from FontCacheMac and FontCacheIOS into
FontCacheCoreText.

No new tests because there is no behavior change.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::toTraitsMask):
(WebCore::isFontWeightBold):
(WebCore::FontCache::similarFont):
(WebCore::FontCache::getTraitsInFamily):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::similarFont): Deleted.
(WebCore::toTraitsMask): Deleted.
(WebCore::FontCache::getTraitsInFamily): Deleted.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::toTraitsMask): Deleted.
(WebCore::FontCache::similarFont): Deleted.
(WebCore::FontCache::getTraitsInFamily): Deleted.

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

6 years agoEdit a resource for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Fri, 21 Aug 2015 23:16:48 +0000 (23:16 +0000)]
Edit a resource for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere.png:

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

6 years agoImprove how UI events are dispatched by WebKitTestRunner
ap@apple.com [Fri, 21 Aug 2015 23:09:54 +0000 (23:09 +0000)]
Improve how UI events are dispatched by WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=148326

Reviewed by Anders Carlsson.

Source/WebKit2:

Added "fully synchronous mode for testing", in which all messages are dispatched
synchronously.

When an async message is sent in this mode, it is wrapped into a sync one automatically.

A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(),
or by calling WKContextConfigurationAllowFullySynchronousModeForTesting().
This makes sure that we don't increase potential for IPC misuse.

* WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages!

* UIProcess/API/C/WKPage.cpp:
(WKPageSetShouldSendEventsSynchronously): Deleted.
* UIProcess/API/C/WKPagePrivate.h:
We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages.

* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
(WebKit::updateWheelEventTestTriggersIfNeeded): Deleted.
Removed code that was only needed to support pseudo-syncronous scrolling in tests.

* Platform/IPC/Connection.cpp:
(IPC::Connection::sendMessage):
(IPC::Connection::dispatchSyncMessage):
(IPC::Connection::dispatchMessage):
* Platform/IPC/Connection.h:
(IPC::Connection::allowFullySynchronousModeForTesting):
(IPC::Connection::sendSync):
* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
(IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting):
(IPC::MessageDecoder::setImportanceAssertion):
(IPC::MessageDecoder::unwrapForTesting):
* Platform/IPC/MessageDecoder.h:
(IPC::MessageDecoder::UUID):
* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
(IPC::MessageEncoder::setFullySynchronousModeForTesting):
(IPC::MessageEncoder::wrapForTesting):
* Platform/IPC/MessageEncoder.h:
(IPC::MessageEncoder::UUID):
* Platform/IPC/MessageFlags.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationSetMediaKeysStorageDirectory):
(WKContextConfigurationAllowFullySynchronousModeForTesting):
* UIProcess/API/C/WKContextConfigurationRef.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::handleKeyboardEvent):
(WebKit::WebPageProxy::handleTouchEvent):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::renderTreeSize):
(WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePagePostMessage):
(WKBundlePagePostSynchronousMessageForTesting):
(WKBundlePagePostSynchronousMessage): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::handleWheelEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::handleKeyEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::validateCommand):
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::scroll):
(WebKit::WebPage::postMessage):
(WebKit::WebPage::postSynchronousMessageForTesting):
(WebKit::WebPage::mouseEventSyncForTesting): Deleted.
(WebKit::WebPage::wheelEventSyncForTesting): Deleted.
(WebKit::WebPage::keyEventSyncForTesting): Deleted.
(WebKit::WebPage::touchEventSyncForTesting): Deleted.
(WebKit::WebPage::postSynchronousMessage): Deleted.
* WebProcess/WebPage/WebPage.h:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
Removed asyncScrolling from mouseScrollByWithWheelAndMomentumPhases, it's now always
asynchronous (and really, it has always been for the most part).

* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseDown): Updated for WKBundlePagePostSynchronousMessage renaming.
(WTR::EventSendingController::mouseUp): Ditto.
(WTR::EventSendingController::mouseMoveTo): Ditto.
(WTR::EventSendingController::mouseForceDown): Ditto.
(WTR::EventSendingController::mouseForceUp): Ditto.
(WTR::EventSendingController::mouseForceChanged): Ditto.
(WTR::EventSendingController::leapForward): Ditto.
(WTR::EventSendingController::scheduleAsynchronousClick): Ditto.
(WTR::EventSendingController::keyDown): Ditto.
(WTR::EventSendingController::scheduleAsynchronousKeyDown): Ditto.
(WTR::EventSendingController::mouseScrollBy): Force a scrolling tree commit. It used
to be done in custom WebKit2 code for test wheel event handling.
(WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Got rid of sync version.
(WTR::EventSendingController::continuousMouseScrollBy): Added a FIXME. This one is weird.
(WTR::EventSendingController::contextClick): Updated for WKBundlePagePostSynchronousMessage renaming.
(WTR::EventSendingController::addTouchPoint): Ditto.
(WTR::EventSendingController::updateTouchPoint): Ditto.
(WTR::EventSendingController::setTouchModifier): Ditto.
(WTR::EventSendingController::setTouchPointRadius): Ditto.
(WTR::EventSendingController::touchStart): Ditto.
(WTR::EventSendingController::touchMove): Ditto.
(WTR::EventSendingController::touchEnd): Ditto.
(WTR::EventSendingController::touchCancel): Ditto.
(WTR::EventSendingController::clearTouchPoints): Ditto.
(WTR::EventSendingController::releaseTouchPoint): Ditto.
(WTR::EventSendingController::cancelTouchPoint): Ditto.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::postSetWindowIsKey):
(WTR::InjectedBundle::postSimulateWebNotificationClick):
(WTR::InjectedBundle::isGeolocationProviderActive):
(WTR::InjectedBundle::shouldProcessWorkQueue):
Updated for WKBundlePagePostSynchronousMessage renaming.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::secureEventInputIsEnabled): Ditto.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Allow handling the new test style messages.
(WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Removed calls
to WKPageSetShouldSendEventsSynchronously, which we no longer need.
(WTR::TestController::didReceiveMessageFromInjectedBundle):
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Moved
"MouseScrollBy" to async section, and got rid of WKPageSetShouldSendEventsSynchronously.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseMoveTo): Got rid of WKPageSetShouldSendEventsSynchronously.
(WTR::EventSenderProxy::keyDown): Ditto.
(WTR::EventSenderProxy::mouseScrollBy): Ditto.
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): Ditto.

LayoutTests:

* fast/events/clear-drag-state-expected.txt:
* fast/events/clear-drag-state.html:
* platform/mac-wk2/TestExpectations:
This test used to accidentally pass in WebKit2, but it didn't actually check
for the problem. This patch improves WK2 behavior, which makes the test fail.
Changed the test to not pass accidentally, and added it to WK2 test expectations.

* fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt:
* fast/events/scroll-in-scaled-page-with-overflow-hidden.html:
Updated the test to be fully async.

* fast/events/wheelevent-basic-expected.txt:
* fast/events/wheelevent-basic.html:
Updated the test to be fully async, got rid of tab characters.

* fast/events/wheelevent-mousewheel-interaction.html:
* fast/forms/search/search-scroll-hidden-decoration-container-crash.html:
* fast/frames/flattening/scrolling-in-object.html:
Updated these tests to be fully async. Since they check for something that happens
asynchronously, and doesn't have an end event, they have to use setTimeout.

* fast/scrolling/latching/iframe_in_iframe.html:
* fast/scrolling/latching/scroll-div-latched-div.html:
* fast/scrolling/latching/scroll-div-latched-mainframe.html:
* fast/scrolling/latching/scroll-div-no-latching.html:
* fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html:
* fast/scrolling/latching/scroll-iframe-fragment.html:
* fast/scrolling/latching/scroll-iframe-latched-iframe.html:
* fast/scrolling/latching/scroll-iframe-latched-mainframe.html:
* fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html:
* fast/scrolling/latching/scroll-latched-nested-div.html:
* fast/scrolling/latching/scroll-nested-iframe.html:
* fast/scrolling/latching/scroll-select-bottom-test.html:
* fast/scrolling/latching/scroll-select-latched-mainframe.html:
* fast/scrolling/latching/scroll-select-latched-select.html:
Removed extra testRunner.mouseScrollByWithWheelAndMomentumPhases() calls.
We no longer need multiple events for scroll snap animation to start, and due to
the way we coalesce events, having multiple events resulted in getting too high velocity.
Removed async scrolling argument form the function calls, because it's now always async.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:
Moved fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html
to WK1 expectations, because the test needn't be skipped on WK2.

* scrollbars/scroll-rtl-or-bt-layer.html: Made the test fully async, and refactored
it for clarity.

* tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html:
* tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
* tiled-drawing/scrolling/iframe_in_iframe.html:
* tiled-drawing/scrolling/overflow-scroll-reduced-content.html:
* tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html:
* tiled-drawing/scrolling/root-overflow-with-mousewheel.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
* tiled-drawing/scrolling/wheel-events-with-no-delta.html:
Same testRunner.mouseScrollByWithWheelAndMomentumPhases changes as in fast/scrolling/latching.

* tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
Removed debug output about how many events are received. The number may vary due
to coalescing.

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

6 years agoUnify code paths for manually deleting all code
ggaren@apple.com [Fri, 21 Aug 2015 22:48:49 +0000 (22:48 +0000)]
Unify code paths for manually deleting all code
https://bugs.webkit.org/show_bug.cgi?id=148280

Reviewed by Saam Barati.

We used to have three paths for manually deleting all code. Now we have
one shared path.

* debugger/Debugger.cpp:
(JSC::Debugger::attach): Notify the debugger of all previous code when
it attaches. We used to do this when recompiling, which was only correct
by accident.

(JSC::Debugger::recompileAllJSFunctions): Switch to the shared path.

* heap/Heap.h:
(JSC::Heap::compiledCode):

* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
(Inspector::InspectorRuntimeAgent::willDestroyFrontendAndBackend):
(Inspector::InspectorRuntimeAgent::setTypeProfilerEnabledState):
(Inspector::InspectorRuntimeAgent::getBasicBlocks):
(Inspector::TypeRecompiler::visit): Deleted.
(Inspector::TypeRecompiler::operator()): Deleted.
(Inspector::recompileAllJSFunctionsForTypeProfiling): Deleted. Switch
to the shared path.

* runtime/VM.cpp:
(JSC::VM::afterVMExit): Added a helper for scheduling an activity after
VM exit. We can't delete code while it's on the stack, and we can't
delete auxiliary profiling data while profiling code is on the stack,
so in those cases, we schedule the deletion for the next time we exit.

(JSC::VM::deleteAllCode): Use afterVMExit because we might have code
on the stack when debugger, profiler, or watchdog state changes.

* runtime/VM.h:

* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::addDidPopListener):
(JSC::VMEntryScope::~VMEntryScope):
(JSC::VMEntryScope::setEntryScopeDidPopListener): Deleted.
* runtime/VMEntryScope.h:
(JSC::VMEntryScope::globalObject): Removed the uniquing feature from
the scope pop listener list because we don't have a client that wants
it, and it's not convenient to use correctly since you can't take
the address of a member function, a lambda, or an std::function. We can
add this feature back if we discover that we want it.

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

6 years agoAdd resources for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Fri, 21 Aug 2015 22:12:53 +0000 (22:12 +0000)]
Add resources for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler: Added.
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-video.mp4: Added.
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/compiler-pipeline.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/subtle-bug.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/type-profiler-api-view.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/types-changing.mov: Added.
* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere.png: Added.

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

6 years agoDeprecate the old school callOnMainThread/cancelCallOnMainThread functions
andersca@apple.com [Fri, 21 Aug 2015 22:06:25 +0000 (22:06 +0000)]
Deprecate the old school callOnMainThread/cancelCallOnMainThread functions
https://bugs.webkit.org/show_bug.cgi?id=148327

Reviewed by Sam Weinig.

* wtf/MainThread.cpp:
(WTF::functionQueue):
(WTF::dispatchFunctionsFromMainThread):
(WTF::callOnMainThread):
Change the function queue to be a queue of std::function<void ()> and get rid of dead code.

* wtf/MainThread.h:
Conditionalize callOnMainThread and cancelCallOnMainThread because Safari on Mavericks still expects to them to be
declared in MainThread.h under 10.9.

* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
Add a MainThreadFunctionTracker singleton that keeps track of scheduled functions so we can ensure that they're not
called if they're cancelled.

(WTF::MainThreadFunctionTracker::singleton):
Return the singleton.

(WTF::MainThreadFunctionTracker::callOnMainThread):
Add the function/context pair to our map and schedule the function to be run on the main thread.
If the function has been removed, don't call it.

(WTF::MainThreadFunctionTracker::cancelCallOnMainThread):
Remove all entries with the given function/context pair.

(WTF::MainThreadFunctionTracker::addFunction):
Add the function/context pair to the map and return the unique identifier.

(WTF::MainThreadFunctionTracker::removeIdentifier):
Look up the identifier and remove it if it still exists. If it exists we know that it hasn't been canceled and that we can call it.

(WTF::MainThreadFunctionTracker::removeFunctions):
Remove all function identifiers matched by the function/context pair.

(WTF::callOnMainThread):
Implement using MainThreadFunctionTracker.

(WTF::cancelCallOnMainThread):
Implement using MainThreadFunctionTracker.

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

6 years agoStop using the old callOnMainThread variant on Windows
andersca@apple.com [Fri, 21 Aug 2015 22:01:02 +0000 (22:01 +0000)]
Stop using the old callOnMainThread variant on Windows
https://bugs.webkit.org/show_bug.cgi?id=148332

Reviewed by Tim Horton.

Source/WebCore:

* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::notifyCookiesChanged):
(WebCore::notifyCookiesChangedOnMainThread): Deleted.
* platform/network/win/NetworkStateNotifierWin.cpp:
(WebCore::NetworkStateNotifier::addrChangeCallback):

Source/WebKit/win:

* Plugins/PluginMainThreadScheduler.cpp:
(WebCore::PluginMainThreadScheduler::scheduleCall):
(WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
* Plugins/PluginMainThreadScheduler.h:
* WebDatabaseManager.cpp:
(DidModifyOriginData::dispatchToMainThread):
* WebIconDatabase.cpp:
(WebIconDatabase::scheduleNotificationDelivery):

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

6 years agoImplement WebAssembly function parser
commit-queue@webkit.org [Fri, 21 Aug 2015 21:46:22 +0000 (21:46 +0000)]
Implement WebAssembly function parser
https://bugs.webkit.org/show_bug.cgi?id=147738

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

Implement WebAssembly function parser for WebAssembly files produced by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>. This patch parses only
some instructions on statements and int32 expressions. Parsing of the rest
will be implemented in subsequent patches. The instruction lists in WASMConstants.h
are slightly modified from
<https://github.com/WebAssembly/polyfill-prototype-1/blob/master/src/shared.h>.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wasm/WASMConstants.h: Added.
* wasm/WASMFormat.h:
* wasm/WASMFunctionParser.cpp: Added.
(JSC::WASMFunctionParser::checkSyntax):
(JSC::WASMFunctionParser::parseFunction):
(JSC::WASMFunctionParser::parseLocalVariables):
(JSC::WASMFunctionParser::parseStatement):
(JSC::WASMFunctionParser::parseSetLocalStatement):
(JSC::WASMFunctionParser::parseReturnStatement):
(JSC::WASMFunctionParser::parseBlockStatement):
(JSC::WASMFunctionParser::parseExpression):
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseImmediateExpressionI32):
* wasm/WASMFunctionParser.h: Added.
(JSC::WASMFunctionParser::WASMFunctionParser):
* wasm/WASMFunctionSyntaxChecker.h: Renamed from Source/JavaScriptCore/wasm/WASMMagicNumber.h.
* wasm/WASMModuleParser.cpp:
(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parseFunctionDefinitionSection):
(JSC::WASMModuleParser::parseFunctionDefinition):
* wasm/WASMModuleParser.h:
* wasm/WASMReader.cpp:
(JSC::WASMReader::readType):
(JSC::WASMReader::readExpressionType):
(JSC::WASMReader::readExportFormat):
(JSC::WASMReader::readOpStatement):
(JSC::WASMReader::readOpExpressionI32):
(JSC::WASMReader::readVariableTypes):
(JSC::WASMReader::readOp):
* wasm/WASMReader.h:
(JSC::WASMReader::offset):
(JSC::WASMReader::setOffset):

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

6 years agoDFG::PutStackSinkingPhase doesn't need to emit KillStack nodes
fpizlo@apple.com [Fri, 21 Aug 2015 21:44:11 +0000 (21:44 +0000)]
DFG::PutStackSinkingPhase doesn't need to emit KillStack nodes
https://bugs.webkit.org/show_bug.cgi?id=148331

Reviewed by Geoffrey Garen.

PutStackSinkingPhase previously emitted a KillStack node when it sank a PutStack. This
isn't necessary because KillStack is only interesting for OSR exit, and PutStack nodes
that are relevant to OSR will already be preceded by a KillStack/MovHint pair.

* dfg/DFGPutStackSinkingPhase.cpp:

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

6 years agoMedia Session: let UI clients change the volume of the focused media element
mrajca@apple.com [Fri, 21 Aug 2015 21:41:53 +0000 (21:41 +0000)]
Media Session: let UI clients change the volume of the focused media element
https://bugs.webkit.org/show_bug.cgi?id=148289

Reviewed by Tim Horton.

WebCore:
* page/Page.cpp:
(WebCore::Page::setVolumeOfMediaElement):
* page/Page.h:

WebKit2:
* UIProcess/API/C/WKMediaSessionFocusManager.cpp:
(WKMediaSessionFocusManagerSetVolumeOfFocusedMediaElement):
* UIProcess/API/C/WKMediaSessionFocusManager.h:
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::updatePlaybackAttribute):
(WebKit::WebMediaSessionFocusManager::setVolumeOfFocusedMediaElement):
* UIProcess/WebMediaSessionFocusManager.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setVolumeOfMediaElement):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setVolumeOfMediaElement):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

6 years agoGet rid of uses of the old callOnMainThread function that takes a function ptr +...
andersca@apple.com [Fri, 21 Aug 2015 20:50:59 +0000 (20:50 +0000)]
Get rid of uses of the old callOnMainThread function that takes a function ptr + context
https://bugs.webkit.org/show_bug.cgi?id=148324

Reviewed by Tim Horton.

Source/WebCore:

* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::DecodingTask::decode):
(WebCore::AsyncAudioDecoder::DecodingTask::notifyCompleteDispatch): Deleted.
* Modules/webaudio/AsyncAudioDecoder.h:
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
(WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch): Deleted.
* Modules/webaudio/OfflineAudioDestinationNode.h:
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::process):
(WebCore::ScriptProcessorNode::fireProcessEventDispatch): Deleted.
* Modules/webaudio/ScriptProcessorNode.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::scheduleForNotification):
(WebCore::DatabaseTracker::notifyDatabasesChanged):
* Modules/webdatabase/DatabaseTracker.h:
* platform/graphics/cg/ImageCG.cpp:
(WebCore::patternReleaseCallback):
(WebCore::patternReleaseOnMainThreadCallback): Deleted.
* platform/graphics/cg/PatternCG.cpp:
(WebCore::patternReleaseCallback):
(WebCore::patternReleaseOnMainThreadCallback): Deleted.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::invalidateFontCache):
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
* platform/network/BlobResourceHandle.cpp:
(WebCore::doNotifyFinish):
(WebCore::BlobResourceHandle::notifyFinish):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::formFinalize):
(WebCore::formFinishFinalizationOnMainThread): Deleted.

Source/WebKit/mac:

* Storage/WebDatabaseManagerClient.mm:
(DidModifyOriginData::dispatchToMainThread):
(DidModifyOriginData::dispatchDidModifyOriginOnMainThread): Deleted.
* Storage/WebStorageTrackerClient.h:
* Storage/WebStorageTrackerClient.mm:
(WebStorageTrackerClient::dispatchDidModifyOrigin):
(WebStorageTrackerClient::dispatchDidModifyOriginOnMainThread): Deleted.

Source/WebKit2:

* UIProcess/mac/WKPrintingView.mm:
(prepareDataForPrintingOnSecondaryThread):
(-[WKPrintingView knowsPageRange:]):

Source/WTF:

* wtf/text/cf/StringImplCF.cpp:
(WTF::StringWrapperCFAllocator::deallocate):
(WTF::StringWrapperCFAllocator::deallocateOnMainThread): Deleted.

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

6 years agoDFG::NodeOrigin should have a flag determining if exiting is OK right now
fpizlo@apple.com [Fri, 21 Aug 2015 20:48:59 +0000 (20:48 +0000)]
DFG::NodeOrigin should have a flag determining if exiting is OK right now
https://bugs.webkit.org/show_bug.cgi?id=148323

Reviewed by Saam Barati.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::currentNodeOrigin):
(JSC::DFG::ByteCodeParser::branchData):
* dfg/DFGInsertionSet.h:
(JSC::DFG::InsertionSet::insertConstant):
(JSC::DFG::InsertionSet::insertConstantForUse):
(JSC::DFG::InsertionSet::insertBottomConstantForUse):
* dfg/DFGIntegerCheckCombiningPhase.cpp:
(JSC::DFG::IntegerCheckCombiningPhase::handleBlock):
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGNodeOrigin.h:
(JSC::DFG::NodeOrigin::NodeOrigin):
(JSC::DFG::NodeOrigin::isSet):
(JSC::DFG::NodeOrigin::withSemantic):
* dfg/DFGObjectAllocationSinkingPhase.cpp:

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

6 years agoAX: Fix accessibility/mac/search-with-frames.html test
commit-queue@webkit.org [Fri, 21 Aug 2015 20:00:48 +0000 (20:00 +0000)]
AX: Fix accessibility/mac/search-with-frames.html test
https://bugs.webkit.org/show_bug.cgi?id=148313

Patch by Nan Wang <n_wang@apple.com> on 2015-08-21
Reviewed by Chris Fleizach.

uiElementForSearchPredicate function needs five parameters for DumpRenderTree.

* accessibility/mac/search-with-frames.html:
* platform/mac/TestExpectations:

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

6 years agoAX: Table with CSS that makes a row anonymous can return NULL from cellForColumnAndRow
commit-queue@webkit.org [Fri, 21 Aug 2015 19:55:53 +0000 (19:55 +0000)]
AX: Table with CSS that makes a row anonymous can return NULL from cellForColumnAndRow
https://bugs.webkit.org/show_bug.cgi?id=148293

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

When RenderTableRows are anonymous, they may not be added to the accessible data
table's internal row list. However, when calculating the row range for a cell,
we were still accounting for those anonymous sections.
Change how the row range is calculated to directly ask the accessible parent row
for its index. This will ensure it’s more inline with what’s being represented to
the accessibility API.

Source/WebCore:

Test: accessibility/aria-table-content.html

* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentRow):
(WebCore::AccessibilityTableCell::rowIndexRange):
* accessibility/AccessibilityTableCell.h:

LayoutTests:

* accessibility/aria-table-content-expected.txt: Added.
* accessibility/aria-table-content.html: Added.

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

6 years agoWeb Inspector: REGRESSION(173684): Edit as HTML not working
commit-queue@webkit.org [Fri, 21 Aug 2015 19:36:58 +0000 (19:36 +0000)]
Web Inspector: REGRESSION(173684): Edit as HTML not working
https://bugs.webkit.org/show_bug.cgi?id=148268

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-21
Reviewed by Chris Dumez.

Source/WebCore:

Tests: inspector/dom/getOuterHTML.html
       inspector/dom/setOuterHTML.html

* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::innerPatchChildren):
Revert the optimization change made in r173684. The optimization changes
had a few issues. It changed the logic to potentially drop out of the
loop before all new items were processed and using a node reference
to track an index did not account for the modifications insertBefore
may have made to that node's index in the list.

LayoutTests:

* inspector/dom/getOuterHTML-expected.txt: Added.
* inspector/dom/getOuterHTML.html: Added.
* inspector/dom/setOuterHTML-expected.txt: Added.
* inspector/dom/setOuterHTML.html: Added.

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

6 years agoSkip no-llint tests that fail due to running out of executable memory after r188969
utatane.tea@gmail.com [Fri, 21 Aug 2015 19:33:01 +0000 (19:33 +0000)]
Skip no-llint tests that fail due to running out of executable memory after r188969
https://bugs.webkit.org/show_bug.cgi?id=148273

Reviewed by Michael Saboff.

Tools:

* Scripts/run-jsc-stress-tests:

LayoutTests:

r188969 is causing the "no-llint" variation of some tests to fail due to "ran out of executable memory".
These failures are caused because put_by_val and get_by_val aggressively generate the ICs even if the op is executed only once.
The failing tests call eval("contains byVal ops") with the different strings repeatedly under the "no-llint" variation.
In those cases, each eval call creates byId IC for byVal and exhausts executable memory.

We will fix this issue by generating the IC in the second call[1]. In the meantime, we skip these tests.

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

* js/script-tests/dfg-float32array.js:
* js/script-tests/dfg-int16array.js:
* js/script-tests/dfg-int32array-overflow-values.js:
* js/script-tests/dfg-int32array.js:
* js/script-tests/dfg-int8array.js:
* js/script-tests/dfg-uint16array.js:
* js/script-tests/dfg-uint32array-overflow-values.js:
* js/script-tests/dfg-uint32array.js:
* js/script-tests/dfg-uint8array.js:
* js/script-tests/dfg-uint8clampedarray.js:
* js/script-tests/regress-141098.js:

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

6 years agoWeb Inspector: inspector/css/modify-rule-selector.html is flaky on some bots
bburg@apple.com [Fri, 21 Aug 2015 19:25:43 +0000 (19:25 +0000)]
Web Inspector: inspector/css/modify-rule-selector.html is flaky on some bots
https://bugs.webkit.org/show_bug.cgi?id=148321

Unreviewed, enable extra logging to stderr so we can hopefully see
why the test is occasionally timing out with no output to the test page.

* inspector/css/modify-rule-selector.html:

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

6 years agoHistoryItems will null CachedPages should never be left in the list of items;
bdakin@apple.com [Fri, 21 Aug 2015 19:23:09 +0000 (19:23 +0000)]
HistoryItems will null CachedPages should never be left in the list of items;
causes crash
https://bugs.webkit.org/show_bug.cgi?id=148237
-and corresponding-
rdar://problem/22356782

Reviewed by Brady Eidson.

Setting the CachedPage to nullptr will destroy the CachedPage, destroy the
FrameView, re-enter layout, and potentially try to modify items in the PageCache
based on that layout. So, we should not modify CachedPage in this way while the
item is still in the list of HistoryItems.
* history/PageCache.cpp:
(WebCore::PageCache::take):
(WebCore::PageCache::remove):
(WebCore::PageCache::prune):

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

6 years agoDFG callOperations should not implicitly emit an exception check. At callOperation...
saambarati1@gmail.com [Fri, 21 Aug 2015 19:11:36 +0000 (19:11 +0000)]
DFG callOperations should not implicitly emit an exception check. At callOperation call sites, we should explicitly emit exception checks
https://bugs.webkit.org/show_bug.cgi?id=147988

Reviewed by Geoffrey Garen.

This is in preparation for the DFG being able to handle exceptions.
To do this, we need more control over when we emit exception checks.
Specifically, we want to be able to silentFill before emitting an exception check.
This patch does that. This patch also allows us to easily see which
operations do and do not emit exception checks. Finding this information
out before was a pain.

* assembler/AbortReason.h:
* dfg/DFGArrayifySlowPathGenerator.h:
* dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
* dfg/DFGCallCreateDirectArgumentsSlowPathGenerator.h:
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::appendCall):
(JSC::DFG::JITCompiler::exceptionCheck):
* dfg/DFGSaneStringGetByValSlowPathGenerator.h:
* dfg/DFGSlowPathGenerator.h:
(JSC::DFG::CallSlowPathGenerator::CallSlowPathGenerator):
(JSC::DFG::CallSlowPathGenerator::tearDown):
(JSC::DFG::CallResultAndNoArgumentsSlowPathGenerator::CallResultAndNoArgumentsSlowPathGenerator):
(JSC::DFG::CallResultAndOneArgumentSlowPathGenerator::CallResultAndOneArgumentSlowPathGenerator):
(JSC::DFG::CallResultAndTwoArgumentsSlowPathGenerator::CallResultAndTwoArgumentsSlowPathGenerator):
(JSC::DFG::CallResultAndThreeArgumentsSlowPathGenerator::CallResultAndThreeArgumentsSlowPathGenerator):
(JSC::DFG::CallResultAndFourArgumentsSlowPathGenerator::CallResultAndFourArgumentsSlowPathGenerator):
(JSC::DFG::CallResultAndFiveArgumentsSlowPathGenerator::CallResultAndFiveArgumentsSlowPathGenerator):
(JSC::DFG::slowPathCall):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileIn):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileArithRound):
(JSC::DFG::SpeculativeJIT::compileNewFunction):
(JSC::DFG::SpeculativeJIT::compileCreateActivation):
(JSC::DFG::SpeculativeJIT::compileCreateScopedArguments):
(JSC::DFG::SpeculativeJIT::compileCreateClonedArguments):
(JSC::DFG::SpeculativeJIT::compileNotifyWrite):
(JSC::DFG::SpeculativeJIT::compileRegExpExec):
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructorOnCell):
(JSC::DFG::SpeculativeJIT::emitSwitchImm):
(JSC::DFG::SpeculativeJIT::emitSwitchStringOnString):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::callOperationWithCallFrameRollbackOnException):
(JSC::DFG::SpeculativeJIT::prepareForExternalCall):
(JSC::DFG::SpeculativeJIT::appendCall):
(JSC::DFG::SpeculativeJIT::appendCallWithCallFrameRollbackOnException):
(JSC::DFG::SpeculativeJIT::appendCallWithCallFrameRollbackOnExceptionSetResult):
(JSC::DFG::SpeculativeJIT::appendCallSetResult):
(JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck): Deleted.
(JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult): Deleted.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::jitAssertArgumentCountSane):
(JSC::AssemblyHelpers::jitAssertNoException):
(JSC::AssemblyHelpers::callExceptionFuzz):
(JSC::AssemblyHelpers::emitExceptionCheck):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::jitAssertIsInt32):
(JSC::AssemblyHelpers::jitAssertIsJSInt32):
(JSC::AssemblyHelpers::jitAssertIsNull):
(JSC::AssemblyHelpers::jitAssertTagsInPlace):
(JSC::AssemblyHelpers::jitAssertArgumentCountSane):
(JSC::AssemblyHelpers::jitAssertNoException):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* runtime/VM.h:
(JSC::VM::scratchBufferForSize):
(JSC::VM::exceptionFuzzingBuffer):

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

6 years agoREGRESSION (r188714): RELEASE_ASSERT in JSC::Heap::incrementDeferralDepth() opening...
ggaren@apple.com [Fri, 21 Aug 2015 18:39:27 +0000 (18:39 +0000)]
REGRESSION (r188714): RELEASE_ASSERT in JSC::Heap::incrementDeferralDepth() opening Web Inspector on daringfireball.net
https://bugs.webkit.org/show_bug.cgi?id=148312

Reviewed by Mark Lam.

* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions): Use our vm argument instead of
m_vm because sometimes they are different and m_vm is null. (This behavior
is very strange, and we should probably eliminate it -- but we need a
fix for this serious regression right now.)

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

6 years agodispatch_group_t objects may not be retained properly when not backed by Objective...
ddkilzer@apple.com [Fri, 21 Aug 2015 18:37:29 +0000 (18:37 +0000)]
dispatch_group_t objects may not be retained properly when not backed by Objective-C objects under garbage collection
<http://webkit.org/b/148229>

Reviewed by Eric Carlson.

When compiled with garbage collection enabled, libdispatch
objects are not backed by Objective-C objects, so they don't get
the benefit of automatic reference counting when captured by a
block or a lambda.  To address this, we use OSObjectPtr<> which
always increments the reference count of the contained object.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):
Switch to use OSObjectPtr<>.

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

6 years agoWeb Inspector: clean up uses of `new` with zero-argument constructors and factory...
bburg@apple.com [Fri, 21 Aug 2015 18:27:01 +0000 (18:27 +0000)]
Web Inspector: clean up uses of `new` with zero-argument constructors and factory methods
https://bugs.webkit.org/show_bug.cgi?id=148311

Reviewed by Timothy Hatcher.

* UserInterface/Protocol/InspectorFrontendHostStub.js:
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView):
* UserInterface/Views/ColorPicker.js:
(WebInspector.ColorPicker):
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject): This was causing a console assertion
when a breakpoint tree element was selected and the inspector tried to restore the view state
after a reload or back/forward navigation.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):

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

6 years ago[Mac] accessibility/selection-states.html fails
commit-queue@webkit.org [Fri, 21 Aug 2015 18:26:23 +0000 (18:26 +0000)]
[Mac] accessibility/selection-states.html fails
https://bugs.webkit.org/show_bug.cgi?id=116637

Patch by Nan Wang <n_wang@apple.com> on 2015-08-21
Reviewed by Chris Fleizach.

Source/WebCore:

Added accessibilityAttributeValue callback for isMultiSelectable attribute.

Updated expectation for accessibility/selection-states.html on mac.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

Implemented isSelectable() and isMultiSelectable().

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::isSelectable):
(AccessibilityUIElement::isMultiSelectable):
(AccessibilityUIElement::isSelectedOptionActive):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isSelectable):
(WTR::AccessibilityUIElement::isMultiSelectable):
(WTR::AccessibilityUIElement::isVisible):

LayoutTests:

* platform/mac/TestExpectations:

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

6 years agoFix iteration over repositories on bot watcher's dashboard.
ap@apple.com [Fri, 21 Aug 2015 18:10:17 +0000 (18:10 +0000)]
Fix iteration over repositories on bot watcher's dashboard.

Patch by Jason Marcell <jmarcell@apple.com> on 2015-08-21
Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._presentPopoverForPendingCommits): Don't reuse the same index variable.

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

6 years agoFixed status features JSON formatting.
jond@apple.com [Fri, 21 Aug 2015 17:10:36 +0000 (17:10 +0000)]
Fixed status features JSON formatting.

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

6 years agoWeb Inspector: add a regression test for the fix introduced in r188679
bburg@apple.com [Fri, 21 Aug 2015 17:05:59 +0000 (17:05 +0000)]
Web Inspector: add a regression test for the fix introduced in r188679
https://bugs.webkit.org/show_bug.cgi?id=148223

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Turns out that we were possibly leaking a single DOMTree on reload.
Always clear the main frame's DOMTree as well as those of sub-frames.

* UserInterface/Base/Object.js: Add back single-fire listeners.
(WebInspector.Object.singleFireEventListener.let.wrappedCallback):
(WebInspector.Object.singleFireEventListener):
(WebInspector.Object.retainedObjectsWithPrototype):
(WebInspector.Object.prototype.singleFireEventListener):
(WebInspector.Object.prototype.retainedObjectsWithPrototype):
* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.removeAllChildFrames): Clear own tree too.

LayoutTests:

Add a regression test to check the number of DOMTree instances that
listen to DOMTreeManager.

* TestExpectations: Don't skip the inspector/dom/ directory.
* http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation-expected.txt: Added.
* http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html: Added.
* http/tests/inspector/dom/resources/nested-frame-1-deep.html: Added.
* http/tests/inspector/dom/resources/nested-frame-2-deep.html: Added.
* http/tests/inspector/dom/resources/nested-frame-base.html: Added.

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

6 years agoRegression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire...
cdumez@apple.com [Fri, 21 Aug 2015 16:18:52 +0000 (16:18 +0000)]
Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=148205

Reviewed by Antti Koivisto.

Source/WebKit2:

After r188640, successful revalidation of resources in the memory cache
would cause us to drop the corresponding resource in the disk cache.
This patch addresses the issue by not removing the cache entry if the
response is a successful revalidation (i.e. status code == 304).

Longer term, we should probably update the entry in the disk cache (if
it exists) when it is revalidated by the memory cache. Currently,
revalidation by the memory cache bypasses the disk cache and goes
straight to the network. Then, when the response comes back as a 304,
we try and store the response in the cache. However, a 304 status code
is not cacheable so the cache rejects it.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):

LayoutTests:

* http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
Drop temporary fix landed in r188698 to make the test less flaky.

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

6 years agoHave more getElementsBy*() methods return a Ref<>
cdumez@apple.com [Fri, 21 Aug 2015 16:05:20 +0000 (16:05 +0000)]
Have more getElementsBy*() methods return a Ref<>
https://bugs.webkit.org/show_bug.cgi?id=148287

Reviewed by Sam Weinig.

Have more getElementsBy*() methods return a Ref<> instaed of a RefPtr<>
as they cannot return null.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByTagNameNS):
(WebCore::ContainerNode::getElementsByName):
(WebCore::ContainerNode::getElementsByClassName):
(WebCore::ContainerNode::getElementsByClassNameForObjC):
(WebCore::ContainerNode::radioNodeList):
* dom/ContainerNode.h:

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

6 years agoDrop NodeListBase class
cdumez@apple.com [Fri, 21 Aug 2015 08:28:07 +0000 (08:28 +0000)]
Drop NodeListBase class
https://bugs.webkit.org/show_bug.cgi?id=148290

Reviewed by Ryosuke Niwa.

Drop NodeListBase class and have HTMLCollection subclass NodeList
directly. There is no reason we need another base class.

* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorObjC.pm:
(GetImplClassName): Deleted.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByClassNameForObjC):
* dom/ContainerNode.h:
* dom/NodeList.h:
* dom/NodeListBase.h: Removed.
* html/HTMLCollection.h:

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

6 years ago[ES6] prototyping module loader in JSC shell
utatane.tea@gmail.com [Fri, 21 Aug 2015 04:59:59 +0000 (04:59 +0000)]
[ES6] prototyping module loader in JSC shell
https://bugs.webkit.org/show_bug.cgi?id=147876

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch implements ES6 Module Loader part. The implementation is based on
the latest draft[1, 2]. The naive implementation poses several problems.
This patch attempts to solve the spec issues and proposes the fix[3, 4, 5].

We construct the JSC internal module loader based on the ES6 Promises.
The chain of the promises represents the dependency graph of the modules and
it automatically enables asynchronous module fetching.
To leverage the Promises internally, we use the InternalPromise landed in r188681.

The loader has several platform-dependent hooks. The platform can implement
these hooks to provide the functionality missing in the module loaders, like
"how to fetch the resources". The method table of the JSGlobalObject is extended
to accept these hooks from the platform.

This patch focus on the loading part. So we don't create the module environment
and don't link the modules yet.

To test the current module progress easily, we add the `-m` option to the JSC shell.
When this option is specified, we load the given script as the module. And to use
the module loading inside the JSC shell, we added the simple loader hook for fetching.
It fetches the module content from the file system.

And to use the ES6 Map in the Loader implementation, we added @get and @set methods to the Map.
But it conflicts with the existing `getPrivateName` method. Rename it to `lookUpPrivateName`.

[1]: https://whatwg.github.io/loader/
[2]: https://github.com/whatwg/loader/commit/214c7a6625b445bdf411c39984f36f01139a24be
[3]: https://github.com/whatwg/loader/pull/66
[4]: https://github.com/whatwg/loader/pull/67
[5]: https://github.com/whatwg/loader/issues/68
[6]: https://bugs.webkit.org/show_bug.cgi?id=148136

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/BuiltinNames.h:
(JSC::BuiltinNames::lookUpPrivateName):
(JSC::BuiltinNames::lookUpPublicName):
(JSC::BuiltinNames::getPrivateName): Deleted.
(JSC::BuiltinNames::getPublicName): Deleted.
* builtins/ModuleLoaderObject.js: Added.
(setStateToMax):
(newRegistryEntry):
(forceFulfillPromise):
(fulfillFetch):
(fulfillTranslate):
(fulfillInstantiate):
(instantiation):
(requestFetch):
(requestTranslate):
(requestInstantiate):
(requestResolveDependencies.resolveDependenciesPromise.this.requestInstantiate.then.):
(requestResolveDependencies.resolveDependenciesPromise.this.requestInstantiate.then):
(requestResolveDependencies):
(requestInstantiateAll):
(provide):
* jsc.cpp:
(stringFromUTF):
(jscSource):
(GlobalObject::moduleLoaderFetch):
(functionCheckModuleSyntax):
(dumpException):
(runWithScripts):
(printUsageStatement):
(CommandLine::parseArguments):
(jscmain):
(CommandLine::CommandLine): Deleted.
* parser/Lexer.cpp:
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
* parser/ModuleAnalyzer.cpp:
(JSC::ModuleAnalyzer::ModuleAnalyzer):
(JSC::ModuleAnalyzer::exportVariable):
(JSC::ModuleAnalyzer::analyze):
* parser/ModuleAnalyzer.h:
(JSC::ModuleAnalyzer::moduleRecord):
* parser/ModuleRecord.cpp:
(JSC::printableName): Deleted.
(JSC::ModuleRecord::dump): Deleted.
* parser/ModuleRecord.h:
(JSC::ModuleRecord::ImportEntry::isNamespace): Deleted.
(JSC::ModuleRecord::create): Deleted.
(JSC::ModuleRecord::appendRequestedModule): Deleted.
(JSC::ModuleRecord::addImportEntry): Deleted.
(JSC::ModuleRecord::addExportEntry): Deleted.
(JSC::ModuleRecord::addStarExportEntry): Deleted.
* parser/Nodes.h:
* parser/NodesAnalyzeModule.cpp:
(JSC::ImportDeclarationNode::analyzeModule):
(JSC::ExportAllDeclarationNode::analyzeModule):
(JSC::ExportNamedDeclarationNode::analyzeModule):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::lookUpPrivateName):
(JSC::CommonIdentifiers::lookUpPublicName):
(JSC::CommonIdentifiers::getPrivateName): Deleted.
(JSC::CommonIdentifiers::getPublicName): Deleted.
* runtime/CommonIdentifiers.h:
* runtime/Completion.cpp:
(JSC::checkModuleSyntax):
(JSC::evaluateModule):
* runtime/Completion.h:
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
* runtime/Identifier.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::moduleLoader):
(JSC::JSGlobalObject::moduleRecordStructure):
* runtime/JSModuleRecord.cpp: Renamed from Source/JavaScriptCore/parser/ModuleRecord.cpp.
(JSC::JSModuleRecord::destroy):
(JSC::JSModuleRecord::finishCreation):
(JSC::printableName):
(JSC::JSModuleRecord::dump):
* runtime/JSModuleRecord.h: Renamed from Source/JavaScriptCore/parser/ModuleRecord.h.
(JSC::JSModuleRecord::ImportEntry::isNamespace):
(JSC::JSModuleRecord::createStructure):
(JSC::JSModuleRecord::create):
(JSC::JSModuleRecord::requestedModules):
(JSC::JSModuleRecord::JSModuleRecord):
(JSC::JSModuleRecord::appendRequestedModule):
(JSC::JSModuleRecord::addImportEntry):
(JSC::JSModuleRecord::addExportEntry):
(JSC::JSModuleRecord::addStarExportEntry):
* runtime/MapPrototype.cpp:
(JSC::MapPrototype::finishCreation):
* runtime/ModuleLoaderObject.cpp: Added.
(JSC::ModuleLoaderObject::ModuleLoaderObject):
(JSC::ModuleLoaderObject::finishCreation):
(JSC::ModuleLoaderObject::getOwnPropertySlot):
(JSC::printableModuleKey):
(JSC::ModuleLoaderObject::provide):
(JSC::ModuleLoaderObject::requestInstantiateAll):
(JSC::ModuleLoaderObject::resolve):
(JSC::ModuleLoaderObject::fetch):
(JSC::ModuleLoaderObject::translate):
(JSC::ModuleLoaderObject::instantiate):
(JSC::moduleLoaderObjectParseModule):
(JSC::moduleLoaderObjectRequestedModules):
(JSC::moduleLoaderObjectResolve):
(JSC::moduleLoaderObjectFetch):
(JSC::moduleLoaderObjectTranslate):
(JSC::moduleLoaderObjectInstantiate):
* runtime/ModuleLoaderObject.h: Added.
(JSC::ModuleLoaderObject::create):
(JSC::ModuleLoaderObject::createStructure):
* runtime/Options.h:

Source/WebCore:

Just fill Loader hooks with nullptr.

* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSWorkerGlobalScopeBase.cpp:

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

6 years ago[EFL] Revise PlatformWebView ctor according to r188718
gyuyoung.kim@webkit.org [Fri, 21 Aug 2015 04:30:47 +0000 (04:30 +0000)]
[EFL] Revise PlatformWebView ctor according to r188718
https://bugs.webkit.org/show_bug.cgi?id=148282

Source/WebKit2:

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-08-20
Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake:

Tools:

This patch change PlatformWebView ctor's argument to use WKPageConfigurationRef
instead of WKContextRef and WKPageGroupRef respectively.

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-08-20
Reviewed by Gyuyoung Kim.

* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::PlatformWebView):

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

6 years agoWeb Inspector: Better Remember open tab types and order if using JSContext inspector
commit-queue@webkit.org [Fri, 21 Aug 2015 04:22:32 +0000 (04:22 +0000)]
Web Inspector: Better Remember open tab types and order if using JSContext inspector
https://bugs.webkit.org/show_bug.cgi?id=148285

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

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector.activateExtraDomains):
Save and restore extra domain related tabs at the expected saved index.

(WebInspector._rememberOpenTabs):
Keep unsupported tab types in the setting so when they are supported they open.

* UserInterface/Base/Utilities.js:
Add a helper for inserting a single object into an array.

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

6 years agoWeb Inspector: inline errors/warnings are taller than the line height
nvasilyev@apple.com [Fri, 21 Aug 2015 04:19:53 +0000 (04:19 +0000)]
Web Inspector: inline errors/warnings are taller than the line height
https://bugs.webkit.org/show_bug.cgi?id=148232

Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.css:
(.source-code.text-editor > .CodeMirror .issue-widget.inline):
(.source-code.text-editor > .CodeMirror .issue-widget.inline > .text):

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

6 years agoJSContext Inspector: Uncaught Exception opening Search Tab
commit-queue@webkit.org [Fri, 21 Aug 2015 04:18:43 +0000 (04:18 +0000)]
JSContext Inspector: Uncaught Exception opening Search Tab
https://bugs.webkit.org/show_bug.cgi?id=148284

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

* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel):
This is copied / pasted code that shouldn't apply to the Search tab.
We want to show results under Resources in the Search tab.

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