WebKit-https.git
4 years agoModern IDB: Refactor memory objectstore/transaction interation.
beidson@apple.com [Mon, 9 Nov 2015 18:36:45 +0000 (18:36 +0000)]
Modern IDB: Refactor memory objectstore/transaction interation.
https://bugs.webkit.org/show_bug.cgi?id=151014

Reviewed by Darin Adler.

No new tests (Refactor, no change in behavior).

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::putRecord): Deleted. Renamed to addRecord.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::deleteRecord):
(WebCore::IDBServer::MemoryObjectStore::addRecord):
(WebCore::IDBServer::MemoryObjectStore::putRecord): Deleted. Renamed to addRecord.
(WebCore::IDBServer::MemoryObjectStore::setKeyValue): Deleted. Folded into addRecord.
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):

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

4 years agoRework the way allowed argument classes are stored
andersca@apple.com [Mon, 9 Nov 2015 18:35:19 +0000 (18:35 +0000)]
Rework the way allowed argument classes are stored
https://bugs.webkit.org/show_bug.cgi?id=150992

Reviewed by Darin Adler.

Add a separate MethodInfo class so we have someplace to store the reply block arguments.
Use HashSet<Class> instead of NSSet. No functionality change intended.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
(decodeObjectFromObjectStream):
(checkIfClassIsAllowed):
(decodeInvocationArguments):
(decodeObject):
(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
(-[WKRemoteObjectDecoder allowedClasses]):
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(isContainerClass):
(propertyListClasses):
(initializeMethod):
(initializeMethods):
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
(allowedArgumentClassesForMethod): Deleted.
(initializeAllowedArgumentClasses): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:

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

4 years agoREGRESSION (r190883): Error calculating the tile size for an SVG with no intrinsic...
commit-queue@webkit.org [Mon, 9 Nov 2015 18:10:29 +0000 (18:10 +0000)]
REGRESSION (r190883): Error calculating the tile size for an SVG with no intrinsic size but with large floating intrinsic ratio
https://bugs.webkit.org/show_bug.cgi?id=150904

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-09
Reviewed by Darin Adler.
Source/WebCore:

This patch addresses two issues. The first one is a regression from r190883
which was rolling out r184895. There was a missing if-statement in
RenderBoxModelObject::calculateImageIntrinsicDimension(). We should return
it back. But this if-statement is an optimization; if we hit it we should
return the image resolvedSize. But we should also return the same result
if we call resolveAgainstIntrinsicWidthOrHeightAndRatio().

We had a bug in resolving the intrinsic size of an image using a large
intrinsic ratio. We need to do the calculation in LayoutUnits always.
Using float calculations and then casting the output to an integer results
in significant truncation if the intrinsic ratio is large.

Test: fast/backgrounds/background-image-large-float-intrinsic-ratio.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::resolveWidthForRatio):
(WebCore::resolveHeightForRatio):
(WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio):
(WebCore::resolveAgainstIntrinsicRatio):
Resolve the image size using its intrinsic ratio in LayoutUnits.

(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
Put back an if-statement which was missing from rolling out r184895

LayoutTests:

Make sure the image resolvedSize is calculated correctly when the intrinsic
ratio is a large non integer value.

* fast/backgrounds/background-image-large-float-intrinsic-ratio-expected.html: Added.
* fast/backgrounds/background-image-large-float-intrinsic-ratio.html: Added.

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

4 years ago[Streams API] Activate assertions
youenn.fablet@crf.canon.fr [Mon, 9 Nov 2015 18:06:51 +0000 (18:06 +0000)]
[Streams API] Activate assertions
https://bugs.webkit.org/show_bug.cgi?id=151021

Reviewed by Darin Adler.

Activating assertions in streams API.
Fixing a bug in ReadableStream implementation: when pull promise is rejected,
the readable stream may already be errored by some other means.

Covered by existing test sets in Debug builds.

* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
(teeReadableStreamPullFunction):
(errorReadableStream):
(requestReadableStreamPull):
(finishClosingReadableStream):
(closeReadableStream):
(enqueueInReadableStream):
(readFromReadableStreamReader):
* Modules/streams/ReadableStreamReader.js:
(cancel):
* Modules/streams/StreamInternals.js:
(peekQueueValue):
* Modules/streams/WritableStream.js:
(write):
(state):
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue):
(closeWritableStream): Deleted.

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

4 years agoMarking jquery/manipulation.html as a flaky timeout on Win debug
ryanhaddad@apple.com [Mon, 9 Nov 2015 16:34:05 +0000 (16:34 +0000)]
Marking jquery/manipulation.html as a flaky timeout on Win debug
https://bugs.webkit.org/show_bug.cgi?id=151027

Unreviewed test gardening.

* TestExpectations:
* platform/win/TestExpectations:

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

4 years agoUnreviewed. Rebaselined several tests with 1px differences.
svillar@igalia.com [Mon, 9 Nov 2015 16:30:15 +0000 (16:30 +0000)]
Unreviewed. Rebaselined several tests with 1px differences.

* platform/gtk/editing/pasteboard/innerText-inline-table-expected.txt:
* platform/gtk/fast/block/positioning/table-cell-static-position-expected.txt:
* platform/gtk/fast/borders/border-radius-different-width-001-expected.txt: Added.
* platform/gtk/fast/css/box-shadow-and-border-radius-expected.txt: Added.
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt:
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt:
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt:
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.txt:
* platform/gtk/http/tests/misc/generated-content-inside-table-expected.txt:
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-archive-codebase-expected.txt: Added.
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-archive-expected.txt: Added.
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-code-codebase-expected.txt: Added.
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-code-expected.txt: Added.
* platform/gtk/imported/blink/media/track/media-element-move-to-new-document-assert-expected.txt: Added.

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

4 years ago[Streams API] Shield implementation from mangling then and catch promise methods
calvaris@igalia.com [Mon, 9 Nov 2015 16:12:37 +0000 (16:12 +0000)]
[Streams API] Shield implementation from mangling then and catch promise methods
https://bugs.webkit.org/show_bug.cgi?id=150934

Reviewed by Youenn Fablet.

Source/JavaScriptCore:

Since the prototype is not deletable and readonly we only have to care about ensuring that it has the right
@then and @catch internal methods.

* runtime/JSPromisePrototype.h:
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::addOwnInternalSlots): Added to create the proper @then and @catch internal slots.
(JSC::JSPromisePrototype::create): Call addOwnInternalSlots.

Source/WebCore:

This is a first step to get streams code shielded from user replacing the then and catch methods in our
promises. We use newly introduced @then and @catch prototype internal slots and that should solve a lot of use
cases.

Test: streams/streams-promises.html.

* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
(teeReadableStreamPullFunction):
(cancelReadableStream):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
* Modules/streams/WritableStreamInternals.js:
(callOrScheduleWritableStreamAdvanceQueue):

LayoutTests:

* streams/streams-promises.html: Added tests from about replacing
the prototype, then and catch methods. Renamed all tests as well.
* streams/streams-promises-expected.txt: Added expectations.

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

4 years ago[css-grid] Refactor cachedGridCoordinate() to cachedGridSpan()
rego@igalia.com [Mon, 9 Nov 2015 14:46:49 +0000 (14:46 +0000)]
[css-grid] Refactor cachedGridCoordinate() to cachedGridSpan()
https://bugs.webkit.org/show_bug.cgi?id=151017

Reviewed by Sergio Villar Senin.

We were using cachedGridCoordinate() in lots of places and checking the
direction just in the next line. Creating a generic function to do this.

No new tests, no behavior change.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::GridItemWithSpan::GridItemWithSpan):
(WebCore::GridItemWithSpan::span):
(WebCore::GridItemWithSpan::operator<):
(WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::cachedGridSpan):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::GridItemWithSpan::gridItem): Deleted.
(WebCore::RenderGrid::populateGridPositions): Deleted.
* rendering/RenderGrid.h:

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

4 years agoJS Built-ins functions should be able to assert
youenn.fablet@crf.canon.fr [Mon, 9 Nov 2015 14:15:21 +0000 (14:15 +0000)]
JS Built-ins functions should be able to assert
https://bugs.webkit.org/show_bug.cgi?id=150333

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Introduced @assert to enable asserting in JS built-ins.
Adding a new bytecode 'assert' to implement it.
In debug builds, @assert generates 'assert' bytecodes.
In release builds, no byte code is produced for @assert.

In case assert is false, the JS built-in and the line number are dumped.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitAssert):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp: Generating op_assert bytecode for @assert for Debug builds.
(JSC::BytecodeIntrinsicNode::emit_intrinsic_assert):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_assert):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_assert):
* llint/LowLevelInterpreter.asm:
* runtime/CommonIdentifiers.h: Adding @assert identifier as intrinsic.
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:

Source/WebCore:

* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader): Activating an @assert.

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

4 years ago[css-grid] Improve grid container sizing with size constraints and intrinsic sizes
svillar@igalia.com [Mon, 9 Nov 2015 12:56:43 +0000 (12:56 +0000)]
[css-grid] Improve grid container sizing with size constraints and intrinsic sizes
https://bugs.webkit.org/show_bug.cgi?id=150679

Reviewed by Darin Adler.

Source/WebCore:

The grid container stores from now on its min-content and
max-content block sizes in order to be able to properly
compute its intrinsic size. It has to redefine
computeIntrinsicLogicalContentHeightUsing() because the
behavior of grid is different to "normal" blocks:

- the min-content size is the sum of the grid container's
track sizes in the appropiate axis when the grid is sized
under a min-content constraint.
- the max-content size is the sum of the grid container's
track sizes in the appropiate axis when the grid is sized
under a max-content constraint.
- the auto block size is the max-content size.

A nice side effect is that we can now properly detect whether
the grid has a definite size on a given axis or not.

Tests: fast/css-grid-layout/absolute-positioning-definite-sizes.html
       fast/css-grid-layout/flex-and-intrinsic-sizes.html
       fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html
       fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html

* rendering/RenderBox.h: made
computeIntrinsicLogicalContentHeightUsing() virtual.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridSizingData::GridSizingData):
(WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
(WebCore::RenderGrid::GridSizingData::setFreeSpaceForDirection):
(WebCore::RenderGrid::computeTrackBasedLogicalHeight):
(WebCore::RenderGrid::computeTrackSizesForDirection):
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeIntrinsicLogicalHeight):
(WebCore::RenderGrid::computeIntrinsicLogicalContentHeightUsing):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::distributeSpaceToTracks):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::populateGridPositions):
(WebCore::RenderGrid::gridElementIsShrinkToFit): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/absolute-positioning-definite-sizes-expected.txt: Added.
* fast/css-grid-layout/absolute-positioning-definite-sizes.html: Added.
* fast/css-grid-layout/flex-and-intrinsic-sizes-expected.txt: Added.
* fast/css-grid-layout/flex-and-intrinsic-sizes.html: Added.
* fast/css-grid-layout/grid-element-change-columns-repaint.html:
* fast/css-grid-layout/grid-item-change-column-repaint.html:
* fast/css-grid-layout/grid-preferred-logical-widths.html:
* fast/css-grid-layout/maximize-tracks-definite-indefinite-height-expected.txt: Added.
* fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html: Added.
* fast/css-grid-layout/maximize-tracks-definite-indefinite-width-expected.txt: Added.
* fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html: Added.
* fast/css-grid-layout/percent-of-indefinite-track-size.html:
* fast/events/key-events-in-editable-gridbox-expected.txt:
* fast/events/key-events-in-editable-gridbox.html: Added more test
cases for intrinsic and fixed sized heights.

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

4 years ago[css-grid] Grid placement conflict handling
svillar@igalia.com [Mon, 9 Nov 2015 12:24:38 +0000 (12:24 +0000)]
[css-grid] Grid placement conflict handling
https://bugs.webkit.org/show_bug.cgi?id=150891

Reviewed by Darin Adler.

Source/WebCore:

If the placement for a grid item contains two lines, and the
start line is further end-ward than the end line, swap the two
lines. If the start line is equal to the end line, remove the
end line.

Test: fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line.html

* rendering/style/GridResolvedPosition.cpp:
(WebCore::resolveNamedGridLinePositionFromStyle):
(WebCore::resolveGridPositionFromStyle):
(WebCore::GridResolvedPosition::GridResolvedPosition):
(WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
(WebCore::adjustGridPositionForSide): Deleted.
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::prev):

LayoutTests:

Updated the expectations for
named-grid-lines-with-named-grid-areas-dynamic-get-set.html
because two of the tests where positioning an item with a
start-line > end-line (it was removing the end line instead of
swapping them).

* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-dynamic-get-set.html:
* fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line-expected.html: Added.
* fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line.html: Added.

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

4 years agoUnreviewed CMake buildfix after r192113.
ossy@webkit.org [Mon, 9 Nov 2015 12:13:06 +0000 (12:13 +0000)]
Unreviewed CMake buildfix after r192113.

* PlatformMac.cmake: New file added.

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

4 years ago[EFL] Fix the gst-plugins-bad jhbuild module build on Ubuntu 15.10
ossy@webkit.org [Mon, 9 Nov 2015 12:07:30 +0000 (12:07 +0000)]
[EFL] Fix the gst-plugins-bad jhbuild module build on Ubuntu 15.10
https://bugs.webkit.org/show_bug.cgi?id=150928

Reviewed by Gyuyoung Kim.

* efl/jhbuild.modules:

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

4 years agoUnreviewed speculative CMake buildfix after r192111.
ossy@webkit.org [Mon, 9 Nov 2015 11:55:53 +0000 (11:55 +0000)]
Unreviewed speculative CMake buildfix after r192111.

Reviewed by NOBODY (OOPS!).

* CMakeLists.txt: New files added.

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

4 years agoUnreviewed.
calvaris@igalia.com [Mon, 9 Nov 2015 09:57:13 +0000 (09:57 +0000)]
Unreviewed.

* platform/win/TestExpectations: Marked 150976 as dup of 147933.

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

4 years ago[EFL] Add UserAgentEFl.cpp|h
gyuyoung.kim@webkit.org [Mon, 9 Nov 2015 07:03:18 +0000 (07:03 +0000)]
[EFL] Add UserAgentEFl.cpp|h
https://bugs.webkit.org/show_bug.cgi?id=151007

Reviewed by Darin Adler.

As other ports EFL port starts to have UserAgentEfl class in order to support more detailed
UA.

Source/WebCore:

No new tests, no behavior change.

* PlatformEfl.cmake:
* platform/efl/UserAgentEfl.cpp: Added.
(WebCore::platformForUAString):
(WebCore::platformVersionForUAString):
(WebCore::versionForUAString):
(WebCore::standardUserAgent):
* platform/efl/UserAgentEfl.h: Added.

Source/WebKit2:

* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::standardUserAgent): Call WebCore::standardUserAgent().

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

4 years ago[ES6] Minimize ES6_CLASS_SYNTAX ifdefs
utatane.tea@gmail.com [Mon, 9 Nov 2015 01:34:09 +0000 (01:34 +0000)]
[ES6] Minimize ES6_CLASS_SYNTAX ifdefs
https://bugs.webkit.org/show_bug.cgi?id=151006

Reviewed by Darin Adler.

This patch minimizes ENABLE_ES6_CLASS_SYNTAX ifdefs.
It keeps several ENABLE_ES6_CLASS_SYNTAX ifdefs in Parser.cpp.

- super meta property
- class declaration parsing
- class expression parsing
- class with import declaration

This change makes difference minimal between the enabled and disabled configurations;
reducing accidental build breaks of the disabled configuration.

* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::constructorKind): Deleted.
* bytecompiler/NodesCodegen.cpp:
* parser/ASTBuilder.h:
* parser/NodeConstructors.h:
* parser/Nodes.h:
* parser/Parser.cpp:
* parser/Parser.h:
(JSC::Scope::hasDirectSuper): Deleted.
(JSC::Scope::needsSuperBinding): Deleted.
* parser/ParserFunctionInfo.h:
* parser/ParserTokens.h:
* parser/SyntaxChecker.h:

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

4 years agoUse StringView::upconvertedCharacters() to make a 16-bit copy in String.prototype...
sukolsak@gmail.com [Sun, 8 Nov 2015 18:36:55 +0000 (18:36 +0000)]
Use StringView::upconvertedCharacters() to make a 16-bit copy in String.prototype.normalize
https://bugs.webkit.org/show_bug.cgi?id=151005

Reviewed by Michael Saboff.

The ICU's unorm_normalize function used by String.prototype.normalize
requires a 16-bit string. This patch uses StringView::upconvertedCharacters()
to make a 16-bit copy of a string.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncNormalize):

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

4 years agoAnother Windows build fix.
simon.fraser@apple.com [Sun, 8 Nov 2015 17:16:36 +0000 (17:16 +0000)]
Another Windows build fix.

* WebView.cpp:
(WebView::paintIntoBackingStore):

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

4 years agoFix the Windows build after r192140.
simon.fraser@apple.com [Sun, 8 Nov 2015 17:11:23 +0000 (17:11 +0000)]
Fix the Windows build after r192140.

* FullscreenVideoController.cpp:
(HUDButton::draw):
(HUDSlider::draw):
(FullscreenVideoController::draw):
* Plugins/PluginView.cpp:
(WebCore::PluginView::paintMissingPluginIcon):

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

4 years agoREGRESSION (r192140): Windows build broke after removing ColorSpace argument to all...
ddkilzer@apple.com [Sun, 8 Nov 2015 15:32:41 +0000 (15:32 +0000)]
REGRESSION (r192140): Windows build broke after removing ColorSpace argument to all drawing calls
<http://webkit.org/b/150967>

Unreviewed attempt to fix the Windows build.

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::drawTextAtPoint):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintSearchFieldCancelButton):
(WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeWin::paintSearchFieldResultsButton):

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

4 years agogenerate-js-builtins.js should support @internal annotation
youenn.fablet@crf.canon.fr [Sun, 8 Nov 2015 11:40:35 +0000 (11:40 +0000)]
generate-js-builtins.js should support @internal annotation
https://bugs.webkit.org/show_bug.cgi?id=150929

Reviewed by Darin Adler.

Source/JavaScriptCore:

* Scripts/builtins/builtins_generate_separate_header.py:
(BuiltinsSeparateHeaderGenerator.generate_output): Generate internal boilerplate code only if @internal annotation is available.
* Scripts/builtins/builtins_templates.py: Split boilerplate in two templates (one that is used for all built-ins and one dedicated to internals).
* Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result: Removed internal boilerplate.
* Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result: Ditto.
* Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result: Ditto.

Source/WebCore:

No change in behavior.

* Modules/streams/ReadableStreamInternals.js: Renamed @internals to @internal.
* Modules/streams/StreamInternals.js: Ditto.
* Modules/streams/WritableStreamInternals.js: Ditto.

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

4 years ago[ES6] Minimize ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX ifdefs
utatane.tea@gmail.com [Sun, 8 Nov 2015 08:03:40 +0000 (08:03 +0000)]
[ES6] Minimize ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX ifdefs
https://bugs.webkit.org/show_bug.cgi?id=150998

Reviewed by Geoffrey Garen.

This patch minimizes ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX ifdefs.
It only keeps 2 ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX in Parser.cpp, one for
template literals and one for tagged templates.
This change makes difference minimal between the enabled and disabled configurations;
reducing accidental build breaks of the disabled configuration.

* bytecompiler/BytecodeGenerator.cpp:
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
* parser/ASTBuilder.h:
* parser/Lexer.cpp:
(JSC::Lexer<T>::Lexer): Deleted.
(JSC::Lexer<T>::lex): Deleted.
* parser/Lexer.h:
* parser/NodeConstructors.h:
* parser/Nodes.h:
* parser/Parser.cpp:
* parser/Parser.h:
* parser/SyntaxChecker.h:

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

4 years agoRemove ColorSpace argument to all the drawing calls
simon.fraser@apple.com [Sun, 8 Nov 2015 07:17:53 +0000 (07:17 +0000)]
Remove ColorSpace argument to all the drawing calls
https://bugs.webkit.org/show_bug.cgi?id=150967

Reviewed by Darin Adler.

Source/WebCore:

Since the -webkit-color-correction CSS property was removed in r188202, and ColorSpaceDeviceRGB
and ColorSpaceSRGB are functionally equivalent, we can remove all the ColorSpace arguments passed
to drawing functions, and remove RenderStyle::colorSpace(), which was hardcoded to return ColorSpaceSRGB.

Fill and stroke ColorSpaces are also remove from graphics state, simplifying color save/restore.

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret):
* editing/cocoa/HTMLConverter.mm:
(_platformColor):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::clearRect):
(WebCore::CanvasRenderingContext2D::applyShadow):
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::compositeBuffer):
(WebCore::drawImageToContext):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
* page/DebugPageOverlays.cpp:
(WebCore::RegionOverlay::drawRect):
* page/FrameView.cpp:
(WebCore::FrameView::paintScrollCorner):
(WebCore::FrameView::paintScrollbar):
(WebCore::FrameView::paintContents):
* page/PrintContext.cpp:
(WebCore::PrintContext::spoolAllPagesWithBoundaries):
* platform/ScrollView.cpp:
(WebCore::ScrollView::paintPanScrollIcon):
* platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::defaultPaintScrollCorner):
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::paintScrollCorner):
(WebCore::ScrollbarThemeComposite::paintOverhangAreas):
* platform/Theme.cpp:
(WebCore::Theme::drawNamedImage):
* platform/cocoa/ThemeCocoa.cpp:
(WebCore::ThemeCocoa::drawNamedImage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::drawPattern):
* platform/graphics/BitmapImage.h:
* platform/graphics/Color.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::drawCrossfadeSubimage):
(WebCore::CrossfadeGeneratedImage::draw):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::draw):
(WebCore::GradientImage::drawPattern):
* platform/graphics/GradientImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawRaisedEllipse):
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::setLegacyShadow):
(WebCore::GraphicsContext::getShadow):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::drawImageBuffer):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::clearShadow): Deleted.
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::strokeColorSpace): Deleted.
(WebCore::GraphicsContext::fillColorSpace): Deleted.
* platform/graphics/Image.cpp:
(WebCore::Image::fillWithSolidColor):
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
(WebCore::Image::drawFrameMatchingSourceSize):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
* platform/graphics/NamedImageGeneratedImage.cpp:
(WebCore::NamedImageGeneratedImage::draw):
(WebCore::NamedImageGeneratedImage::drawPattern):
* platform/graphics/NamedImageGeneratedImage.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::setCachedShadowValues):
(WebCore::ScratchBuffer::setCachedInsetShadowValues):
(WebCore::ShadowBlur::ShadowBlur):
(WebCore::ShadowBlur::setShadowValues):
(WebCore::ShadowBlur::drawShadowBuffer):
(WebCore::ShadowBlur::drawRectShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
(WebCore::ShadowBlur::drawRectShadowWithTiling):
(WebCore::ShadowBlur::drawLayerPieces):
(WebCore::ShadowBlur::blurAndColorShadowBuffer):
(WebCore::ShadowBlur::beginShadowLayer):
(WebCore::ShadowBlur::endShadowLayer):
* platform/graphics/ShadowBlur.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToImage): Deleted.
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::platformCALayerPaintContents):
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::drawRepaintCounters):
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::setPlatformFillColor):
(WebCore::GraphicsContext::setPlatformStrokeColor):
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::drawPattern):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
* platform/graphics/cairo/ImageCairo.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cg/ColorCG.cpp:
(WebCore::leakCGColor):
(WebCore::cachedCGColor):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::paintToCanvas):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::setCGFillColor):
(WebCore::setCGStrokeColor):
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::GraphicsContext::drawLinesForText):
(WebCore::GraphicsContext::setPlatformStrokeColor):
(WebCore::GraphicsContext::setPlatformFillColor):
(WebCore::sRGBColorSpaceRef): Deleted.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):
(WebCore::Image::imageWithColorSpace): Deleted.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::draw):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::platformApplySoftware):
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::platformApplySoftware):
* platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::platformApplySoftware):
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::platformApplySoftware):
* platform/graphics/filters/FEFlood.cpp:
(WebCore::FEFlood::platformApplySoftware):
* platform/graphics/filters/FEMerge.cpp:
(WebCore::FEMerge::platformApplySoftware):
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::platformApplySoftware):
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::platformApplySoftware):
* platform/graphics/filters/SourceGraphic.cpp:
(WebCore::SourceGraphic::platformApplySoftware):
* platform/graphics/ios/IconIOS.mm:
(WebCore::Icon::paint):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
* platform/graphics/win/FontCGWin.cpp:
(WebCore::FontCascade::drawGlyphs):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::drawLayer):
* platform/ios/LegacyTileGridTile.mm:
(WebCore::LegacyTileGridTile::showBorder):
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::didSetupFullscreen):
* platform/mac/DragImageMac.mm:
(WebCore::drawAtPoint):
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::paintCurrentFrameInContext):
* platform/mock/ScrollbarThemeMock.cpp:
(WebCore::ScrollbarThemeMock::paintTrackBackground):
(WebCore::ScrollbarThemeMock::paintThumb):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::paintSelection):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRendererHelper::applyFilterEffect):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintDecoration):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::paintCompositionUnderline):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGap):
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintClippingMask):
* rendering/RenderBoxModelObject.cpp:
(WebCore::applyBoxShadowForBackground):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::paint):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::drawLineForBoxSide):
(WebCore::RenderElement::paintOutline):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
(WebCore::RenderEmbeddedObject::paintReplaced):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paintColumnBorder):
(WebCore::RenderFrameSet::paintRowBorder):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::drawPlatformResizerImage):
(WebCore::RenderLayer::paintResizer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::paintScrollCorner):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
* rendering/RenderThemeIOS.mm:
(WebCore::drawAxialGradient):
(WebCore::drawRadialGradient):
(WebCore::RenderThemeIOS::paintCheckboxDecorations):
(WebCore::RenderThemeIOS::paintRadioDecorations):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::paintSliderTrack):
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
(WebCore::titleTextColorForAttachment):
(WebCore::AttachmentLayout::layOutSubtitle):
(WebCore::paintAttachmentIconBackground):
(WebCore::paintAttachmentTitleBackground):
(WebCore::paintAttachmentProgress):
* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
(WebCore::RenderView::paintBoxDecorations):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSelectionGap):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintDebugBorders):
* rendering/TextPaintStyle.cpp:
(WebCore::TextPaintStyle::TextPaintStyle):
(WebCore::adjustColorForVisibilityOnBackground):
(WebCore::computeTextPaintStyle):
(WebCore::updateGraphicsContext):
* rendering/TextPaintStyle.h:
(WebCore::TextPaintStyle::TextPaintStyle):
* rendering/TextPainter.cpp:
(WebCore::ShadowApplier::ShadowApplier):
(WebCore::paintTextWithShadows):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::paint):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::paint):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::paint):
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::paint):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
* rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImage::paint):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paintForeground):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::useStrokeStyleToFill):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGResourceSolidColor.cpp:
(WebCore::RenderSVGResourceSolidColor::applyResource):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
(WebCore::SVGRenderingContext::bufferForeground):
* svg/SVGAnimatedColor.cpp:
(WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawForContainer):
(WebCore::SVGImage::nativeImageForCurrentFrame):
(WebCore::SVGImage::drawPatternForContainer):
(WebCore::SVGImage::draw):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::draw):
(WebCore::SVGImageForContainer::drawPattern):
* svg/graphics/SVGImageForContainer.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):
* testing/MockPageOverlayClient.cpp:
(WebCore::MockPageOverlayClient::drawRect):

Source/WebKit/ios:

Since the -webkit-color-correction CSS property was removed in r188202, and ColorSpaceDeviceRGB
and ColorSpaceSRGB are functionally equivalent, we can remove all the ColorSpace arguments passed
to drawing functions, and remove RenderStyle::colorSpace(), which was hardcoded to return ColorSpaceSRGB.

* WebView/WebPDFViewIOS.mm:
(-[WebPDFView drawPage:]):
* WebView/WebPlainWhiteView.mm:

Source/WebKit/mac:

Since the -webkit-color-correction CSS property was removed in r188202, and ColorSpaceDeviceRGB
and ColorSpaceSRGB are functionally equivalent, we can remove all the ColorSpace arguments passed
to drawing functions, and remove RenderStyle::colorSpace(), which was hardcoded to return ColorSpaceSRGB.

* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
* WebInspector/WebNodeHighlightView.mm:
(-[WebNodeHighlightView _layoutForNodeHighlight:parent:]):
(-[WebNodeHighlightView _layoutForRectsHighlight:parent:]):
* WebView/WebFrame.mm:
(-[WebFrame _bodyBackgroundColor]):
* WebView/WebFrameView.mm:
(-[WebFrameView drawRect:]):
* WebView/WebIndicateLayer.mm:

Source/WebKit2:

* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateFromCGImage):
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeImage):
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
* UIProcess/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateTapHighlight]):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):

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

4 years agoUnreviewed gardening, update fast/replaced/replaced-breaking.html
cdumez@apple.com [Sun, 8 Nov 2015 06:57:00 +0000 (06:57 +0000)]
Unreviewed gardening, update fast/replaced/replaced-breaking.html

Update fast/replaced/replaced-breaking.html so that it outputs the
same result on all platforms.

* fast/replaced/replaced-breaking.html:

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

4 years agoUse ColorSpaceSRGB for image buffers everywhere
simon.fraser@apple.com [Sun, 8 Nov 2015 06:31:50 +0000 (06:31 +0000)]
Use ColorSpaceSRGB for image buffers everywhere
https://bugs.webkit.org/show_bug.cgi?id=150990

Reviewed by Zalan Bujtas.

ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.

Source/WebCore:

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::createCompatibleBuffer):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::checkForSolidColor):
* platform/graphics/cg/ColorCG.cpp:
(WebCore::Color::Color):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::sRGBColorSpaceRef): Deleted.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::putByteArray):
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::createFromImage):
* platform/graphics/filters/FEFlood.h:
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::FilterEffect):
* platform/graphics/filters/SourceGraphic.h:
(WebCore::SourceGraphic::SourceGraphic):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
(WebCore::FilterEffectRenderer::apply):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):

Source/WebKit2:

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::decode):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

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

4 years agoAttempt to fix the Windows EWS bot after r192087
dbates@webkit.org [Sun, 8 Nov 2015 04:04:23 +0000 (04:04 +0000)]
Attempt to fix the Windows EWS bot after r192087
(https://bugs.webkit.org/show_bug.cgi?id=150859)

Following r192087 Port._build_path() stores the computed root directory path in option
_cached_root instead of overwriting option root. We need to teach the Windows-specific
logic to make use of option _cached_root instead of option root when computing its adjusted
path and to cache its adjusted in _cached_root instead of root.

* Scripts/webkitpy/port/win.py:
(WinPort._build_path):

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

4 years agoDRT does not reset the frame rect between 2 runs.
zalan@apple.com [Sun, 8 Nov 2015 03:33:46 +0000 (03:33 +0000)]
DRT does not reset the frame rect between 2 runs.
https://bugs.webkit.org/show_bug.cgi?id=151003

Set the min frame rect for 800*600 for now.

Unreviewed gardening.

* fast/dynamic/crash-subtree-layout-when-auto-size-enabled.html:

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

4 years agoB3->Air lowering should do pattern matching the old fashioned way
fpizlo@apple.com [Sun, 8 Nov 2015 02:10:57 +0000 (02:10 +0000)]
B3->Air lowering should do pattern matching the old fashioned way
https://bugs.webkit.org/show_bug.cgi?id=150994

Reviewed by Geoffrey Garen.

When I first wrote the B3->Air lowering prototype, I was convinced that the patterns would get
so gnarly that we'd want a pattern language to write them in. So I made one, and that's what
the lowering has used. But as we've worked with the IR, we've found that it's very easy to
pattern match in C++ using the B3 API, and we've also found that most of the patterns we wrote
using the pattern language were mostly trivial. So this change removes the pattern match code
generator and the patterns files, and redoes the lowering using good old fashioned switch
statements. This actually reduces the total code of the lowering.

I also took the opportunity to refactoring UnOp and BinOp lowering. We had a lot of repetetive
code for 32-vs-64-bit opcode selection, so I factored that out into a helper. This also saves a
lot of code.

* CMakeLists.txt:
* DerivedSources.make:
* b3/B3AddressMatcher.patterns: Removed.
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::LowerToAir):
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::highBitsAreZero):
(JSC::B3::Air::LowerToAir::tmp):
(JSC::B3::Air::LowerToAir::canBeInternal):
(JSC::B3::Air::LowerToAir::commitInternal):
(JSC::B3::Air::LowerToAir::crossesInterference):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::loadPromise):
(JSC::B3::Air::LowerToAir::imm):
(JSC::B3::Air::LowerToAir::immForMove):
(JSC::B3::Air::LowerToAir::immOrTmpForMove):
(JSC::B3::Air::LowerToAir::tryOpcodeForType):
(JSC::B3::Air::LowerToAir::opcodeForType):
(JSC::B3::Air::LowerToAir::appendUnOp):
(JSC::B3::Air::LowerToAir::appendBinOp):
(JSC::B3::Air::LowerToAir::appendShift):
(JSC::B3::Air::LowerToAir::tryAppendStoreUnOp):
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::append):
(JSC::B3::Air::LowerToAir::ensureSpecial):
(JSC::B3::Air::LowerToAir::fillStackmap):
(JSC::B3::Air::LowerToAir::createGenericCompare):
(JSC::B3::Air::LowerToAir::createBranch):
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::immOrTmp): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::AddressSelector): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::acceptRoot): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::acceptRootLate): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::acceptInternals): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::acceptInternalsLate): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::acceptOperands): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::acceptOperandsLate): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::tryAddShift1): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::tryAddShift2): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::tryAdd): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::tryFramePointer): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::tryStackSlot): Deleted.
(JSC::B3::Air::LowerToAir::AddressSelector::tryDirect): Deleted.
(JSC::B3::Air::LowerToAir::acceptRoot): Deleted.
(JSC::B3::Air::LowerToAir::acceptRootLate): Deleted.
(JSC::B3::Air::LowerToAir::acceptInternals): Deleted.
(JSC::B3::Air::LowerToAir::acceptInternalsLate): Deleted.
(JSC::B3::Air::LowerToAir::acceptOperands): Deleted.
(JSC::B3::Air::LowerToAir::acceptOperandsLate): Deleted.
(JSC::B3::Air::LowerToAir::tryLoad): Deleted.
(JSC::B3::Air::LowerToAir::tryLoad8S): Deleted.
(JSC::B3::Air::LowerToAir::tryLoad8Z): Deleted.
(JSC::B3::Air::LowerToAir::tryLoad16S): Deleted.
(JSC::B3::Air::LowerToAir::tryLoad16Z): Deleted.
(JSC::B3::Air::LowerToAir::tryAdd): Deleted.
(JSC::B3::Air::LowerToAir::trySub): Deleted.
(JSC::B3::Air::LowerToAir::tryAnd): Deleted.
(JSC::B3::Air::LowerToAir::tryOr): Deleted.
(JSC::B3::Air::LowerToAir::tryXor): Deleted.
(JSC::B3::Air::LowerToAir::tryShl): Deleted.
(JSC::B3::Air::LowerToAir::trySShr): Deleted.
(JSC::B3::Air::LowerToAir::tryZShr): Deleted.
(JSC::B3::Air::LowerToAir::tryStoreAddLoad): Deleted.
(JSC::B3::Air::LowerToAir::tryStoreSubLoad): Deleted.
(JSC::B3::Air::LowerToAir::tryStoreAndLoad): Deleted.
(JSC::B3::Air::LowerToAir::tryStore): Deleted.
(JSC::B3::Air::LowerToAir::tryTrunc): Deleted.
(JSC::B3::Air::LowerToAir::tryZExt32): Deleted.
(JSC::B3::Air::LowerToAir::tryArgumentReg): Deleted.
(JSC::B3::Air::LowerToAir::tryConst32): Deleted.
(JSC::B3::Air::LowerToAir::tryConst64): Deleted.
(JSC::B3::Air::LowerToAir::tryFramePointer): Deleted.
(JSC::B3::Air::LowerToAir::tryStackSlot): Deleted.
(JSC::B3::Air::LowerToAir::tryEqual): Deleted.
(JSC::B3::Air::LowerToAir::tryNotEqual): Deleted.
(JSC::B3::Air::LowerToAir::tryLessThan): Deleted.
(JSC::B3::Air::LowerToAir::tryGreaterThan): Deleted.
(JSC::B3::Air::LowerToAir::tryLessEqual): Deleted.
(JSC::B3::Air::LowerToAir::tryGreaterEqual): Deleted.
(JSC::B3::Air::LowerToAir::tryAbove): Deleted.
(JSC::B3::Air::LowerToAir::tryBelow): Deleted.
(JSC::B3::Air::LowerToAir::tryAboveEqual): Deleted.
(JSC::B3::Air::LowerToAir::tryBelowEqual): Deleted.
(JSC::B3::Air::LowerToAir::tryPatchpoint): Deleted.
(JSC::B3::Air::LowerToAir::tryCheck): Deleted.
(JSC::B3::Air::LowerToAir::tryUpsilon): Deleted.
(JSC::B3::Air::LowerToAir::tryPhi): Deleted.
(JSC::B3::Air::LowerToAir::tryBranch): Deleted.
(JSC::B3::Air::LowerToAir::tryJump): Deleted.
(JSC::B3::Air::LowerToAir::tryIdentity): Deleted.
(JSC::B3::Air::LowerToAir::tryReturn): Deleted.
* b3/B3LoweringMatcher.patterns: Removed.
* b3/generate_pattern_matcher.rb: Removed.

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

4 years agoWeb Inspector: [Regression] [Mavericks] Toolbar is too dark while docked
nvasilyev@apple.com [Sun, 8 Nov 2015 01:29:22 +0000 (01:29 +0000)]
Web Inspector: [Regression] [Mavericks] Toolbar is too dark while docked
https://bugs.webkit.org/show_bug.cgi?id=150977

Set the toolbar color of the docked inspector to be the same as on OS X 10.10+.
Undocked toolbar color on Mavericks is unnaffected.

Reviewed by Timothy Hatcher.

* UserInterface/Views/Toolbar.css:
(body.mavericks.docked .toolbar):
(body:not(.mavericks) .toolbar): Added.

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

4 years agoCrash when subtree layout is set on FrameView while auto size mode is enabled.
zalan@apple.com [Sun, 8 Nov 2015 00:50:44 +0000 (00:50 +0000)]
Crash when subtree layout is set on FrameView while auto size mode is enabled.
https://bugs.webkit.org/show_bug.cgi?id=150995
rdar://problem/22785262

Reviewed by Beth Dakin.

Autosizing initiates multiple synchronous layouts to calculate preferred view width for current content.
FrameView::autoSizeIfEnabled() is called from FrameView::layout() while we are in InPreLayout state.
It is safe to do during full layout.
However, since we setup the subtree state just before the autoSizeIfEnabled() call, reentering it with
a newly issued layout confuses SubtreeLayoutStateMaintainer.

This patch reverses the order of autoSizeIfEnabled() call and the subtree layout state setup.
It also ensures that the first layout requested by autoSizeIfEnabled() always runs on the whole tree.

Source/WebCore:

Test: fast/dynamic/crash-subtree-layout-when-auto-size-enabled.html

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::convertSubtreeLayoutToFullLayout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::autoSizeIfEnabled):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::enableAutoSizeMode):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/dynamic/crash-subtree-layout-when-auto-size-enabled-expected.txt: Added.
* fast/dynamic/crash-subtree-layout-when-auto-size-enabled.html: Added.

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

4 years agoembed element without src and type attributes should represent nothing
cdumez@apple.com [Sat, 7 Nov 2015 23:48:08 +0000 (23:48 +0000)]
embed element without src and type attributes should represent nothing
https://bugs.webkit.org/show_bug.cgi?id=148853
<rdar://problem/22588235>

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

Rebaseline existing tests.

* web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt:
* web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-05-expected.txt:

Source/WebCore:

As per the HTML specification, an embed element without src and type
attributes should represent nothing:
https://html.spec.whatwg.org/multipage/embedded-content.html#the-embed-element

This patch fixes the issue by making sure we don't construct a
renderer for such embed elements.

The new behavior is consistent with Firefox but differs from Chrome.

No new tests, already covered by existing tests.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):

LayoutTests:

* TestExpectations:
Unskip 2 ref-tests that were previously failing.

* accessibility/inline-block-assertion-expected.txt:
* editing/execCommand/crash-140261-expected.txt:
* fast/block/float/4145535Crash-expected.txt:
* fast/dom/HTMLDocument/document-plugins-expected.txt:
* fast/dom/insertedIntoDocument-child-expected.txt:
* fast/dom/insertedIntoDocument-sibling-expected.txt:
* fast/dom/plugin-attributes-enumeration-expected.txt:
* fast/replaced/percent-height-in-anonymous-block-widget.html:
* fast/replaced/replaced-breaking.html:
* fast/replaced/table-percent-height.html:
* fast/text/international/embed-bidi-style-in-isolate-crash-expected.txt:
* imported/blink/fast/css-grid-layout/grid-add-positioned-block-item-after-inline-item-expected.txt:
Rebaseline / update existing tests.

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

4 years agoAdd conditional moves to the MacroAssembler
msaboff@apple.com [Sat, 7 Nov 2015 18:11:39 +0000 (18:11 +0000)]
Add conditional moves to the MacroAssembler
https://bugs.webkit.org/show_bug.cgi?id=150761

Reviewed by Filip Pizlo.

Added moveConditionally, moveConditionallyTest & moveConditionallyDouble to X86 macro assemblers.
Bench tested correct opcodes and operations on X86-64 and X86 for a select number of comparisons.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::moveConditionally):
(JSC::MacroAssemblerX86Common::moveConditionallyTest):
(JSC::MacroAssemblerX86Common::moveConditionallyDouble):
* assembler/X86Assembler.h:
(JSC::X86Assembler::cmovcc):
(JSC::X86Assembler::cmovl_rr):
(JSC::X86Assembler::cmovl_mr):
(JSC::X86Assembler::cmovel_rr):
(JSC::X86Assembler::cmovnel_rr):
(JSC::X86Assembler::cmovpl_rr):
(JSC::X86Assembler::cmovnpl_rr):
(JSC::X86Assembler::cmovq_rr):
(JSC::X86Assembler::cmovq_mr):
(JSC::X86Assembler::cmoveq_rr):
(JSC::X86Assembler::cmovneq_rr):
(JSC::X86Assembler::cmovpq_rr):
(JSC::X86Assembler::cmovnpq_rr):
(JSC::X86Assembler::X86InstructionFormatter::twoByteOp64):

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

4 years agoNode.h:392:12: warning: 'this' pointer cannot be null in well-defined C++ code
mcatanzaro@igalia.com [Sat, 7 Nov 2015 17:17:47 +0000 (17:17 +0000)]
Node.h:392:12: warning: 'this' pointer cannot be null in well-defined C++ code
https://bugs.webkit.org/show_bug.cgi?id=150996

Reviewed by Andreas Kling.

Remove ASSERT(this) statement that is triggering hundreds of warnings from Clang.

* dom/Node.h:
(WebCore::Node::document):

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

4 years agoUnreviewed, fix GTK build after r191981
mcatanzaro@igalia.com [Sat, 7 Nov 2015 15:22:30 +0000 (15:22 +0000)]
Unreviewed, fix GTK build after r191981

* html/HTMLFormControlElement.cpp:

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

4 years agoFix up ChangeLog entries for r192126 (https://bugs.webkit.org/show_bug.cgi?id=144938...
dbates@webkit.org [Sat, 7 Nov 2015 05:23:55 +0000 (05:23 +0000)]
Fix up ChangeLog entries for r192126 (https://bugs.webkit.org/show_bug.cgi?id=144938) to reflect
that the change was reviewed by Alexey Proskuryakov.

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

4 years agoDo not build LayoutTestRelay when --root is specified to run-webkit-tests
dbates@webkit.org [Sat, 7 Nov 2015 05:14:30 +0000 (05:14 +0000)]
Do not build LayoutTestRelay when --root is specified to run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=150989

Reviewed by Alexey Proskuryakov.

The script run-webkit-tests should only check if LayoutTestRelay exists when invoked with
--root and exit with an error if it does not exist. That is, we should not build LayoutTestRelay
when it does not exist and an explicit directory of built executables was specified via --root.
This will make the criterion for building LayoutTestRelay match the criterion for building
DumpRenderTree/WebKitTestRunner.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort._check_port_build): Moved logic from IOSSimulatorPort.{_check_build_relay, check_build} to here.
(IOSSimulatorPort._check_build_relay): Deleted.
(IOSSimulatorPort.check_build): Deleted.

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

4 years agoSource/WebCore:
commit-queue@webkit.org [Sat, 7 Nov 2015 04:44:02 +0000 (04:44 +0000)]
Source/WebCore:
Allow an optional hash algorithm to be passed to generateKey for RSA keys.
https://bugs.webkit.org/show_bug.cgi?id=144938

Unreviewed initial submission.

Test: crypto/subtle/rsa-export-generated-keys.html

This changeset allows an optional hash parameter to be passed to the generate
key function for RSA type keys. Previously, there was no way to export generated
keys, as no hash function could be associated with the key (required for JWK).

The current WebCrypto API draft requires the hash function to be specified in the
algorithm object passed to generateKey (http://www.w3.org/TR/WebCryptoAPI 20.4),
however, they were made optional in this implementation to maintain compatiblity.

Patch by Scott Valentine <svalentine@ikayzo.com> on 2015-11-06

* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::getHashAlgorithm):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::createRsaKeyGenParams):
(WebCore::createRsaOaepParams):
(WebCore::createRsaSsaParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Deleted.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readRSAKey):
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
* crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::restrictToHash): Deleted.
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::restrictToHash): Deleted.
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:

LayoutTests:
Adding new tests for exporting generated RSA keys.
https://bugs.webkit.org/show_bug.cgi?id=144938

Unreviewed initial submission.

Patch by Scott Valentine <svalentine@ikayzo.com> on 2015-11-06

* crypto/subtle/rsa-export-generated-keys-expected.txt: Added.
* crypto/subtle/rsa-export-generated-keys.html: Added.

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

4 years agoControl Flow Profiler should keep execution counts of basic blocks
sbarati@apple.com [Sat, 7 Nov 2015 03:18:32 +0000 (03:18 +0000)]
Control Flow Profiler should keep execution counts of basic blocks
https://bugs.webkit.org/show_bug.cgi?id=146099

Reviewed by Mark Lam.

This patch changes the control flow profiler to now
keep track of execution counts for each basic block
instead of a boolean indicating if the basic block has
executed at all.  This has the consequence of us having to
always compile all op_profile_control_flows in the baseline and DFG.

This patch adds a new "executionCount" field to the inspector protocol
corresponding to the execution of a basic block. This patch, for now,
still maintains the previous field of "hasExecuted" even though this is
redundant with "executionCount".

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getBasicBlocks):
* inspector/protocol/Runtime.json:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_control_flow):
(JSC::JIT::emit_op_create_direct_arguments):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionHasBasicBlockExecuted):
(functionBasicBlockExecutionCount):
(functionEnableExceptionFuzz):
(functionDrainMicrotasks):
(functionIs32BitPlatform):
(functionLoadWebAssembly):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/BasicBlockLocation.cpp:
(JSC::BasicBlockLocation::BasicBlockLocation):
(JSC::BasicBlockLocation::dumpData):
(JSC::BasicBlockLocation::emitExecuteCode):
* runtime/BasicBlockLocation.h:
(JSC::BasicBlockLocation::endOffset):
(JSC::BasicBlockLocation::setStartOffset):
(JSC::BasicBlockLocation::setEndOffset):
(JSC::BasicBlockLocation::hasExecuted):
(JSC::BasicBlockLocation::executionCount):
* runtime/ControlFlowProfiler.cpp:
(JSC::ControlFlowProfiler::getBasicBlocksForSourceID):
(JSC::findBasicBlockAtTextOffset):
(JSC::ControlFlowProfiler::hasBasicBlockAtTextOffsetBeenExecuted):
(JSC::ControlFlowProfiler::basicBlockExecutionCountAtTextOffset):
* runtime/ControlFlowProfiler.h:
(JSC::ControlFlowProfiler::dummyBasicBlock):
* tests/controlFlowProfiler/execution-count.js: Added.
(noop):
(foo):
(a):
(b):
(baz):
(jaz):
(testWhile):
(is32BitPlatform.testMax):
(is32BitPlatform):

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

4 years agoScrolling iframe inside scrollable div does not work with trackpad
wenson_hsieh@apple.com [Sat, 7 Nov 2015 02:32:13 +0000 (02:32 +0000)]
Scrolling iframe inside scrollable div does not work with trackpad
https://bugs.webkit.org/show_bug.cgi?id=150168
<rdar://problem/23143931>

Reviewed by Brent Fulgham.

Source/WebCore:

When scrolling in an iframe nested under an overflow scrolling region, EventHandler::platformPrepareForWheelEvents
fails to compute the correct scrollableArea, using the overflow div's scrollable area instead of the iframe's view.
This causes the latching algorithm to bail out of handling the wheel event. To avoid this, we special-case the
decision to compute the scrollableArea from the scrollableContainer if we are attempting to scroll in an iframe.

Test: fast/scrolling/latching/scroll-iframe-in-overflow.html

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents):

LayoutTests:

Tests that an iframe nested under an overflow scrolling div can be scrolled.

* fast/scrolling/latching/scroll-iframe-in-overflow-expected.txt: Added.
* fast/scrolling/latching/scroll-iframe-in-overflow.html: Added.

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

4 years agoModern IDB: Make the result data for a "get" request be an IDBGetResult.
beidson@apple.com [Sat, 7 Nov 2015 01:12:55 +0000 (01:12 +0000)]
Modern IDB: Make the result data for a "get" request be an IDBGetResult.
https://bugs.webkit.org/show_bug.cgi?id=150985

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Refactor, no change in behavior).

* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::IDBGetResult):
(WebCore::IDBGetResult::dataFromBuffer):
(WebCore::IDBGetResult::isolatedCopy):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):

* Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::valueForKeyRange):
* Modules/indexeddb/server/MemoryIndex.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performGetResultCallback):
(WebCore::IDBServer::UniqueIDBDatabase::performValueDataCallback): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):

* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::IDBResultData):
(WebCore::IDBResultData::getRecordSuccess):
(WebCore::IDBResultData::getResult):
* Modules/indexeddb/shared/IDBResultData.h:
(WebCore::IDBResultData::resultData): Deleted.

Source/WebKit2:

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

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

4 years agoRemove unused HTMLFormControlsCollection::namedItem()
cdumez@apple.com [Fri, 6 Nov 2015 23:58:09 +0000 (23:58 +0000)]
Remove unused HTMLFormControlsCollection::namedItem()
https://bugs.webkit.org/show_bug.cgi?id=150975

Reviewed by Andreas Kling.

Remove unused HTMLFormControlsCollection::namedItem().
JSHTMLFormControlsCollection::namedItem() calls namedItems() on the
implementation object, not namedItem() because it returns a
RadioNodeList when there are several matches.

* html/HTMLFormControlsCollection.cpp:
(WebCore::firstNamedItem): Deleted.
(WebCore::HTMLFormControlsCollection::namedItem): Deleted.
* html/HTMLFormControlsCollection.h:

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

4 years agoB3 and Air should simplify CFGs
fpizlo@apple.com [Fri, 6 Nov 2015 23:34:31 +0000 (23:34 +0000)]
B3 and Air should simplify CFGs
https://bugs.webkit.org/show_bug.cgi?id=150960

Reviewed by Geoffrey Garen.

This adds CFG simplification to both B3 and Air.

In B3, the simplification is done inside the B3::reduceStrength() fixpoint because we expect
that it will help to reveal more optimization opportunities. This is going to be particularly
true when we add Phi elimination.

In Air, the simplification is its own phase. We expect it to produce most of its benefits once
we have coalescing. Then, CFG simplification in Air will unbreak critial edges.

* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbortReason.h:
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::oops): Reveal this as a method so that we can have an Oops instruction.
* b3/B3BasicBlock.h:
(JSC::B3::BasicBlock::predecessor):
(JSC::B3::BasicBlock::predecessors):
(JSC::B3::BasicBlock::containsPredecessor):
* b3/B3BasicBlockUtils.h: Bunch of fixes for blocks being killed.
(JSC::B3::replacePredecessor):
(JSC::B3::resetReachability):
* b3/B3ReduceStrength.cpp: Implement B3 CFG simplification.
* b3/B3ReduceStrength.h:
* b3/air/AirBasicBlock.h:
(JSC::B3::Air::BasicBlock::resize):
(JSC::B3::Air::BasicBlock::insts):
(JSC::B3::Air::BasicBlock::appendInst):
(JSC::B3::Air::BasicBlock::containsPredecessor):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::generate):
* b3/air/AirInst.cpp:
(JSC::B3::Air::Inst::hasArgEffects):
(JSC::B3::Air::Inst::dump):
* b3/air/AirInst.h:
* b3/air/AirLiveness.h:
(JSC::B3::Air::Liveness::Liveness): Fix for when blocks were killed.
* b3/air/AirOpcode.opcodes:
* b3/air/AirSimplifyCFG.cpp: Added.
(JSC::B3::Air::simplifyCFG):
* b3/air/AirSimplifyCFG.h: Added.

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

4 years agoREGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
mmaxfield@apple.com [Fri, 6 Nov 2015 23:20:12 +0000 (23:20 +0000)]
REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
https://bugs.webkit.org/show_bug.cgi?id=150923

Reviewed by Zalan Bujtas.

Source/WebCore:

Ever since r182286, expansion opportunities in justified ruby were moved to their neighboring
elements (thereby forbidding trailing nor leading expansions inside ruby). However, when the
neighboring element is tatechuyoko, we will erroneously honor the expansion opportunity inside
the tatechuyoko, thereby moving it horizontally.

Tatechuyoko should never have expansion opportunities inside it.

Test: fast/text/ruby-justify-tatechuyoko.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::expansionBehaviorForInlineTextBox):

LayoutTests:

* fast/text/ruby-justify-tatechuyoko-expected.html: Added.
* fast/text/ruby-justify-tatechuyoko.html: Added.

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

4 years agoMarking fast/canvas/webgl/oes-texture-half-float-linear.html as flaky on mac
ryanhaddad@apple.com [Fri, 6 Nov 2015 20:58:17 +0000 (20:58 +0000)]
Marking fast/canvas/webgl/oes-texture-half-float-linear.html as flaky on mac
https://bugs.webkit.org/show_bug.cgi?id=150978

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoMarking streams/reference-implementation/count-queuing-strategy.html as flaky on...
ryanhaddad@apple.com [Fri, 6 Nov 2015 20:04:58 +0000 (20:04 +0000)]
Marking streams/reference-implementation/count-queuing-strategy.html as flaky on Win debug
https://bugs.webkit.org/show_bug.cgi?id=150976

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoAdd preliminary (SPI) support for NSTextFinder on WKWebView
timothy_horton@apple.com [Fri, 6 Nov 2015 19:48:27 +0000 (19:48 +0000)]
Add preliminary (SPI) support for NSTextFinder on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=150907
<rdar://problem/19171624>

Reviewed by Darin Adler.

New API test: WebKit2.FindInPage

* Platform/spi/mac/AppKitSPI.h:
Add some SPI.

* UIProcess/API/APIFindClient.h:
(API::FindClient::didFindString):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindString):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/Cocoa/FindClient.h:
* UIProcess/Cocoa/FindClient.mm:
(WebKit::FindClient::didFindString):
Make didFindString return the match rects like didFindStringMatches does.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::findString):
Keep the most recent find match around for incremental find just like we do
for the non-incremental version. This way, getImageForFindMatch and selectFindMatch
will work for incremental find too!

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ensureTextFinderClient]):
(-[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
(-[WKWebView documentContainerView]):
(-[WKWebView getSelectedText:]):
(-[WKWebView selectFindMatch:completionHandler:]):
Implement NSTextFinder's async client protocol and forward to the new WKTextFinderClient.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Privately note our conformance to the aformentioned protocol.

* UIProcess/mac/WKTextFinderClient.h: Added.
* UIProcess/mac/WKTextFinderClient.mm: Added.
(WebKit::TextFinderFindClient::TextFinderFindClient):
(-[WKTextFinderMatch initWithClient:view:index:rects:]):
(-[WKTextFinderMatch containingView]):
(-[WKTextFinderMatch textRects]):
(-[WKTextFinderMatch generateTextImage:]):
(-[WKTextFinderMatch index]):
(-[WKTextFinderClient initWithPage:view:]):
(-[WKTextFinderClient willDestroyView:]):
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
(-[WKTextFinderClient getSelectedText:]):
(-[WKTextFinderClient selectFindMatch:completionHandler:]):
(-[WKTextFinderClient didFindStringMatches:rects:index:]):
(-[WKTextFinderClient didGetImageForMatchResult:index:]):
(-[WKTextFinderClient didFindString:rects:index:]):
(-[WKTextFinderClient didFailToFindString:]):
(-[WKTextFinderClient getImageForMatchResult:completionHandler:]):
* WebKit2.xcodeproj/project.pbxproj:
Add WKTextFinderClient. It installs itself as the FindClient and FindMatchesClient,
so you can only use one mechanism or the other.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/FindInPage.mm: Added.
(-[FindInPageNavigationDelegate webView:didFinishNavigation:]):
(TEST):
Add an API test.

* WebEditingTester/WK1WebDocumentController.m:
* WebEditingTester/WK2WebDocumentController.m:
(-[WK2WebDocumentController awakeFromNib]):
(-[WK2WebDocumentController contentView]):
Use incremental find, and show the overlay/indicator.

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

4 years ago[WK2][SpeculativeRevalidation] Save to disk cache relationship between resources
cdumez@apple.com [Fri, 6 Nov 2015 19:29:24 +0000 (19:29 +0000)]
[WK2][SpeculativeRevalidation] Save to disk cache relationship between resources
https://bugs.webkit.org/show_bug.cgi?id=150951
<rdar://problem/23092196>

Reviewed by Darin Adler.

This patch is a first step towards speculative revalidation support in
the WebKit network cache. It maps sub-resources to the main resource
that caused them to be requested. We then write this information to the
network cache, as a list of subresource keys for each main resource,
even if the main resource is not cacheable.

To map sub-resources to main resources, we track the loads happening
in each frame and store the key of the main resource for the frame,
as well as the key of each sub-resource later loaded in the frame. We
use a HysteresisActivity to detect when loads settle down in each frame
(no loads happen for a while) and we then write the information to the
disk. If a new main resource is loaded in a frame where we were already
tracking a load, we save the data to disk before tracking the new load,
instead of waiting for the HysteresisActivity to detect the end of the
load.

The feature is currently behind a compile-time flag that is enabled on
Mac and iOS only. It is also behind a runtime flag (NSUserDefaults)
that is disabled by default.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
Pass frameID in addition to the pageID. We need to globally identify
frames (using <pageID, frameID> pair) to be able to track loads in
each frame.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::initialize):
Only initialize the SpeculativeLoader if the
enableNetworkCacheSpeculativeRevalidation run-time flag is set.

(WebKit::NetworkCache::Cache::retrieve):
Register the load with the SpeculativeLoader.

* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::Key::Key):
(WebKit::NetworkCache::Key::isHashTableDeletedValue):
(WebKit::NetworkCache::Key::range):
(WTF::NetworkCacheKeyHash::hash):
(WTF::NetworkCacheKeyHash::equal):
(WTF::HashTraits<WebKit::NetworkCache::Key>::isEmptyValue):
Add needed HashTraits for NetworkCache::Key so it can be used as key in
HashMap / HashSet.

* NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp: Added.
* NetworkProcess/cache/NetworkCacheSpeculativeLoader.h: Added.
Add new NetworkCacheSpeculativeLoader class that takes care of tracking
loads in each frame to map subresources to main resources and then write
this information to the network disk cache. In the future, this class we
also take care of triggering speculative revalidations, thus the naming.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
Add new NetworkProcess parameter to control at runtime if speculative loading
should be enabled or not. It is disabled by default.

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

* config.h:
Add ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION build flag for the new
feature that is enable by default on COCOA.

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

4 years agoWeb Inspector: Search Results tab causes jump to Resources tab on reload
timothy@apple.com [Fri, 6 Nov 2015 19:18:31 +0000 (19:18 +0000)]
Web Inspector: Search Results tab causes jump to Resources tab on reload
https://bugs.webkit.org/show_bug.cgi?id=150817

Reviewed by Brian Burg.

Remove the "search on reload" behavior from the Search Results tab. It often didn't find everything
on large pages, since it only searched after 500ms of the main resource changing. The bug here
was caused by performSearch selecting the first result, even if it was a background tab. We now
avoid doing unnecessary search work in the background when the Search Results tab isn't visible.

* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Deleted.
(WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange): Remove children from the
sidebar since performSearch isn't doing it now and ScriptTreeElements were not being removed.
ResourceTreeElements were already being removed by NavigationSidebarPanel's prune behavior.
Removed the call to performSearch and related code.
(WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange.delayedWork): Deleted.

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

4 years agoUnreviewed, remove empty #if block landed by mistake in r192038.
cdumez@apple.com [Fri, 6 Nov 2015 18:52:57 +0000 (18:52 +0000)]
Unreviewed, remove empty #if block landed by mistake in r192038.

* NetworkProcess/NetworkLoad.cpp:

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

4 years agoiOS test results are not visible on the flakiness dashboard
ap@apple.com [Fri, 6 Nov 2015 18:18:23 +0000 (18:18 +0000)]
iOS test results are not visible on the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=150884

Reviewed by Darin Adler.

One more change was needed for the minimal fix.

* TestResultServer/static-dashboards/flakiness_dashboard.js:

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

4 years agoInitialize the graphics benchmark's Kalman filter with estimated 60 FPS
commit-queue@webkit.org [Fri, 6 Nov 2015 17:55:08 +0000 (17:55 +0000)]
Initialize the graphics benchmark's Kalman filter with estimated 60 FPS
https://bugs.webkit.org/show_bug.cgi?id=150965

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-06
Reviewed by Darin Adler.

This should give the benchmark more accurate reading at warmup time. And
hence we can safely reduce the test running time to be 10 seconds.

* Animometer/runner/animometer.html:
Add "defer" back when loading resources/animometer.js since this script
depends on many other scripts and we need to wait till the page is parsed.
Also change the default test interval to be 10 seconds.

* Animometer/runner/resources/graph.js:
(graph): Make the test results curves smoother.

* Animometer/tests/resources/main.js:
(Animator): Initialize the Kalman filter with 60 FPS which should be true
if the test page is empty.

(Animator.prototype.animate):
* Animometer/tests/resources/math.js:
(KalmanEstimator): Fix the initial value of _vecX_est.
    _vecX_est[0] = current FPS (= 60FPS when the test page is empty)
    _vecX_est[1] = first time derivative of FPS (=0; FPS has been constant).
    _vecX_est[2] = second time derivative of FPS (=0; since _vecX_est[1]=0).
(KalmanEstimator.prototype.estimate): Add some comments.

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

4 years agoTeach Makefile to build LayoutTestRelay when building for iOS Simulator
dbates@webkit.org [Fri, 6 Nov 2015 16:58:31 +0000 (16:58 +0000)]
Teach Makefile to build LayoutTestRelay when building for iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=150849

Reviewed by Alexey Proskuryakov.

.:

Add support for overriding the user-provided arguments SDKROOT and ARCHS
on a per Makefile basis.

* Makefile.shared:

Tools:

Override the user-specified arguments SDKROOT and ARCHS to use the default SDK
and default ARCHS since LayoutTestRelay is a Mac command line tool.

* LayoutTestRelay/Makefile: Define OVERWRITE_SDKROOT and OVERWRITE_ARCHS.

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

4 years agoMarking three sputnik/Conformance tests as flaky timeouts on win debug
ryanhaddad@apple.com [Fri, 6 Nov 2015 16:47:45 +0000 (16:47 +0000)]
Marking three sputnik/Conformance tests as flaky timeouts on win debug
https://bugs.webkit.org/show_bug.cgi?id=150973

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoFixing typo in win TestExpectations file
ryanhaddad@apple.com [Fri, 6 Nov 2015 16:41:16 +0000 (16:41 +0000)]
Fixing typo in win TestExpectations file
https://bugs.webkit.org/show_bug.cgi?id=150949

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoLayout Test accessibility/win/linked-elements.html is crashing on win debug
mario@webkit.org [Fri, 6 Nov 2015 16:25:50 +0000 (16:25 +0000)]
Layout Test accessibility/win/linked-elements.html is crashing on win debug
https://bugs.webkit.org/show_bug.cgi?id=150944

Reviewed by Chris Fleizach.

Source/WebCore:

Be more precise ASSERTing on textUnderElement, only checking that the render
tree is stable before using TextIteraror when in 'IncludeAllChildren' mode.

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

LayoutTests:

Removed accessibility/win/linked-elements.html crashing expectation.

* platform/win/TestExpectations: Removed crashing expectation.

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

4 years ago[GStreamer] Use MainThreadNotifier to send notifications to main thread in WebKitWebS...
carlosgc@webkit.org [Fri, 6 Nov 2015 14:51:48 +0000 (14:51 +0000)]
[GStreamer] Use MainThreadNotifier to send notifications to main thread in WebKitWebSourceGStreamer
https://bugs.webkit.org/show_bug.cgi?id=150890

Reviewed by Žan Doberšek.

Instead of the GThreadSafeMainLoopSources.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStop):
(webKitWebSrcChangeState):
(webKitWebSrcNeedData):
(webKitWebSrcEnoughData):
(webKitWebSrcSeek):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(webKitWebSrcFinalize): Deleted.
(webKitWebSrcSetProperty): Deleted.
(webKitWebSrcGetProperty): Deleted.
(webKitWebSrcSetExtraHeader): Deleted.
(webKitWebSrcStart): Deleted.
(webKitWebSrcGetProtocols): Deleted.
(webKitWebSrcGetUri): Deleted.
(webKitWebSrcSetUri): Deleted.
(webKitWebSrcUriHandlerInit): Deleted.

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

4 years ago[GStreamer] Use MainThreadNotifier to send notifications to main thread in TrackPriva...
carlosgc@webkit.org [Fri, 6 Nov 2015 14:17:19 +0000 (14:17 +0000)]
[GStreamer] Use MainThreadNotifier to send notifications to main thread in TrackPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=150889

Reviewed by Žan Doberšek.

Instead of the GThreadSafeMainLoopSources.

* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
(WebCore::InbandTextTrackPrivateGStreamer::handleSample):
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::disconnect):
(WebCore::TrackPrivateBaseGStreamer::activeChangedCallback):
(WebCore::TrackPrivateBaseGStreamer::tagsChangedCallback):
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer): Deleted.
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged): Deleted.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:

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

4 years agoSuppress deprecated-declarations warning in WebCore/platform/URL.cpp
ossy@webkit.org [Fri, 6 Nov 2015 13:07:32 +0000 (13:07 +0000)]
Suppress deprecated-declarations warning in WebCore/platform/URL.cpp
https://bugs.webkit.org/show_bug.cgi?id=150803

Reviewed by Alexey Proskuryakov.

* platform/URL.cpp:
(WebCore::appendEncodedHostname):

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

4 years ago[GStreamer] Do not use GThreadSafeMainLoopSource to send notifications to the main...
carlosgc@webkit.org [Fri, 6 Nov 2015 12:56:02 +0000 (12:56 +0000)]
[GStreamer] Do not use GThreadSafeMainLoopSource to send notifications to the main thread in MediaPlayerPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=150888

Reviewed by Žan Doberšek.

Analyzing how the main loop sources were used in GST code I've
noticed that in most of the cases they are used to send
notifications to the main thread. The way it works in those cases
is that some state is updated in whatever thread and we notify the
main thread to use the new state. There's no data passed to the
main thread, they are just notifications. I've also noticed that
we are not doing this exactly as expected in several of those
cases. GThreadSafeMainLoopSource cancels the current source when a
new one is scheduled, and that was done this way because previous
code in GST using GSources directly did it that way. But that's
not what we want, if there's a notification pending, since the
state is updated, we can just wait for it to happen instead of
cancelling and scheduling a new one. I've also noticed that in
most of the cases where we schedule notifications to the main
thread, we can be already in the main thread, so we could avoid
the schedule entirely.
We can use RunLoop::dispatch() to send notifications to the main
thread, but there's no way to cancel those tasks. This patch adds
a new helper class MainThreadNotifier that uses an enum of flags to
handle different kind of notifications. It uses
RunLoop::dispatch() to send notifications to the main thread, but
only if there isn't one pending for the given type.
This patch also makes signal callbacks static members to be able
to make the private methods actually private.

* platform/graphics/gstreamer/MainThreadNotifier.h: Added.
(WebCore::MainThreadNotifier::MainThreadNotifier):
(WebCore::MainThreadNotifier::notify):
(WebCore::MainThreadNotifier::cancelPendingNotifications):
(WebCore::MainThreadNotifier::addPendingNotification):
(WebCore::MainThreadNotifier::removePendingNotification):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamPropertiesCallback):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::newTextSampleCallback):
(WebCore::MediaPlayerPrivateGStreamer::sourceChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): Deleted.
(WebCore::initializeGStreamerAndRegisterWebKitElements): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::load): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::repaintCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::muted): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(WebCore::MediaPlayerPrivateGStreamerBase::setVisible): Deleted.

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

4 years agoExpose HTMLImageElement sizes attribute in IDL
yoav@yoav.ws [Fri, 6 Nov 2015 11:05:55 +0000 (11:05 +0000)]
Expose HTMLImageElement sizes attribute in IDL
https://bugs.webkit.org/show_bug.cgi?id=150230

Reviewed by Darin Adler.

No new tests, but fixed test expectations for exposed interfaces.

* html/HTMLImageElement.idl: Make sure that `sizes` is exposed as an IDL attribute, to ensure proper feature detection of sizes support.

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

4 years agoUnreviewed, GTK build fix after r192095.
philn@webkit.org [Fri, 6 Nov 2015 11:00:23 +0000 (11:00 +0000)]
Unreviewed, GTK build fix after r192095.

* Source/cmake/FindGTK3.cmake:

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

4 years ago[GTK] Fails to link libwebkit2gtkinjectedbundle.so on OSX
commit-queue@webkit.org [Fri, 6 Nov 2015 09:48:45 +0000 (09:48 +0000)]
[GTK] Fails to link libwebkit2gtkinjectedbundle.so on OSX
https://bugs.webkit.org/show_bug.cgi?id=144785

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-11-06
Reviewed by Philippe Normand.

* PlatformGTK.cmake: Add missing WebKit2 library to list of
libraries to link with. Required for OSX build.

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

4 years ago[GTK] Re-enable Quartz backend on cmake build system
mcatanzaro@igalia.com [Fri, 6 Nov 2015 09:39:30 +0000 (09:39 +0000)]
[GTK] Re-enable Quartz backend on cmake build system
https://bugs.webkit.org/show_bug.cgi?id=144561

Reviewed by Philippe Normand.

* Source/cmake/FindGTK3.cmake: Set GTK3_SUPPORTS_QUARTZ based on
the presence of of gtk+-quartz-3.0 module.
* Source/cmake/OptionsGTK.cmake: Reintroduce the
ENABLE_QUARTZ_TARGET option to the CMake build, for building the
GTK+ Quartz backend on OS X.

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

4 years ago[GStreamer] Use RunLoop::Timer instead of GMainLoopSource in video sink
carlosgc@webkit.org [Fri, 6 Nov 2015 07:28:00 +0000 (07:28 +0000)]
[GStreamer] Use RunLoop::Timer instead of GMainLoopSource in video sink
https://bugs.webkit.org/show_bug.cgi?id=150807

Reviewed by Žan Doberšek.

Since we always wait until the sample is actually rendered we
don't really need either a thread safe main loop source, nor
cancelling if already requested and other things GMainLoopSource does.
This adds a helper class VideoRenderRequestScheduler to use the
RunLoop::Timer. All the logic to syncronize between threads has
been moved to this helper class too.

* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(VideoRenderRequestScheduler::VideoRenderRequestScheduler):
(VideoRenderRequestScheduler::start):
(VideoRenderRequestScheduler::stop):
(VideoRenderRequestScheduler::requestRender):
(VideoRenderRequestScheduler::isUnlocked):
(VideoRenderRequestScheduler::render):
(_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate):
(webkitVideoSinkRepaintRequested):
(webkitVideoSinkRender):
(webkitVideoSinkUnlock):
(webkitVideoSinkUnlockStop):
(webkitVideoSinkStop):
(webkitVideoSinkStart):
(_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Deleted.
(webkitVideoSinkTimeoutCallback): Deleted.
(unlockSampleMutex): Deleted.

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

4 years agoAdd runtime and compile time flags for enabling Web Animations API and model.
commit-queue@webkit.org [Fri, 6 Nov 2015 05:58:52 +0000 (05:58 +0000)]
Add runtime and compile time flags for enabling Web Animations API and model.
https://bugs.webkit.org/show_bug.cgi?id=150914

Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2015-11-05
Reviewed by Benjamin Poulain.

Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.

.:

* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAnimationsEnabled):
(WebCore::RuntimeEnabledFeatures::webAnimationsEnabled):

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebAnimationsEnabled):
(WKPreferencesGetWebAnimationsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setWebAnimationsEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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@192093 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoLayout Test js/intl-collator.html is crashing on win 7 debug
sukolsak@gmail.com [Fri, 6 Nov 2015 05:52:41 +0000 (05:52 +0000)]
Layout Test js/intl-collator.html is crashing on win 7 debug
https://bugs.webkit.org/show_bug.cgi?id=150943

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

The string length returned by ICU's uenum_next seems to be unreliable
on an old version of ICU. Since uenum_next returns a null-terminated
string anyway, this patch removes the use of the length.

* runtime/IntlCollatorConstructor.cpp:
(JSC::sortLocaleData):

LayoutTests:

* platform/win/TestExpectations:

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

4 years ago[EFL] Separate beforeunload confirm callback from confirm callback
ryuan.choi@navercorp.com [Fri, 6 Nov 2015 04:31:49 +0000 (04:31 +0000)]
[EFL] Separate beforeunload confirm callback from confirm callback
https://bugs.webkit.org/show_bug.cgi?id=150964

Reviewed by Gyuyoung Kim.

Source/WebKit2:

Browser may need to distinguish between beforeunload confirm panel and general confirm panel.
For example, browser may want to modify the message or show different buttons from confirm panel
such as "Stay Page | Leave Page".

* UIProcess/API/efl/EwkView.cpp:
(EwkView::requestJSBeforeUnloadConfirmPopup):
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::runBeforeUnloadConfirmPanel):

Tools:

* MiniBrowser/efl/main.c:
(on_javascript_before_unload_confirm):
(window_create):

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

4 years agoUnreviewed, rolling out r192089.
commit-queue@webkit.org [Fri, 6 Nov 2015 04:25:39 +0000 (04:25 +0000)]
Unreviewed, rolling out r192089.
https://bugs.webkit.org/show_bug.cgi?id=150966

This change broke an existing layout test on Yosemite and
Mavericks (Requested by ryanhaddad on #webkit).

Reverted changeset:

"Preview on apple.com/contact with all text selected shows a
map"
https://bugs.webkit.org/show_bug.cgi?id=150963
http://trac.webkit.org/changeset/192089

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

4 years agoPreview on apple.com/contact with all text selected shows a map
timothy_horton@apple.com [Fri, 6 Nov 2015 00:38:32 +0000 (00:38 +0000)]
Preview on apple.com/contact with all text selected shows a map
https://bugs.webkit.org/show_bug.cgi?id=150963
<rdar://problem/23421750>

Reviewed by Beth Dakin.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::DictionaryLookup::rangeForSelection):
If the range that Lookup decides to use doesn't intersect the hit point,
just ignore Lookup.

(WebCore::DictionaryLookup::rangeAtHitTestResult):
If the selection-based Lookup fails to find a usable result, fall back
to looking around the hit point.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
In this case, we don't know where we hit, so pass a null VisiblePosition.

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

4 years agoUnreviewed, add FIXMEs referencing https://bugs.webkit.org/show_bug.cgi?id=150958 and
fpizlo@apple.com [Fri, 6 Nov 2015 00:13:57 +0000 (00:13 +0000)]
Unreviewed, add FIXMEs referencing https://bugs.webkit.org/show_bug.cgi?id=150958 and
https://bugs.webkit.org/show_bug.cgi?id=150954.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createGenericCompare):
* b3/B3ReduceStrength.cpp:

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

4 years agorun-webkit-test should look in --root directory for LayoutTestRelay
jmarcell@apple.com [Fri, 6 Nov 2015 00:06:56 +0000 (00:06 +0000)]
run-webkit-test should look in --root directory for LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=150859

Reviewed by Daniel Bates.

For iOS run-webkit-tests, use LayoutTestRelay specified by --root; otherwise find
LayoutTestRelay in the Mac build directory when --root is unspecified.

* Scripts/webkitpy/port/base.py:
(Port._build_path): Use '_cached_root' instead of 'root' so that we don't overwrite the
argument that was passed in via the --root argument.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.relay_path):

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

4 years agoWeb Inspector: Convert remaining ContentViews to View base class
mattbaker@apple.com [Fri, 6 Nov 2015 00:03:59 +0000 (00:03 +0000)]
Web Inspector: Convert remaining ContentViews to View base class
https://bugs.webkit.org/show_bug.cgi?id=150729

Reviewed by Brian Burg.

Refactor content views to reuse View features: remove updateLayout and
element getters, and use View.prototype.addSubview and removeSubview
where appropriate.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView):
(WebInspector.ClusterContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
(WebInspector.CookieStorageContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
(WebInspector.DOMStorageContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.layout):
(WebInspector.DOMTreeContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView):
(WebInspector.DatabaseTableContentView.prototype._queryFinished):
(WebInspector.DatabaseTableContentView.prototype._queryError):
* UserInterface/Views/FontResourceContentView.js:
(WebInspector.FontResourceContentView.prototype.layout):
(WebInspector.FontResourceContentView):
(WebInspector.FontResourceContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WebInspector.IndexedDatabaseObjectStoreContentView):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.layout):
(WebInspector.LogContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.needsLayout):
(WebInspector.NetworkGridContentView.prototype.layout):
(WebInspector.NetworkGridContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.layout): Deleted.
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype._contentWillPopulate):
(WebInspector.ScriptContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView):
(WebInspector.TextContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.layout):
(WebInspector.TextEditor.prototype.get element): Deleted.
(WebInspector.TextEditor.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.layout):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype.updateLayout): Deleted.

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

4 years agoTestWebKitAPI crashed in TestWebKitAPI: TestWebKitAPI::SharedBufferTest_copyBufferCre...
ddkilzer@apple.com [Thu, 5 Nov 2015 23:20:37 +0000 (23:20 +0000)]
TestWebKitAPI crashed in TestWebKitAPI: TestWebKitAPI::SharedBufferTest_copyBufferCreatedWithContentsOfExistingFile_Test::TestBody
<http://webkit.org/b/150931>
<rdar://problem/23409384>

Reviewed by Youenn Fablet.

* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F(SharedBufferTest, copyBufferCreatedWithContentsOfExistingFile)):
- Switch from strnstr() to memcmp() since strings are
  not guaranteed to be NULL-terminated.
- Add another expectation that the size is greater than
  zero since memcmp() returns 0 (matching) if the length
  argument is zero.
(TestWebKitAPI::TEST_F(SharedBufferTest, appendBufferCreatedWithContentsOfExistingFile)):
- Same change to keep tests consistent, although the
  second string is NULL-terminated in this case.

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

4 years agoUnreviewed, rolling out r192073.
commit-queue@webkit.org [Thu, 5 Nov 2015 23:17:43 +0000 (23:17 +0000)]
Unreviewed, rolling out r192073.
https://bugs.webkit.org/show_bug.cgi?id=150962

"Broke the internal iOS build; will investigate offline"
(Requested by dydz on #webkit).

Reverted changeset:

"Teach Makefile to build LayoutTestRelay when building for iOS
Simulator"
https://bugs.webkit.org/show_bug.cgi?id=150849
http://trac.webkit.org/changeset/192073

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

4 years ago_WKObservablePageState's _webProcessIsResponsive property isn't set to YES when an...
ggaren@apple.com [Thu, 5 Nov 2015 23:17:26 +0000 (23:17 +0000)]
_WKObservablePageState's _webProcessIsResponsive property isn't set to YES when an unresponsive page is reloaded
https://bugs.webkit.org/show_bug.cgi?id=150953

Reviewed by Anders Carlsson.

* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::processTerminated): Call stop() to
indicate that we are responsive again. This gives the client a chance
to remove the SPOD cursor, among other things.

* UIProcess/ResponsivenessTimer.h:
(WebKit::ResponsivenessTimer::processTerminated): Anders told me to do this!

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited): Be sure to reset
the responsiveness timer too, or it will continue thinking we are
unresponsive after a crash or a forced load or reload.

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

4 years agoimported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_...
ryanhaddad@apple.com [Thu, 5 Nov 2015 23:01:03 +0000 (23:01 +0000)]
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata.html is a flaky timout
https://bugs.webkit.org/show_bug.cgi?id=150956

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoMove invocation argument encoding out to a separate function
andersca@apple.com [Thu, 5 Nov 2015 22:44:44 +0000 (22:44 +0000)]
Move invocation argument encoding out to a separate function
https://bugs.webkit.org/show_bug.cgi?id=150950

Reviewed by Tim Horton.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments):
(encodeInvocation):

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

4 years agoMarking imported/blink/fast/css/transformed-overflow-hidden-clips-fixed.html as faili...
ryanhaddad@apple.com [Thu, 5 Nov 2015 22:33:22 +0000 (22:33 +0000)]
Marking imported/blink/fast/css/transformed-overflow-hidden-clips-fixed.html as failing on win debug
https://bugs.webkit.org/show_bug.cgi?id=150949

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoMarking imported/blink/transitions/unprefixed-transform.html as flaky on win debug
ryanhaddad@apple.com [Thu, 5 Nov 2015 22:28:17 +0000 (22:28 +0000)]
Marking imported/blink/transitions/unprefixed-transform.html as flaky on win debug
https://bugs.webkit.org/show_bug.cgi?id=150948

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoUsing emitResolveScope & emitGetFromScope with 'this' that is TDZ lead to segfault...
commit-queue@webkit.org [Thu, 5 Nov 2015 22:21:19 +0000 (22:21 +0000)]
Using emitResolveScope & emitGetFromScope with 'this' that is TDZ lead to segfault in DFG
https://bugs.webkit.org/show_bug.cgi?id=150902

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-11-05
Reviewed by Geoffrey Garen.

Tiny fix provided by Saam Barati. This fix prevent segfault error in arrow function,
when it uses in constructor of derived class, before 'super' is called.

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

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

4 years agoMarking scrollbars/custom-scrollbar-appearance-property.html as a crash on win debug.
ryanhaddad@apple.com [Thu, 5 Nov 2015 22:17:50 +0000 (22:17 +0000)]
Marking scrollbars/custom-scrollbar-appearance-property.html as a crash on win debug.
https://bugs.webkit.org/show_bug.cgi?id=150946

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoWeb Inspector: Pretty print falsely triggers on some JS that wasn't minified
nvasilyev@apple.com [Thu, 5 Nov 2015 22:14:52 +0000 (22:14 +0000)]
Web Inspector: Pretty print falsely triggers on some JS that wasn't minified
https://bugs.webkit.org/show_bug.cgi?id=150876

Change the minification detection heuristic. Look for the ratio of whitespace to
non-whitespace characters in the first 5000 characters.

The previous heuristic looked for lines longer than 500 characters. Not only it was
slower on large unminified files, it also had a false positive on unminified codemirror.js.

Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
(WebInspector.SourceCodeTextEditor.prototype._isLikelyMinified):
Exit early if whitespace to non-whitespace ratio drops below 5%.

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

4 years agoMarking accessibility/win/linked-elements.html as a crash on win debug.
ryanhaddad@apple.com [Thu, 5 Nov 2015 22:12:28 +0000 (22:12 +0000)]
Marking accessibility/win/linked-elements.html as a crash on win debug.
https://bugs.webkit.org/show_bug.cgi?id=150944

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoMarking js/intl-collator.html as a crash on win debug.
ryanhaddad@apple.com [Thu, 5 Nov 2015 22:00:42 +0000 (22:00 +0000)]
Marking js/intl-collator.html as a crash on win debug.
https://bugs.webkit.org/show_bug.cgi?id=150943

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoTeach Makefile to build LayoutTestRelay when building for iOS Simulator
dbates@webkit.org [Thu, 5 Nov 2015 22:00:16 +0000 (22:00 +0000)]
Teach Makefile to build LayoutTestRelay when building for iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=150849

Reviewed by Alexey Proskuryakov.

* LayoutTestRelay/Makefile: Temporarily override SDKROOT when it is iphonesimulator so
that we build with the default SDK. We assume that the default SDK is the OS X SDK.
* Makefile: Append LayoutTestRelay to the list of modules to build when building with
SDK iphonesimulator.

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

4 years agoB3->Air lowering should have a story for compare-branch fusion
fpizlo@apple.com [Thu, 5 Nov 2015 21:51:05 +0000 (21:51 +0000)]
B3->Air lowering should have a story for compare-branch fusion
https://bugs.webkit.org/show_bug.cgi?id=150721

Reviewed by Geoffrey Garen.

This adds comprehensive support for compares and compare/branch fusion to B3. The fusion is
super aggressive. It can even handle things like Branch(LessThan(Load8S(...), constant)). It
can even handle flipping the operands to the branch, and flipping the comparison condition,
if it enables a more efficient instruction. This happens when there is asymmetry in the
admitted argument kinds. For example, Branch32 will only accept an Imm as a second operand.
If we do a LessThan(constant, load) then we will generate it as:

    Branch32 GreaterThan, (addr), $imm

This also supports compiling and fusing tests, and to some extent, compiling and fusing
double compares. Though we cannot test doubles yet because we don't have enough support for
that.

This also supports fusing compare/branches in Checks. We basically get that for free.

Because I wanted to fuse comparisons with sub-32-bit loads, I added support for those loads
directly, too.

The tests are now getting super big, so I made testb3 run tests in parallel.

Finally, this slightly changes the semantics of Branch and Check. Previously they would have
accepted a double to branch on. I found that this is awkward. It's especially awkward since
we want to be explicit about when a double zero constant is materialized. So, from now on, we
require that to branch on a double being non-zero, you have to do Branch(NotEqual(value, 0)).

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::invert):
(JSC::MacroAssembler::isInvertible):
(JSC::MacroAssembler::flip):
(JSC::MacroAssembler::isSigned):
(JSC::MacroAssembler::isUnsigned):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::test32):
(JSC::MacroAssemblerX86Common::invert):
* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::Key::Key):
(JSC::B3::CheckSpecial::Key::dump):
(JSC::B3::CheckSpecial::CheckSpecial):
(JSC::B3::CheckSpecial::~CheckSpecial):
* b3/B3CheckSpecial.h:
(JSC::B3::CheckSpecial::Key::Key):
(JSC::B3::CheckSpecial::Key::operator==):
(JSC::B3::CheckSpecial::Key::operator!=):
(JSC::B3::CheckSpecial::Key::operator bool):
(JSC::B3::CheckSpecial::Key::opcode):
(JSC::B3::CheckSpecial::Key::numArgs):
(JSC::B3::CheckSpecial::Key::isHashTableDeletedValue):
(JSC::B3::CheckSpecial::Key::hash):
(JSC::B3::CheckSpecialKeyHash::hash):
(JSC::B3::CheckSpecialKeyHash::equal):
* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::zShrConstant):
(JSC::B3::Const32Value::equalConstant):
(JSC::B3::Const32Value::notEqualConstant):
(JSC::B3::Const32Value::lessThanConstant):
(JSC::B3::Const32Value::greaterThanConstant):
(JSC::B3::Const32Value::lessEqualConstant):
(JSC::B3::Const32Value::greaterEqualConstant):
(JSC::B3::Const32Value::aboveConstant):
(JSC::B3::Const32Value::belowConstant):
(JSC::B3::Const32Value::aboveEqualConstant):
(JSC::B3::Const32Value::belowEqualConstant):
(JSC::B3::Const32Value::dumpMeta):
* b3/B3Const32Value.h:
* b3/B3Const64Value.cpp:
(JSC::B3::Const64Value::zShrConstant):
(JSC::B3::Const64Value::equalConstant):
(JSC::B3::Const64Value::notEqualConstant):
(JSC::B3::Const64Value::lessThanConstant):
(JSC::B3::Const64Value::greaterThanConstant):
(JSC::B3::Const64Value::lessEqualConstant):
(JSC::B3::Const64Value::greaterEqualConstant):
(JSC::B3::Const64Value::aboveConstant):
(JSC::B3::Const64Value::belowConstant):
(JSC::B3::Const64Value::aboveEqualConstant):
(JSC::B3::Const64Value::belowEqualConstant):
(JSC::B3::Const64Value::dumpMeta):
* b3/B3Const64Value.h:
* b3/B3ConstDoubleValue.cpp:
(JSC::B3::ConstDoubleValue::subConstant):
(JSC::B3::ConstDoubleValue::equalConstant):
(JSC::B3::ConstDoubleValue::notEqualConstant):
(JSC::B3::ConstDoubleValue::lessThanConstant):
(JSC::B3::ConstDoubleValue::greaterThanConstant):
(JSC::B3::ConstDoubleValue::lessEqualConstant):
(JSC::B3::ConstDoubleValue::greaterEqualConstant):
(JSC::B3::ConstDoubleValue::dumpMeta):
* b3/B3ConstDoubleValue.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::LowerToAir):
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::ArgPromise::ArgPromise):
(JSC::B3::Air::LowerToAir::ArgPromise::tmp):
(JSC::B3::Air::LowerToAir::ArgPromise::operator bool):
(JSC::B3::Air::LowerToAir::ArgPromise::kind):
(JSC::B3::Air::LowerToAir::ArgPromise::peek):
(JSC::B3::Air::LowerToAir::ArgPromise::consume):
(JSC::B3::Air::LowerToAir::tmp):
(JSC::B3::Air::LowerToAir::tmpPromise):
(JSC::B3::Air::LowerToAir::canBeInternal):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::loadPromise):
(JSC::B3::Air::LowerToAir::imm):
(JSC::B3::Air::LowerToAir::appendBinOp):
(JSC::B3::Air::LowerToAir::tryAppendStoreUnOp):
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::createGenericCompare):
(JSC::B3::Air::LowerToAir::createBranch):
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::tryLoad):
(JSC::B3::Air::LowerToAir::tryLoad8S):
(JSC::B3::Air::LowerToAir::tryLoad8Z):
(JSC::B3::Air::LowerToAir::tryLoad16S):
(JSC::B3::Air::LowerToAir::tryLoad16Z):
(JSC::B3::Air::LowerToAir::tryAdd):
(JSC::B3::Air::LowerToAir::tryStackSlot):
(JSC::B3::Air::LowerToAir::tryEqual):
(JSC::B3::Air::LowerToAir::tryNotEqual):
(JSC::B3::Air::LowerToAir::tryLessThan):
(JSC::B3::Air::LowerToAir::tryGreaterThan):
(JSC::B3::Air::LowerToAir::tryLessEqual):
(JSC::B3::Air::LowerToAir::tryGreaterEqual):
(JSC::B3::Air::LowerToAir::tryAbove):
(JSC::B3::Air::LowerToAir::tryBelow):
(JSC::B3::Air::LowerToAir::tryAboveEqual):
(JSC::B3::Air::LowerToAir::tryBelowEqual):
(JSC::B3::Air::LowerToAir::tryPatchpoint):
(JSC::B3::Air::LowerToAir::tryCheck):
(JSC::B3::Air::LowerToAir::tryBranch):
(JSC::B3::Air::LowerToAir::loadAddr): Deleted.
* b3/B3LoweringMatcher.patterns:
* b3/B3Opcode.cpp:
(JSC::B3::invertedCompare):
* b3/B3Opcode.h:
(JSC::B3::isCheckMath):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::addBlock):
(JSC::B3::Procedure::addIntConstant):
(JSC::B3::Procedure::addBoolConstant):
(JSC::B3::Procedure::resetValueOwners):
* b3/B3Procedure.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::zShrConstant):
(JSC::B3::Value::equalConstant):
(JSC::B3::Value::notEqualConstant):
(JSC::B3::Value::lessThanConstant):
(JSC::B3::Value::greaterThanConstant):
(JSC::B3::Value::lessEqualConstant):
(JSC::B3::Value::greaterEqualConstant):
(JSC::B3::Value::aboveConstant):
(JSC::B3::Value::belowConstant):
(JSC::B3::Value::aboveEqualConstant):
(JSC::B3::Value::belowEqualConstant):
(JSC::B3::Value::invertedCompare):
* b3/B3Value.h:
* b3/air/AirArg.cpp:
(JSC::B3::Air::Arg::isRepresentableAs):
(JSC::B3::Air::Arg::dump):
(WTF::printInternal):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isUse):
(JSC::B3::Air::Arg::typeForB3Type):
(JSC::B3::Air::Arg::widthForB3Type):
(JSC::B3::Air::Arg::Arg):
(JSC::B3::Air::Arg::value):
(JSC::B3::Air::Arg::isRepresentableAs):
(JSC::B3::Air::Arg::asNumber):
(JSC::B3::Air::Arg::pointerValue):
(JSC::B3::Air::Arg::asDoubleCondition):
(JSC::B3::Air::Arg::inverted):
(JSC::B3::Air::Arg::flipped):
(JSC::B3::Air::Arg::isSignedCond):
(JSC::B3::Air::Arg::isUnsignedCond):
* b3/air/AirInst.h:
(JSC::B3::Air::Inst::Inst):
(JSC::B3::Air::Inst::operator bool):
* b3/air/AirOpcode.opcodes:
* b3/air/opcode_generator.rb:
* b3/testb3.cpp:
(hiddenTruthBecauseNoReturnIsStupid):
(JSC::B3::testStoreLoadStackSlot):
(JSC::B3::modelLoad):
(JSC::B3::testLoad):
(JSC::B3::testBranch):
(JSC::B3::testComplex):
(JSC::B3::testSimplePatchpoint):
(JSC::B3::testSimpleCheck):
(JSC::B3::genericTestCompare):
(JSC::B3::modelCompare):
(JSC::B3::testCompareLoad):
(JSC::B3::testCompareImpl):
(JSC::B3::testCompare):
(JSC::B3::run):
(main):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithMod):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):

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

4 years agoMarking animations/multiple-backgrounds.html as flaky on mac-wk2
ryanhaddad@apple.com [Thu, 5 Nov 2015 21:25:23 +0000 (21:25 +0000)]
Marking animations/multiple-backgrounds.html as flaky on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=150942

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoWeb Inspector: Convert TimelineRuler to View base class
mattbaker@apple.com [Thu, 5 Nov 2015 21:17:41 +0000 (21:17 +0000)]
Web Inspector: Convert TimelineRuler to View base class
https://bugs.webkit.org/show_bug.cgi?id=150703

Reviewed by Brian Burg.

Convert TimelineRuler to View base class. Ruler markers and selection elements
can be updated independent from its main layout. The logic for these additional
layouts is implemented as an override of View.prototype.needsLayout, and remains
largely unchanged.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
Add ruler as a subview.
(WebInspector.OverviewTimelineView.prototype.layout): Deleted.
Separate ruler layout no longer needed.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
(WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
(WebInspector.TimelineRuler.prototype.set formatLabelCallback):
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
(WebInspector.TimelineRuler.prototype.set zeroTime):
(WebInspector.TimelineRuler.prototype.set startTime):
(WebInspector.TimelineRuler.prototype.set duration):
(WebInspector.TimelineRuler.prototype.get endTime):
(WebInspector.TimelineRuler.prototype.set endTime):
(WebInspector.TimelineRuler.prototype.get secondsPerPixel):
(WebInspector.TimelineRuler.prototype.set secondsPerPixel):
(WebInspector.TimelineRuler.prototype.updateLayoutIfNeeded):
(WebInspector.TimelineRuler.prototype.needsLayout):
(WebInspector.TimelineRuler.prototype.layout):
(WebInspector.TimelineRuler.prototype._needsMarkerLayout):
(WebInspector.TimelineRuler.prototype._needsSelectionLayout):
(WebInspector.TimelineRuler.prototype._recalculate):
(WebInspector.TimelineRuler.prototype._updateMarkers):
(WebInspector.TimelineRuler.prototype._updateSelection):
(WebInspector.TimelineRuler.prototype._handleMouseDown):
(WebInspector.TimelineRuler.prototype._handleMouseMove):
(WebInspector.TimelineRuler.prototype._handleMouseUp):
(WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseDown):
(WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseMove):
(WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseUp):
Renamed methods to match new View.prototype methods and cleaned up
some code to use let, for...of.
(WebInspector.TimelineRuler.prototype.get element): Deleted.
No longer needed.
(WebInspector.TimelineRuler.prototype.updateLayout): Deleted.
Renamed to layout, overrides View.prototype.layout.
(WebInspector.TimelineRuler.prototype._needsLayout): Deleted.
Renamed to needsLayout, overrides View.prototype.needsLayout.
(WebInspector.TimelineRuler.prototype._needsMarkerLayout.update): Deleted.
(WebInspector.TimelineRuler.prototype._needsSelectionLayout.update): Deleted.

* UserInterface/Views/View.js:
(WebInspector.View.prototype.get isLayoutPending):
Added getter to check for pending layout.

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

4 years agoAdd regression test for Bug 150937
cdumez@apple.com [Thu, 5 Nov 2015 20:37:24 +0000 (20:37 +0000)]
Add regression test for Bug 150937
https://bugs.webkit.org/show_bug.cgi?id=150937

Reviewed by Geoffrey Garen.

Add regression test for Bug 150937:
Regression(r192038): Safari cannot load any pages

The new test makes sure that load deferring works as intended. The fix
for this already landed in r192060.

* loader/load-defer-expected.txt: Added.
* loader/load-defer.html: Added.

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

4 years agoModern IDB: Implement IDBIndex get/getKey/count requests.
beidson@apple.com [Thu, 5 Nov 2015 20:23:02 +0000 (20:23 +0000)]
Modern IDB: Implement IDBIndex get/getKey/count requests.
https://bugs.webkit.org/show_bug.cgi?id=150910

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/index-get-count-basic.html
       storage/indexeddb/modern/index-get-count-failures.html

* Modules/indexeddb/IndexedDB.h:

* Modules/indexeddb/client/IDBAnyImpl.cpp:
(WebCore::IDBClient::IDBAny::IDBAny):
(WebCore::IDBClient::IDBAny::modernIDBIndex):
* Modules/indexeddb/client/IDBAnyImpl.h:
(WebCore::IDBClient::IDBAny::create):
(WebCore::IDBClient::IDBAny::createUndefined):

* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::doCount):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::doGet):
(WebCore::IDBClient::IDBIndex::getKey):
(WebCore::IDBClient::IDBIndex::doGetKey):
* Modules/indexeddb/client/IDBIndexImpl.h:
(WebCore::IDBClient::IDBIndex::info):

* Modules/indexeddb/client/IDBObjectStoreImpl.h:
(WebCore::IDBClient::IDBObjectStore::isDeleted):
(WebCore::IDBClient::IDBObjectStore::modernTransaction):

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::createCount):
(WebCore::IDBClient::IDBRequest::createGet):
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::sourceObjectStoreIdentifier):
(WebCore::IDBClient::IDBRequest::sourceIndexIdentifier):
(WebCore::IDBClient::IDBRequest::requestedIndexRecordType):
(WebCore::IDBClient::IDBRequest::setResultToUndefined):
* Modules/indexeddb/client/IDBRequestImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::requestGetValue):
(WebCore::IDBClient::IDBTransaction::requestGetKey):
(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
(WebCore::IDBClient::IDBTransaction::requestCount):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/client/TransactionOperation.cpp:
(WebCore::IDBClient::TransactionOperation::TransactionOperation):
* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::TransactionOperation::indexIdentifier):
(WebCore::IDBClient::TransactionOperation::indexRecordType):

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getCount):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::valueForKeyRange):
(WebCore::IDBServer::MemoryIndex::countForKeyRange):
* Modules/indexeddb/server/MemoryIndex.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
(WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
(WebCore::IDBServer::UniqueIDBDatabase::getCount):
(WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
(WebCore::IDBServer::UniqueIDBDatabase::performGetRecord): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
(WebCore::IDBRequestData::objectStoreIdentifier):
(WebCore::IDBRequestData::indexIdentifier):
(WebCore::IDBRequestData::indexRecordType):
* Modules/indexeddb/shared/IDBRequestData.h:

LayoutTests:

* storage/indexeddb/modern/index-get-count-basic-expected.txt: Added.
* storage/indexeddb/modern/index-get-count-basic.html: Added.
* storage/indexeddb/modern/index-get-count-failures-expected.txt: Added.
* storage/indexeddb/modern/index-get-count-failures.html: Added.

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

4 years agoRebaselining fast/text/tatechuyoko.html on win
ryanhaddad@apple.com [Thu, 5 Nov 2015 19:55:27 +0000 (19:55 +0000)]
Rebaselining fast/text/tatechuyoko.html on win
https://bugs.webkit.org/show_bug.cgi?id=150935

Unreviewed test gardening.

* platform/win/fast/text/tatechuyoko-expected.txt:

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

4 years agoRename the variable to avoid conflict between the variable and the parameter.
commit-queue@webkit.org [Thu, 5 Nov 2015 19:40:01 +0000 (19:40 +0000)]
Rename the variable to avoid conflict between the variable and the parameter.
https://bugs.webkit.org/show_bug.cgi?id=150019.

Patch by Zhuo Li <zachli@apple.com> on 2015-11-05
Reviewed by Dan Bernstein.

* platform/cocoa/SearchPopupMenuCocoa.mm:
(WebCore::typeCheckedRecentSearchesRemovingRecentSearchesAddedAfterDate): Rename `date`
to `dateAdded` so that it does not have the same name as the parameter passed in.

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

4 years agoWeb Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt...
commit-queue@webkit.org [Thu, 5 Nov 2015 19:35:22 +0000 (19:35 +0000)]
Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt focused
https://bugs.webkit.org/show_bug.cgi?id=150916

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

When first opening the inspector we hide the window until the document
is mostly ready / loaded. However once displaying the window WK2 would
set the initial focus, clearing what we already had and focusing the
first natural element (tabindex dictates the toolbar). Workaround this
by detecting when the document becomes visible and then focusing the
console prompt.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole):
(InspectorFrontendAPI.handleEvent):

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

4 years agoWeb Inspector: Clean up InjectedScript uses
commit-queue@webkit.org [Thu, 5 Nov 2015 19:31:35 +0000 (19:31 +0000)]
Web Inspector: Clean up InjectedScript uses
https://bugs.webkit.org/show_bug.cgi?id=150921

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

Source/JavaScriptCore:

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::wrapCallFrames):
* inspector/InjectedScript.h:
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::initialize): Deleted.
* inspector/InjectedScriptBase.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::didCreateInjectedScript):
* inspector/InjectedScriptManager.h:
* inspector/InjectedScriptModule.cpp:
(Inspector::InjectedScriptModule::ensureInjected):
* inspector/InjectedScriptModule.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::currentCallFrames):
* inspector/agents/InspectorDebuggerAgent.h:

Source/WebCore:

* inspector/CommandLineAPIModule.cpp:
(WebCore::CommandLineAPIModule::injectIfNeeded):
(WebCore::CommandLineAPIModule::CommandLineAPIModule):
* inspector/CommandLineAPIModule.h:
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::didCreateInjectedScript):
* inspector/WebInjectedScriptManager.h:

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

4 years agoWeb Inspector: Toolbar "Inspect Node" button not highlighting when active
commit-queue@webkit.org [Thu, 5 Nov 2015 19:27:37 +0000 (19:27 +0000)]
Web Inspector: Toolbar "Inspect Node" button not highlighting when active
https://bugs.webkit.org/show_bug.cgi?id=150938

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

* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph):
Copy the navigation-bar button activated styles to toolbar.

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

4 years ago[WK2] Clean up / Modernize NetworkResourceLoader
cdumez@apple.com [Thu, 5 Nov 2015 19:25:29 +0000 (19:25 +0000)]
[WK2] Clean up / Modernize NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=150922

Reviewed by Andreas Kling.

Clean up / Modernize NetworkResourceLoader.

* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
(WebKit::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
(WebKit::NetworkResourceLoader::validateCacheEntry):
(WebKit::NetworkResourceLoader::messageSenderConnection):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader): Deleted.
(WebKit::NetworkResourceLoader::didReceiveBuffer): Deleted.
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Deleted.
(WebKit::NetworkResourceLoader::consumeSandboxExtensions): Deleted.
(WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/NetworkDiskCacheMonitor.h:

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

4 years agoWeb Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate...
commit-queue@webkit.org [Thu, 5 Nov 2015 19:22:42 +0000 (19:22 +0000)]
Web Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate references
https://bugs.webkit.org/show_bug.cgi?id=150869

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

Source/JavaScriptCore:

ScriptDebugServer (JSC::Debugger) is being used by more and more agents
for instrumentation into JavaScriptCore. Currently the ScriptDebugServer
is owned by DebuggerAgent subclasses that make their own ScriptDebugServer
subclass. As more agents want to use it there was added boilerplate.
Instead, put the ScriptDebugServer in the InspectorEnvironment (Controllers).
Then each agent can access it during construction through the environment.

Do the same clean up for RuntimeAgent::globalVM, which is now just a
duplication of InspectorEnvironment::vm.

* inspector/InspectorEnvironment.h:
Add scriptDebugServer().

* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::scriptDebugServer):
Own the JSGlobalObjectScriptDebugServer.

* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
(Inspector::InspectorDebuggerAgent::enable):
(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::setBreakpointsActive):
(Inspector::InspectorDebuggerAgent::isPaused):
(Inspector::InspectorDebuggerAgent::setSuppressAllPauses):
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
(Inspector::InspectorDebuggerAgent::removeBreakpoint):
(Inspector::InspectorDebuggerAgent::continueToLocation):
(Inspector::InspectorDebuggerAgent::resolveBreakpoint):
(Inspector::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::cancelPauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::resume):
(Inspector::InspectorDebuggerAgent::stepOver):
(Inspector::InspectorDebuggerAgent::stepInto):
(Inspector::InspectorDebuggerAgent::stepOut):
(Inspector::InspectorDebuggerAgent::setPauseOnExceptions):
(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):
(Inspector::InspectorDebuggerAgent::scriptExecutionBlockedByCSP):
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::breakProgram):
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
(Inspector::setPauseOnExceptionsState):
(Inspector::InspectorRuntimeAgent::parse):
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
(Inspector::InspectorRuntimeAgent::setTypeProfilerEnabledState):
(Inspector::InspectorRuntimeAgent::getBasicBlocks):
Use VM and ScriptDebugServer passed during construction.

* inspector/agents/JSGlobalObjectDebuggerAgent.h:
* inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
(Inspector::JSGlobalObjectDebuggerAgent::injectedScriptForEval):
(Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent): Deleted.
One special case needed by this subclass as a convenience to access the global object.

* inspector/agents/JSGlobalObjectRuntimeAgent.h:
* inspector/agents/JSGlobalObjectRuntimeAgent.cpp:
(Inspector::JSGlobalObjectRuntimeAgent::globalVM): Deleted.
This virtual method is no longer needed, the base class has everything now.

Source/WebCore:

Refactoring covered by existing tests.

* WebCore.xcodeproj/project.pbxproj:
Privately export PageScriptDebuggerAgent.h due to InspectorController.h needing it.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::scriptDebugServer):
Own the PageScriptDebugServer.

* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::scriptDebugServer):
Own the WorkerScriptDebugServer.

(WebCore::WorkerInspectorController::vm):
Use the VM accessed through the worker global object.

* inspector/InspectorWebAgentBase.h:
(WebCore::InspectorAgentBase::InspectorAgentBase):
Given Web agents a m_environment convenience to access the InspectorEnvironment.

* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::timestamp):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::timestamp):
(WebCore::InspectorPageAgent::enable):
(WebCore::InspectorPageAgent::frameStartedLoading):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::InspectorTimelineAgent::timestamp):
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::setPageScriptDebugServer): Deleted.
* inspector/InspectorTimelineAgent.h:
Use the InspectorEnvironment for VM / ScriptDebugServer.

* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::PageDebuggerAgent): Deleted.
(WebCore::PageDebuggerAgent::scriptDebugServer): Deleted.
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::globalVM): Deleted.
* inspector/PageRuntimeAgent.h:
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::globalVM): Deleted.
* inspector/WorkerRuntimeAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent): Deleted.
(WebCore::WorkerDebuggerAgent::scriptDebugServer): Deleted.
Remove now unnecessary subclass code.

(WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
One more special case for accessing Worker properties from the ScriptDebugServer.

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

4 years agoRegression(r192038): Safari cannot load any pages
cdumez@apple.com [Thu, 5 Nov 2015 18:30:51 +0000 (18:30 +0000)]
Regression(r192038): Safari cannot load any pages
https://bugs.webkit.org/show_bug.cgi?id=150937
<rdar://problem/23413859>

Reviewed by Alex Christensen.

Make sure we use the current "defersLoading" state instead of the
original one when constructing / initializing the NetworkLoad.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):

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

4 years agoMarking http/tests/contentextensions/async-xhr-onerror.html as flaky on mac-wk2
ryanhaddad@apple.com [Thu, 5 Nov 2015 17:19:05 +0000 (17:19 +0000)]
Marking http/tests/contentextensions/async-xhr-onerror.html as flaky on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=150577

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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