WebKit-https.git
5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 years agoAdd a Windows-specific result for the new accessibility/menu-list-crash2.html test.
akling@apple.com [Mon, 11 May 2015 20:28:40 +0000 (20:28 +0000)]
Add a Windows-specific result for the new accessibility/menu-list-crash2.html test.

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

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

5 years agoWeb Inspector: REGRESSION (r175203): No profile information is shown in Inspector
mattbaker@apple.com [Mon, 11 May 2015 20:09:14 +0000 (20:09 +0000)]
Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector
https://bugs.webkit.org/show_bug.cgi?id=144808

Reviewed by Darin Adler.

Source/JavaScriptCore:

Since a profile can be started after a timeline recording has already begun, we can't assume a zero start time.
The start time for the root node's call entry should be based on the stopwatch used by the ProfileGenerator.

* profiler/Profile.cpp:
(JSC::Profile::create):
(JSC::Profile::Profile):
* profiler/Profile.h:
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::ProfileGenerator):
(JSC::AddParentForConsoleStartFunctor::operator()):

Source/WebCore:

Profiles started from the console should always use the Inspector environment's shared stopwatch.

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

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

5 years ago[Content Extensions] Support domain-specific rules and exceptions.
commit-queue@webkit.org [Mon, 11 May 2015 19:54:15 +0000 (19:54 +0000)]
[Content Extensions] Support domain-specific rules and exceptions.
https://bugs.webkit.org/show_bug.cgi?id=144833

Patch by Alex Christensen <achristensen@webkit.org> on 2015-05-11
Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/contentextensions/domain-rules.html
(And lots of API tests)

This patch adds if-domain and unless-domain to the trigger in the JSON format.
if-domain makes the rule apply only to domains in the list.
unless-domain makes the rule apply to domains that are not in the list.

All rules without if-domain or unless-domain are compiled into a set of DFAs.  This behavior is unchanged.
All rules with if-domain or unless-domain are compiled into a separate set of DFAs.
The domains are also compiled into another set of DFAs.  This makes 3 arrays of DFA bytecode instead of 1.

If there are no domain specific rules, there is no change in behavior.
If there are domain specific rules, the URL will be checked for matches in both
filtersWithoutDomainsBytecode and filtersWithDomainsBytecode.  If there are matches from
filtersWithDomainsBytecode then the domain of the main document will be checked with
domainFiltersBytecode to see which of the matches applies to this domain.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
(WebCore::ContentExtensions::CombinedURLFilters::addDomain):
* contentextensions/CombinedURLFilters.h:
Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR.
* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
* contentextensions/CompiledContentExtension.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::compileRuleList):
Separate the rules into rules with domains and rules without domains and compile to bytecode.
* contentextensions/ContentExtensionCompiler.h:
Updated compiler interface to reflect the slightly more complicated structure.
* contentextensions/ContentExtensionError.cpp:
(WebCore::ContentExtensions::contentExtensionErrorCategory):
* contentextensions/ContentExtensionError.h:
Added new parsing errors.
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::loadTrigger):
(WebCore::ContentExtensions::loadEncodedRules):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Trigger::operator==):
Parse the new domain structures from JSON into the Trigger structure.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
Interpret as much bytecode as necessary to determine which rules apply to this URL and domain.
* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
* contentextensions/DFABytecodeCompiler.h:
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
* loader/ResourceLoadInfo.h:
Keep track of which actions have an if-domain trigger.  If an action is in the
filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger.
This requires additional information in the bytecode, so there are two new bytecode types.

Source/WebKit2:

* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::domainFiltersBytecode):
(WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::bytecode): Deleted.
(WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::ContentExtensionMetaData::fileSize):
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
Keep track of 3 different types of bytecode to be able to handle domain-specific rules.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::InMemoryCompiledContentExtension::createFromFilter):
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::InMemoryCompiledContentExtension::InMemoryCompiledContentExtension):
Moved CompiledContentExtensionData from ContentExtensionCompiler.h because it is only used for testing.
(TestWebKitAPI::mainDocumentRequest):
(TestWebKitAPI::subResourceRequest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::checkCompilerError):
Added tests for parsing and functionality of if-domain and unless-domain.

LayoutTests:

* http/tests/contentextensions/domain-rules-expected.txt: Added.
* http/tests/contentextensions/domain-rules.html: Added.
* http/tests/contentextensions/domain-rules.html.json: Added.

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

5 years agoAdd srcset, sizes and picture to the features json
yoav@yoav.ws [Mon, 11 May 2015 19:32:59 +0000 (19:32 +0000)]
Add srcset, sizes and picture to the features json
https://bugs.webkit.org/show_bug.cgi?id=144862

Reviewed by Benjamin Poulain.

Add the srcset w descriptor and sizes attribute as a new feature in the JSON file,
as well as adding the picture element and srcset's x descriptor as seperate features.

No new tests, since no new functionality added.

* features.json:

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

5 years agoFix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
cdumez@apple.com [Mon, 11 May 2015 19:01:26 +0000 (19:01 +0000)]
Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
https://bugs.webkit.org/show_bug.cgi?id=144873

Reviewed by Simon Fraser.

Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate().
checkingLogicalHeight should only be initialized to true when
"dimensionsCheck & WidthDimensionsCheck" if isVertical is true.

* dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):

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

5 years agoUnreviewed, remove unintended change.
basile_clement@apple.com [Mon, 11 May 2015 18:41:51 +0000 (18:41 +0000)]
Unreviewed, remove unintended change.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

5 years agoMake it easy to enable eager/non-concurrent JIT compilation
fpizlo@apple.com [Mon, 11 May 2015 18:30:18 +0000 (18:30 +0000)]
Make it easy to enable eager/non-concurrent JIT compilation
https://bugs.webkit.org/show_bug.cgi?id=144877

Reviewed by Michael Saboff.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:

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

5 years agoWe shouldn't promote LoadVarargs to a sequence of GetStacks and PutStacks if doing...
fpizlo@apple.com [Mon, 11 May 2015 18:18:10 +0000 (18:18 +0000)]
We shouldn't promote LoadVarargs to a sequence of GetStacks and PutStacks if doing so would exceed the LoadVarargs' limit
https://bugs.webkit.org/show_bug.cgi?id=144851

Reviewed by Michael Saboff.
Source/JavaScriptCore:

LoadVarargs loads arguments from some object and puts them on the stack. The region of
stack is controlled by a bunch of meta-data, including InlineCallFrame. InlineCallFrame
shouldn't really be edited after ByteCodeParser, so we cannot convert LoadVarargs to
something that uses more stack than the LoadVarargs wanted to.

This check was missing in the ArgumentsEliminationPhase's LoadVarargs->GetStack+PutStack
promoter. This is an important promotion rule for performance, and in cases where we are
compiling truly hot code, the LoadVarargs limit will be at least as big as the length of
the phantom arguments array that this phase sees. The LoadVarargs limit is based on
profiling and the phantom arguments array is a proof; in most cases the profiling is more
conservative.

But, you could write some crazy code where the statically obvious arguments array value is
bigger than what the profiling would have told you. When this happens, this promotion
effectively removes a bounds check. This either results in us clobbering a bunch of stack,
or it means that we never initialize a region of the stack that a later operation will read
(the uninitialization happens because PutStackSinkingPhase removes PutStacks that appear
unnecessary, and a GetMyArgumentByVal will claim not to use the region of the stack outside
the original LoadVarargs limit).

* dfg/DFGArgumentsEliminationPhase.cpp:
* tests/stress/load-varargs-elimination-bounds-check-barely.js: Added.
(foo):
(bar):
(baz):
* tests/stress/load-varargs-elimination-bounds-check.js: Added.
(foo):
(bar):
(baz):

LayoutTests:

* js/regress/load-varargs-elimination-expected.txt: Added.
* js/regress/load-varargs-elimination.html: Added.
* js/regress/script-tests/load-varargs-elimination.js: Added.
(foo):
(bar):
(baz):
* js/regress/sink-huge-activation-expected.txt: Added.
* js/regress/sink-huge-activation.html: Added.

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

5 years agorun-benchmark should support Chrome Canary and Firefox Nightly
rniwa@webkit.org [Mon, 11 May 2015 18:02:57 +0000 (18:02 +0000)]
run-benchmark should support Chrome Canary and Firefox Nightly
https://bugs.webkit.org/show_bug.cgi?id=144850

Reviewed by Darin Adler.

Added the support for Chrome Canary, Firefox (release), and Firefox Nightly.

This patch also extracts OSXBrowserDriver to launch and terminate processes on OS X.

* Scripts/webkitpy/benchmark_runner/browser_driver/browser_drivers.json:
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py: Added.
(OSXBrowserDriver):
(OSXBrowserDriver.prepareEnv): Extracted from ChromeBrowserDriver.prepareEnv.
(OSXBrowserDriver.closeBrowsers): Ditto.
(OSXBrowserDriver.launchProcess): Ditto.
(OSXBrowserDriver.terminateProcesses): Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver): Removed the unused self.chromePreferences.
(OSXChromeDriver.prepareEnv): Moved to OSXBrowserDriver.
(OSXChromeDriver.closeBrowsers): Ditto.
(OSXChromeDriver.launchUrl):
(OSXChromeCanaryDriver): Added.
(OSXChromeCanaryDriver.launchUrl):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py: Added.
(OSXFirefoxDriver): Added.
(OSXFirefoxDriver.launchUrl):
(OSXFirefoxNightlyDriver): Added.
(OSXFirefoxNightlyDriver.launchUrl):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):
(OSXSafariDriver.closeBrowsers):

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

5 years agoWeb Inspector: NavigationSidebarPanel leaks some event listeners
timothy@apple.com [Mon, 11 May 2015 17:50:25 +0000 (17:50 +0000)]
Web Inspector: NavigationSidebarPanel leaks some event listeners
https://bugs.webkit.org/show_bug.cgi?id=144523

Reviewed by Joseph Pecoraro.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.closed):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.closed):
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.closed):
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype.closed):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.closed):

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

5 years agoJSON.stringify shouldn't use generic get() to access Array.length
akling@apple.com [Mon, 11 May 2015 17:47:55 +0000 (17:47 +0000)]
JSON.stringify shouldn't use generic get() to access Array.length
<https://webkit.org/b/144847>

Reviewed by Geoffrey Garen.

If the value being serialized is a JSArray object, we can downcast and call its
length() directly instead of doing a generic property lookup.

0.5% progression on Kraken/json-stringify-tinderbox.

* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):

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

5 years agoPage overlay action context override should indicate the source of the request
timothy_horton@apple.com [Mon, 11 May 2015 17:38:51 +0000 (17:38 +0000)]
Page overlay action context override should indicate the source of the request
https://bugs.webkit.org/show_bug.cgi?id=144832
<rdar://problem/20562594>

Reviewed by Darin Adler.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
clients can tell whether the requested action context should be targetted
at an action menu or immediate action.

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm:
(TestWebKitAPI::ActionMenuTest::actionContextForResultAtPoint):

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

5 years ago[iOS] Close all open databases in expiration handler of process assertion
dbates@webkit.org [Mon, 11 May 2015 17:27:13 +0000 (17:27 +0000)]
[iOS] Close all open databases in expiration handler of process assertion
https://bugs.webkit.org/show_bug.cgi?id=144661
<rdar://problem/20845052>

Reviewed by Darin Adler.

Source/WebCore:

Expose functionality in WebCore to close all open databases. Closing a SQLite database
will interrupt any in-progress database transactions.

* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases().
* Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that
we can call in from WebKit2.
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases().
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases.
* Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that
we can call in from Legacy WebKit.

Source/WebKit/mac:

For Legacy WebKit, close all open databases when the process assertion expiration
handler is called.

* Storage/WebDatabaseManager.mm:
(+[WebDatabaseManager startBackgroundTask]): Call DatabaseTracker::tracker().closeAllDatabases()
in the expiration handler to close all open databases. As a side effect of closing
a database all in-progress database transactions are interrupted.

Source/WebKit2:

For WebKit2, close all open databases when the process assertion expiration
handler is called.

When the process assertion expiration handler is called we dispatch a synchronous
message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
them that they will be suspended imminently. The {Web, Network} process will always
service this message regardless if they were waiting for another message. In the
WebProcess, we will close all open databases among other tasks upon receiving this
message. In the NetworkProcess, we will purge some data from memory.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
to process the synchronous ProcessWillSuspendImminently message.
(WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
to process the message regardless of whether it is waiting for another message.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the NetworkProcess.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAndUIAssertion::setClient): Added.
* UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
(WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
(WebKit::ProcessAssertion::setClient): Added.
(WebKit::ProcessAssertion::client): Added.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
interface. Notify the process throttler clients that the assertion is near expiration.
* UIProcess/ProcessThrottler.h:
* UIProcess/ProcessThrottlerClient.h: Added
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the WebProcess.
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
to notify ProcessAssertionClient clients that the assertion is near expiration.
(WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
(WebKit::ProcessAndUIAssertion::setClient): Added.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
(WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
is called).
(WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
(WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
(WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
message to the WebProcessProxy.
(WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
did not mark all its graphics layers as volatile before process suspension.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.

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

5 years agoWebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValue...
antti@apple.com [Mon, 11 May 2015 16:26:16 +0000 (16:26 +0000)]
WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6
https://bugs.webkit.org/show_bug.cgi?id=144870
rdar://problem/20727702

Reviewed by Simon Fraser.

No repro but we are seeing null pointer crashes like this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore   0x00007fff92da5706 WebCore::WebKitCSSResourceValue::isCSSValueNone() const + 6
1   com.apple.WebCore   0x00007fff93382b48 WebCore::MaskImageOperation::isCSSValueNone() const + 24
2   com.apple.WebCore   0x00007fff92e0475e WebCore::FillLayer::hasNonEmptyMaskImage() const + 30

* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::MaskImageOperation):
(WebCore::MaskImageOperation::isCSSValueNone):

    This would crash like this if both m_styleImage and m_cssMaskImageValue are null.
    There are no obvious guarantees that this doesn't happen. Two of the constructor variants allow it
    and there is setImage which may turn m_styleImage null later too.

    Fix by making null m_cssMaskImageValue always signify CSSValueNone.

(WebCore::MaskImageOperation::cssValue):

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

5 years ago[GTK] Gardening 11th May.
commit-queue@webkit.org [Mon, 11 May 2015 15:40:47 +0000 (15:40 +0000)]
[GTK] Gardening 11th May.
https://bugs.webkit.org/show_bug.cgi?id=144863

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-05-11

* platform/gtk/TestExpectations:

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

5 years agoAX: Crash at WebCore::AccessibilityMenuList::addChildren()
cfleizach@apple.com [Mon, 11 May 2015 15:08:00 +0000 (15:08 +0000)]
AX: Crash at WebCore::AccessibilityMenuList::addChildren()
https://bugs.webkit.org/show_bug.cgi?id=144860

Reviewed by Mario Sanchez Prada.

Source/WebCore:

There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up.

Test: accessibility/menu-list-crash2.html

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::addChildren):

LayoutTests:

* accessibility/menu-list-crash2-expected.txt: Added.
* accessibility/menu-list-crash2.html: Added.

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

5 years ago[GTK] Gardening 7th May.
commit-queue@webkit.org [Mon, 11 May 2015 11:04:07 +0000 (11:04 +0000)]
[GTK] Gardening 7th May.
https://bugs.webkit.org/show_bug.cgi?id=144735

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-05-11

* platform/gtk/TestExpectations:
* platform/gtk/media/video-controls-no-scripting-expected.txt: Added.

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

5 years ago[WebGL] Unnecessary condition check in the while loop
commit-queue@webkit.org [Mon, 11 May 2015 10:41:24 +0000 (10:41 +0000)]
[WebGL] Unnecessary condition check in the while loop
https://bugs.webkit.org/show_bug.cgi?id=125001

Patch by Przemyslaw Szymanski <p.szymanski3@samsung.com> on 2015-05-11
Reviewed by Csaba Osztrogonác.

While loop in this case needs to be optimized a little.
For now a conditional statement in while will execute two
times at begin. do-while loop avoids to check first statement.

No new tests. No behaviour changed.

* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):

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

5 years ago[GTK] WorkQueue objects are not released
carlosgc@webkit.org [Mon, 11 May 2015 10:21:40 +0000 (10:21 +0000)]
[GTK] WorkQueue objects are not released
https://bugs.webkit.org/show_bug.cgi?id=144824

Reviewed by Žan Doberšek.

Do not keep a reference of the WorkQueue for the entire life of
its worker thread, since every task scheduled on the WorkQueue
already takes a reference. Instead, take a reference of the main
loop to make sure that when the worker thread starts, the main
loop hasn't been released to avoid runtime warnings (see
webkit.org/b/140998). Also removed the g_main_context_pop_thread_default()
from the thread body, since the thread-specific context queue will
be freed anyway when the thread exits.
If the WorkQueue is released early, before the thread has started,
schedule a main loop quit in the context, to make sure it will
be the first thing run by the main loop and the thread will exit.

* wtf/WorkQueue.h: Remove unused event loop mutex.
* wtf/gtk/WorkQueueGtk.cpp:
(WTF::WorkQueue::platformInitialize):
(WTF::WorkQueue::platformInvalidate):

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

5 years ago[GTK] Reorder Performance class's member initialization sequence
commit-queue@webkit.org [Mon, 11 May 2015 09:38:25 +0000 (09:38 +0000)]
[GTK] Reorder Performance class's member initialization sequence
https://bugs.webkit.org/show_bug.cgi?id=144858

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-05-11
Reviewed by Csaba Osztrogonác.

No new tests, no new behaviors.

* page/Performance.cpp:
(WebCore::Performance::Performance):

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

5 years agoReduce TransformationMatrix copies in WebKitCSSMatrix operations
zandobersek@gmail.com [Mon, 11 May 2015 08:52:35 +0000 (08:52 +0000)]
Reduce TransformationMatrix copies in WebKitCSSMatrix operations
https://bugs.webkit.org/show_bug.cgi?id=144795

Reviewed by Darin Adler.

Instead of copying the TransformationMatrix member, performing
the operation on it and then copying it again when creating
the new WebKitCSSMatrix object, copy it just once by first
creating the new WebKitCSSMatrix object and then performing
the operation on that object's TransformationMatrix directly.

* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::multiply):
(WebCore::WebKitCSSMatrix::translate):
(WebCore::WebKitCSSMatrix::scale):
(WebCore::WebKitCSSMatrix::rotate):
(WebCore::WebKitCSSMatrix::rotateAxisAngle):
(WebCore::WebKitCSSMatrix::skewX):
(WebCore::WebKitCSSMatrix::skewY):

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

5 years agoAdd missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
zandobersek@gmail.com [Mon, 11 May 2015 08:40:15 +0000 (08:40 +0000)]
Add missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
https://bugs.webkit.org/show_bug.cgi?id=144793

Reviewed by Darin Adler.

Update virtual method overrides under Source/WebCore/loader
and Source/WebCore/dom which are missing the override specifier.

* loader/DocumentThreadableLoader.h:
(WebCore::DocumentThreadableLoader::refThreadableLoader):
(WebCore::DocumentThreadableLoader::derefThreadableLoader):
* loader/cache/CachedRawResource.h:
* xml/parser/XMLDocumentParser.h:

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

5 years agoAdd missing vtable override specifiers under Source/WebCore/accessibility, Source...
zandobersek@gmail.com [Mon, 11 May 2015 08:39:19 +0000 (08:39 +0000)]
Add missing vtable override specifiers under Source/WebCore/accessibility, Source/WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=144792

Reviewed by Darin Adler.

Update virtual method overrides under Source/WebCore/accessibility
and Source/WebCore/dom which are missing the override specifier.

* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::isDetachedFromParent): Deleted.
* accessibility/AccessibilityRenderObject.h:
* dom/DecodedDataDocumentParser.h:
* dom/TouchEvent.h:

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

5 years agoHave MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
zandobersek@gmail.com [Mon, 11 May 2015 06:38:50 +0000 (06:38 +0000)]
Have MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
https://bugs.webkit.org/show_bug.cgi?id=144794

Reviewed by Philippe Normand.

* Modules/mediastream/MediaStream.h: getAudioTracks() and getVideoTracks()
should return a const reference to the member variables, instead of
copying the objects on every call.

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

5 years agoUse Ref instead of PassRefPtr in WebCore/page
gyuyoung.kim@webkit.org [Mon, 11 May 2015 05:53:20 +0000 (05:53 +0000)]
Use Ref instead of PassRefPtr in WebCore/page
https://bugs.webkit.org/show_bug.cgi?id=144841

Reviewed by Darin Adler.

To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
in WebCore/page.

Source/WebCore:

No new tests, no behavior changes.

* page/DebugPageOverlays.cpp:
* page/EventSource.cpp:
(WebCore::EventSource::create):
* page/EventSource.h:
* page/History.h:
(WebCore::History::create):
* page/Location.h:
(WebCore::Location::create):
* page/MainFrame.cpp:
(WebCore::MainFrame::create):
* page/MainFrame.h:
* page/Navigator.h:
(WebCore::Navigator::create):
* page/PageOverlay.cpp:
(WebCore::PageOverlay::create):
* page/PageOverlay.h:
* page/Performance.h:
* page/PerformanceEntryList.h:
(WebCore::PerformanceEntryList::create):
* page/PerformanceMark.h:
(WebCore::PerformanceMark::create):
* page/PerformanceMeasure.h:
(WebCore::PerformanceMeasure::create):
* page/PerformanceNavigation.h:
(WebCore::PerformanceNavigation::create):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::create):
* page/PerformanceTiming.h:
(WebCore::PerformanceTiming::create):
* page/PerformanceUserTiming.h:
(WebCore::UserTiming::create):
* page/Screen.h:
* page/Settings.cpp:
(WebCore::Settings::create):
* page/Settings.h:
* page/TextIndicator.cpp:
(WebCore::TextIndicator::create):
* page/TextIndicator.h:
* page/UserContentController.cpp:
(WebCore::UserContentController::create):
* page/UserContentController.h:
* page/UserMessageHandlerDescriptor.h:
(WebCore::UserMessageHandlerDescriptor::create):
* page/UserMessageHandlersNamespace.h:
* page/VisitedLinkStore.h:
* page/WebKitNamespace.h:
(WebCore::WebKitNamespace::create):
* page/WebKitPoint.h:
(WebCore::WebKitPoint::create):
* page/WorkerNavigator.h:
(WebCore::WorkerNavigator::create):
* page/animation/ImplicitAnimation.h:
(WebCore::ImplicitAnimation::create):
* page/animation/KeyframeAnimation.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::createForSelection):
(WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::create):
(WebCore::ScrollingStateFixedNode::clone):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::create):
(WebCore::ScrollingStateFrameScrollingNode::clone):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::create):
(WebCore::ScrollingStateOverflowScrollingNode::clone):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::create):
(WebCore::ScrollingStateStickyNode::clone):
* page/scrolling/ScrollingStateStickyNode.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::create):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::create):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::create):
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::create):
* page/scrolling/mac/ScrollingTreeMac.h:
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::create):

Source/WebKit2:

(WebKit::WebUserContentController::WebUserContentController):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::WebUserContentController):

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

5 years agobackground-position sometimes doesn't work properly with background-attachment: fixed
simon.fraser@apple.com [Mon, 11 May 2015 03:56:15 +0000 (03:56 +0000)]
background-position sometimes doesn't work properly with background-attachment: fixed
https://bugs.webkit.org/show_bug.cgi?id=103757
rdar://problem/18749925

Reviewed by Darin Adler.

Source/WebCore:

Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in
effect.

The primary issue was that positioningAreaSize was including the top content inset
height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates"
code path, which kicks in when the root background is fixed.

Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html
       platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html
       platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html
       platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html

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

LayoutTests:

Tests various configurations for painting the fixed backgrounds. The existing test was
actually wrong, so fixed to use a gradient (so you can see where the edges of the image are),
and be valid. Testing is complicated by the fact that setting top content inset actually
causes the snapshot to be inset at the top.

* platform/mac-wk2/tiled-drawing/resources/bordered-image.png: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html: Copied from LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-expected.html:
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html:

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

5 years ago[GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
commit-queue@webkit.org [Mon, 11 May 2015 03:09:11 +0000 (03:09 +0000)]
[GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
https://bugs.webkit.org/show_bug.cgi?id=144554

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-05-10
Reviewed by Darin Adler.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformSetCacheModel): Use WTF::ramSize()
instead of local function. Also use WTF::MB instead of dividing by
1024 * 1024.
(WebKit::getMemorySize): Deleted.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel): Ditto.
(WebKit::getMemorySize): Deleted.

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

5 years agoCMake defines CAIROGL_FOUND, not CAIRO_GL_FOUND
commit-queue@webkit.org [Mon, 11 May 2015 03:07:09 +0000 (03:07 +0000)]
CMake defines CAIROGL_FOUND, not CAIRO_GL_FOUND
https://bugs.webkit.org/show_bug.cgi?id=144846

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-05-10
Reviewed by Martin Robinson.

* Source/cmake/FindCairoGL.cmake: Use CAIROGL_* instead of
CAIRO_GL_* throughout, because find_package will define
CAIROGL_FOUND.
* Source/cmake/OptionsGTK.cmake: Ditto.

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

5 years ago[CMake] Some macros need to be defined/undefined, rather than ON/OFF
commit-queue@webkit.org [Mon, 11 May 2015 03:03:07 +0000 (03:03 +0000)]
[CMake] Some macros need to be defined/undefined, rather than ON/OFF
https://bugs.webkit.org/show_bug.cgi?id=144845

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-05-10
Reviewed by Martin Robinson.

* Source/cmake/OptionsGTK.cmake: Only define MOZ_X11 and XP_UNIX
if their corresponding WTF options are ON. The code in npapi.h
relies on these being undefined if they are to be switched off.

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

5 years agoUse preview view controller from WebKitSystemInterface.
commit-queue@webkit.org [Mon, 11 May 2015 01:41:13 +0000 (01:41 +0000)]
Use preview view controller from WebKitSystemInterface.
https://bugs.webkit.org/show_bug.cgi?id=144836

Add a property _allowsLinkPreview to WKWebView so that we can turn on/off preview at runtime. Also,
for client that doesn't provide preview view controller, use the default view controller prepared
by WebKitSystemInterface.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-05-10
Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _allowsLinkPreview]):
(-[WKWebView _setAllowsLinkPreview:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _allowsLinkPreview property
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreviewInWindow:]):
(-[WKContentView _unregisterPreviewInWindow:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]): : For client that doesn't provide
    preview delegate, use preview view controller in WebKitSystemInterface.
(-[WKContentView commitPreviewViewController:]):

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

5 years ago[GTK] fast/events/page-visibility-transition-test.html is timing out
mrobinson@webkit.org [Mon, 11 May 2015 00:57:01 +0000 (00:57 +0000)]
[GTK] fast/events/page-visibility-transition-test.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=114789

Reviewed by Darin Adler.

Tools:

* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::setHidden): Map and unmap the WebView when the harness
requests visibility changes.

LayoutTests:

* platform/gtk/TestExpectations: Unskip failing tests.

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

5 years agoFix internal Apple builds on Mavericks.
darin@apple.com [Sun, 10 May 2015 23:28:55 +0000 (23:28 +0000)]
Fix internal Apple builds on Mavericks.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]): Added missing conditionals around
some code that is for OS X 10.10 or newer only. There were similar conditionals around
other nearby code in this file, and around other uses of the same method in other files,
so matched the style.

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

5 years agoiOS internal build fix.
mitz@apple.com [Sun, 10 May 2015 22:49:57 +0000 (22:49 +0000)]
iOS internal build fix.

* Platform/mac/MenuUtilities.mm:

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

5 years ago[EFL] Fix install-dependencies on Ubuntu 14.10/15.04
ossy@webkit.org [Sun, 10 May 2015 22:15:08 +0000 (22:15 +0000)]
[EFL] Fix install-dependencies on Ubuntu 14.10/15.04
https://bugs.webkit.org/show_bug.cgi?id=144798

Reviewed by Darin Adler.

* efl/install-dependencies:

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

5 years agoGet rid of the public item accessors in BackForwardClient
commit-queue@webkit.org [Sun, 10 May 2015 21:45:25 +0000 (21:45 +0000)]
Get rid of the public item accessors in BackForwardClient
https://bugs.webkit.org/show_bug.cgi?id=144827

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

Remove backItem(), currentItem(), and forwardItem() from BackForwardClient.
We can still use these functionalities through BackForwardController.

No new tests, no behavior change.

Source/WebCore:

* history/BackForwardClient.h:
(WebCore::BackForwardClient::backItem): Deleted.
(WebCore::BackForwardClient::currentItem): Deleted.
(WebCore::BackForwardClient::forwardItem): Deleted.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]):

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

5 years agoRename Length::isPercent() and Length::isPercentNotCalculated().
commit-queue@webkit.org [Sun, 10 May 2015 21:43:26 +0000 (21:43 +0000)]
Rename Length::isPercent() and Length::isPercentNotCalculated().
https://bugs.webkit.org/show_bug.cgi?id=144791

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

1. Rename these methods as below for consistency and clarity.

Length::isPercentNotCalculated() => Length::isPercent()
Length::isPercent() => Length::isPercentOrCalculated()

2. Simplify the condition check of length type in SVGLengthContext::valueForLength().

"length.isPercent() && !length.isCalculated()" => "length.isPercent()"

No new tests, no behavior change.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForImageSliceSide):
(WebCore::valueForReflection):
(WebCore::percentageOrZoomAdjustedValue):
(WebCore::lineHeightFromStyle):
(WebCore::ComputedStyleExtractor::propertyValue):
* html/HTMLPlugInImageElement.cpp:
(WebCore::is100Percent):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::computeTransformedExtentViaTransformList):
* platform/Length.h:
(WebCore::Length::percent):
(WebCore::Length::isPercent):
(WebCore::Length::isPercentOrCalculated):
(WebCore::Length::isSpecified):
(WebCore::Length::isPercentNotCalculated): Deleted.
* platform/graphics/transforms/TranslateTransformOperation.h:
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::fullRecalc):
(WebCore::shouldScaleColumns):
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::layout):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
(WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
(WebCore::FixedTableLayout::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isSelfCollapsingBlock):
(WebCore::RenderBlock::textIndentOffset):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::needsPreferredWidthsRecalculation):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::logicalWidthIsResolvable):
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
(WebCore::RenderBox::hasUnsplittableScrollingOverflow):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
(WebCore::RenderBoxModelObject::relativePositionOffset):
(WebCore::RenderBoxModelObject::computedCSSPadding):
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderElement.cpp:
(WebCore::mustRepaintFillLayers):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layOutAxis):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::repaintOrMarkForLayout):
* rendering/RenderInline.cpp:
(WebCore::computeMargin):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computeIntrinsicLogicalWidths):
* rendering/RenderMenuList.cpp:
(RenderMenuList::computeIntrinsicLogicalWidths):
* rendering/RenderObject.cpp:
(WebCore::objectIsRelayoutBoundary):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computePreferredLogicalWidths):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computeIntrinsicLogicalWidths):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::verticalPositionForBox):
* rendering/style/GridLength.h:
(WebCore::GridLength::isPercentage):
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::isPercentage):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::computedLineHeight):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::hasRelativeDimensions):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::valueForLength):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasRelativeWidth):
(WebCore::SVGImage::hasRelativeHeight):

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

5 years agoRemove unnecessary semicolons.
commit-queue@webkit.org [Sun, 10 May 2015 21:26:51 +0000 (21:26 +0000)]
Remove unnecessary semicolons.
https://bugs.webkit.org/show_bug.cgi?id=144844

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

No new tests, no behavior change.

Source/WebCore:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::readString):
* platform/mediastream/RealtimeMediaSourceCapabilities.h:
(WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource):
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::nsError):
* rendering/RenderThemeIOS.mm:
(WebCore::getSharedFunctionRef):

Source/WebKit2:

* Shared/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::transformHandlesToObjects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::idToHistoryItemMap):

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

5 years agoRemove unnecessary forward declarations in StyleProperties.h
commit-queue@webkit.org [Sun, 10 May 2015 21:23:33 +0000 (21:23 +0000)]
Remove unnecessary forward declarations in StyleProperties.h
https://bugs.webkit.org/show_bug.cgi?id=144843

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

No new tests, no behavior change.

* css/StyleProperties.h:

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

5 years agoFix build.
darin@apple.com [Sun, 10 May 2015 20:28:16 +0000 (20:28 +0000)]
Fix build.

* Platform/mac/MenuUtilities.mm: Added includes that were somehow omitted in what
I committed before.

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

5 years agoRemove unnecessary AtomicStringImpl* hash specification in PropertyNameArray.
akling@apple.com [Sun, 10 May 2015 20:19:11 +0000 (20:19 +0000)]
Remove unnecessary AtomicStringImpl* hash specification in PropertyNameArray.

Follow up to r184050 suggested by Darin.

* runtime/PropertyNameArray.h:

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

5 years agoRemove unused things from PropertyNameArray.
akling@apple.com [Sun, 10 May 2015 20:03:57 +0000 (20:03 +0000)]
Remove unused things from PropertyNameArray.
<https://webkit.org/b/144834>

Reviewed by Filip Pizlo.

PropertyNameArray had a bunch of bells and whistles added to it when for-in iteration
was refactored and optimized last year. Then more refactoring happened and this class
doesn't need to ring and toot anymore.

The RefCountedIdentifierSet class disappears since the JSPropertyNameEnumerator wasn't
actually using it for anything and we were just wasting time creating these.

Also made the member functions take AtomicStringImpl* instead of plain StringImpl*.

* runtime/JSObject.cpp:
(JSC::JSObject::getPropertyNames):
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::create):
(JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator):
* runtime/JSPropertyNameEnumerator.h:
* runtime/PropertyNameArray.cpp:
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::setPreviouslyEnumeratedProperties): Deleted.
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::PropertyNameArray):
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):
(JSC::PropertyNameArray::canAddKnownUniqueForStructure):
(JSC::RefCountedIdentifierSet::contains): Deleted.
(JSC::RefCountedIdentifierSet::size): Deleted.
(JSC::RefCountedIdentifierSet::add): Deleted.
(JSC::PropertyNameArray::identifierSet): Deleted.
(JSC::PropertyNameArray::numCacheableSlots): Deleted.
(JSC::PropertyNameArray::setNumCacheableSlotsForObject): Deleted.
(JSC::PropertyNameArray::setBaseObject): Deleted.
(JSC::PropertyNameArray::setPreviouslyEnumeratedLength): Deleted.

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

5 years ago[Cocoa] Fix paths and resort WebCore project file
darin@apple.com [Sun, 10 May 2015 19:28:08 +0000 (19:28 +0000)]
[Cocoa] Fix paths and resort WebCore project file
https://bugs.webkit.org/show_bug.cgi?id=144838

Reviewed by Dan Bernstein.

* WebCore.xcodeproj/project.pbxproj: Re-sorted this file with the
sort-Xcode-project-file script and fixed the paths in the platform/ios directory.

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

5 years ago[Streams API] Refactor ReadableStreamReader close promise callback cleaning
youenn.fablet@crf.canon.fr [Sun, 10 May 2015 18:33:33 +0000 (18:33 +0000)]
[Streams API] Refactor ReadableStreamReader close promise callback cleaning
https://bugs.webkit.org/show_bug.cgi?id=144799

Reviewed by Darin Adler.

Moved close callback cleaning to releaseStream, which is now releaseStreamAndClean.
Moved that method to private as it is no longer needed by subclasses.

No behavior changes.

* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::releaseStreamAndClean):
(WebCore::ReadableStreamReader::changeStateToClosed):
(WebCore::ReadableStreamReader::changeStateToErrored):
* Modules/streams/ReadableStreamReader.h:

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

5 years ago[Cocoa] Don't soft link DataDetectorsCore
darin@apple.com [Sun, 10 May 2015 18:29:59 +0000 (18:29 +0000)]
[Cocoa] Don't soft link DataDetectorsCore
https://bugs.webkit.org/show_bug.cgi?id=144837

Reviewed by Dan Bernstein.

Source/WebCore:

Linking this in the normal way should slightly speed up the web process
startup time. We don't need to soft link it: It's present in the
OS X base system and there is no reference cycle with WebKit.

* Configurations/WebCore.xcconfig: Added PrivateFrameworks to
FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to
OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too.

* WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h.

* editing/mac/DataDetection.mm:
(WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see
if DataDetectorsCore is available.

* page/mac/ServicesOverlayController.h: Simplified a forward declaration to
only declare what we actually use.
* page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the
DataDetectorsSPI.h header.

* platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level
DataDetectorsCore framework, which has no reference cycle with WebKit, and
which we can link to normally. Moved the content here from DataDetectorsSPI.h,
added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed
the incorrect return type on DDScannerScanQuery, which was detected when
using the system headers in conjunction with this file.

* platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that
was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK)
path that uses the system headers and moved a few stray DataDetectors SPI
definitions from elsewhere into this header.

Source/WebKit2:

* Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here.

* WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header,
DataDetectorsSPI.h.

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

5 years agoAX: Don't expose elements as data tables just because they use display: table
cfleizach@apple.com [Sun, 10 May 2015 14:52:50 +0000 (14:52 +0000)]
AX: Don't expose elements as data tables just because they use display: table
https://bugs.webkit.org/show_bug.cgi?id=144804

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Elements will create RenderTable objects if they have display:table. We shouldn't assume these are accessibility tables.

Test: accessibility/css-table-ignored.html

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

LayoutTests:

* accessibility/css-table-ignored-expected.txt: Added.
* accessibility/css-table-ignored.html: Added.

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

5 years agoWeb Inspector: In the console, show function name next to the source link
nvasilyev@apple.com [Sun, 10 May 2015 12:23:07 +0000 (12:23 +0000)]
Web Inspector: In the console, show function name next to the source link
https://bugs.webkit.org/show_bug.cgi?id=144372

Introduce CallFrameView to display counsole message source links. It looks like this:

    [f] functionName - filename.js:42

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.createSourceCodeLocationLink):
(WebInspector.linkifyLocation):
(.showSourceCodeLocation):
(WebInspector.linkifyElement):
Abstract this out as it's used in WebInspector.CallFrameView and WebInspector.createSourceCodeLocationLink.

(WebInspector.sourceCodeForURL):
Move this code from Timeline to Main.js as it's used by Console too.

(WebInspector.linkifyURLAsNode):
Remove tooltipText argument as it is never used.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._callFramesFromPayload):
* UserInterface/Main.html:
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromPayload):
Abstract this out as it's used in WebInspector.TimelineManager.prototype._callFramesFromPayload and
WebInspector.ConsoleMessageView._appendLocationLink.

(WebInspector.CallFrame):
* UserInterface/Views/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Move it to WebInspector.CallFrameView.iconForCallFrame.

* UserInterface/Views/CallFrameView.css: Added.
(.call-frame):
(.call-frame .icon):
(.call-frame .titles):
(.call-frame .title):
(.call-frame .source-link):
(.call-frame .title + .subtitle > .source-link):
(.call-frame .subtitle .source-link):
(.call-frame:focus .subtitle .source-link):
(.call-frame .subtitle:empty):
(.call-frame .subtitle):
(.call-frame .colon):
(.call-frame .title + .subtitle::before):
* UserInterface/Views/CallFrameView.js: Added.
(WebInspector.CallFrameView):
(WebInspector.CallFrameView.iconClassNameForCallFrame):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message .console-message-location):
(.console-message .call-frame):
(.console-message .go-to-link):
(.console-message .go-to-link:focus):
(.console-message .console-message-url::before):
(.console-saved-variable): Deleted.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
* UserInterface/Views/DebuggerDashboardView.js:
* UserInterface/Views/Main.css:
(.hidden): Deleted.
* UserInterface/Views/ProfileNodeTreeElement.js:
(WebInspector.ProfileNodeTreeElement):
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.createCellContent):

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

5 years agoMake arguments of run-benchmark more user friendly
rniwa@webkit.org [Sun, 10 May 2015 06:46:33 +0000 (06:46 +0000)]
Make arguments of run-benchmark more user friendly
https://bugs.webkit.org/show_bug.cgi?id=144835

Reviewed by Darin Adler.

Made --build-directory optional since I don't expect a typical WebKit developer to have a local build
of Chrome and Firefox. Also made --plan accept just a filename so that we can just say "speedometer"
instead of "Tools/Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan". Finally, removed
default values from --platform and --browser as they are required arguments.

* Scripts/run-benchmark:
(main): Made --build-directory optional, and removed default values from --platform and --browser.
Also added help text for --build-directory and --plan. In addition, the list of platforms and browsers
are not dynamically obtained via BrowserDriverFactory.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__): Raise when we can't find the plan file or the plan file is not a valid JSON
file instead of suppressing the error here and blowing up later mysteriously since we won't be able to
run any benchmark in that case.
(BenchmarkRunner._findPlanFile): Added. Look for the plan in webkitpy/benchmark_runner/data/plans if
the specified file isn't a valid relative or an absolute path.
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
(BrowserDriverFactory.available_platforms): Added. Used in main to provide the list of valid platforms
and browsers.
(BrowserDriverFactory.available_browsers): Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver.launchUrl): browserBuildPath is never optional since BenchmarkRunner.execute always
calls launchUrl with this argument so removed the default value. Also added a fallback path for when
browserBuildPath was None.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.launchUrl): Ditto. We also fallback when the build directory doesn't contain Safari
so that we can use locally built WebKit to launch Safari.

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

5 years agoDeployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
mitz@apple.com [Sun, 10 May 2015 03:58:20 +0000 (03:58 +0000)]
Deployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
https://bugs.webkit.org/show_bug.cgi?id=144831

Reviewed by Sam Weinig.

Reverted r182846 and r182904.

* Shared/API/Cocoa/WKFoundation.h:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoIntroduce ParentNode.idl / NonDocumentTypeChildNode.idl
cdumez@apple.com [Sun, 10 May 2015 03:22:21 +0000 (03:22 +0000)]
Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
https://bugs.webkit.org/show_bug.cgi?id=144825

Reviewed by Sam Weinig.

Source/WebCore:

Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
specification and to avoid IDL code duplication:
- https://dom.spec.whatwg.org/#interface-parentnode
- https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode

No Web-Exposed behavior change.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* dom/CharacterData.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/Element.idl:
* dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
* dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.

LayoutTests:

Rebaseline test as the order of the methods changed when iterating.

* js/dom/dom-static-property-for-in-iteration-expected.txt:

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

5 years agoInvalidate the FontCache on WebProcess suspension / critical memory pressure
cdumez@apple.com [Sat, 9 May 2015 17:37:16 +0000 (17:37 +0000)]
Invalidate the FontCache on WebProcess suspension / critical memory pressure
https://bugs.webkit.org/show_bug.cgi?id=144821

Reviewed by Antti Koivisto.

Invalidate the FontCache on WebProcess suspension / critical memory
pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
the pages I tested). We already purge inactive font data on
non-critical memory warning but invalidating the whole FontCache takes
care of clearing the FontCascade cache and the fontPlatformData cache
as well.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

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

5 years agoRemove the PICTURE_SIZES build flag
yoav@yoav.ws [Sat, 9 May 2015 08:39:23 +0000 (08:39 +0000)]
Remove the PICTURE_SIZES build flag
https://bugs.webkit.org/show_bug.cgi?id=144679

Reviewed by Benjamin Poulain.

Removed the PICTURE_SIZES build time flag.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWindows.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests, since there's no functionality change.

* Configurations/FeatureDefines.xcconfig:
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken):
* css/CSSParser.h:
* css/SourceSizeList.cpp:
(WebCore::parseSizesAttribute): Deleted.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::currentSrc):
* html/HTMLImageElement.idl:
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* html/parser/HTMLSrcsetParser.cpp:
(WebCore::parseDescriptors):
(WebCore::pickBestImageCandidate):

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

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

5 years agoLayout tests broke due to unexpected simctl output
ddkilzer@apple.com [Sat, 9 May 2015 08:20:33 +0000 (08:20 +0000)]
Layout tests broke due to unexpected simctl output

* Scripts/webkitpy/xcode/simulator.py:
(Simulator._parse_devices): Handle new Device Pairs header.
* Scripts/webkitpy/xcode/simulator_unittest.py:
(test_device_pairs): Add unit test for Device Pairs header.

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

5 years agostreams/reference-implementation/readable-stream-reader.html and streams/reference...
youenn.fablet@crf.canon.fr [Sat, 9 May 2015 06:40:33 +0000 (06:40 +0000)]
streams/reference-implementation/readable-stream-reader.html and streams/reference-implementation/bad-underlying-sources.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=144813

Reviewed by Alexey Proskuryakov.

Removed small timeouts for tests that went from TIMEOUT to PASS thanks to other patches.

* streams/reference-implementation/bad-underlying-sources.html:
* streams/reference-implementation/readable-stream-reader.html:

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