WebKit-https.git
6 years agoGoing back after resizing causes scroll knob to appear in the middle of the page
timothy_horton@apple.com [Wed, 13 May 2015 20:51:37 +0000 (20:51 +0000)]
Going back after resizing causes scroll knob to appear in the middle of the page
https://bugs.webkit.org/show_bug.cgi?id=144968
<rdar://problem/18299827>

Reviewed by Beth Dakin.

* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
(WebCore::CachedPage::clear):
* history/CachedPage.h:
(WebCore::CachedPage::markForContentsSizeChanged):
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForContentsSizeChanged):
* history/PageCache.h:
Add a flag that will cause us to call updateContentsSize() after a page
comes out of the page cache, if necessary.

* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize):
* page/FrameView.h:
Mark all cached pages for this frame as needing updateContentsSize()
when setContentsSize happens. This will ensure that scrollbar layers
are repositioned when coming out of the page cache.

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

6 years ago[Mac] Sandbox violation reading SubmitDiagInfo.domains
ap@apple.com [Wed, 13 May 2015 20:42:18 +0000 (20:42 +0000)]
[Mac] Sandbox violation reading SubmitDiagInfo.domains
https://bugs.webkit.org/show_bug.cgi?id=144962
rdar://problem/20719330

Reviewed by Darin Adler.

* WebProcess/com.apple.WebProcess.sb.in:

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

6 years agoSpeculative build fix.
bdakin@apple.com [Wed, 13 May 2015 19:59:35 +0000 (19:59 +0000)]
Speculative build fix.

* UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:

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

6 years ago[GTK][CMake] Extra include directory when libnotify is present but disabled
mcatanzaro@igalia.com [Wed, 13 May 2015 19:56:30 +0000 (19:56 +0000)]
[GTK][CMake] Extra include directory when libnotify is present but disabled
https://bugs.webkit.org/show_bug.cgi?id=144941

Reviewed by Martin Robinson.

Add LIBNOTIFY_INCLUDE_DIRS to WebKit2_INCLUDE_DIRECTORIES only if USE_LIBNOTIFY is true,
rather than checking LIBNOTIFY_FOUND.

* PlatformGTK.cmake:

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

6 years agoNeed SPI to set the overlay scroll bar style
bdakin@apple.com [Wed, 13 May 2015 19:28:21 +0000 (19:28 +0000)]
Need SPI to set the overlay scroll bar style
https://bugs.webkit.org/show_bug.cgi?id=144928
-and corresponding-
rdar://problem/20143614

Reviewed by Anders Carlsson.

Source/WebCore:

New ChromeClient function preferredScrollbarOverlayStyle() will fetch the
scrollbar style that was set via the new SPI.
* page/ChromeClient.h:

If the preferredScrollbarOverlayStyle() is anything but None, then use it. None is
used to indicate that the normal heuristic should compute the appropriate color.
* page/FrameView.cpp:
(WebCore::FrameView::recalculateScrollbarOverlayStyle):
* page/FrameView.h:

Source/WebKit2:

Make scrollbarOverlayStyle a part of the creation parameters.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:

New SPI.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setOverlayScrollbarStyle:]):
(-[WKView _overlayScrollbarStyle]):

Store m_scrollbarOverlayStyle on WebPageProxy, and set it to the WebProcess.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setOverlayScrollbarStyle):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::overlayScrollbarStyle):
* WebKit2.xcodeproj/project.pbxproj:

Return WebPage’s scrollbarOverlayStyle().
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Cache the scrollbarOverlayStyle() here for the WebProcess.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setScrollbarOverlayStyle):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::scrollbarOverlayStyle):
* WebProcess/WebPage/WebPage.messages.in:

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

6 years agoScrollbars in overflow regions are not vanishing after scrolling with scroll snap...
bfulgham@apple.com [Wed, 13 May 2015 19:26:50 +0000 (19:26 +0000)]
Scrollbars in overflow regions are not vanishing after scrolling with scroll snap points
https://bugs.webkit.org/show_bug.cgi?id=142521
<rdar://problem/20100706>

Reviewed by Darin Adler.

The scrollbars were not being dismissed because they were not being notified that the wheel
gesture was finished. This was happening because the wheel event 'ended' state has zero
deltaX and deltaY. If the region did not allow stretching, it would exit early, never passing
through the 'handleWheelEventPhase' code that would notify the scrollbar controller that
the gesture had ended.

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::mouseExitedContentArea): The wrong ScrollAnimator method was being
called when the mouse exited the content area.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent): Do not early return when the wheel event has
no change in X or Y coordinate.

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

6 years agoRename some StorageManager functions to indicate that they work on local storage...
andersca@apple.com [Wed, 13 May 2015 19:24:10 +0000 (19:24 +0000)]
Rename some StorageManager functions to indicate that they work on local storage entries
https://bugs.webkit.org/show_bug.cgi?id=144958
First part of rdar://problem/10690447.

Reviewed by Beth Dakin.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageDetailsByOrigin):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteAllLocalStorageEntries):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::getOrigins): Deleted.
(WebKit::StorageManager::getStorageDetailsByOrigin): Deleted.
(WebKit::StorageManager::deleteEntriesForOrigin): Deleted.
(WebKit::StorageManager::deleteAllEntries): Deleted.
(WebKit::StorageManager::deleteEntriesForOrigins): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):

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

6 years agoCrash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening...
commit-queue@webkit.org [Wed, 13 May 2015 19:20:42 +0000 (19:20 +0000)]
Crash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening new page
https://bugs.webkit.org/show_bug.cgi?id=144957

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-05-13
Reviewed by Simon Fraser.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::attachAvailabilityChanged):

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

6 years agoDon't compute selection painting info when we don't have selection.
hyatt@apple.com [Wed, 13 May 2015 18:56:15 +0000 (18:56 +0000)]
Don't compute selection painting info when we don't have selection.
https://bugs.webkit.org/show_bug.cgi?id=144920
<rdar://problem/20919920>

Reviewed by Simon Fraser.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):

Just set the selection paint style to the text paint style when we don't have a selection
at all. Computing the selection style takes time in the case where a ::selection pseudo is
used on the page, so we don't want to waste time computing that info unless it's actually
needed.

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

6 years agoAvoid always running some debug code in type profiling
joepeck@webkit.org [Wed, 13 May 2015 18:51:46 +0000 (18:51 +0000)]
Avoid always running some debug code in type profiling
https://bugs.webkit.org/show_bug.cgi?id=144775

Reviewed by Daniel Bates.

* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::processLogEntries):

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

6 years agoPass String as reference in more places
joepeck@webkit.org [Wed, 13 May 2015 18:51:44 +0000 (18:51 +0000)]
Pass String as reference in more places
https://bugs.webkit.org/show_bug.cgi?id=144769

Reviewed by Daniel Bates.

Source/JavaScriptCore:

* debugger/Breakpoint.h:
(JSC::Breakpoint::Breakpoint):
* parser/Parser.h:
(JSC::Parser::setErrorMessage):
(JSC::Parser::updateErrorWithNameAndMessage):
* parser/ParserError.h:
(JSC::ParserError::ParserError):
* runtime/RegExp.cpp:
(JSC::RegExpFunctionalTestCollector::outputOneTest):
* runtime/RegExpObject.cpp:
(JSC::regExpObjectSourceInternal):
* runtime/TypeProfiler.cpp:
(JSC::TypeProfiler::typeInformationForExpressionAtOffset):
* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::processLogEntries):
* runtime/TypeProfilerLog.h:
* tools/FunctionOverrides.cpp:
(JSC::initializeOverrideInfo):
* inspector/scripts/codegen/generate_objc_conversion_helpers.py:
(ObjCConversionHelpersGenerator._generate_enum_from_protocol_string):

* inspector/scripts/codegen/objc_generator_templates.py:
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/enum-values.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
Rebaseline tests after updating the generator.

Source/WebCore:

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpString):
(WebCore::CloneSerializer::dumpStringObject):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarker):
* dom/DocumentMarkerController.h:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorNodeFinder.cpp:
(WebCore::stripCharacters):
(WebCore::InspectorNodeFinder::InspectorNodeFinder):
* inspector/InspectorNodeFinder.h:

Source/WebKit2:

* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::showMainResourceForFrame):
* WebProcess/WebPage/WebInspectorUI.h:

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

6 years agoView scale changes are temporarily lost after restoring a page from the page cache
timothy_horton@apple.com [Wed, 13 May 2015 18:11:38 +0000 (18:11 +0000)]
View scale changes are temporarily lost after restoring a page from the page cache
https://bugs.webkit.org/show_bug.cgi?id=144934

Reviewed by Brady Eidson.

* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
(WebCore::CachedPage::clear):
* history/CachedPage.h:
(WebCore::CachedPage::markForDeviceOrPageScaleChanged): Renamed.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Renamed.
* history/PageCache.h:
Rename PageCache/CachedPage methods to make it more clear that they
will eventually result in calling deviceOrPageScaleFactorChanged().
Also, use modern initialization for CachedPage members.

* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
Store the pageScaleFactor on HistoryItem with the view scale factored out,
because the view scale can change while the page is in the page cache, and
WebCore needs a way - without consulting with WebKit2 - to apply the changed
view scale to the cached page scale.

* page/Page.cpp:
(WebCore::Page::setViewScaleFactor):
(WebCore::Page::setDeviceScaleFactor):
* page/Page.h:
(WebCore::Page::viewScaleFactor):
Keep track of the viewScaleFactor, and mark all pages in the page cache
as needing to call deviceOrPageScaleFactorChanged and do a full style recalc
when they come back from the page cache.

For now, we expect all callers of setPageScaleFactor (including WebKit2 and
HistoryController) to multiply the viewScale in manually, to avoid the
significant amount of change in WebCore that would be required to keep them
totally separately.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::scalePageInViewCoordinates):
(WebKit::WebPage::pageScaleFactor):
(WebKit::WebPage::viewScaleFactor):
(WebKit::WebPage::scaleView):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::viewScaleFactor): Deleted.
Get rid of m_viewScaleFactor, instead using Page::viewScaleFactor.

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

6 years agocom.apple.WebKit.WebContent crashed at JavaScriptCore: JSC::CodeBlock::finalizeUncond...
msaboff@apple.com [Wed, 13 May 2015 17:58:59 +0000 (17:58 +0000)]
com.apple.WebKit.WebContent crashed at JavaScriptCore: JSC::CodeBlock::finalizeUnconditionally
https://bugs.webkit.org/show_bug.cgi?id=144933

Changed the RELEASE_ASSERT_NOT_REACHED into an ASSERT.  Added some diagnostic messages to
help determine the cause for any crash.

Reviewed by Geoffrey Garen.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):

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

6 years agoREGRESSION(r184260): arguments elimination has stopped working because of Check(Untyp...
fpizlo@apple.com [Wed, 13 May 2015 17:39:02 +0000 (17:39 +0000)]
REGRESSION(r184260): arguments elimination has stopped working because of Check(UntypedUse:) from SSAConversionPhase
https://bugs.webkit.org/show_bug.cgi?id=144951

Reviewed by Michael Saboff.

There were two issues here:

- In r184260 we expected a small number of possible use kinds in Check nodes, and
  UntypedUse was not one of them. That seemed like a sensible assumption because we don't
  create Check nodes unless it's to have a check. But, SSAConversionPhase was creating a
  Check that could have UntypedUse. I fixed this. It's cleaner for SSAConversionPhase to
  follow the same idiom as everyone else and not create tautological checks.

- It's clearly not very robust to assume that Checks will not be used tautologically. So,
  this changes how we validate Checks in the escape analyses. We now use willHaveCheck,
  which catches cases that AI would have already marked as unnecessary. It then also uses
  a new helper called alreadyChecked(), which allows us to just ask if the check is
  unnecessary for objects. That's a good fall-back in case AI hadn't run yet.

* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGMayExit.cpp:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGUseKind.h:
(JSC::DFG::alreadyChecked):
* dfg/DFGVarargsForwardingPhase.cpp:

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

6 years ago[ES6] Implement String.raw
utatane.tea@gmail.com [Wed, 13 May 2015 16:48:33 +0000 (16:48 +0000)]
[ES6] Implement String.raw
https://bugs.webkit.org/show_bug.cgi?id=144330

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Implement String.raw. It is intended to be used with tagged-templates syntax.
To implement ToString abstract operation efficiently,
we introduce @toString bytecode intrinsic. It emits op_to_string directly.

* CMakeLists.txt:
* builtins/StringConstructor.js: Added.
(raw):
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emit_intrinsic_toString):
* runtime/CommonIdentifiers.h:
* runtime/StringConstructor.cpp:
* tests/stress/string-raw.js: Added.
(shouldBe):
(.get shouldBe):
(Counter):

LayoutTests:

Add String.raw.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

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

6 years agoMinor cleanups to PluginProxy.cpp.
commit-queue@webkit.org [Wed, 13 May 2015 09:31:21 +0000 (09:31 +0000)]
Minor cleanups to PluginProxy.cpp.
https://bugs.webkit.org/show_bug.cgi?id=144948

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-13
Reviewed by Gyuyoung Kim.

1. Remove unnecessary #include.
2. Remove unnecessary return statement from PluginProxy::paint().

No new tests, no behavior change.

* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):

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

6 years agoREGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
commit-queue@webkit.org [Wed, 13 May 2015 09:13:41 +0000 (09:13 +0000)]
REGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=144906

Patch by Daegyu Lee <daegyu.lee@navercorp.com> on 2015-05-13
Reviewed by Gyuyoung Kim.

* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::updateMinimumScaleToFit): Recover the r176631 condition to
call applyScaleAfterRenderingContents function to apply correct scale.

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

6 years agoReduce TransformationMatrix copies in MatrixTransformOperation, Matrix3DTransformOper...
zandobersek@gmail.com [Wed, 13 May 2015 06:47:21 +0000 (06:47 +0000)]
Reduce TransformationMatrix copies in MatrixTransformOperation, Matrix3DTransformOperation
https://bugs.webkit.org/show_bug.cgi?id=144797

Reviewed by Darin Adler.

Using std::swap() on TransformationMatrix objects which don't
provide move constructors will result in copies.

Instead, use a helper function in both MatrixTransformOperation
and Matrix3DTransformOperation that calls TransformationMatrix::blend()
and returns the new Matrix(3D)TransformOperation object, and call it
with fromT and toT arguments switched when blending to identity.

* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::createOperation):
(WebCore::Matrix3DTransformOperation::blend):
* platform/graphics/transforms/Matrix3DTransformOperation.h: No need
to copy the m_matrix member, it won't change when passed to
TransformationMatrix::multiply().
* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::createOperation):
(WebCore::MatrixTransformOperation::blend):

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

6 years ago[EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked
carlosgc@webkit.org [Wed, 13 May 2015 06:18:22 +0000 (06:18 +0000)]
[EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked
https://bugs.webkit.org/show_bug.cgi?id=144909

Reviewed by Sergio Villar Senin and Žan Doberšek.

The pixmap is created and passed to eglCreatePixmapSurface(), but
never released. eglCreatePixmapSurface() doesn't take the
ownership of the pixmap, so we should explicitly free it when the
GLContextEGL is destroyed.

* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createPixmapContext): Use XUniquePixmap
and transfer the ownership to the context by using the new
constructor that receives a XUniquePixmap&&.
(WebCore::GLContextEGL::createContext): createPixmapContext() is
now only defined for X11.
(WebCore::GLContextEGL::GLContextEGL): New constructor that
receives a XUniquePixmap&&.
* platform/graphics/egl/GLContextEGL.h: Add new constructor and
initialize the cairo device when defined to simplify constructors.

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

6 years agoUnreviewed build fix.
rniwa@webkit.org [Wed, 13 May 2015 05:44:07 +0000 (05:44 +0000)]
Unreviewed build fix.

Added the missing metric name and wrapped values in an array as done in SunSpider.patch.

* Scripts/webkitpy/benchmark_runner/data/patches/Kraken.patch:

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

6 years agoTemporarily disable the test on Windows. The failure is tracked in webkit.org/b/144897.
rniwa@webkit.org [Wed, 13 May 2015 05:39:50 +0000 (05:39 +0000)]
Temporarily disable the test on Windows. The failure is tracked in webkit.org/b/144897.

* tests/stress/arith-mul-with-constants.js:

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

6 years agoReindent DIBPixelData.h for consistency.
commit-queue@webkit.org [Wed, 13 May 2015 05:31:25 +0000 (05:31 +0000)]
Reindent DIBPixelData.h for consistency.
https://bugs.webkit.org/show_bug.cgi?id=144942

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-12
Reviewed by Darin Adler.

No new tests, no behavior change.

* platform/graphics/win/DIBPixelData.h:
(WebCore::DIBPixelData::DIBPixelData):
(WebCore::DIBPixelData::buffer):
(WebCore::DIBPixelData::bufferLength):
(WebCore::DIBPixelData::size):
(WebCore::DIBPixelData::bytesPerRow):
(WebCore::DIBPixelData::bitsPerPixel):

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

6 years agofast/text/simple-line-layout-text-stroke-width.html fails on Windows
ap@apple.com [Wed, 13 May 2015 05:25:52 +0000 (05:25 +0000)]
fast/text/simple-line-layout-text-stroke-width.html fails on Windows

* platform/win/TestExpectations: Mark it as such. The tets likely needs to be
improved to work cross-platform.

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

6 years agojs/dom/stack-trace.html fails with eager compilation
fpizlo@apple.com [Wed, 13 May 2015 05:21:16 +0000 (05:21 +0000)]
js/dom/stack-trace.html fails with eager compilation
https://bugs.webkit.org/show_bug.cgi?id=144853

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

All of our escape analyses were mishandling Check(). They were assuming that this is a
non-escaping operation. But, if we do for example a Check(Int32:@x) and @x is an escape
candidate, then we need to do something: if we eliminate or sink @x, then the check no
longer makes any sense since a phantom allocation has no type. This will make us forget
that this operation would have exited. This was causing us to not call a valueOf method in
js/dom/stack-trace.html with eager compilation enabled, because it was doing something like
+o where o had a valueOf method, and o was otherwise sinkable.

This changes our escape analyses to basically pretend that any Check() that isn't obviously
unnecessary is an escape. We don't have to be super careful here. Most checks will be
completely eliminated by constant-folding. If that doesn't run in time, then the most
common check we will see is CellUse. So, we just recognize some very obvious check kinds
that we know would have passed, and for all of the rest we just assume that it's an escape.

This was super tricky to test. The obvious way to test it is to use +o like
stack-trace.html, except that doing so relies on the fact that we still haven't implemented
the optimal behavior for op_to_number. So, I take four approaches in testing this patch:

1) Use +o. These will test what we want it to test for now, but at some point in the future
   these tests will just be a good sanity-check that our op_to_number implementation is
   right.

2) Do fancy control flow tricks to fool the profiling into thinking that some arithmetic
   operation always sees integers even though we eventually feed it an object and that
   object is a sink candidate.

3) Introduce a new jsc.cpp intrinsic called isInt32() which returns true if the incoming
   value is an int32. This intrinsic is required to be implemented by DFG by
   unconditionally speculating that the input is int32. This allows us to write much more
   targetted tests of the underlying issue.

4) I made a version of stack-trace.html that runs in run-jsc-stress-tests, so that we can
   get regression test coverage of this test in eager mode.

* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGVarargsForwardingPhase.cpp:
* ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dumpInContext):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileFTLOSRExit):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionIsInt32):
* runtime/Intrinsic.h:
* tests/stress/sink-arguments-past-invalid-check-dfg.js: Added.
* tests/stress/sink-arguments-past-invalid-check-int32-dfg.js: Added.
* tests/stress/sink-arguments-past-invalid-check-int32.js: Added.
* tests/stress/sink-arguments-past-invalid-check-sneakier.js: Added.
* tests/stress/sink-arguments-past-invalid-check.js: Added.
* tests/stress/sink-function-past-invalid-check-sneakier.js: Added.
* tests/stress/sink-function-past-invalid-check-sneaky.js: Added.
* tests/stress/sink-object-past-invalid-check-int32.js: Added.
* tests/stress/sink-object-past-invalid-check-sneakier.js: Added.
* tests/stress/sink-object-past-invalid-check-sneaky.js: Added.
* tests/stress/sink-object-past-invalid-check.js: Added.

LayoutTests:

Make a copy of the stack-trace test that only runs in run-jsc-stress-tests. Sadly, we don't
have a good way of having different expectation files for when a test runs in RJST versus
RWT. So, the approach I take is that I make a copy of the test just for RJST and I exclude
the .html file, which makes RWT overlook it. The test has different expectations in the
two harnesses because it does some small DOM things.

* js/script-tests/stack-trace.js: Added.
* js/stack-trace-expected.txt: Added.

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

6 years agoUnreviewed, rolling out r184224.
commit-queue@webkit.org [Wed, 13 May 2015 05:18:01 +0000 (05:18 +0000)]
Unreviewed, rolling out r184224.
https://bugs.webkit.org/show_bug.cgi?id=144946

Made inspector/page/main-frame-resource.html assert every time
(Requested by ap on #webkit).

Reverted changeset:

"Web Inspector: REGRESSION (r181625): Timeline recording
started from console.profile is always empty"
https://bugs.webkit.org/show_bug.cgi?id=144882
http://trac.webkit.org/changeset/184224

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

6 years agoIn Safari, Debug > Get Bytecode Profile crashes the Web Content process
mitz@apple.com [Wed, 13 May 2015 04:38:39 +0000 (04:38 +0000)]
In Safari, Debug > Get Bytecode Profile crashes the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=144944

Reviewed by Darin Adler.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
because it is when the profiler is disabled, which is the default. In that case, return
after sending back the empty string, rather than continuing to dereference a null pointer.

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

6 years ago[Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks...
jer.noble@apple.com [Wed, 13 May 2015 04:10:54 +0000 (04:10 +0000)]
[Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks' property not yet loaded
https://bugs.webkit.org/show_bug.cgi?id=144937

Reviewed by Eric Carlson.

Querying for the -[AVAsset tracks] property blocks for network loading; and could
block forever if the asset in question is not reachable. Add a "safe" mechanism for
querying the list of audible tracks, and use that when providing the audioSourceProvider()
with an audible track.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeAVAssetTracksForAudibleMedia):

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

6 years agoIf JSC cannot get executable memory, it shouldn't call madvise
msaboff@apple.com [Wed, 13 May 2015 04:02:09 +0000 (04:02 +0000)]
If JSC cannot get executable memory, it shouldn't call madvise
https://bugs.webkit.org/show_bug.cgi?id=144931

Reviewed by Mark Lam.

Made calling madvise conditional on really getting mmapped memory.

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):

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

6 years agoCrash when using <input type=file>
jhoneycutt@apple.com [Wed, 13 May 2015 03:51:19 +0000 (03:51 +0000)]
Crash when using <input type=file>

<https://bugs.webkit.org/show_bug.cgi?id=144939>
<rdar://problem/20172315>

Reviewed by Andy Estes.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
WKFileUploadPanel can outlive it.

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

6 years agoAX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
jdiggs@igalia.com [Wed, 13 May 2015 03:42:25 +0000 (03:42 +0000)]
AX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
https://bugs.webkit.org/show_bug.cgi?id=144936

Unreviewed gardening.

Adding the platform-specific expectations for Windows now that the
accessibility tree is being correctly generated for this test.

* platform/win/accessibility/aria-menubar-menuitems-expected.txt: Added.

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

6 years agoMac build fix after r184228.
rniwa@webkit.org [Wed, 13 May 2015 03:08:50 +0000 (03:08 +0000)]
Mac build fix after r184228.

* bindings/scripts/CodeGeneratorJS.pm:

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

6 years agoTurn antialiased font dilation off by default
simon.fraser@apple.com [Wed, 13 May 2015 02:01:22 +0000 (02:01 +0000)]
Turn antialiased font dilation off by default
https://bugs.webkit.org/show_bug.cgi?id=144940
rdar://problem/20923031

Reviewed by Sam Weinig.
Source/WebCore:

Turn antialised font dilation off by default.

* page/Settings.cpp:
(WebCore::Settings::Settings):
* platform/graphics/FontCascade.cpp:

Source/WebKit/mac:

Turn antialised font dilation off by default.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:

Turn antialised font dilation off by default.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:

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

6 years agoFix the iteration count of arith-modulo-node-behaviors.js
benjamin@webkit.org [Wed, 13 May 2015 01:52:52 +0000 (01:52 +0000)]
Fix the iteration count of arith-modulo-node-behaviors.js

* tests/stress/arith-modulo-node-behaviors.js:
No need for big numbers for the real testing.

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

6 years agoWindows: Cannot use HANDLE from GetCurrentThread() to get the CONTEXT of another...
mark.lam@apple.com [Wed, 13 May 2015 01:47:15 +0000 (01:47 +0000)]
Windows: Cannot use HANDLE from GetCurrentThread() to get the CONTEXT of another thread.
https://bugs.webkit.org/show_bug.cgi?id=144924

Reviewed by Alex Christensen.

The present stack scanning code in the Windows port is expecting that the
GetCurrentThread() API will provide a unique HANDLE for each thread.  The code
then saves and later uses that HANDLE with GetThreadContext() to get the
runtime state of the target thread from the GC thread.  According to
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683182(v=vs.85).aspx,
GetCurrentThread() does not provide this unique HANDLE that we expect:

    "The function cannot be used by one thread to create a handle that can
    be used by other threads to refer to the first thread. The handle is
    always interpreted as referring to the thread that is using it. A
    thread can create a "real" handle to itself that can be used by other
    threads, or inherited by other processes, by specifying the pseudo
    handle as the source handle in a call to the DuplicateHandle function."

As a result of this, GetCurrentThread() always returns the same HANDLE value, and
we end up never scanning the stacks of other threads because we wrongly think that
they are all equal (in identity) to the scanning thread.  This, in turn, results
in crashes due to objects that are incorrectly collected.

The fix is to call DuplicateHandle() to create a HANDLE that we can use.  The
MachineThreads::Thread class already accurately tracks the period of time when
we need that HANDLE for the VM.  Hence, the life-cycle of the HANDLE can be tied
to the life-cycle of the MachineThreads::Thread object for the corresponding thread.

* heap/MachineStackMarker.cpp:
(JSC::getCurrentPlatformThread):
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::Thread::~Thread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):

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

6 years agoDon't export all JS bindings classes.
achristensen@apple.com [Wed, 13 May 2015 01:47:00 +0000 (01:47 +0000)]
Don't export all JS bindings classes.
https://bugs.webkit.org/show_bug.cgi?id=144932

Reviewed by Dan Bernstein.

This change is good if it compiles and links successfully.

* bindings/scripts/CodeGeneratorJS.pm:
(ExportLabelForClass):
Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.h:
Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.

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

6 years agoAX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
jdiggs@igalia.com [Wed, 13 May 2015 01:43:26 +0000 (01:43 +0000)]
AX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
https://bugs.webkit.org/show_bug.cgi?id=144936

Reviewed by Chris Fleizach.

Use focusedElement + childAtIndex rather than accessibleElementById
as the latter seems to be failing, and the former worked on Windows
to get the menubar in the original version of this test.

* accessibility/aria-menubar-menuitems.html: Modified.

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

6 years ago[Win] Update DXSDK_DIR settings for build system.
bfulgham@apple.com [Wed, 13 May 2015 00:57:16 +0000 (00:57 +0000)]
[Win] Update DXSDK_DIR settings for build system.

Unreviewed build fix.

* WebCore.vcxproj/WebCore.proj: Add DXSDK_DIR definition for builder.

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

6 years agoReturn Ref instead of PassRefPtr in create() factory functions of WebCore/dom
gyuyoung.kim@webkit.org [Wed, 13 May 2015 00:30:29 +0000 (00:30 +0000)]
Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=144904

Reviewed by Andreas Kling.

We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr.

No new tests, no behavior changes.

* dom/AutocompleteErrorEvent.h:
* dom/DOMNamedFlowCollection.h:
(WebCore::DOMNamedFlowCollection::create):
* dom/MessageChannel.h:
(WebCore::MessageChannel::create):
* dom/MessagePort.h:
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::create):
* dom/MutationObserver.h:
* dom/NamedFlowCollection.h:
* dom/NodeFilter.h:
(WebCore::NodeFilter::create):
* dom/NodeIterator.h:
(WebCore::NodeIterator::create):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::create):
* dom/ProcessingInstruction.h:
* dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::create):
* dom/SecurityPolicyViolationEvent.h:
* dom/StaticNodeList.h:
* dom/TemplateContentDocumentFragment.h:
* dom/Touch.cpp:
(WebCore::Touch::cloneWithNewTarget):
* dom/Touch.h:
(WebCore::Touch::create):
* dom/TouchEvent.h:
* dom/TouchList.h:
(WebCore::TouchList::create):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::create):
* dom/WebKitNamedFlow.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::create):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::create):

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

6 years agoWeb Inspector: REGRESSION (r181625): Timeline recording started from console.profile...
mattbaker@apple.com [Tue, 12 May 2015 23:13:01 +0000 (23:13 +0000)]
Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
https://bugs.webkit.org/show_bug.cgi?id=144882

Reviewed by Brian Burg.

A timeline recording will always be stopped before the end of the current run loop is observed. Before
dispatching the recording stopped event, the last run loop record must be completed and sent to the frontend
to prevent it from being discarded.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStop):

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

6 years agoMake {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
dbates@webkit.org [Tue, 12 May 2015 22:06:44 +0000 (22:06 +0000)]
Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
https://bugs.webkit.org/show_bug.cgi?id=144886

Reviewed by Darin Adler.

{Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
interface that defines the callbacks that ProcessThrottler makes to a client. We
do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
So, we should use private inheritance to represent the relationship between
{Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.

Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
of holding a smart pointer to a ProcessThrottler instance because we always want to
have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
(WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
m_throttler by reference instead of by pointer.
(WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
(WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
* UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
(WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
a lvalue reference instead of a pointer.
(WebKit::ProcessThrottler::updateAssertion): Ditto.
(WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
* UIProcess/ProcessThrottler.h: Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
(WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
m_throttler by reference instead of by pointer.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
(WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
* UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
(WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.

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

6 years agoFix the previous commit, which made both bubbles green.
rniwa@webkit.org [Tue, 12 May 2015 21:50:16 +0000 (21:50 +0000)]
Fix the previous commit, which made both bubbles green.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line.good .bubble):
(.status-line.bad .bubble):
(.status-line.good .message):

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

6 years agoPeople with Deuteranopia can't tell red and green apart on bot watcher's dashboard
rniwa@webkit.org [Tue, 12 May 2015 21:30:21 +0000 (21:30 +0000)]
People with Deuteranopia can't tell red and green apart on bot watcher's dashboard
https://bugs.webkit.org/show_bug.cgi?id=144929

Reviewed by Eric Carlson.

Tweaked colors as I see fit.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line.good .bubble):
(.status-line.bad .bubble):

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

6 years ago[JSC] Make the NegZero backward propagated flags of ArithMod stricter
benjamin@webkit.org [Tue, 12 May 2015 21:28:43 +0000 (21:28 +0000)]
[JSC] Make the NegZero backward propagated flags of ArithMod stricter
https://bugs.webkit.org/show_bug.cgi?id=144897

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-05-12
Reviewed by Geoffrey Garen.

The NegZero flags of ArithMod were the same as ArithDiv: both children were
marked as needing to handle NegativeZero.

Lucky for us, ArithMod is quite a bit different than ArithDiv.

First, the sign of the result is completely independent from
the sign of the divisor. A zero on the divisor always produces a NaN.
That's great, we can remove the NodeBytecodeNeedsNegZero
from the flags propagated to child2.

Second, the sign of the result is always the same as the sign of
the dividend. A dividend of zero produces a zero of same sign
unless the divisor is zero (in which case the result is NaN).
This is great too: we can just pass the flags we got into
ArithMod.

With those two out of the way, we can make a faster version of ArithRound
for Kraken's oscillator. Since we no longer care about negative zero,
rounding becomes cast<int32>(value + 0.5). This gives ~3% faster runtime
on the benchmark.

Unfortunatelly, most of the time is spent in FTL and the same optimization
does not apply well just yet: rdar://problem/20904149.

* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
Never add NodeBytecodeNeedsNegZero unless needed by the users of this node.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithRound):
Faster Math.round() when negative zero is not important.

* tests/stress/arith-modulo-node-behaviors.js: Added.
(moduloWithNegativeZeroDividend):
(moduloWithUnusedNegativeZeroDividend):
(moduloWithNegativeZeroDivisor):

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

6 years agoREGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
zalan@apple.com [Tue, 12 May 2015 21:24:37 +0000 (21:24 +0000)]
REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
https://bugs.webkit.org/show_bug.cgi?id=144917
rdar://problem/20545878

Reviewed by Andreas Kling.

This patch ensures that text stroke width value is taken into account while
calculating visual overflow for simple line layout.
Ceiling the text stroke width value matches the normal text layout behaviour.

Source/WebCore:

Test: fast/text/simple-line-layout-text-stroke-width.html

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):

LayoutTests:

* fast/text/simple-line-layout-text-stroke-width-expected.txt: Added.
* fast/text/simple-line-layout-text-stroke-width.html: Added.

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

6 years agoRefactor MachineStackMarker.cpp so that it's easier to reason about MachineThreads...
mark.lam@apple.com [Tue, 12 May 2015 21:20:26 +0000 (21:20 +0000)]
Refactor MachineStackMarker.cpp so that it's easier to reason about MachineThreads::Thread.
https://bugs.webkit.org/show_bug.cgi?id=144925

Reviewed by Michael Saboff.

Currently, the code in MachineStackMarker.cpp is written as a bunch of functions that
operate on the platformThread value in the MachineThreads::Thread struct.  Instead, we
can apply better OO encapsulation and convert all these functions into methods of the
MachineThreads::Thread struct.

This will also make it easier to reason about the fix for
https://bugs.webkit.org/show_bug.cgi?id=144924 later.

* heap/MachineStackMarker.cpp:
(JSC::getCurrentPlatformThread):
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::Thread::operator!=):
(JSC::MachineThreads::Thread::operator==):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThreadIfFound):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::freeRegisters):
(JSC::MachineThreads::Thread::captureStack):
(JSC::MachineThreads::tryCopyOtherThreadStack):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::equalThread): Deleted.
(JSC::suspendThread): Deleted.
(JSC::resumeThread): Deleted.
(JSC::getPlatformThreadRegisters): Deleted.
(JSC::otherThreadStackPointer): Deleted.
(JSC::freePlatformThreadRegisters): Deleted.
(JSC::otherThreadStack): Deleted.

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

6 years agoArray.slice should have a fast path like Array.splice
rniwa@webkit.org [Tue, 12 May 2015 21:04:10 +0000 (21:04 +0000)]
Array.slice should have a fast path like Array.splice
https://bugs.webkit.org/show_bug.cgi?id=144901

Reviewed by Geoffrey Garen.

Add a fast memcpy path to Array.prototype.slice as done for Array.prototype.splice.
In Kraken, this appears to be 30% win on stanford-crypto-ccm and 10% win on stanford-crypto-pbkdf2.

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSlice):
* runtime/JSArray.cpp:
(JSC::JSArray::fastSlice): Added.
* runtime/JSArray.h:

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

6 years agoBuild fix.
ap@apple.com [Tue, 12 May 2015 21:02:41 +0000 (21:02 +0000)]
Build fix.

* platform/spi/cf/CFNetworkSPI.h:

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

6 years agoProduction builds should link against the shims directly
andersca@apple.com [Tue, 12 May 2015 20:46:34 +0000 (20:46 +0000)]
Production builds should link against the shims directly
https://bugs.webkit.org/show_bug.cgi?id=144922
rdar://problem/19708579

Reviewed by Dan Bernstein.

* Configurations/NetworkService.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against SecItemShim.dylib where possible.

* Configurations/PluginProcessShim.xcconfig:
Set the install name and install path.

* Configurations/PluginService.32.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against PluginProcessShim.dylib where possible.

* Configurations/PluginService.64.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against PluginProcessShim.dylib where possible.

* Configurations/SecItemShim.xcconfig:
Set the install name and install path.

* Configurations/WebContentService.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against WebProcessShim.dylib where possible.

* Configurations/WebProcessShim.xcconfig:
Set the install name and install path.

* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

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

6 years agoROLLOUT [Win] Unreviewed build fix for older DirectX build environments.
bfulgham@apple.com [Tue, 12 May 2015 19:49:16 +0000 (19:49 +0000)]
ROLLOUT [Win] Unreviewed build fix for older DirectX build environments.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

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

6 years agoAX: [ATK] ARIA menu items should not have anonymous block children
jdiggs@igalia.com [Tue, 12 May 2015 19:44:37 +0000 (19:44 +0000)]
AX: [ATK] ARIA menu items should not have anonymous block children
https://bugs.webkit.org/show_bug.cgi?id=144653

Reviewed by Chris Fleizach.

Source/WebCore:

Exclude anonymous block children of menu items from the accessible tree
for ATK. Exclude list markers from the accessibility tree if the parent
is not being exposed as an accessible list item.

No new tests. Instead, modified the existing tests to reflect the correct
behavior.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

LayoutTests:

The existing test was not cross-platform friendly and was rewritten as
part of the fix for this bug. New expectations were generated for Mac,
Efl, and Gtk. The shared expectations and the Windows expectations were
removed so as not to break the Win port. The search-predicate test also
was updated because it included an ARIA treeitem which had a listmarker
child it should not have, and no longer has as a result of the bug fix.

* accessibility/aria-menubar-menuitems-expected.txt: Removed. Platform hierarchies vary vastly.
* accessibility/aria-menubar-menuitems.html: Rewritten to work better as a shared test.
* platform/efl/accessibility/aria-menubar-menuitems-expected.txt: Added.
* platform/gtk/accessibility/aria-menubar-menuitems-expected.txt: Added.
* platform/mac/accessibility/aria-menubar-menuitems-expected.txt: Modified as result of rewrite.
* platform/mac/accessibility/search-predicate.html: Modified to reflect correct treeitem children.
* platform/mac/accessibility/search-predicate-expected.txt: Modified to reflect correct treeitem children.
* platform/win/accessibility/aria-menubar-menuitems-expected.txt: Removed. New file should be generated.
* resources/accessibility-helper.js: Added an argument so dumpAccessibilityTree can print title rather than value.
(dumpAccessibilityTree):

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

6 years agoUndo a mistaken part of r184211.
ap@apple.com [Tue, 12 May 2015 19:42:01 +0000 (19:42 +0000)]
Undo a mistaken part of r184211.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
* UIProcess/WebProcessPool.h:
cookieStorageDirectory() is used on iOS, so bring it back.

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

6 years ago[Mac] Share cookie storage between UI process and secondary processes
ap@apple.com [Tue, 12 May 2015 19:37:31 +0000 (19:37 +0000)]
[Mac] Share cookie storage between UI process and secondary processes
https://bugs.webkit.org/show_bug.cgi?id=144820
rdar://problem/20572830

Reviewed by Darin Adler.

Source/WebCore:

* platform/network/mac/CookieJarMac.mm:
* platform/spi/cf/CFNetworkSPI.h:
Moved SPIs into an SPI header, so that WebKit2 could use them too without duplication.

Source/WebKit2:

Pass a cookie storage descriptor that includes file path as well as other data that
CFNetwork needs to use the same cookies storage as in another process (session cookies
are still separate).

While at it, started to clean up code that passes cookie storage path. It was mostly
dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::cookieStorageDirectory):
* UIProcess/WebProcessPool.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize):
Don't set cookie storage directory, as it's a no-op, we use an ephemeral session
for testing.

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

6 years ago[WK2] Log using diagnostic logging how far back in history we navigate
cdumez@apple.com [Tue, 12 May 2015 19:29:42 +0000 (19:29 +0000)]
[WK2] Log using diagnostic logging how far back in history we navigate
https://bugs.webkit.org/show_bug.cgi?id=144919
<rdar://problem/20920043>

Reviewed by Gavin Barraclough.

Source/WebCore:

Add diagnostic logging keys for logging back history navigation delta.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::deltaKey):
(WebCore::DiagnosticLoggingKeys::backNavigationKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log using diagnostic logging how far back in history we navigate.
When a back navigation or a backward indexed navigation occurs, we
log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::goToItem):

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

6 years agoFix internal build configuration issues
jacob_nielsen@apple.com [Tue, 12 May 2015 19:23:51 +0000 (19:23 +0000)]
Fix internal build configuration issues
https://bugs.webkit.org/show_bug.cgi?id=144762

Reviewed by David Kilzer.

Modifies DumpRenderTree's xcconfig files to use SDK selectors.

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig:
* DumpRenderTree/mac/Configurations/ImageDiff.xcconfig:
* DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig:
* DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig:

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

6 years agoAvoid CSSPrimitiveValue allocation when parsing sizes
yoav@yoav.ws [Tue, 12 May 2015 18:40:38 +0000 (18:40 +0000)]
Avoid CSSPrimitiveValue allocation when parsing sizes
https://bugs.webkit.org/show_bug.cgi?id=144910

Reviewed by Darin Adler.

Turn non-calc length calculation logic into a static method,
so that it can be called without a CSSPrimitiveValue object.
Then, call that method to calculate the default source-size length.

No new tests, since no functionality change.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble): Split out the logic for everything that's not calc into a static method.
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble): Static length computation logic for everything that is not calc.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isFontRelativeLength): Turn into static.
* css/SourceSizeList.cpp:
(WebCore::defaultLength): Use the new static method to compute the length.
(WebCore::computeLength): Use the calc length computation methods directly.

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

6 years ago[Win] Unreviewed build fix for older DirectX build environments.
bfulgham@apple.com [Tue, 12 May 2015 18:07:19 +0000 (18:07 +0000)]
[Win] Unreviewed build fix for older DirectX build environments.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Switch back to our
d3d stub header to avoid build failures on July 2004 DXSDK build environments.

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

6 years agoOSR availability analysis would be more scalable (and correct) if it did more livenes...
fpizlo@apple.com [Tue, 12 May 2015 18:01:28 +0000 (18:01 +0000)]
OSR availability analysis would be more scalable (and correct) if it did more liveness pruning
https://bugs.webkit.org/show_bug.cgi?id=143078

Reviewed by Andreas Kling.

In https://bugs.webkit.org/show_bug.cgi?id=144883, we found an example of where liveness
pruning is actually necessary. Well, not quite: we just need to prune out keys from the
heap availability map where the base node doesn't dominate the point where we are asking
for availability. If we don't do this, then eventually the IR gets corrupt because we'll
insert PutHints that reference the base node in places where the base node doesn't
dominate. But if we're going to do any pruning, then it makes sense to prune by bytecode
liveness. This is the strongest possible pruning we can do, and it should be sound. We
shouldn't have a node available for a virtual register if that register is live and the
node doesn't dominate.

Making this work meant reusing the prune-to-liveness algorithm from the FTL backend. So, I
abstracted this a bit better. You can now availabilityMap.pruneByLiveness(graph, origin).

* dfg/DFGAvailabilityMap.cpp:
(JSC::DFG::AvailabilityMap::pruneHeap):
(JSC::DFG::AvailabilityMap::pruneByLiveness):
(JSC::DFG::AvailabilityMap::prune): Deleted.
* dfg/DFGAvailabilityMap.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
* tests/stress/liveness-pruning-needed-for-osr-availability.js: Added. This is a proper regression test.
* tests/stress/liveness-pruning-needed-for-osr-availability-eager.js: Added. This is the original reduced test case, requires eager-no-cjit to fail prior to this changeset.

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

6 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Tue, 12 May 2015 17:30:56 +0000 (17:30 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

* platform/mac-wk2/TestExpectations: Marking as flaky for now.

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

6 years ago[Mac] Refine media playback target client configuration
eric.carlson@apple.com [Tue, 12 May 2015 16:41:48 +0000 (16:41 +0000)]
[Mac] Refine media playback target client configuration
https://bugs.webkit.org/show_bug.cgi?id=144892

Reviewed by Brent Fulgham.

Client and target picker state changes fequently happen several times in quick succession, so
don't react to immediately so we can batch callbacks to the web process.
* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::ClientState::ClientState): Store the client as a reference rather than a pointer
because it can never be NULL.
(WebCore::ClientState::operator == ): New.
(WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Schedule the initial client
configuration and a target configuration check.
(WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Schedule a target monitoring
update, and a target configuration check.
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Schedule a target monitoring update.
(WebCore::WebMediaSessionManager::clientStateDidChange): If the client whose state has changed
can play to a target, tell it to start using the target even if it isn't playing as long as
no other client is actively using a target.
(WebCore::WebMediaSessionManager::setPlaybackTarget): Configure clients after a pause.
(WebCore::WebMediaSessionManager::configureNewClients): New, do new client configuration.
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients): New, configure target clients.
(WebCore::WebMediaSessionManager::scheduleDelayedTask): Schedule the timer.
(WebCore::WebMediaSessionManager::taskTimerFired): Execute delayed tasks.
(WebCore::WebMediaSessionManager::find):
* Modules/mediasession/WebMediaSessionManager.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted): Call updateMediaState.
(WebCore::HTMLMediaElement::setPlaying): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Expand logging.
(WebCore::HTMLMediaElement::updateMediaState): New, don't broadcast a media state change
unless something actually changed.
* html/HTMLMediaElement.h:

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): Update logging.
(WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget): Ditto.
(WebCore::HTMLMediaSession::mediaEngineUpdated): Cleanup.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Remove the call to
deprecated API and the "-Wdeprecated-declarations".

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

6 years agoChildProcess should take an os_activity
weinig@apple.com [Tue, 12 May 2015 16:25:32 +0000 (16:25 +0000)]
ChildProcess should take an os_activity
https://bugs.webkit.org/show_bug.cgi?id=141781

Reviewed by Ryosuke Niwa.

* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(PluginServiceInitializer):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
Start an os_activity in the initializer for each XPC service.

* config.h:
Add HAVE_OS_ACTIVITY where available.

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

6 years agoSwitch to launching iOS Simulator using bundle ID
ddkilzer@apple.com [Tue, 12 May 2015 14:31:05 +0000 (14:31 +0000)]
Switch to launching iOS Simulator using bundle ID
<rdar://problem/20916096>

This is required to fix the layout tests on internal bots.

* Scripts/webkitdirs.pm:
(relaunchIOSSimulator): Switch to use bundle ID to launch iOS
Simulator.  Add FIXME.
(quitIOSSimulator): Add FIXME.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.setup_test_run): Switch to use bundle ID to
launch iOS Simulator.  Add FIXME.
(IOSSimulatorPort.check_sys_deps): Add FIXME.

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

6 years agoFix run-javascriptcore-tests step on the WinCairo bot
peavo@outlook.com [Tue, 12 May 2015 14:22:52 +0000 (14:22 +0000)]
Fix run-javascriptcore-tests step on the WinCairo bot
https://bugs.webkit.org/show_bug.cgi?id=144866

Reviewed by Csaba Osztrogonác.

Catch exception when failing to create soft link, so we can fall back to copy.

* Scripts/run-jsc-stress-tests:

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

6 years agoUnreviewed. Fix GTK+ debug build after r184197.
carlosgc@webkit.org [Tue, 12 May 2015 13:28:47 +0000 (13:28 +0000)]
Unreviewed. Fix GTK+ debug build after r184197.

* UIProcess/gtk/RedirectedXCompositeWindow.cpp: Add missing include.

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

6 years agoAX: [GTK] Defer to WebCore Accessibility for table exposure
jdiggs@igalia.com [Tue, 12 May 2015 12:01:50 +0000 (12:01 +0000)]
AX: [GTK] Defer to WebCore Accessibility for table exposure
https://bugs.webkit.org/show_bug.cgi?id=144896

Reviewed by Chris Fleizach.

Source/WebCore:

Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
for WebKitGtk.

No new tests. Several existing tests already cover table exposure. They have
been updated accordingly.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):

LayoutTests:

Several platform tests are testing accessibility of tables. In order to ensure
that those tables continue to be exposed as tables, a border was added so that
they are not judged to be layout tables. For the remainder of the tests, the
expectations were updated to reflect the fact that layout tables are no longer
exposed as AccessibilityTables in WebKitGtk.

* platform/gtk/accessibility/caret-offsets.html: Added border to table.
* platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-hierarchy-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-one-cell-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/text-for-range-table-cells.html: Added border to table.
* platform/gtk/accessibility/text-for-table.html: Added border to table.

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

6 years ago[GTK][WK2] rowAtIndex is not implemented in DRT/WKTR
jdiggs@igalia.com [Tue, 12 May 2015 11:59:46 +0000 (11:59 +0000)]
[GTK][WK2] rowAtIndex is not implemented in DRT/WKTR
https://bugs.webkit.org/show_bug.cgi?id=116971

Reviewed by Chris Fleizach.

Source/WebCore:

Because ATK lacks API to directly get an accessible row via its index,
the implementation of rowAtIndex gets a cell in the indexed row and
returns the parent row. The failing test continued to fail because
AccessibilityARIAGridCell::parentTable called parentObjectUnignored at
most twice, the second call in place to handle rows which are included
in the tree. However, given a well-formed ARIA grid with a rowgroup that
is interactive, that rowgroup also needs to be in the tree necessitating
parentObjectUnignored be called a third time to get to the grid. Given a
poorly-formed ARIA grid, there may additional objects which pass the test
for inclusion standing in between the cell and grid necessitating more
calls still. Therefore, ascend the hierarchy to find the parent grid.

No new tests. The failing test now passes.

* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):

Tools:

Implement rowAtIndex for ATK.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::rowAtIndex):

LayoutTests:

* platform/gtk/TestExpectations: Removed previously-failing test.

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

6 years ago[X11] Add XUniquePtr and XUniqueResource to automatically free X resources
carlosgc@webkit.org [Tue, 12 May 2015 11:11:00 +0000 (11:11 +0000)]
[X11] Add XUniquePtr and XUniqueResource to automatically free X resources
https://bugs.webkit.org/show_bug.cgi?id=144521

Reviewed by Darin Adler.

Source/WebCore:

Add XUniquePtr as a template alias of std:unique_ptr to handle X
resources using pointers and XUniqueResource as a new class to
handle X resources using a long unsigned identifier. This
simplifies the code and makes it more difficult to leak X resources.

* PlatformEfl.cmake: Add new files to compilation.
* PlatformGTK.cmake: Ditto.
* platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:
(WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
Remove the display member, and use XUnique for Pixmap and GC.
(WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
Remove code to explicitly free Pixmap and GC.
(WebCore::BackingStoreBackendCairoX11::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoX11.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::createWindowContext): Use XUnique and the
new constructor that receives a XID, since there's no longer
conflict with the one receiving a Pbuffer.
(WebCore::GLContextGLX::createPbufferContext): Use XUnique and the
new constructor that receives a XUniqueGLXPbuffer&&.
(WebCore::GLContextGLX::createPixmapContext):
(WebCore::GLContextGLX::createContext):
(WebCore::GLContextGLX::GLContextGLX):
(WebCore::GLContextGLX::~GLContextGLX): Remove code to explicitly
free X resources.
(WebCore::GLContextGLX::makeContextCurrent):
(WebCore::GLContextGLX::cairoDevice):
(WebCore::GLContextGLX::platformContext):
* platform/graphics/glx/GLContextGLX.h:
* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
(WebCore::EGLXTransportSurfaceClient::destroy):
(WebCore::EGLXTransportSurfaceClient::prepareTexture):
* platform/graphics/surfaces/egl/EGLXSurface.h:
* platform/graphics/surfaces/glx/GLXConfigSelector.h:
(WebCore::GLXConfigSelector::findMatchingConfig): Use XUnique
instead of the custom std::unique X11Deleter.
(WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
(WebCore::GLXOffScreenSurface::initialize):
* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow): Ditto.
(WebCore::X11Helper::createPixmap): Ditto.
* platform/graphics/surfaces/glx/X11Helper.h:
* platform/graphics/x11/XUniquePtr.h: Remove X11Deleter.
(WebCore::XPtrDeleter::operator()):
* platform/graphics/x11/XUniqueResource.cpp: Added.
(WebCore::XUniqueResource<XResource::Colormap>::deleteXResource):
(WebCore::XUniqueResource<XResource::Damage>::deleteXResource):
(WebCore::XUniqueResource<XResource::Pixmap>::deleteXResource):
(WebCore::XUniqueResource<XResource::Window>::deleteXResource):
(WebCore::XUniqueResource<XResource::GLXPbuffer>::deleteXResource):
(WebCore::XUniqueResource<XResource::GLXPixmap>::deleteXResource):
* platform/graphics/x11/XUniqueResource.h: Added.
(WebCore::XUniqueResource::XUniqueResource):
(WebCore::XUniqueResource::operator=):
(WebCore::XUniqueResource::~XUniqueResource):
(WebCore::XUniqueResource::get):
(WebCore::XUniqueResource::release):
(WebCore::XUniqueResource::reset):
(WebCore::XUniqueResource::operator!):
(WebCore::XUniqueResource::operator UnspecifiedBoolType*):

Source/WebKit2:

Use XUniquePtr and XUniqueResource to free X resources.

* PlatformEfl.cmake: Add Source/WebCore/platform/graphics/x11 dir
to the include dir list.
* PlatformGTK.cmake: Ditto.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Do not pass the display to
the BackingStoreBackendCairoX11 constructor.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::resize):
(WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
(WebKit::RedirectedXCompositeWindow::surface):
* UIProcess/gtk/RedirectedXCompositeWindow.h:
(WebKit::RedirectedXCompositeWindow::windowID):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitializeWindowless):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::platformGeometryDidChange):
(WebKit::NetscapePlugin::platformPaint):

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

6 years agoMove TransformOperation-based classes off of PassRefPtr
zandobersek@gmail.com [Tue, 12 May 2015 09:53:27 +0000 (09:53 +0000)]
Move TransformOperation-based classes off of PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=144876

Reviewed by Darin Adler.

Remove uses of PassRefPtr from the TransformOperation class and its
derivatives, operating on Ref and RefPtr objects instead.

* platform/graphics/transforms/IdentityTransformOperation.h:
* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::blend):
* platform/graphics/transforms/Matrix3DTransformOperation.h:
* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::MatrixTransformOperation::blend):
* platform/graphics/transforms/MatrixTransformOperation.h:
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/PerspectiveTransformOperation.h:
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/RotateTransformOperation.h:
* platform/graphics/transforms/ScaleTransformOperation.cpp:
(WebCore::ScaleTransformOperation::blend):
* platform/graphics/transforms/ScaleTransformOperation.h:
* platform/graphics/transforms/SkewTransformOperation.cpp:
(WebCore::SkewTransformOperation::blend):
* platform/graphics/transforms/SkewTransformOperation.h:
* platform/graphics/transforms/TransformOperation.h:
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::blendByMatchingOperations):
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::blend):
* platform/graphics/transforms/TranslateTransformOperation.h:

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

6 years agoWorkaround for Cortex-A53 erratum 843419
loki@webkit.org [Tue, 12 May 2015 08:15:27 +0000 (08:15 +0000)]
Workaround for Cortex-A53 erratum 843419
https://bugs.webkit.org/show_bug.cgi?id=144680

Reviewed by Michael Saboff.

This patch is about to give simple workaround for Cortex-A53 erratum 843419.
It inserts nops after ADRP instruction to avoid wrong address accesses.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::adrp):
(JSC::ARM64Assembler::nopCortexA53Fix843419):

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

6 years agoLinker fails without -DDEVELOPER_MODE=ON
ryuan.choi@navercorp.com [Tue, 12 May 2015 07:59:14 +0000 (07:59 +0000)]
Linker fails without -DDEVELOPER_MODE=ON
https://bugs.webkit.org/show_bug.cgi?id=144117

Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:
Remove fvisibility flags. linker script will cover the functionality for ewebkit2.so in release mode,
* Source/cmake/eflsymbols.filter: Updated symbol patterns which should be exposed for ewebkit2.

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

6 years ago[EFL] Rebaseline some editing tests
jinwoo7.song@samsung.com [Tue, 12 May 2015 07:35:27 +0000 (07:35 +0000)]
[EFL] Rebaseline some editing tests

Also add some missing baselines.

* platform/efl/editing/execCommand/5142012-1-expected.png:
* platform/efl/editing/execCommand/5142012-1-expected.txt:
* platform/efl/editing/inserting/insert-at-end-02-expected.png:
* platform/efl/editing/inserting/insert-at-end-02-expected.txt:

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

6 years ago[Streams API] ReadableStream reader should not be disposable when having pending...
youenn.fablet@crf.canon.fr [Tue, 12 May 2015 07:15:37 +0000 (07:15 +0000)]
[Streams API] ReadableStream reader should not be disposable when having pending promises
https://bugs.webkit.org/show_bug.cgi?id=144869

Reviewed by Darin Adler.

Source/WebCore:

Made error promise callback to take a ref to the reader so that the reader is not disposed as long as the promise callback is not resolved.

Covered by tests added to streams/readable-stream-gc.html.

* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::ReadableStreamReader): Moved initialize() call outside constructor as it can ref/unref.
(WebCore::ReadableStreamReader::releaseStreamAndClean): Added protector.
* Modules/streams/ReadableStreamReader.h:
* bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::JSReadableStreamReader::closed): Lambda for error now takes a ref to the reader.
* bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableJSStream::Reader::create): Calling initialize() after adoptRef().

LayoutTests:

* streams/readable-stream-gc.html:
* streams/readable-stream-gc-expected.txt:

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

6 years agoClean up redundant resources in case of failure in GLContextEGL context creation...
zandobersek@gmail.com [Tue, 12 May 2015 06:39:37 +0000 (06:39 +0000)]
Clean up redundant resources in case of failure in GLContextEGL context creation methods
https://bugs.webkit.org/show_bug.cgi?id=144878

Reviewed by Martin Robinson.

GLContextEGL::createWindowContext() and GLContextEGL::createPixmapContext() methods
should clean up the freshly-created resources when prematurely returning due to a
failure.

* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createPixmapContext):

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

6 years agoUnreviewed, rolling out r184009.
commit-queue@webkit.org [Tue, 12 May 2015 05:51:21 +0000 (05:51 +0000)]
Unreviewed, rolling out r184009.
https://bugs.webkit.org/show_bug.cgi?id=144900

Caused crashes on inspector tests (Requested by ap on
#webkit).

Reverted changeset:

"MapDataImpl::add() shouldn't do the same hash lookup twice."
https://bugs.webkit.org/show_bug.cgi?id=144759
http://trac.webkit.org/changeset/184009

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

6 years agoUnreviewed, rolling out r184123.
commit-queue@webkit.org [Tue, 12 May 2015 05:48:57 +0000 (05:48 +0000)]
Unreviewed, rolling out r184123.
https://bugs.webkit.org/show_bug.cgi?id=144899

Seems to have introduced flaky crashes in many JS tests
(Requested by rniwa on #webkit).

Reverted changeset:

"REGRESSION(r180595): same-callee profiling no longer works"
https://bugs.webkit.org/show_bug.cgi?id=144787
http://trac.webkit.org/changeset/184123

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

6 years agoSource/WebCore:
mitz@apple.com [Tue, 12 May 2015 05:38:11 +0000 (05:38 +0000)]
Source/WebCore:
WebCore part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL

Reviewed by Alexey Proskuryakov.

Test: TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm

In some cases, trying to navigate to an invalid URL results in navigation to about:blank.
When the about:blank load is committed, the UI process still thinks that the provisional
URL is the original, invalid URL, and updates its state to reflect that that’s the URL that
has been committed.

The provisional URL changes (1) when a provisional load begins, (2) when a server redirect
happens, (3) when the client changes the request in willSendRequest, and (4) in this
about:blank case. For (1) and (2), there are frame loader client callbacks. (3) is client-
initiated. So this patch addresses (4).

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::maybeLoadEmpty): If our request URL is changing to about:blank and
while loading the main resource, call FrameLoaderClient::dispatchDidChangeProvisionalURL.
* loader/FrameLoaderClient.h: Added dispatchDidChangeProvisionalURL with an empty
implementation.

Source/WebKit2:
WebKit2 part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL

Reviewed by Alexey Proskuryakov.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
same way we update it for server redirects, but don’t make client callbacks. Clients
observing the URL property will see it change.
* UIProcess/WebPageProxy.h:

* UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
process.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:
Test for <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/LoadAlternateHTMLString.mm: Fixed copyright header.
* TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm: Added.
(-[ProvisionalURLChangeController webView:didFinishNavigation:]):

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

6 years agoText is misplaced when custom font does not have space glyph.
zalan@apple.com [Tue, 12 May 2015 04:01:50 +0000 (04:01 +0000)]
Text is misplaced when custom font does not have space glyph.
https://bugs.webkit.org/show_bug.cgi?id=144879

Reviewed by Myles C. Maxfield

This patch ensures that we use fallback font for the missing space glyph only when the rendered text has space in it.

If a font does not provide all the glyphs required to render the associated text, we initiate fallback fonts. It is done while
measuring the text at layout time. However due to the fact that we always pre-measure space, a font with no space glyph in it is never sufficient.
(even when the text does not require space at all)
Fallback fonts impact line positions through ascent/descent calculation.

Source/WebCore:

Test: fast/text/font-with-no-space-glyph.html

* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
* rendering/line/BreakingContext.h:
(WebCore::WordTrailingSpace::WordTrailingSpace):
(WebCore::WordTrailingSpace::width):
(WebCore::BreakingContext::handleText):

LayoutTests:

* fast/ruby/ruby-expansion-cjk-2-expected.html: progression
* fast/ruby/ruby-expansion-cjk-3-expected.html: progression
* fast/ruby/ruby-expansion-cjk-4-expected.html: progression
* fast/ruby/ruby-expansion-cjk-5-expected.html: progression
* fast/ruby/ruby-expansion-cjk-expected.html: progression
* fast/text/font-with-no-space-glyph-expected.html: Added.
* fast/text/font-with-no-space-glyph.html: Added.
* platform/mac/svg/fonts/svg-font-general-expected.html: progression

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

6 years ago<rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
mitz@apple.com [Tue, 12 May 2015 02:45:47 +0000 (02:45 +0000)]
<rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
https://bugs.webkit.org/show_bug.cgi?id=144891

Reviewed by Darin Adler.

Sometimes, Find on Page’s constant 1.6 scale factor is too much. Smart magnification is
designed to choose a scale factor that is just right.

* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/SmartMagnificationController.messages.in: Added Magnify message.
* UIProcess/ios/SmartMagnificationController.mm:
(WebKit::SmartMagnificationController::magnify): Added. Handle the new message using
-[WKContentView _soomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:].
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::updateFindIndicator): Instead of zooming to the selection rect,
get the surrounding render rect (the area we would target for a double-tap at the beginning
of the selection), and tell the magnification controller to target it. Use the center of the
start of the selection as the origin.

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

6 years agoSmall tidyup in animations code
simon.fraser@apple.com [Tue, 12 May 2015 02:39:37 +0000 (02:39 +0000)]
Small tidyup in animations code
https://bugs.webkit.org/show_bug.cgi?id=144893

Reviewed by Eric Carlson.

Reading progress(1, 0, 0) in callers of AnimationBase::progress() was confusing,
particularly as the last parameter is a TimingFunction*. Put default values
in the header (with nullptr) and fix the callers. Also fix variable names in
the implementation.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::progress):
* page/animation/AnimationBase.h:
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
(WebCore::ImplicitAnimation::getAnimatedStyle):
(WebCore::ImplicitAnimation::blendPropertyValueInStyle):

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

6 years agoPurge PassRefPtr in WebCore/rendering
gyuyoung.kim@webkit.org [Tue, 12 May 2015 02:06:54 +0000 (02:06 +0000)]
Purge PassRefPtr in WebCore/rendering
https://bugs.webkit.org/show_bug.cgi?id=144872

Patch by Gyuyoung Kim <gyuyoung.kim@webkit.org> on 2015-05-11
Reviewed by Darin Adler.

As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref in WebCore/rendering.

No new tests, no behavior changes.

* rendering/HitTestingTransformState.h:
(WebCore::HitTestingTransformState::create):
* rendering/RenderLayer.cpp:
(WebCore::ClipRects::create):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeGtk.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderTheme::themeForPage):
(WebCore::RenderThemeIOS::create):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderTheme::themeForPage):
(WebCore::RenderThemeMac::create):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeWin.h:
* rendering/TextAutoSizing.h:
(WebCore::TextAutoSizingValue::create):
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::createShapeValue):
(WebCore::ShapeValue::createBoxShapeValue):
(WebCore::ShapeValue::createImageValue):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StylePendingImage.h:
* rendering/style/StyleReflection.h:
(WebCore::StyleReflection::create):

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

6 years agoFix internal build configuration issues
jacob_nielsen@apple.com [Tue, 12 May 2015 01:54:51 +0000 (01:54 +0000)]
Fix internal build configuration issues
https://bugs.webkit.org/show_bug.cgi?id=144762

Reviewed by Darin Adler.

Modifies TestWebKitAPI and WebKitTestRunner's xcconfig files to use SDK selectors.

* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/InjectedBundle.xcconfig:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:

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

6 years ago[Mac] Update device picker icon when video tracks change
eric.carlson@apple.com [Tue, 12 May 2015 01:13:30 +0000 (01:13 +0000)]
[Mac] Update device picker icon when video tracks change
https://bugs.webkit.org/show_bug.cgi?id=144889
<rdar://problem/20907253>

Reviewed by Brent Fulgham.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateHasVideo):

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

6 years agoScroll snap logic should be triggered when resizing the WebView
bfulgham@apple.com [Tue, 12 May 2015 01:12:01 +0000 (01:12 +0000)]
Scroll snap logic should be triggered when resizing the WebView
https://bugs.webkit.org/show_bug.cgi?id=142590
<rdar://problem/20125088>

Reviewed by Simon Fraser.

Source/WebCore:

Tests coming in a second patch.

Resizing of the main frame or overflow regions was properly recalculating the scroll snap points,
but there was no code to honor these values when window resizing was occurring. The correction was
handled in two ways:
1. Scrolling thread operations that moved to new snap points needed to notify the main thread that
   it had shifted to a new snap point, so that the resize code (which happens on the main thread)
   could ensure that we stayed clamped to the correct 'tile' in the snap region.
2. Main thread (overflow) resizes were likewise missing code to honor the current snap position
   after resizing calculations were complete.

This change also required the addition of two indices to the scrollable area to track which scroll
snap point was currently being used. We don't bother with a 'none' case because you cannot have a
'none' state when you have an active set of scroll snap points, and we do not execute this code
if the scroll snap points are null.

The FrameView code was computing updated snap offsets after it had dispatched frame view layout
information to the scrolling thread, which was wrong. This was also corrected.

I think it might be possible to track all of this state inside the ScrollController, but the current
scroll snap architecture destroys and recreates the state each time a new set of interactions starts.
This should be fixed in the future, which would allow us to remove some of this local state.

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to
calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new
call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during
resize (if appropriate).
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies
the correct scroll region when a new snap position (index) has been selected by user interaction on
the scrolling thread.
(WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'.
(WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/AxisScrollSnapOffsets.h:
(WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track
it to handle resize operations.
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::updateScrollSnapOffsetIndices):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active
horizontal and vertical scroll snap indices back to the main thread.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes
the current event, notify the main thread of any change in the active scroll snap index.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator
clients to find out about the current scroll snap state, which is only known by the ScrollController.
(WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto.
* platform/ScrollAnimator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position
to one of our active scroll snap offsets.
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we
keep track of the new values for potential resize operations.
(WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index.
(WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto.
(WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting
the proper scroll position based on the active scroll snap offset.
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added.
(WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added.
(WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added.
(WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added.
(WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added.
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement.
(WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added.
(WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active
index (if applicable).
(WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set
the current active index.
(WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap
index, as well as whether the current animation actually changed the active snap point offset.
* platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index
that represents the current scroll snap offset.
* platform/cocoa/ScrollSnapAnimatorState.mm:
(WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our
active scroll snap points.
(WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that
we stay on the current scroll snap offset during resizing.
* rendering/RenderLayer.h:

Source/WebKit2:

* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
argument I added. This is currently not used for anything on iOS.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.

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

6 years agoAddressing post-review comments after r184037.
mmaxfield@apple.com [Tue, 12 May 2015 01:06:59 +0000 (01:06 +0000)]
Addressing post-review comments after r184037.

Unreviewed.

No new tests because there is no behavior change.

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

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

6 years ago[Win] Move Windows build target to Windows 7 (or newer)
bfulgham@apple.com [Tue, 12 May 2015 00:58:07 +0000 (00:58 +0000)]
[Win] Move Windows build target to Windows 7 (or newer)
https://bugs.webkit.org/show_bug.cgi?id=144890
<rdar://problem/20707307>

Reviewed by Anders Carlsson.

Update linked SDK and minimal Windows level to be compatible with
Windows 7 or newer.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj:
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj:
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj:
* config.h:

Source/ThirdParty:

* gtest/msvc/gtest-md.vcxproj:

Source/ThirdParty/ANGLE:

* ANGLE.vcxproj/libEGL.vcxproj:
* ANGLE.vcxproj/libGLESv2.vcxproj:
* ANGLE.vcxproj/preprocessor.vcxproj:
* ANGLE.vcxproj/translator_common.vcxproj:
* ANGLE.vcxproj/translator_glsl.vcxproj:
* ANGLE.vcxproj/translator_hlsl.vcxproj:

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCorePrefix.h:
* config.h:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WebInspectorUI:

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:

Source/WebKit:

* WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:

Source/WebKit/win:

* WebKitPrefix.h:

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFGenerated.vcxproj:
* config.h:

Tools:

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
* DumpRenderTree/config.h:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
* WinLauncher/stdafx.h:

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

6 years agoAX: [ATK] Always include rows in the tree of accessible tables
jdiggs@igalia.com [Tue, 12 May 2015 00:09:26 +0000 (00:09 +0000)]
AX: [ATK] Always include rows in the tree of accessible tables
https://bugs.webkit.org/show_bug.cgi?id=144885

Reviewed by Chris Fleizach.

Source/WebCore:

Remove the code that excluded rows from the tree of accessible tables for
Gtk and Efl, the latter of which inherited the exclusion from the former.

No new tests. We already have several tests which cover table hierarchy.
The associated expectations have been updated as part of this fix.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildrenFromSection):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetParent):

LayoutTests:

Update the expectations to reflect the rows which are now included in the tree.

* platform/efl/accessibility/table-attributes-expected.txt: Updated.
* platform/efl/accessibility/table-cell-spans-expected.txt: Updated.
* platform/efl/accessibility/table-cells-expected.txt: Updated.
* platform/efl/accessibility/table-sections-expected.txt: Updated.
* platform/gtk/accessibility/table-attributes-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated.
* platform/gtk/accessibility/table-cells-expected.txt: Updated.
* platform/gtk/accessibility/table-sections-expected.txt: Updated.

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

6 years agoUnreviewed, rolling out r184119.
commit-queue@webkit.org [Mon, 11 May 2015 23:41:35 +0000 (23:41 +0000)]
Unreviewed, rolling out r184119.
https://bugs.webkit.org/show_bug.cgi?id=144888

broke JSC tests on Apple Windows bots (Requested by kling on
#webkit).

Reverted changeset:

"Fix run-javascriptcore-tests step on the WinCairo bot"
https://bugs.webkit.org/show_bug.cgi?id=144866
http://trac.webkit.org/changeset/184119

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

6 years agoForce a rebuild of JSNPObject.cpp on bots.
akling@apple.com [Mon, 11 May 2015 23:27:21 +0000 (23:27 +0000)]
Force a rebuild of JSNPObject.cpp on bots.

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):

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

6 years agorun-benchmark should support Dromaeo
rniwa@webkit.org [Mon, 11 May 2015 23:21:43 +0000 (23:21 +0000)]
run-benchmark should support Dromaeo
https://bugs.webkit.org/show_bug.cgi?id=144849

Reviewed by Chris Dumez.

Added the benchmark plans for Dromaeo DOM tests. We only run these tests once since
they can take as much as 15 minutes to run each.

* Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan: Added.

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

6 years agoWeb Inspector: REGRESSION (Tabs): Issues reloading a resource with breakpoints
timothy@apple.com [Mon, 11 May 2015 23:18:14 +0000 (23:18 +0000)]
Web Inspector: REGRESSION (Tabs): Issues reloading a resource with breakpoints
https://bugs.webkit.org/show_bug.cgi?id=144650

Fix a number of issues with Debugger tab and navigation/reloading:
- Close old content views in the Debugger tab when main frame navigates.
- Prune old resource tree elements before attempting to restore a cookie that might match an old resource.
- Allow breakpoint selections to be restored from a saved cookie.
- Fix an assert when closing a content view that isn't the current index, but is the current view.
- Avoid calling closed() multiple times when a ContentView is in the back/forward list more than once.
- Make restoreStateFromCookie properly set and use the causedByNavigation argument for a longer restore delay.
- Create a new cookie object per tab instead of it being cumulative from the previous cookie.

Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WebInspector._mainResourceDidChange): Delay calling _restoreCookieForOpenTabs to give time for sidebars
and tabs to respond to the main resource change.
(WebInspector._restoreCookieForOpenTabs): Rename causedByReload to causedByNavigation. Nothing special about
reload since we restore on all navigation.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView): Support Breakpoint as a represented object, which happens during a cookie restore.
(WebInspector.ContentView.isViewable): Ditto.

* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.closeAllContentViews): Disassociate if the view is current and not just
the current entry index. This matches other close functions. This fixes an assert in _disassociateFromContentView.
(WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Don't disassociate multiple times. This
avoids calling the closed() function on a view more than once.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange): Renamed from _mainResourceChanged.
Close all content views if this is the main frame. Also prune all old resources. Doing this now avoids a flash
of having old and new resources in the tree caused by the default delay in NavigationSidebarPanel's _checkForOldResources.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Set _autoPruneOldTopLevelResourceTreeElements for later.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineToAutoPrune): Deleted.
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentView): Fix typo.
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement): Fix whitespace.
(WebInspector.NavigationSidebarPanel.prototype.pruneOldResourceTreeElements): Added. Broken out from
_checkForOldResources.delayedWork so it can be called manually. Also check all visible tree outlines.
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Pass treeElement in an array.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResourcesIfNeeded): Added.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources): Call pruneOldResourceTreeElements on a delay.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Deleted.
(WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie): Call _checkForOldResourcesIfNeeded.
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie): Remove array folding code.

* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView.prototype.restoreStateFromCookie): Rename causedByReload to causedByNavigation.
(WebInspector.TabContentView.prototype.saveStateToCookie): Don't allow the cookie to build on the old cookie.

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

6 years agoUnreviewed build fix. Add "Duration" as a time metric.
rniwa@webkit.org [Mon, 11 May 2015 22:51:37 +0000 (22:51 +0000)]
Unreviewed build fix. Add "Duration" as a time metric.

* public/js/helper-classes.js:
* public/v2/data.js:
(RunsData.unitFromMetricName):

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

6 years agoCPS rethreading phase's flush detector flushes way too many SetLocals
fpizlo@apple.com [Mon, 11 May 2015 22:42:49 +0000 (22:42 +0000)]
CPS rethreading phase's flush detector flushes way too many SetLocals
https://bugs.webkit.org/show_bug.cgi?id=144819

Reviewed by Geoffrey Garen.

After probably unrelated changes, this eventually caused some arguments elimination to stop
working because it would cause more SetLocals to turn into PutStacks. But it was a bug for
a long time. Basically, we don't want the children of a SetLocal to be flushed. Flushing is
meant to only affect the SetLocal itself.

This is a speed-up on Octane/earley.

* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::computeIsFlushed):

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

6 years agogmail and google maps fail to load with eager compilation: Failed to insert inline...
fpizlo@apple.com [Mon, 11 May 2015 22:41:36 +0000 (22:41 +0000)]
gmail and google maps fail to load with eager compilation: Failed to insert inline cache for varargs call (specifically, CallForwardVarargs) because we thought the size would be 250 but it ended up being 262 prior to compaction.
https://bugs.webkit.org/show_bug.cgi?id=144854

Reviewed by Oliver Hunt.

This is easy: just lift the threshold. Also remove the need for some duplicate thresholds.
It used to be that Construct required less code, but that's not the case for now.

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfCallForwardVarargs):
(JSC::FTL::sizeOfConstructVarargs):
(JSC::FTL::sizeOfConstructForwardVarargs):

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

6 years agoBuild fix. jetstream has a local copy, not remote archive.
rniwa@webkit.org [Mon, 11 May 2015 22:36:51 +0000 (22:36 +0000)]
Build fix. jetstream has a local copy, not remote archive.

* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan:

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

6 years agoSimplify shim path computation
andersca@apple.com [Mon, 11 May 2015 22:31:33 +0000 (22:31 +0000)]
Simplify shim path computation
https://bugs.webkit.org/show_bug.cgi?id=144884
Part of rdar://problem/19708579.

Reviewed by Sam Weinig.

Factor the code that computes the shim path out into a separate function. Also make this mac only
since we don't have any shims on iOS.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::addDYLDEnvironmentAdditions):

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

6 years agorun-benchmark should support SunSpider, Kraken and Octane
rniwa@webkit.org [Mon, 11 May 2015 21:40:52 +0000 (21:40 +0000)]
run-benchmark should support SunSpider, Kraken and Octane
https://bugs.webkit.org/show_bug.cgi?id=144840

Reviewed by Darin Adler.

Added the support for SunSpider, Kraken, and Octane. Because of the licensing issues, we can't commit the
Kraken source code into the WebKit repository as done for other benchmarks. Instead, we'll dynamically
download it from the remote server using newly added RemoteZipBenchmarkBuilder. We do the same for Octane
for simplicity. Use newly added --local-copy option to specify the location of a local copy if there is any.

Renamed "original_benchmark in the plan file to "local_copy" and added a new optional "remote_archive" to
specify the URL to a remote ZIP file. This optional field is used by Kraken and Octane benchmark plans.

In addition, generalized the ability to run a "create script" in JetStreamBenchmarkBuilder since it's also
needed for SunSpider and Kraken. This feature has now been folded into GenericBenchmarkBuilder.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Added
RemoteZipBenchmarkBuilder for Kraken and removed JetStreamBenchmarkBuilder since GenericBenchmarkBuilder
now has the ability to run an arbitrary "create script".

* Scripts/run-benchmark:
(main): Added an optional argument, --local-copy, to override the location of the benchmark's local copy.
This also overrides the remote archive URL specified in the plan.

* Scripts/webkitpy/benchmark_runner/README.md: Updated the description.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Deleted the entry for
JetStreamBenchmarkBuilder.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:
(GenericBenchmarkBuilder.prepare): Call _fetchRemoteArchive if local_copy is not specified in the plan or
by --local-copy option but remote_archive is specified. Also call self.clean() here instead of relying on
_runCreateScript and _applyPatch to clean after themselves.
(GenericBenchmarkBuilder._runCreateScript): Moved from JetStreamBenchmarkBuilder._runCreateScript since
JetStream, SunSpider, Kraken all use this feature.
(GenericBenchmarkBuilder._copyBenchmarkToTempDir): Use self.name as the destination location instead of
the leaf directory name since the latter is not available when a remote ZIP file is used.
(GenericBenchmarkBuilder._fetchRemoteArchive): Added.
(GenericBenchmarkBuilder._applyPatch): Apply the patch inside destination directory to avoid hard coding
the benchmark name in the patches.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/jetstream_benchmark_builder.py: Removed.

* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__): Set self.planName. Also override 'local_copy' when --local-copy option is used.
(BenchmarkRunner.execute): Exit early if neither local_copy nor remote_archive is specified. Prefix the URL
the browser opens by planName as the plan file no longer contains that.

* Scripts/webkitpy/benchmark_runner/data/patches/JetStream.patch: Changed the path to be relative against
the top directory of JetStream instead of its parent.
* Scripts/webkitpy/benchmark_runner/data/patches/Kraken.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/patches/Octane.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/patches/Speedometer.patch: Changed the path to be relative against
the top directory of JetStream instead of its parent.
* Scripts/webkitpy/benchmark_runner/data/patches/SunSpider.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan: Uses GenericBenchmarkBuilder and specifies
the script to run. The entry point was changed to the relative path from the top directory of JetStream as
done in JetStream.patch.
* Scripts/webkitpy/benchmark_runner/data/plans/kraken.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/octane.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan: The entry point was changed to the relative
path from the top directory of JetStream as done in JetStream.patch.
* Scripts/webkitpy/benchmark_runner/data/plans/sunspider.plan: Added.

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

6 years agoREGRESSION(r180595): same-callee profiling no longer works
rniwa@webkit.org [Mon, 11 May 2015 21:21:17 +0000 (21:21 +0000)]
REGRESSION(r180595): same-callee profiling no longer works
https://bugs.webkit.org/show_bug.cgi?id=144787

Reviewed by Michael Saboff.

This patch introduces a DFG optimization to use NewObject node when the callee of op_create_this is
always the same JSFunction. This condition doesn't hold when the byte code creates multiple
JSFunction objects at runtime as in: function y() { return function () {} }; new y(); new y();

To enable this optimization, LLint and baseline JIT now store the last callee we saw in the newly
added fourth operand of op_create_this. We use this JSFunction's structure in DFG after verifying
our speculation that the callee is the same. To avoid recompiling the same code for different callee
objects in the polymorphic case, the special value of seenMultipleCalleeObjects() is set in
LLint and baseline JIT when multiple callees are observed.

Tests: stress/create-this-with-callee-variants.js

* bytecode/BytecodeList.json: Increased the number of operands to 5.
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset): op_create_this uses 2nd (constructor) and 4th (callee cache)
operands.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Dump the newly added callee cache.
(JSC::CodeBlock::finalizeUnconditionally): Clear the callee cache if the callee is no longer alive.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCreateThis): Add the instruction to propertyAccessInstructions so that
we can clear the callee cache in CodeBlock::finalizeUnconditionally. Also initialize the newly added
operand.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock): Implement the optimization. Speculate the actual callee to
match the cache. Use the cached callee's structure if the speculation succeeds. Otherwise, OSR exit.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_this): Go to the slow path to update the cache unless it's already marked
as seenMultipleCalleeObjects() to indicate the polymorphic behavior.
(JSC::JIT::emitSlow_op_create_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_this): Ditto.
(JSC::JIT::emitSlow_op_create_this):
* llint/LowLevelInterpreter32_64.asm:
(_llint_op_create_this): Ditto.
* llint/LowLevelInterpreter64.asm:
(_llint_op_create_this): Ditto.
* runtime/CommonSlowPaths.cpp:
(slow_path_create_this): Set the callee cache to the actual callee if it's not set. If the cache has
been set to a JSFunction* different from the actual callee, set it to seenMultipleCalleeObjects().
* runtime/JSCell.h:
(JSC::JSCell::seenMultipleCalleeObjects): Added.
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::unvalidatedGet): Removed the compile guard around it.
* tests/stress/create-this-with-callee-variants.js: Added.

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

6 years agoAX: [ATK] Need expectation files for menu-list-crash2.html for Gtk and Efl
jdiggs@igalia.com [Mon, 11 May 2015 21:20:46 +0000 (21:20 +0000)]
AX: [ATK] Need expectation files for menu-list-crash2.html for Gtk and Efl
https://bugs.webkit.org/show_bug.cgi?id=144881

Unreviewed GTK+ and EFL gardening.

* platform/efl/accessibility/menu-list-crash2-expected.txt: Added.
* platform/gtk/accessibility/menu-list-crash2-expected.txt: Added.

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

6 years agoUnreviewed build fix
mmaxfield@apple.com [Mon, 11 May 2015 21:14:05 +0000 (21:14 +0000)]
Unreviewed build fix

Unreviewed.

* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile):

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

6 years agoPropertyNameArray should use a Vector when there are few entries.
akling@apple.com [Mon, 11 May 2015 21:13:53 +0000 (21:13 +0000)]
PropertyNameArray should use a Vector when there are few entries.
<https://webkit.org/b/144874>

Reviewed by Geoffrey Garen.

Bring back an optimization that was lost in the for-in refactoring.
PropertyNameArray now holds a Vector<AtomicStringImpl*> until there are
enough (20) entries to justify converting to a HashSet for contains().

Also inlined the code while we're here, since it has so few clients and
the call overhead adds up.

~5% progression on Kraken/json-stringify-tinderbox.

* runtime/PropertyNameArray.cpp: Removed.
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::canAddKnownUniqueForStructure):
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):

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

6 years agoFix run-javascriptcore-tests step on the WinCairo bot
ossy@webkit.org [Mon, 11 May 2015 20:42:39 +0000 (20:42 +0000)]
Fix run-javascriptcore-tests step on the WinCairo bot
https://bugs.webkit.org/show_bug.cgi?id=144866

Reviewed by Darin Adler.

* Scripts/run-jsc-stress-tests:

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