WebKit-https.git
5 years agoCheck in LLVM 3.6.2 binary drops for El Capitan
fpizlo@apple.com [Mon, 3 Aug 2015 21:53:31 +0000 (21:53 +0000)]
Check in LLVM 3.6.2 binary drops for El Capitan
https://bugs.webkit.org/show_bug.cgi?id=147582

Reviewed by Alexey Proskuryakov.

Tools:

Recognize 10.11 and use the right drops.

* Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:

Check in drops built from the LLVM 3.6.2 open source release.

These drops were built by doing:

1) Check out WebKit to a directory like /some/path/OpenSource.

2) Unpack LLVM 3.6.2 into /some/path/OpenSource/llvm. I got LLVM 3.6.2 from:

http://llvm.org/releases/3.6.2/llvm-3.6.2.src.tar.xz

3) While in /some/path/OpenSource, run Tools/Scripts/build-jsc --release. Make sure it's a
totally clean build (i.e. delete WebKitBuild before starting).

4) Run the following to create binary drops:

Tools/Scripts/export-llvm-build -i WebKitLibraries/LLVMIncludesElCapitan.tar.bz2 -l WebKitLibraries/LLVMLibrariesElCapitan.tar.bz2 -b llvm/wkLLVMBuild -B llvm/wkLLVMBuild/Release+Asserts -s llvm

* LLVMIncludesElCapitan.tar.bz2: Added.
* LLVMLibrariesElCapitan.tar.bz2: Added.

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

5 years agoRemove Windows XP test results
simon.fraser@apple.com [Mon, 3 Aug 2015 21:37:36 +0000 (21:37 +0000)]
Remove Windows XP test results
https://bugs.webkit.org/show_bug.cgi?id=147592

Reviewed by Brent Fulgham.

We no longer need to maintain Windows XP test results.

* platform/win-xp/TestExpectations: Removed.
* platform/win-xp/*: Removed.

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

5 years agoMake sure error handling code APIUserContentExtensionStore closes open file descriptors
cdumez@apple.com [Mon, 3 Aug 2015 21:30:38 +0000 (21:30 +0000)]
Make sure error handling code APIUserContentExtensionStore closes open file descriptors
https://bugs.webkit.org/show_bug.cgi?id=147562

Reviewed by Alex Christensen.

Make sure error handling code APIUserContentExtensionStore closes open
file descriptors to avoid leaking them.

* NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::adoptAndMapFile):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile):

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

5 years agoNeed WKWebView API to enable/disable link preview
bdakin@apple.com [Mon, 3 Aug 2015 21:27:19 +0000 (21:27 +0000)]
Need WKWebView API to enable/disable link preview
https://bugs.webkit.org/show_bug.cgi?id=147573
-and corresponding-
rdar://problem/22077836

Reviewed by Dan Bernstein.

WKView implementation.
* UIProcess/API/Cocoa/WKViewPrivate.h:

New API. Call into WKView to handle Mac.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView allowsLinkPreview]):
(-[WKWebView setAllowsLinkPreview:]):

Remove the SPI declaration from WKWebViewPrivate in order to make this API.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Handle the Mac side.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView allowsBackForwardNavigationGestures]):
(-[WKView allowsLinkPreview]):
(-[WKView setAllowsLinkPreview:]):

Don’t register previews when link preview is prevented.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreview]):

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

5 years agoJavascriptCore Crash in JSC::ASTBuilder::Property JSC::Parser<JSC::Lexer<unsigned...
utatane.tea@gmail.com [Mon, 3 Aug 2015 21:26:07 +0000 (21:26 +0000)]
JavascriptCore Crash in JSC::ASTBuilder::Property JSC::Parser<JSC::Lexer<unsigned char> >::parseProperty<JSC::ASTBuilder>(JSC::ASTBuilder&, bool)
https://bugs.webkit.org/show_bug.cgi?id=147538

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Due to the order of the ARROWFUNCTION token in JSTokenType enum, it is categorized as the one of the Keyword.
As a result, when lexing the property name that can take the keywords, the ARROWFUNCTION token is accidentally accepted.
This patch changes the order of the ARROWFUNCTION token in JSTokenType to make it the operator token.

* parser/ParserTokens.h:
* tests/stress/arrow-function-token-is-not-keyword.js: Added.
(testSyntaxError):

LayoutTests:

Update the test expectation file because '=>' is a token, not a keywowrd.

* js/arrowfunction-syntax-errors-expected.txt:

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

5 years agoInline video controls overlap each other while playing video in slideover mode
dino@apple.com [Mon, 3 Aug 2015 21:05:23 +0000 (21:05 +0000)]
Inline video controls overlap each other while playing video in slideover mode
https://bugs.webkit.org/show_bug.cgi?id=147535
<rdar://problem/22026864>

Reviewed by Eric Carlson.

Now that the resizing code is in the shared controller, we need to
make sure to hide the timeline scrubber in iOS when the controls
get too small. This involved adding the dropped class to the timeline,
and rules for hiding to the CSS.

Meanwhile, when the page scale factor is less than one, we use the CSS zoom property
and don't need to factor in the page scale factor when calculating
the size.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateLayoutForDisplayedWidth): Don't use pageScaleFactor.
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-panel .dropped): Add display none for this rule.

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

5 years agoClean up the naming for AST expression generation.
commit-queue@webkit.org [Mon, 3 Aug 2015 20:47:54 +0000 (20:47 +0000)]
Clean up the naming for AST expression generation.
https://bugs.webkit.org/show_bug.cgi?id=147581

Patch by Keith Miller <keith_miller@apple.com> on 2015-08-03
Reviewed by Yusuke Suzuki.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createThisExpr):
(JSC::ASTBuilder::createSuperExpr):
(JSC::ASTBuilder::createNewTargetExpr):
(JSC::ASTBuilder::thisExpr): Deleted.
(JSC::ASTBuilder::superExpr): Deleted.
(JSC::ASTBuilder::newTargetExpr): Deleted.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createThisExpr):
(JSC::SyntaxChecker::createSuperExpr):
(JSC::SyntaxChecker::createNewTargetExpr):
(JSC::SyntaxChecker::thisExpr): Deleted.
(JSC::SyntaxChecker::superExpr): Deleted.
(JSC::SyntaxChecker::newTargetExpr): Deleted.

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

5 years agoSafari is failing to remove SQLite Databases via Remove All Website Data
andersca@apple.com [Mon, 3 Aug 2015 20:40:38 +0000 (20:40 +0000)]
Safari is failing to remove SQLite Databases via Remove All Website Data
https://bugs.webkit.org/show_bug.cgi?id=147584
rdar://problem/22095006

Reviewed by Brady Eidson.

If we end up deleting every single database for an origin, make sure to also delete the origin.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):

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

5 years agoMove "starting from root" frame flattening logging to the correct place.
zalan@apple.com [Mon, 3 Aug 2015 20:29:55 +0000 (20:29 +0000)]
Move "starting from root" frame flattening logging to the correct place.
https://bugs.webkit.org/show_bug.cgi?id=147571

Reviewed by Simon Fraser.

* page/FrameView.cpp:
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
(WebCore::FrameView::layout): Deleted.

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

5 years ago[iOS] Link previews sometimes don't hide the link highlight
timothy_horton@apple.com [Mon, 3 Aug 2015 20:23:36 +0000 (20:23 +0000)]
[iOS] Link previews sometimes don't hide the link highlight
https://bugs.webkit.org/show_bug.cgi?id=147585
<rdar://problem/22119648>

Reviewed by Beth Dakin.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionStartedFromPreviewItemController:]):
(-[WKContentView _interactionStoppedFromPreviewItemController:]):
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
(-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]): Deleted.
Use interactionStarted/Stopped, which are always called, instead of didDismiss/willPresent,
which are only called if we return a custom view controller from _presentedViewControllerForPreviewItemController.
We continue using didDismiss to inform clients of dismissal because they'll
only care if they customized the view controller.

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

5 years ago[WK2][NetworkCache] Do not munmap() on the main thread
cdumez@apple.com [Mon, 3 Aug 2015 19:35:55 +0000 (19:35 +0000)]
[WK2][NetworkCache] Do not munmap() on the main thread
https://bugs.webkit.org/show_bug.cgi?id=147569

Reviewed by Geoffrey Garen.

Do not munmap() on the main thread for performance reasons and
consistency as we already make sure to mmap() on another thread.

* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::adoptMap):

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

5 years agoAdding a test for:
beidson@apple.com [Mon, 3 Aug 2015 19:35:38 +0000 (19:35 +0000)]
Adding a test for:
Crash when signing into twitter calling WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&).
<rdar://problem/22098457> and https://bugs.webkit.org/show_bug.cgi?id=147560

Reviewed by Alexey Proskuryakov.

* http/tests/appcache/identifier-test-expected.txt: Added.
* http/tests/appcache/identifier-test.html: Added.
* http/tests/appcache/resources/identifier-test-real.php: Added.
* http/tests/appcache/resources/identifier-test.manifest: Added.
* http/tests/appcache/resources/identifier-test.php: Added.

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

5 years agoInputs with the autofocus attribute cause the keyboard to not deploy
wenson_hsieh@apple.com [Mon, 3 Aug 2015 19:29:47 +0000 (19:29 +0000)]
Inputs with the autofocus attribute cause the keyboard to not deploy
https://bugs.webkit.org/show_bug.cgi?id=147555
<rdar://problem/22018044>

Reviewed by Andreas Kling.

Upon submitting a form by pressing "Go" on the keyboard, an <input> on the next page with the
autofocus attribute may become non-interactible. When attempting to tap on the input, nothing
seems to happen. This is because the state of WebPage upon invoking WebPage::elementDidFocus
indicates (incorrectly) that the input element is already focused, and therefore hits an early
return. To solve this, we explicitly reset m_hasFocusedDueToUserInteraction upon transitioning
to a new page.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didStartPageTransition): On iOS, resets m_hasFocusedDueToUserInteraction as
    well. It was previously thought that this would be handled by blur() called on the assisted
    element when submitting a form. However, pressing "Go" on the iOS keyboard is an implicit
    submission and does not trigger a blur event.

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

5 years agoDon't set up the callsite to operationGetByValDefault when the optimization is alread...
utatane.tea@gmail.com [Mon, 3 Aug 2015 19:25:03 +0000 (19:25 +0000)]
Don't set up the callsite to operationGetByValDefault when the optimization is already done
https://bugs.webkit.org/show_bug.cgi?id=147577

Reviewed by Filip Pizlo.

operationGetByValDefault should be called only when the IC is not set.
operationGetByValString breaks this invariant and `ASSERT(!byValInfo.stubRoutine)` in
operationGetByValDefault raises the assertion failure.
In this patch, we change the callsite setting up code in operationGetByValString when
the IC is already set. And to make the operation's meaning explicitly, we changed the
name operationGetByValDefault to operationGetByValOptimize, that is aligned to the
GetById case.

* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitSlow_op_get_by_val):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitSlow_op_get_by_val):
* tests/stress/operation-get-by-val-default-should-not-called-for-already-optimized-site.js: Added.
(hello):

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

5 years agoFix error handling case in Cache::dumpContentsToFile()
cdumez@apple.com [Mon, 3 Aug 2015 19:20:27 +0000 (19:20 +0000)]
Fix error handling case in Cache::dumpContentsToFile()
https://bugs.webkit.org/show_bug.cgi?id=147567

Reviewed by Andreas Kling.

Cache::dumpContentsToFile() was expecting openFile() to return 0 in case
of error. However, it returns invalidPlatformFileHandle, which is -1 on
Unix.

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

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

5 years agoUnreviewed, rolling out r187729.
mmaxfield@apple.com [Mon, 3 Aug 2015 18:47:05 +0000 (18:47 +0000)]
Unreviewed, rolling out r187729.
https://bugs.webkit.org/show_bug.cgi?id=147575

10% performance hit (Requested by litherum on #webkit).

Reverted changeset:

"[OS X] Font fallback is not language-sensitive"
https://bugs.webkit.org/show_bug.cgi?id=147390
http://trac.webkit.org/changeset/187729

Patch by Commit Queue <commit-queue@webkit.org> on 2015-08-03

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

5 years agoMake sure WebMemorySampler doesn't leak file descriptor
cdumez@apple.com [Mon, 3 Aug 2015 18:45:01 +0000 (18:45 +0000)]
Make sure WebMemorySampler doesn't leak file descriptor
https://bugs.webkit.org/show_bug.cgi?id=147564

Reviewed by Anders Carlsson.

WebMemorySampler was opening files but never closing them.

* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::stop):
* Shared/WebMemorySampler.h:

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

5 years agoChildWidgetState::ChildWidgetIs* naming is redundant.
zalan@apple.com [Mon, 3 Aug 2015 18:24:48 +0000 (18:24 +0000)]
ChildWidgetState::ChildWidgetIs* naming is redundant.
https://bugs.webkit.org/show_bug.cgi?id=147565

Reviewed by Simon Fraser.

Since strongly typed enum requires to write out 'ChildWidgetState::ChildWidgetIsDestroyed',
the enumerator list names can be shortened.

No change in behaviour.

* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::peformLayoutWithFlattening):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::updateWidgetPosition):
* rendering/RenderWidget.h:

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

5 years agoMake it possible to use String::utf8() in the debugger
andersca@apple.com [Mon, 3 Aug 2015 17:59:31 +0000 (17:59 +0000)]
Make it possible to use String::utf8() in the debugger
https://bugs.webkit.org/show_bug.cgi?id=147566

Reviewed by Tim Horton.

Add a new utf8() overload that doesn't take any parameters and just calls utf8(LenientConversion), since lldb doesn't support evaluating
function calls with default parameters at the moment.

* wtf/text/WTFString.cpp:
(WTF::String::utf8):
* wtf/text/WTFString.h:

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

5 years ago[FTL] Remove unused scripts related to native call inlining
ossy@webkit.org [Mon, 3 Aug 2015 17:28:01 +0000 (17:28 +0000)]
[FTL] Remove unused scripts related to native call inlining
https://bugs.webkit.org/show_bug.cgi?id=147448

Reviewed by Filip Pizlo.

* build-symbol-table-index.py: Removed.
* copy-llvm-ir-to-derived-sources.sh: Removed.
* create-llvm-ir-from-source-file.py: Removed.
* create-symbol-table-index.py: Removed.

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

5 years agoPass ControlStates& to RenderTheme methods instead of ControlStates*
zalan@apple.com [Mon, 3 Aug 2015 17:14:52 +0000 (17:14 +0000)]
Pass ControlStates& to RenderTheme methods instead of ControlStates*
https://bugs.webkit.org/show_bug.cgi?id=147521

Reviewed by Andreas Kling.

No change in functionality.

* platform/Theme.h:
(WebCore::Theme::selectionColor):
(WebCore::Theme::paint):
(WebCore::Theme::inflateControlPaintRect):
* platform/mac/ThemeMac.h:
* platform/mac/ThemeMac.mm:
(WebCore::updateStates):
(WebCore::convertControlStatesToThemeDrawState):
(WebCore::configureToggleButton):
(WebCore::sharedRadioCell):
(WebCore::sharedCheckboxCell):
(WebCore::paintToggleButton):
(WebCore::setUpButtonCell):
(WebCore::button):
(WebCore::paintButton):
(WebCore::paintStepper):
(WebCore::ThemeMac::ensuredView):
(WebCore::ThemeMac::inflateControlPaintRect):
(WebCore::ThemeMac::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::adjustRepaintRect):
(WebCore::RenderTheme::updateControlStatesForRenderer):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::documentViewFor):

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

5 years agoCrash when signing into twitter calling WebCore::DocumentLoader::responseReceived...
beidson@apple.com [Mon, 3 Aug 2015 17:06:38 +0000 (17:06 +0000)]
Crash when signing into twitter calling WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&).
<rdar://problem/22098457> and https://bugs.webkit.org/show_bug.cgi?id=147560

Reviewed by Alexey Proskuryakov.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest): Only grab identifierForLoadWithoutResourceLoader() if there's no ResourceLoader.

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

5 years agothemePainted in RenderBox::paintBoxDecorations() is confusing.
zalan@apple.com [Mon, 3 Aug 2015 16:06:45 +0000 (16:06 +0000)]
themePainted in RenderBox::paintBoxDecorations() is confusing.
https://bugs.webkit.org/show_bug.cgi?id=147492

Reviewed by Andreas Kling.

What themePainted is supposed to indicate is whether the theme requires additional border and background painting.
Rename it to borderOrBackgroundPaintingIsNeeded.

No change in behaviour.

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

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

5 years ago[Win] Build fix after r187733.
achristensen@apple.com [Mon, 3 Aug 2015 15:55:08 +0000 (15:55 +0000)]
[Win] Build fix after r187733.

* WinLauncher/PageLoadTestClient.cpp:
(PageLoadTestClient::dumpRunStatistics):
wtf/MathExtras.h is now included in HashTable.h, which #defines pow to wtf_pow.

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

5 years ago[EFL] http/tests/media/media-stream/disconnected-frame-already.html is crashing after...
youenn.fablet@crf.canon.fr [Mon, 3 Aug 2015 15:38:32 +0000 (15:38 +0000)]
[EFL] http/tests/media/media-stream/disconnected-frame-already.html is crashing after r185903
https://bugs.webkit.org/show_bug.cgi?id=146834

Reviewed by Eric Carlson.

r185903 went to far in removing some tests, in particular whether the current process is related to a frame.
Readded that check.
Refactored the code to remove the need for NavigatorUserMedia class.

Covered by existing tests.

* CMakeLists.txt: Removed NavigatorUserMedia.cpp.
* Modules/mediastream/NavigatorUserMedia.cpp: Removed.
* Modules/mediastream/NavigatorUserMedia.h: Removed.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSNavigatorCustom.cpp:
(WebCore::JSNavigator::webkitGetUserMedia): Inlined NavigatorUserMeia::webkitGetUserMedia.

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

5 years agoJSXMLHttpRequest::visitAdditionalChildren does not need to explicitly mark m_response
youenn.fablet@crf.canon.fr [Mon, 3 Aug 2015 12:48:52 +0000 (12:48 +0000)]
JSXMLHttpRequest::visitAdditionalChildren does not need to explicitly mark m_response
https://bugs.webkit.org/show_bug.cgi?id=147488

Reviewed by Andreas Kling.

Covered by existing tests.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitAdditionalChildren): Removed m_response marking.

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

5 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.9.5 release.
carlosgc@webkit.org [Mon, 3 Aug 2015 08:34:31 +0000 (08:34 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.5 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.9.5.

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

5 years agoInvestigate HashTable::HashTable(const HashTable&) and HashTable::operator=(const...
benjamin@webkit.org [Mon, 3 Aug 2015 04:33:15 +0000 (04:33 +0000)]
Investigate HashTable::HashTable(const HashTable&) and HashTable::operator=(const HashTable&) performance for hash-based static analyses
https://bugs.webkit.org/show_bug.cgi?id=118455

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-08-02
Reviewed by Filip Pizlo.

Source/JavaScriptCore:

LivenessAnalysisPhase lights up like a christmas tree in profiles.

This patch cuts its cost by 4.
About half of the gains come from removing many rehash() when copying
the HashSet.
The last quarter is achieved by having a special add() function for initializing
a HashSet.

This makes benchmarks progress by 1-2% here and there. Nothing massive.

* dfg/DFGLivenessAnalysisPhase.cpp:
(JSC::DFG::LivenessAnalysisPhase::process):
The m_live HashSet is only useful per block. When we are done with it,
we can transfer it to liveAtHead to avoid a copy.

Source/WTF:

Previously, when copying a HashTable, we would start from scratch
with an empty table and insert elements one by one, growing-rehashing
the table as needed.

With this patch, we have 2 improvements to remove most of the cost.

First, we compute a good size from the start. This removes all the
reallocations and rehashs.
This is where the biggest gain comes from.

The second part is a simpler version of add() when we know that
we cannot find a bucket with the same key and there cannot
be any deleted bucket.
This removes most branches from the hot loop, cutting another 25%
of the time.

* wtf/HashTable.h:
(WTF::KeyTraits>::addUniqueForInitialization):
(WTF::KeyTraits>::HashTable):

Tools:

* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):

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

5 years agoWeb Inspector: Unnamespaced Formatter classes break CSSStyleDeclarationTextEditor
mattbaker@apple.com [Mon, 3 Aug 2015 01:44:05 +0000 (01:44 +0000)]
Web Inspector: Unnamespaced Formatter classes break CSSStyleDeclarationTextEditor
https://bugs.webkit.org/show_bug.cgi?id=147544

Reviewed by Brian Burg.

Added Formatter and FormatterContentBuilder to WebInspector namespace.

* UserInterface/Controllers/Formatter.js:
* UserInterface/Controllers/FormatterContentBuilder.js:
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.prettyPrint.prettyPrintAndUpdateEditor):
(WebInspector.TextEditor.prototype.prettyPrint):

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

5 years agoAX: On some complex sites, iOS instantly crashes once VoiceOver is turned on
cfleizach@apple.com [Sun, 2 Aug 2015 19:28:55 +0000 (19:28 +0000)]
AX: On some complex sites, iOS instantly crashes once VoiceOver is turned on
https://bugs.webkit.org/show_bug.cgi?id=147529

Reviewed by Dan Bernstein.

Sometimes after focusing on a node, it seems like the entire document is destroyed.
Accessibility the axObjectCache returns nullptr and we crash.

Despite my best efforts, I couldn't make a layout test that reproduced this. It's possible
the entire document needs to be destroyed and replaced with something.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setFocused):

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

5 years agoWeb Inspector: REGRESSION (r187689): Timeline overview graph layout is broken
mattbaker@apple.com [Sun, 2 Aug 2015 18:48:01 +0000 (18:48 +0000)]
Web Inspector: REGRESSION (r187689): Timeline overview graph layout is broken
https://bugs.webkit.org/show_bug.cgi?id=147539

Reviewed by Brian Burg.

Removed timeline argument being passed to TimelineOverviewGraph constructor.

* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph):
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph):
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph):
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph):

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

5 years ago[OS X] Font fallback is not language-sensitive
mmaxfield@apple.com [Sun, 2 Aug 2015 00:48:48 +0000 (00:48 +0000)]
[OS X] Font fallback is not language-sensitive
https://bugs.webkit.org/show_bug.cgi?id=147390

Reviewed by Dean Jackson.

Source/WebCore:

We need to make our font fallback code sensitive to locale.

Test: fast/text/fallback-language-han.html

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

LayoutTests:

Updating tests.

* css3/line-break/line-break-auto-centered-expected.html:
* css3/line-break/line-break-auto-centered.html:
* css3/line-break/line-break-auto-postfixes-expected.html:
* css3/line-break/line-break-auto-postfixes.html:
* css3/line-break/line-break-loose-centered-expected.html:
* css3/line-break/line-break-loose-centered.html:
* css3/line-break/line-break-loose-hyphens-expected.html:
* css3/line-break/line-break-loose-hyphens.html:
* css3/line-break/line-break-loose-postfixes-expected.html:
* css3/line-break/line-break-loose-postfixes.html:
* css3/line-break/line-break-loose-sound-marks-expected.html:
* css3/line-break/line-break-loose-sound-marks.html:
* css3/line-break/line-break-normal-centered-expected.html:
* css3/line-break/line-break-normal-centered.html:
* css3/line-break/line-break-normal-hyphens-expected.html:
* css3/line-break/line-break-normal-hyphens.html:
* css3/line-break/line-break-normal-postfixes-expected.html:
* css3/line-break/line-break-normal-postfixes.html:
* css3/line-break/line-break-normal-sound-marks-expected.html:
* css3/line-break/line-break-normal-sound-marks.html:
* css3/line-break/line-break-strict-centered-expected.html:
* css3/line-break/line-break-strict-centered.html:
* css3/line-break/line-break-strict-hyphens-expected.html:
* css3/line-break/line-break-strict-hyphens.html:
* css3/line-break/line-break-strict-postfixes-expected.html:
* css3/line-break/line-break-strict-postfixes.html:
* css3/line-break/line-break-strict-sound-marks-expected.html:
* css3/line-break/line-break-strict-sound-marks.html:
* fast/text/fallback-language-han-expected.html: Added.
* fast/text/fallback-language-han.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

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

5 years agoCharacterFallbackMapKey should be locale-specific
mmaxfield@apple.com [Sat, 1 Aug 2015 23:49:08 +0000 (23:49 +0000)]
CharacterFallbackMapKey should be locale-specific
https://bugs.webkit.org/show_bug.cgi?id=147532

Reviewed by Dean Jackson.

This is in preparation for locale-specific font fallback.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
(WebCore::CharacterFallbackMapKey::operator==):
(WebCore::CharacterFallbackMapKeyHash::hash):
(WebCore::Font::systemFallbackFontForCharacter):

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

5 years agoFix 64-bit CMake build on Windows.
achristensen@apple.com [Sat, 1 Aug 2015 21:53:08 +0000 (21:53 +0000)]
Fix 64-bit CMake build on Windows.

* PlatformWin.cmake:
Win64 needs PaintHooks.asm.

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

5 years ago[Win] Test gardening
mmaxfield@apple.com [Sat, 1 Aug 2015 20:43:56 +0000 (20:43 +0000)]
[Win] Test gardening

Unreviewed

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-08-01

* platform/win/TestExpectations:

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

5 years agoExpand CharacterFallbackMapKey to a struct
mmaxfield@apple.com [Sat, 1 Aug 2015 20:15:23 +0000 (20:15 +0000)]
Expand CharacterFallbackMapKey to a struct
https://bugs.webkit.org/show_bug.cgi?id=147530

Reviewed by Dean Jackson.

This is in prepraration for making this struct locale-specific.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
(WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
(WebCore::CharacterFallbackMapKey::operator==):
(WebCore::CharacterFallbackMapKeyHash::hash):
(WebCore::CharacterFallbackMapKeyHash::equal):
(WebCore::Font::systemFallbackFontForCharacter):

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

5 years agoHashTraits<AtomicString> can use SimpleClassHashTraits
mmaxfield@apple.com [Sat, 1 Aug 2015 20:14:20 +0000 (20:14 +0000)]
HashTraits<AtomicString> can use SimpleClassHashTraits
https://bugs.webkit.org/show_bug.cgi?id=147528

Reviewed by Andreas Kling.

No point in duplicating the code inside SimpleClassHashTraits.

* wtf/text/AtomicStringHash.h:
(WTF::HashTraits<WTF::AtomicString>::constructDeletedValue): Deleted.
(WTF::HashTraits<WTF::AtomicString>::isDeletedValue): Deleted.

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

5 years agoFix the build after r187721
mmaxfield@apple.com [Sat, 1 Aug 2015 20:08:24 +0000 (20:08 +0000)]
Fix the build after r187721

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-08-01

* bindings/js/JSDOMBinding.h:
(WebCore::createWrapper):

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

5 years agoFix compile errors with VS2015
achristensen@apple.com [Sat, 1 Aug 2015 19:55:50 +0000 (19:55 +0000)]
Fix compile errors with VS2015
https://bugs.webkit.org/show_bug.cgi?id=147526

Reviewed by Myles Maxfield.

Source/WebCore:

* bindings/js/JSDOMBinding.h:
(WebCore::createWrapper):
Explicitly call the Ref constructor to avoid unresolved symbols with VS2015.
Otherwise, VS2015 tries to use CSSPrimitiveValue::operator<Ref<CSSPrimitiveValue> > which doesn't exist.

Source/WebKit/win:

* WebKitDLL.cpp:
(shutDownWebKit):
(loadResourceIntoBuffer): Needs to be exported from WebKit.dll to link with CMake using VS2015.

Source/WTF:

* wtf/StringExtras.h:
(snprintf):
(wtf_vsnprintf):
VS2015 has an implementation of snprintf.

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

5 years agoUnreviewed. Remove unintentional "print" statement in test case.
saambarati1@gmail.com [Sat, 1 Aug 2015 15:27:11 +0000 (15:27 +0000)]
Unreviewed. Remove unintentional "print" statement in test case.
https://bugs.webkit.org/show_bug.cgi?id=142567

* tests/stress/class-syntax-definition-semantics.js:
(shouldBeSyntaxError):

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

5 years agoWeb Inspector: Replace "unknown-mac" CSS class with "el-capitan"
nvasilyev@apple.com [Sat, 1 Aug 2015 10:55:28 +0000 (10:55 +0000)]
Web Inspector: Replace "unknown-mac" CSS class with "el-capitan"
https://bugs.webkit.org/show_bug.cgi?id=147524

Reviewed by Timothy Hatcher.

* UserInterface/Base/Platform.js:
No need to repeat WebInspector.Platform.version.release for every possible case.

* UserInterface/Views/Toolbar.css:
(body:not(.el-capitan) .toolbar .dashboard-container):
(body:not(.el-capitan) .toolbar .search-bar > input[type="search"]):
(body:not(.el-capitan) .toolbar .search-bar > input[type="search"]:focus):
(body:not(.el-capitan) .toolbar .item.button:active):
(body.window-inactive:not(.el-capitan) .toolbar .dashboard-container):
(body.el-capitan .toolbar .dashboard-container):
(body.el-capitan .toolbar .search-bar > input[type="search"]):
(body.el-capitan .toolbar .search-bar > input[type="search"]:focus):
(@media (-webkit-min-device-pixel-ratio: 2)):
(body.el-capitan .toolbar .item.button:active):
(body.el-capitan.window-inactive .toolbar .dashboard-container):
(body:not(.unknown-mac) .toolbar .dashboard-container): Deleted.
(body:not(.unknown-mac) .toolbar .search-bar > input[type="search"]): Deleted.
(body:not(.unknown-mac) .toolbar .search-bar > input[type="search"]:focus): Deleted.
(body:not(.unknown-mac) .toolbar .item.button:active): Deleted.
(body.window-inactive:not(.unknown-mac) .toolbar .dashboard-container): Deleted.
(body.unknown-mac .toolbar .dashboard-container): Deleted.
(body.unknown-mac .toolbar .search-bar > input[type="search"]): Deleted.
(body.unknown-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
(body.unknown-mac .toolbar .item.button:active): Deleted.
(body.unknown-mac.window-inactive .toolbar .dashboard-container): Deleted.

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

5 years agoWeb Inspector: inherited CSS rules disappear from Styles sidebar while editing
drousso@apple.com [Sat, 1 Aug 2015 06:48:27 +0000 (06:48 +0000)]
Web Inspector: inherited CSS rules disappear from Styles sidebar while editing
https://bugs.webkit.org/show_bug.cgi?id=147441

Reviewed by Timothy Hatcher.

If the user edits a style declaration such that it would dissapear mid-edit, prevent
the rules panel from refreshing until that editor is blurred.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.get editorActive):
(WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector):
(WebInspector.CSSStyleDeclarationSection.prototype._editorContentChanged):
(WebInspector.CSSStyleDeclarationSection.prototype._editorBlurred):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel):
(WebInspector.RulesStyleDetailsPanel.prototype._removeSectionWithActiveEditor):
* UserInterface/Views/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition):

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

5 years agoMedia Session: inform the UI process when the focused Content media element changes
mrajca@apple.com [Sat, 1 Aug 2015 06:47:50 +0000 (06:47 +0000)]
Media Session: inform the UI process when the focused Content media element changes
https://bugs.webkit.org/show_bug.cgi?id=147323

Reviewed by Tim Horton.

WebCore:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::playInternal): Eventually tell the UI process that the focused Content media element changed.
* page/ChromeClient.h:

WebKit2:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedContentMediaElementDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

5 years agoMedia Session: give media elements unique IDs https://bugs.webkit.org/show_bug.cgi...
mrajca@apple.com [Sat, 1 Aug 2015 06:39:36 +0000 (06:39 +0000)]
Media Session: give media elements unique IDs https://bugs.webkit.org/show_bug.cgi?id=147322

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::elementIDsToElements): Create a global map of element IDs to elements.
(WebCore::HTMLMediaElement::elementWithID): Retrieve the element with the given ID.
(WebCore::HTMLMediaElement::HTMLMediaElement): Give the element a unique ID.
(WebCore::HTMLMediaElement::playInternal): Removed whitespace.
(WebCore::HTMLMediaElement::pauseInternal): Ditto.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::elementID):

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

5 years agoAdding -expected.png for fast/text/international/arabic-justify.html
mmaxfield@apple.com [Sat, 1 Aug 2015 06:27:54 +0000 (06:27 +0000)]
Adding -expected.png for fast/text/international/arabic-justify.html

* platform/mac-yosemite/fast/text/international/arabic-justify-expected.png: Added

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

5 years agoMedia Session: add test to ensure that switching media sessions pauses elements
mrajca@apple.com [Sat, 1 Aug 2015 05:33:50 +0000 (05:33 +0000)]
Media Session: add test to ensure that switching media sessions pauses elements
https://bugs.webkit.org/show_bug.cgi?id=147493

Reviewed by Eric Carlson.

* media/session/switching-sessions-expected.txt: Added.
* media/session/switching-sessions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoFix the build
mmaxfield@apple.com [Sat, 1 Aug 2015 04:27:49 +0000 (04:27 +0000)]
Fix the build

Unreviewed.

* platform/graphics/mac/FontCacheMac.mm:
(WebCore::lookupCTFont):

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

5 years agoWeb Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected
drousso@apple.com [Sat, 1 Aug 2015 04:15:48 +0000 (04:15 +0000)]
Web Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected
https://bugs.webkit.org/show_bug.cgi?id=147316

Reviewed by Timothy Hatcher.

Instead of replacing the text for a completion, which messes up the undo history, add
a unique marker that contains the remaining text for the current completion.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):

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

5 years ago[OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike...
mmaxfield@apple.com [Sat, 1 Aug 2015 04:06:30 +0000 (04:06 +0000)]
[OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
https://bugs.webkit.org/show_bug.cgi?id=147483

Reviewed by Dean Jackson.

[NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
CoreText function correctly handles its language argument, which is required for language-specific
font fallback.

No new tests because there is no behavior change.

* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/FontCache.h:
(WebCore::FontCache::platformPurgeInactiveFontData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::fallbackDedupSet):
(WebCore::FontCache::platformPurgeInactiveFontData):
(WebCore::lookupCTFont):
(WebCore::FontCache::systemFallbackForCharacters):
* platform/spi/cocoa/CoreTextSPI.h:
* platform/spi/mac/NSFontSPI.h:

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

5 years agoDrop dummy Timer callbacks
cdumez@apple.com [Sat, 1 Aug 2015 03:41:07 +0000 (03:41 +0000)]
Drop dummy Timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=147516

Reviewed by Alexey Proskuryakov.

Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
do nothing else beside calling a particular method. In such case, we
can use the called method as Timer callback instead.

Source/WebCore:

* css/FontLoader.cpp:
(WebCore::FontLoader::FontLoader):
* css/FontLoader.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::styleRecalcTimerFired): Deleted.
(WebCore::Document::domCookieCacheExpiryTimerFired): Deleted.
* dom/Document.h:
* html/MediaController.cpp:
(MediaController::MediaController):
(MediaController::timeupdateTimerFired): Deleted.
* html/MediaController.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): Deleted.
* loader/cache/CachedResourceLoader.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::MemoryCache):
(WebCore::MemoryCache::pruneTimerFired): Deleted.
* loader/cache/MemoryCache.h:
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::connectTimerFired): Deleted.
* page/EventSource.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::delayedScrollEventTimerFired): Deleted.
(WebCore::FrameView::postLayoutTimerFired): Deleted.
* page/FrameView.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): Deleted.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): Deleted.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::FontCache):
(WebCore::FontCache::purgeTimerFired): Deleted.
* platform/graphics/FontCache.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::ScratchBuffer):
(WebCore::ScratchBuffer::timerFired): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Deleted.

Source/WebKit/mac:

* Plugins/WebNetscapePluginStream.h:
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::WebNetscapePluginStream):
(WebNetscapePluginStream::deliverDataTimerFired): Deleted.

Source/WebKit2:

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired): Deleted.

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

5 years agoRemoved pointSize from _addMarkersToList
mdaiter@apple.com [Sat, 1 Aug 2015 02:39:34 +0000 (02:39 +0000)]
Removed pointSize from _addMarkersToList
https://bugs.webkit.org/show_bug.cgi?id=147515

Reviewed by Eric Carlson.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_addMarkersToList): Deleted.

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

5 years agoPrepare for VS2015
achristensen@apple.com [Sat, 1 Aug 2015 01:56:57 +0000 (01:56 +0000)]
Prepare for VS2015
https://bugs.webkit.org/show_bug.cgi?id=146579

Reviewed by Jon Honeycutt.

Source/JavaScriptCore:

* heap/Heap.h:
Fix compiler error by explicitly casting zombifiedBits to the size of a pointer.

Source/WebCore:

* WebCore.vcxproj/build-generated-files.pl:
Find a correct preprocessor when using VS2015.

Source/WTF:

* wtf/StdLibExtras.h:
(std::exchange):
Added preprocessor macros around functions implemented in VS2015's standard library.

Tools:

* WinLauncher/stdafx.h:
Define __STDC_LIMIT_MACROS to have access to INTMAX_MAX.

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

5 years agoUnreviewed gardening. Skip Media Sessions tests, the feature is not yet enabled.
joepeck@webkit.org [Sat, 1 Aug 2015 01:36:13 +0000 (01:36 +0000)]
Unreviewed gardening. Skip Media Sessions tests, the feature is not yet enabled.

* TestExpectations:
* platform/efl/TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoWeb Inspector: Scrolling "jumps" in console
drousso@apple.com [Sat, 1 Aug 2015 01:32:02 +0000 (01:32 +0000)]
Web Inspector: Scrolling "jumps" in console
https://bugs.webkit.org/show_bug.cgi?id=147482

Reviewed by Joseph Pecoraro.

Removed focus call on messageElement.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._mousedown): Deleted.
(WebInspector.LogContentView.prototype._didFocus): Deleted.
(WebInspector.LogContentView.prototype._didBlur): Deleted.

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

5 years agoUnreviewed gardening. Update inspector test skips based on bots.
joepeck@webkit.org [Sat, 1 Aug 2015 01:22:23 +0000 (01:22 +0000)]
Unreviewed gardening. Update inspector test skips based on bots.

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

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

5 years ago[WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
cdumez@apple.com [Sat, 1 Aug 2015 00:43:36 +0000 (00:43 +0000)]
[WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
https://bugs.webkit.org/show_bug.cgi?id=143348

Reviewed by Antti Koivisto.

Drop HTTP method from NetworkCache::Key as we only cache GET responses
for now. Even when we start caching HEAD responses, we likely will not
want the method to be part of the key because:
- A HEAD response can be used to update the headers of a previously cached response to GET
- A cached GET response may be used to satisfy subsequent HEAD requests

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeCacheKey):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key):
(WebKit::NetworkCache::Key::operator==):
(WebKit::NetworkCache::Key::decode):
(WebKit::NetworkCache::Key::operator=): Deleted.
(WebKit::NetworkCache::Key::computeHash): Deleted.
(WebKit::NetworkCache::Key::encode): Deleted.
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::Key::method): Deleted.

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

5 years ago[iOS] use a media-specific user gesture check
eric.carlson@apple.com [Sat, 1 Aug 2015 00:09:23 +0000 (00:09 +0000)]
[iOS] use a media-specific user gesture check
https://bugs.webkit.org/show_bug.cgi?id=147509

Reviewed by Tim Horton.

Change an enum name added in r187688.

* dom/UserGestureIndicator.cpp:
(WebCore::isDefinite): DefinitelyProcessingMediaUserGesture -> DefinitelyProcessingPotentialUserGesture
(WebCore::UserGestureIndicator::processingUserGestureForMedia): Ditto.
* dom/UserGestureIndicator.h: Ditto.

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

5 years ago[Cocoa] Latin quotes are used with the system font on Chinese devices
mmaxfield@apple.com [Sat, 1 Aug 2015 00:00:44 +0000 (00:00 +0000)]
[Cocoa] Latin quotes are used with the system font on Chinese devices
https://bugs.webkit.org/show_bug.cgi?id=147504

Reviewed by Dean Jackson.

The system font has some fancy logic regarding character selection which requires
using Core Text for glyph selection.

No new tests because tests can't change the system language of the device.

* platform/graphics/mac/GlyphPageMac.cpp:
(WebCore::shouldUseCoreText):

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

5 years agoWeb Inspector: Unskip / Unflake inspector tests after r187627
joepeck@webkit.org [Fri, 31 Jul 2015 23:57:22 +0000 (23:57 +0000)]
Web Inspector: Unskip / Unflake inspector tests after r187627
https://bugs.webkit.org/show_bug.cgi?id=147503

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Base/Test.js:
(InspectorTest.completeTest):
(InspectorTest.completeTest.signalCompletionToTestPage): Deleted.
(InspectorTest.testPageDidLoad):
Instead of immediately resending results if completeTest was called
during a reload before the load has completed, we just set a flag
to complete the test when the load completes. This consistently
resends the output to the new page for test output.

(InspectorTest._resendResults):
Delete clear results. If the page had logged anything directly on
the page side (using InspectorTestProxy) this clearMessages would
have deleted those messages and not been able to recreate them.
Clearing messages wasn't really serving a purpose.

LayoutTests:

* TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
Unskip and unflake inspector tests.

* http/tests/inspector/inspector-test.js:
(InspectorTestProxy.addResult):
Simplify with the new append API.

(InspectorTestProxy.clearResults): Deleted.
Delete, as it is no longer used.

* inspector/debugger/probe-manager-add-remove-actions-expected.txt:
Include output that was getting erronously cleared by clearResults
which we removed.

* inspector/dom/highlightSelector-expected.txt:
* inspector/dom/highlightSelector.html:
Make this test more reliable when run with other tests.
Never assume the frame id for the main frame or sub frame,
instead compute them and mask them in the output.

* inspector/dom/resources/highlightSelector-iframe.html: Renamed from LayoutTests/inspector/dom/highlightSelector-iframe.html.
Move the non-test iframe html resource into a sub-folder
so it won't be treated like an actual test.

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

5 years agoSource/WebCore:
cdumez@apple.com [Fri, 31 Jul 2015 23:56:00 +0000 (23:56 +0000)]
Source/WebCore:
Coalesce authentication credential requests
https://bugs.webkit.org/show_bug.cgi?id=128006
<rdar://problem/16839069>

Reviewed by Alexey Proskuryakov.

Export symbol for ProtectionSpace::compare() so it can be called from
WebKit2.

* platform/network/ProtectionSpaceBase.h:

Source/WebKit2:
Coalesce concurrent authentication challenges for the same ProtectionSpace
https://bugs.webkit.org/show_bug.cgi?id=147496
<rdar://problem/16839069>

Reviewed by Alexey Proskuryakov.

Coalesce concurrent authentication challenges for the same ProtectionSpace.
Ideally, this would be done in the network layer but short term, this will
make sure the user no longer gets repeating authentication dialogs for the
same protection space.

This gets rid of a long-standing bug in WebKit / Safari where visiting a
site using HTTP authentication would pop up one authentication dialog for
each subresource being loaded from the network (especially when the main
resource is loaded from the cache).

* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::canCoalesceChallenge):
(WebKit::AuthenticationManager::addChallengeToChallengeMap):
(WebKit::AuthenticationManager::shouldCoalesceChallenge):
(WebKit::AuthenticationManager::coalesceChallengesMatching):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::useCredentialForChallenge):
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandling):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
(WebKit::AuthenticationManager::AuthenticationManager): Deleted.
* Shared/Authentication/AuthenticationManager.h:

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

5 years agoUnreviewed gardening. Skip more inspector tests on Windows.
joepeck@webkit.org [Fri, 31 Jul 2015 23:50:01 +0000 (23:50 +0000)]
Unreviewed gardening. Skip more inspector tests on Windows.

It may be that no inspector tests are working on Windows,
if that is the case we may move to skipping all of them
and investigate unskipping in chunks.

* platform/win/TestExpectations:

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

5 years agoWeb Inspector: Convert timeline view classes to ES6 classes
burg@cs.washington.edu [Fri, 31 Jul 2015 23:27:04 +0000 (23:27 +0000)]
Web Inspector: Convert timeline view classes to ES6 classes
https://bugs.webkit.org/show_bug.cgi?id=147381

Reviewed by Joseph Pecoraro.

Along the way, inline a few style class names.

Elided mechanical changes from the Changelog.

* UserInterface/Views/LayoutTimelineOverviewGraph.js:
* UserInterface/Views/LayoutTimelineView.js:
* UserInterface/Views/LinearTimelineOverview.js:
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
* UserInterface/Views/NetworkTimelineView.js:
* UserInterface/Views/OverviewTimelineView.js:
* UserInterface/Views/RenderingFrameTimelineOverview.js:
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
* UserInterface/Views/RenderingFrameTimelineView.js:
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
* UserInterface/Views/ScriptTimelineView.js:
* UserInterface/Views/TimelineOverview.js:
* UserInterface/Views/TimelineOverviewGraph.js:
* UserInterface/Views/TimelineRecordBar.js:
* UserInterface/Views/TimelineRecordFrame.js:
* UserInterface/Views/TimelineRecordingContentView.js:
* UserInterface/Views/TimelineRuler.js:
* UserInterface/Views/TimelineTabContentView.js:
* UserInterface/Views/TimelineView.js:

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

5 years ago[iOS] use a media-specific user gesture check
eric.carlson@apple.com [Fri, 31 Jul 2015 22:59:04 +0000 (22:59 +0000)]
[iOS] use a media-specific user gesture check
https://bugs.webkit.org/show_bug.cgi?id=147509

Reviewed by Jer Noble.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::processingUserGestureForMedia): New.
* bindings/js/ScriptController.h:

* dom/UserGestureIndicator.cpp:
(WebCore::isDefinite): Allow DefinitelyProcessingMediaUserGesture.
(WebCore::UserGestureIndicator::processingUserGestureForMedia): New.
* dom/UserGestureIndicator.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::load): Use ScriptController::processingUserGestureForMedia instead of
  ScriptController::processingUserGesture
(WebCore::HTMLMediaElement::play): Ditto.

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

5 years agoCrashes under HTMLMediaElement::updateActiveTextTrackCues() when destroying CachedPage.
akling@apple.com [Fri, 31 Jul 2015 22:43:55 +0000 (22:43 +0000)]
Crashes under HTMLMediaElement::updateActiveTextTrackCues() when destroying CachedPage.
<https://webkit.org/b/147506>
<rdar://problem/21939014>

Reviewed by Chris Dumez.

Don't mess with the media element's text tracks below its ActiveDOMObject::stop()
implementation, since that may cause DOM mutations.

I don't have a repro or a test for this, but plenty of crash logs to indicate that
we're getting ourselves into trouble by modifying the DOM during CachedPage teardown.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackDisplay):

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

5 years ago[iOS] DOMNode preview snapshot rects are wrong for user-select: none links
timothy_horton@apple.com [Fri, 31 Jul 2015 22:34:23 +0000 (22:34 +0000)]
[iOS] DOMNode preview snapshot rects are wrong for user-select: none links
https://bugs.webkit.org/show_bug.cgi?id=147513
<rdar://problem/22083354>

Reviewed by Simon Fraser.

* bindings/objc/DOM.mm:
(-[DOMNode getPreviewSnapshotImage:andRects:]):
Use the same code as WebKit2 to compute the fallback rect (if TextIndicator fails),
asking the RenderObject (or RenderImage) for its bounding box instead of using the
(often wrong) Range bounding rect.

Make sure to use the fallback rect *any* time TextIndicator fails (before
we would return no rects at all if TextIndicator::createWithRange returned null,
and the fallback rect if it returned with an empty image).

Inverse-page-scale the margin, to match the appearance in WebKit2.

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

5 years ago[SVG -> OTF Converter] Crash when converting Arabic fonts
mmaxfield@apple.com [Fri, 31 Jul 2015 22:24:56 +0000 (22:24 +0000)]
[SVG -> OTF Converter] Crash when converting Arabic fonts
https://bugs.webkit.org/show_bug.cgi?id=147510

Reviewed by Anders Carlsson.

Source/WebCore:

SVGToOTFFontConverter::compareCodepointsLexicographically() wasn't transitive.

Test: fast/text/arabic-duplicate-glyph-font.html

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):

LayoutTests:

* fast/text/arabic-duplicate-glyph-font-expected.txt: Added.
* fast/text/arabic-duplicate-glyph-font.html: Added.
* fast/text/resources/arabic-duplicate-glyph-font.svg: Added.

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

5 years agoRename AVPlayerLayerView to _AVPlayerLayerView.
commit-queue@webkit.org [Fri, 31 Jul 2015 22:20:30 +0000 (22:20 +0000)]
Rename AVPlayerLayerView to _AVPlayerLayerView.
https://bugs.webkit.org/show_bug.cgi?id=147399

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-07-31
Reviewed by Eric Carlson.

Change class name AVPlayerLayerView to match change in AVKit SPI.
This prevents conflicts with 3rd party apps.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebAVPlayerLayerView_dealloc):
(getWebAVPlayerLayerViewClass):
* platform/spi/cocoa/AVKitSPI.h:

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

5 years agoUnreviewed parameter name typo fix.
joepeck@webkit.org [Fri, 31 Jul 2015 21:26:15 +0000 (21:26 +0000)]
Unreviewed parameter name typo fix.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):

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

5 years agoImageBufferDataCG should not add IOSurfaces to the pool
cdumez@apple.com [Fri, 31 Jul 2015 21:16:42 +0000 (21:16 +0000)]
ImageBufferDataCG should not add IOSurfaces to the pool
https://bugs.webkit.org/show_bug.cgi?id=147494

Reviewed by Tim Horton.

ImageBufferDataCG should not add IOSurfaces to the pool as it is not
safe. IOSurfaceIsInUse() does not return accurate result for those
surfaces.

This is a partial revert of r181301.

* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::~ImageBufferData): Deleted.
* platform/graphics/cg/ImageBufferDataCG.h:

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

5 years agoES6 class syntax should use block scoping
saambarati1@gmail.com [Fri, 31 Jul 2015 21:05:19 +0000 (21:05 +0000)]
ES6 class syntax should use block scoping
https://bugs.webkit.org/show_bug.cgi?id=142567

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

We treat class declarations like we do "let" declarations.
The class name is under TDZ until the class declaration
statement is evaluated. Class declarations also follow
the same rules as "let": No duplicate definitions inside
a lexical environment.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createClassDeclStatement):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClassDeclaration):
* tests/stress/class-syntax-block-scoping.js: Added.
(assert):
(truth):
(.):
* tests/stress/class-syntax-definition-semantics.js: Added.
(shouldBeSyntaxError):
(shouldNotBeSyntaxError):
(truth):
* tests/stress/class-syntax-tdz.js:
(assert):
(shouldThrowTDZ):
(truth):
(.):

LayoutTests:

* js/class-constructor-return-expected.txt:
* js/class-syntax-call-expected.txt:
* js/class-syntax-declaration-expected.txt:
* js/class-syntax-default-constructor-expected.txt:
* js/class-syntax-extends-expected.txt:
* js/class-syntax-name-expected.txt:
* js/class-syntax-super-expected.txt:
* js/script-tests/class-constructor-return.js:
(shouldThrow):
(shouldNotThrow):
(shouldBeTrue):
(shouldBeFalse):
* js/script-tests/class-syntax-call.js:
(A):
(B):
(shouldThrow):
(shouldNotThrow):
* js/script-tests/class-syntax-declaration.js:
(shouldThrow):
(shouldNotThrow):
(shouldBe):
* js/script-tests/class-syntax-default-constructor.js:
(shouldThrow):
(shouldBe):
(shouldBeTrue):
(assert):
(A):
(B):
* js/script-tests/class-syntax-extends.js:
(shouldThrow):
(shouldNotThrow):
(shouldBe):
(shouldBeTrue):
(Base):
(Base.prototype.baseMethod):
* js/script-tests/class-syntax-name.js:
(shouldThrow):
(shouldNotThrow):
(shouldBe):
(shouldBeTrue):
(runTestShouldBe):
* js/script-tests/class-syntax-super.js:
(shouldThrow):
(shouldNotThrow):
(shouldBe):
(shouldBeTrue):
(shouldBeFalse):

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

5 years agoImplement WebAssembly module parser
commit-queue@webkit.org [Fri, 31 Jul 2015 20:34:50 +0000 (20:34 +0000)]
Implement WebAssembly module parser
https://bugs.webkit.org/show_bug.cgi?id=147293

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-07-31
Reviewed by Mark Lam.

Re-landing after fix for the "..\..\jsc.cpp(46): fatal error C1083: Cannot open
include file: 'JSWASMModule.h'" issue on Windows.

Implement WebAssembly module parser for WebAssembly files produced by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>. This patch only checks
the magic number at the beginning of the files. Parsing of the rest will be
implemented in a subsequent patch.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(GlobalObject::finishCreation):
(functionLoadWebAssembly):
* parser/SourceProvider.h:
(JSC::WebAssemblySourceProvider::create):
(JSC::WebAssemblySourceProvider::data):
(JSC::WebAssemblySourceProvider::WebAssemblySourceProvider):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::wasmModuleStructure):
* wasm/WASMMagicNumber.h: Added.
* wasm/WASMModuleParser.cpp: Added.
(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parse):
(JSC::WASMModuleParser::parseModule):
(JSC::parseWebAssembly):
* wasm/WASMModuleParser.h: Added.
* wasm/WASMReader.cpp: Added.
(JSC::WASMReader::readUnsignedInt32):
(JSC::WASMReader::readFloat):
(JSC::WASMReader::readDouble):
* wasm/WASMReader.h: Added.
(JSC::WASMReader::WASMReader):

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

5 years ago CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
jer.noble@apple.com [Fri, 31 Jul 2015 20:21:15 +0000 (20:21 +0000)]
 CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
 https://bugs.webkit.org/show_bug.cgi?id=147485

 Rubber-stamped by Joseph Pecoraro.

 Follow-up test crash fix: call superclass's contextDestroyed() which allows the
 m_scriptExecutionContext variable to be cleared.

 * html/HTMLMediaElement.cpp:
 (WebCore::HTMLMediaElement::contextDestroyed):

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

5 years agoREGRESSION (r174791): Returning a zombie NSImage from sharingService:transitionImageF...
beidson@apple.com [Fri, 31 Jul 2015 19:43:43 +0000 (19:43 +0000)]
REGRESSION (r174791): Returning a zombie NSImage from sharingService:transitionImageForShareItem:contentRect:
<rdar://problem/22060183> and https://bugs.webkit.org/show_bug.cgi?id=147497

Reviewed by Tim Horton.

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem): Don't return what is basically a temporary NSImage.
  Instead do a [[retain] autorelease] on it while still valid.

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

5 years agoOnly generate "themeWin*" UserAgentStyleSheet constants for Windows builds
commit-queue@webkit.org [Fri, 31 Jul 2015 19:25:58 +0000 (19:25 +0000)]
Only generate "themeWin*" UserAgentStyleSheet constants for Windows builds
https://bugs.webkit.org/show_bug.cgi?id=147378

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-07-31
Reviewed by Alex Christensen.

* DerivedSources.make:
Only include windows user agent style sheets for Windows OSes.

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

5 years agoPrepare for debug CMake builds on Windows.
achristensen@apple.com [Fri, 31 Jul 2015 18:07:06 +0000 (18:07 +0000)]
Prepare for debug CMake builds on Windows.
https://bugs.webkit.org/show_bug.cgi?id=147484

Reviewed by Tim Horton.

.:

* Source/cmake/OptionsWindows.cmake:
Don't use debug runtimes in debug builds because the dependencies are only built with multithreaded runtimes.

Source/WebCore:

In order to get debug builds to link on Windows with CMake, we will need to use AllInOnes.
This patch includes more files in the AllInOnes and removes some duplicate code.

* WebCore.vcxproj/WebCore.vcxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* css/CSSAllInOne.cpp:
Many files were added to the AllInOne files.  They should not be included in the Visual Studio solutions.
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::create):
Use CSSParserString::equalIgnoringCase to avoid ambiguous calls to overloaded functions.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::shouldApplyPropertyInParseOrder):
(WebCore::convertToFloatLength): Deleted.
* css/TransformFunctions.cpp:
(WebCore::transformOperationType):
(WebCore::convertToFloatLength):
* css/TransformFunctions.h:
Removed duplicate convertToFloatLength function.
* html/HTMLElementsAllInOne.cpp:
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
(WebCore::compareZIndexFlowThreadController): Renamed from compareZIndex to prevent naming conflicts.
(WebCore::FlowThreadController::collectFixedPositionedLayers):
(WebCore::compareZIndex): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldRepaintAfterLayout):
(WebCore::compositedWithOwnBackingStore):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::descendantLayerPaintsIntoAncestor):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::compositedWithOwnBackingStore): Deleted.
Removed duplicate compositedWithOwnBackingStore.
(WebCore::paintScrollbar): Deleted duplicate function.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresScrollLayer):
(WebCore::paintScrollbar):
* rendering/RenderLayerCompositor.h:
* rendering/RenderingAllInOne.cpp:

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

5 years agoCRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
jer.noble@apple.com [Fri, 31 Jul 2015 17:49:15 +0000 (17:49 +0000)]
CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
https://bugs.webkit.org/show_bug.cgi?id=147485

Reviewed by Eric Carlson.

CrashLogs indicate a use-after-free of the ScriptExecutionContext (i.e., Document) used by
the GenericTaskQueue objects owned by HTMLMediaElement. When the ScriptExecutionContext
notifies its ActiveDOMObjects that it is about to be destroyed, close() the
GenericTaskQueues so that they can no longer accept new tasks.

Previously, enqueueing a task on a closed GenericTaskQueue ASSERTed in debug builds, but
silently succeeded in release builds. Calling enqueueTask() on a  closed GenericTaskQueue is
now a no-op.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::contextDestroyed):
* html/HTMLMediaElement.h:
* platform/GenericTaskQueue.h:
(WebCore::GenericTaskQueue::enqueueTask):

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

5 years agoMedia Session: add test for MediaSession.releaseSession()
mrajca@apple.com [Fri, 31 Jul 2015 17:08:51 +0000 (17:08 +0000)]
Media Session: add test for MediaSession.releaseSession()
https://bugs.webkit.org/show_bug.cgi?id=147478

Reviewed by Eric Carlson.

* media/session/releasing-sessions-expected.txt: Added.
* media/session/releasing-sessions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoMedia Session: add test to ensure next/previous-track event handlers are not fired...
mrajca@apple.com [Fri, 31 Jul 2015 16:59:51 +0000 (16:59 +0000)]
Media Session: add test to ensure next/previous-track event handlers are not fired when they are disabled
https://bugs.webkit.org/show_bug.cgi?id=147477

Reviewed by Eric Carlson.

* media/session/track-media-events-disabled-expected.txt: Added.
* media/session/track-media-events-disabled.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoMedia Session: add test to ensure media sessions are in an Idle state after creation
mrajca@apple.com [Fri, 31 Jul 2015 16:51:57 +0000 (16:51 +0000)]
Media Session: add test to ensure media sessions are in an Idle state after creation
https://bugs.webkit.org/show_bug.cgi?id=147471

Reviewed by Eric Carlson.

* media/session/session-creation-expected.txt: Added.
* media/session/session-creation.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years ago[EFL] Fix pixman build on ARM with GCC 4.9.3
ossy@webkit.org [Fri, 31 Jul 2015 14:28:37 +0000 (14:28 +0000)]
[EFL] Fix pixman build on ARM with GCC 4.9.3
https://bugs.webkit.org/show_bug.cgi?id=147224

Reviewed by Gyuyoung Kim.

* efl/jhbuild.modules: Disable ARM IWMMXT fast paths as workarounding a GCC bug.

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

5 years ago[GTK] NPAPI code crashes on Wayland
carlosgc@webkit.org [Fri, 31 Jul 2015 12:24:05 +0000 (12:24 +0000)]
[GTK] NPAPI code crashes on Wayland
https://bugs.webkit.org/show_bug.cgi?id=147297

Reviewed by Žan Doberšek.

Do not crete NPAPI plugins when runing on Wayland, since they are
not supported. ENABLE_NETSCAPE_PLUGIN_API option used to be
incompatible with building with the Wayland target, but now that
we allow to build X11 and Wayland targets at the same time, we
need runtime checks to avoid creating NPAPI plugins in Wayland.

* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_set_enable_plugins): Do not allow to change the
setting when running in Wayland.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore): Initialize
EnablePlugins preference to false when running in Wayland.

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

5 years ago[GTK] Have DataObjectGtk::unknownTypes() return a reference to the HashMap object
zandobersek@gmail.com [Fri, 31 Jul 2015 08:06:37 +0000 (08:06 +0000)]
[GTK] Have DataObjectGtk::unknownTypes() return a reference to the HashMap object
https://bugs.webkit.org/show_bug.cgi?id=147401

Reviewed by Carlos Garcia Campos.

Don't copy the DataObjectGtk::m_unknownTypes HashMap on every retrieval through
DataObjectGtk::unknownTypes(). The range-based for-loops that iterate over the
map in PasteboardGtk.cpp and PasteboardHelper.cpp are also cleaned up.

* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::unknownTypes):
* platform/gtk/DataObjectGtk.h:
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::writePasteboard):
(WebCore::Pasteboard::types):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillSelectionData):

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

5 years agoRenderTheme::paintBorderOnly and paintDecorations should take RenderBox instead of...
zalan@apple.com [Fri, 31 Jul 2015 03:48:40 +0000 (03:48 +0000)]
RenderTheme::paintBorderOnly and paintDecorations should take RenderBox instead of RenderObject.
https://bugs.webkit.org/show_bug.cgi?id=147470

Reviewed by Simon Fraser.

Tighten the code so that RenderTheme paint functions take RenderBox instead of RenderObject.

No change in functionality.

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
* rendering/RenderTheme.h:

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

5 years agoWeb Inspector: Better share objects generated from timeline events (Records)
mattbaker@apple.com [Fri, 31 Jul 2015 01:55:56 +0000 (01:55 +0000)]
Web Inspector: Better share objects generated from timeline events (Records)
https://bugs.webkit.org/show_bug.cgi?id=147029

Reviewed by Brian Burg.

This patch changes the way TimelineManager processes events, preserving the event hierarchy after
converting payloads to TimelineRecord objects by retaining parent-child relationships between records.
This eliminates the need for RenderingFrameTimelineRecord objects to create a separate copy of their child
records, and provides richer data for the Timelines UI.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded):
Track the parent TimelineRecord as child record payloads are unpacked, and create
a hierarchy of TimelineRecords that mirrors the original event payload hierarchy.
(WebInspector.TimelineManager.prototype._processRecord):
RenderingFrameTimelineRecord is now processed like any other event.
(WebInspector.TimelineManager.prototype._processNestedRecords): Deleted.
Reverted back to a single pass over the incoming timeline event payload.

* UserInterface/Models/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord):
(WebInspector.LayoutTimelineRecord.prototype.get duringComposite): Deleted.
Removed duringComposite property and constructor parameter. No longer needed.

* UserInterface/Models/RenderingFrameTimelineRecord.js:
(WebInspector.RenderingFrameTimelineRecord.prototype.get children): Deleted.
Removed children property. It now exists on the base class TimelineRecord.
Also removed code that was needed to prevent paint time from being added twice.

* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
(WebInspector.ScriptTimelineRecord):
Removed workaround added in:
<https://webkit.org/b/147025> Web Inspector: REGRESSION (r186218) ScriptTimelineRecord attempts to access null property

* UserInterface/Models/TimelineRecord.js:
(WebInspector.TimelineRecord):
(WebInspector.TimelineRecord.prototype.get children):
Added children property.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype._processPendingRecords):
Now that we preserve the frame's child record hierarchy, we process the entire tree,
yielding richer data grid output:

   Frame X
      Styles Recalculated
         Layout Invalidated
      Composite
         Paint
         Paint

Compared to the previous output:

   Frame X
      Styles Recalculated
      Layout Invalidated
      Composite
      Paint
      Paint

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

5 years ago[CF] Web process continually eating memory on simple, shared Google Docs spreadsheet.
akling@apple.com [Fri, 31 Jul 2015 00:52:45 +0000 (00:52 +0000)]
[CF] Web process continually eating memory on simple, shared Google Docs spreadsheet.
<https://webkit.org/b/147403>
<rdar://problem/18835799>

Reviewed by Geoffrey Garen.

Make sure we service the CFRunLoop on worker threads, since ports using CoreFoundation
will be scheduling garbage collections and heap sweeps using CFRunLoop timers.

This fix is a stopgap. Long term we need a better design for integrating GC tasks with
with the web worker run loop.

* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode): Instead of sleeping forever, calculate a better
wakeup deadline by asking the CFRunLoop when its next timer will fire. Then, when a
timeout occurs, call CFRunLoopRunInMode (with seconds=0) to service pending timers.

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

5 years agoLayoutTests/inspector frequently run slow and timeout when run in WebKit2 but not...
commit-queue@webkit.org [Fri, 31 Jul 2015 00:17:28 +0000 (00:17 +0000)]
LayoutTests/inspector frequently run slow and timeout when run in WebKit2 but not WebKit1
https://bugs.webkit.org/show_bug.cgi?id=147456

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

By default, WebKit2 WebPage's on PLATFORM(COCOA) enabling DOM Timer
throttling. Under testing, this ends up impacting Web Inspector
tests that create their own WKWebView which never gets displayed
and so gets throttled. Disable throttling on the Inspector's view
during testing.

* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _hiddenPageDOMTimerThrottlingEnabled]):
(-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
SPI to toggle DOM timer throttling.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::isUnderTest):
Provide a way to get if we are under test, and set it before
calling into the platform method.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
When testing, disable timer throttling.

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

5 years agoMove locale information into FontDescription
mmaxfield@apple.com [Fri, 31 Jul 2015 00:12:38 +0000 (00:12 +0000)]
Move locale information into FontDescription
https://bugs.webkit.org/show_bug.cgi?id=147457

Reviewed by Andreas Kling.

Currently, the "lang" attribute on a node sets locale information in RenderStyle.
Font selection is sensitive to this locale information, and occurs deep within
platform/ code, far away from RenderStyle. Because every RenderStyle owns a
FontDescription, and font selection can consult with FontDescriptions, it makes
sense to move the variable from RenderStyle to FontDescription, and provide
convenience methods on RenderStyle which inspect its FontDescription for locale
information.

This patch is in preparation for correctly obeying locale information when
performing font fallback.

No new tests because there is no behavior change.

* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWebkitLocale):
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey):
(WebCore::FontDescriptionKey::operator==):
* platform/graphics/FontCascade.cpp:
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::setLocale):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::locale):
(WebCore::FontDescription::initialLocale):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::FontDescription): Deleted.
(WebCore::FontDescription::setScript): Deleted.
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::localeToScriptCodeForFontSelection):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Deleted.
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted.
(WebCore::StyleRareInheritedData::operator==): Deleted.
* rendering/style/StyleRareInheritedData.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

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

5 years agoWeb Inspector: Support smart-pasting in the Rules sidebar panel
drousso@apple.com [Thu, 30 Jul 2015 23:56:51 +0000 (23:56 +0000)]
Web Inspector: Support smart-pasting in the Rules sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=147362

Reviewed by Timothy Hatcher.

When pasting over the selector, if the pasted text matches CSS rule
formatting, replace the selected rule with the selector and text in
the pasted data.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeRule.changeCompleted):
(WebInspector.DOMNodeStyles.prototype.changeRule.styleChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule.changeText):
(WebInspector.DOMNodeStyles.prototype.changeRule.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
(WebInspector.CSSStyleDeclarationSection):

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

5 years agoAdd support for window.open to WK1BrowserWindowController
andersca@apple.com [Thu, 30 Jul 2015 23:51:29 +0000 (23:51 +0000)]
Add support for window.open to WK1BrowserWindowController
https://bugs.webkit.org/show_bug.cgi?id=147474

Reviewed by Dan Bernstein.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
Set javaScriptCanOpenWindowsAutomatically to YES.
If this becomes a nuisance, we can always add a menu item to toggle this.

(-[WK1BrowserWindowController webView:createWebViewWithRequest:]):
Implement this UI delegate method.

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

5 years agoUndo stray commit.
andersca@apple.com [Thu, 30 Jul 2015 23:47:57 +0000 (23:47 +0000)]
Undo stray commit.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
(-[WK1BrowserWindowController webView:createWebViewWithRequest:]):

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

5 years agoRemove stray printf.
andersca@apple.com [Thu, 30 Jul 2015 23:46:11 +0000 (23:46 +0000)]
Remove stray printf.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):

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

5 years agoMake Path::apply() take a function reference
simon.fraser@apple.com [Thu, 30 Jul 2015 23:41:54 +0000 (23:41 +0000)]
Make Path::apply() take a function reference
https://bugs.webkit.org/show_bug.cgi?id=147472

Reviewed by Anders Carlsson.

Path::apply() should take a const reference to a std::function.

* platform/graphics/Path.h:
* platform/graphics/cairo/PathCairo.cpp:
* platform/graphics/cg/PathCG.cpp:
(WebCore::CGPathApplierToPathApplier):
(WebCore::Path::apply):

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

5 years agoAssertion failure when a plug-in loads a resource that redirects somewhere
andersca@apple.com [Thu, 30 Jul 2015 23:38:23 +0000 (23:38 +0000)]
Assertion failure when a plug-in loads a resource that redirects somewhere
https://bugs.webkit.org/show_bug.cgi?id=147469

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: http/tests/plugins/get-url-redirect.html

r186597 moved the call to addPlugInStreamLoader to willSendRequest. This is wrong since
willSendRequest can be invoked more than once.

Fix this by making the initialization phase of NetscapePlugInStreamLoader be more like
SubresourceLoader where we only call addPlugInStreamLoader once we've successfully initialized
the loader, and only call removePlugInStreamLoader if we've called addPlugInStreamLoader.

Also change addPlugInStreamLoader and removePlugInStreamLoader to take references.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::addPlugInStreamLoader):
(WebCore::DocumentLoader::removePlugInStreamLoader):
* loader/DocumentLoader.h:
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::create):
(WebCore::NetscapePlugInStreamLoader::init):
(WebCore::NetscapePlugInStreamLoader::didFinishLoading):
(WebCore::NetscapePlugInStreamLoader::didFail):
(WebCore::NetscapePlugInStreamLoader::didCancel):
(WebCore::NetscapePlugInStreamLoader::notifyDone):
* loader/NetscapePlugInStreamLoader.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Deleted.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::isPlugInStreamLoader): Deleted.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):

LayoutTests:

Add a test.

* http/tests/plugins/get-url-redirect-expected.txt: Added.
* http/tests/plugins/get-url-redirect.html: Added.
* http/tests/plugins/resources/redirection-response.php: Added.

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

5 years agoWeb Inspector: Fix typo in frame duration filtering console.assert message
mattbaker@apple.com [Thu, 30 Jul 2015 23:25:43 +0000 (23:25 +0000)]
Web Inspector: Fix typo in frame duration filtering console.assert message
https://bugs.webkit.org/show_bug.cgi?id=147458

Rubber-stamped by Joseph Pecoraro.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.displayNameForDurationFilter):

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

5 years ago[iOS] Pressing 'done' in fullscreen video sometimes does nothing; stuck in fullscreen
jer.noble@apple.com [Thu, 30 Jul 2015 23:17:45 +0000 (23:17 +0000)]
[iOS] Pressing 'done' in fullscreen video sometimes does nothing; stuck in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=147367

Reviewed by Eric Carlson.

During the request to exit fullscreen, the video element's m_videoFullscreenMode variable
is set, but no exitFullscreen() request is sent up to the UIProcess. Previous threading
issues have been discovered and fixed, but may have been re-introduced (or never fully
fixed in the first place). To solve the bad behavior this threading issue creates, add
a watchdog timer, similar to the one used in the desktop fullscreen controller, to ensure
that if an exit fullscreen request is not acted upon, the UIProcess forcibly exits fullscreen
anyway.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Initialize the timer.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Cancel the timer.
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Set the timer.
(WebVideoFullscreenInterfaceAVKit::watchdogTimerFired): Forcibly exit fullscreen mode.

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

5 years agoClean up makeFontCascadeCacheKey()
mmaxfield@apple.com [Thu, 30 Jul 2015 23:07:09 +0000 (23:07 +0000)]
Clean up makeFontCascadeCacheKey()
https://bugs.webkit.org/show_bug.cgi?id=147430

Reviewed by Benjamin Poulain.

FontDescriptionKey is designed to encapsulate all the cacheable properties of a FontDescription.
However, a higher-level cache, FontCascadeCacheKey, was taking some values from FontDescriptions.
The fact that there wasn't a bug before is just a happy coincidence. This patch moves those bits
from the higher-level cache and puts them into FontDescriptionKey where they belong.

No new tests because there is no behavior change.

* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::makeFlagKey):
* platform/graphics/FontCascade.cpp:
(WebCore::operator==):
(WebCore::makeFontSelectorFlags): Deleted.
(WebCore::makeFontCascadeCacheKey): Deleted.
(WebCore::computeFontCascadeCacheHash): Deleted.

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

5 years ago[iOS] Set AirPlay discovery mode to disabled when page is hidden
eric.carlson@apple.com [Thu, 30 Jul 2015 22:56:20 +0000 (22:56 +0000)]
[iOS] Set AirPlay discovery mode to disabled when page is hidden
https://bugs.webkit.org/show_bug.cgi?id=147455

Reviewed by Enrica Casucci.

* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Set discovery mode to disabled after
  the picker has been closed.
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Ditto.

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

5 years ago[Mac] Media Session: add support for more telephony interruptions
mrajca@apple.com [Thu, 30 Jul 2015 22:26:20 +0000 (22:26 +0000)]
[Mac] Media Session: add support for more telephony interruptions
https://bugs.webkit.org/show_bug.cgi?id=147079

Reviewed by Eric Carlson.

* platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm:
(WebCore::callDidEndRinging): End 'Transient' interruptions.
(WebCore::callDidConnect): Forward this event to media sessions as a 'Content' interruption.
(WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions): Register observers for new
 notification types.
(WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions): Unregister all observers.

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

5 years agoMedia Session: test Play/Pause media control events delivered to non-Content media...
mrajca@apple.com [Thu, 30 Jul 2015 22:13:46 +0000 (22:13 +0000)]
Media Session: test Play/Pause media control events delivered to non-Content media sessions https://bugs.webkit.org/show_bug.cgi?id=147414

Reviewed by Eric Carlson.

* media/session/play-pause-media-events-in-non-content-sessions-expected.txt: Added.
* media/session/play-pause-media-events-in-non-content-sessions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoMedia Session: test Play/Pause media control events delivered to Content media sessions
mrajca@apple.com [Thu, 30 Jul 2015 21:58:23 +0000 (21:58 +0000)]
Media Session: test Play/Pause media control events delivered to Content media sessions
https://bugs.webkit.org/show_bug.cgi?id=147413

Reviewed by Eric Carlson.

* media/session/play-pause-media-events-in-content-sessions-expected.txt: Added.
* media/session/play-pause-media-events-in-content-sessions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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